Ubuntu – Setting default editor for php files

nautilusnemonetbeansPHP

I am using Ubuntu 12.04 TLS. I had installed Netbeans on my PC. I want change default file to netbeans.

I've tried to right-click on a php file > Properties > Open With > Show other Application ; but there is no netbeans anywhere.

How can I set the default program for opening php files?

Best Answer

First you have to install properly last version of NetBeans Install comixcursors-lefthanded. After go in Nautilus where are your php files, right click on a php file, select Open With > Other application and you should find there NetBeans. Open with it.

If still you have problems, go in /usr/share/applications/ and create with root privileges a .desktop file with next things in:

[Desktop Entry]
Name=<Netbeans>
Exec=<command to run program - something like /opt/netbeans/run.sh> %U
Type=Application

Another way would be if you open a terminal and run:

netbeans [ options ] [ files ]

See man netbeans for more informations.

Related Question