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 Mon 21 May 2018, 09:12
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 [2 Posts]  
Author Message

Joined: 16 Jun 2008
Posts: 2407
Location: 500 seconds from Sol

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


iguleder called my attention to the possibility of using wine’s binfmt_misc module as an interpreter.

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

Following the instructions I found here:

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:

cd /mnt/home/Foxit
chmod 755 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.

Back to top
View user's profile Send private message 
Karl Godt

Joined: 20 Jun 2010
Posts: 4208
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


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
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 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum

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