So I have been trying to sort out xdotool. I can get things like
:~$ xdotool getmouselocation
x:347 y:310 screen:0 window:90
and
:~$ xdotool getdisplaygeometry
1366 768
but am receiving to following errors for the following commands.
:~$ xdotool getwindowname
There are no windows in the stack
Invalid window '%1'
Usage: getwindowname [window=%1]
If no window is given, %1 is used. See WINDOW STACK in xdotool(1)
:~$ xdotool getactivewindow
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to query the active window aborted.
xdo_get_active_window reported an error
I am using the latest version of Ubuntu on Windows 10. I have upgraded and updated all packages including xorg. I am using X11-apps which I opted to install rather than the full version of X11. This was laid out as a choice for me during the initial install I THINK. Anyway here is the xdotool version
:~$ xdotool version
xdotool version 3.20160805.1
and a list of the X packages on Ubuntu
x11-apps/bionic,now 7.7+6ubuntu1 amd64 [installed]
x11-common/bionic-updates,now 1:7.7+19ubuntu7.1 all [installed,automatic]
x11-session-utils/bionic,now 7.7+2build1 amd64 [installed,automatic]
x11-utils/bionic,now 7.7+3build1 amd64 [installed]
x11-xkb-utils/bionic-updates,now 7.7+3ubuntu0.18.04.1 amd64 [installed,automatic]
x11-xserver-utils/bionic,now 7.7+7build1 amd64 [installed]
xauth/bionic,now 1:1.0.10-1 amd64 [installed]
xbitmaps/bionic,now 1.1.1-2 all [installed,automatic]
xdelta3/bionic,now 3.0.11-dfsg-1ubuntu1 amd64 [installed,automatic]
xdg-user-dirs/bionic,now 0.17-1ubuntu1 amd64 [installed]
xdotool/bionic,now 1:3.20160805.1-3 amd64 [installed]
xfonts-base/bionic,now 1:1.0.4+nmu1 all [installed,automatic]
xfonts-encodings/bionic,now 1:1.0.4-2 all [installed,automatic]
xfonts-scalable/bionic,now 1:1.0.3-1.1 all [installed,automatic]
xfonts-utils/bionic,now 1:7.7+6 amd64 [installed,automatic]
xfsprogs/bionic,now 4.9.0+nmu1ubuntu2 amd64 [installed]
xinit/bionic,now 1.3.4-3ubuntu3 amd64 [installed,automatic]
xinput/bionic,now 1.6.2-1build1 amd64 [installed,automatic]
xkb-data/bionic-updates,now 2.23.1-1ubuntu1.18.04.1 all [installed]
xml-core/bionic,now 0.18 all [installed]
xorg/bionic-updates,now 1:7.7+19ubuntu7.1 amd64 [installed]
xorg-docs-core/bionic,now 1:1.7.1-1.1 all [installed,automatic]
xserver-common/bionic-updates,now 2:1.19.6-1ubuntu4.4 all [installed,automatic]
xserver-xorg/bionic-updates,now 1:7.7+19ubuntu7.1 amd64 [installed,automatic]
xserver-xorg-core/bionic-updates,now 2:1.19.6-1ubuntu4.4 amd64 [installed]
xserver-xorg-input-all/bionic-updates,now 1:7.7+19ubuntu7.1 amd64 [installed,automatic]
xserver-xorg-input-libinput/bionic,now 0.27.1-1 amd64 [installed,automatic]
xserver-xorg-input-wacom/bionic,now 1:0.36.1-0ubuntu1 amd64 [installed,automatic]
xserver-xorg-legacy/bionic-updates,now 2:1.19.6-1ubuntu4.4 amd64 [installed,automatic]
xserver-xorg-video-all/bionic-updates,now 1:7.7+19ubuntu7.1 amd64 [installed,automatic]
xserver-xorg-video-amdgpu/bionic,now 18.0.1-1 amd64 [installed,automatic]
xserver-xorg-video-ati/bionic,now 1:18.0.1-1 amd64 [installed,automatic]
xserver-xorg-video-fbdev/bionic,now 1:0.4.4-1build6 amd64 [installed,automatic]
xserver-xorg-video-intel/bionic,now 2:2.99.917+git20171229-1 amd64 [installed,automatic]
xserver-xorg-video-nouveau/bionic,now 1:1.0.15-2 amd64 [installed,automatic]
xserver-xorg-video-qxl/bionic,now 0.1.5-2build1 amd64 [installed,automatic]
xserver-xorg-video-radeon/bionic,now 1:18.0.1-1 amd64 [installed,automatic]
xserver-xorg-video-vesa/bionic,now 1:2.3.4-1build3 amd64 [installed,automatic]
xserver-xorg-video-vmware/bionic,now 1:13.2.1-1build1 amd64 [installed,automatic]
Initially nothing was working until I installed xauth. I am not so sure that I have a comprehensive list of things I need to make xdotool work in full. Unless I am making a silly mistake. I am new to this and just trying to learn as much as possible. Can anyone point out any obvious errors I am making? I have seen examples on stackoverflow where people are getting these commands to work no issue. But then again, I am not sure if I have all the installed packages they have.
Any help would be appreciated...!