You are not logged in.
Pages: 1
I just installed the firefox beta from AUR, and would like to fully replace firefox with it. My intuition is that this can be done by symlinking /usr/bin/firefox to /usr/bin/firefox-beta-bin, or by creating an equivalent alias.
Any thoughts on this choice, for this particular example or in general?
I've tried to google around for it, but most of what is coming up is about a specific technical issue, not about the best practice of each of their uses.
Last edited by spr-k3737 (2014-05-04 15:52:38)
Offline
I doubt any of them is better than the other. They're just completly different.
Symlink is global and applies to all users, at all time.
Alias is specific to a particular user and has to be set on logon.
Last edited by mpan (2014-05-04 16:09:45)
Sometimes I seem a bit harsh — don’t get offended too easily!
Offline
I could hypothetically put the alias in /etc/profile, as some googling suggested I do, removing the user difference.
Another difference I notice is that alias is something done every session/boot/whatever, while symlink bakes it into the filesystem, and doesn't require...maintenance.
Offline
symlink bakes it into the filesystem, and doesn't require...maintenance.
If you don't do this in the PKGBUILD, when you remove firefox beta and you forget to remove the symlink, you may be left scratching your head, why you get an error when you try to install the stock firefox or some other firefox version that does provide a symlink.
Offline
And due how path are created, why not use /usr/local/bin/firefox ???
PD: I laugh hard for the tittle... I read "Symlinks vs Allan"
Well, I suppose that this is somekind of signature, no?
Offline
PD: I laugh hard for the tittle... I read "Symlinks vs Allan"
Symlinks are easily broken. They stand no chance against Allan.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Any thoughts on this choice, for this particular example or in general?
FWIW, I would create a symlink, preferably in the PKGBUILD, for this use case.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Using an alias works if you want to access firefox in a shell or other applications that run external commands with a shell (e.g. a system() call)
A symlink covers a greater range of use cases. It also works with all other applications that search for the executable in a path to run it. (e.g. execvp)
Edit: If you want a symlink only for a specifc user, add e.g. "~/bin" to your PATH variable and create the symlink as "~/bin/firefox"
Last edited by progandy (2014-05-06 04:22:05)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Pages: 1