Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-11-09 11:55:06

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

`pkexec thunar %f` not working

Hello and welcome

samueru-sama wrote:

''thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY''

Are you running thunar as root? (sudo or su or from a terminal with elevated privileges)?

ps -ef | grep -i thunar

...or are thunar's config files owned by root? Look in ~/.config/Thunar.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#2 2022-11-10 02:39:21

samueru-sama
Member
Registered: 2022-11-09
Posts: 7

Re: `pkexec thunar %f` not working

ToZ wrote:

Hello and welcome

samueru-sama wrote:

''thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY''

Are you running thunar as root? (sudo or su or from a terminal with elevated privileges)?

ps -ef | grep -i thunar

...or are thunar's config files owned by root? Look in ~/.config/Thunar.

pkexec thunar %f command is used to start thunar as root. so no? thunar is not running as root when that command is launched? (Sorry I don't understand the question).

I can launch thunar as sudo on the terminal by typing sudo thunar, however the custom action using pkexec thunar %f is not working and gives the xconf error.

''ps -ef | grep -i thunar'' outputs this:

samuel      1020     940  0 22:22 ?        00:00:04 Thunar --daemon
samuel      1038    1014  0 22:22 ?        00:00:00 /usr/lib/xfce4/panel/wrapper-2.0 /usr/lib/xfce4/panel/plugins/libthunar-tpa.so 2 16777228 thunar-tpa Trash Applet Display the trash can
samuel      3308    2222  0 22:32 pts/0    00:00:00 grep --colour=auto -i thunar

There are two files in my home user .config thunar folder, their names are accels.scm and uca.xml. And yes the home user is the owner of those files

The root folder also has a thunar folder in .config with the same files.

Btw the context menu option not working is not my biggest problem, since I the option to launch terminal here works I can just open the terminal window in a folder and type sudo thunar, my main issue is the thunar-archive-plugin not working.

Last edited by samueru-sama (2022-11-10 02:43:06)

Offline

#3 2022-11-10 03:01:52

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: `pkexec thunar %f` not working

What's the output of?

pkaction --action-id org.xfce.thunar --verbose

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#4 2022-11-10 03:04:51

samueru-sama
Member
Registered: 2022-11-09
Posts: 7

Re: `pkexec thunar %f` not working

KBar wrote:

What's the output of?

pkaction --action-id org.xfce.thunar --verbose

org.xfce.thunar:
  description:       Run Thunar as root
  message:           Authentication is required to run Thunar as root.
  vendor:            Thunar
  vendor_url:        https://xfce.org/
  icon:              org.xfce.thunar
  implicit any:      no
  implicit inactive: auth_admin
  implicit active:   auth_admin
  annotation:        org.freedesktop.policykit.exec.path -> /usr/bin/thunar
  annotation:        org.freedesktop.policykit.exec.allow_gui -> true

Offline

#5 2022-11-10 03:19:44

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: `pkexec thunar %f` not working

Odd.

'thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY'

happens when the org.freedesktop.policykit.exec.allow_gui annotation of the program is set to be empty. Any nonempty value will force pkexec to retain $DISPLAY and $XAUTHORITY.

Are there some other installations of Thunar? What's the output of?

type -a thunar

Note: topic split.

Last edited by KBar (2022-11-10 03:22:48)


Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#6 2022-11-10 03:22:40

samueru-sama
Member
Registered: 2022-11-09
Posts: 7

Re: `pkexec thunar %f` not working

KBar wrote:

Odd.

'thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY'

happens when the org.freedesktop.policykit.exec.allow_gui annotation of the program is set to be empty. Any nonempty value will force pkexec to retain $DISPLAY and $XAUTHORITY.

Are there some other installations of Thunar? What's the output of?

type -a thunar

thunar is /usr/local/bin/thunar
thunar is /usr/bin/thunar
thunar is /bin/thunar

Offline

#7 2022-11-10 03:29:43

KBar
Member
Registered: 2021-11-05
Posts: 689

Re: `pkexec thunar %f` not working

That's where the problem is. When did you install it in /usr/local, where did you install it from? I'd suggest uninstalling the first one in the list. If the source directory is still around, do the following:

 cd /path/to/src
sudo make uninstall

Remember to edit the subject of your topic to include the [SOLVED] tag once you're satisfied with the answers or have found a solution (in which case, don't forget to share it as well), so that other members of the community can quickly refer to it and save their time. Pretty please! tongue

Offline

#8 2022-11-12 06:58:42

samueru-sama
Member
Registered: 2022-11-09
Posts: 7

Re: `pkexec thunar %f` not working

KBar wrote:

That's where the problem is. When did you install it in /usr/local, where did you install it from? I'd suggest uninstalling the first one in the list. If the source directory is still around, do the following:

 cd /path/to/src
sudo make uninstall

Well, here's an update, I ended having to reinstall the OS because of another issue that I really don't wanna talk about of how badly I messed up.

I don't have the issues with thunar anymore, and yes that likely was the problem, originally before installing thunar-devel I tried to compile the files from the oficial website but it didn't work, thunar still showed the older version, so I later enabled the aur to install thunar-devel. yeah most likely thunar was originally showing the older version because the compiled installed in that other location.

thank you for the help Kbar.

Last edited by samueru-sama (2022-11-12 06:59:14)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.014 seconds, 7 queries executed - Memory usage: 553.53 KiB (Peak: 570.38 KiB) ]