Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    X and runlevels.


    I've started 'fiddling' and have become stuck. I started out with a linux minimal install (think it was from Ubuntu) and installed X and a window manager (matchbox). I want to run an application (xcalc).

    For now, I boot up and get a CLI login. I enter my username/password.

    I type xinit /etc/X11/XSession and up pops the GUI

    I open a different console (eg ctrl+alt+F4) and set the display to localhost:0.0, and run xcalc. Switch back to the GUI and it works.

    To automate this process, I created an init.d script, which executes at runlevel 2 (the CLI login box). It runs xinit (with an & to stop it blocking), waits a second for it to load (wait 1), then executes xcalc. The result is brilliant, exactly what I want (the GUI appears at startup, no logging in).

    The question is: how should I do this 'propperly'. So that the boot process is 'correct', uses the correct run levels, and does not use 'wait 1' like I am now?


  2. #2
    Linux Engineer hazel's Avatar
    Join Date
    May 2004
    Harrow, UK
    The standard way to get a graphical login is to install a display manager. Gnome and KDE come with built-in ones, but if you're building a desktop from scratch, you need to choose and install one yourself. The standard ones are gdm (Gnome), kdm (KDE) or slim. I recommend slim because it's small but configurable.
    "I'm just a little old lady; don't try to dazzle me with jargon!"

  3. #3
    thanks, but not really what I was after.

    I think I should be looking at inittab default start level, then start X as a daemon then sort out the window manager and running applications later. correct?

  4. $spacer_open
  5. #4
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Generally, the GDM starts at runlevel 5. Runlevel 2 is single user mode, 3 is multi-user CLI.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts