Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 31 Oct 2014, 04:28
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
using wine's binfmt_misc as interpreter
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
mikeslr


Joined: 16 Jun 2008
Posts: 794
Location: Union New Jersey USA

PostPosted: Wed 26 Oct 2011, 12:38    Post_subject:  using wine's binfmt_misc as interpreter  

Hi All,

Caveat: I am not a guru. My method of exploration is "monkey see, monkey do" + trial & error.

While exploring guydog, which uses emelfm2 rather than Rox as default file manager, I ran into difficulty attempting to run xp portables under wine. I keep all my portables on /mnt/home, which is also where I install all Puppies, so that I can use the same xp portable “installation” from any Puppy, and add them to each Puppy’s menu via a pet which places a script and icon in /my-applications/bin and a desktop file in /usr/share/applications calling that script and using that icon.

Following advice by pacer106, I was able to run the xp portable by browsing to it, but was not able to create either a menu entry or a wbar entry. See

http://www.murga-linux.com/puppy/viewtopic.php?p=574585#574585

iguleder called my attention to the possibility of using wine’s binfmt_misc module as an interpreter.
http://www.murga-linux.com/puppy/viewtopic.php?p=574643#574643

This is a status report of my efforts if others are interested in pursuing that possibility.

Following the instructions I found here:
https://wiki.archlinux.org/index.php/Wine#Using_Wine_as_an_interpreter_for_Win16.2FWin32_binaries

I edited /etc/rc.d/rc.local to add Code:

{ echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null

and edited /etc/fstab to add Code:

none /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0

I then created a script in usr/bin hoping it would call FoxitReaderPortable.exe. I chose usr/bin because it’s on the path, while /my-applications/bin, not being part of the standard Linux structure, might introduce unforeseen complications.

After creating the script, which I named Foxit, I changed its permissions to make it executable. Uncertain whether it was necessary, I then rebooted.

My script code was:

#!/bin/sh
cd /mnt/home/Foxit
chmod 755 FoxitReaderPortable.exe
./FoxitReaderPortable.exe

After clicking Foxit, emeelFM2 reports the following error:
/usr/bin/Foxit: line 4: ./FoxitRederPortable.exe: cannot execute binary file
>/usr/bin/Foxit (9148) returned ‘126‘

I note the following: An error was not reported regarding line 2. I had added line 2 because in its absence, prefixing FoxitReaderPortable with its location at /mnt/home/Foxit had returned a 126, So I take it line 2, in fact, changes to the /mnt/home/Foxit folder without an error. [The change was probably not necessary, but clarified that 126 was not being used to indicate "file not found."] Similarly, as line 3 does not report an error, I think the edits to rc.local and fstab and the code to initiate binfmt_misc were successful.

Goggling error 126 revealed that sometimes this error is reported when some of the DLLs on your system are missing. I suspect this may be the problem because when “opening” the xp portables by clicking them after browsing to their exes with emelfm2, although they open, emelfm2 reports:
“err:module:load_builtin_dll failed to load .so lib for builtin L “winemp3.acm”: libmpg123.so.0: cannot open shared object file: No such file or directory”

Similar results were obtained with the XP Portables 7-Zip and FileZilla.

In short, it appears that xp portables will open when called directly via the OS+wine even when some libraries are not found by wine, but will not open it when wine is used as an interpreter. The missing libs could be added to wine's registry, but this would defeat the convenience of not having to "install" anything in order to use portables.

Thoughts and suggestions are welcomed.

mikesLr
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 26 Oct 2011, 14:05    Post_subject:  

I have no idea about the whole thing , never used wine ;

but adding something to fstab does not mean , that it gets automatically mounted

AND before echoing something to a file inside that mountpoint .

You would need something like

mount-FULL -t binfmt_misc none /proc/sys/fs/binfmt_misc

before

echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null

in /etc/rc.d/rc.local

I do not know if it is important in which directory this shoukd happen :

/sys/fs includes aufs ext4 fuse
/proc/fs incl ext4 jbd2 nfsd reiserfs xfs
ATM on my side ,
and since puppy tends to mount things in /dev

i have
/dev/fs/binfmt_misc/register
/dev/fs/binfmt_misc/status
as files inside there .

Other filesystem mounted in /dev/fs are currently hugetlb security debug in my case , newer puppy kernels might have more features like cgroups enabled .

The file /proc/filesystems contains little info about fs and if none|nodev .
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0766s ][ Queries: 11 (0.0300s) ][ GZIP on ]