Closed BobbyWibowo closed 5 years ago
Is this exec line compatible with the standard? I mean is the exec line intended to be interpreted by a shell?
I don't even know the standard, to be honest. It would work with KRunner, or just executing the .desktop
file directly from Dolphin, so I simply assumed it was meant to be compatible or something.
I'm also affected by this, but with one specific app that doesn't have such an unusual .desktop file. Here it is:
[Desktop Entry] Name=4K Video Downloader GenericName=4K Video Downloader Comment=Download online video Exec=4kvideodownloader Terminal=false Type=Application Icon=4kvideodownloader.png Categories=Network;Qt;
It simply won't launch via Albert.
It appears to be failing with shortcuts that have this sort of Exec
line as well:
Exec=env GTK2_RC_FILES=/usr/share/themes/Arc/gtk-2.0/gtkrc codeblocks %F
Before anybody tells me to, exporting that env var with my bash profile is not an option, as I only wanted to set that theme specifically for the application
codeblocks
, as the one I used system-wide was "dark-ish" and didn't render well with the application (some items in its interface have forced colors).
Oh sorry.
It works well this way: Exec=env GTK2_RC_FILES="/usr/share/themes/Arc/gtk-2.0/gtkrc" codeblocks %F
.
Hmm, I think I'm onto something.
Okay, after some looking around, it seems Exec
line is supposed to only have 1 executable. So like, what I did by having it run 2 commands (cd
then the program) wasn't valid.
So I ended up with:
Exec=sh -c "cd /opt/XMind/XMind_amd64 && env GTK2_RC_FILES=/usr/share/themes/Arc/gtk-2.0/gtkrc ./XMind %F"
and it has been working well.
I think @petersonespacoporto should open up a new issue as now it doesn't seem like it will have any relation with my issue. With that said, I think this can be closed.
Source
Environment
Steps to reproduce
.desktop
file with this content:I'd think the only important bit from it is the
Exec
param, in which I have itcd
to the installation directory to execute the file. The app is a bit weird where it wouldn't start unless it was executed from the path directly. I'm not sure whatPath
does, but even if it's set to that directory, withoutcd
it would still not run.Note: Issue's title is plural (shortcuts) since I've got another shortcut that won't run under Albert, but it does
cd
too so I'm sure it's the same issue.Expected behaviour
The application runs.
Actual behaviour
The application doesn't run. I wasn't sure how to debug though. One thing I know, it runs with KDE's KRunner.