chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
73bb900
)
dot/bash_profile: Select a sensible web browser.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 20 Feb 2012 09:28:43 +0000
(09:28 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 20 Feb 2012 09:31:02 +0000
(09:31 +0000)
dot/bash_profile
patch
|
blob
|
blame
|
history
diff --git
a/dot/bash_profile
b/dot/bash_profile
index 7f372f2ce1aafe2ed0f474d1876e741edb18240a..27eec0603afaf2a9b7b4d3b7571da1ff84c27a20 100644
(file)
--- a/
dot/bash_profile
+++ b/
dot/bash_profile
@@
-182,6
+182,20
@@
export PERL_READLINE_NOWARN=yes
## If we have `distcc' then tell `ccache' to use it.
__mdw_programp distcc && export CCACHE_PREFIX=distcc
## If we have `distcc' then tell `ccache' to use it.
__mdw_programp distcc && export CCACHE_PREFIX=distcc
+## Choose a sensible web browser. If we have a display, try to pick a
+## graphical one.
+browsers="elinks w3m lynx"
+case "${DISPLAY+t}" in
+ t) browsers="mdw-chrome iceweasel firefox $browsers" ;;
+esac
+for i in $browsers; do
+ if __mdw_programp $i; then
+ export BROWSER=$i
+ break
+ fi
+done
+unset browsers
+
## Acquiring root privileges. This is mainly the job of `bashrc', but we
## cache the mechanism here.
export __MDW_ROOTLY=`mdw-conf rootly`
## Acquiring root privileges. This is mainly the job of `bashrc', but we
## cache the mechanism here.
export __MDW_ROOTLY=`mdw-conf rootly`