FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 05-02-2012, 02:00 PM
"Kevin O'Gorman"
 
Default How to use sudo and a graphical program?

I guess I don't understand access permissions to my display.

If I become root via "sudo su -", I cannot use gedit or gvim because
they are unable to open the display.

If I start them as "sudo gedit somefile" it works, but when I'm doing
serious admin work, I consider this tedious.

I'm not complaining so much as wanting to understand. Any clues?

--
Kevin O'Gorman, PhD

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-02-2012, 02:02 PM
Space Cake
 
Default How to use sudo and a graphical program?

try gksudo a kdesudo depending of your desktop environment

L:


On 2012. máj. 2., szerda, 16.00.19 CEST, Kevin O'Gorman wrote:
> I guess I don't understand access permissions to my display.
>
> If I become root via "sudo su -", I cannot use gedit or gvim because
> they are unable to open the display.
>
> If I start them as "sudo gedit somefile" it works, but when I'm doing
> serious admin work, I consider this tedious.
>
> I'm not complaining so much as wanting to understand. Any clues?
>

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-02-2012, 02:19 PM
Gilles Gravier
 
Default How to use sudo and a graphical program?

Hi!

On 02/05/2012 16:00, Kevin O'Gorman wrote:
> I guess I don't understand access permissions to my display.
>
> If I become root via "sudo su -", I cannot use gedit or gvim because
> they are unable to open the display.
>
> If I start them as "sudo gedit somefile" it works, but when I'm doing
> serious admin work, I consider this tedious.
>
> I'm not complaining so much as wanting to understand. Any clues?


alias sgvim "gksudo gvim"
alias sgedit "gksudo gedit"

Gilles


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-02-2012, 02:23 PM
Rashkae
 
Default How to use sudo and a graphical program?

On 05/02/2012 10:00 AM, Kevin O'Gorman wrote:

I guess I don't understand access permissions to my display.

If I become root via "sudo su -", I cannot use gedit or gvim because
they are unable to open the display.

If I start them as "sudo gedit somefile" it works, but when I'm doing
serious admin work, I consider this tedious.

I'm not complaining so much as wanting to understand. Any clues?



Try sudo -s. If that doesn't work, let us know exactly what error
message you're getting.




--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 05-03-2012, 12:00 AM
NoOp
 
Default How to use sudo and a graphical program?

On 05/02/2012 07:00 AM, Kevin O'Gorman wrote:
> I guess I don't understand access permissions to my display.
>
> If I become root via "sudo su -", I cannot use gedit or gvim because
> they are unable to open the display.

Works for me:

$ sudo -i
# gedit
# gvim

(Unbuntu 11.04, 11.10, 12.04)

>
> If I start them as "sudo gedit somefile" it works, but when I'm doing
> serious admin work, I consider this tedious.

Ummm, in standard user you should be using gksudo or kdesudo instead:

https://help.ubuntu.com/community/RootSudo
http://ubuntuforums.org/showpost.php?p=6188826&postcount=4

You've been notified about this before & I consider reminding you of
this tedious.

For new users to this list/Ubuntu, I'll quote from
<https://help.ubuntu.com/community/RootSudo>:

<quote>
Graphical sudo

You should *never* use normal sudo to start graphical applications as
Root. You should use gksudo (kdesudo on Kubuntu) to run such programs.
gksudo sets HOME=~root, and copies .Xauthority to a tmp directory. This
prevents files in your home directory becoming owned by Root. (AFAICT,
this is all that's special about the environment of the started process
with gksudo vs. sudo).

Examples:

gksudo gedit /etc/fstab

or

kdesudo kate /etc/X11/xorg.conf
</quote>

>
> I'm not complaining so much as wanting to understand. Any clues?
>

Try letting others know what/if error messages you get?

--
Gary Lee, AS CS


--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:56 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org