Common Desktop Environment

Configure CDE Login Manager

by Antonis Tsolomitis

The main login window:













The login chooser (indirect XDMCP):






Table of contents


How do I add other desktops than CDE to the login manager?

I think that this is one of the main issues for someone that wants to try CDE and keep other desktops accessible too. It is relatively easy to add any number of sessions to the Sessions submenu of the "Options" menu. I have created the needed structure for Gnome, KDE and Mate desktops. Check this screenshot with Mate enabled.

New: The proccedure below has been automated by Bernd Blümmel with this script. Moreover, Bernd has added the possibility to include Shutdown, Reboot and Suspend actions to the dtlogin menus. What follows is the manual way of adding desktop sessions.

To manually enable gnome, kde and/or mate desktop get dtlogin-sessions.tgz and as root do

mv dtlogin-sessions.tgz /etc/
tar -xzvf dtlogin-sessions.tgz
rm dtlogin-sessions.tgz
cd dtlogin-sessions/

In this directory you will see three subdirectories:

gnome-desktop  kde-desktop  mate-desktop

Each directory contains a script to enable the desktop in CDE's login manager. For example to enable the Mate desktop, execute root the script:

/etc/dtlogin-sessions/mate-desktop
/enable-mate-desktop.sh

The script assumes that Mate is installed in /usr/bin/ (that is the file /usr/bin/mate-session exists).

Running the enable script in each directory you can enable all three desktops. The directories contain also "disable" scripts for each desktop.

    Even more desktops?


To enable more desktops do the following as root. Lets say we want to enable fluxbox which starts with the command
/usr/bin/startfluxbox

cd /etc/dtlogin-sessions/
cp -r mate-desktop fluxbox-desktop
mv fluxbox-desktop/etc/dt/config/Xinitrc.mate fluxbox-desktop/etc/dt/config/Xinitrc.fluxbox
mv fluxbox-desktop/etc/dt/config/Xsession.mate fluxbox-desktop/etc/dt/config/Xsession.fluxbox
mv fluxbox-desktop/etc/dt/config/C/Xresources.d/Xresources.mate fluxbox-desktop/etc/dt/config/C/Xresources.d/Xresources.fluxbox
mv fluxbox-desktop/disable-mate-desktop.sh fluxbox-desktop/disable-fluxbox-desktop.sh
mv fluxbox-desktop/enable-mate-desktop.sh fluxbox-desktop/enable-fluxbox-desktop.sh

Edit the above five files and replace every occurence of mate to fluxbox taking care to replace
/usr/bin/mate-session to /usr/bin/startfluxbox in both Xinitrc.fluxbox and Xresources.fluxbox

Now you need an icon for fluxbox with dimensions 237x237 pixels. You may create it or find it on the internet and resize it with gimp. Save one time in dtlogin-fluxbox.xpm and another time dtlogin-fluxbox.xbm

rm -f fluxbox-desktop/etc/dt/appconfig/icons/C/dtlogin-mate.*
mv dtlogin-fluxbox.xpm fluxbox-desktop/etc/dt/appconfig/icons/C/dtlogin-fluxbox.pm
mv dtlogin-fluxbox.xbm fluxbox-desktop/etc/dt/appconfig/icons/C/dtlogin-fluxbox.bm

(notice that we changed the extensions from xpm to pm and from xbm to bm).

Run the script

/etc/dtlogin-sessions/fluxbox-desktop/enable-fluxbox-desktop.sh

and reset the Login Manager (Options-->Reset Login Screen)


Correct sound and video permissions


On Linux (at least on Ubuntu) the sound and video devices have access rights that are set as the user logs in. This is taken care by the default login manager but not by dtlogin. So when using dtlogin to log into any session the sound and video do not work for the user. The commands that give a user the rights to use the sound and video system are

setfacl -m "u:$USER:rw-" /dev/snd/* 
setfacl -m "u:$USER:rw-" /dev/video*

but they must be executed with root priviledges. To fix this inconvenience one may do the following:

sudo /bin/bash
cp /usr/dt/config/{Xstartup,Xreset} /etc/dt/config/
cd !$
chmod +w Xstartup; chmod +w Xreset
echo 'setfacl -m "u:$USER:rw-" /dev/snd/*' >> Xstartup
echo 'setfacl -m "u:$USER:rw-" /dev/video*' >> Xstartup
echo 'setfacl -x "u:$USER" /dev/snd/*' >> Xreset
echo 'setfacl -x "u:$USER" /dev/video*' >> Xreset
chmod -w Xstartup; chmod -w Xreset

Logout and login.