twin icon indicating copy to clipboard operation
twin copied to clipboard

Feature: twdm, Add dbus support?

Open mikedebian opened this issue 8 years ago • 8 comments

If I don't use getty at the TTY, but twdm and I login to startx, I get dbus errors. Steam complains about dbus errors, and systemctl is unable to load user entries.

If I start X from getty, no problems arise. I don't know what causes this or if you are aware of this. I will give any info that is needed.

journalctl

juli 18 18:19:29 blackbox org.gtk.vfs.Daemon[12557]: A connection to the bus can't be made
juli 18 20:52:06 blackbox gvfsd[12497]: A connection to the bus can't be made
juli 18 22:34:06 blackbox org.gtk.vfs.Daemon[18435]: A connection to the bus can't be made

Steam spams with

Failed to connect to bus: No such file or directory

mikedebian avatar Jul 18 '17 22:07 mikedebian

You are trying to use Steam in an unsupported way. This really isnt a twin issue.

Mirppc avatar Jul 18 '17 22:07 Mirppc

I have launched X from the Twin Display Manager into an Openbox graphical session. I do not understand your comment. It is about X and applications not being able to connect to dbus if started from twin. Steam was just one of the examples. See the other examples. There are hundreds of use cases where applications are not able to connect to dbus if X is started from TWDM.

mikedebian avatar Jul 18 '17 22:07 mikedebian

I am definitely not an expert of dbus, and I do not know which process is in charge of starting dbus at login. Any pointer for dbus documentation related to dbus initialization at login? Thanks :)

cosmos72 avatar Jul 19 '17 10:07 cosmos72

systemd is in charge of dbus on opensuse.

systemctl status dbus.service

    ● dbus.service - D-Bus System Message Bus
       Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
       Active: active (running) since Tue 2017-07-18 22:34:49 CEST; 1h 24min ago
         Docs: man:dbus-daemon(1)
     Main PID: 1180 (dbus-daemon)
        Tasks: 1 (limit: 4915)
       CGroup: /system.slice/dbus.service
               └─1180 //usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation

    juli 18 22:35:50 blackbox dbus[1180]: [system] Activating via systemd: service name='org.freedesktop.RealtimeKit1' unit='rtkit-daemon.service'
    juli 18 22:35:50 blackbox dbus[1180]: [system] Successfully activated service 'org.freedesktop.RealtimeKit1'
    juli 18 22:35:50 blackbox dbus[1180]: [system] Activating via systemd: service name='org.bluez' unit='dbus-org.bluez.service'
    juli 18 22:35:53 blackbox dbus[1180]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
    juli 18 22:35:53 blackbox dbus[1180]: [system] Successfully activated service 'org.freedesktop.hostname1'
    juli 18 22:36:15 blackbox dbus[1180]: [system] Failed to activate service 'org.bluez': timed out
    juli 18 22:39:35 blackbox dbus[1180]: [system] Activating service name='org.opensuse.Snapper' (using servicehelper)
    juli 18 22:39:35 blackbox dbus[1180]: [system] Successfully activated service 'org.opensuse.Snapper'
    juli 18 22:51:14 blackbox dbus[1180]: [system] Activating via systemd: service name='org.freedesktop.UPower' unit='upower.service'
    juli 18 22:51:14 blackbox dbus[1180]: [system] Successfully activated service 'org.freedesktop.UPower'

It may seem that XDG_RUNTIME_DIR (among others, but I read this is important for dbus) is not set when running twdm.

agetty > X

 env | grep XDG

    XDG_CONFIG_DIRS=/etc/xdg
    XDG_DATA_DIRS=/usr/share
    XDG_RUNTIME_DIR=/run/user/1000
    XDG_SEAT=seat0
    XDG_SESSION_ID=1
    XDG_VTNR=2

Under TWDM > X

 env | grep XDG
 
    XDG_CONFIG_DIRS=/etc/xdg
    XDG_DATA_DIRS=/usr/share

mikedebian avatar Jul 19 '17 10:07 mikedebian

Say also for example if I log in to TWDM and it starts a TWIN-TERMINAL. It goes to my ~ directory automatically (/home/username).

It does not read from .bashrc, and I don't know if it's supposed to do that or not, however if I am in my directory and type "source .bashrc", it will complain that the file is not found, even though it is there, so I need to type the entire path, like so : "source /home/username/.bashrc". It then reads it and loads it. I guess this is relevant to XDG directories in TWDM?

mikedebian avatar Jul 19 '17 16:07 mikedebian

Thanks for reporting these issues. Yes, TWDM does not setup perfectly the login environment. I will work on that.

cosmos72 avatar Jul 20 '17 12:07 cosmos72

Thank you very much :) I'm looking forward for the results!

mikedebian avatar Jul 23 '17 19:07 mikedebian

Whatever you do, though, please try to make these dependencies optional for users as a whole of linux, even more so though, especially, BSD users.

This project looks interesting, btw, it would be even more interesting if there was an ultra secure, lightweight, few dependencies required, minimalistic alternative to wayland and x11 for both BSD and gnu/linux distros as a whole. I don't know if you consider the gnu/linux ideal needed to be said or not, but I prefer to not offend people if I can help it...

;)

FrostKnight avatar Aug 06 '22 02:08 FrostKnight