LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Start different window managers? (https://www.linuxquestions.org/questions/linux-newbie-8/start-different-window-managers-226828/)

ToothlessRebel 09-05-2004 12:03 AM

Start different window managers?
 
Is the window manager it uses by default defined in inittab?

I would like to boot to the GUI, but would rather use the KDM (or is it KWM, the KDE windows manager) other than the GNOME windows manager. If I'm way off with inittab, any help?

hw-tph 09-05-2004 06:35 AM

Yes, you're a bit off the mark with inittab, but fret not! :)

How do you start X normally? Through a display manager like GDM or KDM (graphical login) or console login (no fancy graphics)?

In either case you can create an .xinitrc file in your home directory if it doesn't exist already. This file is read for startup commands when you run startx from the console. A similar file, .xsession, is read when you select "Custom session" in GDM and I would think there is a similar entry in KDM. Here's mine:
Code:

#!/bin/bash
fbsetbg ~/gfx/wallpapers/current
fbpanel &
fbpanel -p pager &
aterm -geometry 80x24+0+26 &
torsmo &
xrootconsole -fn lime -fg gray /var/log/messages -geometry 166x8+180+674 &
exec openbox

The commands with an appended ampersand (the "&" character) will start and fork to background so the commands after them will be executed too. The final command, "exec openbox", launches my window manager. The exec prefix means the script is replaced by the openbox process. This means that when openbox exits, the whole session will end (logout if I use GDM or back to console if I don't).

Since .xinitrc and .xsession are basically the same I only keep an .xsession file and then have a symbolic link called .xinitrc pointing to my .xsession file.

When I last ran KDE (ehh, back in the 1.0 days) there was a "startkde" script. There is probaby a similar one now, perhaps with the same name. So a very simple .xinitrc/.xsession to start KDE would be:
Code:

startkde
Hope that helps!

Håkan

motub 09-05-2004 08:20 AM

Yes, there is still a 'startkde' script, and it still is used to start KDE.

ToothlessRebel 09-05-2004 09:08 AM

Hmm, unfortunitely, I am having trouble understanding.

I currently start X11 from the console. However, if I change /etc/inittab to start at the runlevel for X11, it starts GNOME. The line from inittab reads:

id:3:initdefault:

I think it's the "initdefault" that makes it start GNOME. Is it this you are saying needs to be changed to a KDE script?

Using Slackware 9.1

ralvez 09-05-2004 09:27 AM

I noticed that you have the same problem I had with Slackware 10.0
To solve the problem I edited the file "/etc/rc.d/rc.4" .
The file looks like this:

# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."

# Try to use GNOME's gdm session manager:
#if [ -x /usr/bin/gdm ]; then
# exec /usr/bin/gdm -nodaemon
#fi

# OK, try to use KDE's kdm session manager:
if [ -x /opt/kde/bin/kdm ]; then
exec /opt/kde/bin/kdm -nodaemon
fi

# If all you have is XDM, I guess it will have to do:
if [ -x /usr/X11R6/bin/xdm ]; then
exec /usr/X11R6/bin/xdm -nodaemon
fi

Notice that I commented the GNOME section using (#) so KDE would start by default. That was the end of it.

Hope this helps.

ToothlessRebel 09-05-2004 12:45 PM

Ahaha! Someone had mentioned that file before and at the time I was too afraid of breaking stuff to try it. Much bolder now. I reversed the if statements instead of commenting out the GNOME stuff. Now it simply checks for KDM first, and starts that.

hw-tph 09-05-2004 04:42 PM

Oh, I'm sorry - I misinterpreted your question. :o


Håkan

chii-chan 09-06-2004 09:25 AM

Do you Slackware people have this ".Xclients-default" file in your home directory?

ToothlessRebel 09-06-2004 09:57 AM

Nope


All times are GMT -5. The time now is 03:40 PM.