WineHQ
Wine Forums

Board index » WineHQ » Wine Help » Linux




 Page 1 of 1 [ 13 posts ] 



 
Author Message
 Post Posted: Thu Sep 06, 2018 8:22 pm 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
Hi,

I need help getting ping to work under wine on Ubuntu 16.04. I am trying to run a Battlefield Bad Company 2 server for testing (I might be doing some development on a mod at some point) and I am unable to get it to a playable state. I can run mase_bc2 and Frost.Game.Main_Win32_Final.exe and even connect to the LAN server in game - but, when loading a map, it does not continue loading and instead the game freezes.

Here is the error that I need to solve to get the server playable: `0049:err:winediag:IcmpCreateFile Failed to use ICMP (network ping), this requires special permissions.`

Here is what I have tried:

`sudo chmod 4755 /bin/ping` to allow wine to access ping. This did not help.

I then tried this:
`sudo setcap cap_net_raw+epi "$(readlink -f "/usr/bin/wine")"`

which results in this error:
`wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory`

and then separately after running `sudo setcap -r "$(readlink -f "/usr/bin/wine")"` to remove the shared libraries error, I also ran this:
`sudo setcap 'cap_net_bind_service=+ep' "$(readlink -f "/usr/bin/wine-preloader")"`

Both `setcap` commands result in the same shared libraries error.

I'm decent at Linux but it seems this is beyond my level and I need help with this. I have searched thread after thread online and I came up empty. If someone can solve this for me, this may be one of the only sources of fixing this issue (bug??) on the Internet.

I see there is someone else having this issue here: viewtopic.php?f=8&t=30704 and he even gets the same error as me after using `setcap` however he did not get this issue solved.

Thanks.


Top 
 Post Posted: Fri Sep 07, 2018 10:42 am 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
Since I seem to be unable to edit my post, I should probably mention that I am running Wine Stable 3.0.2.


Top 
 Post Posted: Fri Sep 07, 2018 1:43 pm 
Offline
Moderator
Moderator
User avatar

Joined: Tue Mar 25, 2008 10:30 pm
Posts: 12642
If you're using the WineHQ packages, Wine would be installed in /opt/wine-stable, not /usr/bin.


Top 
 Post Posted: Fri Sep 07, 2018 1:57 pm 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
dimesio wrote:
If you're using the WineHQ packages, Wine would be installed in /opt/wine-stable, not /usr/bin.

which wine shows /usr/bin/wine which makes me think that it's symlinked to /opt/wine-stable/bin/wine - wouldn't /usr/bin/wine work fine for setcap or am I mistaken?

Thanks for taking the time to respond, I appreciate it. :)


Top 
 Post Posted: Fri Sep 07, 2018 5:34 pm 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
My apologizes for the double post but I can no longer edit my previous comment. I have just tried sudo setcap cap_net_raw+epi "$(readlink -f "/opt/wine-stable/bin/wine")" and I still get the same error: wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory.

However, I have symlinked to /usr/lib/libwine.so.1 and the shared libraries error is now gone. However, ping still does not work under wine.

Does anyone have any other ideas of things I can try?


Top 
 Post Posted: Fri Sep 07, 2018 11:32 pm 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2742
Location: Cambridge
@ipkpjersi

New users (and less new ones!), of Wine, are expected to have read the WineHQ FAQ before posting on these forums...

The FAQ already has an entry for how to get network ping working under Wine. See: WineHQ FAQ: 10.3.4 Failed to use ICMP (network ping), this requires special permissions.

Please use the forum code tags when posting terminal commands and output:
Code:
sudo setcap cap_net_raw+epi "$(readlink -f "/usr/bin/wine-preloader")"


Note: you'll have to unwind the permissions mess you've made as well... :roll:

Bob


Top 
 Post Posted: Sat Sep 08, 2018 10:35 am 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
Bob Wya wrote:
@ipkpjersi

New users (and less new ones!), of Wine, are expected to have read the WineHQ FAQ before posting on these forums...

The FAQ already has an entry for how to get network ping working under Wine. See: WineHQ FAQ: 10.3.4 Failed to use ICMP (network ping), this requires special permissions.

Please use the forum code tags when posting terminal commands and output:
Code:
sudo setcap cap_net_raw+epi "$(readlink -f "/usr/bin/wine-preloader")"


Note: you'll have to unwind the permissions mess you've made as well... :roll:

Bob
Hi,

I did actually remove absolutely all of the permissions mess I made. I tried that exact command, it did not help. I also tried it on /opt/wine-stable/bin/wine as well (instead of making it use the symlink). Nothing has worked thus far.

Here is the output:


Code:
Z:\home\user> ping google.com
0075:fixme:ping:main this command currently just sleeps based on -n parameter


Cheers.


Top 
 Post Posted: Sat Sep 08, 2018 10:57 am 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2742
Location: Cambridge
ipkpjersi wrote:
Here is the output:

Code:
Z:\home\user> ping google.com
0075:fixme:ping:main this command currently just sleeps based on -n parameter


Cheers.


@ipkpjersi

That ping command is actually working for you now.

However your Wine version is too old to support the ping command.

Isira Seneviratne added it to the development branch months ago (February 2018).
But you need at least Wine Development version 3.14 - due to Bug 43252 - IcmpSendEcho doesn't work with a ReplySize<56 - a fix by Zhiyi Zhang.

ping works find for me with Wine Development version 3.15, after running the setcap command on the wine-preloader.
Code:
wine cmd.exe
> ping 8.8.8.8
Pinging 8.8.8.8 [8.8.8.8] with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=12ms TTL=123
Reply from 8.8.8.8: bytes=32 time=10ms TTL=123
...

Tested on my Gentoo install.

Bob


Top 
 Post Posted: Sat Sep 08, 2018 10:59 am 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
Bob Wya wrote:
ipkpjersi wrote:
Here is the output:

Code:
Z:\home\user> ping google.com
0075:fixme:ping:main this command currently just sleeps based on -n parameter


Cheers.


@ipkpjersi

That ping command is actually working for you now.

However your Wine version is too old to support the ping command.

Isira Seneviratne added it to the development branch months ago (February 2018).
But you need at least Wine Development version 3.14 - due to Bug 43252 - IcmpSendEcho doesn't work with a ReplySize<56 - a fix by Zhiyi Zhang.

ping works find for me with Wine Development version 3.15, after running the setcap command on the wine-preloader.
Code:
wine cmd.exe
> ping 8.8.8.8
Pinging 8.8.8.8 [8.8.8.8] with 32 bytes of data:
Reply from 8.8.8.8: bytes=32 time=12ms TTL=123
Reply from 8.8.8.8: bytes=32 time=10ms TTL=123
...

Tested on my Gentoo install.

Bob
That is EXACTLY the information I am looking for, thank you! Any idea if/when the fix will be back-ported to Wine Stable? Like, for example, should I expect it in the next version, or is it possible it won't be back-ported for at least a few versions away or possibly never backported to Wine Stable? I am a little bit weary of running Wine Staging simply because I don't know how stable it is, or how many regressions I should expect or if it's generally quite stable.


Top 
 Post Posted: Sat Sep 08, 2018 12:13 pm 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2742
Location: Cambridge
ipkpjersi wrote:
...
That is EXACTLY the information I am looking for, thank you! Any idea if/when the fix will be back-ported to Wine Stable? Like, for example, should I expect it in the next version, or is it possible it won't be back-ported for at least a few versions away or possibly never backported to Wine Stable? I am a little bit weary of running Wine Staging simply because I don't know how stable it is, or how many regressions I should expect or if it's generally quite stable.


@ipkpjersi


Wine Stable
is basically: "my application already works under Wine, I want to keep it working"...
Wine Development is essentially where all the bug fixes and improvements land.
This is the recommended package for end-users to run.
I never stated that you should or need to run Wine Staging (which is primarily targeted at gamers)...
In fact I didn't even mention Wine Staging...

I doubt Wine Stable will pick up the ping implementation anytime soon.
It's already omitted from the next release (3.0.3).

You can install the WineHQ Wine Stable and Wine Development packages in parallel.
One of the packages will need to be installed out-of-tree i.e. in /opt/... only.

You basically just don't install the winehq-... meta-package for the out-of-tree Wine package(s).
These contain the /usr/bin compatibility symlinks.
Just install the wine-... packages variant.


Bob


Top 
 Post Posted: Sat Sep 08, 2018 3:46 pm 
Offline
Level 1
Level 1

Joined: Thu Sep 06, 2018 8:19 pm
Posts: 8
Bob Wya wrote:
ipkpjersi wrote:
...
That is EXACTLY the information I am looking for, thank you! Any idea if/when the fix will be back-ported to Wine Stable? Like, for example, should I expect it in the next version, or is it possible it won't be back-ported for at least a few versions away or possibly never backported to Wine Stable? I am a little bit weary of running Wine Staging simply because I don't know how stable it is, or how many regressions I should expect or if it's generally quite stable.


@ipkpjersi


Wine Stable
is basically: "my application already works under Wine, I want to keep it working"...
Wine Development is essentially where all the bug fixes and improvements land.
This is the recommended package for end-users to run.
I never stated that you should or need to run Wine Staging (which is primarily targeted at gamers)...
In fact I didn't even mention Wine Staging...

I doubt Wine Stable will pick up the ping implementation anytime soon.
It's already omitted from the next release (3.0.3).

You can install the WineHQ Wine Stable and Wine Development packages in parallel.
One of the packages will need to be installed out-of-tree i.e. in /opt/... only.

You basically just don't install the winehq-... meta-package for the out-of-tree Wine package(s).
These contain the /usr/bin compatibility symlinks.
Just install the wine-... packages variant.


Bob

Hi,

I actually installed winehq-staging because I knew it was newer than stable and I wasn't sure if I was supposed to install wine-devel or wine-development. However, I ran the command:
Code:
sudo apt-cache show wine-development | more
and the command:
Code:
sudo apt-cache show wine-devel | more
and it seems that wine-devel is newer (3.15 vs 1.9.6). I now have winehq-stable and wine-devel installed, and I have symlinked wine-devel with:
Code:
sudo ln -s /opt/wine-devel/bin/wine /usr/bin/wine-devel
so I can now specify wine or wine-devel depending on which version I want to use.

Since I do like games, I might go ahead and install wine-staging in addition to wine-devel.

Do you have any recommendations on whether to use wine or wine64 in general?

edit: symlinks don't seem to actually work, so instead I just use aliases for zsh in my .zshrc now:

Code:
alias wine="WINEPREFIX=~/.wine wine"
alias wine-devel="WINEPREFIX=~/.wine-devel /opt/wine-devel/bin/wine"
alias wine-staging="WINEPREFIX=~/.wine-staging /opt/wine-staging/bin/wine"


edit 2: turns out wine-devel does NOT work for ping, it returns this error message:
Code:
PING: transmit failed. General failure.


I needed to use wine-staging for it to successfully get a reply.:
Code:
Reply from 8.8.8.8: bytes=32 time=29ms TTL=121


I guess wine-staging has more patches than just for gaming.

Thanks again!


Top 
 Post Posted: Sat Sep 08, 2018 4:13 pm 
Offline
Level 12
Level 12
User avatar

Joined: Sat Oct 16, 2010 7:40 pm
Posts: 2742
Location: Cambridge
np 8)


Top 
 Post Posted: Sat Mar 16, 2019 3:49 pm 
Offline
Newbie
Newbie

Joined: Sat Mar 16, 2019 3:45 pm
Posts: 1
How is this a useful answer? On my Ubuntu 18.04 and latest wine-devel I get the same missing libwine.so.1 error after
setting permissions as indicated by clockwork orange here. That's not addressed in the FAQ. I guess I'm supposed to figure out how to locate libwine.so.1, and where to symlink it to so wine can find it. In my case, wine was looking at /lib/i386-linux-gnu so I symlinked to there.


Top 
Display posts from previous:  Sort by  
 
 Page 1 of 1 [ 13 posts ] 




Board index » WineHQ » Wine Help » Linux


Who is online

Users browsing this forum: Google [Bot] and 13 guests

 
 

 
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 post attachments in this forum

Search for:
Jump to: