PTY and Linux Wine / Putty : Access denied !

86 views
Skip to first unread message

Serge Robitaille

unread,
Jan 16, 2022, 12:43:44 AM1/16/22
to kplex
I have set up Kplex on my Kubuntu box to manage GPS & AIS data to all my applications. One application is under Wine (WinlinkExpress) and has a serial com port only input to read the GPS data. I can read just fine the GPS data without Kplex but I need to use Kplex.

What I did:
Configured Kplex.conf like this:
[serial]
# GPS & AIS from USB0
filename=/dev/AIS
direction=in
baud=38400

[pty] 
# Virtual serial port for Linux Wine
direction=out
baud=38400
mode=master
filename=/home/sergio/.virtual_com
group=dialout

/home/sergio/.virtual_com is mapped to COM1 in Wine as per instruction in the Wine User Guide (https://wiki.winehq.org/Wine_User%27s_Guide#Serial_and_Parallel_Ports)

$ ls -l ~/.wine/dosdevices/
lrwxrwxrwx 1 sergio sergio 10 Jan 12 20:08 c: -> ../drive_c
lrwxrwxrwx 1 sergio sergio 25 Jan 16 18:09 com1 -> /home/sergio/.virtual_com

And

$ ls -la /home/sergio/.virtual_com
lrwxrwxrwx 1 root root 10 Jan 16 18:07 /home/sergio/.virtual_com -> /dev/pts/0

So all ok...no, not really ! Running putty in Wine, I get a 'COM1 Access denied' error trying to connect unless I change the permissions from:
crw--w---- 1 root dialout 136, 0 Jan 16 18:27 /dev/pts/0
to:
crw-rw-rw- 1 root dialout 136, 0 Jan 16 18:07 /dev/pts/0

Obviously, I need someone to help me understand why access to com1 is denied.  Changing the permissions on /dev/pts/0 is not persistent when Kplex service is restarted.

$ groups
sergio adm tty dialout sudo
... etc

Thanks


Keith Young

unread,
Jan 16, 2022, 5:00:36 AM1/16/22
to kplex
With the disclaimer that I know nothing about wine (well, not the kind that runs windows programs on linux)..

Try adding:
owner=sergio

or

perm=666

or some combination of owner and perm directives at the end of your pty stanza

Serge Robitaille

unread,
Jan 16, 2022, 3:48:07 PM1/16/22
to kplex
You are a genius !
'owner=sergio' did the trick.
Thank you for everything.
Reply all
Reply to author
Forward
0 new messages