[GRLUG] gui on a server

John-Thomas Richards jtr at jrichards.org
Fri Apr 6 16:54:13 EDT 2012


On Fri, Apr 06, 2012 at 04:21:25PM -0400, Roberto Villarreal wrote:
> On Friday, April 06, 2012 04:04:20 PM Topher wrote:
> > On Fri, 6 Apr 2012, Michael Mol wrote:
> > > On Fri, Apr 6, 2012 at 3:49 PM, Benjamin Flanders <flanderb at gmail.com> 
> wrote:
> > >> How does one install a gui like say xfce on a ubuntu server so that X
> > >> does not start automatically?  I like the ease of use that
> > >> xubuntu-desktop afford, but this is on a low power server that is
> > >> already running a lot of stuff.  I'd like to be able to run startx if
> > >> I want to get the gui, but have it all out of memory when I don't want
> > >> it.
> > > 
> > > Most straightforward approach would be to not install a display
> > > manager like xdm, kdm, gdm or slim.
> > > 
> > > Apart from that...Not certain. I don't know recall how one enables or
> > > disables upstart services.
> > 
> > When *I* was a kid (early 20's) the gui was started at a runlevel.
> > Runlevel3 was the command line, runlevel5 got you the gui.  Startx
> > actually changed the runlevel.
> > 
> > I would google for how to run ubuntu without a gui, then install xfce and
> > then uninstall the startup manager if they make you have one.
> 
> For Debian at least, it's still conceptually the same.  In my install at 
> least, you'll be put into runlevel 2 (/etc/inittab should tell you yours).
> 
> There is a command that lets you alter what runs in what runlevels, and I for 
> the life of me can't remember what it is, because I usually cheat.  In /etc 
> there are directories named rc[0123456].d which symlink to scripts in 
> /etc/init.d.  So the 'cheat' way is to just delete the script in rc2.d (for 
> me, it's called S99kdm).  Then, if you are in runlevel2, it will not start by 
> default.  If you want to start it on demand, you can call /etc/init.d/kdm 
> start (or whatever display manager you use).

As with most things, it's intuitive, once you know it.  The command is
`update-rc.d'.  The manpage is most informative for syntax.

"Cheating" as you call it, is actually a good and effective way.  The
files in those directories are simply symlinks to the actual scripts.
The naming determines what it does.  Links beginning with K are killed
when entering that runlevel and links beginning with S are started.
This is done in numeric order (S1foo is started before S25bar).
-- 
john-thomas
------
Better than a thousand days of diligent study is one day with a great
teacher.
Japanese proverb


More information about the grlug mailing list