Add "Open with gedit" to the right click menu in Ubuntu

You can now add Open with gedit to the right click menu in Ubuntu.The file browser in Ubuntu provides the ability to run scripts on a selected file.

1. Goto Applications -> Accessories -> Terminal.
2. Type in the following command, which will create a new script file in our nautilus scripts directory

gedit ~/.gnome2/nautilus-scripts/Open\ with\ gedit

3. Copy & Paste the following script,

#!/bin/bash
#
# Nautilus script -> open gedit
#
# Owner : Largey Patrick from Switzerland
# patrick.largey@nazeman.org
# www.nazeman.org
#
# Licence : GNU GPL
#
# Copyright (C) Nazeman
#
# Ver. 0.9-1 Date: 16.02.2002
# Add multiple file open in the same windows
#
# Ver: 0.9 Date: 27.10.2001
# Initial release
#
# Dependence : Nautilus (of course)
# Gnome-utils (gdialog)
#
filesall=””
while [ $# -gt 0 ]
do
files=`echo “$1″ | sed ’s/ /\?/g’`
filesall=”$files $filesall”
shift
done
gedit $filesall&

4. Save(Ctrl+S) and close the gedit window.
5. Now execute the following command to make the script executable:

chmod u+x ~/.gnome2/nautilus-scripts/Open\ with\ gedit

6. Now when you right click a file, you should see “Open with gedit”.

Popularity: -0% [?]

No related posts.

Subscribe to receive more Computer Tips & Tricks to your Inbox

Share this Post:
Digg Google Bookmarks reddit Mixx StumbleUpon Technorati Yahoo! Buzz DesignFloat Delicious BlinkList Furl

No Responses to “Add "Open with gedit" to the right click menu in Ubuntu”

Leave a Reply:

Name (required):
Mail (will not be published) (required):
Website:
Comment (required):
XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge