#!/bin/bash if [ -e /tmp/.X0-lock ]; then echo "/tmp/.X0-lock" already exists else X :0 & export DISPLAY=:0 xhost + su USER -c "~/.xinitrc" & fi