Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 05-28-2009, 03:26 PM   #1
LQ Newbie
Registered: May 2009
Distribution: Ubuntu
Posts: 3

Rep: Reputation: 1
How To: Gedit with the Click of a Button (GNOME)

Hello, everyone. I'm visiting over from the Ubuntu forums, and I'd like to share this quick tutorial with all of you.

Have you ever found yourself dealing with editing several files, and sighing at having to type out different "gedit" or "vi" commands in the terminal?

If I correctly described an experience that you've had, the following tutorial is a must. My tutorial allows you to add "Open with gedit" to the Right-click menu, making it easy to gedit anything!

First, we need to run this command in the terminal, making the file that will hold our script:

gedit ~/.gnome2/nautilus-scripts/Open\ with\ gedit
Now, a blank document in the text editor should open. Copy and paste these contents:

# Nautilus script -> open gedit
while [ $# -gt 0 ]
files=`echo "$1″ | sed 's/ /\?/g'`
filesall="$files $filesall"
gedit $filesall&
Now click save, and close the text editor.

Finally, we need to make the previous script executable. So let's run this command:

chmod u+x ~/.gnome2/nautilus-scripts/Open\ with\ gedit
And that's it! Open up the file browser, and right-click on any file to test it out!

I hope I've helped to make someone's life a lot easier. Enjoy, everyone.
Old 05-30-2009, 12:44 AM   #2
LQ 5k Club
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,516

Rep: Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896Reputation: 896
On my system, in nautilius text files are associated with gedit by default.


gedit, gnome, tutorial

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
No Back Button on right click or browser qplumb Linux Mint 1 09-05-2009 07:04 PM
middle click the maximise button to maximise vertically in gnome? dasy2k1 Linux - Newbie 1 05-10-2009 09:58 PM
Gedit, right click to change language General Linux - Software 1 05-18-2006 12:23 AM
make thumb button/third button double-click taboom Linux - Hardware 0 03-20-2006 03:39 PM
Gnome 2.6.1: Single Click acts like Double Click Der_tolle_Emil Linux - Software 2 09-13-2004 09:59 AM

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration