1. The Topic of the Month for October is "Make this the Perfect Bugout Location". Please join the discussion in the TOTM forum.

Adding Open As Root to your right click (Ubuntu-Mint)

Discussion in 'GNU/Linux' started by melbo, Sep 25, 2010.

  1. melbo

    melbo Hunter Gatherer Administrator Founding Member

    It's slightly frustrating (especially for new users), to discover that you can't always edit a file in the filesystem through the GUI because it requires admin privileges. I do most of my opening and editing through the Terminal but every once in awhile I just want a quick cut and paste.

    I started using this trick a few years ago and it works on all Debian based distros: Ubuntu, Mint, Etc. I originally found it at Boot and run Linux from a USB flash memory stick | USB Pen Drive Linux

    From Terminal, type
    sudo su
    Enter your password

    Then enter:
    gedit .gnome2/nautilus-scripts/Open\ as\ root
    A blank document will open. Enter the following 3 lines, click save and close the document:

    gksudo "gnome-open $uri" &
    Type this into the terminal window:
    sudo chmod +x .gnome2/nautilus-scripts/Open\ as\ root
    Next time you want to open a file as root, right click>scripts>Open As Root

    System restart may be necessary to get the right click.
survivalmonkey SSL seal        survivalmonkey.com warrant canary