Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to do X in sudo?



sudo nedit file.txt did work. But I much prefer to do sudo su and run in
the root window for administration. Why does that not work?

Jeremy Huddleston wrote:
> James, please reply to the list as well, so you can possibly get help
> from others and not just me.
>
> Looking at your response below, I see you didn't try what I
> suggested.  Do:
>
> sudo nedit file.txt
>
> rather than
>
> sudo su
> nedit file.txt
>
> --Jeremy
>
>
> On Aug 27, 2008, at 19:12, James Rome wrote:
>
>> No, I can do X11 fine before sudo:
>>
>> root@jarhp:/var/log/wicd# echo $DISPLAY
>> localhost:10.0
>> root@jarhp:/var/log/wicd# exit
>> exit
>> jar@jarhp:~$ echo $DISPLAY
>> localhost:10.0
>> jar@jarhp:~$ nedit .profile &
>> [1] 22480
>> jar@jarhp:~$ UTF8 locale not supported.
>> .... and nedit pops up
>>
>> Thanks,
>> Jim
>>
>>
>> Jeremy Huddleston wrote:
>>> ssh into your machine and do:
>>>
>>> echo $DISPLAY
>>>
>>> I'm guessing the other host is not allowing X11 tunneling.
>>> On Aug 27, 2008, at 12:16, James Rome wrote:
>>>
>>>> Jeremy Huddleston wrote:
>>>>> ssh -X -Y email@hidden
>>>>> sudo nedit myfile.txt
>>>>>
>>>>> Make sure your /etc/sudoers file on the remote host saves your
>>>>> DISPLAY
>>>>> and whatnot:
>>>>> Defaults    env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
>>>>>
>>>>> --Jeremy
>>>>>
>>>>> On Aug 26, 2008, at 19:52, James Rome wrote:
>>>>>
>>>>>> I want to login to my Ubuntu machine and do X as root. But it does
>>>>>> not work:
>>>>>>
>>>>>> jar@jarhp:~$ sudo su
>>>>>> [sudo] password for jar:
>>>>>> root@jarhp:/home/jar# cd /etc
>>>>>> root@jarhp:/etc# nedit wpa_supplicant.conf &
>>>>>> [1] 16270
>>>>>> root@jarhp:/etc# X11 connection rejected because of wrong
>>>>>> authentication.
>>>>>> NEdit: Can't open display
>>>>>>
>>>>>> How do I solve this?
>>>>>> _______________________________________________
>>>>>> Do not post admin requests to the list. They will be ignored.
>>>>>> X11-users mailing list      (email@hidden)
>>>>>> Help/Unsubscribe/Update your Subscription:
>>>>>> http://lists.apple.com/mailman/options/x11-users/email@hidden
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> This email sent to email@hidden
>>>>>
>>>> That did not work:
>>>>
>>>> jarmac:~ jar$ ssh -X -Y 192.168.1.14
>>>> Linux jarhp 2.6.24-19-generic #1 SMP Wed Aug 20 22:56:21 UTC 2008 i686
>>>> jar@jarhp:~$ sudo su
>>>> [sudo] password for jar:
>>>> root@jarhp:/var/log/wicd# nedit wicd.log &
>>>> [1] 12825
>>>> root@jarhp:/var/log/wicd# X11 connection rejected because of wrong
>>>> authentication.
>>>> NEdit: Can't open display
>>>>
>>>> /etc/sudoers:
>>>> #
>>>> # This file MUST be edited with the 'visudo' command as root.
>>>> #
>>>> # See the man page for details on how to write a sudoers file.
>>>> #
>>>>
>>>> #Defaults       env_reset
>>>>
>>>> Defaults        env_keep += "DISPLAY XAUTHORIZATION XAUTHORITY"
>>>> # Uncomment to allow members of group sudo to not need a password
>>>> # %sudo ALL=NOPASSWD: ALL
>>>>
>>>> # Host alias specification
>>>>
>>>> # User alias specification
>>>>
>>>> # Cmnd alias specification
>>>>
>>>> # User privilege specification
>>>> root    ALL=(ALL) ALL
>>>>
>>>> # Members of the admin group may gain root privileges
>>>> %admin ALL=(ALL) ALL
>>>>
>>>>
>>>>
>>>>
>>>
>>
>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/x11-users/email@hidden

This email sent to email@hidden

References: 
 >How to do X in sudo? (From: James Rome <email@hidden>)
 >Re: How to do X in sudo? (From: Jeremy Huddleston <email@hidden>)
 >Re: How to do X in sudo? (From: Jeremy Huddleston <email@hidden>)
 >Re: How to do X in sudo? (From: Jeremy Huddleston <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.