Interfaces that talk across multiple computers, how?
Just a crazy thought that pops into my head - I wonder if there is some way that one PC could send an "xdotool" command to another? eg: PC1 detects you clicking the "F" key on one keyboard ("Fire !") and as a result it sends an "xdotool key F" command to PC2 which controls the Firing Control Subsystem.
How could it send such a command? Via SSH? Or via some other network software? Or will there be a need for some degree of hardware interlinking here - will one PC have to have a direct connection into another PC? (eg PC1 drives a solenoid or relay which activates a key on a keyboard that is connected to a usb port on another PC?). This would potentially be an untidy spider web of tangled cables but it's definitely possible to tap into usb keyboard devices for special purposes. I tried it here
How could it send such a command? Via SSH? Or via some other network software? Or will there be a need for some degree of hardware interlinking here - will one PC have to have a direct connection into another PC? (eg PC1 drives a solenoid or relay which activates a key on a keyboard that is connected to a usb port on another PC?). This would potentially be an untidy spider web of tangled cables but it's definitely possible to tap into usb keyboard devices for special purposes. I tried it here
Screw Ethernet, I've got something better now.
Friend of mine told me how to do the RS-232 (COMport) bit. Programming it up will be a bit of a PITA but I'm going to do that anyways, so whatever.
It's very simple, hardware-wise. Take the systems' COM Ports. Tie the TXD pin of each port to the RXD pin of the port on the next computer in line. Tie the GND pins together (common electrical ground is very important here, since it's the reference that the everything else relies on).
Software-wise -- each computer gets a name. Each 'packet' of data (for lack of a better term) contains a 'header' with the name of the intended recipient system. Each computer, when it gets a packet, examines the header. If it matches, then the computer reads the rest of the packet and acts on it. If the header does not match, then the system passes the packet along to the next computer. It's a bucket-brigade sort of scheme.
Since all along I've been planning on sending very simple text data, this will actually work pretty well. At 115200 baud (that's a bit over a hundred and fifteen thousand characters per second) the otherwise-significant latency induced by the bucket-brigade method shouldn't even be noticeable to the user. Mind you, if I was going at 300 baud like an old modem... that would be different. I think I can do a little better than that
Keep in mind that this method is far, far less harebrained than what I'd originally come up with... I'm not even going to put that one up, it's actually kind of embarrassing how bad it was.
So. Next question.
Assuming that I will be using bash and GTKDialog, how do I get a full screen black background and borderless dynamic (changeable) images onto a monitor...? How do I specify the position of the images? (I assume it's XY coordinates starting from a 0,0 point? Where's 0,0?)
Friend of mine told me how to do the RS-232 (COMport) bit. Programming it up will be a bit of a PITA but I'm going to do that anyways, so whatever.
It's very simple, hardware-wise. Take the systems' COM Ports. Tie the TXD pin of each port to the RXD pin of the port on the next computer in line. Tie the GND pins together (common electrical ground is very important here, since it's the reference that the everything else relies on).
Software-wise -- each computer gets a name. Each 'packet' of data (for lack of a better term) contains a 'header' with the name of the intended recipient system. Each computer, when it gets a packet, examines the header. If it matches, then the computer reads the rest of the packet and acts on it. If the header does not match, then the system passes the packet along to the next computer. It's a bucket-brigade sort of scheme.
Since all along I've been planning on sending very simple text data, this will actually work pretty well. At 115200 baud (that's a bit over a hundred and fifteen thousand characters per second) the otherwise-significant latency induced by the bucket-brigade method shouldn't even be noticeable to the user. Mind you, if I was going at 300 baud like an old modem... that would be different. I think I can do a little better than that
Keep in mind that this method is far, far less harebrained than what I'd originally come up with... I'm not even going to put that one up, it's actually kind of embarrassing how bad it was.
So. Next question.
Assuming that I will be using bash and GTKDialog, how do I get a full screen black background and borderless dynamic (changeable) images onto a monitor...? How do I specify the position of the images? (I assume it's XY coordinates starting from a 0,0 point? Where's 0,0?)
- Packetteer
- Posts: 73
- Joined: Sat 12 May 2012, 19:33
- Location: Long Island Ny
starhawk wrote
traditionally 0,0 is the upper left corner of the screen.
Best Regards
John
Unless Linux is totally different then Windows (which it probably is)Assuming that I will be using bash and GTKDialog, how do I get a full screen black background and borderless dynamic (changeable) images onto a monitor...? How do I specify the position of the images? (I assume it's XY coordinates starting from a 0,0 point? Where's 0,0?)
traditionally 0,0 is the upper left corner of the screen.
Best Regards
John
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
RS232 serial port communication
I do not know exactly what you want to do, but I communicate with design electronic equipment through the serial port:
As you see in the following link.
https://misterelectronicoes.wordpress.c ... -homemade/
Currently I'm working hard to create and control panels for the presentation of these programs.
http://murga-linux.com/puppy/viewtopic.php?t=97961
and the rotary knob
http://murga-linux.com/puppy/viewtopic. ... 367#840367
This is it probably too simple pair the project you want to do, but like everything in this life can be improved.
Greatings
As you see in the following link.
https://misterelectronicoes.wordpress.c ... -homemade/
Currently I'm working hard to create and control panels for the presentation of these programs.
http://murga-linux.com/puppy/viewtopic.php?t=97961
and the rotary knob
http://murga-linux.com/puppy/viewtopic. ... 367#840367
This is it probably too simple pair the project you want to do, but like everything in this life can be improved.
Greatings
@mister_electronico -- Those are pretty cool, but indeed not applicable to what I'm doing. Read my first three posts, and you'll see quite plainly what I'm up to.
@Packetteer -- I seem to recall that in JWM, 0,0 is the center of the screen -- it's my memory, could be way off -- but that's why I asked.
@Packetteer -- I seem to recall that in JWM, 0,0 is the center of the screen -- it's my memory, could be way off -- but that's why I asked.
The way I done something similar was to create one webpage on the server that contained all the elements you wish to control as a large screen then just show that part on which ever screen asked. Like
//Control.html?screen=1
//Control.html?screen=2 etc.
that way only ONE webpage exists, and that can keep up with all the variables and displays in a single 'program'
I wrote a single page 'shopping cart' that only showed the subset needed.
//Control.html?screen=1
//Control.html?screen=2 etc.
that way only ONE webpage exists, and that can keep up with all the variables and displays in a single 'program'
I wrote a single page 'shopping cart' that only showed the subset needed.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
some ideas
Some Ideas
check splash screen in:
http://murga-linux.com/puppy/viewtopic.php?t=38608
In this same page check to for:
How to store window size/placement
window borderless
http://www.murga-linux.com/puppy/viewto ... 490#701490
black background use one image for background black.
SVG images you can create anything or panel with hot keys look this link:
http://en.wikipedia.org/wiki/File:Oscilloscope.svg
http://www.svgopen.org/2005/papers/Maki ... SVGFormat/
http://commons.wikimedia.org/wiki/File: ... _panel.svg
check splash screen in:
http://murga-linux.com/puppy/viewtopic.php?t=38608
In this same page check to for:
How to store window size/placement
window borderless
http://www.murga-linux.com/puppy/viewto ... 490#701490
black background use one image for background black.
SVG images you can create anything or panel with hot keys look this link:
http://en.wikipedia.org/wiki/File:Oscilloscope.svg
http://www.svgopen.org/2005/papers/Maki ... SVGFormat/
http://commons.wikimedia.org/wiki/File: ... _panel.svg
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Other Ideas
Other Ideas.
See this code:
This window fill all my desktop.
You must fit the line:
height-request or width-request at you window desktop.
Anyway If for example you create a window without borderless that contains an SVG image with black background using a pixmap to fill the entire window and you simultaneously create a background image desktop of the same black color, do not you'll have to worry about the size of the window not appreciate the difference between the background-desktop and window program.
All this is an idea that I have never tried this.
I nerver argue with anybody, I am here for enjoy Puppy, for help and if I can ever help someone.
See this code:
Code: Select all
#! /bin/bash
export DIALOG='
<window title="Window" height-request="1800" width-request="2440">
<vbox>
<frame>
<text>
<label>trying fit the window to the window desktop.</label>
</text>
</frame>
<hbox>
<button ok>
</button>
</hbox>
</vbox>
</window>'
gtkdialog4 --program=DIALOG
You must fit the line:
Code: Select all
<window title="Window" height-request="1800" width-request="2440">
Anyway If for example you create a window without borderless that contains an SVG image with black background using a pixmap to fill the entire window and you simultaneously create a background image desktop of the same black color, do not you'll have to worry about the size of the window not appreciate the difference between the background-desktop and window program.
All this is an idea that I have never tried this.
I nerver argue with anybody, I am here for enjoy Puppy, for help and if I can ever help someone.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
other try
starhawk check this code.
Save in one text file for example test.sh
# chmod 777 test.sh
# ./test.sh
The problem is the contour line of the window but this can be solved by picking a black theme in Gtk + 2.0 Change theme.
See you
Code: Select all
export IMG23=/tmp/img23.svg
trap 'rm -rf $IMG23' EXIT
echo ' <svg id="svg1">
<rect
width="980.74536133"
height="980.74542236"
x="0.0"
y="0.0"
style="font-size:12;fill:#000000;fill-opacity:1.00;fill-rule:evenodd;stroke-width:3pt;"
id="rect563" />
</svg>' > $IMG23
export DIALOG='
<window title="Example Window" decorated="false">
<vbox>
<eventbox>
<pixmap>
<variable>PICTURE</variable>
<input file>'$IMG23'</input>
</pixmap>
<action signal="button-press-event">Exit:</action>
</eventbox>
</vbox>
</window>
'
gtkdialog --program=DIALOG
# chmod 777 test.sh
# ./test.sh
The problem is the contour line of the window but this can be solved by picking a black theme in Gtk + 2.0 Change theme.
See you
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
CONTINUE
If this is the problem the solution how I told you:
I am using JWM.
The problem is the contour line of the window but this can be solved by picking a black theme in Gtk + 2.0 Change theme.
I am using JWM.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
lol
Do not worry often happens to me too.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Hi starhawk you try this.
Hi starhawk you try this.
I'm also interested in making control panels for my electronic equipment, so I started thinking about what you said.
Thanks to the code of the wonderful people on the forum "Gtkdialog tips" I could do this small example that can be a beginning to create more complex panels.
I have adapted the code for this small panel.
With the following results.
I'm also interested in making control panels for my electronic equipment, so I started thinking about what you said.
Thanks to the code of the wonderful people on the forum "Gtkdialog tips" I could do this small example that can be a beginning to create more complex panels.
I have adapted the code for this small panel.
With the following results.
- Attachments
-
- PANEL.png
- (10.03 KiB) Downloaded 302 times
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
Hi starhawk you try this.
I hope he can be transferred to other computers without problems since it may different settings do not work desktops.
You have to download the compressed file, decompress and get into the /PANEL directory and run by:
./panel.sh
You may need to give permission
chmod 777 panel.sh
And itch with the mouse in the panel buttons.
I hope it useful for you, and tell me if it works.
Greatings.
You have to download the compressed file, decompress and get into the /PANEL directory and run by:
./panel.sh
You may need to give permission
chmod 777 panel.sh
And itch with the mouse in the panel buttons.
I hope it useful for you, and tell me if it works.
Greatings.
- Attachments
-
- panel.tar.gz
- (1.44 KiB) Downloaded 235 times
Last edited by mister_electronico on Tue 05 May 2015, 11:55, edited 1 time in total.
- mister_electronico
- Posts: 969
- Joined: Sun 20 Jan 2008, 20:20
- Location: Asturias_ España
- Contact:
no no no
mistake ... post.
Re: Hi starhawk you try this.
Very clever. Works for me. Although I do notice that it requires a long press on the mouseclick button - if I do my normal click it does not respond so I have to hold my finger on the button a little bit longer than usual.mister_electronico wrote:I hope it useful for you, and tell me if it works