On Mon, Dec 06, 2004 at 07:34:45PM +0100, Bill Allombert wrote: > On Sun, Dec 05, 2004 at 03:54:12PM +0000, Peter Collingbourne wrote: > > Hi > > > > I notice discussion on bug #241554 regarding a menu-method for .desktop > > files used by KDM/GDM for window manager sessions. Has any progress been > > made on this? If not I would like to volunteer for it. I definitely > > think it would be a useful thing to have, considering the majority of > > window managers still do not provide .desktop files. > > Hello, > I have written the menu method, but I did not test it. > > Please find it here: <http://people.debian.org/~ballombe/xsessions> > > You will need to change > rootprefix = "/var/lib/xsessions"; > to > rootprefix = "/usr/share/xsessions"; > > until display manager are able to read /var/lib/xsessions.
This is a good start, now the question is how to integrate this into the system. To tell you the truth I have also been working on a similar thing separately (tested). My version is attached and it is up to someone to decide which should be used. I believe the files should go into /etc/X11/sessions for two reasons: 1. at least one of the display managers already looks in there by default (gdm) 2. it is in common with the majority of the other menu-methods which write to somewhere in /etc Also five things need to be done in order to add this feature to the system: 1. Create a package for the menu-method 2. Make gdm and kdm depend on it (either that or recommend it and add it to the list of packages installed by the desktop task) 3. Change kdm so it looks in /etc/X11/sessions by default for its session files (attached is a patch (tested) which can be applied to kdebase_3.2.2-1) 4. Change the following packages so that they do not install a .desktop file to /usr/share/xsessions (to avoid duplicate entries in the list): gnome/gnome-session x11/blackbox x11/fluxbox x11/fvwm x11/fvwm-gnome x11/icewm x11/icewm-experimental x11/icewm-lite x11/openbox x11/wmaker x11/xfce4-utils 5. Make the ksmserver package from KDE install a menu item rather than a .desktop file (also in the patch file). I know this is a lot of wide-sweeping changes to the system (especially as they are being suggested by a newcomer to the Debian devel process) but I believe once these items are done we will have a more consistent system. Another question is: should this be mentioned in section 11.8.4 of the policy manual? I am wondering whether I should go through the procedures necessary to become an official Debian developer. Thanks -- Peter
diff -Nur kdebase-3.2.2-orig/debian/kdm.install kdebase-3.2.2/debian/kdm.install --- kdebase-3.2.2-orig/debian/kdm.install 2004-04-03 08:53:14.000000000 +0100 +++ kdebase-3.2.2/debian/kdm.install 2004-12-06 20:48:06.000000000 +0000 @@ -19,51 +19,6 @@ debian/tmp/usr/share/apps/kdm/pics/users/default1.png debian/tmp/usr/share/apps/kdm/pics/users/default2.png debian/tmp/usr/share/apps/kdm/pics/users/root1.png -debian/tmp/usr/share/apps/kdm/sessions/9wm.desktop -debian/tmp/usr/share/apps/kdm/sessions/aewm++.desktop -debian/tmp/usr/share/apps/kdm/sessions/aewm.desktop -debian/tmp/usr/share/apps/kdm/sessions/afterstep.desktop -debian/tmp/usr/share/apps/kdm/sessions/amaterus.desktop -debian/tmp/usr/share/apps/kdm/sessions/amiwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/asclassic.desktop -debian/tmp/usr/share/apps/kdm/sessions/blackbox.desktop -debian/tmp/usr/share/apps/kdm/sessions/cde.desktop -debian/tmp/usr/share/apps/kdm/sessions/ctwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/cwwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/enlightenment.desktop -debian/tmp/usr/share/apps/kdm/sessions/evilwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/fluxbox.desktop -debian/tmp/usr/share/apps/kdm/sessions/flwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/fvwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/fvwm95.desktop -debian/tmp/usr/share/apps/kdm/sessions/gnome.desktop -debian/tmp/usr/share/apps/kdm/sessions/golem.desktop -debian/tmp/usr/share/apps/kdm/sessions/icewm.desktop -debian/tmp/usr/share/apps/kdm/sessions/ion.desktop -debian/tmp/usr/share/apps/kdm/sessions/kde.desktop -debian/tmp/usr/share/apps/kdm/sessions/larswm.desktop -debian/tmp/usr/share/apps/kdm/sessions/lwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/matchbox.desktop -debian/tmp/usr/share/apps/kdm/sessions/metacity.desktop -debian/tmp/usr/share/apps/kdm/sessions/mwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/olvwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/olwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/openbox.desktop -debian/tmp/usr/share/apps/kdm/sessions/oroborus.desktop -debian/tmp/usr/share/apps/kdm/sessions/phluid.desktop -debian/tmp/usr/share/apps/kdm/sessions/pwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/qvwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/ratpoison.desktop -debian/tmp/usr/share/apps/kdm/sessions/sapphire.desktop -debian/tmp/usr/share/apps/kdm/sessions/sawfish.desktop -debian/tmp/usr/share/apps/kdm/sessions/twm.desktop -debian/tmp/usr/share/apps/kdm/sessions/ude.desktop -debian/tmp/usr/share/apps/kdm/sessions/vtwm.desktop -debian/tmp/usr/share/apps/kdm/sessions/w9wm.desktop -debian/tmp/usr/share/apps/kdm/sessions/waimea.desktop -debian/tmp/usr/share/apps/kdm/sessions/wm2.desktop -debian/tmp/usr/share/apps/kdm/sessions/wmaker.desktop -debian/tmp/usr/share/apps/kdm/sessions/xfce.desktop debian/tmp/usr/share/doc/kde/HTML/en/kdm/common debian/tmp/usr/share/doc/kde/HTML/en/kdm/index.cache.bz2 debian/tmp/usr/share/doc/kde/HTML/en/kdm/index.docbook diff -Nur kdebase-3.2.2-orig/debian/ksmserver.install kdebase-3.2.2/debian/ksmserver.install --- kdebase-3.2.2-orig/debian/ksmserver.install 2004-12-05 20:29:10.000000000 +0000 +++ kdebase-3.2.2/debian/ksmserver.install 2004-12-06 21:01:34.000000000 +0000 @@ -5,5 +5,4 @@ debian/tmp/usr/lib/libkdeinit_ksmserver.so debian/tmp/usr/share/apps/kconf_update/ksmserver.upd debian/tmp/usr/share/apps/kconf_update/move_session_config.sh -debian/tmp/usr/share/apps/kdm/sessions/kde.desktop usr/share/xsessions/ debian/tmp/usr/share/apps/ksmserver/pics/shutdownkonq.png diff -Nur kdebase-3.2.2-orig/debian/ksmserver.menu kdebase-3.2.2/debian/ksmserver.menu --- kdebase-3.2.2-orig/debian/ksmserver.menu 1970-01-01 01:00:00.000000000 +0100 +++ kdebase-3.2.2/debian/ksmserver.menu 2004-12-06 21:08:07.000000000 +0000 @@ -0,0 +1,7 @@ +?package(ksmserver):\ + needs="wm"\ + section="WindowManagers"\ + hints="KDE"\ + title="KDE"\ + longtitle="The K Desktop Environment. A powerful Open Source graphical desktop environment"\ + command="startkde" diff -Nur kdebase-3.2.2-orig/kdm/kfrontend/genkdmconf.c kdebase-3.2.2/kdm/kfrontend/genkdmconf.c --- kdebase-3.2.2-orig/kdm/kfrontend/genkdmconf.c 2004-03-16 15:32:32.000000000 +0000 +++ kdebase-3.2.2/kdm/kfrontend/genkdmconf.c 2004-12-06 20:53:55.000000000 +0000 @@ -2079,7 +2079,7 @@ "# it, you should \"chmod 600 kdmrc\" for obvious reasons. Default is \"\"\n" }, { "SessionsDirs", 0, 0, "# The directories containing session type definitions in .desktop format.\n" -"# Default is " KDMDATA "/sessions\n" }, +"# Default is /etc/X11/sessions,/usr/share/xsessions\n" }, }; static Ent entsGreeter[] = { diff -Nur kdebase-3.2.2-orig/kdm/kfrontend/kdm_config.c kdebase-3.2.2/kdm/kfrontend/kdm_config.c --- kdebase-3.2.2-orig/kdm/kfrontend/kdm_config.c 2004-03-16 15:32:32.000000000 +0000 +++ kdebase-3.2.2/kdm/kfrontend/kdm_config.c 2004-12-06 20:50:26.000000000 +0000 @@ -500,7 +500,7 @@ { "AllowSdForceNow", C_allowNuke | C_ENUM, sd_who, "All" }, { "DefaultSdMode", C_defSdMode | C_ENUM, sd_mode, "Schedule" }, { "InteractiveSd", C_interactiveSd | C_BOOL, 0, "true" }, -{ "SessionsDirs", C_sessionsDirs, 0, KDMDATA "/sessions" }, +{ "SessionsDirs", C_sessionsDirs, 0, "/etc/X11/sessions,/usr/share/xsessions" }, }; Ent entsGreeter[] = { diff -Nur kdebase-3.2.2-orig/kdm/kfrontend/Makefile.am kdebase-3.2.2/kdm/kfrontend/Makefile.am --- kdebase-3.2.2-orig/kdm/kfrontend/Makefile.am 2004-03-09 13:43:57.000000000 +0000 +++ kdebase-3.2.2/kdm/kfrontend/Makefile.am 2004-12-06 20:49:26.000000000 +0000 @@ -1,7 +1,7 @@ # use 'make GENKDMCONF_FLAGS=... install' to override GENKDMCONF_FLAGS = -SUBDIRS = pics sessions +SUBDIRS = pics AM_CPPFLAGS = -I$(srcdir)/../backend -I$(top_srcdir)/kcontrol/background \ $(all_includes) $(XDMCP_DEFINE)
#!/usr/sbin/install-menu compat="menu-1" !include menu.h compat="menu-2" treewalk="cm"; genmenu=$title ".desktop"; rootprefix="/etc/X11/sessions"; userprefix="TESTxsessions"; function WMEntry() = "[Desktop Entry]\n" "Encoding=UTF-8\n" "Name=" $title "\n" "Comment=" ifelse($longtitle, $longtitle, $title) "\n" "Exec=" $command "\n" "Terminal=False\n" "TryExec=" $command "\n" "Type=Application\n" "\n" "[Window Manager]\n" "SessionManaged=" ifelse($sessionmanaged,$sessionmanaged,"false") "\n" ifelse($configcommand, "ConfigExec=" $configcommand "\n" "ConfigTryExec=" $configcommand "\n", ""); supported; wm=WMEntry(); endsupported;