0

Trying to edit a program to have a command specified before launching the program.

Adding it using MenuLibre doesn't work, manually doing it doesn't work, have tried rebooting several times.

Any edit to the main .desktop file (/usr/share/applications/obs.desktop) removes the program from the launcher (until I purge/reinstall as far as I can tell).

Edit: It seems as if it only doesn't like me adding the command before the program at the "exec" line. Works fine otherwise.

Edit2: Workaround: Have it execute a bash script with the command.

[Desktop Entry]

Version=1.0

Name=OBS

GenericName=Streaming/Recording Software

Comment=Free and Open Source Streaming/Recording Software

Comment[ru]=Бесплатная программа с открытым кодом для записи/трансляции видео

Exec=LIBGL_ALWAYS_SOFTWARE=1 obs

Icon=obs

Terminal=false

Type=Application

Categories=AudioVideo;Recorder;

StartupNotify=true

1
  • suggestion ... try to set up something for xclock (or Calculator) to see if there are any errors thrown ... this might point you to any issues you are having to set this up Commented Dec 20, 2018 at 20:48

2 Answers 2

0

maybe you're having some problem with string interpolations. May you post the command you're trying to execute? If the command in Exec= is incorrect the launcher will not load the infos in myApp.desktop

One tip for testing if the command is actually working is using xlogo before anything else. The xlogo command opens a random window so we can have a graphical confirmation that it is indeed working.

ex. Exec=xlogo

There are two apps that may be helpful with this and similar tasks.

App Editor
Edit application entries shown in application launcher menu and their properties.
http://appcenter.elementary.io/com.github.donadigo.appeditor/

Alias
Simplify your commands: For example, you can create and organize a bunch of commands like the one that you're using now and just call it obs-config and then you would use like this: Exec=obsconfig obs
http://appcenter.elementary.io/com.github.bartzaalberg.alias/

1
  • The command I was trying to run was included in a recent edit. (LIBGL_ALWAYS_SOFTWARE=1 obs) xlogo doesn't appear to be working, adding a command after it does nothing. I'll look into using alias though.
    – Lyra Lylac
    Commented Aug 23, 2018 at 18:09
0

Change Exec=LIBGL_ALWAYS_SOFTWARE=1 obs

to Exec=sh -c "LIBGL_ALWAYS_SOFTWARE=1 obs"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.