PDA

View Full Version : [SOLVED] 10.04 - I can't change my file associations



lanzd
February 28th, 2012, 03:07 AM
I currently have netbeans 7.0.1 installed on my machine and installation goes through without a hitch. I can open up the program and create new projects and files. The issue I'm having is when I double click a file (.php in this case) I can't get it to automatically open in netbeans.

When I try:
Right click the file->properties->open with tab->add->and select netbeans

I get an error "Could not find '/usr/bin/netbeans'". I follow all the the instructions (which are everywhere) for installing netbeans but it seems to want to install into

/home/username/netbeans-7.0.1

which is probably why it can't find netbeans in the other directory. I can change the directory netbeans installs in but I get permissions errors when trying to install it to /usr/bin/netbeans. I can change permissions but I don't think this is the correct way to go about this.

Any help is appreciated, Thanks

Paddy Landau
February 28th, 2012, 05:16 PM
Two answers.

Either:


Use the directory where netbeans is installed.

Or:



Install netbeans as root (using sudo or gksudo as appropriate) to /usr/bin. You'll want to first deinstall your current installation.

lanzd
February 29th, 2012, 06:28 AM
How would I specify my modified path for the file association? The only way I know how is by right clicking and going to properties. When I do it that way, it gives me an error when I select netbeans.



Could not find application
Could not find '/usr/bin/netbeans'
It may be worth noting that in this same window, netbeans does not have an icon whereas the rest of the items in the list do.

----------------------
While typing this I was looking around and it seems the only executable I have to run netbeans is a DOS/Windows .exe and the icon for it is a "Wine" icon. I may be having this issue because the version I downloaded was a windows version. But the name of the file I got off of netbeans site was "netbeans-7.0.1-ml-php-linux.sh".

----------------------

I'm going to look into that later, but regardless can anyone explain how to customize file associations in ubuntu? (10.04 if it matters). Other then the "right click->properties->open with...." method.

Thanks, Dan

Paddy Landau
February 29th, 2012, 03:26 PM
... can anyone explain how to customize file associations in ubuntu? (10.04 if it matters). Other then the "right click->properties->open with...." method.
I think that is the only method, as it is Nautilus that holds the associations.

Right-click > Properties > Open With > Add > Use a custom command > Browse > (navigate to your executable)

lanzd
February 29th, 2012, 04:06 PM
I'm at work at the moment so I can't see if I have the " Use a custom command > Browse > (navigate to your executable) " part of that.

When i get home I'll double check, if it was there this whole time I'll feel stupid lol.

Thanks Dan

lanzd
March 1st, 2012, 01:22 AM
Allright, so I just got home from work and started looking at this. I am in fact downloading and installing the linux version, so I find it weird that my executable is a DOS/Windows .exe. Besides that I looked for and found the "Use a custom command" option and navigated to my netbeans executable at

"home/~username~/netbeans-7.0.1/bin/netbeans.exe"

and tryed adding it, but no bueno. But reading the wording of "Use a custom command" stuck me with a great idea. I can just type in the prompt command right there to make it work. That ended up working.

After all this though, I was looking in my netbeans folder where the .exe is and realized, staring me right in the face was the shell script to execute netbeans. I wanted to see if it would work if I navigated to that shell script in the "open with" tab and it did.

I feel so dumb, I was looking for a similar "type" and icon to what I mostly have in my /bin directory.

Well, thank you for all of your help. Now I know lol.

Dan

Paddy Landau
March 1st, 2012, 08:13 AM
Fantastic, I'm glad you managed to figure it out. That's a great learning experience!

Please mark the thread as solved (https://wiki.ubuntu.com/UnansweredPostsTeam/SolvedThreads).