I installed KDE in my “Manjaro” install (more on that later) and it runs mostly ok, except it never asks for password and any application or process that requires root access will fail: Timeshift just blinks on screen and Pamac runs ok until you try to apply updates and changes to packages.
Command line sudo and other commands that ask for password themselves like trizen or chsh work normally.
The problem seemingly stems either from me failing to install/configure KDE correctly or from the fact this “Manjaro” install is an Arch Linux running on WSL transformed into Manjaro. Please, don’t shoot me.
I installed and configured Xvnc over Xrdp to a seemingly working condition and I can access the DE from Windows itself through RDP. Again, it seems to work nicely if not by the auth issue on the desktop environment.
I tried to launch timeshif-launcher from command-line and got the below output as response. I’m still trying to figure this, but I guess it failed to authorize because it doesn’t have a session?
dandrea > ~ $ timeshift-launcher
/sbin/timeshift-launcher: line 15: [: =: unary operator expected
==== AUTHENTICATING FOR org.freedesktop.policykit.exec ====
Authentication is needed to run `/sbin/env' as the super user
Authenticating as: root
Password:
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ====
Error executing command as another user: Not authorized
This incident has been reported.
That means (probably due to your Arch conversion) you dont have the multilib repos enabled.
I dont know if it matters for whats happening here, but its a noted difference.
I have here bash in use. You have zsh. Maybe here is something missed in zsh configuration?
See in code:
#!/bin/bash
app_command='timeshift-gtk'
if [ `id -u` -eq 0 ]; then
#user is admin
${app_command}
else
#user is not admin
if `echo $- | grep "i" >/dev/null 2>&1`; then
#script is running in interactive mode
su - -c "${app_command}"
else
#script is running in non-interactive mode
if [ $XDG_SESSION_TYPE = "wayland" ] ; then
xhost +SI:localuser:root
pkexec ${app_command}
xhost -SI:localuser:root
xhost
elif command -v pkexec >/dev/null 2>&1; then
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY ${app_command}
elif command -v sudo >/dev/null 2>&1; then
x-terminal-emulator -e "sudo ${app_command}"
elif command -v su >/dev/null 2>&1; then
x-terminal-emulator -e "su - -c '${app_command}'"
else
x-terminal-emulator -e "echo 'Command must be run as root user: ${app_command}'"
fi
fi
fi
One more. Check environment variables if all is FINE.