Page 2 of 9 FirstFirst 1234 ... LastLast
Results 11 to 20 of 88

Thread: HOWTO: Easily open any file as root via drag & drop

  1. #11
    Join Date
    Mar 2005
    Location
    Brisbane, Australia
    Beans
    32
    Distro
    Ubuntu 6.06

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by Nis
    As and you shall receive. Put the following into ~/.gnome2/nautilus-scripts/Open\ as\ root
    Code:
    #!/bin/sh
    gksudo "gnome-open  $NAUTILUS_SCRIPT_SELECTED_URIS"
    Then make it executable with
    Code:
    chmod +x ~/.gnome2/nautilus-scripts/Open\ as\ root
    sorry... real newbie here... can you dumb this down a bit for me? ie. let me know what to type into the console. I managed to browse to ~/.gnome2/nautilus-scrips/ but when I did an ls and it showed the folder as empty so I wasn't sure where to go from there. The back slashes has me confused too, can you explain them to me...
    oh and if you have time... where exactly is ~/.gnome2 ? I tried to find it in nautilus but couldn't. i'm thinking it's hidden or something. TIA.

  2. #12
    Join Date
    Apr 2005
    Beans
    645
    Distro
    Dapper Drake Testing/

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by poyner
    sorry... real newbie here... can you dumb this down a bit for me? ie. let me know what to type into the console. I managed to browse to ~/.gnome2/nautilus-scrips/ but when I did an ls and it showed the folder as empty so I wasn't sure where to go from there. The back slashes has me confused too, can you explain them to me...
    oh and if you have time... where exactly is ~/.gnome2 ? I tried to find it in nautilus but couldn't. i'm thinking it's hidden or something. TIA.
    ok Go to Applications -> System Tools and open Terminal
    type :
    Code:
    gedit ~/.gnome2/nautilus-scripts/Open\ as\ root&
    it will open a text editor like notepad/wordpad
    paste into it
    Code:
    #!/bin/sh
    gksudo "gnome-open  $NAUTILUS_SCRIPT_SELECTED_URIS"
    click save, exit and go back to the terminal window and type:
    Code:
    chmod +x ~/.gnome2/nautilus-scripts/Open\ as\ root
    et voilą

    BTW thank you guys so much, it's so usefull and should be in the ubuntuguide TIps & Tricks, good work guys!!!
    [My Blog] | [My Sites] | [My Ubuntu Guides]

    doc.gwos.org, the real successor of Ubuntu Guide

  3. #13
    Join Date
    Apr 2005
    Location
    Miami, FL
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by Gandalf
    ok Go to Applications -> System Tools and open Terminal
    type :
    et voilą

    BTW thank you guys so much, it's so usefull and should be in the ubuntuguide TIps & Tricks, good work guys!!!
    Thank you Gandalf for that dumbed down explanation. Mighty useful. One thing I did learn was this this wont work in the root terminal but must be done in the regular terminal. Just another newbie mistake by me. Also thanks to the creator for this nice hack(?).

  4. #14
    Join Date
    Apr 2005
    Beans
    645
    Distro
    Dapper Drake Testing/

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by TheRealEdwin
    Thank you Gandalf for that dumbed down explanation. Mighty useful. One thing I did learn was this this wont work in the root terminal but must be done in the regular terminal. Just another newbie mistake by me. Also thanks to the creator for this nice hack(?).
    well it work in the root terminal, instead of ~/.gnome2 type /home/your_user_name/.gnome2
    [My Blog] | [My Sites] | [My Ubuntu Guides]

    doc.gwos.org, the real successor of Ubuntu Guide

  5. #15
    Join Date
    Mar 2005
    Location
    Brisbane, Australia
    Beans
    32
    Distro
    Ubuntu 6.06

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by Gandalf
    et voilą

    BTW thank you guys so much, it's so usefull and should be in the ubuntuguide TIps & Tricks, good work guys!!!
    awesome... thanks so much.

  6. #16
    Join Date
    Jan 2005
    Location
    Lexington, Kentucky
    Beans
    150
    Distro
    Ubuntu Karmic Koala (testing)

    Re: HOWTO: Easily open any file as root via drag & drop

    This is awsome. I've always wondered if I could do this, but never really tryed it out.

    This remind's me, I really need to post my screenshot w/ thumbnail script. It was my very first shell script ever. Be sure to watch out for that one later.

  7. #17
    Join Date
    Apr 2005
    Location
    Iowa - US
    Beans
    29
    Distro
    Ubuntu 6.06

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by Nis
    As and you shall receive. Put the following into ~/.gnome2/nautilus-scripts/Open\ as\ root
    <...snip...>
    Is there a way that you can do the same for Kubuntu (KDE)? If anyone knows it'd be appriciated.

  8. #18
    Join Date
    Apr 2005
    Location
    Not-So-Sunny Hawaii
    Beans
    Hidden!

    Thumbs up Re: HOWTO: Easily open any file as root via drag & drop

    =D>=D>=D>

    this is one of the most useful tweaks i have found in this whole forum...

    Thanks a million!

  9. #19
    Join Date
    Mar 2005
    Beans
    38

    Re: HOWTO: Easily open any file as root via drag & drop

    Excellent! This is so useful I can't believe it's not been in there for ages! When I'm editing config files and the like I usually drop to a terminal and do it there with vim. No more of that for me!

  10. #20
    Join Date
    Mar 2005
    Location
    Brisbane, Australia
    Beans
    32
    Distro
    Ubuntu 6.06

    Re: HOWTO: Easily open any file as root via drag & drop

    Quote Originally Posted by poyner
    awesome... thanks so much.
    hmmmmm bugger.... seems it's not working... I right click on a file like /boot/grub/menu.lst and I can see the Open as root option. but when I click on it nothing happens.

    when I choose open scripts folder I can see the file called open as root. If I right click on that and open it in a text editor it has

    Code:
    #!/bin/sh
    gksudo "gnome-open  $NAUTILUS_SCRIPT_SELECTED_URIS"
    so I think Everything is set up ok. any idea what could be wrong?
    edit: btw... I can drag and drop a file onto the icon I created earlier and that works ok.

Page 2 of 9 FirstFirst 1234 ... LastLast

Bookmarks

Posting Permissions

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