Friday, May 17, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 11406  / 2 Years ago, sun, july 3, 2022, 7:30:50

I am trying to run a shell script with a .desktop file but it doesn't seem to work, producing an error of There was an error launching the application at each attempt. I have the sh and .desktop files set the executable.



.desktop file:



[Desktop Entry]
Name=Craftbukkit Server
Comment=run server
Exec="/home/ubuntu-gnome/Documents/Craftbukkit/run.sh"
Icon=/home/ubuntu-gnome/Documents/Craftbukkit/craftbukkit.png
Terminal=true
Type=Application


The script:



#!/bin/bash
/usr/bin/java -Xmx1024M -Xms1024M -jar /home/ubuntu-gnome/Documents/Craftbukkit/craftbukkit.jar -o false


All paths are correct.



Methods I Have Tried:




  • Exec="/home/ubuntu-gnome/Documents/Craftbukkit/run.sh"

  • Exec='/home/ubuntu-gnome/Documents/Craftbukkit/run.sh'

  • Exec=/home/ubuntu-gnome/Documents/Craftbukkit/run

  • Exec="/home/ubuntu-gnome/Documents/Craftbukkit/run.sh"

  • Exec=gnome-terminal -e "/home/ubuntu-gnome/Documents/Craftbukkit/run.sh"

  • Exec=bash -c 'cd /home/ubuntu-gnome/Documents/Craftbukkit/ && ./run.sh'



Conspicuously, I have tried many methods. Can anyone assist me with a resolution to this?


More From » command-line

 Answers
3

Thank's Everyone for the help. I realized that I had something wrong with my .desktop file. I noticed that the properties of the .desktop file were different to that of the other .desktop files in /usr/share/applications, in it that there were no Description, Command or Comment text areas in mine.



I saved the .desktop file of Color Picker to the desktop and I substituted my information in, which made it work.



This is what the properties->Basic of the .desktop file is.



properties



The Script



[Desktop Entry] 
Name=Minecraft-Server Comment=Run the Minecraft
Craftbukkit Server
Icon=/home/ubuntu-gnome/Documents/Craftbukkit/craftbukkit.png
Exec='/home/ubuntu-gnome/Documents/Craftbukkit/run.sh'
Terminal=true
Type=Application
Categories=Minecraft;Server;CraftBukkit;

[#22629] Monday, July 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
elopingapo

Total Points: 206
Total Questions: 110
Total Answers: 114

Location: Guam
Member since Tue, Nov 29, 2022
1 Year ago
elopingapo questions
Fri, Sep 10, 21, 17:52, 3 Years ago
Tue, May 24, 22, 00:42, 2 Years ago
Sat, Apr 23, 22, 03:16, 2 Years ago
Fri, Jan 13, 23, 06:41, 1 Year ago
;