You are not logged in.
Pages: 1
Hi. I can't seem to run "sudo geany /path/to/a/file". It gives me a message
No protocol specified
Geany: cannot open display
Actually, I get a message to this effect with any command like "sudo launchsomeguiapp"
If I run (which I found in another thread)
xhost
xhost +localhost
then it works fine. I'm wondering where to put these commands so that they run automatically on startup (is this a bad idea? e.g. rc.sysinit ?), or if there is some other way to get sudo to launch guis.
Last edited by Pacopag (2011-06-27 16:14:53)
Offline
You shouldn't use sudo for graphical apps, not unless you want to risk messing up the permissions on your config files + .Xauthority file. Use gksu, gksudo, kdesudo, su -, etc. where possible.
Last edited by WorMzy (2011-06-21 20:06:38)
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
I've been using sudo for graphical apps since forever. And I've never needed the xhost trick (which I've read is not a good thing to do, but I don't know details). In fact, I just found out I don't even have xhost!
Offline
Try adding/uncommenting the following in your sudoers file.
Defaults env_keep += "XDG_SESSION_COOKIE XAUTHORITY"
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
Thanks for your replies. I installed gksu and gksudo works great.
Offline
Pages: 1