You are not logged in.

#1 2011-07-03 17:47:09

relik
Member
Registered: 2011-07-03
Posts: 3

[SOLVED]Unable to run Graphical applications as root/sudo

Ok so ive been working on getting my very first Arch install up and running and I need to get the catalyst drivers running for my HD6850 because I plan on doing some wine gaming.

So I followed the instructions here on the wiki for ATI catalyst and I now have the drivers up and running, tried glxgears and everything is fine. The issue I am having Is that when I go under the settings menu in KDE I have the "AMD Catalyst control center" there, however I do not have the (Administrative) option that I get with all other distros. I need to run the CCC as root to beable to configure my multiple monitors.

In a terminal when i enter;

 sudo amdcccle 

It returns with the following;

 
No protocol specified
amdcccle: cannot connect to X server :0

So after a little digging I found this thread on the ubuntu forums that was quite helpful;
http://ubuntuforums.org/showthread.php?t=307984

So I ran

 DISPLAY=:0.0 xhost + 

then tried again to run

 sudo amdcccle 

and like magic it worked and I was able to configure my displays.

However this is not a permanent fix. Can anyone see a more permanent solution to this issue? This affects more than just the Catalyst Control Center; It stops me from running any graphical application as root or with sudo. Also can anyone explain what is causing the issue?

I have searched to the best of my ability and as you can see I have for the most part fixed the issue, however I cannot seem to find a permanent fix, nor do I really know what caused the issue to begin with.

Last edited by relik (2011-07-03 20:21:52)

Offline

#2 2011-07-03 18:35:44

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: [SOLVED]Unable to run Graphical applications as root/sudo

You could look at something like gksudo.

Running graphical applications with sudo isn't always a great idea as it can have odd side effects.  I've seen people who were unable to login to X because the permissions on .ICEAuthority had been changed to root.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2011-07-03 20:21:28

relik
Member
Registered: 2011-07-03
Posts: 3

Re: [SOLVED]Unable to run Graphical applications as root/sudo

SOLVED

I took your advice about installking something like gksudo, and rememberd that on my kubuntu install I had something called kdesu. So Since im running KDE and not Gnome, I did some searching and found out how to install kdesudo using the AUR.

Just followed the install guide here for Yaourt ---> https://wiki.archlinux.org/index.php/Yaourt

Once I did that i just ran

 yaourt kdesudo 

selcted #1 and installed.

Now when I need to run a GUI based app as root I type in

 kdesu <NAME OF APP> 

So to solve my original issue I just run

 kdesu amdcccle 

instead of

 sudo amdcccle 

This seems to work for any app that needs to be ran a root with a GUI.

Also if your like me and you want to beable to just open CCC from your kickoff menu then do the following;

1. Right click kickoff > edit applications
2. Go to "Settings" > ATI Catalyst Control Center
3. In the Command Field add "kdesu" without quotes to the begining of the line so it looks like this

 kdesu amdcccle 

4. Save

Last edited by relik (2011-07-03 20:22:55)

Offline

#4 2011-07-03 21:11:34

pablox
Member
From: /home/chile/santiago/
Registered: 2008-05-14
Posts: 183
Website

Re: [SOLVED]Unable to run Graphical applications as root/sudo

Maybe here were the answer?

https://wiki.archlinux.org/index.php/Su … using_sudo

You have to add the following line:

Defaults env_keep += "HOME"

to your sudoers file


Geeks & Linux Atelier
An eye for an eye ... ends in making everybody blind -- Mahatma Gandhi
dotfiles

Offline

#5 2011-07-03 21:18:05

SteveK
Member
Registered: 2010-06-11
Posts: 80

Re: [SOLVED]Unable to run Graphical applications as root/sudo

Just to clear up any confusion kdesu is part of kde:

pacman -Qo kdesu
/usr/bin/kdesu is owned by kdebase-runtime 4.6.3-1

The main difference is that kdesu uses root's password and kdesudo uses the user's.

Last edited by SteveK (2011-07-03 21:20:23)

Offline

#6 2011-07-03 22:22:40

relik
Member
Registered: 2011-07-03
Posts: 3

Re: [SOLVED]Unable to run Graphical applications as root/sudo

Thanks for the help, looks like I did things the hard way. Well thats what learning is all about. Im going to do what was reccomended in the link, being able to just use "sudo" will make things a little easier, thanks for the link.

Offline

Board footer

Powered by FluxBB