Sunday, April 28, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 896  / 2 Years ago, mon, july 11, 2022, 6:07:23

Rather recently, I've decided to add minecraft to my dock. I play it enough to want it on my dock. I created a .desktop file, and I gave it an icon, name, and such. I figured that point the exec at the .jar would be good enough, but apparently I am incorrect. I decided to make a .sh that would do the same, then point the exec at the .sh.



Code for the .desktop:



[Desktop Entry]
Type=Application
Name=Minecraft
Exec=/home/bbnorman/.Minecraft.sh %U
Comment=Runs Minecraft.
Icon=/home/bbnorman/Documents/Files/icon.png
Hidden=false
NoDisplay=false
Terminal=false
#X-GNOME-Autostart-enabled=true


Code for the .sh:



#!/bin/bash

echo $(/home/bbnorman/Documents/Files/Minecraft.jar)


The .sh works if I use 'bash .Minecraft' in terminal, but simply will not open it via the .desktop.



Thank you in advance.


More From » command-line

 Answers
6

Try This



[Desktop Entry]
Type=Application
Name=Minecraft
Exec=java -jar /home/bbnorman/Documents/Files/Minecraft.jar
Comment=Runs Minecraft.
Icon=/home/bbnorman/Documents/Files/icon.png
Hidden=false
NoDisplay=false
Terminal=false

[#24064] Tuesday, July 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oatglori

Total Points: 313
Total Questions: 102
Total Answers: 111

Location: Guam
Member since Thu, May 18, 2023
1 Year ago
oatglori questions
;