LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-07-2022, 03:17 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Rep: Reputation: 110Reputation: 110
A quick n dirty DDE for Linux?


I have a Windows application that can read the contents of files. It can write/append to files too.

Now, this is Linux and "everything is a file."

Is there a way I can exchange information from the Linux host machine with that Windows application without using files at all?

I can do that already with files. But it's kind of slow and I don't do it often. I would like to be able to do it very often, like multiple times per second, and completely avoiding disk writes. Is that possible? How? Telling the Windows application to read/write to a socket, or what? Would writing to RAM be a better idea? Are there pitfalls? Race conditions? Please advise.

TIA
 
Old 11-07-2022, 03:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,016

Rep: Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342Reputation: 7342
what do you really want to achieve? linux can read ntfs very well. You can execute windows apps on linux. But you cannot use an already existing windows app (running on windows) to exchange any kind of information with a linux host. Or what do you mean by that?
 
Old 11-07-2022, 04:01 AM   #3
lvm_
Member
 
Registered: Jul 2020
Posts: 973

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Named pipes? (man mkfifo)
 
1 members found this post helpful.
Old 11-07-2022, 04:07 AM   #4
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
Sorry, I forgot to mention that the Windows application runs on Wine. It's all in the same machine, OS and file system.
 
Old 11-07-2022, 04:45 AM   #5
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,430

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Copy & paste?
 
Old 11-07-2022, 05:44 AM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,776

Rep: Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933Reputation: 5933
Multiple times per second and slow are relative terms.

Without knowing anything about the application it is difficult to provide help. A tmpfs would be the easiest but depends on how much data you are writing? I would expect that wine would slow things down because it is adding an extra layer.
 
1 members found this post helpful.
Old 11-07-2022, 07:51 AM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,430

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Personally, I feel we should all go quiet until the @lucmove tells us exactly what he's trying to do.
 
3 members found this post helpful.
Old 11-07-2022, 07:57 AM   #8
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by business_kid View Post
Personally, I feel we should all go quiet until the @lucmove tells us exactly what he's trying to do.
That's blackmail and it's rude. You don't have to reply but encouraging other people to deny me help based on your morbid curiosity is just mean and tyrannical. In 22 years of forum activity, I'd never seen someone do this before.
 
Old 11-07-2022, 10:40 AM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Quote:
Originally Posted by lucmove View Post
completely avoiding disk writes
tmpfs?

Last edited by dugan; 11-07-2022 at 10:51 AM.
 
1 members found this post helpful.
Old 11-07-2022, 12:06 PM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,430

Rep: Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339Reputation: 2339
Quote:
Originally Posted by lucmove View Post
That's blackmail and it's rude. You don't have to reply but encouraging other people to deny me help based on your morbid curiosity is just mean and tyrannical. In 22 years of forum activity, I'd never seen someone do this before.
It's neither blackmail or rude. You get your problems solved by providing helpful feedback, not criticism. We hadn't heard from you since post #1, which is poor form. Have you been reading your own thread? Now that we have your attention. please address the suggestions in posts #2 - #6 and clarify what you're trying to achieve.
 
2 members found this post helpful.
Old 11-07-2022, 12:15 PM   #11
!!!
Member
 
Registered: Jan 2017
Location: Fremont, CA, USA
Distribution: Trying any&ALL on old/minimal
Posts: 997

Rep: Reputation: 382Reputation: 382Reputation: 382Reputation: 382
Googling: Linux Wine Network socket communication
Finds 1st: https://forum.winehq.org/viewtopic.php?t=19970

More: omitting that last word communication, finds even more. This one looked interesting:
https://forum.lazarus.freepascal.org...?topic=51392.0

Oh, leaving out the word[s network] socket
(to not prejudice the search),
looks like a good idea also!!!

P. S. I didn't know what DDE was (IDK GUI, only CLI), so I tried this web-search (and found that it didn't necessarily mean:
the Deepin Desktop Env.):
Microsoft Windows DDE for "debian"

Last edited by !!!; 11-07-2022 at 12:39 PM.
 
1 members found this post helpful.
Old 11-07-2022, 12:31 PM   #12
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,621

Rep: Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555Reputation: 2555
Quote:
Originally Posted by lucmove View Post
That's blackmail and it's rude. You don't have to reply but encouraging other people to deny me help based on your morbid curiosity is just mean and tyrannical.
For it to count as blackmail, there would need to be a genuine intimidation/threat, made privately, rather than merely a public suggestion that people hold back until you provide more details/clarification on what you want.

Also, since BK has no power to actually change whether people respond or not, it's not tyrannical either. (You could have possibly made that argument if a mod/admin were to say it, but BK is just another member.)

And it isn't really mean since the intent is to get you to make it easier for people to help.

It is a bit rude, but mainly badly worded/executed (there are better ways to ask someone to respond), but it's also a bit rude of you to ignore Pan's first question in post #2.

Anyhow...

It might be that the already suggested tmpfs is the right approach - at the very least you should look into that, and if it doesn't give you what you want come back with more details and/or a reformulated question.

(It also might be that tmpfs appears to be the right answer but there's a better solution, but you need to say what you're trying to do for anyone to be able to point at that better solution.)


Last edited by boughtonp; 11-07-2022 at 12:34 PM.
 
Old 11-07-2022, 02:01 PM   #13
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Quote:
Originally Posted by !!! View Post
P. S. I didn't know what DDE was
https://en.wikipedia.org/wiki/Dynamic_Data_Exchange
 
Old 11-07-2022, 05:02 PM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,249

Rep: Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323Reputation: 5323
Quote:
Originally Posted by business_kid View Post
Personally, I feel we should all go quiet until the @lucmove tells us exactly what he's trying to do.
Give the guy a break. Not everyone’s as open about their use cases as this other guy:

https://www.linuxquestions.org/quest...es-4175716962/
 
1 members found this post helpful.
Old 11-08-2022, 10:55 AM   #15
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,434

Original Poster
Rep: Reputation: 110Reputation: 110
I am back. I ran a few tests and the best option for now seems to be tmpfs. It works pretty well. Maybe it could be a teensy little bit faster, but it's good enough. The only problem is that I need two separate files, one for each direction, and I may have to design my own protocol to verify proper delivery and queue management.

I was hoping I would be able to bypass verification with a socket, but named sockets don't work. The Windows application likes a plain text file, but it freezes when trying to read or write to the named pipe. It's not just a matter of pipe locking. Even if I try to communicate on the other end and unlock it, the application remains frozen and I have to kill it eventually. Only plain files work.

Thank you for all the suggestions, even when suggesting I might be involved with weird porn.
 
1 members found this post helpful.
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vnc4server + dde (not visible) freebeart Linux Deepin 0 05-06-2016 02:45 PM
[SOLVED] Libreoffice Writer: delete DDE link? Steve W Linux - Software 1 06-18-2015 05:37 AM
Windows escappee- lots of help windows with DDE error scotwitt Linux - Newbie 1 04-19-2011 11:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:16 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
Open Source Consulting | Domain Registration