Bug 1177875

Summary: Yast2 and dolpdhin -su not working
Product: [openSUSE] openSUSE Tumbleweed Reporter: Walther Pelser <w.pelser>
Component: KDE Workspace (Plasma)Assignee: E-Mail List <opensuse-kde-bugs>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: fabian, jreidinger, reiokorn, w.pelser
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Walther Pelser 2020-10-19 09:56:43 UTC
Since kde-update to 20.8.2 and reboot I have the following problem on TW with wayland-full:
If I try to open Yast with "/usr/bin/xdg-su -c /sbin/yast2" only the window for the root-entry comes up. Wenn the root-entry is filled in, nothing happens. Same with dolphin-su with "dbus-launch dolphin -qwindowtitle "%c" "%u""

This works for me (*=my name):
*@localhost:~> su 
Passwort: 
localhost:/home/* # yast2 

This works not for me (konsole su):
Passwort: 
localhost:~ # yast2
Here only the non-graphical yast is started.


*@localhost:~> dbus-launch dolphin -qwindowtitle "%c" "%u"
kdeinit5: Shutting down running client.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
kf.kio.slaves.tags: tag fetch failed: "Failed to open the database"
kf.kio.slaves.tags: "tags:/" list() invalid url
kf.kio.core: "Ordner tags:/ lässt sich nicht öffnen."
kf.kio.core: "Ordner tags:/ lässt sich nicht öffnen."

Dolphin-window opens with the notification "Die Datei oder der Ordner /home/*/%u existiert nicht."

localhost:~ # dbus-launch dolphin -qwindowtitle "%c" "%u"
qt.qpa.xcb: could not connect to display 
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
error: XDG_RUNTIME_DIR not set in the environment.
Failed to create wl_display (No such file or directory)
qt.qpa.plugin: Could not load the Qt platform plugin "wayland" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: wayland-org.kde.kwin.qpa, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

Aborted (core dumped)

Cannot open KSystemLog too. How can I get this core dump, when I cannot open files as a su?
Comment 1 Walther Pelser 2020-10-19 10:06:50 UTC
Additional: plasma was updated to 5.20.0 too
During last update kde-user-manager was completely deleted because there was no version available with version >= 5.20.0
Comment 2 Josef Reidinger 2020-10-19 10:31:18 UTC
Try to check env variables in that failed attempt. Probably DISPLAY is not set.
Comment 3 Walther Pelser 2020-10-19 10:56:14 UTC
(In reply to Josef Reidinger from comment #2)
> Try to check env variables in that failed attempt. Probably DISPLAY is not
> set.

Could you please give me a more specified advice, how I could test my system? How to check env variables, how to check whether DISPLAY is set or not? I did not change environmental things, as I beleve, only the update.
Comment 4 Josef Reidinger 2020-10-19 12:40:14 UTC
in this part of your test

> This works not for me (konsole su):
> Passwort: 
> localhost:~ # yast2
> Here only the non-graphical yast is started.

run command `env` and this will print all environment variables. So ideally please attach it.
Comment 5 Walther Pelser 2020-10-19 13:10:05 UTC
Passwort: 
localhost:~ # env
SHELL=/bin/bash
COLORTERM=1
SDK_HOME=/usr/lib64/jvm/java
XDG_CONFIG_DIRS=/etc/xdg
LESS=-M -I -R
JDK_HOME=/usr/lib64/jvm/java
MACHTYPE=x86_64-suse-linux
G_BROKEN_FILENAMES=1
HISTSIZE=1000
HOSTNAME=localhost
FROM_HEADER=
MINICOM=-c on
JAVA_ROOT=/usr/lib64/jvm/java
JAVA_HOME=/usr/lib64/jvm/java
VDPAU_DRIVER=va_gl
AUDIODRIVER=pulseaudio
JRE_HOME=/usr/lib64/jvm/java
CPU=x86_64
JAVA_BINDIR=/usr/lib64/jvm/java/bin
GPG_TTY=/dev/pts/2
PWD=/root
QEMU_AUDIO_DRV=pa
LOGNAME=root
MANPATH=/usr/share/man:/usr/local/man
LS_OPTIONS=-A -N --color=tty -T 0
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
XNLSPATH=/usr/share/X11/nls
HOME=/root
LANG=POSIX
LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg=01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.tga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;32:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.wma=00;32:*.wv=00;32:
PYTHONSTARTUP=/etc/pythonstart
OSTYPE=linux
LESS_ADVANCED_PREPROCESSOR=no
LESSCLOSE=lessclose.sh %s %s
TERM=xterm-256color
HOST=localhost
LESSOPEN=lessopen.sh %s
USER=root
SDL_AUDIODRIVER=pulse
MORE=-sl
CSHEDIT=emacs
SHLVL=1
WINDOWMANAGER=/usr/bin/startplasma-x11
PAGER=less
CVS_RSH=ssh
LC_CTYPE=de_DE.UTF-8
XDG_DATA_DIRS=/root/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu
PATH=/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/bin
PROFILEREAD=true
MAIL=/var/spool/mail/root
HOSTTYPE=x86_64
LESSKEY=/usr/etc/lesskey.bin
_=/usr/bin/env
localhost:~ #
Comment 6 Walther Pelser 2020-10-19 13:17:18 UTC
Zum Vergleich: (da kommt WINDOWID=1 vor)
*@localhost:~> env
SHELL=/bin/bash
SESSION_MANAGER=local/localhost:@/tmp/.ICE-unix/2693,unix/localhost:/tmp/.ICE-unix/2693
WINDOWID=1
COLORTERM=truecolor
SDK_HOME=/usr/lib64/jvm/java
XDG_CONFIG_DIRS=/etc/xdg
LESS=-M -I -R
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session3
JDK_HOME=/usr/lib64/jvm/java
MACHTYPE=x86_64-suse-linux
G_BROKEN_FILENAMES=1
HOSTNAME=localhost
HISTSIZE=1000
LANGUAGE=de:en_GB
FROM_HEADER=
MINICOM=-c on
JAVA_ROOT=/usr/lib64/jvm/java
JAVA_HOME=/usr/lib64/jvm/java
VDPAU_DRIVER=va_gl
AUDIODRIVER=pulseaudio
JRE_HOME=/usr/lib64/jvm/java
CPU=x86_64
SHELL_SESSION_ID=7678248da0824b8db54a780a6526a5dd
JAVA_BINDIR=/usr/lib64/jvm/java/bin
DESKTOP_SESSION=/usr/share/wayland-sessions/plasmafullwayland
GTK_RC_FILES=/etc/gtk/gtkrc:/home/*/.gtkrc:/home/*/.config/gtkrc
XCURSOR_SIZE=24
GPG_TTY=/dev/pts/3
XDG_SEAT=seat0
PWD=/home/walther
QEMU_AUDIO_DRV=pa
XDG_SESSION_DESKTOP=KDE
LOGNAME=walther
XDG_SESSION_TYPE=wayland
MANPATH=/usr/local/man:/usr/share/man
LS_OPTIONS=-N --color=tty -T 0
X11OPTIONS=terminate:ctrl_alt_bksp
XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/*/.gtkrc-2.0:/home/*/.config/gtkrc-2.0
XNLSPATH=/usr/share/X11/nls
HOME=/home/walther
LANG=de_DE.UTF-8
LS_COLORS=no=00:fi=00:di=01;34:ln=00;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=41;33;01:ex=00;32:*.cmd=00;32:*.exe=01;32:*.com=01;32:*.bat=01;32:*.btm=01;32:*.dll=01;32:*.tar=00;31:*.tbz=00;31:*.tgz=00;31:*.rpm=00;31:*.deb=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.lzma=00;31:*.zip=00;31:*.zoo=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.tb2=00;31:*.tz2=00;31:*.tbz2=00;31:*.xz=00;31:*.avi=01;35:*.bmp=01;35:*.dl=01;35:*.fli=01;35:*.gif=01;35:*.gl=01;35:*.jpg=01;35:*.jpeg=01;35:*.mkv=01;35:*.mng=01;35:*.mov=01;35:*.mp4=01;35:*.mpg=01;35:*.pcx=01;35:*.pbm=01;35:*.pgm=01;35:*.png=01;35:*.ppm=01;35:*.svg=01;35:*.tga=01;35:*.tif=01;35:*.webm=01;35:*.webp=01;35:*.wmv=01;35:*.xbm=01;35:*.xcf=01;35:*.xpm=01;35:*.aiff=00;32:*.ape=00;32:*.au=00;32:*.flac=00;32:*.m4a=00;32:*.mid=00;32:*.mp3=00;32:*.mpc=00;32:*.ogg=00;32:*.voc=00;32:*.wav=00;32:*.wma=00;32:*.wv=00;32:
XDG_CURRENT_DESKTOP=KDE
KONSOLE_DBUS_SERVICE=:1.205
PYTHONSTARTUP=/etc/pythonstart
WAYLAND_DISPLAY=wayland-0
KONSOLE_DBUS_SESSION=/Sessions/1
PROFILEHOME=
OSTYPE=linux
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
LESS_ADVANCED_PREPROCESSOR=no
KONSOLE_VERSION=200802
QT_QPA_PLATFORM=wayland
KDE_SESSION_UID=1000
LESSCLOSE=lessclose.sh %s %s
XDG_SESSION_CLASS=user
X11LAYOUT=de
TERM=xterm-256color
G_FILENAME_ENCODING=@locale,UTF-8,ISO-8859-15,CP1252
HOST=localhost
LESSOPEN=lessopen.sh %s
USER=walther
SDL_AUDIODRIVER=pulse
COLORFGBG=15;0
PLASMA_USE_QT_SCALING=1
KDE_SESSION_VERSION=5
MORE=-sl
QT_WAYLAND_FORCE_DPI=96
CSHEDIT=emacs
X11MODEL=pc105
DISPLAY=:1
SHLVL=1
WINDOWMANAGER=/usr/bin/startplasma-x11
PAGER=less
CVS_RSH=ssh
XDG_VTNR=2
XDG_SESSION_ID=4
XDG_RUNTIME_DIR=/run/user/1000
QT_AUTO_SCREEN_SCALE_FACTOR=0
XCURSOR_THEME=DMZ-White
XDG_DATA_DIRS=/home/walther/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
KDE_FULL_SESSION=true
GDK_BACKEND=wayland
CONFIG_SITE=/usr/share/site/x86_64-unknown-linux-gnu
X11VARIANT=nodeadkeys
PATH=/usr/local/bin:/usr/bin:/bin
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-xZHfyWGmsW,guid=a2a0a57114e439489ecb667f5f8d72e9
PROFILEREAD=true
KDE_APPLICATIONS_AS_SCOPE=1
MAIL=/var/spool/mail/walther
HOSTTYPE=x86_64
LESSKEY=/usr/etc/lesskey.bin
KONSOLE_DBUS_WINDOW=/Windows/1
_=/usr/bin/env
Comment 7 Josef Reidinger 2020-10-19 15:15:00 UTC
Yep, looks like bug in providing needed env variables. As in second case wailand display is exported:

WAYLAND_DISPLAY=wayland-0

So lets reassign to xdg-utils maintainer.
Comment 8 Walther Pelser 2020-10-19 16:31:48 UTC
There is still another problem connected to xdg-open:Some of
my desktop icons are not working anymore:
#!/usr/bin/env xdg-open
[Desktop Entry]
GenericName=Ordner
Icon=folder-important
Name=Änderungen_Anleitungen
Type=Link
URL=file:///home/walther/Änderungen_Anleitungen

They are not opened as files but as programms. And this fails.
Comment 9 Walther Pelser 2020-10-20 13:32:44 UTC
See Bug 1177858 - [Build 20201017] xdg-su / gnomesu no longer working
Identical?
Comment 10 Walther Pelser 2020-10-20 15:38:19 UTC
New openSUSE TW release 20201019-732.1 does not solve this problem. pam 1.4.0-3.1 can't solve this.
Comment 11 Simon Lees 2020-10-20 23:36:57 UTC
xdg-utils hasn't changed and under kde it just calls kdesu, so assigning to the kdesu maintainer.
Comment 12 Fabian Vogt 2020-10-21 06:24:55 UTC
A patch to kwin5 was refreshed, but appears to not work correctly anymore. XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to user/host-based access control, which kdesu doesn't handle. As a workaround, use "xhost +si:localuser:root".

I thought this would happens with KDE:Unstable (master) only, but apparently 5.20 is also affected.
Comment 13 Walther Pelser 2020-10-21 08:44:02 UTC
(In reply to Fabian Vogt from comment #12)
> A patch to kwin5 was refreshed, but appears to not work correctly anymore.
> XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to
> user/host-based access control, which kdesu doesn't handle. As a workaround,
> use "xhost +si:localuser:root".
> 
> I thought this would happens with KDE:Unstable (master) only, but apparently
> 5.20 is also affected.

Is the issue described in comment #8 also caused by kwin5 ?
Comment 14 Fabian Vogt 2020-10-21 09:06:47 UTC
(In reply to Walther Pelser from comment #13)
> (In reply to Fabian Vogt from comment #12)
> > A patch to kwin5 was refreshed, but appears to not work correctly anymore.
> > XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to
> > user/host-based access control, which kdesu doesn't handle. As a workaround,
> > use "xhost +si:localuser:root".
> > 
> > I thought this would happens with KDE:Unstable (master) only, but apparently
> > 5.20 is also affected.
> 
> Is the issue described in comment #8 also caused by kwin5 ?

No, that seems unrelated. Does it only happen with xdg-open or also when you click on the .desktop file? For such files the #! shouldn't be necessary.
Comment 15 Walther Pelser 2020-10-21 09:47:03 UTC
This is as an example rpm.desktop file:
#!/usr/bin/env xdg-open
[Desktop Entry]
GenericName=Ordner
Icon=folder-download
Name=rpm
Type=Link
URL=file:///home/walther/rpm

If I open it in /home/walther/local/share/plasma_icons, it is normally working. 

But as a symbol on my desktop-screen it refuses to become opened.
Error-message is "Startet das Programm: rpm ....."  "Wenn Sie diesem Programm..." choosing Button "Fortsetzen" fails wit this message: 
"rpm wird gestartet (Fehlgeschlagen) Die Desktop Datei /home/walther/.local/share/plasma_icons/rpm.desktop ist ungültig."
But this not the case, see above.
Url in the properties of the dasktop-icon is /home/walther/rpm.

Workaround is: to open a new folder on the dektop and add the contents manually.
This issue affects only folders on the desktop, all programs are started normally.

Should I open a new bug?
Comment 16 Walther Pelser 2020-10-21 09:53:33 UTC
There are *.desktop files with line #!/usr/bin/env xdg-open or without but it does not make any difference.
Comment 17 Walther Pelser 2020-10-22 07:06:46 UTC
(In reply to Fabian Vogt from comment #14)
> (In reply to Walther Pelser from comment #13)
> > (In reply to Fabian Vogt from comment #12)
> > > A patch to kwin5 was refreshed, but appears to not work correctly anymore.
> > > XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to
> > > user/host-based access control, which kdesu doesn't handle. As a workaround,
> > > use "xhost +si:localuser:root".
> > > 
> > > I thought this would happens with KDE:Unstable (master) only, but apparently
> > > 5.20 is also affected.
> > 
> > Is the issue described in comment #8 also caused by kwin5 ?
> 
> No, that seems unrelated. Does it only happen with xdg-open or also when you
> click on the .desktop file? For such files the #! shouldn't be necessary.

The comment #15 + #16 are also replies to comment #14
Another workaround for opening the folder icons on the desktop:
mouse right klick on the icon, choose "open with", choose "dolphin KF5". Than it works.
Comment 18 Walther Pelser 2020-10-22 11:42:31 UTC
(In reply to Fabian Vogt from comment #14)
> (In reply to Walther Pelser from comment #13)
> > (In reply to Fabian Vogt from comment #12)
> > > A patch to kwin5 was refreshed, but appears to not work correctly anymore.
> > > XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to
> > > user/host-based access control, which kdesu doesn't handle. As a workaround,
> > > use "xhost +si:localuser:root".
> > > 
> > > I thought this would happens with KDE:Unstable (master) only, but apparently
> > > 5.20 is also affected.
> > 
> > Is the issue described in comment #8 also caused by kwin5 ?
> 
> No, that seems unrelated. Does it only happen with xdg-open or also when you
> click on the .desktop file? For such files the #! shouldn't be necessary.

This is now a kde bug because it is a separate bug:
Bug 428100 - Regression: A symbol on the desktop pointing to a file tries always to open a program and fails
Comment 19 Josef Reidinger 2020-10-22 19:44:11 UTC
*** Bug 1178030 has been marked as a duplicate of this bug. ***
Comment 20 Walther Pelser 2020-10-24 11:11:40 UTC
Tested own build of kwin5-52.0.1-1.1 with new 0001-Use-Xauthority-for-Xwayland.patch. Issue is gone.
Comment 21 Walther Pelser 2020-10-28 15:12:43 UTC
(In reply to Fabian Vogt from comment #14)
> (In reply to Walther Pelser from comment #13)
> > (In reply to Fabian Vogt from comment #12)
> > > A patch to kwin5 was refreshed, but appears to not work correctly anymore.
> > > XAUTHORITY is set correctly, but the file is empty, so Xwayland reverts to
> > > user/host-based access control, which kdesu doesn't handle. As a workaround,
> > > use "xhost +si:localuser:root".
> > > 
> > > I thought this would happens with KDE:Unstable (master) only, but apparently
> > > 5.20 is also affected.
> > 
> > Is the issue described in comment #8 also caused by kwin5 ?
> 
> No, that seems unrelated. Does it only happen with xdg-open or also when you
> click on the .desktop file? For such files the #! shouldn't be necessary.

this bug is now kde_Bug 427797 - Icon widget with folder dragged in from Dolphin does not open on left click (right-click > open with works) 

 Nate Graham 2020-10-27 20:55:38 UTC

(In reply to Joseph DeGarmo from comment #16)
> Is it possible that it will be patched in the Plasma 5.20.3 release?
Assuming my merge request above is merged in the next two weeks, yes!