Bug 75489 - Local Mouse Cursor not always Visible (add option to enforce it)
Summary: Local Mouse Cursor not always Visible (add option to enforce it)
Status: RESOLVED FIXED
Alias: None
Product: krdc
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: tim
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-18 04:19 UTC by chris-kde
Modified: 2007-11-18 04:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch adds command-line and GUI options to show local cursor always (15.46 KB, patch)
2004-05-01 22:51 UTC, Flavio Stanchina
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chris-kde 2004-02-18 04:19:41 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.2 gcc (GCC) 3.3.2 20031218 (Gentoo Linux 3.3.2-r5, propolice-3.3-7)
OS:          Linux

I've upgraded from 3.1.5 to 3.2.0 and now the cursor dot to show the local pointer position rarely appears.
I was using krdc all monday (on medium quality to both vnc and rdp servers) and thought the feature must've been removed because I didn't see it once.

I saw it earlier this morning when using it, but now it's gone again.
I disconnect and reconnect to servers fairly frequently, but I've probably only seen the dot appear in two or three sessions today.

Previously I had no problem with it.

Since monday I have recompiled my kernel and glibc with nptl support, but I'm surprised if that's the cause of this problem being intermittently fixed.
Comment 1 chris-kde 2004-02-18 06:41:56 UTC
I should add that theres an additional problem that makes this even worse. In some sessions, the servers mouse pointer disappears too.
The cursor flickers when I move the mouse, but when I hold it still, it's gone.
I know this sounds like a server side bug, but it doesn't affect users with WinVNC clients, nor did it affect me before my upgrade of KDE.

All the servers I'm using this to connect to are Windows 2000 professional or server machines, with the exception of 1 which is Windows NT 4 Workstation
Comment 2 tim 2004-02-18 09:55:46 UTC
Newer VNC servers have cursor support, thus they don't transmit a bitmap of the cursor but its coordinates. The dot is supposed to appear only when the latency of this cursor becomes too high or someone else is moving the cursor in a shared session, otherwise the dot is not neccessary and the user should not see it in order to get a local-session-like experience.

Right now the cursor is turned on when average latency of the last 3 movements is over 250ms or the average latency of the last 20 movements was over 1/12s. In my tests this seemed to work fine, but maybe I should add some extra inertia to avoid the flickering that you have. 
Comment 3 chris-kde 2004-02-18 13:25:27 UTC
My understanding (from reading some other bug reports), was that the local cursor - the dot - was always on (regardless of latency) if you chose medium or lowquality connection. This was certainly what I observed in 3.1.x
(There have also been times when the regular local X pointer appears rather than the dot - i know it's the local pointer because it's black, while the server pointer is white)

Perhaps flickering wasn't the best way to describe the second problem, when the problem occurs, the remote mouse pointer is mostly invisible, when I move the mouse quickly I will see brief flicks of it, but when I stop, it's gone.
Whenever this happens the local mouse pointer is usually playing up too - so I have no pointer what so ever, the only clues I might get are if the presence of the pointer changes the screen - eg causes a tool-tip to appear.
Comment 4 tim 2004-02-18 18:53:11 UTC
3.1's behaviour was to turn the dot cursor for low and medium quality on. That caused some problems though, for instance the dot cursor is also useful in high quality mode if someone else is moving the pointer.

Which server are you using? 
Can you please try whether you have the same problems when you start krdc using 
krdc -e "tight zlib hextile raw" servername
? (This turns all cursor extensions off)
Comment 5 chris-kde 2004-02-19 23:30:12 UTC
But is the behavious still to always have the dot cursor in low and medium - because I am using medium quality.

I tried
 krdc -e "tight zlib hextile raw" 
above, intersting thing happened, when I first tried, I missed the servername parameter you'd put on the end, so I ajust executed
 krdc -e "tight zlib hextile raw"
and then used the chooser to select the server.
I tried this 7 times, the remote pointer always appeared, but of the 7 sessions, the local dot pointer only appeared twice - in the 1st and the 4th sessions.

Then I noticed your server argument, so I tried using the server name on the command line - I tried that 5 times and it was fine evrytime - that is, both the local and remote cursors were visible every session.

Each session was to the same Windows 2000 Professional machine. I tested by simply executing the command, seeing if both the cursors were there, wiggled the mouse a bit to see if that changed anything (it didn't), closed the session, and repeated...
Comment 6 tim 2004-02-23 19:20:42 UTC
What about the problems with the remote cursor? Can you reproduce them?

Concerning the local cursor, I'll probably add some intertia to it to make it more predictable. It is correct that the local cursor should not appear on servers with rich cursor extension and a good connections. 

Which VNC server are you using and which version? (Real VNC, TightVNC..?)
Comment 7 chris-kde 2004-03-02 22:57:19 UTC
The server is using Ultra VNC v1.09.
When using your command line arguments, the invisible remote mouse cursor did not occur.
However, I have just reconnecting 6 times without command line arguments (just launching from the kde menu), and 3 of those times I had no local or remote cursor - ie no mouse cursor at all.

What do you mean by good connections? Good as determined by some calculation that krdc makes? or if the user selects HQ connection.
The former seems a bit confusing and unfriendly for users, as connections may change, and users will see different behaviour when they choose the same options.
For example, in the older version, I would always choose Medium Quality connection, even when connecting to servers on the LAN because that would guarantee me a local pointer, as I found that there would sometimes be network activity that would make the lag on the remote pointer unacceptable.
Comment 8 tim 2004-03-03 20:39:31 UTC
Good connection as determined by krdc (by measuring the latency).

Actually it's a little bit more complicated, as there are 3-4 different types of servers:
1. The simplest servers do not have any special handling for cursors. The server sends the cursor positions as screen updates. With this type of server krdc always shows the local cursor as dot, because it has infinite latency. The command line options that I gave you enforces this mode. 
2. Most servers that are >1 year old use the cursor extension or the rich-cursor extension (the latter allows colored cursors). This extension does send the shape/bitmap of the current mouse cursor, but does not send its coordinates. Traditional VNC clients implemented this by setting the local mouse cursor's shape to the shape sent by the VNC server. Thus there is no visible remote cursor, but only the local cursor that is able to change its shape. This kind of implementation is not possible when modes (3) and (4) are supported though. Mode 2 also has the disadvantage that it does not work when there are two simultanous users, because there is no remote cursor. krdc turns off the dot cursor and shows a 'simulated' remote cursor that has the server's shape and is synced to the local cursor
3. Newer VNC servers like TightVNC added the CursorPos extension. It works together with (2) and allows the server to transmit the coordinates. This makes it usable for two simultanous users. IIRC normal servers ONLY use it when the 'other' person moves the cursor, but it's not used for local coordinates. krdc implements (3) like (2), with the difference that as soon as somebody else moves the remote cursor the dot-cursor appears
4. krfb/KDE's desktop sharing has its own extension that is quite similar to (3), but it's a little bit older. It allows the server to send coordinates and shape. Unlike the way (3) is normally used, it sends the coordinates for all movements (this allows some extra-features, like making noise on the client or animate the cursor when the other side clicks, which is useful for demonstrations).

UltraVNC probably uses the CursorPos extension from mode 3 in a way that's different from the other VNC servers that I tried, at least it sends more cursor positioning commands than they do. Otherwise there would be no dot cursor at all and the cursors would be synced automatically.

Because of the way RFB is designed, there's no way to predict which mode the server is using, and the server can change it at any time or even combine them.

Using 3.1's fixed setting for the dot cursor is bad for three reasons:
a) the dot cursor wouldn't be enabled in high-quality mode when somebody else is moving the mouse or the latency goes up for a short time
b) I would need to show the dot cursor even in mode 2, because I don't know that a server is mode 3-capable until it sends the first positioning message. In mode 2 the dot cursor is completely unnecessary
c) I would always show the dot cursor in mode three, even though most people never need it, unless two or more people are working on it

krdc from 3.1 did only support mode 1 and 4, so it had far fewer problems with cursor handling.

Comment 9 chris-kde 2004-03-07 22:51:11 UTC
It seems at the moment there are still times when the user knows better when to use a local dot than krdc does.
So even if it's not in the form of the fixed setting for High, Medium or low connections, can we have some kind of GUI control that allows us to explicitly say that we want a local cursor?
Comment 10 Joseph Reagle 2004-03-13 04:59:06 UTC
Yes, please! I would like this option in any case. For some reason on a (headless) win2k with ATI Radeon 7000 and UltraVNC, there's *NO* server cursor. It disappeared. And now I have no local cursor either (they're sitting on the same hub). Presently I have a USB mouse plugged into the headless machine just to keep the cursor! In any case:
1. What change would I perceive by forcing "-m" quality?
2. Why might I lose the server cursor in any case?
Comment 11 tim 2004-03-13 12:21:41 UTC
1. Nothing (in 3.2.x)

2. That's an oddity of ultravnc that I can't comment on since I don't have it (or Windows). I would need to reproduce it on Linux-based servers

3. I am going to add the option for enforcing the local cursor to the extras menu. 

I changed the severity to wish list. The UltraVNC remote cursor issue would need another entry, since bugzilla can't split a bug in two
Comment 12 Flavio Stanchina 2004-04-30 12:21:21 UTC
One more comment, since I'm being annoyed to no end by this problem. I'm connecting from my home to a Windows box at the office over ADSL and the connection is quite fast: low quality is almost instantaneous, medium/high quality is a bit laggy but easily bearable; the local cursor appears spontaneously maybe 1 out of 5 times. Even with a connection this fast, however, the latency of the remote cursor is unbearable and I want to be able to turn the local cursor on at my discretion. (philosophical rant: traditionally, Unix tools always have an option to let the user decide what he wants; some magic is OK, but there's no way a computer is going to know better than the user in all cases)

Some details: the local cursor almost never appears if I run krdc from an icon, while it appears more predictably if I run it from a terminal. Explicitly asking for low, med or high quality doesn't seem to influence the appearance of the local cursor.

I run krdc with these options:
krdc -w -m -p priv/vncpass.flavio server:port

Make sure there is a command-line option too. You likely thought of it already, but just in case...
Comment 13 Flavio Stanchina 2004-05-01 22:51:44 UTC
Created attachment 5846 [details]
patch adds command-line and GUI options to show local cursor always

As per the previous comment, I want to be able to show the local cursor always.
This patch adds a command-line option and a couple of checkboxes to do just
that. It Works For Me, but it should be reviewed by someone with more intimate
knowledge of the krdc code.
Comment 14 tim 2004-05-01 23:26:35 UTC
Thanks a lot, unfortunately the preferences code base already changed quite a lot since the 3.2 release. I'll try to port it. I am not perfectly happy with the option being in the host preferences though, because a) i am not sure that it is different for different hosts and b) the concept of a local cursor is hard to explain to a user. 

Imagin someone who never used krdc, VNC or something similar before. How would you explain it with as few words as possible?
Comment 15 Flavio Stanchina 2004-05-10 16:50:11 UTC
[Note: I didn't receive an email for comment #14 as I would have expected to -- I didn't disable receiving emails so I don't know why.]

You can use a global VNC option if you prefer, that's fine with me. What I *really* want is a command-line option as in my patch above, because I have a few icons that open VNC sessions to the machines I administer/use and I *really* need a local cursor as explained in comment #12 above.
Comment 16 Scott Newton 2004-05-11 11:44:13 UTC
Just a note confirming these observations. This is from one KDE Linux machine to another, both running KDE from source compiled around 7 May. One thing I have noticed is that I can "seem" to consistently loose the remote cursor by moving the cursor down to the bottom of kicker. This may be a red herring.
Comment 17 tim 2004-05-11 17:43:54 UTC
#16: Does the same happen when you move the cursor to the other edges of the screen? (I remember that the CursorPos extension on some Unix VNC server had a problem like that, it only sent CursorPos on the screen edges)
Comment 18 Scott Newton 2004-05-13 04:55:55 UTC
I played around with this a bit more. Yes, I could loose it at any of the edges of the screen but not always. I also lost it once in the middle of the screen. The one time I did loose it at the edge (the right hand edge though that probably doesn't make any difference) I managed to get the remote mouse cursor back again by right clicking on the desktop and selecting an entry from the menu. 
Comment 19 tim 2004-06-20 20:41:09 UTC
The option is in CVS now and can be either enabled on the command line (taken from Flavio's patch) and in the 'Advanced' menu.
Comment 20 Peter Spuhler 2007-11-18 04:48:52 UTC
I'm running version 3.95.00 on SuSE 10.3. I'm connecting to a Mac running OSX and chicken of the vnc server. It can't see a local cursor on the client but the mouse on the Mac is moving around, I can see the window decorations change when I mouse over them.