LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-13-2003, 07:20 AM   #1
t1mc00per
Member
 
Registered: Jan 2003
Location: Midlands, England
Distribution: Mandrake 9.0, Slackware 8.1
Posts: 76

Rep: Reputation: 15
Adding windows managers to graphical log-in


After installing a new window manager, is there an easy way to add it to the drop-down on the graphical log-in?

I've read about adding lines to .initrc or .xsession but will this allow you to choose a window manager on log-in?

when I installed Mandrake 9.0, it gives me the choice of KDE, GNOME or IceWM in the drop-down box. How do I add more to try out?
 
Old 02-13-2003, 07:29 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
the directory you want moves around a bit, look for /etc/X11/wmsession.d normally though. in there should be a list of configured WM's copy the file (e.g. 03GNOME to 01BLACKBOX) and edit the4 contents. normally that's all you need to do
 
Old 02-13-2003, 08:13 AM   #3
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
You don't say what WM you are trying to install, but I'll tell you about what I did with fluxbox.

If you have a file called .xintrc in your home directory, add a line to the file as shown below:

Code:
#
# choose a window manager
#
if test -n "$WINDOWMANAGER" ; then
    WINDOWMANAGER=`type -p $WINDOWMANAGER`
fi
if test -z "$WINDOWMANAGER" ; then
    if test -x /usr/X11R6/bin/kde ; then
        WINDOWMANAGER=/usr/X11R6/bin/kde
    elif test -x /usr/X11R6/bin/startkde ; then
        WINDOWMANAGER=/usr/X11R6/bin/startkde
    elif test -x /usr/X11R6/bin/fvwm2 ; then
        WINDOWMANAGER=/usr/X11R6/bin/fvwm2
    elif test -x/usr/local/bin/fluxbox ; then                <---- LOOK
        WINDOWMANAGER=/usr/local/bin/fluxbox     <---- LOOK
    elif test -x /usr/X11R6/bin/wmlist ; then
        for i in `/usr/X11R6/bin/wmlist` ; do
            WINDOWMANAGER=`type -p $i`
            test -n "$WINDOWMANAGER" && break
        done
    elif test -x /usr/X11R6/bin/twm ; then
        WINDOWMANAGER=/usr/X11R6/bin/twm
    fi
fi
I changed the /root/.xinitrc and it appears to act globally. This worked great for SuSE which comes with all kinds of WM's and a pre-existing .xinitrc to work off of.

I then (in KDE) opened the control center as root and went to system-login manager, went to the sessions tab and in the blank space on the bottom left typed "fluxbox" and clicked add - fluxbox will appear on the bottom right list..

RedHat was a bit different. No .xinitrc and adding one didn't work correctly. Open the /etc/X11/xdm/.Xsessions file and add the line as follows:

Code:
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
    if [ -x /usr/share/apps/switchdesk/Xclients.$1 ]; then
       exec -l $SHELL -c "/usr/share/apps/switchdesk/Xclients.$1";
    fi;

    case $1 in
    failsafe)
       exec -l $SHELL -c "xterm -geometry 80x24-0-0"
       ;;
    gnome)
       exec -l $SHELL -c "gnome-session"
       ;;
    kde|kde1|kde2)
       exec -l $SHELL -c "/usr/share/apps/switchdesk/Xclients.kde"
       ;;
    twm)
        # fall back to twm
       exec -l $SHELL -c "/usr/share/apps/switchdesk/Xclients.twm"
       ;;
    fluxbox)
       exec /usr/local/bin/fluxbox        <------LOOK
       ;;                                           <------ LOOK
    esac
esac
Enter the refrence to fluxbox in the sessions list as stated above.

Please note that the entries refrence the location of the WM you wish to install. In my case, the fluxbox executable is locate at /usr/local/bin/fluxbox. Your's may be different.

Both these methods alowed me to access fluxbox from the KDM login and return to KDM when exiting fluxbox. Don't add the "<----- LOOK'

hope this helps
 
Old 02-13-2003, 10:17 AM   #4
t1mc00per
Member
 
Registered: Jan 2003
Location: Midlands, England
Distribution: Mandrake 9.0, Slackware 8.1
Posts: 76

Original Poster
Rep: Reputation: 15
I don't have a .xinitrc, so I followed chris's advice:

I created a file called 03Fluxbox in /etc/X11/wmsession.d and put this in it:

NAME=Fluxbox
ICON=kde-wmsession.xpm
DESC=Fluxbox
EXEC=/usr/local/bin/fluxbox
SCRIPT:
exec /usr/local/bin/fluxbox

And now I've got Fluxbox!

Thanks for your help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
adding windows managers to kdm (kde 3.2.1) equinox Linux - Software 2 02-05-2005 02:43 AM
Adding Windows Managers to KDM?? dikadika Linux - Software 6 05-24-2004 10:35 PM
Adding Window Managers to Redhat 8 oostevo Linux - General 3 02-28-2003 11:54 AM
Adding other Desktops to Graphical Log in kabads Linux - General 3 10-10-2002 06:43 PM
Changing RedHat 7.1 graphical login managers midnightcommander Linux - General 5 07-11-2001 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration