Posts: 1
Joined: Mon Feb 01, 2016 8:12 pm

Allow all users to control console and vt?

Tue May 02, 2017 7:05 pm

I have several RPi's that I've made into display controllers. They boot into a minimal X and run a browser as a non-root user for security. I initially built these on 2015-11-21-raspbian-jessie-lite and updated to work on 2016-03-18-raspbian-jessie-lite for the Pi 3. I have now tried both running an update to and a clean install of the current 2017-04-10-raspbian-jessie-lite and have found that things have broken somewhere. It doesn't appear that /etc/X11/Xwrapper.config is created by default anymore.

In my older builds I'd given all users access to run X on the console by modifying /etc/X11/Xwrapper.config to be "allowed_users=anybody". This allowed rc.local to run a script as my kiosk user and start X. On the current release this no longer works. At first I'd thought it was just a groups issue. However, adding the kiosk user to both video and tty didn't solve the issue, only changed what error I get.

Not in group tty:
May 2 13:57:00 localhost xinit[5525]: Fatal server error:
May 2 13:57:00 localhost xinit[5525]: (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)

In group tty:
May 2 13:59:26 localhost xinit[5968]: Fatal server error:
May 2 13:59:26 localhost xinit[5968]: (EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)

I took this as an opportunity to modify my rc.local part into a systemd unit, but the same error occurs. I tried adding the -keeptty flag based on another post I found but it hasn't helped either.

Code: Select all

Description = Kiosk Auto Browser

After = systemd-user-sessions.service network.target

User = kiosk
Group = kiosk
Type = simple

ExecStart = /usr/bin/xinit /home/kiosk/autokiosk -- -keeptty
Restart = on-abort
RestartSec = 5

WantedBy = multi-user.target
Any advice on how to allow a non-root user to access the virtual console(s) again?

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 20 guests