xrdp: Cannot open /dev/tty0 (Permission denied) - Debian 9.4
Hello!
I know this has been reported like thousand times but I really cannot wrap my head around it. I have compiled both xrdp and xorgxrdp from source on Debian stretch and it has been working well so far until suddenly it doesn’t anymore. I believe some update has broken it but I am not able to pinpoint which one.
xVNC backend still works, but xorg backend fails with the following everytime I start a session:
[ 19.449]
X.Org X Server 1.19.2
Release Date: 2017-03-02
[ 19.449] X Protocol Version 11, Revision 0
[ 19.449] Build Operating System: Linux 4.9.0-4-arm64 aarch64 Debian
[ 19.449] Current Operating System: Linux rock64 4.4.126-rockchip-ayufan-239 #1 SMP Sun May 27 18:38:24 UTC 2018 aarch64
[ 19.449] Kernel command line: rw root=LABEL=linux-root rootwait rootfstype=ext4 panic=10 init=/sbin/init coherent_pool=1M ethaddr=ea:36:e6:fe:e4:45 eth1addr=ea:36:e6:fe:e4:65 serial=412ad2801a30d12 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
[ 19.449] Build Date: 16 October 2017 08:11:43AM
[ 19.449] xorg-server 2:1.19.2-1+deb9u2 (https://www.debian.org/support)
[ 19.449] Current version of pixman: 0.34.0
[ 19.450] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 19.450] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 19.450] (++) Log file: ".xorgxrdp.10.log", Time: Thu Jun 28 11:27:28 2018
[ 19.457] (++) Using config file: "/etc/X11/xrdp/xorg.conf"
[ 19.457] (==) Using config directory: "/etc/X11/xorg.conf.d"
[ 19.457] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 19.458] (==) ServerLayout "X11 Server"
[ 19.458] (**) |-->Screen "Screen (xrdpdev)" (0)
[ 19.458] (**) | |-->Monitor "Monitor"
[ 19.458] (**) | |-->Device "Video Card (xrdpdev)"
[ 19.458] (**) | |-->GPUDevice "Rockchip Graphics"
[ 19.458] (**) | |-->GPUDevice "Video Card (xrdpdev)"
[ 19.458] (**) |-->Input Device "xrdpMouse"
[ 19.458] (**) |-->Input Device "xrdpKeyboard"
[ 19.458] (**) Option "DontVTSwitch" "on"
[ 19.458] (**) Option "AutoAddDevices" "off"
[ 19.458] (**) Not automatically adding devices
[ 19.458] (==) Automatically enabling devices
[ 19.458] (==) Automatically adding GPU devices
[ 19.458] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 19.459] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[ 19.459] Entry deleted from font path.
[ 19.459] (==) FontPath set to:
/usr/share/fonts/X11/misc,
/usr/share/fonts/X11/100dpi/:unscaled,
/usr/share/fonts/X11/75dpi/:unscaled,
/usr/share/fonts/X11/Type1,
/usr/share/fonts/X11/100dpi,
/usr/share/fonts/X11/75dpi,
built-ins
[ 19.459] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 19.459] (II) Loader magic: 0x558f93edc8
[ 19.459] (II) Module ABI versions:
[ 19.459] X.Org ANSI C Emulation: 0.4
[ 19.459] X.Org Video Driver: 23.0
[ 19.459] X.Org XInput driver : 24.1
[ 19.459] X.Org Server Extension : 10.0
[ 19.468] (II) systemd-logind: took control of session /org/freedesktop/login1/session/c1
[ 19.470] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 19.471] (EE) systemd-logind: failed to take device /dev/dri/card0: Operation not permitted
[ 19.471] (II) no primary bus or device found
[ 19.471] falling back to /sys/devices/platform/display-subsystem/drm/card0
[ 19.472] (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
[ 19.472] (II) LoadModule: "dbe"
[ 19.472] (II) Module "dbe" already built-in
[ 19.472] (II) LoadModule: "ddc"
[ 19.472] (II) Module "ddc" already built-in
[ 19.472] (II) LoadModule: "extmod"
[ 19.472] (II) Module "extmod" already built-in
[ 19.472] (II) LoadModule: "glx"
[ 19.472] (II) Loading /usr/lib/xorg/modules/extensions/libglx.so
[ 19.477] (II) Module glx: vendor="X.Org Foundation"
[ 19.477] compiled for 1.19.2, module version = 1.0.0
[ 19.477] ABI class: X.Org Server Extension, version 10.0
[ 19.477] (II) LoadModule: "int10"
[ 19.477] (II) Loading /usr/lib/xorg/modules/libint10.so
[ 19.486] (II) Module int10: vendor="X.Org Foundation"
[ 19.486] compiled for 1.19.2, module version = 1.0.0
[ 19.486] ABI class: X.Org Video Driver, version 23.0
[ 19.486] (II) LoadModule: "record"
[ 19.486] (II) Module "record" already built-in
[ 19.486] (II) LoadModule: "vbe"
[ 19.486] (II) Loading /usr/lib/xorg/modules/libvbe.so
[ 19.489] (II) Module vbe: vendor="X.Org Foundation"
[ 19.489] compiled for 1.19.2, module version = 1.1.0
[ 19.489] ABI class: X.Org Video Driver, version 23.0
[ 19.489] (II) LoadModule: "xorgxrdp"
[ 19.489] (II) Loading /usr/lib/xorg/modules/libxorgxrdp.so
[ 19.497] (II) Module XORGXRDP: vendor="X.Org Foundation"
[ 19.497] compiled for 1.19.2, module version = 0.2.7
[ 19.497] ABI class: X.Org Video Driver, version 23.0
[ 19.497] xorgxrdpSetup:
[ 19.497] (II) LoadModule: "fb"
[ 19.497] (II) Loading /usr/lib/xorg/modules/libfb.so
[ 19.505] (II) Module fb: vendor="X.Org Foundation"
[ 19.505] compiled for 1.19.2, module version = 1.0.0
[ 19.505] ABI class: X.Org ANSI C Emulation, version 0.4
[ 19.505] (II) LoadModule: "xrdpdev"
[ 19.505] (II) Loading /usr/lib/xorg/modules/drivers/xrdpdev_drv.so
[ 19.512] (II) Module XRDPDEV: vendor="X.Org Foundation"
[ 19.512] compiled for 1.19.2, module version = 0.2.7
[ 19.512] ABI class: X.Org Video Driver, version 23.0
[ 19.512] xrdpdevSetup:
[ 19.512] (II) LoadModule: "modesetting"
[ 19.512] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 19.512] (II) Module modesetting: vendor="X.Org Foundation"
[ 19.513] compiled for 1.19.2, module version = 1.19.2
[ 19.513] Module class: X.Org Video Driver
[ 19.513] ABI class: X.Org Video Driver, version 23.0
[ 19.513] (II) LoadModule: "xrdpmouse"
[ 19.513] (II) Loading /usr/lib/xorg/modules/input/xrdpmouse_drv.so
[ 19.515] (II) Module XRDPMOUSE: vendor="X.Org Foundation"
[ 19.515] compiled for 1.19.2, module version = 0.2.7
[ 19.515] Module class: X.Org XInput Driver
[ 19.515] ABI class: X.Org XInput driver, version 24.1
[ 19.515] rdpmousePlug:
[ 19.515] (II) LoadModule: "xrdpkeyb"
[ 19.515] (II) Loading /usr/lib/xorg/modules/input/xrdpkeyb_drv.so
[ 19.518] (II) Module XRDPKEYB: vendor="X.Org Foundation"
[ 19.518] compiled for 1.19.2, module version = 0.2.7
[ 19.518] Module class: X.Org XInput Driver
[ 19.518] ABI class: X.Org XInput driver, version 24.1
[ 19.518] rdpkeybPlug:
[ 19.518] rdpIdentify:
[ 19.518] (II) XRDPDEV: driver for xrdp: XRDPDEV
[ 19.518] rdpDriverFunc: op 10
[ 19.518] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 19.518] (EE)
Fatal server error:
[ 19.518] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)
[ 19.518] (EE)
[ 19.518] (EE)
Please consult the The X.Org Foundation support
Debian is 9.4 stretch xrdp is running on a Rock64 board.
I have modified /etc/X11/Xwrapper.config as well, but no change:
# Xwrapper.config (Debian X Window System server wrapper configuration file)
#
# This file was generated by the post-installation script of the
# xserver-xorg-legacy package using values from the debconf database.
#
# See the Xwrapper.config(5) manual page for more information.
#
# This file is automatically updated on upgrades of the xserver-xorg-legacy
# package *only* if it has not been modified since the last upgrade of that
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command as root:
# dpkg-reconfigure xserver-xorg-legacy
allowed_users = anybody
needs_root_rights = no
Any pointer would be super appreciated. I can provide any extra information needed. Thanks a lot! I really love xrdp and it was working very well until now 😦
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (5 by maintainers)
Fail! I forgot to install xorgxrdp!! 😢 At least on Ubuntu 18.04 I confirm it works out of the box by installing xrdp, xorgxrdp and doing “echo ‘mate-session’ ~/.xsession”
Thanks everyone! 😃
Installing xorgxrdp helped me too, I was able to log in with root. Thanks. Unfortunately normal user still not work. I also agree to open a different bug report now.
Trying xrdp on a new Linux Mint 19 install and the same problem:
[ 13149.834] (EE) parse_vt_settings: Cannot open /dev/tty0 (Permission denied)and to make matters worse:
$ ll /dev/tty0 crw–w---- 1 root tty 4, 0 Jul 4 11:52 /dev/tty0 $ sudo usermod -a -G tty xrdp $ groups xrdp xrdp : xrdp tty ~$ sudo chmod g+r /dev/tty0 $ ll /dev/tty0 crw-rw---- 1 root tty 4, 0 Jul 4 11:52 /dev/tty0
Take care of the server layout currently used:
It’s much better to call it with a layout dedicated to xrdp and not trying to use actual hardware 😃
/etc/xrdp/sesman.ini
The last two lines have to become mandatory. These days xorg includes crawler for config files having no stop directive 😉
/etc/X11/xrdp/xorg.conf
Just installed the xrdp package from the repo on a ubuntu bionic image. Exactly the same error.