LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-02-2007, 10:24 PM   #1
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Rep: Reputation: 31
Wine Windows Emulation Trouble


I'm trying to associate all .exe files with Wine, so I followed the following tutorial: http://tinyurl.com/325grl

I added binfmt_misc to /etc/rc.d/rc.modules and also added the following mount line to /etc/fstab:

Code:
none /proc/sys/fs/binfmt_misc binfmt_misc 0 0
Finally, the most important two lines that needed to be added to /etc/rc.d/rc.local are:

Code:
echo ':windows:M::MZ::/path/to/wine:' >  /proc/sys/fs/binfmt_misc/register
echo ':windowsPE:M::PE::/path/to/wine:' > /proc/sys/fs/binfmt_misc/register
However, when I run either one of the echo statements, I get the following:

Code:
root@alkos333:~# echo -n ':windows:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
-su: echo: write error: Invalid argument
I decided to check the permissions against all other files that I echo things out to from within rc.local, so I ran the following command:

Code:
me@alkos333:~$ for file in $(grep 'echo' /etc/rc.d/rc.local | cut -d '>' -f 2); 
do 
ls -l $file; 
done
Output from the command above:

Code:
-rw-r--r-- 1 root root 0 2007-07-02 21:22 /proc/acpi/ibm/hotkey
-rw-r--r-- 1 root root 0 2007-07-02 20:50 /sys/devices/platform/i8042/serio1/serio2/speed
-rw-r--r-- 1 root root 0 2007-07-02 20:50 /sys/devices/platform/i8042/serio1/serio2/sensitivity
-rw-r--r-- 1 root root 0 2007-07-02 20:50 /sys/devices/platform/smapi/BAT0/stop_charge_thresh
-rw-r--r-- 1 root root 0 2007-07-02 20:50 /sys/module/processor/parameters/max_cstate
--w------- 1 root root 0 2007-07-02 21:20 /proc/sys/fs/binfmt_misc/register
--w------- 1 root root 0 2007-07-02 21:20 /proc/sys/fs/binfmt_misc/register
-rw-r--r-- 1 root root 0 2007-07-02 21:22 /proc/sys/dev/rtc/max-user-freq
What's weird about the register file, which I'm interested in, is that it's listed twice for some reason and it only has a write permission for the owner.

Last edited by alkos333; 07-02-2007 at 10:26 PM.
 
Old 07-03-2007, 02:46 PM   #2
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by alkos333
What's weird about the register file, which I'm interested in, is that it's listed twice for some reason and it only has a write permission for the owner.
That's because you have 2 'echo..' lines in rc.local. Seems there's a problem with the format of the echo arguments. That how-to is 5 years old by the way.

Last edited by dive; 07-03-2007 at 02:48 PM.
 
Old 07-03-2007, 03:29 PM   #3
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Quote:
Originally Posted by alkos333
However, when I run either one of the echo statements, I get the following:
Code:
root@alkos333:~# echo -n ':windows:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
-su: echo: write error: Invalid argument
You don't need to run the echo statements. Just reboot and run *.exe files. By the way, you run a 2.6 kernel, right?
 
Old 07-04-2007, 12:11 AM   #4
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Original Poster
Rep: Reputation: 31
Yeah, I'm running 2.6.20. What do you mean by reboot and run *.exe files? If I try to execute *.exe in bash, it tries to execute them as shell scripts and I need it to use wine to execute the files.

Last edited by alkos333; 07-04-2007 at 12:12 AM.
 
Old 07-04-2007, 12:44 AM   #5
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
FWIW, why not make up your wine style command lines

then in your ~/.bashrc just make a bunch of aliases

each (short) alias launches a longer wine style startup

This is Linux. Rather than to make Linux adopt to like DOS

(where, in DOS, app.exe launches the app)

--
Alan.
 
Old 07-04-2007, 10:51 AM   #6
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,974

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
Quote:
Originally Posted by Road_map
You don't need to run the echo statements. Just reboot and run *.exe files. By the way, you run a 2.6 kernel, right?
Do you mean that Slackware (or the 2.6 kernel) has this set up out of the box---that after modprobing binfmt_misc, you can type "/path/to/file.exe" and the file will automatically execute with Wine? No further setup is necessary?

I'd love to do some investigation myself, but my Linux box currently has Ubuntu on it so I can't.

And to answer acumming's question, one advantage of doing this is that it works in a graphical run dialog box as well as from the console. You'd be able to press ALT-F2 and type "minesweeper.exe" instead of "wine minesweeper.exe", which saves some work.

Last edited by dugan; 07-04-2007 at 11:03 AM.
 
Old 07-04-2007, 12:02 PM   #7
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Quote:
Originally Posted by dugan
Do you mean that Slackware (or the 2.6 kernel) has this set up out of the box---that after modprobing binfmt_misc, you can type "/path/to/file.exe" and the file will automatically execute with Wine? No further setup is necessary?
Yes, for all *.exe files from ~/.wine/drive_c. Example
 
Old 07-04-2007, 03:03 PM   #8
acummings
Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 615

Rep: Reputation: 49
Quote:
one advantage of doing this is that it works in a graphical run dialog box as well as from the console.
I was unaware that alias doesn't work in a run box. I just now tried one of my commonly used alias that works in Konsole, tried it in a run box. And, such alias does not work from a run box. (I learn something new every so often).

Now I'm wondering if alias can work in a .desktop (or launcher) file. I can't recall if I've tried this or not.

--
Alan.
 
Old 07-04-2007, 04:09 PM   #9
dugan
Senior Member
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 4,974

Rep: Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555Reputation: 1555
Thanks, Road Map. As soon as I find time time to install Slackware 12 and verify this myself, I'll remove the obsolete information from my guide.

I would like some clarification, though, on the purpose of the two echo statements in the rc.local file in your screenshot. If I understand you correctly, you seemed to be saying that they weren't needed.

Last edited by dugan; 07-04-2007 at 04:15 PM.
 
Old 07-04-2007, 06:44 PM   #10
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Quote:
Originally Posted by dugan
...two echo statements in the rc.local file in your screenshot. If I understand you correctly, you seemed to be saying that they weren't needed.
The initial alkos333 post is correct, but
Quote:
Originally Posted by alkos333
However, when I run either one of the echo statements, I get the following:
Code:
root@alkos333:~# echo -n ':windows:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register
-su: echo: write error: Invalid argument
At this point - as I said - it is't correct to run echo that way. It must run ./rc.local.

I tested today these informations in Slackware 12.0 (kernel 2.6.21.5-nosmp) with wine-0.9.40-i486-1kjz.tgz. It works.
 
Old 07-04-2007, 06:57 PM   #11
eoinrua
Member
 
Registered: May 2007
Location: Lurgan, Northern Ireland
Distribution: Ubuntu, Xubuntu and Puppy
Posts: 121

Rep: Reputation: 15
Note to Dugan

Hi Dugan,

I was flicking through new threads and I discovered your post, with the video-editing link.

I'm looking for decent video editing software in Linux and I wonder if you'd be prepared to follow through if I posted a new thread (I know video-editing doesn't belong in this one and I apologise to everyone for butting in).

I've recently moved over to Linux, using ubuntu, and I've found replacements for most of my Windows software. Statistics is a big thing for me and after a long thread with a lot of helpful posters I've found software I'm comfortable with.

This is a Slackware forum, so I'm well outta place, but I'll post a new thread on the software forum and hope to catch you there.

Best wishes,

eoinrua
 
Old 07-04-2007, 09:22 PM   #12
alkos333
Member
 
Registered: Dec 2006
Posts: 271

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Road_map
The initial alkos333 post is correct, but

At this point - as I said - it is't correct to run echo that way. It must run ./rc.local.

I tested today these informations in Slackware 12.0 (kernel 2.6.21.5-nosmp) with wine-0.9.40-i486-1kjz.tgz. It works.

So what you are saying is that as long as I run those echo statements by executing rc.local, I will be fine and can run *.exe files from anywhere on the system, not just ~/.wine/drive_c ?

Last edited by alkos333; 07-04-2007 at 09:25 PM.
 
Old 07-05-2007, 09:28 AM   #13
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
Quote:
Originally Posted by alkos333
So what you are saying is that as long as I run those echo statements by executing rc.local, I will be fine and can run *.exe files from anywhere on the system, not just ~/.wine/drive_c ?
Yes, you can run *.exe files from anywhere on the system. Usually, for files from ~/.wine/drive_c just cd to path and type <program>.exe. Also, some *.exe files (ex: setup programs) can be run directly from Desktop by clicking on that icon. I tested last night flashget190en.exe: the setup program ran perfectly, then it added a "shortcut" (link) on Desktop. Now I can run flashget by clicking an icon (I don't need flashget, it was only a test ). But another *.exe files run only by typing wine <path/to/file/program.exe>.
 
  


Reply

Tags
wine


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trouble running wine from src wine:error while loading shared libraries: libwine.so.1 brynjarh Linux - Newbie 2 05-28-2013 11:59 AM
Having trouble with SCSI emulation opto Linux - Newbie 3 01-05-2007 05:09 PM
trouble with scsi-ide emulation nard Linux - Laptop and Netbook 1 09-24-2004 09:26 PM
wine without scsi emulation evensen Linux - Games 0 05-12-2004 01:10 PM
Trouble with SCSI emulation for DVD/CDRW drive ohleary Linux - Hardware 5 11-18-2003 05:50 PM


All times are GMT -5. The time now is 04:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration