How configure guest session?

Asked by Michael Brooks

When one logs in as the guest session a temporary user session is created with a home path /tmp/guest-xxxxxx where xxxxxx is random. The files in the guest home path are presumably copied in from somewhere. If I want to adjust various defaults for guest sessions, then I would need to make my changes to the default location from where everything is copied.
So my question is: where is the default directory from which the temporary files and directories are copied?

Regards,
Michael

Question information

Language:
English Edit question
Status:
Answered
For:
Light Display Manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Michael Brooks (m-brooks) said :
#1

I have been reading through the source to try and answer this. My inerpretation of what I am reading in guest-account.c suggests to me that the guest session is created by a script. The path (or at least the name) of the script is defined in some config file in the section LightDM and the key guest-account-script. The config file is referenced by a GType (which I assume is a struct) which is obtained by a call to config_get_type().
So far so good, but here's the problem: when I search for te definition of config_get_type I cannot find it. Its declaration / profile is in configuration.h but there appears to be no matching definition anywhere.
That implies that either the fundtion body is provided in a precomplied object module or library rather that source (unthinkable) or thatnone of the functions that call it are themselves bein called and therefore the project can be built without the linker objecting (seems unlikely, but conceivable) which would mean that my reading of the code has gone off in the wrong direction.
Can anyone help me please?

Revision history for this message
Michael Brooks (m-brooks) said :
#2

Apologies for the typos above - most are because I'm typing on a fiddly netbook. A few ("that" instead of "than") are just stupidity.

Revision history for this message
Launchpad Janitor (janitor) said :
#3

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Robert Ancell (robert-ancell) said :
#4

Re-opening..

Revision history for this message
Robert Ancell (robert-ancell) said :
#5

Correct, guest accounts are setup in a script. By default the script run is 'guest-account', but this can be overridden by setting in the config, i.e.

[LightDM]
guest-account-script=some-clever-script

In Ubuntu, we install /usr/sbin/guest-account [1]. Depending on what OS you use, you may want to copy this. The Ubuntu script uses 'adduser' to create accounts, so these have the default files copied from /etc/skel. Additional guest specific changes are made in the guest-account script.

The script works by LightDM running 'guest-account add' and the script writing the username to stdout. To remove guest accounts LightDM runs 'guest-account remove <username>'

[1] http://bazaar.launchpad.net/~lightdm-team/lightdm/trunk/view/head:/debian/guest-account

Revision history for this message
Michael Brooks (m-brooks) said :
#6

Thanks Robert. This sounds like exactly what I am looking for. I'm away from home for a few days at present so I can't try applying this, but as soon as I get back I'll have a go and report back.

Michael

Can you help with this problem?

Provide an answer of your own, or ask Michael Brooks for more information if necessary.

To post a message you must log in.