Page 1 of 1

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

Posted: Sun Jun 20, 2010 6:30 am
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

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

Posted: Sun Jun 20, 2010 12:59 pm
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

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

Posted: Tue Jun 22, 2010 11:21 pm
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