How Can I Add in 'Nano' With 0.5.2 To Open Text Files?

The dedicated forum for PCMan File Manager - http://wiki.lxde.org/en/PCManFM
Locked
DasFox
Posts: 21
Joined: Sun May 02, 2010 4:06 am

How Can I Add in 'Nano' With 0.5.2 To Open Text Files?

Post by DasFox »

I use pcmanfm 0.5.2 and I want to have nano open text files when I click them, how can I do this?


THANKS
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: How Can I Add in 'Nano' With 0.5.2 To Open Text Files?

Post by maces »

Hi,

This is quite easy. As often in LXDE you have to use a *.desktop file. This files are staring applications and are listed in the "open with"-dialog. One of these should work for you.

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Nano
Comment=Simple text editor
Exec=nano %f
Icon=nano
Terminal=true
Type=Application
MimeType=text/plain
Categories=Utility;TextEditor;
StartupNotify=true

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Nano
Comment=Simple text editor
Exec=lxterminal -e nano %f
Icon=nano
Terminal=false
Type=Application
MimeType=text/plain
Categories=Utility;TextEditor;
StartupNotify=true
Place it in "/usr/share/applications" or in "~/.local/share/applications" and name it "nano.desktop". Now you should be able to choose Nano to open you file.

maces
DasFox
Posts: 21
Joined: Sun May 02, 2010 4:06 am

Re: How Can I Add in 'Nano' With 0.5.2 To Open Text Files?

Post by DasFox »

Cool, this one worked:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Nano
Comment=Simple text editor
Exec=xterm -e nano %f
Icon=nano
Terminal=false
Type=Application
MimeType=text/plain
Categories=Utility;TextEditor;
StartupNotify=true

I did have to right click the file and place it in and then it worked for all of them....


THANKS
Locked