Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 49

Thread: Customize guest session

  1. #21
    Join Date
    Jun 2006
    Beans
    12

    Re: Customize guest session

    i manage to solve this.

    i logged in with a guest session and launched for example Skype - then switched user to my regular account. In the terminal i used sudo nautilus and then i went into /tmp/guest-xxxxx/ folder. There i found a .Skype folder - i copied it and pasted it in the folder /etc/skel . Worked great!

    However i also want to set the guest-session to automatic log out if system is idle for X minutes. How can i do that?

  2. #22
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Quote Originally Posted by Feppa View Post
    ... There i found a .Skype folder - i copied it and pasted it in the folder /etc/skel . Worked great!
    Well, unless you want that setting by default also for newly created regular users, you'd better use /etc/guest-session/skel instead. See the Alternative approach section in the tutorial.

    Quote Originally Posted by Feppa View Post
    However i also want to set the guest-session to automatic log out if system is idle for X minutes. How can i do that?
    I for one have no idea; I doubt that it can be done using the techniques mentioned in this tutorial.

  3. #23
    Join Date
    Feb 2006
    Location
    Poznań
    Beans
    41
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Customize guest session

    I appreciate all of the discussion about customizing the guest session. I have been looking for a way to have a easily cusomizable guest session for a kiosk-type setting under oneiric. After looking through everything, I have found that using a variant of the Alternate Method (above) has made it easy to customize the guest user using all of the regular gui controls (Ubuntu-Tweak, MyUnity, Startup App Prefs, etc.). Before logging out of the session, it is necessary to copy the files from the home directory of the temporary guest account to /etc/guest-session/skel. One advantage of this is that a guest session can be restarted, edited and saved as often as you would like. I realize that I haven't created anything new here; just put together the pieces differently from the posts in this thread.

    Anyhow, the steps are as follows:
    1. Create the directory /etc/guest-session/skel
    2. While logged on under an admin account, start a guest session
    3. Make any changes to the guest session that you want using whatever tools/utilities you wish
    4. Change back to admin account and open a terminal
    5. cd to /tmp and find the temporary guest home directory (guest-XXXXX).
    6. Copy the files in the temporary guest home directory to /etc/guest-session/skel using the command: ‘sudo cp -rT /tmp/guest-XXXXX /etc/guest-session/skel’.
    7. Log out of the guest session and login again to check.
    8. To update the settings, repeat steps 2-7 as necessary.
    I previously wrote: I also have a question that you all might be able to help me figure out. I created a login user (luser) and attempted to edit the /usr/share/gdm/guest-session/guest-session-setup.sh file to copy /home/luser in step 6. However, it keeps defaulting to /etc/guest-session/skel/ Is there another file that I should be editing? It sure would be change things in an existing user rather than having to run (and rerun) a guest session.

    Thanks to Gunnar, I have included directions for using a regular user account on the system as the basis for the guest-session account. Although this is not as flexible as the system outlined by Gunnar, it has the advantage of ease. I have tried this with 11.10; it seems that there may be differences with previous versions. I have not addressed those.

    1. Create a standard (non-administrator) account.
      Note: I will use the account name luser for this account in the rest of the instructions (luser means Login User. Really. ).
    2. Log into the luser account and make any changes that you want using whatever tools/utilities you wish.
    3. Once you have made the desired changes, log out of the account and return to an administrative account.
    4. Edit the file /etc/guest-session/prefs.sh (if it doesn't exist, enter the command "sudo touch /etc/guest-session/prefs.sh") and add the following lines to the top of the file:
      cp -rT /home/luser "$HOME"
      chown -R $USER:$USER "$HOME"
    5. Save the file.
    6. Log into the guest account (either from LightDM or from the user-session indicator) and check that all changes have been made.
    7. To update any settings, simply repeat steps 2&3.
      Note: As a security measure, you may want to disable the luser account when not editing it.
    Please feel free to let me know if there are any further changes/instructions for these directions.

    Peace,
    Paul

    BTW, I found out that Chrome won't run in a guest session due to needing suid for sandboxing. I have stuck with Firefox for the guest session.
    Last edited by p-dh; March 14th, 2012 at 05:20 PM. Reason: Added info on copying over a specific user

  4. #24
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Great example, Paul. Thanks! I added a link to your post from the "Alternate approach" section in the tutorial.

    Quote Originally Posted by p-dh View Post
    I created a login user (luser) and attempted to edit the /usr/share/gdm/guest-session/guest-session-setup.sh file to copy /home/luser in step 6. However, it keeps defaulting to /etc/guest-session/skel/ Is there another file that I should be editing?
    Please note that as from Ubuntu 11.10, the guest session code is included in the LightDM package; you may well remove the gdm-guest-session package. So it's probably /usr/sbin/guest-account you want to edit.

    Quote Originally Posted by p-dh View Post
    I found out that Chrome won't run in a guest session due to needing suid for sandboxing. I have stuck with Firefox for the guest session.
    It would be great if you could file a bug report about that. It's the LightDM package such a bug should be filed against.

  5. #25
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Quote Originally Posted by p-dh View Post
    Edit the file /usr/sbin/guest-account and change the line gs_skel=/etc/guest-session/skel to gs_skel=/home/luser. (sudo gedit /usr/sbin/guest-account)
    A disadvantage with editing a package file is that it needs to be redone after each upgrade. Probably better to create a symlink.

    Code:
    sudo ln -s /home/luser /etc/guest-session/skel

  6. #26
    Join Date
    Feb 2006
    Location
    Poznań
    Beans
    41
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Customize guest session

    Hey Gunnar,

    I added the link as per your directions, but the files were not copied over. What am I missing?

    Thanks for helping me get this to work.

    Peace,
    Paul

  7. #27
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Quote Originally Posted by p-dh View Post
    I added the link as per your directions, but the files were not copied over. What am I missing?
    Seems like I'm the one who missed things.

    A working way to do what you want, without a need to redo it after each lightdm update, seems to be to create /etc/guest-session/prefs.sh and add these commands to it:

    Code:
    cp -rT /home/luser "$HOME"
    chown -R $USER:$USER "$HOME"
    If /etc/guest-session/prefs.sh exists already, since you installed the tarball of this tutorial, those commands should be added to the top of the file.

  8. #28
    Join Date
    Feb 2006
    Location
    Poznań
    Beans
    41
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Customize guest session

    Gunnar, Thanks for the last post. I created the file and it works great! I found that the reason a simple link doesn't work is that /usr/sbin/guest-account has the line:
    gs_skel=/etc/guest-session/skel and needs gs_skel=/etc/guest-session/skel/ for cp to work with a soft link. Weird. But, this meant that I had to edit the file after updating LightDM today. Aaargh..
    Anyhow, I will include your additions to my post above. I have tried it out and it really works well.
    Thanks for all of your work on this.

    Paul

    P.S. Where can I find the documentation for LightDM and the files it uses for logging in?

  9. #29
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Quote Originally Posted by p-dh View Post
    I will include your additions to my post above. I have tried it out and it really works well.
    Thanks for all of your work on this.
    You're welcome, and thank you.

    Quote Originally Posted by p-dh View Post
    Where can I find the documentation for LightDM and the files it uses for logging in?
    I'm not aware of any documentation besides the source code. And that's not easy to grasp.

  10. #30
    Join Date
    Aug 2010
    Location
    Goteborg, Sweden
    Beans
    24
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Customize guest session

    Quote Originally Posted by p-dh View Post
    I found that the reason a simple link doesn't work is that /usr/sbin/guest-account has the line:
    gs_skel=/etc/guest-session/skel and needs gs_skel=/etc/guest-session/skel/ for cp to work with a soft link. Weird. But, this meant that I had to edit the file after updating LightDM today. Aaargh..
    Nice catch, Paul. I proposed that change of the source for lightdm in Ubuntu, and it was just approved. It means that next release will include such a trailing slash, so you may want to change comment #23 once again.

Page 3 of 5 FirstFirst 12345 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •