Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 10-12-2021, 01:48 PM   #1
Senior Member
Registered: May 2009
Location: WV, USA
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,353
Blog Entries: 30

Rep: Reputation: 163Reputation: 163
xdotool sometimes works sometimes not

i am trying to use xdotool key to automate some startup actions when i first login. the problem is that sometimes it works just fine and sometimes the actions just don't happen although the command execution produces no error codes or error messages. it's like it thinks it works. maybe it did work but Xorg is ignoring these key inputs. what is suspicious is that in a given reboot all commands either work or all fail. there has never been a partial failure.

a startup script is executing 3 xdotool key commands after doing wmctrl -s to switch to the desired workspace. and there a sleep 10 command between everything to be sure actions have enough time to complete. the failure is that the key inputs do not come in. the oddity is that sometimes it works. if i run the script manually, it works every time.

does anyone who knows how this stuff works have any idea what is going on? what should i check on?

i suspect X because every xdotool key command fails when one does. yet i can follow that by running the script manually and that always works. sorry, the actual whole script is not available because it contains some confidential parts. i might spend some time to make and try a minimal script and see how that works.

i am running Xubuntu 18.04.6 LTS last upgraded this morning (a bunch of qemu stuff this time)

Last edited by Skaperen; 10-12-2021 at 01:51 PM.
Old 10-13-2021, 04:05 AM   #2
LQ Addict
Registered: Dec 2013
Posts: 17,963
Blog Entries: 12

Rep: Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435Reputation: 5435
Always the same with you: show us what you have. Add a verbose flag. Show us some output. You know the drill.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
A progam in C works sometimes and sometimes not. miaumezu Programming 10 12-11-2018 09:02 AM
how to send with xdotool a window to another Desktop X number? frenchn00b Linux - General 1 10-23-2009 12:31 PM
Synaptics TouchPad sometimes works,sometimes not Salgeras Linux - Laptop and Netbook 2 06-08-2007 03:20 AM
automatic shutdown of Mandrake 9.2 (sometimes works sometimes not) lu543285 Linux - Hardware 1 02-06-2004 12:18 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration