I made a custom .desktop
file to start my favourite terminal, Tilix, with my preferred session. The file is identical to the default, except for the Exec
and DBusActivatable
lines.
~/.local/share/applications/com.gexperts.Tilix.desktop
(i18n lines omitted):
[Desktop Entry]
Version=1.0
Name=Tilix
Comment=A tiling terminal for Gnome
Keywords=shell;prompt;command;commandline;cmd;
Exec=tilix -s /home/phydeaux/.tilix/Default.json
Terminal=false
Type=Application
StartupNotify=true
Categories=System;TerminalEmulator;X-GNOME-Utilities;
Icon=com.gexperts.Tilix
DBusActivatable=false
Actions=new-window;new-session;
[Desktop Action new-window]
Name=New Window
Exec=tilix --action=app-new-window
[Desktop Action new-session]
Name=New Session
Exec=tilix --action=app-new-session
I then added this shortcut to the dock by searching for it and using "Add to Favourites".
This worked fine (on 16.04 and 17.04, both GNOME) until I upgraded to 17.10. Clicking the shortcut in the dock now opens Tilix without my session (i.e. the default behaviour).
When I search for "Tilix" in Activities and click that shortcut, or when I navigate to ~/.local/share/applications/
in Nautilus and double-click the .desktop
file, Tilix runs with my session as it always has. It is only when I add the shortcut to favourites that the unwanted behaviour occurs.
What could cause this to happen, and how can I fix it?
Update 1: Changing the Exec
line to the absolute path doesn't help, and nor does using a custom shell script.
Update 2: I changed the Exec
line for both my custom file (in ~/.local/...
) and the original in /usr/...
to Exec=gedit
, to see what would happen. Running either file from Nautilus or from search opens Gedit as expected, but the version in the dock still opens Tilix! How can it possibly know to do this?
Update 3: I added a brand new file: ~/.local/.../com.phydeaux.Tlx.desktop
, identical contents to the above except with Name=Tlx
. Running this from the dock opens Tilix with my session as desired, so this suffices as a (stupid) workaround. However, if I change from Name=Tlx
to Name=Tilix
, the unwanted behaviour returns, and persists even if I subsequently change the name back to Tlx
. Is the shortcut file somehow becoming 'associated' with Tilix-the-application when I do this? Does GNOME think it knows the 'proper' way to run that application? Is any of this to do with D-Bus?
Update 4: Still an issue in 18.04. Deleting the service file for Tilix from /usr/share/dbus-1/services/
doesn't help.
Exec
line (still set togedit
currently), whereas running the same shortcut from the dock tries to open Tilix (and does nothing if it isn't installed) – Phydeaux Apr 14 '18 at 23:43Exec
line being bypassed), but that was resolved by settingDBusActivatable=false
which obviously isn't helping here – Phydeaux Apr 14 '18 at 23:45