Opening Nautilus Browser as Root
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2019
    Location
    Madison, WI
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Opening Nautilus Browser as Root

    I am trying to make so that when i close the lid of my laptop while running Fedora 29 it doesn't do anything.

    I found a thread online saying that I should "As root, edit /etc/systemd/logind.conf."

    From what I understand I need to open a terminal and enter the following command: sudo nautilus --browser

    This however doesn't work an gives me an error. I will attach the message to this post.

    Can anyone help me figure this out?
    ThanksClick image for larger version. 

Name:	Screenshot from 2019-04-11 11-22-40.png 
Views:	21 
Size:	58.3 KB 
ID:	30241

  2. #2
    Join Date
    Feb 2019
    Location
    Moon
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Do it like this:

    cd /etc/systemd

    sudo gedit logind.conf

    Change and save file.

  3. #3
    Join Date
    Apr 2019
    Location
    Madison, WI
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Click image for larger version. 

Name:	screenshot.png 
Views:	16 
Size:	15.7 KB 
ID:	30242

    I tried that and this is the result I get.

  4. #4
    Join Date
    Feb 2015
    Location
    Colorado
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    from a terminal window:

    sudo nautilus &

    will open nautilus as root. The & tells nautilus to run in the background so as to not tie up the terminal window.

    Use with caution.
    I try to think, but nothin' happens!

  5. #5
    Join Date
    Apr 2019
    Location
    Madison, WI
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Thank you so much for the response,

    That isn't working either for some reason...
    Do you think that it has something to do with my install of Fedora?

  6. #6
    Join Date
    Feb 2019
    Location
    Alberta
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Try the command below:
    SUDO_EDITOR="gedit -w" sudoedit /etc/systemd/logind.conf

  7. #7
    Join Date
    May 2010
    Location
    Midwest USA
    Age
    51
    Posts
    525
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    There's no need to open a nautilus window to edit a file that you know the path to, just open the file in an editor directly.
    Code:
    sudo gvim /etc/systemd/logind.conf
    should "just work".

    Failing that, this is why knowing the basics of terminal based editor like vim or nano is useful. Just
    Code:
    sudo vim /etc/systemd/logind.conf
    Running Fedora 29 64-bit on a HP EliteDesk 800 G1, 3.6GHz i7-4790 CPU (4 cores, 8 threads), 32GB RAM, 250GB SSD + 2TB HDD, EVGA GTX1050 TI SC 4GB GDDR5 video card. Vizio E221-A1 22" 1080p HDTV, using 1080P (1920x1080) over HDMI

  8. #8
    Join Date
    Apr 2019
    Location
    Madison, WI
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Hey thanks for your help. Using

    SUDO_EDITOR="gedit -w" sudoedit /etc/systemd/logind.conf

    worked well. Even though I was able to edit the file and save it, I was wondering if anyone knows what the original error was? Why can't I open nautilus as root?

    Thanks

  9. #9
    Join Date
    May 2011
    Posts
    243
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Opening Nautilus Browser as Root

    Quote Originally Posted by hoerschy17
    .. Why can't I open nautilus as root?
    Because sudo or su has no permission to your GUI display without extra steps, as can be seen in the error message about display. It is almost always a bad idea for root to have GUI access.

    sudoedit works because it temporarily copies the file with permission for normal user, in which case gedit run as normal user accesses the file in GUI. Once done, sudoedit copies back the updated file with original permission. For more info, you may check man sudoedit.

Similar Threads

  1. Nautilus scripts, mostly bash, as root open nautilus in current folder.
    By leadgolem in forum Programming & Packaging
    Replies: 19
    Last Post: 4th December 2017, 12:42 PM
  2. [SOLVED]
    nautilus not opening as root, to install theme
    By phanishankar in forum Using Fedora
    Replies: 0
    Last Post: 11th January 2012, 06:17 AM
  3. Replies: 0
    Last Post: 16th January 2009, 03:32 AM
  4. Error opening OPERA web browser?
    By genyue in forum Using Fedora
    Replies: 8
    Last Post: 20th September 2005, 09:11 PM
  5. Openning Nautilus File Browser with root privialges
    By Kokanee100 in forum Using Fedora
    Replies: 2
    Last Post: 20th November 2004, 09:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •