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?
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.
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?
Generally, the GDM starts at runlevel 5. Runlevel 2 is single user mode, 3 is multi-user CLI.