Change default guest session launcher applications?

Is it possible to change the default applications that appear on the Launcher for guest sessions?

For example:

  • Remove : Amazon webapp, Ubuntu One, System Options
  • Add : Stellarium

(Ubuntu 12.04 and newer).

Thank you for your time and answers.


Solution 1:

Create the folder /etc/guest-session/ if it doesn't exist

sudo mkdir /etc/guest-session/

Then open file /etc/guest-session/prefs.sh

sudo nano /etc/guest-session/prefs.sh

and add the following content

FILE="$HOME/.config/autostart/configure-launcher.desktop"

cat << EOF > "$FILE"
[Desktop Entry]
Name=Configure launcher items
Type=Application
Exec=gsettings set com.canonical.Unity.Launcher favorites "['application://firefox.desktop', 'application://nautilus.desktop', 'application://stellarium.desktop']"
EOF

chown -R "$USER:$USER" "$FILE"

Change the application://... items to whatever you want to appear in the Launcher.

This creates a autostart command for the guest session that changes the launcher item.

You can get the current launcher items using

gsettings get com.canonical.Unity.Launcher favorites