5

I'm using Ubuntu 12.10 64 bit ... I have installed XAMPP and Netbeans 7.2 IDE. The problem is I can't open any PHP file using Netbeans IDE and when I click "open with" I can't find Netbeans within the displayed app

How to set Netbeans 7.2 as my default PHP files IDE?

6

Just open the following path,

cd /usr/share/applications/

Find netbeans.desktop file

ls -al | grep netbeans

Edit netbeans.desktop file

vim netbeans <version>
Exec=/bin/sh "/usr/local/netbeans-8.0.2/bin/netbeans" %U

Just add %U at the end of Exec.

Now goto any file, right click properties->open with, there you see netbeans. Now set it as default.

  • It prefect answer, for all apps %U add to open with applist or for other apps is different ? – A1Gard Jun 30 '17 at 1:44
5

I don't know if this is the perfect way but it works fine:

  1. I assume you installed Netbeans manually so you will have to create a .desktop file like this:

    [Desktop Entry]
    Name=<program name maybe Netbeans 7>
    Exec=<then command to run program maybe /opt/netbeans/run.sh or some thing so > %U
    Type=Application
    

    This is the essential information, you can add more details such Icon and categories later.

    NOTE: the %U is very important after the Exec command without it the application won't appear in other applications list.

  2. After that, put the file in /usr/share/applications/ (need root privileges) and it should appear in the Dash when you type the name.

  3. Now go to any .php file, right click on it and choose properties -> open with -> show other application -> select your app.

  4. Enjoy coding!

  • at the first i just wanna thank you , but would you tell me how to do what you told me above in steps ? i'm new to ubuntu :D, thank you again – user2065802 Feb 12 '13 at 23:11
  • the answer is really helpful. But I've a question, why do I have to make a desktop entry? Its been already available in Dash when I search. – Mohammad Faisal Jan 28 '14 at 7:16
0

You can find the tutorial "How to set netbeans as default PHP IDE on ubuntu" at This page http://www.phpides.com/news/php-ide/how-to-set-netbeans-as-default-php-ide-on-ubuntu It is from http://netbeans.org/kb/docs/php/configure-php-environment-ubuntu.html

  • 1
    Welcome to Ask Ubuntu! Even though it's pretty clear you're not trying to conceal this information, we still require that you explicitly disclose that you're linking to your own blog, when doing so. At minimum, please edit your post to include such disclosure. In addition, it would be even better to include the essential parts of the answer here, and provide the link for reference. – Aditya Feb 13 '13 at 15:05
0

After installing Netbeans open terminal and write

sudo gedit /usr/share/applications/defaults.list

write the below code

application/x-php=netbeans-7.3.desktop 

and save the file.

0

After installing netbeans open the terminal and do the followings:

  1. Open terminal
  2. run the command sudo gedit /usr/share/applications/netbeans.desktop

[Desktop Entry]
Name=NetBeans
Comment=Integrated Development Environment
Exec=/bin/sh "/home/ramesh/netbeans-8.2/bin/netbeans" %U
Icon=/home/ramesh/netbeans-8.2/nb/netbeans.png
Categories=Development;IDE;Java;
Terminal=false
Type=Application
Keywords=development;Java;IDE;platform;javafx;javase;

Note:- Don't forget to replace netbeans path

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.