On 05 May 2023 04:13, Max Nikulin wrote:
On 05/05/2023 02:07, zithro wrote:
2. using VNC or rdesktop, I then log on to X on the machine, do some stuff, then hit "log off" from the desktop menu. Immediately, ALL the previous SSH connections started in step 1 get closed, hence all the shells and the GUI apps (firefox, etc) !

Have you inspected journalctl output (as root) around the "log off" moment?

Will do, but it's such a PITA ...

A wild guess is that it might be force close of systemd user session, however it should not happen. Try to compare systemd-cgls (user .slice and .scope), "loginctl list-users", "loginctl list-sessions" on each step.

I'm a systemd noob, don't really know what you talking about ^^
But seems like the culprit.
Ran those commands (fucking auto pager though, way to break scrolling ... another fail)

So *before* logging in X via VNC :

# systemd-cgls --no-pager
Control group /:
-.slice
├─user.slice
│ ├─user-112.slice
│ │ ├─session-c2.scope
│ │ │ ├─14038 lightdm --session-child 16 19
│ │ │ └─14060 /usr/sbin/lightdm-gtk-greeter
│ │ └─user@112.service …
│ │   ├─app.slice
 [snipped unrelated]
│ │   │ ├─at-spi-dbus-bus.service
│ │   │ │ ├─14078 /usr/libexec/at-spi-bus-launcher
│ │ │ │ ├─14083 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-addr…
│ │   │ │ └─14102 /usr/libexec/at-spi2-registryd --use-gnome-session
│ │   │ └─dbus.service
│ │ │ └─14061 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-on…
│ │   └─init.scope
│ │     ├─14042 /lib/systemd/systemd --user
│ │     └─14043 (sd-pam)
│ ├─user-0.slice
│ │ ├─session-147.scope
│ │ │ ├─22477 sshd: root@pts/2
│ │ │ ├─22483 -bash
│ │ │ └─22725 systemd-cgls --no-pager
│ │ ├─session-148.scope
│ │ │ ├─22495 sshd: root@pts/3
│ │ │ ├─22501 -bash
│ │ │ └─22521 htop
│ │ ├─session-151.scope
│ │ │ ├─22645 sshd: root@pts/5
│ │ │ └─22651 -bash
│ │ ├─session-145.scope
│ │ │ ├─22440 sshd: root@pts/1
│ │ │ ├─22462 -bash
│ │ │ └─22634 journalctl --no-pager -b 0 --follow
│ │ └─user@0.service …
│ │   └─init.scope
│ │     ├─22443 /lib/systemd/systemd --user
│ │     └─22444 (sd-pam)
│ └─user-1000.slice
│   ├─user@1000.service …
│   │ ├─app.slice
│   │ │ ├─xdg-permission-store.service
│   │ │ │ └─14334 /usr/libexec/xdg-permission-store
│   │ │ ├─xdg-document-portal.service
│   │ │ │ ├─14331 /usr/libexec/xdg-document-portal
│ │ │ │ └─14339 fusermount -o rw,nosuid,nodev,fsname=portal,auto_unmount,subtype=portal -- /run/user/1000/doc
│   │ │ ├─pulseaudio.service
│   │ │ │ └─14031 /usr/bin/pulseaudio --daemonize=no --log-target=journal
│   │ │ ├─gvfs-daemon.service
│   │ │ │ └─14302 /usr/libexec/gvfsd
│   │ │ ├─at-spi-dbus-bus.service
│   │ │ │ └─14508 /usr/libexec/at-spi-bus-launcher
│   │ │ ├─pipewire.service
│   │ │ │ ├─752 /usr/bin/pipewire
│   │ │ │ └─756 /usr/bin/pipewire-media-session
│   │ │ └─dbus.service
│ │ │ └─13960 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-on…
│   │ └─init.scope
│   │   ├─711 /lib/systemd/systemd --user
│   │   └─724 (sd-pam)
│   ├─session-111.scope
│   │ ├─14107 sshd: zithro [priv]
│   │ ├─14113 sshd: zithro@notty
│   │ ├─14114 firejail firefox -p junk -no-remote
│   │ ├─14117 /usr/bin/xdg-dbus-proxy --fd=4 --args=5
│   │ ├─14119 firejail firefox -p junk -no-remote
│   │ ├─14128 firefox-esr -p junk -no-remote
 [snipped all threads]
│   ├─session-141.scope
│   │ ├─21925 sshd: zithro [priv]
│   │ ├─21931 sshd: zithro@pts/0
│   │ └─21932 ssh zithro@otherhost
│   ├─session-112.scope
│   │ ├─14239 sshd: zithro [priv]
│   │ ├─14246 sshd: zithro@notty
│   │ ├─14247 firejail thunderbird
│   │ ├─14250 firejail thunderbird
│   │ ├─14259 /usr/lib/thunderbird/thunderbird
│   └─session-149.scope
│     ├─22606 sshd: zithro [priv]
│     ├─22612 sshd: zithro@pts/4
│     └─22613 -bash
├─init.scope
│ └─1 /sbin/init
└─system.slice
  ├─dbus.service
│ └─471 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
 [snipped rest of slice]

# loginctl list-sessions
SESSION  UID USER    SEAT  TTY
    111 1000 zithro
    112 1000 zithro
    141 1000 zithro        pts/0
    145    0 root
    147    0 root
    148    0 root
    149 1000 zithro        pts/4
    151    0 root
     c2  112 lightdm seat0

9 sessions listed.

# loginctl list-users
 UID USER
   0 root
 112 lightdm
1000 zithro

3 users listed.


To keep this answer humanly readable, I will post the results of previous commands after GUI login and after GUI logoff in another answer ...


Perhaps it may be related to user D-Bus sessions, however I would expect that ssh GUI app has its own bus created by dbus-launch.

Dunno exactly how to report this. In the firefox firejail there's "xdg-dbus-proxy", but not in the thunderbird firejail.

# ps -eo pid,user,args,cgroup | grep -i dbus
    471 message+ /usr/bin/dbus-daemon --syst 0::/system.slice/dbus.service
13960 zithro /usr/bin/dbus-daemon --sess 0::/user.slice/user-1000.slice/user@1000.service/app.slice/dbus.service 14061 lightdm /usr/bin/dbus-daemon --sess 0::/user.slice/user-112.slice/user@112.service/app.slice/dbus.service 14078 lightdm /usr/libexec/at-spi-bus-lau 0::/user.slice/user-112.slice/user@112.service/app.slice/at-spi-dbus-bus.service 14083 lightdm /usr/bin/dbus-daemon --conf 0::/user.slice/user-112.slice/user@112.service/app.slice/at-spi-dbus-bus.service 14102 lightdm /usr/libexec/at-spi2-regist 0::/user.slice/user-112.slice/user@112.service/app.slice/at-spi-dbus-bus.service 14117 zithro /usr/bin/xdg-dbus-proxy --f 0::/user.slice/user-1000.slice/session-111.scope 14508 zithro /usr/libexec/at-spi-bus-lau 0::/user.slice/user-1000.slice/user@1000.service/app.slice/at-spi-dbus-bus.service


Does it happen for newly created user with no customization?


Never tried !

Thanks

Reply via email to