[lxc-users] Problems with user sessions inside a Ubuntu Desktop Container

Guido Jäkel G.Jaekel at DNB.DE
Sat Jan 23 20:56:59 UTC 2016


Dear all,

i move forward a first step, now I get a user session if i log in via ssh. 

The issue was, that there was no systemd cgroup mounted. This is done by  /etc/init/systemd-logind.conf , but this (trusty) version, it is inhibited in a container. Because i have lxcfs running on the host, I disabled this ...


	pre-start script
	[...]
	    mkdir -p /run/systemd
	    # mounting the cgroup does not work in LXC, there it uses cgmanager
	#disabled    if [ ! -e /run/container_type ] && ! mountpoint -q /sys/fs/cgroup/systemd; then
	        mkdir -p /sys/fs/cgroup/systemd
	        mount -t cgroup -o nosuid,noexec,nodev,none,name=systemd systemd /sys/fs/cgroup/systemd
	#disabled    fi
	end script


... and now, i get at least a session on a ssh login:

	ubuntu at celly:~$ loginctl user-status ubuntu
	ubuntu (1000)
	           Since: Sat 2016-01-23 19:41:46 UTC; 50min ago
	           State: active
	        Sessions: c1
	          CGroup: systemd:/user/1000.user
	                  └─c1.session
	                    ├─2418 sshd: ubuntu [priv]
	                    ├─2462 sshd: ubuntu at pts/5
	                    ├─2463 -bash
	                    ├─4752 loginctl user-status ubuntu
	                    └─4753 pager


But it still don't work on a graphical login. Currently, i thing there is a problem with the "seat" ...

	ubuntu at celly:~$ loginctl show-seat seat0
	Id=seat0
	CanMultiSession=no
	CanTTY=yes
	CanGraphical=no
	IdleHint=yes
	IdleSinceHint=0
	IdleSinceHintMonotonic=0

..., if I compare to my other plain vanilla Ubuntu PC:

	gjaekel at jelly:~$ loginctl show-seat seat0
	Id=seat0
	ActiveSession=c2
	CanMultiSession=yes
	CanTTY=yes
	CanGraphical=yes
	Sessions=c6 c4 c2
	IdleHint=no
	IdleSinceHint=1453576925852281
	IdleSinceHintMonotonic=83639894809

There, the are a lot of devices listed (and three desktop sessions)

	gjaekel at jelly:~$ loginctl seat-status seat0
	seat0
	        Sessions: c6 c4 *c2
		         Devices:
	                  ├─/sys/devices/LNXSYSTM:00/LNXPWRBN:00/input/input1
	                  │ input:input1 "Power Button"
	                  ├─/sys/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input0
	                  │ input:input0 "Power Button"
	[...]

but in the Desktop container, there is nothing at all:

	ubuntu at celly:~$ loginctl seat-status seat0
	seat0
	         Devices:


Now I think, there's another "container check" preventing to populate this seat information. May some give me a hint what will do this job?


greetings

Guido




On 21.01.2016 09:50, Jäkel, Guido wrote:
>[...]
> Then, I was able to log in and Unity was starting. First things I want to do was to change some system settings via the GUI. We know, this is asking to authenticate; the same is needed to install software or "update the system" via the GUI. Now, the Dialogs working well, but then there is a dbus error displayed. Using  loginctl  at command line, it turns out that there is a seat, but no user session. It's the same if I log-in via ssh.
> 
> 	ubuntu at celly:~$ loginctl 
> 	   SESSION        UID USER             SEAT            
> 	
> 	0 sessions listed.
> 
> 
> 	ubuntu at celly:~$ loginctl list-seats
> 	SEAT            
> 	seat0           
> 
> 	1 seats listed.



More information about the lxc-users mailing list