Skip to main content
Topic: pkexec command not working correctly (Read 846 times) previous topic - next topic
0 Members and 3 Guests are viewing this topic.

pkexec command not working correctly

For some reason, opening any application through pkexec and then typing in my password in the GTK prompt box thing and then hitting enter doesn't appear to open the application. If I try to launch the application from the terminal window by typing the name of the program, hitting enter, and then doing the same as before, I get an error message saying "Gtk-WARNING **: [current time]: cannot open display:". Note that there isn't anything following the colon in the message, so it may not be pointing to any display at all and then trying to do the opening. Jerry-rigging the launcher script for one of the programs that I open this way by adding "DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY" to the line that launches the application works for me, but it gets overwritten with each update to the package, so it's not a permanent fix. Not sure if it's an issue with XFCE or the fact that I swapped out the display manager from LightDM to LXDM (although that's more to do with the lock screen and switching the whole screen on and off, so idk why that issue would be there), or if it's something else.

How do I fix this?

Re: pkexec command not working correctly

Reply #1
... but it gets overwritten with each update to the package, so it's not a permanent fix.
It can very well be prevented:

https://wiki.archlinux.org/title/desktop_entries#Modify_desktop_files
"Wer alles kann, macht nichts richtig"

Artix USE="runit openrc slim openbox lxde gtk2 qt4 qt5 qt6 conky
-gtk3 -gtk4 -adwaita{cursors,themes,icons} -gnome3 -kde -plasma -wayland "

Re: pkexec command not working correctly

Reply #2

But that doesn't fix the underlying issue. The other application where I'm having it doesn't have a launcher script, and it seems like typing in just the application itself into the terminal automatically calls pkexec. That means doing that will only work for the first application. Does anyone have a real solution to this issue? I tried searching it online and people were having similar issues if not the same, but nothing I tried has yet worked so far.


Re: pkexec command not working correctly

Reply #4
What iso did you use to install Artix ?
I believe the January build of Artix/OpenRC/XFCE (where there was an issue with light-locker not fully unlocking the screen and with mugshot not being installed to change your local profile picture)

Re: pkexec command not working correctly

Reply #5
I believe the January build of Artix/OpenRC/XFCE (where there was an issue with light-locker not fully unlocking the screen and with mugshot not being installed to change your local profile picture)
Choose what you need from the Weekly ISO images.

Once artix-xfce-openrc-xxxxxxxx-x86_64.iso is installed:
Code: [Select]
sudo pacman -Rsu light-locker

Et si tu n'as pas besoin du Bluetoth :
Code: [Select]
sudo pacman -Rsu bluez

Re: pkexec command not working correctly

Reply #6
Choose what you need from the Weekly ISO images.

Once artix-xfce-openrc-xxxxxxxx-x86_64.iso is installed:
Code: [Select]
sudo pacman -Rsu light-locker

Et si tu n'as pas besoin du Bluetoth :
Code: [Select]
sudo pacman -Rsu bluez
I don't have light-locker anymore. I replaced it and LightDM with LXDM. Also, I don't want to re-install Artix again because I'd likely have to re-configure it and re-install the packages I had before manually, since Timeshift would likely just restore the thing causing the issue that I'm having, and I have full-disk LUKS encryption on my computer, which I haven't gotten Timeshift to restore things correctly with. Maybe I should change my desktop environment entirely, or would that make things worse?

Re: pkexec command not working correctly

Reply #7
Maybe I should change my desktop environment entirely, or would that make things worse?
Have you installed lxdm-openrc ?
My skills stop there.

I'm using sddm, connman and linux-lts kernel on Artix xfce openrc , but I don't use disk encryption (often problems come from there).

Maybe try sddm:
Code: [Select]
sudo  pacman -S sddm-openrc

Code: [Select]
sudo rc-update add sddm default

Code: [Select]
sudo pacman-Rsu lxdm