Skip to content

Instantly share code, notes, and snippets.

@ednisley
Last active November 6, 2018 20:55
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ednisley/c77f17c838cc4c2b2ab1b7a925aa3f96 to your computer and use it in GitHub Desktop.
Bash script: Xubuntu startup actions, with delay for xsetwacom
logger "startup.sh - starting"
logger "startup.sh - setting configurations"
#setxkbmap -option terminate:ctrl_alt_bksp
#pactl set-default-sink alsa_output.pci-0000_00_1b.0.hdmi-stereo
amixer -D pulse sset Master 41%
amixer -D pulse sset Master 1%-
gsettings set org.gnome.Evince page-cache-size 500
# enable Kinesis volume and calculator keys
#/home/ed/bin/Kinesis/kfreestyle2d /dev/hidraw6 &
logger "startup.sh - starting applications"
/usr/bin/thunar &
/usr/bin/gimp &
/usr/bin/chromium-browser &
/usr/bin/digikam &
/usr/bin/firefox &
/usr/bin/thunderbird &
/usr/bin/xfce4-terminal &
logger "startup.sh - copying Xauthority values"
# similar lines in .xprofile happen before X grabs the display
whoami > /tmp/who
cp /home/ed/.Xauthority /tmp/Xauthority.txt
echo $XAUTHORITY > /tmp/XAUTHORITY.txt
cp $XAUTHORITY /tmp/xauth.cp
echo $DISPLAY > /tmp/DISPLAY.txt
# xsetwacom needs an additional delay after $XAUTHORITY and $DISPLAY become correct
logger "startup.sh - waiting aimlessly"
sleep 2s
logger "startup.sh - doing wacom setup"
xsetwacom --verbose set "Wacom Graphire3 6x8 Pen stylus" MapToOutput "DP-1"
#xsetwacom --verbose set "Wacom Graphire3 6x8 Pen stylus" MapToOutput "HEAD-0"
xsetwacom --verbose set "Wacom Graphire3 6x8 Pen eraser" MapToOutput "DP-1"
#xsetwacom --verbose set "Wacom Graphire3 6x8 Pen eraser" MapToOutput "HEAD-0"
logger "startup.sh -- done"
@ednisley
Copy link
Author

ednisley commented Nov 6, 2018

More details on my blog at https://wp.me/poZKh-7QW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment