To facilitate for computer owners/system admins to customize the appearance and behavior of a guest session, I suggest the addition of a hook in each of these gdm-guest-session files:

Details in the Code Changes section below.

Release Note

Addition of a couple of hooks that make it possible to customize/configure a guest session without changing any gdm-guest-session files.


I have noticed a few feature requests with respect to gdm-guest-session, and some of them are asking for rather trivial customization possibilities. I'm demonstrating a few customization opportunities in the tutorial Customize guest session, but currently the install script that is attached to that document edits some gdm-guest-session files. I would feel more comfortable with the tutorial if there was no need to alter any files in the gdm-guest-session package, and that wish would be satisfied by the hooks I suggest be implemented.

I believe that giving computer owners better control is almost always desirable.


Implicitly I suggest that the files /etc/guest-session/ and /etc/guest-session/ are established as preferred files for configuration code. I also suggest that the directory /var/guest-data is established as the preferred place for guests to save files permanently when the admin opts to allow it.


Code Changes

These three diffs make up the specific code changes that I would like to see.

--- /usr/share/gdm/guest-session/guest-session-launch   2010-04-15 01:24:01 +0200
+++ guest-session-launch        2010-09-09 21:40:04 +0200
@@ -3,6 +3,10 @@
 # Author: Martin Pitt <>
 # License: GPL v2 or later
+# prepare possible local guest session preferences
+test -f /etc/guest-session/ && . /etc/guest-session/
 # Convenience wrapper to lock the screen and trigger a guest session
 if [ -z "$GDMSESSION" ] ; then

--- /usr/share/gdm/guest-session/ 2010-04-15 01:24:01 +0200
+++      2010-09-08 01:45:11 +0200
@@ -79,8 +79,11 @@
 /bin/echo -e "$dmrc" > /var/cache/gdm/"$USER"/dmrc
+# set possible local guest session preferences
+test -f /etc/guest-session/ && . /etc/guest-session/
 echo #TODO: bug workaround, gdm expects to find a newline
 # report user name to gdm
 echo "$USER"

--- /etc/apparmor.d/gdm-guest-session   2010-04-15 01:24:01 +0200
+++ gdm-guest-session   2010-09-08 01:45:11 +0200
@@ -40,6 +40,7 @@
   /usr/** rmixk,
   /var/ r,
   /var/** rmixk,
+  /var/guest-data/** rw, # allow to store files permanently
   /var/tmp/ rw,
   /var/tmp/** rwlkm,
   /var/run/** rmwkix, # necessary for writing to sockets, etc.

User information

I'm not sure of the best way to point users to this opportunity. Possibly the Customize guest session tutorial can play a role.

Unresolved issues

Not everyone is able or likes to tweak shell code, and I'm sure that some would like to see a configuration GUI under System -> Preferences -> Guest Session. Obviously this specification does not address such wishes, but possibly the hooks will make it easier to start develop such a UI.


Implemented in lp:ubuntu/gdm-guest-session. Thanks, Martin! / GunnarHj 2010-10-18


CustomizeGuestSession (last edited 2010-10-27 04:29:39 by gunnarhj)