[Solved!] How to Create a Desktop Shortcut with custom Icon?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
RobZ_inT
Level 1
Level 1
Posts: 29
Joined: Sun Jul 22, 2018 6:11 pm

[Solved!] How to Create a Desktop Shortcut with custom Icon?

Post by RobZ_inT »

OK - I was finally able to get Simplify3D to launch from the terminal- viewtopic.php?f=47&t=353699&p=2044370#p2044370
now I'd like to figure out if I can make a traditional shortcut on the desktop since it didn't make one on install.
I tried making this in text editor and saving it as "S3D.desktop" in usr/share/applications but the file didn't work {ETA- probably because it's incorrect and there's a better way to do as explained by nanopeek]
I posted @nanopeek's solution below- I did an extra background step where I copied the icon from the software's folder over to the icon folder in /user/share so i could use it instead of the cinnamon launcher icon.

Code: Select all

Encoding=UTF-8
Version=4.1.2                                      
Name[en_US]=Sim3D                                
GenericName=Simplify3D                      
Exec= /opt/Simplify3D-4.1.2/LaunchScript.sh          
Terminal=true                                 
Icon[en_US]=/opt/Simplify3D-4.1.2/icon.png  
Type=Application                                
Categories=Application;        
Comment[en_US]=3D editor
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
RobZ_inT
Level 1
Level 1
Posts: 29
Joined: Sun Jul 22, 2018 6:11 pm

[Solved]: How to Create a Desktop Shortcut with custom Icon?

Post by RobZ_inT »

=xenopeek
- Right-click the Cinnamon menu button and select Configure
- Go to the Menu tab and click on the "Open the menu editor" button
- On the left select a category in which you want the menu launcher for Simplify3D to appear
- Then on the right click the New Item button and give it a name and as command put in your:
/opt/Simplify3D-4.1.2/LaunchScript.sh

That should do it.

If there is an existing menu entry for Simplify3D you can instead also edit that in step 4 above and change the command from what it is now to your /opt/Simplify3D-4.1.2/LaunchScript.sh and that will also work.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: [Solved!] How to Create a Desktop Shortcut with custom Icon?

Post by AndyMH »

Didn't work as in it didn't appear in the mint menu or didn't work when you clicked on it?

This is a simple .desktop file I created for a HP15C calculator emulator:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=HP15C
Exec=hp15c
Comment=
Terminal=false
Icon=hp15c.png
Type=Application
Name[en_GB]=HP15C
GenericName=HP15C
StartupNotify=false
Categories=Utility
You have no heading [Desktop Entry] nor have you assigned a category (so it will appear under a category heading in the mint menu). Assuming it is a GUI application why have you set Terminal=true?

I assume you have checked in a terminal that /opt/Simplify3D-4.1.2/LaunchScript.sh does run the application?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
RobZ_inT
Level 1
Level 1
Posts: 29
Joined: Sun Jul 22, 2018 6:11 pm

Re: [Solved!] How to Create a Desktop Shortcut with custom Icon?

Post by RobZ_inT »

AndyMH wrote: Sun Jul 25, 2021 3:26 pm Didn't work as in it didn't appear in the mint menu or didn't work when you clicked on it?
You have no heading [Desktop Entry] nor have you assigned a category (so it will appear under a category heading in the mint menu). Assuming it is a GUI application why have you set Terminal=true?

I assume you have checked in a terminal that /opt/Simplify3D-4.1.2/LaunchScript.sh does run the application?
I was able to verify that the script does work- see the linked post regarding SSL error. I had tried the .desktop file with [Desktop Entry] and being a novice- when it didn't initially work, i thought maybe that was causing the problem, based on your reply I see now that it wasn't.
I have no clue why it didn't work- I'm not familiar enough with the intricacies or even the basics of all this. I toggled launch in terminal because it didn't work with it set to no.
BTW: The script when ran in terminal without sudo does/did open a GUI where you have to provide the program username and password, it has a "Remember Me" checkbox, that when clicked- does remember you. Running the base script /opt/Simplify3D-4.1.2/LaunchScript.sh after that doesn't require credentials- it loads straight to the program. For some reason when the script is ran with sudo- it directly opens the program to your 3D workspace. Perhaps because I had already supplied credentials at install. I dunno...
I was successful using nanopeek's instructions with menu editor and I'm good to go until I break something else.
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: [Solved!] How to Create a Desktop Shortcut with custom Icon?

Post by AndyMH »

If it is any consolation I've yet to find an adequate description/listing of the categories. Had to do it by example - what program is in the category I want to add my program to? go look at the desktop file and find out which categories it uses.
I'm good to go until I break something else.
Make sure you have adequate backups, it's the best (the only?) way of learning. Done it many times. :D
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Software & Applications”