Skip to content

Instantly share code, notes, and snippets.

@mslinn
Last active June 15, 2020 16:17
Show Gist options
  • Select an option

  • Save mslinn/1972154269dd498281990cf90d31e8a3 to your computer and use it in GitHub Desktop.

Select an option

Save mslinn/1972154269dd498281990cf90d31e8a3 to your computer and use it in GitHub Desktop.
Starts XFCE4 or some other Xorg app
alias dropCaches='su - -c "sync; echo 3 >/proc/sys/vm/drop_caches"'
alias dropCaches1='echo 1 | sudo tee /proc/sys/vm/drop_caches'
#!/bin/bash
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0
export LIBGL_ALWAYS_INDIRECT=1
sudo /etc/init.d/dbus start &> /dev/null
if [ "$1" ]; then
CMD="$1"
else
sudo rm -fr /tmp/.ICE-unix
CMD=startxfce4
fi
if [ "$DEBUG" ]; then
set -xv
"$CMD" &
else
"$CMD" &> /dev/null &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment