refs #2325 include DBUS env var in .xinitrc
parent
02b14b8b93
commit
bf756f2193
|
@ -1 +1 @@
|
|||
OpenGnsys Client 3.9.1
|
||||
OpenGnsys Client 3.9.2
|
||||
|
|
|
@ -1,32 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Compatibilidad con los argumentos usados con el browser original:
|
||||
# browser -qws http://google.com
|
||||
#
|
||||
# Compatibilidad con los argumentos usados con el browser original: browser -qws http://google.com
|
||||
while getopts ":qwsDWX" opt ; do
|
||||
case $opt in
|
||||
q)
|
||||
echo "Ignoring option: -q"
|
||||
;;
|
||||
w)
|
||||
echo "Ignoring option: -w"
|
||||
;;
|
||||
s)
|
||||
echo "Ignoring option: -s"
|
||||
;;
|
||||
D)
|
||||
BROWSER_DEBUG=1
|
||||
;;
|
||||
W)
|
||||
DISABLE_WAYLAND=1
|
||||
;;
|
||||
X)
|
||||
DISABLE_X11=1
|
||||
;;
|
||||
q) echo "Ignoring option: -q" ;;
|
||||
w) echo "Ignoring option: -w" ;;
|
||||
s) echo "Ignoring option: -s" ;;
|
||||
D) BROWSER_DEBUG=1 ;;
|
||||
W) DISABLE_WAYLAND=1 ;;
|
||||
X) DISABLE_X11=1 ;;
|
||||
esac
|
||||
done
|
||||
|
||||
shift $(expr $OPTIND - 1 )
|
||||
shift $(expr $OPTIND - 1)
|
||||
|
||||
browser_args="$@"
|
||||
|
||||
|
@ -42,52 +28,51 @@ if [ -n "BROWSER_DEBUG" ] ; then
|
|||
echo ""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
[ -x "/usr/bin/kitty" ] && wl_terminal=/usr/bin/kitty
|
||||
[ -x "/usr/bin/foot" ] && wl_terminal=/usr/bin/foot
|
||||
|
||||
[ -x "/usr/bin/xterm" ] && x11_terminal=/usr/bin/kitty
|
||||
[ -x "/usr/bin/i3-sensible-terminal" ] && x11_terminal=/usr/bin/i3-sensible-terminal
|
||||
#[ -x "/usr/bin/xterm" ] && x11_terminal=/usr/bin/kitty
|
||||
#[ -x "/usr/bin/i3-sensible-terminal" ] && x11_terminal=/usr/bin/i3-sensible-terminal
|
||||
|
||||
# The admin page is hosted remotely but executes things on localhost
|
||||
QTWEBENGINE_CHROMIUM_FLAGS="--disable-web-security"
|
||||
|
||||
[ "$UID" -eq "0" ] && QTWEBENGINE_CHROMIUM_FLAGS="${QTWEBENGINE_CHROMIUM_FLAGS} --no-sandbox"
|
||||
|
||||
export QTWEBENGINE_CHROMIUM_FLAGS
|
||||
|
||||
rm -rf "/run/sway.started" "/run/x11.started"
|
||||
|
||||
|
||||
## sway
|
||||
mkdir -p $HOME/.config/sway
|
||||
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/sway/config
|
||||
|
||||
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\"" > $HOME/.config/sway/config
|
||||
if [ -n "BROWSER_DEBUG" ] ; then
|
||||
echo "bindsym Mod4+Return exec $wl_terminal" >> $HOME/.config/sway/config
|
||||
echo "bindsym Control+Alt+Backspace exit" >> $HOME/.config/sway/config
|
||||
fi
|
||||
|
||||
echo "exec touch /run/sway.started" >> $HOME/.config/sway/config
|
||||
|
||||
|
||||
## i3
|
||||
mkdir -p $HOME/.config/i3
|
||||
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\" || /usr/bin/browser -qws \"$browser_args\"" > $HOME/.config/i3/config
|
||||
|
||||
echo "exec /usr/bin/OGBrowser --ignore-ssl-errors \"$browser_args\"" > $HOME/.config/i3/config
|
||||
if [ -n "BROWSER_DEBUG" ] ; then
|
||||
echo "bindsym Mod4+Return exec i3-sensible-terminal" >> $HOME/.config/i3/config
|
||||
echo "bindsym Control+Mod1+BackSpace exit" >> $HOME/.config/i3/config
|
||||
fi
|
||||
|
||||
echo "exec touch /run/x11.started" >> $HOME/.config/i3/config
|
||||
|
||||
echo "exec /usr/bin/i3" > $HOME/.xinitrc
|
||||
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
|
||||
## xinitrc
|
||||
if [[ -z $DBUS_SESSION_BUS_ADDRESS ]]; then eval $(cat /proc/$(pidof OGAgent)/environ |sed -e 's/\x00/\x0a/g' |grep DBUS_SESSION_BUS_ADDRESS); fi
|
||||
echo "export DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" > $HOME/.xinitrc
|
||||
echo "exec /usr/bin/i3" >> $HOME/.xinitrc
|
||||
echo "exec /usr/bin/xterm" >> $HOME/.xinitrc
|
||||
|
||||
|
||||
# Make sure libinput works
|
||||
/usr/bin/udevadm trigger
|
||||
|
||||
|
||||
## go
|
||||
rm -rf "/run/sway.started" "/run/x11.started"
|
||||
|
||||
if [ -x "/usr/bin/sway" -a -z "$DISABLE_WAYLAND" ] ; then
|
||||
echo "*** Trying to launch Sway ***"
|
||||
/usr/bin/sway
|
||||
|
@ -112,5 +97,3 @@ if [ ! -f "/run/sway.started" -a ! -f "/run/x11.started" ] ; then
|
|||
else
|
||||
echo "All done."
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue