LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 09-16-2021, 12:09 PM   #1
m.lp.ql.m
LQ Newbie
 
Registered: Apr 2009
Posts: 11

Rep: Reputation: 0
Kubuntu 20.04 - locate mouse cursor


Kind of like how Windows has an option one can set where hitting the CTRL key alone will create a sort of bullseye animation surrounding the mouse cursor to help locate it. Is there something similar in KDE/Kubuntu? I see nothing in the control panel relating to such. Very necessary when dealing with 3 screens.

I've found posts describing something like that for older versions of Kubuntu, and Gnome and Xubuntu. I've tried oneko, but that's a little overkill for what I need.

I'm on Kubuntu 20.04, KDE Frameworks 5.68.0
 
Old 09-16-2021, 07:58 PM   #2
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
System Settings > Workspace Behavior > Desktop Effects > Accessibility > Track Mouse?
 
Old 10-03-2021, 11:06 AM   #3
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Rep: Reputation: 84
I tried
System Settings > Workspace Behavior > Desktop Effects > Accessibility > Track Mouse

In my case, it doesn't seem to do anything.
I also bound the keys Ctrl + L, it still doesn't do anything.
 
Old 10-03-2021, 11:01 PM   #4
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
Quote:
Originally Posted by vmelkon View Post
I tried
System Settings > Workspace Behavior > Desktop Effects > Accessibility > Track Mouse

In my case, it doesn't seem to do anything.
I also bound the keys Ctrl + L, it still doesn't do anything.
Hmm. Works for me. In the "[Plugins]" section of "~/.config/kwinrc", I have "trackmouseEnabled=true" and in the "[kwin]" section of "~/.config/kglobalshortcutsrc" I have "TrackMouse=Meta+Alt+M,none,Track mouse" (because I assigned Super+Alt+M as the toggle for turning mouse tracking on/off).

In some other thread you were exploring logging in as root. Maybe there's a permissions issue?

EDIT: The track mouse feature does not work for me with Plasma 5.22.90 (aka 5.23 beta). Nothing happens.

Last edited by hish2021; 10-04-2021 at 07:11 AM.
 
Old 10-06-2021, 08:28 AM   #5
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
NOTE: If a desktop effect doesn't work immediately, turn compositing off and then on again. Alt+Shift+F12 is the toggle.
 
Old 10-06-2021, 04:17 PM   #6
vmelkon
Member
 
Registered: Feb 2007
Location: Canada
Distribution: Kubuntu 22.04
Posts: 549

Rep: Reputation: 84
Quote:
Originally Posted by hish2021 View Post
NOTE: If a desktop effect doesn't work immediately, turn compositing off and then on again. Alt+Shift+F12 is the toggle.
In my case, I had Compositor disabled since long ago, it would cause a crash when I played a certain game.
Yes, if I enable it, the mouse tracker works.
Hmmm, maybe they should make the mouse tracker work without the Compositor.
 
Old 10-06-2021, 07:34 PM   #7
hish2021
Member
 
Registered: Jan 2021
Posts: 117

Rep: Reputation: Disabled
Quote:
Originally Posted by vmelkon View Post
In my case, I had Compositor disabled since long ago, it would cause a crash when I played a certain game.
Yes, if I enable it, the mouse tracker works.
Hmmm, maybe they should make the mouse tracker work without the Compositor.
I think most, if not all, desktop effects require native compositing.
 
Old 10-07-2021, 10:43 PM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
I once hacked a script that locates the mouse cursor.
No compositing required.
You can choose one of osd_cat, aosd_cat or conky to display the frame around the cursor.
Code:
#!/bin/sh

showtime=2 # in seconds
method=conky # aosd_cat or osd_cat or conky

eval $(xdotool getmouselocation --shell)

# get cursor size to calculate offsets
#~ gsettings get org.gnome.desktop.interface cursor-size

case "$method" in
osd_cat)

printf "██████████\n██      ██\n██      ██\n██      ██\n██████████" | osd_cat -o$((Y-20)) -i$((X-35)) -d"$showtime"

;;

aosd_cat)

font="monospace 60"
X="$((X - 20))"
Y="$((Y - 40))"
color="#00FFFF"
#~ string="◊"
string="O"
showtime="$((showtime*1000))"
printf "%s" "$string" | \
aosd_cat --position 0 -x "$X" -y "$Y" --font "$font" --fade-in 0 --fade-full "$showtime" --fade-out 0 --shadow-opacity 0 --fore-color "$color"

;;

conky)

cat <<EOF | conky -c - & conkypid=$!
conky.config = {
own_window = true,
own_window_transparent = false,
own_window_colour = '#ff0000',
own_window_hints = 'undecorated,skip_taskbar,skip_pager,sticky',
update_interval = 1,
double_buffer = true,
minimum_width = 20,
minimum_height = 20,
maximum_width = 20,
alignment = 'top_left',
gap_x = $X,
gap_y = $Y,
draw_borders = true,
draw_outline = false,
draw_shades = false,
border_width = 4,
border_outer_margin = 2,
default_color = '#ffffff',
};
conky.text = [[]];
EOF
# total_run_times is unreliable, therefore:
sleep "$showtime"
kill $conkypid

;;
esac
 
  


Reply

Tags
cursor, locate, mouse, mouse cursor



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide mouse cursor/change cursor location? mrjamin Linux - Software 4 09-27-2010 10:09 AM
KDE 3 - locate mouse cursor arizonagroovejet Linux - Desktop 2 12-12-2008 04:38 PM
cpan> locate -u Unknown shell command 'locate -u'. Type ? for help. sharad2005 Linux From Scratch 1 08-04-2006 12:40 AM
[Mouse cursor] flicking on animated cursor Creak Debian 1 06-10-2005 02:16 AM
Can't locate locate hindenbergbaby Linux - Newbie 3 10-22-2003 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 09:20 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