{"id":1843,"date":"2013-10-07T03:39:39","date_gmt":"2013-10-07T03:39:39","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=1843"},"modified":"2013-10-07T03:39:39","modified_gmt":"2013-10-07T03:39:39","slug":"enable-open-as-administrator-ubuntu-13-10-nautilus","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2013\/10\/enable-open-as-administrator-ubuntu-13-10-nautilus\/","title":{"rendered":"How to Enable Open as Administrator for Ubuntu 13.10 Nautilus"},"content":{"rendered":"<p><b>This quick tip is going to show beginners how to add &#8216;open as administrator&#8217; or &#8216;open as root&#8217; into Nautilus context menu in Ubuntu 13.10 Saucy.<\/b><\/p>\n<p>With this feature enabled, you can quickly open files and folders in Nautilus with root (super user) privilege. This also works on Linux Mint 16 Petra if you&#8217;re using Nautilus 3.8.x.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/OpenAsAdministrator-ubuntu13-04.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/OpenAsAdministrator-ubuntu13-04.jpg\" alt=\"Open as Administrator ubuntu 13.10\" width=\"580\" height=\"270\" class=\"aligncenter size-full wp-image-1844\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/OpenAsAdministrator-ubuntu13-04.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/OpenAsAdministrator-ubuntu13-04-300x139.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p><b>To get started:<\/b> <\/p>\n<p>1. Open Ubuntu Software Center, search for and install <b>gksu<\/b>. It allows graphical programs to ask a user&#8217;s password to run program as root \/ administrator.<\/p>\n<p>2. Open Nautilus file browser, press Ctrl+H to view hidden files &#038; folders. Navigate to <b>USER Home -> .local -> share -> nautilus -> scripts<\/b>.<\/p>\n<p>Create an empty document under this directory named &#8216;open-as-administrator&#8217;<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/create-open-as-administrator.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/create-open-as-administrator.jpg\" alt=\"create open as administrator\" width=\"580\" height=\"257\" class=\"aligncenter size-full wp-image-1845\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/create-open-as-administrator.jpg 580w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2013\/10\/create-open-as-administrator-300x132.jpg 300w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>3. Open this file with Gedit, copy and paste following codes into the file and save.<\/p>\n<p><code>#!\/bin\/bash<br \/>\n#<br \/>\n# this code will determine exactly the path and the type of object,<br \/>\n# then it will decide use gedit or nautilus to open it by ROOT permission<br \/>\n#<br \/>\n# Determine the path<br \/>\nif [ -e -n $1 ]; then<br \/>\n\tobj=\"$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS\"<br \/>\nelse<br \/>\n\tbase=\"`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'\/' -f3- | sed 's\/%20\/ \/g'`\"<br \/>\n\tobj=\"$base\/${1##*\/}\"<br \/>\nfi<br \/>\n# Determine the type and run as ROOT<br \/>\nif [ -f \"$obj\" ]; then<br \/>\n\tgksu gedit \"$obj\"<br \/>\nelif [ -d \"$obj\" ]; then<br \/>\n\tgksu nautilus \"$obj\"<br \/>\nfi<\/p>\n<p>exit 0<\/code><\/p>\n<p>4. Right-click on this file, go to <b>Properties -> Permissions tab<\/b>. Check the box which says &#8216;Allow executing file as program&#8217;.<\/p>\n<p>Log out and back in, or restart Nautilus by <code>nautilus -q<\/code> command. Done. <\/p>","protected":false},"excerpt":{"rendered":"<p>This quick tip is going to show beginners how to add &#8216;open as administrator&#8217; or &#8216;open as root&#8217; into Nautilus context menu in Ubuntu 13.10 Saucy. With this feature enabled, you can quickly open files and folders in Nautilus with root (super user) privilege. This also works on Linux Mint 16 Petra if you&#8217;re using [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[670,671,37],"class_list":["post-1843","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-open-as-administrator","tag-open-as-root","tag-ubuntu-13-10"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/1843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=1843"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/1843\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=1843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=1843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=1843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}