Click "Openwithgedit" In Ubuntu"

Source: Internet
Author: User
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:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.