Fat clients should not verify desired xsession from ~/.dmrc via SSH

Bug #1272889 reported by Luiten on 2014-01-26
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LTSP5
Medium
Unassigned

Bug Description

Problem description
===================

LDM verifies the existence of the desired xsession server-side, even for fat
clients. This can cause DLM to not set/read ~/.dmrc properly when the directory
/usr/share/xsessions differs between server and fat-client chroot.

How to reproduce
================

Verify correct working:

* Boot fat client LTSP, choose a non-standard xsession
* Verify that ~/.dmrc mentions the chosen xsession
* Logout
* Login without setting the xsession manually
* Observe that you get your non-standard xsession again

Now break it:

* Install awesome inside the LTSP chroot
* Make sure /usr/share/xsessions/awesome.desktop exists inside the chroot
* Make sure /usr/share/xsessions/awesome.desktop does not exist on the server
* Build a new LTSP client image
* Boot image
* Choose 'awesome' as session and login
* Observe that you are inside awesome
* Observe that ~/.dmrc does not mention awesome
* Logout
* Login without setting the xsession manually
* Observe that you are no longer getting awesome

(NB: awesome is merely given as example, it works for any other xsession. In
our case it was actually KDE-Plamsa)

More details
============

I've traced the issue to the file /usr/share/ldm/rc.d/X50-dmrc-processing
inside the chroot. It will do a sanity check inside the function
ldm_session_from_desktop_file() to see if the session mentioned inside ~/.dmrc
exists, but it does so over SSH instead of locally.

We throw away the LTSP chroot and images every 6 months with every new Ubuntu
release, our current chroot was made about a month after the release of 13.10.
We have had this issue for multiple releases now.

Our server is headless and all our LTSP clients are fat, so we have no wish to
install KDE-Plasma on our server. We worked around it by copying the
kde-plasma.desktop file from the chroot to the server's /usr/share/xsessions
directory. After this change the clients remember the choice for KDE-Plasma
properly.

Related branches

Vagrant Cascadian (vagrantc) wrote :

Looking at the code in ldm's X50-dmrc-processing, yes, this is definitely the case. The code should be adjusted to use the local /usr/share/xsessions instead of the server's when LTSP_FATCLIENT=true.

Changed in ltsp:
importance: Undecided → Medium
status: New → Confirmed
Vagrant Cascadian (vagrantc) wrote :
Changed in ltsp:
status: Confirmed → Fix Committed
Vagrant Cascadian (vagrantc) wrote :

The fix I committed still requires reading and writing to the server's ~/.dmrc, but it checks /usr/share/xsessions/ appropriately weather a session type is valid. So if the same LTSP server is used for multiple fat or thin client environments where a different default desktop is required, well, that just won't work.

Luiten (launchpad-net-qtea) wrote :

Nice, thanks!

Alkis Georgopoulos (alkisg) wrote :

Fix released in LDM 2.2.15.

Changed in ltsp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers