Programs unable to open display via sudo or pkexec (linssid not working) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: PinePhone (https://forum.pine64.org/forumdisplay.php?fid=120) +--- Forum: PinePhone Software (https://forum.pine64.org/forumdisplay.php?fid=121) +---- Forum: Mobian on PinePhone (https://forum.pine64.org/forumdisplay.php?fid=139) +---- Thread: Programs unable to open display via sudo or pkexec (linssid not working) (/showthread.php?tid=14469) |
Programs unable to open display via sudo or pkexec (linssid not working) - Zebulon Walton - 07-20-2021 Linssid would be a useful tool for wireless network survey (at least 2.4 GHz) but although it installs it aborts on an error when run, apparently a problem with connecting to the display. This then precipitates additional errors, however the inability to connect to the display seems to be the actual issue. (Linssid uses pkexec to run with root privileges.) This appears to be a generic problem running any program as root via pkexec or sudo , for example a similar error occurs running "pkexec nemo" or "sudo nemo". I'm really not very familiar with Wayland, is there a way around this? Code: Invalid MIT-MAGIC-COOKIE-1 keyqt.qpa.xcb: could not connect to display :0 RE: Programs unable to open display via sudo or pkexec (linssid not working) - nelstomlinson - 07-23-2021 Zeb, I ran into this last night with gedit. It seems to be a deliberate policy of Wayland. I found these two links: https://beamtic.com/sudo-and-guis https://www.reddit.com/r/Fedora/comments/5eb633/solution_running_graphical_app_with_sudo_in/ Instead of sudo gedit, I'm using sudoedit as a workaround to edit my sources.list file. RE: Programs unable to open display via sudo or pkexec (linssid not working) - nelstomlinson - 07-24-2021 Zeb, I found that sudo -EH gedit lets me open gedit as root. It is likely to work for most everything, I think. Found it here: https://unix.stackexchange.com/questions/422040/will-wayland-ever-support-graphical-sudo RE: Programs unable to open display via sudo or pkexec (linssid not working) - Zebulon Walton - 07-24-2021 (07-24-2021, 08:23 AM)nelstomlinson Wrote: Zeb, I found that sudo -EH gedit lets me open gedit as root. It is likely to work for most everything, I think. Interesting. It works with gedit, but unfortunately does not work for linssid - the latter is invoked with the executable "linssid-pkexec" so it seems that program invokes pkexec internally, which clobbers the environment variables saved by sudo -EH. There is no option I can find to change that behavior. RE: Programs unable to open display via sudo or pkexec (linssid not working) - vusra - 01-17-2022 Bleachbit as root has same problem. https://forum.pine64.org/showthread.php?tid=14733 Who has fix? |