browser: make generic and remove redundant scripts
This commit is contained in:
parent
6a795d70f0
commit
0c497ffde9
12
bin/Makefile
12
bin/Makefile
@ -15,9 +15,9 @@
|
||||
PREFIX = $(HOME)
|
||||
MANPREFIX = $(PREFIX)/local
|
||||
BIN = ZZZ browser credentials fetch flac2ogg imgresize invidious \
|
||||
plumb pstsrv riot-web-ui rfcopen screenshot sekrit tor-browser \
|
||||
w3m-copy-link
|
||||
plumb pstsrv rfcopen screenshot sekrit w3m-copy-link
|
||||
MAN1 = sekrit.1
|
||||
BROWSER_LINKS = tor-browser
|
||||
|
||||
all: $(BIN)
|
||||
|
||||
@ -27,10 +27,14 @@ clean:
|
||||
install: all
|
||||
mkdir -p $(PREFIX)/bin
|
||||
cp -f $(BIN) $(PREFIX)/bin
|
||||
cd $(PREFIX)/bin && chmod 555 $(BIN)
|
||||
for t in $(BROWSER_LINKS); do \
|
||||
rm -f $(PREFIX)/bin/$$t; \
|
||||
ln $(PREFIX)/bin/browser $(PREFIX)/bin/$$t; \
|
||||
done
|
||||
cd $(PREFIX)/bin && chmod 555 $(BIN) $(BROWSER_LINKS)
|
||||
mkdir -p $(MANPREFIX)/man/man1
|
||||
cp -f $(MAN1) $(MANPREFIX)/man/man1
|
||||
cd $(MANPREFIX)/man/man1 && chmod 444 $(MAN1)
|
||||
|
||||
uninstall:
|
||||
cd $(PREFIX)/bin && rm -f $(BIN)
|
||||
cd $(PREFIX)/bin && rm -f $(BIN) $(BROWSER_LINKS)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
# browser
|
||||
# Written in 2019 by Lucas
|
||||
# Written in 2019-2020 by Lucas
|
||||
# CC0 1.0 Universal/Public domain - No rights reserved
|
||||
#
|
||||
# To the extent possible under law, the author(s) have dedicated all
|
||||
@ -10,6 +10,18 @@
|
||||
# Dedication along with this software. If not, see
|
||||
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
scp ~/.Xauthority _browser@localhost:
|
||||
ssh -n _browser@localhost -- \
|
||||
env DISPLAY=${DISPLAY:-:0} /usr/local/bin/firefox "$@"
|
||||
case ${0##*/} in
|
||||
tor-browser)
|
||||
user=_tor_browser
|
||||
browser=/usr/local/bin/tor-browser
|
||||
;;
|
||||
*)
|
||||
user=_browser
|
||||
browser=/usr/local/bin/firefox
|
||||
;;
|
||||
esac
|
||||
|
||||
dpy=${DISPLAY:-:0}
|
||||
xauth extract - "$dpy" |
|
||||
ssh -l "$user" localhost -- \
|
||||
xauth merge - '&&' env DISPLAY="$dpy" "$browser" "$@"
|
||||
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
# browser
|
||||
# Written in 2019 by Lucas
|
||||
# CC0 1.0 Universal/Public domain - No rights reserved
|
||||
#
|
||||
# To the extent possible under law, the author(s) have dedicated all
|
||||
# copyright and related and neighboring rights to this software to the
|
||||
# public domain worldwide. This software is distributed without any
|
||||
# warranty. You should have received a copy of the CC0 Public Domain
|
||||
# Dedication along with this software. If not, see
|
||||
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
scp ~/.Xauthority _riot_web_ui@localhost:
|
||||
ssh -n _riot_web_ui@localhost -- \
|
||||
env DISPLAY=${DISPLAY:-:0} /usr/local/bin/firefox "$@"
|
@ -1,15 +0,0 @@
|
||||
#!/bin/sh
|
||||
# tor-browser
|
||||
# Written in 2019 by Lucas
|
||||
# CC0 1.0 Universal/Public domain - No rights reserved
|
||||
#
|
||||
# To the extent possible under law, the author(s) have dedicated all
|
||||
# copyright and related and neighboring rights to this software to the
|
||||
# public domain worldwide. This software is distributed without any
|
||||
# warranty. You should have received a copy of the CC0 Public Domain
|
||||
# Dedication along with this software. If not, see
|
||||
# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
scp ~/.Xauthority _browser@localhost:
|
||||
ssh -n _browser@localhost -- \
|
||||
env DISPLAY=${DISPLAY:-:0} /usr/local/bin/tor-browser "$@"
|
Loading…
Reference in New Issue
Block a user