When you browse text files or some script files in Ubuntu, only gedit is used by default. But what if it is an unknown suffix? Then it will only pop up a dialog box asking you to open the file with this unknown suffix. If we right-click to add an "Openwithgedit" (open this file with gedit ), then, right-click the file and click "Openwithgedit" to open the file with gedit. The procedure is as follows:
When you browse text files or some script files in Ubuntu, only gedit is used by default. But what if it is an unknown suffix? Then it will only pop up a dialog box asking you to Open the file with this unknown suffix. If we right-click to add an "Open with gedit" (Open this file with gedit ), then, right-click the file and click "Open with gedit" to Open the file with gedit.
The procedure is as follows:
Gedit ~ /. Gnome2/nautilus-scripts/Open \ with \ gedit
Copy the following Scripts. These script files can be found on the G-Scripts site, which contains many practical script files.
#! /Bin/bash
#
# Nautilus script-> open gedit
#
# Owner: Largey Patrick from Switzerland
# Patrick.largey@nazeman.org
# Www.nazeman.org
# Www.linuxidc.com
# Licence: GNU GPL
#
# Copyright (C) Nazeman
#
# Ver. 0.9-1 Date: 16.02.2002
# Add multiple file open in the same windows
#
# Vers: 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 &
Save and close the gedit window, and then execute the following command to make the script executable:
Chmod u + x ~ /. Gnome2/nautilus-scripts/Open \ with \ gedit
Now, when you right-click a file, you should see: