1

I followed the instructions here to modify my quicklists of Unity. For examples in order to add an "Root Terminal" item I modified my gnome-terminal.desktop as follows:

[Desktop Entry]
Name=Terminal
Comment=Use the command line
TryExec=gnome-terminal
Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=2.32.1
Categories=GNOME;GTK;Utility;TerminalEmulator;
StartupNotify=true
OnlyShowIn=GNOME;Unity;
X-Ubuntu-Gettext-Domain=gnome-terminal

X-Ayatana-Desktop-Shortcuts=Root;
[Root Shortcut Group]
Name=Root Terminal
Exec=gksudo gnome-terminal
TargetEnvironment=Unity

And then I dragged it to the launcher. It worked fine before rebooting. But after the system is restarted, the Terminal button launcher is reverted (No Root Terminal after right click), despite of the desktop file has been modified.

So what steps do I miss? Thanks for those who gives hints.

Ziyuan
  • 218
  • 1
    Did you copy the .desktop file over to ~/.local/share/applications before editing? Is it still there after the reboot? Did you check ~./.xsession-errors for errors related to this? – Rinzwind Aug 28 '11 at 14:43
  • Oh, I edited the file in place (/usr/share/applications). It seems I have some misunderstanding about the mechanism. – Ziyuan Aug 28 '11 at 15:24
  • ah time for an answer >:) – Rinzwind Aug 28 '11 at 15:25

1 Answers1

2

First step is to copy the .desktop file over to ~/.local/share/applications and to edit that version. ~/.local/share/applications overrules the .desktop from /usr/share/applications.

The ones in /usr/share/applications get recreated probably to prevent malformed desktop files to crash Unity: in case of a crash it can fallback to the unchanged version.

Rinzwind
  • 299,756
  • Thank you @Rinzwind, it works great but I have another question. If I copy the file to ~/.local/share/applications, a new item will be created on the launcher. However when I open something and select "Keep in Launcher", the .desktop file does not appear in the folder. So where this information is stored? – Ziyuan Aug 28 '11 at 21:26