Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
startplasma-x11 doesn't launch dbus-launch [SOLVED]
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Wed Feb 08, 2023 4:18 pm    Post subject: startplasma-x11 doesn't launch dbus-launch [SOLVED] Reply with quote

Since I usually do multiple logins (using different users) on the same system, I always login a CLI instance.

If I need a GUI interface then I do:
Code:
XSESSION=startlxqt startx
or
Code:
XSESSION=startplasma-x11 startx

I just built a new system and
Code:
XSESSION=startplasma-x11 startx
fails to start 'dbus-launch' resulting in a black screen and the following message from Xorg.0.log:
Code:
(EE) dbus-core: error connecting to system bus: org.freedesktop.DBus.Error.FileNotFound
(Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory)

On the other hand,
Code:
XSESSION=startlxqt startx
works as expected. Inspection of /usr/bin/startlxqt reveals that it is a bash script and starts dbus-launch (if needed)
Code:
# Launch DBus if needed
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
    if [ -z "$XDG_RUNTIME_DIR" ] || ! [ -S "$XDG_RUNTIME_DIR/bus" ] || ! [ -O "$XDG_RUNTIME_DIR/bus" ]; then
        eval "$(dbus-launch --sh-syntax --exit-with-session)" || echo "startlxqt: error executing dbus-launch" >&2
    fi
fi
resulting in
Code:
root      2701  0.0  0.0   4400  2152 tty1     S    09:54   0:00 /usr/bin/dbus-launch --exit-with-session /usr/bin/startlxqt

In theory, I should be able to insert this code fragment into /usr/bin/startx or perhaps some related script such as xinitrc. However, I am not a DEV GOD or similar and have no confidence about doing so.

Two questions:
  • Is this a bug and should I report is as such? With plasma perhaps?
  • Could someone give guidance on how to add the start of dbus-launch to /usr/bin/startx? i.e. I don't know where the various environmental variables come from and whether they are populated at the execution of startx, etc.

I really am not interested in booting my computers in an initial GUI and that goes double for my headless computers. I make extensive use of X2go so I'd rather everything initially boot in CLI mode.

Portage 3.0.44 (python 3.10.9-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-12, glibc-2.36-r7, 6.1.9-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.1.9-gentoo-dist-x86_64-AMD_Ryzen_5_5600G_with_Radeon_Graphics-with-glibc2.36
KiB Mem: 32659036 total, 29582192 free
KiB Swap: 71303164 total, 71303164 free
Timestamp of repository gentoo: Mon, 06 Feb 2023 00:45:01 +0000
Head commit of repository gentoo: a2fdb5e136cfbb0bdd6a7bd101fdc72a216cd5e8
sh bash 5.2_p15-r1
ld GNU ld (Gentoo 2.40 p1) 2.40
app-misc/pax-utils: 1.3.7::gentoo
app-shells/bash: 5.2_p15-r1::gentoo
dev-lang/perl: 5.36.0-r2::gentoo
dev-lang/python: 3.10.9-r1::gentoo, 3.11.1-r1::gentoo
dev-lang/rust-bin: 1.67.0::gentoo
dev-util/cmake: 3.25.2::gentoo
dev-util/meson: 1.0.0::gentoo
sys-apps/baselayout: 2.13-r1::gentoo
sys-apps/openrc: 0.46::gentoo
sys-apps/sandbox: 2.30-r1::gentoo
sys-devel/autoconf: 2.71-r5::gentoo
sys-devel/automake: 1.16.5::gentoo
sys-devel/binutils: 2.40::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang: 15.0.7-r1::gentoo
sys-devel/gcc: 12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config: 2.10::gentoo
sys-devel/libtool: 2.4.7-r1::gentoo
sys-devel/llvm: 15.0.7::gentoo
sys-devel/make: 4.4::gentoo
sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers)
sys-libs/glibc: 2.36-r7::gentoo
Repositories:

gentoo
location: /var/db/repos/gentoo
sync-type: rsync
sync-uri: rsync://rsync.gentoo.org/gentoo-portage
priority: -1000
volatile: True
sync-rsync-extra-opts: --timeout=15
sync-rsync-verify-max-age: 24
sync-rsync-verify-metamanifest: yes
sync-rsync-verify-jobs: 1

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA dlj-1.1 PUEL AdobeFlash-10.3 AdobeFlash-11.x Oracle-BCLA-JavaSE google-chrome"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--quiet-build --with-bdeps=y --keep-going"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
MAKEOPTS="-j10"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=15"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aalib acl acpi activities alsa amd64 bluetooth branding bzip2 cairo cdda cdr cjk cli crypt cups curl dbus declarative dri drm dts dvd dvdr elogind encode exif extra ffmpeg flac fontconfig fortran fuse gd gdbm gif gimp gles2 gpm gstreamer gtk gui iconv icu inotify ipv6 jpeg kde kerberos kwallet lcms libglvnd libnotify libtirpc mad mng mp3 mp4 mpeg multilib ncurses nls nptl ntfs ogg opengl openmp pam pango pcre pdf perl plasma png policykit postscript ppds pulseaudio python qml qt5 raw readline ruby samba sasl sdl seccomp semantic-desktop sound spell split-usr ssl startup-notification svg syslog test-rust theora tiff truetype udev udisks unicode upower usb vdpau vorbis wayland widgets wxwidgets x264 xattr xcb xft xinerama xml xv xvid zeroconf zip zlib" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" RUBY_TARGETS="ruby30 ruby31" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
_________________
People whom think M$ is mediocre, don't know the half of it.


Last edited by dufeu on Wed Feb 08, 2023 6:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ionen
Developer
Developer


Joined: 06 Dec 2018
Posts: 2727

PostPosted: Wed Feb 08, 2023 4:24 pm    Post subject: Reply with quote

Seems to be looking for system dbus, not user session's dbus. Aka what openrc/systemd would start at boot (/run/dbus/system_bus_socket is typically owned by root, users can't create this), check if enabled? With e.g. openrc, when using display-manager-init (for sddm, xdm and friends), it would normally get auto-started but you need to explicitly enable it if using startx.

Not everything needs this, so lxqt may just happen to be fine without it.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Wed Feb 08, 2023 4:33 pm    Post subject: Reply with quote

I missed the difference between system and user. However 'ls' reports:
Code:
# ls -l /run/dbus
total 0
srwxrwxrwx 1 root root 0 Feb  8 09:53 system_bus_socket

so the file exists and, if I'm reading the permissions correctly, everyone should be able to access it. I guess I'm missing something else.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
dufeu
l33t
l33t


Joined: 30 Aug 2002
Posts: 924
Location: US-FL-EST

PostPosted: Wed Feb 08, 2023 6:07 pm    Post subject: Reply with quote

Closing this because I completely misunderstood the true nature of the problem/made progress and now consider this thread to be a potential red herring. 'dbus-launch' now starts properly for both users and root.

The new problem is that 'startplasma-x11' always ends up with a non-responsive black screen. I've tracked this down to 'kde-plasma/plasma-meta' not being part of the initial install.
_________________
People whom think M$ is mediocre, don't know the half of it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum