vercel / hyper

A terminal built on web technologies
https://hyper.is
MIT License
43.23k stars 3.51k forks source link

set debian alternatives for x-terminal-emulator #2259

Open josephholsten opened 7 years ago

josephholsten commented 7 years ago

Issue

many terminals update debian alternatives for /etc/alternatives/x-terminal-emulator to point to themselves. Hyper should do this in its debian packaging, per https://debian-administration.org/article/91/Using_the_Debian_alternatives_system

This requires the package to run

update-alternatives --install /etc/alternatives/x-terminal-emulator hyper /opt/Hyper/hyper 100

This would allow users could run:

update-alternatives --set x-terminal-emulator /opt/Hyper/hyper
josephholsten commented 7 years ago

btw, the workaround is just to run that first command:

update-alternatives --install /etc/alternatives/x-terminal-emulator hyper /opt/Hyper/hyper 100
iamandrewluca commented 5 years ago

If solution above does not work, you can force it manually.

sudo ln -sf $(which hyper) /etc/alternatives/x-terminal-emulator
aschrab commented 4 years ago

Besides installing the alternative during the package installation, it should also be removed if and when the package is uninstalled. With that, the alternatives system would select one of the other alternatives as the preferred one if Hyper had been selected previously.

It's the lack support for this in the removal process that leaves me unsatisfied with the work around mentioned in the first comment (which I'd done on my own before even searching the issues here). The second comment would likely leave the system in an even worse state.

mymedia2 commented 3 years ago

Please do not do this until you implement -e and -T options as required by Debian policy, §11.8.3 or you break the system. Any other programs expect these options to be working.