Thursday, August 20, 2015

Running Xorg From rc.local as common user

To start Xserver with no desktop manager at boot time and run as common user, simply put this line at /etc/rc.local
setsid sh -c 'su -c startx username <> /dev/tty1 >&0 2>&1' &

Replace the startx with your Xserver application such as startxfce, startlxde etc.

In my system i want to run the xterm on 1024x768 monitor with whole area active, no need mouse moved to active xterm area, says the geometri of xterm to cover whole area would be 170x59 character size, the command became:
setsid sh -c 'su -c "xinit -geometry 170x59" username <> /dev/tty1 >&0 2>&1' &


No comments:

Post a Comment