#320 closed enhancement (fixed)
opening ChimeraX file from system command line doesn't actually open file
| Reported by: | Elaine Meng | Owned by: | Tom Goddard |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Input/Output | Version: | |
| Keywords: | Cc: | Conrad Huang, Eric Pettersen, Tom Goddard | |
| Blocked By: | Blocking: | ||
| Notify when closed: | Platform: | all | |
| Project: | ChimeraX |
Description
At least on a Mac, opening a ChimeraX file from the system command line starts ChimeraX but doesn't actually open the file. For example, from mac Terminal:
meng% open carlink.cxc
...started ChimeraX but it didn't execute the commands, although I doublechecked that the file was definitely present in that same directory. Similarly, ChimeraX is started but the session is not restored if I try to open a cxs file in the same way.
Feel free to adjust the Owner and CC. I didn't know whom to assign this to.
Change History (9)
comment:1 by , 10 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:3 by , 10 years ago
| Owner: | changed from to |
|---|
This ticket isn't about drag-and-drop of a file on ChimeraX, it is a file specified on the shell command-line when starting Chimera and is an issue of parsing start-up command-line arguments.
comment:4 by , 10 years ago
| Owner: | changed from to |
|---|
The file name from an open is not given on the command line. It comes from an Apple event.
comment:5 by , 9 years ago
| Type: | defect → enhancement |
|---|
Would be a nice feature -- marking it as an enhancement, not a bug.
comment:6 by , 8 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fixed.
Added drag and drop support a few days ago which involved handling Qt FileOpen events that allow the macOS "open" command to start ChimeraX and have it open the named file. Still it was not working before because ChimeraX tried to open the specified file as soon as the splash screen appeared because that is when the FileOpen even gets dispatched and it wasn’t far enough along in the startup to open a file at that point.
Also drag and drop of a file onto the Mac ChimeraX Dock icon will start the app with that file now.
comment:7 by , 8 years ago
One caution. If you have multiple ChimeraX versions on your computer then it may not start your newest version. If it starts a very old version and you are having it open a session file, that may fail. On Mac you would want to tell macOS which copy of the program it should use. Unfortunately it does not seem to be smart enough to use the most recent copy. You right click on a file (e.g. ChimeraX session, *.cxs) use Get Info, and change Open With... to choose the version you want to opened when double clicking or drag and dropping that file. There is an option to apply this to all files of that type. Annoying, but a macOS issue we have no control over.
follow-up: 8 comment:8 by , 8 years ago
The drag-and-drop on the icon of the ChimeraX daily build now works fine for me even if ChimeraX is not running. However, the open from system command line or with doubleclicking remains stubbornly resistant… but apparently it’s all the Mac’s fault. As soon as I use the Finder, Get info, "change all” to use the daily build, it immediately changes back to open with the alpha again, as shown in the Get info panel. It’s not that important to me, just mysterious/annoying.
comment:9 by , 8 years ago
Countless people have complained online about the Mac "opened with" "change all..." setting not working. I also find it does not work. Super annoying, but it seems it is Apple's problem with no solution. One thought is that the trouble is that we don't update the ChimeraX version, so Mac Launch Services can't distinguish our different versions in the file associations. I tried changing a ChimeraX version (Info.plist file) by hand, but it did not fix the "change all file associations" problem.
ChimeraX needs to have support for Apple events to get open event. Perhaps Qt has support for it?