[Novalug] Nautilus from commandline?
greg pryzby
greg@pryzby.org
Tue Apr 22 11:39:27 EDT 2008
Jon is correct. Chances are root can't connect to the display.
Find what 'sudo' (ksudo, etc) that is used when you start a GUI app that
runs as root and use that to start nautilus
Or,
ssh -Y root@localhost nautilus (might work)
Jon LaBadie wrote:
> On Tue, Apr 22, 2008 at 06:48:37AM -0700, Igor Birman wrote:
>> I am trying to start nautilus in ubuntu from a root commandline so I can run it as root. I type:
>>
>> # nautilus
>>
>> and it tells me to specify the display
>>
>> then I try
>>
>> # nautilus --display=0
>>
>> but it can't find that one. Which display am I using or is there another way?
>>
>
> Try echo'ing $DISPLAY to confirm.
>
> It probably is zero, but X windows typically shows displays
> with a leading colon, i.e. ":0"
>
> I think the more formal format is hostname:display.screen, but
> omiting the hostname defaults to the current host (or localhost,
> I forget which) and a missing ".screen" defaults to ".0".
>
> If you logged in as someone other than root then su'ed to root,
> it is possible you X environment does not allow others to write
> to your display (a good thing). Use xhost to both report the
> settings and to modify the permissions. For example, temporarily
> disable it or to allow root to write.
More information about the Novalug
mailing list