You are not logged in.
Hello,
I have a fresh install of arch with the xfce4 desktop environment. I haven't done anything special yet, just install xfce4 and lightdm. However, there seems to be something wrong. For example, when I launch an app (like mousepad) from the terminal with the normal user, everything works fine, however, if I try to use `sudo` then, it fails giving me the following error:
Failed to initialize xfconf
and doesn't do anything else. When trying with another app like for example Thunar, I get the same error (and a few additional warnings) but it seems to go further at least and the app opens. Full error:
thunar: Failed to initialize Xfconf: Error spawning command line ?dbus-launch --autolaunch=53e0fc2a448442b5b806976d293562el --binary-syntax --close-stderr?: Child process exited with code 1
(thunar:614) thunar-WARNING **: 19:03:39.547: Name 'org.xfce.FileManager' lost on the message dbus.
(thunar:614) thunar-WARNING **: 19.03.39.547: Name 'org.freedesktop.FileManager1' lost on the messsage dbus.
ThunarThumbnailer: failed to create proxy: Error spawning command line "dbus-launch --autolaunch=53e0fc2a448442b5b806976d293562el --binary-syntax --close-stderr": Child process exited with code 1
And I'm worried because that might signal something is not configured correctly but I cannot seem to find what might be. I've tried doing the same on Manjaro since it's based on Arch as well and see if that's a common error but everything works fine there.
Any ideas? Thanks
Last edited by larsbs (2020-09-13 18:16:36)
Offline
Did you install and configure sudo?
Offline
You may want to look at https://bbs.archlinux.org/viewtopic.php … 28#p999328 or kdesu
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Did you install and configure sudo?
Yes I did and added the regular user to the wheel group.
You may want to look at https://bbs.archlinux.org/viewtopic.php … 28#p999328 or kdesu
I don't fully understand the relation of this with my issue. Could you please explain a bit more so I can better understand? Thanks
What surprises me is that only there doesn't seem to be a lot of info about it so that leads me to think it's a pretty rare issue. And something I've learned about pretty rare issues is that most of the time, they're your own fault.
Offline
The mousepad package already includes a polkit rule so you can use
pkexec mousepad /path/to/file
Or as a better alternative:
SUDO_EDITOR=mousepad sudoedit /path/to/file
Set $SUDO_EDITOR permanently for your desktop to just use sudoedit(8) for convenience.
For thunar install the gvfs package and use
thunar admin:///full/path/to/location
Jin, Jîyan, Azadî
Offline
In general, root cannot gain access to the X server session for the user. Running as sudo that has not been specifically configured won't work (the crux of zod's post)
Running with kdesu alleviates the problem by granting access to the X server session. The link I provided describes a different method in which you configure polkit to give root permissions to a program run as the user; which also has access to the X server.
kdesu is, in my view, the easiest solution
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Ok, so I'm getting that what's happening is the correct behavior, but then, I'm really curious about how Manjaro manages to do it(if I do the same on a Manjaro installation everything works fine). Do they somehow manage to give access to X to the root account by some configuration? Thanks to everyone for their help
Offline