# Wine failure



## KenGordon (Jan 21, 2020)

I need to be able to run a couple of WIndows apps on my FreeBSD box, among them one named AirMail, which is does digital ham radio stuff. I did `pkg install wine`, which appeared to go correctly. When I then went to the executable for AirMail and tried to start it, Wine gave me some stuff about needing gecko and something else. After I let Wine go get those and install them, when I then try to activate any Windows executable, I get a clock icon, which hangs there for some time, then just quietly "goes away" and nothing happens.

Anyone else run into this or something similar?

Ken Gordon


----------



## shkhln (Jan 21, 2020)

KenGordon said:


> when I then try to activate any Windows executable



That's the part where you are supposed to provide the terminal output.



KenGordon said:


> Anyone else run into this or something similar?



Downright impossible to tell.


----------



## Deleted member 30996 (Jan 21, 2020)

I hate to beat a dead horse but I know this pony will run...


KenGordon said:


> I did `pkg install wine`, which appeared to go correctly.


You're mixing ports and pkg. That's generally not considered to be a good thing for people who have been using FreeBSD for a while and I only do as a last resort to get something installed. Sometimes then it breaks or doesn't write to every file like it should and I can fix it. GIMP and having to create machine-id comes to mind.



KenGordon said:


> When I then went to the executable for AirMail and tried to start it, Wine gave me some stuff about needing gecko and something else. After I let Wine go get those and install them, when I then try to activate any Windows executable, I get a clock icon, which hangs there for some time, then just quietly "goes away" and nothing happens.



That probably wouldn't happen with the Master of Ports. Sometimes things need to be installed in the correct order, or reinstalled in the build process.

I would advise you to use ports or pkg. Not both. I'm not the same situation as you, I just run a desktop, but I would do what it took to get ports installed and stick with portmaster.

I taught myself to use ports the hard way by trial, lots of errors and google-fu instead of the Handbook so I can sympathize with you having a hard time. But you're bringing a lot of it on yourself, Hoss.


----------



## KenGordon (Jan 21, 2020)

Thanks, but I have been absolutely adamant against mixing packages and ports. So far, everything I have installed on this machine has been via the packages. I also did a `pkg upgrade` before I ever started installing needed apps. That resulted in some 400 MB of "stuff" being worked on.

Therefore, it looks as though you are telling me that Wine installed those two PORTS, gecko and whatever else, from the ports thereby mixing packages and ports for that particular app, wine. So, I think I need to uninstall (`pkg delete wine`). then find those other two apps that wine thinks it needs and delete those by hand. Then reinstall the whole shebang via the packages. Is that correct? Or would you advise simply installing wine and its dependencies via the ports?

But, in that case, wouldn't I be mixing packages and ports, since everything else I have installed has been by the packages.? Or, by "mixing packages and ports" do you mean for ONE particular app, and not for the entire system? I.e., on my system, can I install a particular app via the packages, and a different app via the ports without difficulty?

I tried to `pkg install gecko` during an earlier attempt to get wine operational, but gecko couldn't be found in the packages.

I had thought about installing wine, etc., from the ports, but I feel less than confident about finding and installing all the dependencies, plus there is my extreme desire to NOT mix packages and ports. Due to some earlier "difficulties" with my new system, I am avoiding mixing the two like the plague.

Your advice?

Ken Gordon


----------



## KenGordon (Jan 21, 2020)

shkhln said:


> That's the part where you are supposed to provide the terminal output.


What, exactly, do you mean by that? I am trying to relearn Unix/FreeBSD/HP-UX, which I last used 20 years ago, and I have forgotten a lot.



shkhln said:


> Downright impossible to tell.


I understand.

Ken Gordon


----------



## Deleted member 30996 (Jan 21, 2020)

KenGordon said:


> Thanks, but I have been absolutely adamant against mixing packages and ports. So far, everything I have installed on this machine has been via the packages.



I must have been mistaken. I assumed that by this you meant you used portmaster to install a third party program on your machine.









						Another nvidia-driver problem thread, please help this should be simple.
					

Hi All Installing 12.1 with xfce to act as my desktop. Everything goes OK with xorg and even xfce. I installed slim and it all works except I have low resolution on my desktop because I haven't installed the correct driver for my GeForce 6600.  I compiled nvidia-driver-304 from ports without a...




					forums.freebsd.org
				







KenGordon said:


> I had thought about installing wine, etc., from the ports, but I feel less than confident about finding and installing all the dependencies,



ports-mgmt/portmaster

That's what I've been trying to tell you. It does that for you.


----------



## Sevendogsbsd (Jan 21, 2020)

Ken - I believe there are 2 wine packages: 32 bit and 64 bit. Not sure which your application requires. If 32 bit, then install the 32 bit wine package: "i386-wine". If 64 bit, then install the "wine" package. The gecko and mono package names are "wine-gecko" and "wine-mono" respectively. 

Perhaps there is a bit of terminology confusion: a port is the source code of an app in the ports tree /usr/ports that gets compiled into a package and installed behind the scenes using the package system. Package are pre-compiled binaries. For consistency, I always refer to installing a "package" if I am referring to the `pkg` command and "port" if I am referring to using the ports tree as mentioned earlier, or the tool trihexoganal referred to earlier ports-mgmt/portmaster.

The source code of ports is always newer than the code used to compile pre-built packages so that's why not mixing is advised. The version differences can cause problems with dependency versions.

Sorry, that was long but hopefully made sense.


----------



## KenGordon (Jan 21, 2020)

Trihexagonal said:


> I must have been mistaken. I assumed that by this you meant you used portmaster to install a third party program on your machine.
> 
> 
> 
> ...


Oh. I can see where the confusion lies: I was not the OP of that thread, and as far as I can see, it was the OP who used portmaster for his work. I joined that thread far down on the "list" because the OP was having much the same sorts of problems I was with my Nvidia install. Turns out MY problems were mainly due to my "fat-fingering" a file.



Trihexagonal said:


> ports-mgmt/portmaster
> 
> That's what I've been trying to tell you. It does that for you.


Thank you for that. I have not yet learned enough to use portmaster, but I can see now that it is probably past time that I did. I'll work on that now.

BTW, that brings up a point: how does one determine the "number" of a thread? I have not been able to  find that yet.

Ken Gordon


----------



## KenGordon (Jan 21, 2020)

Sevendogsbsd said:


> Ken - I believe there are 2 wine packages: 32 bit and 64 bit. Not sure which your application requires.


Neither am I. My system is a 64 bit system, but from some things I have read, perhaps I should be using the 32 bit Wine. I'll figure that out eventually.


Sevendogsbsd said:


> If 32 bit, then install the 32 bit wine package: "i386-wine". If 64 bit, then install the "wine" package. The gecko and mono package names are "wine-gecko" and "wine-mono" respectively.


Thank you for that info.


Sevendogsbsd said:


> Perhaps there is a bit of terminology confusion: a port is the source code of an app in the ports tree /usr/ports that gets compiled into a package and installed behind the scenes using the package system. Package are pre-compiled binaries.


I finally figured that out, which is why I did `pkg upgrade` at one time. I figured that doing that would "upgrade" any packages I needed to the latest versions. That worked for at least one file I needed.


Sevendogsbsd said:


> For consistency, I always refer to installing a "package" if I am referring to the `pkg` command and "port" if I am referring to using the ports tree as mentioned earlier, or the tool trihexoganal referred to earlier ports-mgmt/portmaster.


As I mentioned, I need to learn about port-master. Dunno much more about it at this point than that it exists. I'll work on that.


Sevendogsbsd said:


> The source code of ports is always newer than the code used to compile pre-built packages


Ha! I (eventually) figured that out too. 


Sevendogsbsd said:


> so that's why not mixing is advised. The version differences can cause problems with dependency versions.
> 
> Sorry, that was long but hopefully made sense.


Yes, it most certainly does make sense and I thank you for it.

Now....to work

Ken Gordon


----------



## Deleted member 30996 (Jan 22, 2020)

KenGordon said:


> BTW, that brings up a point: how does one determine the "number" of a thread? I have not been able to  find that yet.



I just woke up and only on my second cup of Java, but if this is what you mean:

"I took those rules directly from the same ruleset I'm using now. Watch the boot screen and see if you can catch what lines it's on. The only thing I see ATM that could be a syntax error might appear on line #2. (If you didn't change "Network Interface Designation Goes Here" to what it shows in ifconfig.)"



			https://forums.freebsd.org/threads/beginners-guide-how-to-set-up-a-freebsd-desktop-from-scratch.61659/page-4hat
		


That applies to a syntax error in /etc/pf.conf and it will show the line number it fails at on the screen during the boot process to inform you pf did not start.


----------



## Deleted member 30996 (Jan 22, 2020)

KenGordon said:


> Thank you for that. I have not yet learned enough to use portmaster, but I can see now that it is probably past time that I did. I'll work on that now.



I may be  oversimplifying things but there really isn't anything to learn about using it. You call it to install a new program with this command, modified to suit your program:

`# portmaster www/firefox`

Then it will show you screens of the dependencies it will pull in and give you the option to change any of the default variables. Always read what it says (before you Windows click away Enter at anything), not to imply you would do that. For instance, if you didn't enable IPv6 buring the base system build process make sure you disable that option when the screen shows it enabled by default. If it doesn't need changed to suit your needs don't change any default settings.

When it's done it will list all the dependencies to be installed, or any that will be rebuilt during the build process and the program you want built at the bottom of the list to be installed last.

Then you hit Enter to OK it and go for a smoke while it does its thing. I run it from the login terminal so the screen doesn't go dark every 10 minutes and can keep an eye on its progress at a glance. If it stops at an error it's much the same process of figuring out what needs done to continue on as if you had done it manually. Only now after you fix it you restart portmaster like you did at the start. It will not do the same work twice and finish out the build where it left off.


----------



## KenGordon (Jan 22, 2020)

Thanks for that. 

I have downloaded and printed off everything I could find on the web about installing Wine on FreeBSD. From what I can see there, I should be using i386-wine instead of wine as I have been attempting. I am still a bit confused on that issue, but trying to use straight wine, has not worked. More work to do. And again, thank you for your help and patience.

Ken Gordon


----------



## KenGordon (Jan 23, 2020)

So, I tried to install Wine according to the WineHQ Wiki on a different installation of FreeBSD. Still no joy. Back to the drawing board.

Ken Gordon


----------



## Sevendogsbsd (Jan 23, 2020)

Ken - what difficulty are you having - running a specific Windows application or actually installing emulators/i386-wine?


----------



## KenGordon (Jan 24, 2020)

Specifically, I cannot get Wine to install correctly apparently, nor run, on two computers. I have tried every method I know about or have learned about to do so, and none works. I have read, and printed off, everything I could find on the web and in the Handbook and on this forum about this before I ever started.

Yesterday, I finished the main part of the installation of FreeBSD on this computer, which is our main office computer, and every other application I have so far installed works just fine...except Wine.

I first attempted to install i386-wine via `pkg install i386-wine` AFTER I did the same with wine-mono and wine-gecko (since both were supposedly "necessary"), then did i386-wine. The installations appeared to go forward without problems. 

But, when I then attempted to run MS-Word, it hung for several seconds, then just quietly quit. I then attempted to run another WIndows program, specifically, my Pegasus e-mail client. The same thing happened.

I then did `pkg delete (program)` for all three, then installed them all via the individual ports. That took a lot longer than doing it via the packages, and included what seemed to me to be a lot of additional (supporting?} programs. I got the same result when attempting to run any MS program as before.

I then deleted everything, leaving out of the process both wine-mono and wine-gecko, reinstalled only i386-wine, and attempted to run MS programs via Wine and got the same result.

Then I deleted everything, and tried doing as before, but with Wine (64 bit?). Same result, for both methods.

Now, FYI, I have mounted my MS drives (I have three separate drives in one computer, and two in this one) via the necessary methods, installing Fuse, making the appropriate edits to /etc/rc.conf and /boot/loader.conf, then doing `ntfs-3g /dev/ada0s2 /media/Win10`. I can easily find the drive, and its contents.

I run FreeBSD on both computers from one of those separate bare drives in each computer.

But getting any MS program, even the most simple, to run with Wine fails every time. I am about to give up on it. I can live without it, although if I am really going to stop using Win10 as much as possible, this is making it very inconvenient.

Ken Gordon


----------



## patovm04 (Jan 24, 2020)

What about if you run `winecfg` or `wine wordpad` in a terminal. Does anything show up??
Just to corroborate that wine was properly installed


----------



## KenGordon (Jan 24, 2020)

I have not yet done either, but will shortly. Thanks.

Ken Gordon


----------



## Sevendogsbsd (Jan 24, 2020)

Typically, wine should be invoked from a terminal as patovm04 noted above. I don't know if whatever desktop you use will automatically associate with wine apps so the terminal is probably your best bet. Also gives the added benefit that you can see if any error messages are generated. FYI, what versions of Microsoft office are you trying to run? I would venture a guess that any modern (last 5 years?) version of Office will have issues in Wine but I may be wrong. I have never owned Microsoft Office before and only use it on my work machine which is Windows so have no experience running it in wine.

If there is no compelling reason to run Office (custom macros, etc), I would suggest Libreoffice as its is free, open source and works well, for my limited purposes anyway.


----------



## KenGordon (Jan 24, 2020)

patovm04 said:


> What about if you run `winecfg` or `wine wordpad` in a terminal. Does anything show up??
> Just to corroborate that wine was properly installed


I get "command not found" for both.

Also, when I do `find / -name "wine"`, nothing shows up.


Going through my terminal history, I see that after I deleted all wine associated programs, I then cd to /usr/ports/emulators/wine and did `make install clean`, so from the above it appears that wine never completed the installation.

Sigh...

After that, I installed both Thunderbird, and Retroshare, both of which work fine.

Ken Gordon


----------



## KenGordon (Jan 24, 2020)

Sevendogsbsd said:


> Typically, wine should be invoked from a terminal as patovm04 noted above. I don't know if whatever desktop you use will automatically associate with wine apps


I am using the desktop which comes with FuryBSD and it DOES offer the choice of using Wine for MS and other apps.


Sevendogsbsd said:


> so the terminal is probably your best bet. Also gives the added benefit that you can see if any error messages are generated.


That sounds like an excellent idea. I'll try that.


Sevendogsbsd said:


> FYI, what versions of Microsoft office are you trying to run?


2007.


Sevendogsbsd said:


> I would venture a guess that any modern (last 5 years?) version of Office will have issues in Wine but I may be wrong. I have never owned Microsoft Office before and only use it on my work machine which is Windows so have no experience running it in wine.


I remember running it on a Unix box at work many years ago, and it worked fine there.



Sevendogsbsd said:


> If there is no compelling reason to run Office (custom macros, etc), I would suggest Libreoffice as its is free, open source and works well, for my limited purposes anyway.


I have LibreOffice installed on all of my FreeBSD boxes here. Although I like it and it is OK, it does lack some of the features of MS-Office I have gotten used to. I have also installed Okular and another app for reading PDFs. Those work fine too.

But first I am going to have to figure out how to install wine (and which version) and its dependencies. Trying to do that from the ports hasn't worked....yet.

Ken Gordon


----------



## Sevendogsbsd (Jan 24, 2020)

Forget ports, just use `pkg install <package name>`. They both do exactly the same thing.

So, I don't know if Office 2007 is 64 bit or 32 bit. I use wine for gaming only and all of my games are 32 bit so I use i386-wine. You can try `pkg install wine`, then open a terminal in the directory where you have your office install file, then run `wine <office installer name>`. If that doesn't invoke the Microsoft Office install dialog, then you can install i386-wine and try the same thing.

Make sense? You'll use wine to install Office, then you need to navigate to the directory where the office app (word, excel, etc) is located under ~/.wine and then use wine to run the specific executable. If whatever desktop you are using automagically makes icons, you can probably use those.


----------



## patovm04 (Jan 24, 2020)

KenGordon said:


> I get "command not found" for both.
> 
> Also, when I do `find / -name "wine"`, nothing shows up.
> 
> ...


So clearly you don't have wine installed. Try installing wine with `sudo pkg install i386-wine` as Sevendogsbsd suggested.
Also, are you trying all of this on FuryBSD live iso or do you have it installed on your hard drive ??


----------



## KenGordon (Jan 24, 2020)

patovm04 said:


> So clearly you don't have wine installed.


Ha! Obviously. 


patovm04 said:


> Try installing wine with `sudo pkg install i386-wine` as Sevendogsbsd suggested.


Did. Now I find it.


patovm04 said:


> Also, are you trying all of this on FuryBSD live iso or do you have it installed on your hard drive ??


On the HD. 

FuryBSD, apparently, differs from FreeBSD 12.1 only in the desktop. All else, so far as I can see, is just plain, complete, unadorned, unadulterated FreeBSD 12.1. 

There are a couple of reasons I have not mentioned FuryBSD here before: 1) the FuryBSD forum is unoccupied: the few questions I have posted there have been unanswered. 2) All of my questions here have concerned my use of FreeBSD, not of FuryBSD. 3) Discussion of FuryBSD (and others somewhat like it) is frowned upon here, which I understand and want to comply with.

Anyway, getting back to Wine, when I do as Sevendogsbsd suggested, I get the following error:
"ELF interpreter /libexec/ld-elf.so.1 not found, error 8
Abort"

So, obviously, some dependency is missing. Now I have to find and fix that.

Ken Gordon


----------



## Sevendogsbsd (Jan 24, 2020)

I think (someone correct me if I am wrong)  that this means the core OS is missing the 32 bit libs. Is this correct?


----------



## KenGordon (Jan 25, 2020)

Sevendogsbsd said:


> I think (someone correct me if I am wrong)  that this means the core OS is missing the 32 bit libs. Is this correct?


Yes. You are correct. I found a thread here which dealt with that, and told how to fix it. I did fix THAT problem, but got a heap of new error messages. See the LibreOffice PDF file below detailing those.
Ken Gordon


----------



## SteveL (Jan 28, 2020)

Ken, try this video: How to Install Wine & Winetricks in FreeBSD .

When Winetricks ask you to install wine-gecko and mono it recommends doing so manually but I found that that didn't work at all, but just clicking 'install' when it asks you if you want it to get them for you, worked for me. Winetricks brings up a windows config box in which you can pull in libraries and set paths and whatnot for your windows software.


----------



## KenGordon (Jan 29, 2020)

OK. Thanks. I have not yet installed Winetricks. I'll dig into Wine a bit later. Now I have another issue I need to address first.

Ken Gordon


----------



## Alexander88207 (Jan 29, 2020)

0009:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0009:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly

Check your X drivers and i dont recommend to use wine as root.


----------



## KenGordon (Jan 30, 2020)

Thanks. I don't, or won't, use wine as root.

Ken Gordon


----------



## free-and-bsd (Feb 8, 2020)

KenGordon said:


> But, when I then attempted to run MS-Word, it hung for several seconds, then just quietly quit. I then attempted to run another WIndows program, specifically, my Pegasus e-mail client.


BTW, what do you mean by "attempting to run a Windows PROGRAM"?
Do you actually try to run the INSTALLER, not the installed Windows executable found on one of the MS partitions you have mounted? Just for clarity's sake.


----------



## KenGordon (Feb 12, 2020)

free-and-bsd said:


> BTW, what do you mean by "attempting to run a Windows PROGRAM"?
> Do you actually try to run the INSTALLER,


NO.


free-and-bsd said:


> not the installed Windows executable found on one of the MS partitions you have mounted? Just for clarity's sake.


I was trying to run the executable. I have, for the moment, left this issue for later. I recently learned that I probably should have installed winetricks but have not yet done so. I'll revisit this issue as soon as I can.

And thanks,

Ken Gordon


----------



## free-and-bsd (Feb 13, 2020)

KenGordon said:


> NO.
> 
> I was trying to run the executable. I have, for the moment, left this issue for later. I recently learned that I probably should have installed winetricks but have not yet done so. I'll revisit this issue as soon as I can.
> 
> ...


You DON'T run an executable in Wine. You use Wine to INSTALL a windows programs into an emulated environment same as you install it in Windows. And just as in Windows you can't run an executable unless it is properly installed or is a portable application, so you can't in Wine.
So, no need to "revisit" this issue -- just do it the right way if you want it to work. 
...Oh, and READ THE MANUAL, for goodness' sake .


----------



## KenGordon (Feb 13, 2020)

Yes. As we used to say in the tech support field, "RTFM". OK.

I vaguely remember using WINE a long time ago for something at work. As I remember it (dangerous at my age), I simply fired up WINE and ran previously installed Windows programs from it.

Obviously that isn't correct.

Thanks,

Ken Gordon


----------



## free-and-bsd (Feb 14, 2020)

KenGordon said:


> Yes. As we used to say in the tech support field, "RTFM". OK.
> 
> I vaguely remember using WINE a long time ago for something at work. As I remember it (dangerous at my age), I simply fired up WINE and ran previously installed Windows programs from it.
> 
> ...


Ha, I vaguely remember doing that, too. Long time ago, long before Wine becoming version 1. Well, the way it works and its configuration have changed significantly since then . It has now many Windows things it didn't have back then, including regedit and what not.


----------

