Cursor Magic (new software developed for IRIX)
#1
Cursor Magic (new software developed for IRIX)
Short version:




Long version:

For various reasons, at the end of August I decided that I needed to get off my butt and learn C++. Naturally, this meant picking a project. Naturally, this meant a project to solve some kind of problem. Naturally, this meant a problem involving IRIX.

The problem I chose to solve was how unbelievably annoying it was to set up and use my SGIs. I have a capture card in my PC so I don't have to lug another monitor onto my desk, but that still leaves the problem of having 2 keyboards and mice. The solution is Cursor Magic, a pair of programs that communicate over the network so that using the connected SGI is similar to RDP or a VM.

Cursor and keyboard input is simulated using the XTest library; it should be transparent to all software.

The PC with the capture card is referred to as the "lord". The SGI (or other computer) being passed through and controlled is referred to as the "serf".

Existing feature set:
  1. Mouse position in capture window is sent to serf.
  2. Keyboard strokes are sent to serf when mouse is in capture window.
  3. Bi-directional clipboard for text (so long as the amount of copied text is under the X11 INCR size of 256K).
  4. first-pass of a GUI-driven profile system, for configuring both default settings and settings that are different for each serf.
There are still some things to come like video recording, more expansive profile controls, and possibly more sharable clipboard formats. However, the main features are implemented.

At present this only works with AVerMedia capture cards. Ideally, Cursor Magic would support DirectShow. We shall see, I haven't looked into that since I started this project (and I have learned a lot since then).

There is a lack of defensive coding. I know of many "not-normal, but foreseeable" situations that would cause undefined, potentially lockup behaviour. This situation is highest on my priority list. That said, it has been a long time since I have managed to break X11 such that it required a system reboot, so I'm moving in the right direction :p

Never ever EVER send X11 a "mouse button up" event when the mouse button is not in the depressed state. EVER.

Platforms:

At one point I compiled and ran the IRIX serf under Linux Mint and it worked perfectly. More recently, I tried this again and it would compile but did not actually do anything. I'm sure it's just a matter of a little debugging. In general, this serf application should compile for any POSIX-compliant Unix-like that uses X11R6 or later and has a C++ compiler. It would be nice to patch out the R6 requirement at some point, but that requires completely re-architecting the serf program to keep all X11 calls on one thread (which would be a PITA, but is doable).

The protocol is designed so that it is easy to create additional serf applications for more platforms. There is no reason I could not write a Serf application for early Windows machines, or any other OS that provides some means of simulating mouse/keyboard (sorry Wayland -_-). Expect a Windows 95/98+ implementation at some point.

It would be practical to backport this serf code to C; it does not use classes but it does use a few things from the STL (which could be re-implemented or replaced).

Performance:

On this 150MHz Indy, there is a noticeable bump in gr_osview CPU usage each time an input message is processed. I believe that this is down to the XTest library. So long as you keep the mouse polling rate down, it's not too bad. I've found 20 Ms polling to provide a nice balance of responsiveness and CPU usage. Mouse messages are only sent while the mouse is moving within the window.

Where can I get it:

I'm not ready to release this yet, especially because I plan to make some changes to the protocol. However, if you actually have an AVerMedia capture card and you really want to try out CursorMagic, contact me and I'll give you development builds of the lord and serf applications.

Once I am ready to release, both the binaries and source code will be made available from this post.
(This post was last modified: 10-11-2020, 06:22 PM by nintendoeats.)
nintendoeats
Octane

Trade Count: (0)
Posts: 85
Threads: 8
Joined: Nov 2019
Location: Canada
Find Reply
10-11-2020, 04:01 PM
#2
RE: Cursor Magic (new software developed for IRIX)
Really impressive stuff! Biggrin
soviet
Octane

Trade Count: (0)
Posts: 192
Threads: 22
Joined: Apr 2019
Location: Uruguay
Find Reply
10-11-2020, 05:03 PM
#3
RE: Cursor Magic (new software developed for IRIX)
That's pretty cool!!! Smile
Irinikus
Hardware Connoisseur

Trade Count: (0)
Posts: 3,475
Threads: 319
Joined: Dec 2017
Location: South Africa
Website Find Reply
10-11-2020, 05:43 PM
#4
RE: Cursor Magic (new software developed for IRIX)
Thanks guys :)
nintendoeats
Octane

Trade Count: (0)
Posts: 85
Threads: 8
Joined: Nov 2019
Location: Canada
Find Reply
10-11-2020, 06:37 PM
#5
RE: Cursor Magic (new software developed for IRIX)
It looks like you're re-implementing Teleffect. It's on the later IRIX 6.5 overlays and works on IRIX 6.2 and newer. Not sure if the Windows side of things still works on current versions of Windows.
jan-jaap
SGI Collector

Trade Count: (0)
Posts: 1,048
Threads: 37
Joined: Jun 2018
Location: Netherlands
Website Find Reply
10-12-2020, 07:20 AM
#6
RE: Cursor Magic (new software developed for IRIX)
That's basically correct. I did trip over Teleffect at one point and thought "that's very similar". Of course, I have some features specific to my use-case that Teleffect is unlikely to have (even if I sorted out the licensing, and it worked in Windows 10).
nintendoeats
Octane

Trade Count: (0)
Posts: 85
Threads: 8
Joined: Nov 2019
Location: Canada
Find Reply
10-12-2020, 12:05 PM
#7
RE: Cursor Magic (new software developed for IRIX)
Here a page with maybe other interesting alternatives :

https://gainos.org/~elf/sgi/nekonomicon/...628/1.html
kirikoo
O2

Trade Count: (0)
Posts: 25
Threads: 1
Joined: Apr 2019
Find Reply
10-12-2020, 03:47 PM
#8
RE: Cursor Magic (new software developed for IRIX)
Note, this is not exactly the same as those solutions, since this is built on the principle that the video output of the IRIX desktop is being shown in a resizable window on your Windows Desktop, without needing to use any kind of RDP. Those solutions assume that you actually have 2 monitors side-by-side, or they display the window using VNC/X/whatever remote desktop protocol you like.

Also, shared clipboard Smile
nintendoeats
Octane

Trade Count: (0)
Posts: 85
Threads: 8
Joined: Nov 2019
Location: Canada
Find Reply
10-12-2020, 06:10 PM
#9
RE: Cursor Magic (new software developed for IRIX)
I like this idea overall. It seems to complement things like Synergy well.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,240
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
10-12-2020, 06:12 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)