this post was submitted on 30 Jan 2026
7 points (100.0% liked)

CachyOS

280 readers
1 users here now

https://cachyos.org/

founded 2 years ago
MODERATORS
 

How can I make a desktop shortcut of the two highlighted shell files (forge.sh and forge-adventure.sh)? Copying and pasting doesn't work since the filepath isn't brought over with them. I've tried using Menu Editor but can't find a decent guide on setting it up.

top 7 comments
sorted by: hot top controversial new old
[–] your_paranoid_neighbour@lemmy.dbzer0.com 2 points 1 month ago* (last edited 1 month ago) (1 children)

A symbolic link? ln -s <FROM_FILE> <TO_FILE>

Edit:

<FROM_FILE> would be the /home/admin/forge-etc.../file

<TO_FILE> would be /home/admin/Desktop/<NEW_FILENAME>

<> means substitute to that

[–] TauZero@mander.xyz 2 points 1 month ago (1 children)

That's what I use, but desktop environments ignore symbolic links on the "Desktop" for some safety reason.

[–] your_paranoid_neighbour@lemmy.dbzer0.com 2 points 1 month ago (1 children)

I didn't know that it was ignored, seems weird to just not use it for desktop files, an icon to show it was a symbolic link would be enough, but that is only my opinion, idk anything about security.

[–] TauZero@mander.xyz 2 points 1 month ago (1 children)

seems weird to just not use it for desktop files

That's what I said! :D when Ubuntu ignored my soft links and I had to look it up how to do it "the Desktop way" like OP did. On the plus side, .desktop files let you also specify the working path, the icon, and whether to run in terminal or in background.

[–] your_paranoid_neighbour@lemmy.dbzer0.com 2 points 1 month ago* (last edited 1 month ago)

On KDE, it looks like to be different, with different bugs, could be gnome being gnome. Seems fixed on KDE Plasma 6.

[–] TauZero@mander.xyz 1 points 1 month ago

Desktop shortcuts are ".desktop" files in your /home/user/Desktop directory, which are small text files describing what to run and where. I don't have KDE desktop environment, but there is some way to create a new shortcut, maybe by opening /home/user/Desktop in the GUI file browser and rightclicking empty space/checking menu options for "create link to application" and pointing it to your shell script. Or maybe you can right-click on the desktop directly, but presumably you've tried that and it doesn't work. Worst case, you can write your own forge_installer.desktop file from scratch, specifying the shell script and the working path (if needed). Ask AI how, they are actually good at getting the format correct for stuff like that.

[–] pandorum@feddit.org 1 points 2 weeks ago* (last edited 2 weeks ago)

This thread is already over a month old, but here are my two cents anyway.

Via GUI

  1. Right-click on the desktop → Create new empty file with file extension .desktop

  2. Open the file in a text editor such as Kate and paste in the information for the desktop shortcut:

    [Desktop Entry]
    Type=Application
    Name=Shortcut Name
    Exec=/path/to/script.sh
    Icon=utilities-terminal
    Terminal=true
    

    Notes:

    • The Exec path to the script must of course be set accordingly.
    • If you set Terminal=false then the script will run invisibly in the background.
    • Remember to set permission to run the shortcut as a program (via right-click on the shortcut → Properties).

Via Console

This is a one-liner for the bash/fish console. It creates a desktop shortcut for the current user, fills in the example content from above and sets execution permission for the shortcut.

printf '[Desktop Entry]\nType=Application\nName=Shortcut Name\nExec=/path/to/script.sh\nIcon=utilities-terminal\nTerminal=true\n' > "$(xdg-user-dir DESKTOP)/MyShortcut.desktop" && chmod +x "$(xdg-user-dir DESKTOP)/MyShortcut.desktop"

You can change the file name of the shortcut and the contents of the file afterwards, or before you send the command to the console.