Solution (tl;dr):
Add Path=/home/username/opt/Rack2Free
to rack.desktop
, i.e. replaced with whatever path you have to the Rack working directory where you'll find the file Rack
. Then possibly restart the computer (or log out and in).
Details:
I had the exact same issue with creating a desktop file for VCV Rack. It would show up among other applications when pressing super
, but just wouldn't launch (nothing happens). However, launching by running the file ~/opt/Rack2Free/Rack
would work.
I solved it with the following rack.desktop
file placed in ~/.local/share/applications
:
[Desktop Entry]
Version=1.0
Type=Application
Name=VCVRack
Exec=/home/username/opt/Rack2Free/Rack
Path=/home/username/opt/Rack2Free
Icon=/home/username/opt/Rack2Free/res/icon.png
Terminal=false
Categories=Audio;Music
Keywords=Music
X-Desktop-File-Install-Version=0.26
The key here is the 'Path'-variable. Before that, when I tried running gtk-launch rack
in a terminal (see comments above) I got: ~/opt/Rack2Free/Rack: error while loading shared libraries: libRack.so: cannot open shared object file: No such file or directory
. So, even though the Exec-path was there, it could not find other files that it needed, so adding that Path to Rack's working directory and restarting the computer did the trick for me.
Note: For some reason before restarting the computer, launching with gtk-launch rack
worked, but via launcher, i.e. super
button, it did not work. But restarting fixed that.
(Also: The errors I mentioned in the comments above I apparently get when running ./Rack
anyways, just that I don't usually run it via terminal, so I'm not used to seeing them. They are likely not relevant here but they are:)
MidiInJack::initialize: JACK server not running?
MidiOutJack::initialize: JACK server not running?
RtAudio alsa: _NOT_ running realtime scheduling
RtAudio alsa: _NOT_ running realtime scheduling
ERROR: File doesn't exist or otherwise can't load file
ERROR: File doesn't exist or otherwise can't load file
...
gtk-launch ~/.local/share/applications/Rack.desktop
from a terminal, and see if the output contains anything useful. You are basically launching your desktop file from a command line this way.gtk-launch: no such application /home/uname/.local/share/applications/Rack.desktop
... Same result for all other desktop files btw.gtk-launch Rack
. You do not supply a path with gtk-launch. This is not a terminal application? Try addingTerminal=true
to the launchergtk-launch rack
returns~/opt/Rack2Free/Rack: error while loading shared libraries: libRack.so: cannot open shared object file: No such file or directory
. But, it launches fine when running the file Rack from its home directory. AddingTerminal=true
results in no output at all when I run with gtk-launch. I looked at: stackoverflow.com/questions/480764/… but I am not sure I exactly what applies here.