WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Looking for option to prevent mouse to jump to newly opened window  (Read 6556 times)

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Looking for option to prevent mouse to jump to newly opened window
« on: September 21, 2019, 06:28:39 PM »
I'm using TCL as a headless nested VM in Eve-ng, connecting to the graphical environment using Ultra VNC.

By default the pointer in VNC doesn't properly follow the mouse movement correctly, it is lagging behind.
I managed to correct this by installing libXmu.tcz and 'xset m 1 0'.
Now the VNC pointer will follow the mouse correctly.
The moment I open a new window the mouse jumps to the new window, but he VNC pointer doesn't follow. Causing the mouse to be out of sync again.
Is there an option not have the mouse jump to the new window?



settings used:
Via GUI:
Apps > Apps > Cloud (Remote) > Browse > Search > libXmu > install libXmu.tcz
Control Panel > Mouse Tool > change: Mouse Speed = 1
(remembered across reboots)

Via CLI:
tce-load -wi libXmu.tcz
xset mouse 1 0
(verify with xset q)
(doesn't get remembered across reboots by default)

At bootup:
in /opt/bootlocal add the following lines.
TCEDIR=/mnt/vda1/tce/optional/
[ ! -e "$TCEDIR"/libXmu.tcz ] && sudo -u tc tce-load -wi libXmu.tcz
sudo -u tc echo "xset m 1/1 0" > /home/tc/.mouse_config
sudo chown tc:staff /home/tc/.mouse_config
sudo -u tc chmod +x og= /home/tc/.mouse_config
(this will take effect with the second boot of the VM)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #1 on: September 21, 2019, 07:16:14 PM »
Hi rhermsen
Are you running  flwm  or  flwm_topside  as a window manager? If you are, adding:
Code: [Select]
NOWARP=1to your  .profile  file will stop the mouse from jumping.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #2 on: September 21, 2019, 07:57:30 PM »
Hi rhermsen
Hi rhermsen
Are you running  flwm  or  flwm_topside  as a window manager? If you are, adding:
Code: [Select]
NOWARP=1to your  .profile  file will stop the mouse from jumping.

Sorry, that should have been:
Code: [Select]
export NOWARP=1

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #3 on: September 21, 2019, 07:59:34 PM »
Hi Rich,

Did this feature make it in TCL-10.0 (x86)?
I tried both export NOWARP=1 and export NOWARP=0, but didn't notice a change.

From this thread I get that you introduced this feature just before 10.0 was released.

Edit: /usr/local/tce.installed shows flwm_topside is installed.
The info file for flwm_topside gives: Current: 2019/02/05
« Last Edit: September 21, 2019, 08:09:14 PM by rhermsen »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #4 on: September 21, 2019, 08:13:35 PM »
Hi rhermsen
... Did this feature make it in TCL-10.0 (x86)?...
Yes it did. I'm running  flwm_topside  with the  NOWARP  setting and my mouse no longer jumps. You need to restart the window
manager after adding the  NOWARP  entry to your  .profile  file. One more thing, do not place it at the end of the  .profile  file.
Place it near the line that says:
Code: [Select]
export BACKUP=1

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #5 on: September 21, 2019, 08:32:18 PM »
I have the following line 'export NOWARP=1' just below 'export BACKUP=1' now.
And restarted a few times, but still no change.
Still see the mouse jump when I select e.g. 'Exit' or 'Terminal' from wbar.

Can libXmu.tcz break this feature?
Also have 'sudo -u tc echo "xset m 1/1 0" > /home/tc/.mouse_config' in my /opt/bootlocal.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #6 on: September 21, 2019, 08:50:57 PM »
Hi rhermsen
... Can libXmu.tcz break this feature? ...
Not likely. The  NOWARP  variable just causes the window manager not to execute the  warp()  instruction. I think  flwm_topside
is not seeing the  NOWARP  variable in your environment. Maybe something to do with how the VM is set up? If you open a
terminal and execute:
Code: [Select]
envdoes  NOWARP  show up in the list?

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #7 on: September 22, 2019, 04:42:30 AM »
Yes, it is in the list:
Code: [Select]
tc@box:~$ env
USER=tc
NOWARP=1
SHLVL=1
HOME=/home/tc
<snip>


This is my /opt/bootlocal
I commented out the lines that I added for correcting the mouse behavior.
Code: [Select]
tc@box:~$ cat /opt/bootlocal.sh | sed s'/ssh-rsa.*authorized_keys$/pub_ssh_key"/'g
#!/bin/sh
# put other system startup commands here
mount /dev/vda1 /mnt/vda1
tce-setdrive -s /mnt/vda1
[ -x /mnt/vda1/startup.sh ] && /mnt/vda1/startup.sh
TCEDIR=/mnt/vda1/tce/optional/
DBOPTIONS="-b /usr/local/etc/dropbear/banner -d /usr/local/etc/dropbear/dropbear_dss_host_key -r /usr/local/etc/dropbear/dropbear_rsa_host_key"
sudo  [ -d /usr/local/etc/dropbear ] || mkdir -p /usr/local/etc/dropbear
while [ $( ifconfig eth0 | grep -cE '^ *(UP|inet) ' ) != 2 ] ; do sleep 1; done
#[ ! -e "$TCEDIR"/libXmu.tcz ] && sudo -u tc tce-load -wi libXmu.tcz
[ ! -e "$TCEDIR"/dropbear.tcz ] && sudo -u tc tce-load -wi dropbear.tcz  > /tmp/dropbear.log 2>&1
[ ! -f /usr/local/tce.installed/dropbear ] && sudo -u tc tce-load -i /mnt/vda1/tce/optional/dropbear.tcz  > /tmp/dropbear.log 2>&1
[ ! -f /usr/local/etc/dropbear/dropbear_rsa_host_key ] && sudo dropbearkey -t rsa -f /usr/local/etc/dropbear/dropbear_rsa_host_key
[ ! -f /usr/local/etc/dropbear/dropbear_dss_host_key ] && sudo dropbearkey -t dss -f /usr/local/etc/dropbear/dropbear_dss_host_key
[ ! -d /home/tc/.ssh ] && sudo -u tc mkdir /home/tc/.ssh
sudo -u tc echo "pub_ssh_key"
#sudo -u tc echo "xset m 1/1 0" > /home/tc/.mouse_config
sudo chown -R tc:staff /home/tc/.ssh
sudo -u tc chmod -R og= /home/tc/.ssh
#sudo chown tc:staff /home/tc/.mouse_config
#sudo -u tc chmod +x og= /home/tc/.mouse_config
IPADDRESS=`ifconfig eth0 | awk '/inet addr/ {gsub("addr:", "", $2); print $2}'`
echo $IPADDRESS >> /tmp/dropbear.log 2>&1
dropbear -a -p $IPADDRESS:22  $DBOPTIONS>> /tmp/dropbear.log 2>&1
tc@box:~$

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #8 on: September 22, 2019, 07:22:45 AM »
Pity, the mouse still jumps to the newly opened window with NOWARP=1 set.

Probably indeed related to the setup.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #9 on: September 22, 2019, 08:58:36 AM »
Hi rhermsen
Open a terminal and try this:
Code: [Select]
tc@E310:~/C_Programs/server$ flwm_topside --help
Version 1.20

options are:
 -d[isplay] host:#.#    X display & screen to use
 -v[isual] #            visual to use
 -g[eometry] WxH+X+Y    limits windows to this area
 -m[aximum] WxH         size of maximized windows
 -x                     menu says Exit instead of logout
 -bg color              Frame color
 -fg color              Label color
 -bg2 color             Text field color
 -c[ursor] #            Cursor number for root
 -cfg color             Cursor color
 -cbg color             Cursor outline color
Another window manager is running.  You must exit it before running flwm_topside Version 1.20.
tc@E310:~/C_Programs/server$
Notice the last line. Do you get the same result including the version number?

I'm not up on VMs and VNC so forgive me for stating the obvious. The  NOWARP  variable has to be set in the same environment
that  flwm_topside  is running in:
If  flwm_topside  is running in the host, export  NOWARP  in the hosts  .profile  file.
If  flwm_topside  is running in the VM, export  NOWARP  in the VMs  .profile  file.
If  flwm_topside  is running in the remote machine, export  NOWARP  in the remote machines  .profile  file.

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #10 on: September 22, 2019, 05:08:27 PM »
Hi Rich,

I don't get the version number:
Code: [Select]
tc@box:~$ flwm_topside --help > flwm_topside.txt 2>&1
tc@box:~$ cat flwm_topside.txt
options are:
 -d[isplay] host:#.#    X display & screen to use
 -v[isual] #            visual to use
 -g[eometry] WxH+X+Y    limits windows to this area
 -m[aximum] WxH         size of maximized windows
 -x                     menu says Exit instead of logout
 -bg color              Frame color
 -fg color              Label color
 -bg2 color             Text field color
 -c[ursor] #            Cursor number for root
 -cfg color             Cursor color
 -cbg color             Cursor outline color
Another window manager is running.  You must exit it before running flwm_topside.
tc@box:~$
Not sure what to conclude from not seeing the version number.

I do see the NOWARP variable with set, so would expect ~/.profile to be the correct location.
It is set within the VM.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #11 on: September 22, 2019, 05:16:28 PM »
Hi rhermsen
... I don't get the version number: ...
Well there's your problem. Click on the  Apps  icon. The one that looks like a screw head with a blue down arrow. Then in  Apps  click
Apps->Maintenance->Check for Updates.  Flwm_topside  should show up in the list. Highlight it and click  Process Selected Items.
When it's done, reboot. You should then have the current version of  flwm_topside  installed and hopefully no more mouse problems.

Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #12 on: September 22, 2019, 05:39:03 PM »
The output I get with 'Check for Updates':
Warning:
You are running version 10.0
The latest release is 10.1
Please Standby... Now checking your extensions.
Scan for updates completed.

I understand from your reply that I'm probably not running flwm_topside version 1.20.

The image I'm currently using is:
http://www.tinycorelinux.net/10.x/x86/archive/10.0/TinyCore-10.0.iso

info file for flwm_topside:
http://www.tinycorelinux.net/10.x/x86/tcz/flwm_topside.tcz.info
(src info
http://www.tinycorelinux.net/10.x/x86/tcz/src/flwm/compile_flwm)

Wrong/old version on the repo?



Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #13 on: September 22, 2019, 05:54:13 PM »
Hi rhermsen
I wasn't aware you were running an ISO. The 10.0 (Jan. 2019) was released prior to the  flwm_topside  update. The 10.1 (June 2019)
version was released after the the update and should have the newer version of  flwm_topside:
http://www.tinycorelinux.net/10.x/x86/release/TinyCore-10.1.iso


Offline rhermsen

  • Wiki Author
  • Full Member
  • *****
  • Posts: 109
Re: Looking for option to prevent mouse to jump to newly opened window
« Reply #14 on: September 23, 2019, 01:10:37 PM »
Yes!, you fixed it.

With a TCL-10.1 VM, only at startup the mouse pointer, and vnc pointer are out-of-sync.
After having them in sync, they don't get out of sync anymore.
Thanks a lot!