You are not logged in.
Pages: 1
Topic closed
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
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
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
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
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
I also don't know what's going on but sudo pacman -S xorg-xhost solved that problem
You can activate that service with the command xhost + after every reboot everything is like before if you want to activate it permanetely you must add to any autostart config
byebye
Offline
I also don't know what's going on but sudo pacman -S xorg-xhost solved that problem
No, it only created more.
Don't do that. The proper approach here is sudoedit. Don't run GUI stuff as root.
Offline
Don't run GUI stuff as root.
Quoting for emphasis.
Also closing for necromancy.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed