[Kde-kiosk] how to force users to log into KDE (modify KDM menu)

Russell Brown russell at lls.lls.com
Wed Jun 22 18:17:39 CEST 2005


OK...  I've been playing with kdm some more and trying to make something
of Oswald's hints.

Anyway, this is all for a fresh install of Kde 3.4.1 (Debian release
from http://pkg-kde.alioth.debian.org/kde-3.4.1

Sorry this gets a bit long but it might help someone else in the future.


Step 1. Work out where I should be putting these .desktop files.
-----------------------------------------------------------------

The README file (/usr/share/doc/kdm/README.gz) says that the filesystem
layout for kdm is:

...
	${kde_datadir}/kdm/sessions/*.desktop
	  /etc/X11/sessions/,/usr/share/xsessions/
...

Later on (in the section entitled "Configuring session types") it says:

...
	Unless your system is configured differently already, you should create a
	directory ${kde_confdir}/kdm/sessions and add this to kdmrc:

	[X-*-Core]
	SessionsDirs=${kde_confdir}/kdm/sessions,${kde_datadir}/kdm/sessions
...

Then, it goes on to say:

...
	To override a session type, copy the .desktop file from the data dir to the
	config dir and edit it at will.
...

So.  I would assume from all that that I could put my .desktop files in
the "config dir".  I would also assume that this "config dir" would
be `kde-config --path config`/kdm/sessions ie:

	/usr/share/config/kdm/sessions

However, my /etc/kde3/kdm/kdmrc, SessionsDirs is left as distributed
which, from the comment in kdmrc, implies:

	#SessionsDirs=/usr/share/xsessions,/usr/share/apps/kdm/sessions

Different to the section above.  Huh?

Anyway....  I created a file called "default.desktop" that contained:

 [Desktop Entry]
 Hidden=True

and put copies in:

/usr/share/config/kdm/sessions
/etc/X11/sessions
/usr/share/xsessions

and sure enough on restarting kdm the line in the "Sessions Menu" that
previous said "Default" now shows as a blank line (but it's still
selectable! Doh! See Step 2).

Anyway...  by deleting this default.desktop from each of the paths above
I eventually found that the one in "/usr/share/xsessions" was the one
that kdm actually used.

Granted that was the first path mentioned in the README but not the one
I'd have picked from reading the "Configuring session types" section.

Still..  a bit of a result as I now know where to put the .desktop
files.


Step 2. Make use of this new found knowledge.
---------------------------------------------

In /usr/share/xsessions I created more .desktop files to mask the
distributed copies.  The directory looked like:

-rw-r--r--  1 root root   28 2005-06-22 17:27 custom.desktop
-rw-r--r--  1 root root 3904 2005-06-22 17:28 default.desktop
-rw-r--r--  1 root root   28 2005-06-22 17:27 failsafe.desktop
-rw-r--r--  1 root root   28 2005-06-22 17:26 gnome.desktop
-rw-r--r--  1 root root 3904 2005-06-22 17:28 kde.desktop

default.desktop is a copy of kde.desktop.  All of these .desktop files
have "Hidden=True" in the first section as the README tells one to do.

Now when I restart kdm and goto the "Session Menu" I get two lines with
"KDE" on them and three blank lines.  Each line is still selectable so
something isn't right here.


Step 3. Ask Oswald for more hints because I'm stuck.
----------------------------------------------------

Oswald?

-- 
 Regards,
     Russell
 --------------------------------------------------------------------
| Russell Brown          | MAIL: russell at lls.com PHONE: 01780 471800 |
| Lady Lodge Systems     | WWW Work: http://www.lls.com              |
| Peterborough, England  | WWW Play: http://www.ruffle.me.uk         |
 --------------------------------------------------------------------


More information about the kde-kiosk mailing list