Mobian .desktop file creation - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177) +--- Forum: PinePhone Pro Software (https://forum.pine64.org/forumdisplay.php?fid=179) +--- Thread: Mobian .desktop file creation (/showthread.php?tid=18530) Pages:
1
2
|
Mobian .desktop file creation - MadameMalady - 07-20-2023 I'm trying to write a temporary installer for a program I'm working on, and none of the .desktop files I have created have shown up on Phosh on Mobian I've tried: ~/.local/share/applications/ and /home/mobian/.local/share/applications as locations for the .desktop files, and it *still* doesn't show up.. I've made desktop files before on Manjaro Phosh, and didn't have any of these struggles, any help would be appreciated, i've been working on this for hooooooours @_@ RE: Mobian .desktop file creation - alaraajavamma - 07-20-2023 Since those paths looks okay could you paste what is inside your .desktop file ? RE: Mobian .desktop file creation - MadameMalady - 07-20-2023 #!/bin/bash [Desktop Entry] Type=Application NoDisplay=false Version=0.1.9 Type=Application Terminal=true Exec=/home/mobian/MyWaydroidManager/MyWaydroidManager.py X-Purism-FormFactor=Workstation;Mobile; Name=My Waydroid Manager Comment=Manage Waydroid installations easily Icon=/home/mobian/MyWaydroidManager/icons/icon.svg Categories=utility (07-20-2023, 01:14 PM)alaraajavamma Wrote: Since those paths looks okay could you paste what is inside your .desktop file ? RE: Mobian .desktop file creation - alaraajavamma - 07-20-2023 (07-20-2023, 03:05 PM)MadameMalady Wrote: #!/bin/bash Remove the bin bash RE: Mobian .desktop file creation - MadameMalady - 07-20-2023 (07-20-2023, 03:24 PM)alaraajavamma Wrote:I've tried that too and I didn't have luck(07-20-2023, 03:05 PM)MadameMalady Wrote: #!/bin/bash Here's the whole option in the script, maybe i'm messing something up..? if [ $(hostname) = 'mobian' ]; then notify-send "My Waydroid Manager" "Check Your Terminal" # copy application directory cd .. sudo mkdir -p /home/mobian/MyWaydroidManager sudo cp My_Waydroid_Manager.py /home/mobian/MyWaydroidManager sudo cp -r icons /home/mobian/MyWaydroidManager sudo cp -r scripts /home/mobian/MyWaydroidManager cd ~/.local/share/applications/ sudo touch MyWaydroidManager.desktop echo "#!/bin/bash [Desktop Entry] Type=Application NoDisplay=false Version=0.1.9 Type=Application Terminal=true Exec=/home/mobian/MyWaydroidManager/MyWaydroidManager.py X-Purism-FormFactor=Workstation;Mobile; Name=My Waydroid Manager Comment=Manage Waydroid installations easily Icon=/home/mobian/MyWaydroidManager/icons/icon.svg Categories=utility">MyWaydroidManager.desktop this option is in a directory called scripts, since the program is in 'scripts' when this option is ran, I have it cd .. back up a directory to start. RE: Mobian .desktop file creation - Kevin Kofler - 07-21-2023 The #!/bin/bash definitely does not make sense, use #!/usr/bin/xdg-open or #!/usr/bin/env xdg-open or no #! at all. RE: Mobian .desktop file creation - MadameMalady - 07-21-2023 (07-21-2023, 07:32 AM)Kevin Kofler Wrote: The #!/bin/bash definitely does not make sense, use #!/usr/bin/xdg-open or #!/usr/bin/env xdg-open or no #! at all. Tried without any shebang at all (still no luck at all) , what's xdg-open do? / what/s xdg? RE: Mobian .desktop file creation - alaraajavamma - 07-21-2023 Code: [Desktop Entry] Try if this works. Also make sure that you have written the file name correctly like mywaydroidmanager.desktop RE: Mobian .desktop file creation - MadameMalady - 07-22-2023 (07-21-2023, 10:22 AM)alaraajavamma Wrote:I ended up putting the X-purism line right after the icon like, but that worked, thanks! now to figure out how to prevent it from making the buttons smaller bc it opened the terminal first.. ? So, that does make the icon show up correctly, but it doesn't run any of the commands in the opened terminal bc it's read-only, is that related at all or a different issue? RE: Mobian .desktop file creation - Kevin Kofler - 07-23-2023 xdg-open opens a document with the document opening tool provided by your desktop environment. (xdg stands for "Cross-Desktop Group".) This works for files such as word processor documents or spreadsheets, but also for .desktop files. So if you want to make the .desktop file executable as a script, that is the tool for it. But there is generally no need to make .desktop files directly executable at all. |