
with xdotool I want to identify that dialog box that appears when you use a master password with Firefox.
I tried this command:
xdotool search --all --name "Password Required - Mozilla Firefox" --classname Firefox
But, it gives an error:
xdotool: Unknown command: --classname Run 'xdotool help' if you want a command list
I´m not aware what could be wronge here, I have two options and both must match, thus I use --all.
Antwort1
By default, Xdotool looks for windows that match any condition, the default condition being --name --classname --class
, thus these equivalent commands get all windows whose title, instance or class contain "foo":
xdotool search foo
xdotool search --name --classname --class foo
It's a bit confusing, I'm sorry.
The
--all
and--class
[and--name
and--classname
] flags act as switches and do not take arguments.
You can, however, use command chaining to do what you want:
xdotool search --name Password search --classname Firefox
The windows matched by the first search
are "piped" onto the second search
command.
Bear in mind:
--name
matches the window title, as inWM_NAME
or_NET_WM_NAME
in Xprop's output.--classname
matches the firstWM_CLASS
string in Xprop's output.--class
matches the secondWM_CLASS
string in Xprop's output.