PINE64
how to make a terminal command run as an icon in arch-phosh - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120)
+--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121)
+---- Forum: Arch Linux on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=159)
+---- Thread: how to make a terminal command run as an icon in arch-phosh (/showthread.php?tid=14960)



how to make a terminal command run as an icon in arch-phosh - pineuser0 - 09-24-2021

I have an application (blender) that only runs with
Code:
LIBGL_ALWAYS_SOFTWARE=1 blender
how can I make it so I can use a blender icon in the phone's home menu to run the above command


RE: how to make a terminal command run as an icon in arch-phosh - kqlnut - 09-24-2021

Does Blender already have an icon in the launcher? If so, you will probably find the corresponding .desktop file in /usr/share/applications/. In that file insert setting the variable on the "Exec=" line:
Code:
Exec=env LIBGL_ALWAYS_SOFTWARE=1 blender
If you want to keep this file from being overwritten (e. g. with package updates), you can copy the .desktop file to ~/.local/share/applications/ which will take precedence over the one in /usr/share/applications.

If no .desktop file for blender exists, you have to create a new one.


RE: how to make a terminal command run as an icon in arch-phosh - cabbie001 - 11-29-2021

(09-24-2021, 06:57 PM)kqlnut Wrote: Does Blender already have an icon in the launcher? If so, you will probably find the corresponding .desktop file in /usr/share/applications/. In that file insert setting the variable on the "Exec=" line:
Code:
Exec=env LIBGL_ALWAYS_SOFTWARE=1 blender
If you want to keep this file from being overwritten (e. g. with package updates), you can copy the .desktop file to ~/.local/share/applications/ which will take precedence over the one in /usr/share/applications.

If no .desktop file for blender exists, you have to create a new one.

OR:
Create a 1-line script with your code, make it executable and name something like "blender-code" and place in /usr/local/bin;
Then create your own launcher called "blender.desktop" in ~/.local/share/share/applications with the following lines:
    [Desktop Entry]
   Name=Blender
   Type=Application
   Icon=[PATH-TO-YOUR-BLENDER-ICON].png
   Exec=/usr/local/bin/blender-code
   Categories=Utility;

Reboot, and check to see if the blender icon is now visible on the desktop. If so, click it to launch blender...


RE: how to make a terminal command run as an icon in arch-phosh - brb78 - 12-06-2021

menulibre https://aur.archlinux.org/packages/menulibre/ may be what you're looking for