Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When logging out from the guest account, all the files of the guest are deleted.

I like this behavior, but is there a way to show a popup like "Warning, all your files will be removed when turning off the computer or logging out, better move them on an USB-stick first" when a guest logs in and/or out?

Also, are a guest's files really deleted or are they moved to a hidden place on the computer?

share|improve this question

1 Answer 1

Create a script using zenity, then autostart that script by putting a .desktop file for the script in /etc/skel/.config/autostart/.The script will run for all new users (copied to the user's $HOME). Because of this, you'll want to do a check on the username. It might look like this (warning, I haven't tested):

#1/bin/bash
if [ "$(whoami|awk -F- '{print $1}')" = "guest" ]; then 
zenity –error –title=”Guest warning” –text=”Warning, all your files will be removed when turning off the computer or logging out, better move them on an USB-stick first.”; 
fi
exit 0

You'll put that file somewhere accessible and set it to executable. You'll then create a simple .desktop file by looking at an example one and setting it to run the script you've just made, and place that in /etc/skel/.config/autostart/.

This is a great idea and should be standard.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.