RetroFed Forum
Your home away from modern life.
[solved] Can I soft link a non existing executable to an existing one?
Post Reply
AuthorMessage
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
(edited) Quote

Edit: while waiting for your replies, my PAM lockout/timeout reset and I was able to try. It worked. 🤣

I am trying to open the cloud provider Internxt's desktop app. I have Librewolf installed, which I'm sure is going to work as a substitute for Firefox. Can I

ln -s /usr/bin/librewolf /usr/bin/firefox  

to make their app use Librewolf instead, thinking it's actually executing Firefox? If not, would an alias work?

22   Original
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#2 · Quote Reply

While waiting for your replies, my PAM lockout/timeout reset and I was able to try. It worked. 🤣

5
thenextguy sh.itjust.works thenextguy@sh.itjust.works
Joined: 2026-07-01
#3 · Quote Reply

https://askubuntu.com/questions/18418/how-can-i-set-which-application-is-launched-by-xdg-open

You might want to configure xdg to open what you want instead.

19
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#4 · Quote Reply

https://askubuntu.com/questions/18418/how-can-i-set-which-application-is-launched-by-xdg-open You might want to configure xdg to open what you want instead.

Thanks! I'll bookmark this since I should learn xdg someday, but not today. 🤣 For now, this ln fakery worked. 😅

5
redrum lemmy.ml redrumBot@lemmy.ml
Joined: 2023-06-25
#5 · Quote Reply

Thanks! I'll bookmark this since I should learn xdg someday, but not today. 🤣 For now, this ln fakery worked. 😅

You can use the update-alternatives command with the x-www-browser key to create the symlink and let the system manage it.

It seems to me that having the symbolic link in /usr/bin would cause an error if you tried to install Firefox. It might be better to place the symlink in /usr/local/bin.

2
MonkderVierte lemmy.zip MonkderVierte@lemmy.zip
Joined: 2025-05-30
#6 · (edited) Quote Reply

Eh, i just symlink the executable to ~/.local/bin/xdg-web and set that in the Webbrowser shortcut. There's a bunch of xdg- links now and i know with a ls -l what's what.

2
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#7 · Quote Reply

Eh, i just symlink the executable to ~/.local/bin/xdg-web and set that in the Webbrowser shortcut. There's a bunch of xdg- links now and i know with a ls -l what's what.

Oh, well... xD Maybe next time then. I guess the only difference in my case is that xdg still looks through all possible executables until encounteres Firefox? While your solution doesn't have to run through them all, but immediately jumps to the browser of your choice?

2
printf("%s", name); piefed.blahaj.zone akunohana@piefed.blahaj.zone
Joined: 2026-03-30
#8 · Quote Reply

You can use the update-alternatives command with the x-www-browser key to create the symlink and let the system manage it. It seems to me that having the symbolic link in /usr/bin would cause an error if you tried to install Firefox. It might be better to place the symlink in /usr/local/bin.

Thanks! I don't see myself ever installing Firefox, but I'll definitely read up of the differences between local/bin and "normal" bin. :)

1
MonkderVierte lemmy.zip MonkderVierte@lemmy.zip
Joined: 2025-05-30
#9 · (edited) Quote Reply

Oh, well... xD Maybe next time then. I guess the only difference in my case is that xdg still looks through all possible executables until encounteres Firefox? While your solution doesn't have to run through them all, but immediately jumps to the browser of your choice?

Exactly. I've found xdg's script with a switch case cumbersone with my custom script (and ugly), while the other stuff is good enough for open-with. So i just "wire" the defaults, while keeping to a naming scheme.

Edit: in hindsight, this sounds confusing, huh?

1
Post Reply
Back to top