English
Ask Your Question
4

Why do I get an error launching Gedit with sudo in Fedora 25?

asked 2016-12-05 08:24:22 +0000

graceful gravatar image

updated 2016-12-18 23:48:55 +0000

mattdm gravatar image

Every time I launch gedit with sudo, I get the following error:

[xxxxxx@localhost ~]$ sudo gedit /etc/default/grub [sudo] password for xxxxxx: No protocol specified Unable to init server: Could not connect: Connection refused

(gedit:2412): Gtk-WARNING **: cannot open display: :0 [sophie@localhost ~]$ ud

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
3

answered 2016-12-05 18:22:42 +0000

Period22 gravatar image

updated 2016-12-18 23:51:06 +0000

mattdm gravatar image

Security features in wayland prevent running whole applications as root in this way. However, you can edit files with sudo-like privileges like in this example:

gedit admin:///etc/default/grub

which then asks for authentication.

edit flag offensive delete link more

Comments

leads to another question! Does WAYLAND (Display Server Protocol) not support legacy graphics inbuilt in older motherboards? My computer's hardware(Intel motherboard) details show 'unknown' against graphics heading.

behari72 ( 2016-12-27 13:58:27 +0000 )edit
3

answered 2016-12-05 09:38:59 +0000

geforce gravatar image

Another gnome wayland regression/feature

http://www.forums.fedoraforum.org/sho...

edit flag offensive delete link more
1

answered 2016-12-06 06:13:15 +0000

graceful gravatar image

Yup,

Apparently, the Wayland stupidity-policy er I mean security-policy won't allow any gui application to have root privileges. I did however find a work around by logging in as root first with 'su', then launching gedit. However, since I use other gui launched apps that need root privileges, such as grub-customizer and I need desktop icons as part of my workflow, I gave-up on Wayland and dropped back to X.

https://bugzilla.redhat.com/show_bug....

The above bug report suggested the following:

John Dulaney 2015-10-30 11:31:38 EDT

Policy decisions aside, if the decision to go with letting gui applications have root access is made, then I think that the fix should be made in libwayland itself, and not left up to the individual compositors. It seems that this would be something you would want to have across the board, no matter if you're running Gnome, Weston, or (like I am), a tiling compositor that isn't in Fedora (yet).


I think this is the sano fix since it solves the problem at a common bottleneck, instead of creating two problems that have to be solved seperately. BTW, I come from a Windows background. Good luck getting me to learn VIM or NANO.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Use your votes!

  • Use the 30 daily voting points that you get!
  • Up-vote well framed questions that provide enough information to enable people provide answers.
  • Thank your helpers by up-voting their comments and answers. If a question you asked has been answered, accept the best answer by clicking on the checkbox on the left side of the answer.
  • Down-voting might cost you karma, but you should consider doing so for incorrect or clearly detrimental questions and answers.

Question Tools

Follow
1 follower

Stats

Asked: 2016-12-05 08:24:22 +0000

Seen: 9,884 times

Last updated: Dec 18 '16