LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-01-2012, 08:57 AM   #1
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Rep: Reputation: 18
gparted failing to start in Wheezy (KDE)


Please note that gparted's failure to start in Debian Testing has been reported as a bug. The assigned number is: 671497. I will cooperate with the developer(s) to find a solution. Afterall this is the spirit of using Testing.


Original Text:
After several attempts gparted is repeatedly failing to start in KDE. I am sure I am typing the root password correctly. I forced a reinstall of gparted but it didn't rectify the problem.

Last edited by edbarx; 05-04-2012 at 11:54 PM.
 
Old 05-01-2012, 09:57 AM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,683

Rep: Reputation: 124Reputation: 124
The issue is probably not gparted, but handing down enough permissions to it. Have you tried it via a terminal? If not, open a terminal, become root (su!) and issue the gparted command. (look at "man gparted" for options) If, at one stage, you'll get an error at least you know what direction to search (if you can't get root with the password you have in mind, it's indeed a permissions issue )
 
Old 05-01-2012, 12:10 PM   #3
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Original Poster
Rep: Reputation: 18
a) In KDE 4.7.4 running graphical programs from a terminal as root is disabled although I tried it. The error message issued is often the same one for all graphical programs irrespective of their nature.

b) I also know for certain that the password I am supplying to the authenticate dialog is the root password because it works for other programs requiring root privileges including, for instance, chmod, fdisk, chown, tune2fs, etc.

c) I also inspected /var/log to check for any logs but it seems gparted doesn't use one.
 
Old 05-01-2012, 02:12 PM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,683

Rep: Reputation: 124Reputation: 124
Well, a) explains the issue: the problem isn't with gparted, but KDE then. (I'm using Gnome, so can't help you with that) IMO this behaviour should be reported as a bug in KDE, as the root user must never be limited in whatever actions it deems necessary...
 
Old 05-01-2012, 02:47 PM   #5
odiseo77
Senior Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 1,013

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
I'm also using kde 4.7.4 (only on debian Sid), and I can launch gparted just fine, either from the command line, or from the main menu. What's the exact error message you get on the command line when you try to launch gparted from there?
 
Old 05-01-2012, 02:56 PM   #6
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by odiseo77 View Post
What's the exact error message you get on the command line when you try to launch gparted from there?
Command issued as root.
Code:
# gparted
No protocol specified
No protocol specified

(gpartedbin:2943): Gtk-WARNING **: cannot open display: :0
And if I launch kwrite as root:
Code:
# kwrite
No protocol specified
No protocol specified
kwrite: cannot connect to X server :0
As you can see, the errors are more or less the same.

As it is KDE under Wheezy forbids GUI programs to run with root privileges. For gparted to run, the policykit-1 package is used, but I have no idea how to repair that if it is broken.

Last edited by edbarx; 05-01-2012 at 03:06 PM.
 
Old 05-01-2012, 03:55 PM   #7
odiseo77
Senior Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 1,013

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
What happens if you execute the following command as user before launching gparted?:

Code:
xhost +local:root
I think you might have to add that line to your ~/.bashrc file in order for the fix to be permanent. More info here (third option, specifically).

Last edited by odiseo77; 05-01-2012 at 03:58 PM.
 
Old 05-01-2012, 04:08 PM   #8
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Original Poster
Rep: Reputation: 18
I think policykit-1 needs a configuration file telling it what to do with gparted. Before indulging into what you suggested I will do some more research to solve the problem through policykit-1 itself. At the moment it is not listing the file path to the gparted executable which may be the reason why gparted is not being run successfully.
 
Old 05-01-2012, 08:52 PM   #9
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,261

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
I find this post very interesting.

I have the exact same problem in Debian testing under Xfce.

Have no trouble launching from the root terminal.
 
Old 05-01-2012, 08:59 PM   #10
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,261

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by edbarx View Post
Command issued as root.
Code:
# gparted
No protocol specified
No protocol specified

(gpartedbin:2943): Gtk-WARNING **: cannot open display: :0
And if I launch kwrite as root:
Code:
# kwrite
No protocol specified
No protocol specified
kwrite: cannot connect to X server :0
As you can see, the errors are more or less the same.

As it is KDE under Wheezy forbids GUI programs to run with root privileges. For gparted to run, the policykit-1 package is used, but I have no idea how to repair that if it is broken.
Have you tried booting to recovery mode and just boot to the gui as root?

When you get to the option for a root # just give your root password. When the prompt comes up just type;
Code:
startx
Try starting gparted from the menu there. Bet it works.

Having a little problem with the concept that you can't launch a package from the root terminal under KDE. I admit that I am one of those folks with no use for KDE but I find this unlikely. And rather stupid. How the hell do you diagnose a problem without that option?

If booted into the DE as root does not launch it from the menu try the terminal there. Don't think they can mess with that. See what it says.
 
Old 05-01-2012, 09:14 PM   #11
odiseo77
Senior Member
 
Registered: Dec 2004
Location: London, UK
Distribution: Debian Sid, OpenSUSE 13.1
Posts: 1,013

Rep: Reputation: 308Reputation: 308Reputation: 308Reputation: 308
Quote:
Originally Posted by widget View Post
Having a little problem with the concept that you can't launch a package from the root terminal under KDE. I admit that I am one of those folks with no use for KDE but I find this unlikely. And rather stupid. How the hell do you diagnose a problem without that option?
It's not a KDE concept, but rather a misconfiguration somewhere. I'm using KDE and I can launch any program as root, either from the menu, or from the CLI (with kdesudo or after logging in as root with sudo/su).

Cheers.
 
Old 05-01-2012, 10:39 PM   #12
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,261

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
Originally Posted by odiseo77 View Post
It's not a KDE concept, but rather a misconfiguration somewhere. I'm using KDE and I can launch any program as root, either from the menu, or from the CLI (with kdesudo or after logging in as root with sudo/su).

Cheers.
That is a relief. While I do not like KDE it is a Linux DE. Runs on the same kernel and underlying foundation. Disabling such a basic native tool would be a real job of work.

Just can't imagine any DE project doing such a stupid thing.

I usually keep somethiing on here that has KDE as the DE. People obviously like it. If I am showing off Linux I want, at least, Gnome, KDE and Xfce on here. Usually have Lxde too.

Am moving away from Lxde in favor of OB with the Xfce4.8 panel.

Some DE in that bunch should appeal to anyone adventurous enough to even think of switching to Linux. I don't care what they use as a DE. It is their box.

It does need to be Linux. That means, use it or not, the terminal needs to be fully functional.
 
Old 05-02-2012, 12:04 AM   #13
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Original Poster
Rep: Reputation: 18
While everyone is entitled to their own opinion, the purpose of this thread is not to claim why it is so appealing to have graphical root logins. I created this thread to find a solution to run gparted as root although that is not absolutely necessary because the gparted GUI is only a frontend to the hidden CLI programs which actually do its work. If gparted fails to run, then no problem, I will use its slaves instead (aka the backends doing the dirty work).

For instance, to format a swap partition (with the extra advantage of retaining the previous uuid):
Code:
# mkswap -U uuid /dev/sdax
I absolutely agree that GUI programs should by default not run with root privileges, because desktops are extremely complicated pieces of software with many daemons running in the background. This means, that from a security point of view there would be much more surface area from which a cracker may launch their attack. In fact, this is one reason why I chose KDE, otherwise I would have remained a happy and fully satisfied MS Windows user.
 
Old 05-02-2012, 04:31 AM   #14
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,599
Blog Entries: 2

Rep: Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060Reputation: 4060
This is not KDE not allowing to start GUI programs as root, it is the X-server not allowing programs started as different users to connect to the server.
Have a look at
Code:
man xhost
This program allows to manage the permissions for connecting to the X-server.
Also, if you want to start a program as root from command-line in KDE it would be better to use kdesu (or if you have set up sudo kdesudo).
 
Old 05-02-2012, 06:05 AM   #15
edbarx
Member
 
Registered: Sep 2010
Distribution: Used Debian since Sarge. (~2005)
Posts: 350

Original Poster
Rep: Reputation: 18
Thanks, TobiSGD and obviously, all the others.

The x-server is a complicated piece of software made of many executable parts and it is also intimately tied with desktops and window managers. The default setup of kde does not allow the straight forward running of graphical programs as root. As a policy, I never use root logins for desktops or window managers. In the case I can, I disable such a feature. If the feature is availble by default there are other ways of blocking root logins by changing the ownership and permissions of the relevant configuration file. I know that may break some features, but root logins reduce my Linux experience similar to when I used MS Windows and I don't want to use Linux in vain.

I selected Linux primarily for security reasons, otherwise I would have stayed with MS Windows. Root logins enable an attacker to write everywhere in the file hierarchy which I find extremely undesirable.

In case gparted is broken in Wheezy(currently, Testing), I can use a Live Linux CD and the problem would be solved, or easier still than that, use the CLI backends which serve gparted.


EDIT:
Reading about how frontends like gparted are allowed to do their work apparently requiring root privileges, I found that policykit's purpose is to grant permission to frontends running with a simple user's privileges to communicate with backends running with root privileges. That is very "cool" because it means from a security standpoint I am not running anything as root apart from the minimum required.


Well done to whoever has had this great idea.

Last edited by edbarx; 05-02-2012 at 11:23 PM. Reason: to correct grammar mistakes
 
  


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
Hardening Debian (Wheezy) on the desktop with KDE. edbarx Debian 5 04-09-2012 12:52 AM
Logitech Z305 under Debian KDE Wheezy - IEC958 issue (sound over USB) infoslaw Linux - Hardware 0 03-10-2012 04:05 PM
[SOLVED] Java and Vuze installation on KDE Debian Wheezy sid infoslaw Linux - Newbie 11 12-28-2011 08:24 AM
kernel unable re-read partition table on disks when i start gparted penduleum Fedora 6 04-20-2010 06:56 AM
X failing to start... Tayl Linux - Newbie 5 07-19-2002 04:51 AM


All times are GMT -5. The time now is 12:39 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration