Hello Colin, Colin Finck wrote:
I need to restart the X server (XFree86 4.3.0) under Debian Sarge with a script or program. On other Linux systems, I now that I can use "init 3" to terminate the X server and then use "startx" to start it again, but on my Debian system this does not work. Additionally I have no runlevel 5. On other Linux systems, this runlevel is used for a graphical X environment, but on Debian it simply does not exist. Is there a way to add this, because I want to autostart the X server after login.
AFAIK in Debian runlevels 2-5 are equivalent. You enable/disable the graphical login to your system by adding/removing gdm (or whatever graphical login manager you are using) to the runlevel you are starting in (I am starting in the default runlevel 2, you can check yours in your /etc/inittab). If you just install gdm, it should add itself to the appropriate runlevel.
Respectively, you should be able to restart X by running the following as root:
invoke-rc.d gdm restart which would basically run /etc/init.d/gdm restart At least that is the way I do it. Best regards, Andrey