Click to See Complete Forum and Search --> : 2 (too) simple questions about starting x
dwolf
07-07-2001, 01:51 AM
I am relatively new to Linux, but I am happily running Mandrake 8 on a Dell C600 laptop. I heard that it is possible to run multiple x sessions at the same time. If that's true at all, I wonder what the command is to start up a second x session?
When starting x from a command line, Mandrake defaults into KDE, which would be fine, if I hadn't, for unclear reasons, developed a preference for Gnome. My second question therefore is how I can start Gnome from the command line.
I realize that the answers to these questions may be buried somewhere in this forum, but I was unable to retrieve them in a seach. Any help would be greatly appreciated. Many thanks in advance!
I dont know how to start up multiple X-sessions but to default to Gnome as your wm all you have to do is make a ".Xclients" file in your home directory with "gnome-session" in it. Nothing else.
Just do this on the command line and start X.
echo "gnome-session">~/.Xclients
dwolf
07-07-2001, 02:14 AM
Changing the default wm is clearly one solution, but my question was more general: what is the command to start any GUI (i.e the common ones, KDE and Gnome) from the command line? Thanks!
You can start another X session on tty8 via:
prompt$ xinit -- :1 vt8
Of course this is useful only if you have it run something like twm or another lightweight wm that your system can handle. Or you might simply pass 'xterm' to xinit and let xterm be the only thing running on that session.
prompt$ xinit /usr/X11R6/bin/twm -- :1 vt8
As far as getting Gnome to run rather than KDE, create yourself a ~/.xinitrc file, chmod it executable and stick the following in it:
#!/bin/sh
# example ~/.xinitrc
# starts your wm
exec gnome-session
# eof
You simply change the ~/.xinitrc file to reflect your current mood, running Gnome one day, KDE the next. One thing to keep in mind, if X starts up when you boot the system via XDM or similar, either rename or link to ~/.xsession.
Originally posted by dwolf:
<STRONG>Changing the default wm is clearly one solution, but my question was more general: what is the command to start any GUI (i.e the common ones, KDE and Gnome) from the command line? Thanks!</STRONG>
You could, I suppose do it via xinit as mentioned in my post above, but why would you want to? The 'startx' command or XDM take care of the process for you.
prompt$ xinit /path/to/wm/wmname -- :0
As far as I know there is no way to pick your wm from the command line.
dwolf
07-07-2001, 02:22 AM
Thanks alot. I'll need some time to sort through this. I'm a newbie after all.