Double-click to launch app gives error

Feel free to post here any question you may have about muCommander.

Double-click to launch app gives error

Postby wdicks » Wed May 27, 2009 12:23 pm

I am using muCommander on Mac OS X 10.5.

When I double-click on a file to launch its registered application, I get the error "An error has occurred while performing the requested operation." :roll:

As an example, if I double-click on a .pdf file, I expect Adobe Reader to open the file, a .jpg file should be opened by CocoView, and a .doc file should be opened by Open Office.

Is there anything I can do to fix this problem?

Thanks,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Wed May 27, 2009 12:36 pm

Hey William,

That's rather weird, I can't really work out what's happening. You didn't change your commands.xml file, by any chance?

Let me give you a few things to try and report the results back to me, it should make the diagnosis easier.

1) Check whether it's a general problem or tied to double-click only
Instead of double clicking the file you want to open, just highlight it and press enter. If it works, the problem is with double-clicking.

2) Make sure that the open command works
Identify a file that you wish to open, say the PDF file you were talking about earlier. For the purpose of the discussion let's say it's located in ~/Documents/MyPdf.pdf
Open your terminal and type in open ~/Documents/MyPdf.pdf
In theory, that should open your PDF with either Preview or Adobe Reader, depending on how your system is configured. If that doesn't happen, you're stuck: something is seriously wrong with your system and I can't really fix it for you.

3) Make sure muCommander is properly configured
This is a bit hackish, so bear with me.
Go to ~/Library/Preferences/muCommander and create a file called commands.xml.
Put the following content in it:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<commands>
    <command alias="open" value="open $f"/>
</commands>


Restart muCommander and check whether the problem was solved.

Could you try these steps and let me know what happens?

Cheers,
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Thu May 28, 2009 7:51 am

Hi Nicolas,

Thanks for your reply.

I'll answer according to the points of your suggestions.

1) Selecting a file and pressing Enter gave the same error as double-clicking.

2) The open command in the Terminal opened a PDF file and others I tried.

3) I have added the commands.xml file and the contents you suggested but that does not make a difference after restarting muCommander.

Double-clicking works in Finder, if that helps. I downloaded XFolder to test and the double-clicking works there. However, I do not find the rest of XFolder's functionality as good as muCommander

In muCommander I opened the Run Command dialog and typed in the open command with a PDF file and that opened the PDF file.

Using double-click to open folders or even zip files work fine.

I hope this helps in finding the problem.

Thanks,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Thu May 28, 2009 8:21 am

Hey William,

Ok, that's *really* strange. Out of curiosity, which version of muCommander are you using? Do you have the same issues with the nightly build? If you haven't downloaded it, I suggest you give it a go, there's been a fair amount of work fixing bugs and other things since the latest official release.

Just to make sure you put the commands.xml file I suggested in the right location, edit it so that it looks like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<commands>
    <command alias="open" value="open $f" display="Test"/>
</commands>


Restart muCommander, right click on any file, select "Open with...". It should contain a "Test" item, and once you select it, it should open the file correctly.
Note that I'm not suggesting this as a fix to your problem, it's horribly cumbersome to have to right click / open with on all files, it's just meant to help me work out what's wrong with your install.

Cheers,
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Thu May 28, 2009 8:59 am

Hi Nicolas,

I have version 0.8.3. I haven't downloaded the nightly build.

I have made the changes to the commands.xml file. However, the "Open with" option is grayed out.

I found the muCommander directory under /Users/williamdicks/library/Preferences/muCommander. This is where I added the commands.xml file.

I will download the nightly build now. Just downloaded nightly build (0.8.4), but it hasn't made a difference.

Thanks,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Thu May 28, 2009 9:45 am

Ok, well, that rather explains things. It doesn't really tell me how to fix your problem, but at least I understand what's happening.

Alright, a few other things to try:
1) Can you make absolutely 100% sure that your commands.xml is correct and located in the right directory? Case might be important depending on the FS you're using.
When you say you found the muCommander preferences folder, do you mean that it was already there, or did you have to create it?

2) I'm assuming that you're logged in as williamdicks. Just making sure you didn't edit somebody else's preferences :)

3) Assuming that you installed muCommander in /Application, can you type in the following command in your terminal:
Code: Select all
java -jar /Applications/muCommander.app/Contents/Resources/Java/mucommander.jar

and let me know what it prints out?

I'm reaching for straws here, it really makes no sense for muCommander not to load your commands.xml file unless it's syntax is incorrect...
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Thu May 28, 2009 1:54 pm

Hi Nicolas,

1) The muCommander preferences folder was already there.
Before I added commands.xml, the following folders and files were there:
extensions
themes
action_keymap.xml
command_bar.xml
preferences.xml
shell_history.xml
toolbar.xml
user_theme.xml

2) I am logged in as williamdicks. I am the only user.

3) The java command printed out the following:
"Could not load bookmarks: /Users/williamdicks/Library/Preferences/muCommander/bookmarks.xml (No such file or directory). Using default values."

Something interesting happened. After java loaded the JAR file using the command you gave me, I tested the double-click to open a PDF file and it worked.

Does that tell you something?

Cheers,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Thu May 28, 2009 2:05 pm

What the ?!?

This is a stab in the dark, but I'd say that either your JavaApplicationStub is borked or you're using an odd VM. I'll need a bit more information about your system to work out what's going on. Could you paste the information located at the bottom of the About dialog? It should look something like:
Code: Select all
Version information

muCommander
Version: 0.8.4
Build date: 2009/05/18

Java VM
Name: Java HotSpot(TM) 64-Bit Server VM
Version: 1.6.0_07-b06-57
Vendor: Apple Inc.

OS
Name: Mac OS X
Version: 10.5.7
Architecture: x86_64

Locale
Language: en
Country: US
Encoding: UTF-8


Cheers,
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Thu May 28, 2009 3:22 pm

Here you go Nicolas:

Code: Select all
muCommander
Version: 0.8.4
Build date: 2009/05/23

Java VM
Name: Java HotSpot(TM) Client VM
Version: 1.5.0_16-133
Vendor: Apple Inc.

OS
Name: Mac OS X
Version: 10.5.7
Architecture: i386

Locale
Language: en
Country: US
Encoding: UTF-8
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Thu May 28, 2009 3:51 pm

Thanks for that.

First question: since I forgot to specify, did you get this information when launching muCommander the regular way or through java -jar ?

Second question: this is going to sound strange, but where did you find the About dialog menu item? Was it in the muCommander menu or in the help menu?
I'm asking because I'm getting the feeling that muCommander is confused about which OS it's running on, which would explain why it's ignoring the commands.xml I gave you and not able to open files.
Could you check this both through muCommander.app and java -jar mucommander.jar ?

Thanks!
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Thu May 28, 2009 4:06 pm

1) I got the info by launching muCommander the regular way.

2) The About dialog is in the muCommander Menu.

The previous info I sent you came from launching muC the regular way.

The following ino is from launching it the java way:
Code: Select all
muCommander
Version: 0.8.4
Build date: 2009/05/23

Java VM
Name: Java HotSpot(TM) Client VM
Version: 1.5.0_16-133
Vendor: Apple Inc.

OS
Name: Mac OS X
Version: 10.5.7
Architecture: i386

Locale
Language: en
Country: US
Encoding: MacRoman


As you can see, it looks pretty much the same, except for Encoding.

Cheers,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Thu May 28, 2009 6:29 pm

Not good news. I'm racking my brain trying to work out what's happening, but no luck so far.
Could you do me a favour and check whether you have a ~/.mucommander directory?
If you're not sure how to do that, just open the terminal and type in cd ~/.mucommander. If you get an error message, you don't have the directory, which is the expected behaviour if muCommander isn't confused about your OS.

The only thing I can think of is that the JavaApplicationStub bundled with muCommander is somehow corrupt on your system. If you want to check that, it's a bit hackish. Let's start by locating your VM's JavaApplicationStub.

The first place to look is /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/. This is the standard installation directory, but this is not always respected for some reason. If it's not there, cd to /System/Library/Frameworks/JavaVM.framework/Versions/ and run:
find . -name JavaApplicationStub\*
This should tell you where the file is. It might also tell you where the 64 bits version is (JavaApplicationStub64) but ignore that, since you're running a 32 bits VM.
Copy that file to /Application/muCommander/Contents/MacOS.
Couple of pitfalls:
- you might want to back your old /Application/muCommander/Contents/MacOS/JavaApplicationStub file up, just in case this messes muCommander up.
- don't copy the file using muCommander, you're running a 1.5 VM which doesn't preserve file permissions. Use cp.
If you're not sure how to do that, type this in Terminal.app:
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub /Application/muCommander/Contents/MacOS/JavaApplicationStub

Try and restart muCommander, with any luck, it'll work properly now.
If it plain refuses to start, type in:
chmod +x /Application/muCommander/Contents/MacOS/JavaApplicationStub
If it still refuses to boot, type in:
open -a muCommander
And tell me what the error message is
If it boots and still isn't working properly, well, I'm upset.

Sorry to have you jump through so many hoops, I really don't know how to help you otherwise.
Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Fri May 29, 2009 6:31 am

Thanks for all the time you re putting into this Nicolas.

Following your suggestions, I discovered that I do not have a /Application/muCommander/Contents/MacOS directory. muCommander.app is in /Application. Is that the problem?

BTW, if you meant /Application to be /Applications, I do not have a /Applications/muCommander/Contents/MacOS directory either.

W.
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Re: Double-click to launch app gives error

Postby Nicolas » Fri May 29, 2009 9:27 am

Ah, sorry, I should have paid more attention.

Wherever I say /Application/muCommander, replace by /Applications/muCommander.app

Nicolas
User avatar
Nicolas
 
Posts: 804
Joined: Mon Oct 02, 2006 10:36 pm
Location: France

Re: Double-click to launch app gives error

Postby wdicks » Fri May 29, 2009 10:41 am

I did the following copy:
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub /Applications/muCommander.app/Contents/MacOS/JavaApplicationStub

It did not complain at all. I restarted muCommander.

You said:
If it boots and still isn't working properly, well, I'm upset.


Well, it is such time. You may be upset now. :shock: I still get the same error.

The question, I guess, is why does it work when the JAR file is launched using the java command?

Cheers,
William
wdicks
 
Posts: 12
Joined: Wed May 27, 2009 12:13 pm

Next

Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest