View Single Post
  #7   (View Single Post)  
Old 19th April 2017
kpedersen kpedersen is offline
Port Guard
 
Join Date: Nov 2009
Posts: 25
Default

Hello again everyone. I hope all is well since the last post around 6 years ago

I finally found a solution to this that I thought I might share:

The trick is to keep checking until getty is running. This is because if getty starts after X11, it seems to grab the input devices leaving the machine locked.

A script like this called from rc.local should be enough to automatically startx from a user.

Code:
while true; do

  pkill -0 getty
  RESULT=$?

  if [ $RESULT = 0 ]; then
    break
  fi

  sleep 1

done

su -l kpedersen -c startx
Hope this helps.
Reply With Quote