3

I'm trying to make a desktop file for vcvRack. I have the program and other files saved in ~/.Rack/. The program launches fine when I double click it or launch in from terminal using ./Rack.

The file ~/.local/share/applications/Rack.desktop contains the following.

[Desktop Entry]
Name=Rack
Comment=bleep bloop
Exec=/home/uname/.Rack/Rack
Icon=/home/uname/.Rack/icon-3.png
Terminal=false
Type=Application
Categories=Music;

It shows up in search with icon and all, but it doesn't actually launch. I've tried chmod +x Rack.desktop and sudo chmod +x Rack.desktop, though I don't think either should be necessary.

I have other nearly identical desktop files for other programs that run fine.

Any ideas?

6
  • Please run 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.
    – Jos
    Commented Dec 20, 2021 at 19:17
  • 1
    gtk-launch: no such application /home/uname/.local/share/applications/Rack.desktop ... Same result for all other desktop files btw.
    – iHnR
    Commented Dec 20, 2021 at 19:26
  • That would suggest that the desktop file doesn't exist, although the path is the same as what you mentioned.
    – Jos
    Commented Dec 20, 2021 at 19:57
  • Rather try gtk-launch Rack . You do not supply a path with gtk-launch. This is not a terminal application? Try adding Terminal=true to the launcher
    – vanadium
    Commented Dec 20, 2021 at 20:04
  • BUMP: @vanadium I have the EXACT same problem (i.e. also Rack). gtk-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. Adding Terminal=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. Commented Jan 19 at 16:52

1 Answer 1

0

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
...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .