Bug 1622259 - startx unsets DBUS_SESSION_BUS_ADDRESS
Summary: startx unsets DBUS_SESSION_BUS_ADDRESS
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11-xinit
Version: 39
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Dominik 'Rathann' Mierzejewski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: FutureFeature
Depends On: 1684926
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-24 23:10 UTC by Alexey Rochev
Modified: 2023-11-03 18:33 UTC (History)
20 users (show)

Fixed In Version: xorg-x11-xinit-1.4.2-1.fc39
Clone Of:
Environment:
Last Closed: 2023-11-03 18:33:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
freedesktop.org Gitlab xorg/app xinit issues 9 0 None closed Unseting session environment variables breaks user dbus instances 2023-10-08 15:58:33 UTC

Description Alexey Rochev 2018-08-24 23:10:36 UTC
Description of problem:
/usb/bin/startx unsets DBUS_SESSION_BUS_ADDRESS environment variable, which makes /etc/X11/xinit/xinitrc.d/00-start-message-bus.sh to launch a new DBus session, while systemd had already launched its own. It causes issues with user systemd units that use dbus (and probably other things).

Version-Release number of selected component (if applicable):
xorg-x11-xinit-0:1.3.4-18.fc28.x86_64

How reproducible: always


Steps to Reproduce:
1. Launch X via startx

Actual results:
There is now two DBus user sessions, and DBUS_SESSION_BUS_ADDRESS points to dbus-daemon launched by xinit, not systemd

Expected results:
xinit shouldn't launch another DBus session, and DBUS_SESSION_BUS_ADDRESS should point to daemon launched by systemd

Additional info:
https://gitlab.freedesktop.org/xorg/app/xinit/issues/9
https://bugs.archlinux.org/task/46369

Comment 1 Alexey Rochev 2018-09-05 18:49:04 UTC
Any news on this?

Comment 2 Alexey Rochev 2018-10-22 16:36:05 UTC
If anyone is reading this, I've made pull request for this: https://src.fedoraproject.org/rpms/xorg-x11-xinit/pull-request/1.

Comment 4 Alexey Rochev 2018-10-24 12:33:35 UTC
I'm not familiar with vncserver, but I don't think that it is the same bug. This is about a bug in /usr/bin/startx script, which is used to launch X locally, from tty (as opposed to using display manager like SDDM).

Comment 5 Jan Kratochvil 2018-10-24 15:00:51 UTC
I agree, sorry. I did hide now my Comment 3 to prevent confusion.  It is maybe not even a bug when thinking about it, just my unusual use case.

Comment 6 Hans de Goede 2019-08-18 12:51:58 UTC
I'm going over my backlog of things to respond to, even though this bug was created a over a year ago this seems worthwhile to respond too.

I've currently re-opened the discussion about this here:
https://gitlab.freedesktop.org/xorg/app/xinit/issues/9

Hopefully we can get some momentum on getting this fixed there.

Comment 7 Ben Cotton 2019-10-31 18:56:16 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 8 Dominik 'Rathann' Mierzejewski 2019-11-02 22:00:16 UTC
Still an issue in F31.

Comment 9 Ben Cotton 2020-11-03 15:01:55 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 31 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Dominik 'Rathann' Mierzejewski 2020-11-04 11:15:51 UTC
Still not fixed.

Comment 11 Ben Cotton 2021-02-09 15:06:39 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 12 Joan Bruguera 2022-03-23 18:33:46 UTC
Ugh, still a problem in Fedora 35, just realized I've been running with two DBus instances for months, that explains some things.

Since startx is a single shell script, you can hack around this issue without messing with the original package by creating a /usr/local/bin/startx script with the following contents:

    #!/usr/bin/env sh
    set -eu
    
    SX="$XDG_RUNTIME_DIR"/startx
    grep -v "unset DBUS_SESSION_BUS_ADDRESS" </usr/bin/startx >"$SX"
    chmod +x "$SX"
    exec "$SX" "$@"

PS: If audio is broken after fixing this, try running "startx -- -keeptty"

Comment 13 Ben Cotton 2022-05-12 16:46:41 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 14 Joan Bruguera 2022-06-06 20:17:17 UTC
Still reproduces in Fedora 36. Steps to reproduce:
* Download & install Fedora 36 i3 Spin (probably works with other versions too)
* Disable the lightdm service (`sudo systemctl stop lightdm`) and reboot the computer (`reboot`)
* Log into the tty and start X11 (`startx -- -keeptty`)
* Observe two DBus isntances are running (`ps aux | grep dbus`)

Comment 15 Ben Cotton 2022-06-08 01:11:15 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 is no longer maintained, which means that it
will not receive any further security or bug fix updates. As a result we
are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 16 aannoaanno 2022-06-12 10:06:38 UTC
Same problem here with fedora 36. See also https://github.com/containers/podman/issues/13429

A work-around seems to be:

export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus

where 1001 should be replaced by your user id.

Comment 17 aannoaanno 2022-06-19 09:23:46 UTC
Also see https://github.com/containers/podman/issues/10480

Comment 18 Ben Cotton 2023-04-25 16:38:45 UTC
This message is a reminder that Fedora Linux 36 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 36 on 2023-05-16.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '36'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 36 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 19 Dominik 'Rathann' Mierzejewski 2023-04-26 09:33:04 UTC
Still not fixed. I'll take care of this as time permits.

Comment 20 Fedora Release Engineering 2023-08-16 07:04:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.

Comment 21 Fedora Update System 2023-10-09 13:39:47 UTC
FEDORA-2023-222179004f has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-222179004f

Comment 22 Fedora Update System 2023-10-10 01:48:27 UTC
FEDORA-2023-222179004f has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-222179004f`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-222179004f

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 23 Fedora Update System 2023-11-03 18:33:07 UTC
FEDORA-2023-222179004f has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.