[Nottingham] Log in to X11 at boot

Martin martin at ml1.co.uk
Sat May 24 15:50:52 UTC 2014

On 24/05/14 09:02, Mike Cardwell wrote:
> I purchased a small 2.8" touchscreen for one of my Raspberry Pi's. I
> wrote a small X11 app and then added the path to it to my "pi" users
> ~/.xinitrc. If I ssh in and run startx, the app begins and displays
> on screen. I can't figure out how to get this to happen automatically
> at boot though. I've tried adding it to /etc/rc.local, and as a
> "@reboot" cron job. I even replicated the act of ssh'ing and and
> running "startx" by setting up ssh keys and running "ssh localhost
> startx" to cron, to no avail.
> I'm sure I'm missing something fundemental about how this is
> supposed to work. Any ideas?

Mmmm... Never needed to do that!

You'll need to have some non-root user with the appropriate groups set
(video?) to run the startx... su "non-root" needed?

Or might you just need the access to the X11 display screen enabling to
allow other processes?

For whichever shell has run the startx, issue the command:

xhost +si:localuser:other_user_for_access

to allow "other_user_for_access" to do things to the display screen.

Take a look at what the various login display managers do?

And trying to use ssh is going to be awfully confusing for whether
things are getting X-forwarded back over ssh!...

Good luck?!

> Here's the touchscreen in case you're interested:
> https://www.adafruit.com/products/1601

Great fun but also...

Is that better than rooting a cheapie graphics pad for similarly swish
fun for similar price and effort?



- ------------------ - ----------------------------------------
-    Martin Lomas    - OpenPGP (GPG/PGP) Public Key: 0xCEE1D3B7
- martin @ ml1 co uk - Import from   hkp://subkeys.pgp.net   or
- ------------------ - http:// ml1 .co .uk/martin_ml1_co_uk.gpg

More information about the Nottingham mailing list