From 8389e9684aafef15a66e058c1b0d27e3c85cfc41 Mon Sep 17 00:00:00 2001 From: Adam Monsen Date: Sun, 8 Dec 2024 18:34:07 -0800 Subject: [PATCH] fix GNOME desktop entry instructions Gotta use absolute paths in `Exec` in `.desktop` files or they don't show up automatically. Not sure if this is true for everyone/always, but it was for me. Sources: https://bbs.archlinux.org/viewtopic.php?id=256867 https://discourse.gnome.org/t/application-entries-desktop-not-displayed/3670 https://discussion.fedoraproject.org/t/how-to-create-a-desktop-file-to-show-up-among-my-apps/128596/5 These sources indicate the underlying issue appears has to do with an issue with the user's non-interactive path, but I think the issue might actually be the tilde is not expanded. I didn't attempt to debug further, I just used an absolute path and it worked. Seems like the safer (and more annoying) way to go to make it work for most people. I do with tilde worked more reliably. FFR, my desktop right now is GNOME, as shipped with 64-bir Ubuntu 22.04 LTS. I think that means GNOME 3 and Wayland. --- src/running-on-gnome.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/running-on-gnome.rst b/src/running-on-gnome.rst index 89c3aec..b36f2df 100644 --- a/src/running-on-gnome.rst +++ b/src/running-on-gnome.rst @@ -28,7 +28,7 @@ As an alternative for users of GNOME 3 and other desktop environments that don't Don't forget to :code:`chmod +x start.sh` and :code:`chmod +x kill.sh`. -Then you can create two desktop files for these scripts to show up among your apps: +Then you can create two desktop files for these scripts to show up among your apps. Be sure to substitute `user` for your own username: :code:`~/.local/share/applications/aw-start.desktop`: :: @@ -36,7 +36,7 @@ Then you can create two desktop files for these scripts to show up among your ap [Desktop Entry] Name=Start ActivityWatch Comment=Start AW - Exec="~/.local/opt/activitywatch/start.sh" + Exec="/home/user/.local/opt/activitywatch/start.sh" Hidden=false Terminal=false Type=Application @@ -51,7 +51,7 @@ Then you can create two desktop files for these scripts to show up among your ap [Desktop Entry] Name=Kill ActivityWatch Comment=Kill AW - Exec="~/.local/opt/activitywatch/kill.sh" + Exec="/home/user/.local/opt/activitywatch/kill.sh" Hidden=false Terminal=false Type=Application