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 @_@
Since those paths looks okay could you paste what is inside your .desktop file
?
#!/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 ?
(07-20-2023, 03:24 PM)alaraajavamma Wrote: [ -> ] (07-20-2023, 03:05 PM)MadameMalady Wrote: [ -> ]#!/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
Remove the bin bash
I've tried that too and I didn't have luck
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.
The #!/bin/bash definitely does not make sense, use #!/usr/bin/xdg-open or #!/usr/bin/env xdg-open or no #! at all.
(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?
Code:
[Desktop Entry]
Version=0.1.9
Name=My Waydroid Manager
Comment=Manage Waydroid installations easily
Exec=/home/mobian/MyWaydroidManager/MyWaydroidManager.py
Icon=/home/mobian/MyWaydroidManager/icons/icon.svg
Terminal=true
Type=Application
X-Purism-FormFactor=Workstation;Mobile;
Try if this works. Also make sure that you have written the file name correctly like mywaydroidmanager.desktop
(07-21-2023, 10:22 AM)alaraajavamma Wrote: [ -> ]Code:
[Desktop Entry]
Version=0.1.9
Name=My Waydroid Manager
Comment=Manage Waydroid installations easily
Exec=/home/mobian/MyWaydroidManager/MyWaydroidManager.py
Icon=/home/mobian/MyWaydroidManager/icons/icon.svg
Terminal=true
Type=Application
X-Purism-FormFactor=Workstation;Mobile;
Try if this works. Also make sure that you have written the file name correctly like mywaydroidmanager.desktop
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?
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.