open as administrator

Discussion in 'all things UNIX' started by cet, Dec 15, 2013.

Thread Status:
Not open for further replies.
  1. cet

    cet Registered Member

    Joined:
    Sep 3, 2006
    Posts:
    867
    Location:
    Turkey/İzmir
    Can someone please tell me if this is safe to do.


    You can accomplish Open as Admin with a Nautilus script placed in
    ~/.gnome2/nautilus-scripts. The name you give the file will be placed in the Scripts menu.

    1. Right click on desktop, Select > Create New Document > Empty Document. Name the file "Open As Administrator" , Open the file and paste the following text into it,

    for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
    gksudo "gnome-open $uri" &
    done
    Click save and close out.

    2. Now mark the file as executable, right click > Properties > Permissions > look down for "Execute" and check "Allow executing file as program" -

    3.Open the file browser, go to > View > Show Hidden Files, now navigate to you home folder, and Place the file in ~/.gnome2/nautilus-scripts

    4. Now right click on your folder or file of choice and select > Scripts > Open As Administrator , you then will get a screen prompting for your password, and the file/folder will open in their respective program as administrator-
     
  2. Gullible Jones

    Gullible Jones Registered Member

    Joined:
    May 16, 2013
    Posts:
    1,461
    I would really not recommend doing that! Most stuff in the GUI, aside from system updates, can and should be accomplished without root access.
     
Loading...
Thread Status:
Not open for further replies.