LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-02-2019, 03:32 AM   #1
sdowney717
Member
 
Registered: Sep 2015
Posts: 447

Rep: Reputation: Disabled
Can not load gparted without typing xhost + first.


Code:
scott@scott-MS-7596:~$ sudo gparted
[sudo] password for scott: 
Unit tmp.mount does not exist, proceeding anyway.
No protocol specified

(gpartedbin:4338): Gtk-WARNING **: 04:26:40.215: cannot open display: :0
scott@scott-MS-7596:~$ xhost +
access control disabled, clients can connect from any host
scott@scott-MS-7596:~$ sudo gparted
Unit tmp.mount does not exist, proceeding anyway.
======================
libparted : 3.2
======================
I just installed ubuntu 18.10 and now any program that is run as root user will say cant open display. So how can I fix this?
 
Old 01-02-2019, 04:36 AM   #2
berndbausch
LQ Guru
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 5,509

Rep: Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651Reputation: 1651
For example: https://askubuntu.com/questions/1756...-app-with-sudo

Many other search results.
 
Old 01-02-2019, 10:53 AM   #3
sdowney717
Member
 
Registered: Sep 2015
Posts: 447

Original Poster
Rep: Reputation: Disabled
I modified the file, but does it need a reboot to take effect cause it still wont open properly unless I use xhost +

I added this to that file using visudo
Defaults env_keep="XAUTHORITY"

AND WHY does Ubuntu ship this way? Is it deliberate? Or an error on their part.

https://bbs.archlinux.org/viewtopic.php?id=199880

Last edited by sdowney717; 01-02-2019 at 10:55 AM.
 
Old 01-02-2019, 11:16 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,359

Rep: Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041Reputation: 5041
this is not related to ubuntu at all. It is how the X server works. Only the user who logged in is allowed to use. Obviously it is you, as regular user and not the root user. If you wish to allow the "other" user to access the GUI you need to specify it (this is the variable DISPLAY) and also you need to authenticate it (XAUTHORITY).
 
Old 01-02-2019, 11:35 AM   #5
sdowney717
Member
 
Registered: Sep 2015
Posts: 447

Original Poster
Rep: Reputation: Disabled
I do many fresh installs of Ubuntu and mint continue to upgrade the os over many years and this has not happened before!
Obviously something changed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Master efficient typing with Ibus typing booster LXer Syndicated Linux News 0 03-03-2017 11:03 AM
typing software or website to practise typing. bscho Linux - Software 5 10-25-2013 04:51 PM
typing Faster Typing Tutor Maurice Arthur Ubuntu 3 12-14-2011 01:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration