Mint 19 - xdotool
Forum rules
Before you post please read how to get help
Before you post please read how to get help
Mint 19 - xdotool
Hi
switching form ubuntu-mate to Mint-mate, I recognized that my script sending keys with xdotool does not work anymore.
I.e. I want to send some "key down" strokes to "mate-screenshot" but nothing happens, although Window ID is correct.
Did this behaviour got something to do with the mate version (former 1.16 now 1.20)? (using a diff. gtk version now?)
This is unfortunately a bit annoying. Are there perhaps remedies?
Thx in advance.
BR
switching form ubuntu-mate to Mint-mate, I recognized that my script sending keys with xdotool does not work anymore.
I.e. I want to send some "key down" strokes to "mate-screenshot" but nothing happens, although Window ID is correct.
Did this behaviour got something to do with the mate version (former 1.16 now 1.20)? (using a diff. gtk version now?)
This is unfortunately a bit annoying. Are there perhaps remedies?
Thx in advance.
BR
Re: Mint 19 - xdotool
Maybe a stupid question but did you even install it?
Code: Select all
apt install xdotool
Re: Mint 19 - xdotool
good question 
Of course I did.

Of course I did.
Re: Mint 19 - xdotool
Do you want to share your script. I'm using xdotool for a few things in Cinnamon 19 and it is working OK. Happy to help troubleshoot.
Cinnamox theme maker - https://github.com/smurphos/cinnamox-gtk-theme
Cinnamox themes - https://github.com/smurphos/cinnamox_themes
Cinnamox themes - https://github.com/smurphos/cinnamox_themes
Re: Mint 19 - xdotool
i.e.:
without trailing "key down" I get the correct window ID.#!/bin/sh
/usr/bin/mate-screenshot -i &
sleep 0.4
xdotool search --onlyvisible --name '^Bildschirmfoto aufnehmen$' key Down
...
Re: Mint 19 - xdotool
As per the xdotool manual, it uses a different protocol for sending keystrokes to other windows than the active one and that this will likely fail. I've never seen it work but maybe smurphos knows more.
I do know that you'll be fine if you activate the window first:
Code: Select all
xdotool search --onlyvisible --class mate-screenshot windowactivate; xdotool key Down
Re: Mint 19 - xdotool
Thanks. This works for me now on Mint19Mate , activating first the window.
But my old script had worked also all the time on 16.04 Ubuntu-Mate.
So somehow it must (have been) worked sending keystrokes to other windows.
But my old script had worked also all the time on 16.04 Ubuntu-Mate.
So somehow it must (have been) worked sending keystrokes to other windows.
Re: Mint 19 - xdotool
It might be due to a change in xdotool or X server, I don't know. I'm not regularly using xdotool so I'm not aware of the history, that's where maybe smurphos can provide more insight since he said he's experienced with it.
Re: Mint 19 - xdotool
Greetings!
I am using xdotool for a special project (display/hiding of a tablet-like panel), and happened to look just now at the manual re. keyboarding. Afaict, the correct syntax for your "key Down" function, per the manual, s/b "keydown" (all lower case, no spaces). Worth a try to correct your script's syntax?
Cheers, m4a
Re: Mint 19 - xdotool
mint4all -
squalo - your original constructions fails on Mint Cinnamon 19 as-well with Gnome Screenshot - but gm10s works. I don't know if something has changed. I'll give it a try in Cinnamon 18.3 sometime.
xdotool keydown <key>
and xdotool key <key>
and xdotool keyup <key>
are valid syntax with slightly different effects. Have a closer look at man xdotool.key Down
emulates pressing and releasing the Down arrow key.squalo - your original constructions fails on Mint Cinnamon 19 as-well with Gnome Screenshot - but gm10s works. I don't know if something has changed. I'll give it a try in Cinnamon 18.3 sometime.
Cinnamox theme maker - https://github.com/smurphos/cinnamox-gtk-theme
Cinnamox themes - https://github.com/smurphos/cinnamox_themes
Cinnamox themes - https://github.com/smurphos/cinnamox_themes
Re: Mint 19 - xdotool
Thanks very much for your explanation -- as always, deeply appreciated!smurphos wrote: ⤴Thu Nov 01, 2018 3:36 ammint4all -xdotool keydown <key>
andxdotool key <key>
andxdotool keyup <key>
are valid syntax with slightly different effects. Have a closer look at man xdotool.
key Down
emulates pressing and releasing the Down arrow key.
squalo - your original constructions fails on Mint Cinnamon 19 as-well with Gnome Screenshot - but gm10s works. I don't know if something has changed. I'll give it a try in Cinnamon 18.3 sometime.