Anyone know the magic incanttions needed to associate ~/vw7.9.1/bin/linux86/vwlinux86gui with .im files on Ubuntu 12.04, so that you can double click a .im file to open it up?
Thx for any tips, Ken G. Brown _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Personally, I always use a script, but here's an article about how to do
this: http://www.packtpub.com/article/control-of-file-types-in-ubuntu I *haven't* tried it out. On 4/26/13 2:03 PM, Ken G. Brown wrote: > Anyone know the magic incanttions needed to associate ~/vw7.9.1/bin/linux86/vwlinux86gui with .im files on Ubuntu 12.04, so that you can double click a .im file to open it up? > > Thx for any tips, > Ken G. Brown > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Ken G. Brown
Ken, Take a look at the preview/bin directory in your VW installation. There's a shell script and a not-quite-up-to-date INI file that you can put somewhere in your path. Then, if you turn on execute permissions on your images (chmod u+x myImage.im), you can run the images directly. This will choose the correct VM for the image as well, which is handy if you have multiple versions of VW installed at the same time.
That might not be enough, but it will get you most of the way to where you want to go, I think. See the readme.txt file in that directory for instructions and details.
Randy On Fri, Apr 26, 2013 at 1:03 PM, Ken G. Brown <[hidden email]> wrote: Anyone know the magic incanttions needed to associate ~/vw7.9.1/bin/linux86/vwlinux86gui with .im files on Ubuntu 12.04, so that you can double click a .im file to open it up? Randy Coulman Email: [hidden email]
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Thx, that does look pretty good. I couldn't get thru all the details right now, but from the readme, I saw that I could do the following:
The .im files have exec visual in the first bytes, so when executing from the command line, it looks for a program called visual For this the image needs to be executable: chmod u+x myImage.imAdd symlink to the VisualWorks executable, call it visual, in this case I used my home directory: ln ~/vw7.9.1/bin/linux86/vwlinux86gui visual The path to visual must be in the PATH environment variable Add the following line to ~/.bashrc to add the path to the symlink called visual: PATH=$PATH:~/;export PATH; Restart the shell for the changes to take effect or source it, i.e.: source ~/.bashrc Execute the image from command line: myImage.im <ret> Works! I couldn't get it to work however by double clicking in the Files listing. Mind you, a little startup script is almost as easy:
Thx, Ken On 2013-04-26, at 3:18 PM, Randy Coulman wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
The only adjustment I'd suggest is to symlink to the VisualWorks.sh shell script in that directory instead of the actual Visualworks VM. That way, it will launch the correct VM for any image you want to open. Randy On Fri, Apr 26, 2013 at 5:23 PM, Ken G. Brown <[hidden email]> wrote:
Randy Coulman Email: [hidden email]
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Good plan.
Now that I'm getting a better understanding, I'll have a closer look and give VisualWorks.sh a try. Thx, Ken On 2013-04-26, at 6:27 PM, Randy Coulman wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Randy Coulman
I made a new directory ~/vwScripts and copied ~/vw7.9.1/preview/bin/VisualWorks.sh and VisualWorks.ini there along with visual, which I symlinked to VisualWorks.sh there. I put the following line in VisualWorks.ini, using ~/ for the home directory does not work, it has to be fully written: 79 01 00 00 /home/kbrown/vw7.9.1/bin/linux86/vwlinux86gui I entered the full PATH= for my PATH environment variable into ~/.pam_environment since that seems to be where such stuff should be done instread of in .bashrc. I added the ~/vw7.9.1 and ~/pathToMyImages to the end of the PATH variable. Careful when entering into ~/.pam_environment, it does not understand bash syntax, and if you bork your PATH, you cannot login anymore (don't ask). You have to logout and log back in to have .pam_environment changes to take effect. Indeed it now appears to work, can run my images from command line. That VisualWorks.sh is pretty scary, how do I know and have faith that my .im has been opened with the correct vwlinux86gui? How do you determine the image signature that needs to be used? I found the 79 01 only by accident when it once said there was no entry for that signature. Double clicking when in Files graphical file list does not yet work. Ken On 2013-04-26, at 6:27 PM, Randy Coulman wrote:
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I'm not sure why double clicking doesn't work. I've never tried that. The way I figure out image signatures is to run visual -ne myImage.im. That prints out the signature for you. Or, as you've done, just run the image and see the error message. Randy
_______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |