LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to choose session when I startx from text mode (https://www.linuxquestions.org/questions/linux-software-2/how-to-choose-session-when-i-startx-from-text-mode-271972/)

cain_eve 12-30-2004 12:49 PM

how to choose session when I startx from text mode
 
Can anyone tell me how to choose the session when I startx from the text mode.
The default session if GNOME. Is there a way like

# startx -s kde

to choose the session I want to begin with.
Or there is a file in the /etc/X11 which I can modify something as the default.


Thanks very much!


cain

Brain Drop 12-30-2004 01:00 PM

You have in your home directory (or can make) a file ~/.xinitrc. To start kde put in a line that says startkde
just like that, nothing else needed, when you startx it will start kde. Now from here you can also google to find scripts that give you a choice when you startx, but I never have gotten around to this yet so I can't tell you anymore than that.

camelrider 12-30-2004 02:45 PM

Here's my ~/.xinitrc:

Code:

# xscreensaver-demo &
# Turn NumLock on ( numlockx ) ---------------
/usr/X11R6/bin/numlockx &
# numlockx -----------------------------------
rxvt -geometry 108x44+0+0 &
sleep 2 
rxvt -geometry 80x24+263+316 & 
# rxvt -geometry 108x44+0+0 & 
sleep 2 
/usr/local/bin/sylpheed &
# /usr/bin/sylpheed &
sleep 2 
/usr/bin/opera &
exec icewm
#exec startkde
#exec gnome-session

As you can see I'm currently running IceWM.

The earlier command lines must end with "&" or the script will end at that command.

The window-manager command must be executed last.

When I want to change window-managers, I just comment the current line and uncomment the line for the WM I wish to use.

The sleep lines are just to ensure that the progs show up on my toolbar in the predicted order.

cain_eve 12-30-2004 03:17 PM

thanks a lot!
but it looks a little difficult for me
I will copy all the lines and try it
anyway thanks a lot

cain


All times are GMT -5. The time now is 10:51 PM.