Linux Mint Wine serial port - Solved
Linux Mint Wine serial port - Solved
The archive suggests that others have succeeded in running the IDE under Linux and Wine. The IDE runs great, but I cannot get it to open COM1 linked from USBTTY0, a PL2303 adapter.
Anyone running Linux, Wine and a USB com port?
Anyone running Linux, Wine and a USB com port?
Last edited by GTBecker on 10 May 2012, 11:03 AM, edited 1 time in total.
Tom
What did you need to do?GTBecker wrote:Solved.
I'm running Wine on a Debian VirtualBox. I assign the USB device to the VirtualBox and it shows up as /dev/ttyUSB0. Then, I map that Linux device to a DOS device using a symbolic link:
Code: Select all
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com5
- Don Kinzer
Try justdkinzer wrote:Code: Select all
ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com5
Code: Select all
ln -s /dev/ttyUSB0 com5
Tom
The IDE I installed under Wine is v4.0.0. Compiling several ZX apps exposes a new problem, which also appears under WinXP SP3.
"warning: implicit declaration of function 'zbfracf'".
Screenshot attached, sources in PM.
"warning: implicit declaration of function 'zbfracf'".
Screenshot attached, sources in PM.
- Attachments
-
- v400zbfractf_Error.GIF
- (57.35 KiB) Downloaded 443 times
Tom
Thanks. We missed that in the testsuite. You can fix this issue by opening the file zbasic.h (in the zlib subdirectory of the installation directory) in an editor. Find the first line below (near line 1474) and adding the second line below it.GTBecker wrote:"warning: implicit declaration of function 'zbfracf'"
Code: Select all
float zbFracf(float f);
#define zbfracf zbFracf
We have corrected both of these issues in our current development version and we plan to post a new installer soon (most likely later this week).
- Don Kinzer
Your fixes worked fine. Thanks.
I'm closing in on the Linux serial access issue.
I've found that I need to change the /.wine/dosdevices/ttyUSB0:com1 link ownership from root to me - despite, I believe, creating the link as a user. A boot reverts the ownership back to root, and then Wine (as me) can't open it. I need to figure out how to make the ownership permanent or automatic.
Do you own the link, Don, or does root?
I'm closing in on the Linux serial access issue.
I've found that I need to change the /.wine/dosdevices/ttyUSB0:com1 link ownership from root to me - despite, I believe, creating the link as a user. A boot reverts the ownership back to root, and then Wine (as me) can't open it. I need to figure out how to make the ownership permanent or automatic.
Do you own the link, Don, or does root?
Tom
Linux Mint Wine serial port
I did the same, but the link ownership reverts to root at the next boot. I've needed to edit the link as root to change the ownership back to the user name that created it. Yours remains owned by the user?... I created the link in ~/.wine/dosdevices while logged in other than root so the link is owned by the non-root user...
Tom
Re: Linux Mint Wine serial port
Yes. It may have something to do with how Wine was installed on your system. I don't have a directory /.wine (i.e. in the root); rather, it is located in the user's home directory ~/.wine (where by Linux convention means the user's home directory). The root directory is normally the "home" directory of the root user id.GTBecker wrote:Yours remains owned by the user?
- Don Kinzer
Well, I've tried a number of methods to retain permissions of the ttyUSB0:tty1 link in ~/.wine/dosdevices. Every boot, unfortunately, reverts the ownership to root. I suppose I should nevertheless be content for now since the owner can be changed manually as su (and that change needn't to be frequent due to Linux's stability), the IDE appears to work fine and can download reliably.
It's time to plead on winehq.org, I guess.
It's time to plead on winehq.org, I guess.
- Attachments
-
- ttyUSB0.png
- (97.8 KiB) Downloaded 558 times
Tom
I think I've solved the ttyUSB0:com1 link permissions issue in wine's dosdevices folder by adding my user name to the group "dialout"; owning the link alone seems insufficient and, in fact, always reverts to root at boot. Membership in the user group dialout, though, persists. Finally, I believe I have a fully-functional ZBasic IDE under Wine and Linux Mint.
I must be making some progress: I got an email this morning from Carbonite, which hasn't seen me (via WinXP) for 10 days.
I must be making some progress: I got an email this morning from Carbonite, which hasn't seen me (via WinXP) for 10 days.
Tom
The sequence I used to establish serial com (in Linux Mint Debian with the Mate GUI) was:
- run lsusb (in Terminal) with a USB serial adapter plugged in. You'll see something like:
Bus 006 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Find the device ID, e.g. 067b:2303, the vendor and product identifiers. Run:
- sudo modprobe usbserial vendor=0x067b product=0x2303
- dmesg
Somewhere in the dmesg report will be something like this:
[ 31.904669] usbcore: registered new interface driver usbserial
[ 31.904679] USB Serial support registered for generic
[ 31.904717] usbcore: registered new interface driver usbserial_generic
[ 31.904719] usbserial: USB Serial Driver core
[ 31.905716] USB Serial support registered for pl2303
[ 31.905733] pl2303 6-1:1.0: pl2303 converter detected
[ 31.916815] usb 6-1: pl2303 converter now attached to ttyUSB0
The hardware serial port now exists as device ttyUSB0. To link the port to Wine's logical device com1, run:
- sudo nautilus
- navigate to /home/username/.wine/dosdevices (Ctrl^h displays the hidden wine folder)
- click File/OpenInTerminal, run:
- ln -s /dev/ttyUSB0 com1
Link file com1 now appears in .../dosdevices folder. Right click com1, select Properties/Permissions. See that root owns the port, and user group dialout has read/write access to the port. Run:
- mate-users-admin or click Menu/Administration/Users_and_Groups. In Manage Groups, add your user name to group dialout.
You should now be able to open Com1 in Win apps run in Wine, at least using the current Linux Mint Debian 32-bit multi-core distro, and Debian's current Wine (unstable) package, as I did. Linux Mint is said to be 100% Debian, so other Debian-based distros should be similar.
- run lsusb (in Terminal) with a USB serial adapter plugged in. You'll see something like:
Bus 006 Device 003: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Find the device ID, e.g. 067b:2303, the vendor and product identifiers. Run:
- sudo modprobe usbserial vendor=0x067b product=0x2303
- dmesg
Somewhere in the dmesg report will be something like this:
[ 31.904669] usbcore: registered new interface driver usbserial
[ 31.904679] USB Serial support registered for generic
[ 31.904717] usbcore: registered new interface driver usbserial_generic
[ 31.904719] usbserial: USB Serial Driver core
[ 31.905716] USB Serial support registered for pl2303
[ 31.905733] pl2303 6-1:1.0: pl2303 converter detected
[ 31.916815] usb 6-1: pl2303 converter now attached to ttyUSB0
The hardware serial port now exists as device ttyUSB0. To link the port to Wine's logical device com1, run:
- sudo nautilus
- navigate to /home/username/.wine/dosdevices (Ctrl^h displays the hidden wine folder)
- click File/OpenInTerminal, run:
- ln -s /dev/ttyUSB0 com1
Link file com1 now appears in .../dosdevices folder. Right click com1, select Properties/Permissions. See that root owns the port, and user group dialout has read/write access to the port. Run:
- mate-users-admin or click Menu/Administration/Users_and_Groups. In Manage Groups, add your user name to group dialout.
You should now be able to open Com1 in Win apps run in Wine, at least using the current Linux Mint Debian 32-bit multi-core distro, and Debian's current Wine (unstable) package, as I did. Linux Mint is said to be 100% Debian, so other Debian-based distros should be similar.
Tom
I've now brought Wine up to the current Debian beta version 1.5.0-0.2 by installing each of 16 .debs (choose 32- or 64-bit and install top-to-bottom), here:
http://dev.carbon-project.org/debian/wine-unstable/
So far, it keeps running!
http://dev.carbon-project.org/debian/wine-unstable/
So far, it keeps running!
Tom