You are not logged in.
Hi, I'm currently experimenting with the new xorg-server 1.16 with which it is possible to start and run the X server as a user.
Setup: No display manager running. startx is used. No modifications of global xserverrc or other files.
~/.xinitrc looks like this for all users:
startxfce4
As root it is possible to start multiple X sessions (on different virtual terminals of course).
But as a user only one X session is possible.
After user flo has started a X session on tty1, the following occurs:
Permissions for tty2 before startx
crw------- 1 boolian tty 4, 2 24. Jul 10:24 /dev/tty2
If I try to start a second X session via startx on another virtual terminal (here: tty2), the process aborts with the following message:
X.Org X Server 1.16.0
Release Date: 2014-07-16
X Protocol Version 11, Revision 0
Build Operating System: Linux 3.15.1-1-ARCH x86_64
Current Operating System: Linux flo.tower 3.15.6-1-ARCH #1 SMP PREEMPT Fri Jul 18 07:06:42 CEST 2014 x86_64
Kernel command line: BOOT_IMAGE=../vmlinuz-linux root=/dev/sda1 rw initrd=../initramfs-linux.img
Build Date: 18 July 2014 07:12:40PM
Current version of pixman: 0.32.6
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/boolian/.local/share/xorg/Xorg.1.log", Time: Thu Jul 24 10:24:21 2014
(==) Using config directory: "/etc/X11/xorg.conf.d"
(EE)
Fatal server error:
(EE) xf86OpenConsole: Cannot open virtual console 2 (Permission denied)
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE) Please also check the log file at "/home/boolian/.local/share/xorg/Xorg.1.log" for additional information.
(EE)
(EE) Server terminated with error (1). Closing log file.
xinit: giving up
xinit: unable to connect to X server: Connection refused
xinit: server error
After this unsuccessful call to startx, the permissions for the tty2 have changed, but only the owner not the rwx flags.
crw------- 1 root tty 4, 2 24. Jul 10:24 /dev/tty2
Interestingly the permissions for the tty with the running X server stay as expected all the time.
crw------- 1 flo tty 4, 1 24. Jul 10:37 /dev/tty1
My first guess was, that the suid bit of Xorg.wrap has something to do with it. But I moved the binary and the behavior stayed the same.
Another guess is, that systemd-logind has something to do with it as it is repsonsible for the permissions (see [0] and [1]).
Can anybody reproduce this behaviour?
Has anybody hints where to go next? I'm currently building a new kernel with the audit framework enabled to check which process changes the permission of the tty when startx is called.
I'm reluctant to open a bug report as I know too little about the problem or whether it is a bug at all.
Greetings.
[0]http://dvdhrm.wordpress.com/2013/08/24/ … -on-linux/
[1]http://dvdhrm.wordpress.com/2013/08/24/ … ing-works/
Offline
I've already reported it https://bbs.archlinux.org/viewtopic.php … 4#p1439144
Offline
I have captured all systemcalls which go to /dev/tty2 (which is dev with major 4 and minor 2) with the following auditctl line:
-a always,exit -F arch=x86_64 -S all -F devmajor=4 -F devminor=2 -F key=vt2222
This is the result:
[root@flo rules.d]# ausearch -i -k vt2222
----
type=CONFIG_CHANGE msg=audit(24.07.2014 13:19:49.400:83) : auid=flo ses=1 op="add rule" key=vt2222 list=exit res=yes
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:84) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:84) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,620 ouid=root ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:53.749:84) : cwd=/
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:84) : arch=x86_64 syscall=stat success=yes exit=0 a0=0x6665a0 a1=0x7fffea504e50 a2=0x7fffea504e50 a3=0x666590 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:85) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:85) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,620 ouid=root ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:53.749:85) : cwd=/
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:85) : arch=x86_64 syscall=lstat success=yes exit=0 a0=0x6665a0 a1=0x7fffea5050c0 a2=0x7fffea5050c0 a3=0x7fffea504d00 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:86) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:86) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,620 ouid=root ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:53.749:86) : cwd=/
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:86) : arch=x86_64 syscall=access success=yes exit=0 a0=0x6665a0 a1=W_OK|R_OK a2=0x7fffea5050c0 a3=0x7fffea504d00 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:87) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:87) : item=0 name=(null) inode=24 dev=00:05 mode=character,620 ouid=root ogid=tty rdev=04:02 nametype=NORMAL
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:87) : arch=x86_64 syscall=fchown success=yes exit=0 a0=0x0 a1=0x0 a2=0x0 a3=0x7fffea504d00 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:88) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:88) : item=0 name=(null) inode=24 dev=00:05 mode=character,620 ouid=root ogid=root rdev=04:02 nametype=NORMAL
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:88) : arch=x86_64 syscall=fchmod success=yes exit=0 a0=0x0 a1=0600 a2=0x0 a3=0x7fffea504d00 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:53.749:89) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:53.749:89) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,600 ouid=root ogid=root rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:53.749:89) : cwd=/
type=SYSCALL msg=audit(24.07.2014 13:19:53.749:89) : arch=x86_64 syscall=open success=yes exit=0 a0=0x6665a0 a1=O_RDWR|O_NONBLOCK a2=0x7f7a7bb9edf0 a3=0x7fffea504ce0 items=1 ppid=1 pid=5903 auid=unset uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=root fsgid=root tty=tty2 ses=unset comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:54.409:91) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:54.409:91) : item=0 name=(null) inode=24 dev=00:05 mode=character,600 ouid=root ogid=root rdev=04:02 nametype=NORMAL
type=SYSCALL msg=audit(24.07.2014 13:19:54.409:91) : arch=x86_64 syscall=fchown success=yes exit=0 a0=0x0 a1=0x3e8 a2=0x5 a3=0x683ce7 items=1 ppid=1 pid=5903 auid=flo uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=users fsgid=root tty=tty2 ses=15 comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:54.409:92) : proctitle=/sbin/agetty
type=PATH msg=audit(24.07.2014 13:19:54.409:92) : item=0 name=(null) inode=24 dev=00:05 mode=character,600 ouid=flo ogid=tty rdev=04:02 nametype=NORMAL
type=SYSCALL msg=audit(24.07.2014 13:19:54.409:92) : arch=x86_64 syscall=fchmod success=yes exit=0 a0=0x0 a1=0600 a2=0x5 a3=0x683ce7 items=1 ppid=1 pid=5903 auid=flo uid=root gid=root euid=root suid=root fsuid=root egid=root sgid=users fsgid=root tty=tty2 ses=15 comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:54.413:93) : proctitle=login -- flo
type=PATH msg=audit(24.07.2014 13:19:54.413:93) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,600 ouid=flo ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:54.413:93) : cwd=/
type=SYSCALL msg=audit(24.07.2014 13:19:54.413:93) : arch=x86_64 syscall=open success=yes exit=3 a0=0x6665a0 a1=O_RDWR|O_NONBLOCK a2=0x0 a3=0x7fffea504d00 items=1 ppid=5903 pid=5914 auid=flo uid=root gid=users euid=root suid=root fsuid=root egid=users sgid=users fsgid=users tty=tty2 ses=15 comm=login exe=/usr/bin/login key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:19:54.416:94) : proctitle=/usr/bin/tty
type=PATH msg=audit(24.07.2014 13:19:54.416:94) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,600 ouid=flo ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:19:54.416:94) : cwd=/home/flo
type=SYSCALL msg=audit(24.07.2014 13:19:54.416:94) : arch=x86_64 syscall=stat success=yes exit=0 a0=0x10d4060 a1=0x7fff388a7470 a2=0x7fff388a7470 a3=0x10d4050 items=1 ppid=5915 pid=5916 auid=flo uid=flo gid=users euid=flo suid=flo fsuid=flo egid=users sgid=users fsgid=users tty=tty2 ses=15 comm=tty exe=/usr/bin/tty key=vt2222
----
type=PROCTITLE msg=audit(24.07.2014 13:20:38.319:95) : proctitle=/usr/bin/Xorg.bin
type=PATH msg=audit(24.07.2014 13:20:38.319:95) : item=0 name=/dev/tty2 inode=24 dev=00:05 mode=character,600 ouid=root ogid=tty rdev=04:02 nametype=NORMAL
type=CWD msg=audit(24.07.2014 13:20:38.319:95) : cwd=/home/flo
type=SYSCALL msg=audit(24.07.2014 13:20:38.319:95) : arch=x86_64 syscall=open success=no exit=-13(Permission denied) a0=0x82715c a1=O_RDWR|O_NONBLOCK a2=0x0 a3=0x0 items=1 ppid=5937 pid=5938 auid=flo uid=flo gid=users euid=flo suid=flo fsuid=flo egid=users sgid=users fsgid=users tty=tty2 ses=15 comm=Xorg.bin exe=/usr/bin/Xorg.bin key=vt2222
Look at the last block in PATH and the block before the last. The ouid changes (owner of file) but there is no process which does this.
Am I deciphering this right?
Greetings
Offline
My ~/.local/share/xorg/Xorg.0.log says
...
[ 299.732] (++) using VT number 1
[ 299.732] (--) controlling tty is VT number 1, auto-enabling KeepTty
[ 299.732] xf86EnableIOPorts: failed to set IOPL for I/O (Operation not permitted)
...
I don't see this in the log with xorg 1.15.
Is it something of importance?
Offline
What is the problem with xorg-server 1.16 I can not login with Gnome but if I can do it with lxde and when I downgrade to 1.15 if I loguearme with Gnome.
The truth I'm not sure if I'm the only one with this problem, but I see no solution anywhere.
Offline
kabbalah,
Please stop spamming every thread on Xorg 1.16 with that same post. See our policy. Your issue is not in line with the discussion on any of the three threads.
If you've a specific question, start a thread and ask it.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Ok, I'm sorry
Offline