Mercurial > hg > config
view bin/setdefaultbrowser.sh @ 694:ebca6d85213a
File "/usr/lib/python3/dist-packages/IPython/config/__init__.py", line 16, in <module>
from .application import *
File "/usr/lib/python3/dist-packages/IPython/config/application.py", line 31, in <module>
from IPython.config.configurable import SingletonConfigurable
File "/usr/lib/python3/dist-packages/IPython/config/configurable.py", line 33, in <module>
from IPython.utils.text import indent, wrap_paragraphs
File "/usr/lib/python3/dist-packages/IPython/utils/text.py", line 28, in <module>
from IPython.external.path import path
File "/usr/lib/python3/dist-packages/IPython/external/path/__init__.py", line 2, in <module>
from path import *
File "/home/jhammel/python/path.py", line 25
print root(path)
^
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Wed, 09 Jul 2014 16:26:49 -0700 |
parents | 5af627460928 |
children |
line wrap: on
line source
#!/bin/bash # To get all selections: # update-alternatives --get-selections # To get a particular selection: # update-alternatives --display x-www-browser # http://askubuntu.com/questions/100693/how-can-i-manually-change-the-default-web-browser # http://askubuntu.com/questions/45885/how-do-i-set-a-custom-browser-as-default-in-preferred-applications?rq=1 # http://fvue.nl/wiki/Linux:_Default_browser # cat /proc/$(pidof krunner)/environ | tr '\000' '\012' | grep BROWSER if [[ $(whoami) != 'root' ]] then echo "Must be run as root" exit 1 fi BROWSER=/home/jhammel/firefox/firefox PREFIX=/usr/bin for LINK in gnome-www-browser x-www-browser do LINKPATH=${PREFIX}/${LINK} update-alternatives --install ${LINKPATH} ${LINK} ${BROWSER} 99 update-alternatives --install ${LINKPATH} ${LINK} ${BROWSER} 99 update-alternatives --set ${LINK} ${BROWSER} update-alternatives --display ${LINK} # unlink ${LINKPATH} # ln -s ${BROWSER} ${LINKPATH} done