- Official Post
Any chance of xdotool addon for libreelec? Trying to get netflix working via chromium. Thanks.
Sent from my U65GT using Tapatalk
Any chance of xdotool addon for libreelec? Trying to get netflix working via chromium. Thanks.
Sent from my U65GT using Tapatalk
Yes, there is a package unofficial-addons/package.mk at master · OpenELEC/unofficial-addons · GitHub
Just needs to be convert to addon.
You also need to populate the addon, ie, addon() function, source directory, etc
If you provide me some details about the purpose of xdotool and how it works, I am willing to create an addon, or to add it to the chromium addon.
etails about the purpose of xdotool
I was using it with my Opera addon to minimize and maximize windows. And there are plenty of other use cases.
xdotool simulates mouse actions via command line. If you look at flix2kodi, it is used to convert remote button presses to control the playback of netflix within a browser.
I am having trouble making this as an addon. So far I have (omitting the copyright message:
PKG_NAME="xdotool"
PKG_VERSION="2.20110530.1"
PKG_REV="1"
PKG_ARCH=""
PKG_LICENSE="GPL"
PKG_SITE="http://www.semicomplete.com/projects/xdotool/"
PKG_URL="http://semicomplete.googlecode.com/files/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain libXtst libXinerama"
PKG_PRIORITY="optional"
PKG_SECTION="x11/app"
PKG_SHORTDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.."
PKG_LONGDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.."
PKG_IS_ADDON="yes"
PKG_AUTORECONF="no"
PKG_MAINTAINER="vpeter4 ([email protected])"
make_target() {
make xdotool.static
mv xdotool.static xdotool
}
makeinstall_target() {
: # nothing to do here
}
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin
cp -P $PKG_BUILD/usr/bin/xdotool $ADDON_BUILD/$PKG_ADDON_ID/bin/
}
Display More
I have cribbed this from the existing vpeter/oe github referred to above, plus a bit of what I have gathered from looking up othr addons (both OE and LE). I also have a freshly compiled OE7 tree.
However it doesn't compile. Using
it eventually ends up with
/home/nick/Downloads/LibreELEC.tv/build.LibreELEC-Generic.x86_64-7.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -o xdotool.static xdotool.o xdo.o xdo_search.o cmd_click.o cmd_mousemove.o cmd_mousemove_relative.o cmd_mousedown.o cmd_mouseup.o cmd_getmouselocation.o cmd_type.o cmd_key.o cmd_windowmove.o cmd_windowactivate.o cmd_windowfocus.o cmd_windowraise.o cmd_windowsize.o cmd_set_window.o cmd_search.o cmd_getwindowfocus.o cmd_getwindowpid.o cmd_getactivewindow.o cmd_windowmap.o cmd_windowunmap.o cmd_windowreparent.o cmd_set_num_desktops.o cmd_get_num_desktops.o cmd_set_desktop.o cmd_get_desktop.o cmd_set_desktop_for_window.o cmd_get_desktop_for_window.o cmd_get_desktop_viewport.o cmd_set_desktop_viewport.o cmd_windowkill.o cmd_behave.o cmd_window_select.o cmd_getwindowname.o cmd_behave_screen_edge.o cmd_windowminimize.o cmd_exec.o cmd_getwindowgeometry.o cmd_sleep.o cmd_get_display_geometry.o -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -fuse-linker-plugin -flto -lm -lrt -lX11 -lXtst -lXinerama
/tmp/ccKzXLSz.ltrans0.ltrans.o:<artificial>:function _xdo_mousebutton.lto_priv.49: error: undefined reference to 'XMissingExtension'
/tmp/ccKzXLSz.ltrans2.ltrans.o:<artificial>:function cmd_mousemove_relative: error: undefined reference to 'XMissingExtension'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextFindDisplay'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextCreateExtension'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function cmd_get_display_geometry: error: undefined reference to 'XMissingExtension'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextFindDisplay'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextAddDisplay'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextCreateExtension'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function XTestFakeKeyEvent.constprop.7: error: undefined reference to 'XMissingExtension'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function close_display.lto_priv.17: error: undefined reference to 'XextRemoveDisplay'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function close_display.lto_priv.16: error: undefined reference to 'XextRemoveDisplay'
/tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextAddDisplay'
collect2: error: ld returned 1 exit status
Makefile:65: recipe for target 'xdotool.static' failed
make: *** [xdotool.static] Error 1
Display More
Now time to cook dinner. Solutions on a postcard etc etc. Thanks guys.
I am having trouble making this as an addon. So far I have (omitting the copyright message:Code Display MorePKG_NAME="xdotool" PKG_VERSION="2.20110530.1" PKG_REV="1" PKG_ARCH="" PKG_LICENSE="GPL" PKG_SITE="http://www.semicomplete.com/projects/xdotool/" PKG_URL="http://semicomplete.googlecode.com/files/${PKG_NAME}-${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain libXtst libXinerama" PKG_PRIORITY="optional" PKG_SECTION="x11/app" PKG_SHORTDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.." PKG_LONGDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.." PKG_IS_ADDON="yes" PKG_AUTORECONF="no" PKG_MAINTAINER="vpeter4 ([email protected])" make_target() { make xdotool.static mv xdotool.static xdotool } makeinstall_target() { : # nothing to do here } addon() { mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/bin cp -P $PKG_BUILD/usr/bin/xdotool $ADDON_BUILD/$PKG_ADDON_ID/bin/ }
I have cribbed this from the existing vpeter/oe github referred to above, plus a bit of what I have gathered from looking up othr addons (both OE and LE). I also have a freshly compiled OE7 tree.
However it doesn't compile. Using
it eventually ends up with
Code Display More/home/nick/Downloads/LibreELEC.tv/build.LibreELEC-Generic.x86_64-7.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc -o xdotool.static xdotool.o xdo.o xdo_search.o cmd_click.o cmd_mousemove.o cmd_mousemove_relative.o cmd_mousedown.o cmd_mouseup.o cmd_getmouselocation.o cmd_type.o cmd_key.o cmd_windowmove.o cmd_windowactivate.o cmd_windowfocus.o cmd_windowraise.o cmd_windowsize.o cmd_set_window.o cmd_search.o cmd_getwindowfocus.o cmd_getwindowpid.o cmd_getactivewindow.o cmd_windowmap.o cmd_windowunmap.o cmd_windowreparent.o cmd_set_num_desktops.o cmd_get_num_desktops.o cmd_set_desktop.o cmd_get_desktop.o cmd_set_desktop_for_window.o cmd_get_desktop_for_window.o cmd_get_desktop_viewport.o cmd_set_desktop_viewport.o cmd_windowkill.o cmd_behave.o cmd_window_select.o cmd_getwindowname.o cmd_behave_screen_edge.o cmd_windowminimize.o cmd_exec.o cmd_getwindowgeometry.o cmd_sleep.o cmd_get_display_geometry.o -march=x86-64 -m64 -Wl,--as-needed -fuse-ld=gold -fuse-linker-plugin -flto -lm -lrt -lX11 -lXtst -lXinerama /tmp/ccKzXLSz.ltrans0.ltrans.o:<artificial>:function _xdo_mousebutton.lto_priv.49: error: undefined reference to 'XMissingExtension' /tmp/ccKzXLSz.ltrans2.ltrans.o:<artificial>:function cmd_mousemove_relative: error: undefined reference to 'XMissingExtension' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextFindDisplay' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextCreateExtension' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function cmd_get_display_geometry: error: undefined reference to 'XMissingExtension' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextFindDisplay' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextAddDisplay' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.18: error: undefined reference to 'XextCreateExtension' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function XTestFakeKeyEvent.constprop.7: error: undefined reference to 'XMissingExtension' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function close_display.lto_priv.17: error: undefined reference to 'XextRemoveDisplay' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function close_display.lto_priv.16: error: undefined reference to 'XextRemoveDisplay' /tmp/ccKzXLSz.ltrans8.ltrans.o:<artificial>:function find_display.lto_priv.19: error: undefined reference to 'XextAddDisplay' collect2: error: ld returned 1 exit status Makefile:65: recipe for target 'xdotool.static' failed make: *** [xdotool.static] Error 1
Now time to cook dinner. Solutions on a postcard etc etc. Thanks guys.
Hello nickr,
If xdottool is only used in combination with chromium, it is maybe easier to ship it with chromium, see eg the PR to add unclutter.
I will have time to assist tonight
Yeah I don't know of another use except to drive a browser. If you want to include it in chromium, thats great. I will learn from what you do!
Yeah I don't know of another use except to drive a browser. If you want to include it in chromium, thats great. I will learn from what you do!
Hello nickr!
This builds:
PKG_NAME="xdotool"
PKG_VERSION="2.20110530.1"
PKG_REV="1"
PKG_ARCH=""
PKG_LICENSE="GPL"
PKG_SITE="http://www.semicomplete.com/projects/xdotool/"
PKG_URL="http://semicomplete.googlecode.com/files/${PKG_NAME}-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain libX11 libXext libXinerama libXtst"
PKG_PRIORITY="optional"
PKG_SECTION="x11/app"
PKG_SHORTDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.."
PKG_LONGDESC="This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc.."
PKG_IS_ADDON="no"
PKG_AUTORECONF="no"
PKG_MAINTAINER="vpeter4 ([email protected])"
pre_configure_target() {
export LDFLAGS="$LDFLAGS -lXext"
}
make_target() {
make xdotool.static
mv xdotool.static xdotool
}
makeinstall_target() {
: # nothing to do here
}
Display More
I will add it to chromium, the same way as I added unclutter.
I might not have the time to do it tonight, though.
[hr]
Hello nickr,
This is how I suggest to add xdotool to chromium.
Would you please be so kind to build and runtime test it.
Thank you in advance.
I will, I just got up and am off to work soon, so it'll be 8 hours or so before I get back home.
OK chromium fails to build, finishing with
BUILD chromium (target)
Updating projects from gyp files...
ninja: Entering directory `out/Release'
[10/16930] ACTION v8_external_snapshot: run_mksnapshot (external)_d7a316e05e7b0a438c42a81cdde1cb2e
FAILED: cd ../../v8/tools/gyp; ../../../out/Release/mksnapshot --log-snapshot-positions --logfile ../../../out/Release/obj/v8/tools/gyp/v8_external_snapshot.gen/snapshot.log --random-seed 314159265 --startup_blob ../../../out/Release/snapshot_blob.bin ""
../../../out/Release/mksnapshot: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ../../../out/Release/mksnapshot)
[10/16930] CC obj/third_party/ffmpeg/libavcodec/ffmpeg.h264qpel.o
ninja: build stopped: subcommand failed.
No idea....
It might have something to do with the latest commits. I will have a look at it tonight.
Hi nickr,
I had overlooked you are building for LE7.
I have managed to build the PR for LE8, after adding the xdotool dependency to chromium (I updated the PR accordingly).
I will try to build the PR for LE7 during the night, to see if I can reproduce your issue.
If not, I will post the addon on this thread.
Just in case you can runtime test on LE8, here is chromium with xdotool for LE8.
Thank you for your patience.
No problem, I do have a 7.90.003 test machine so will give that a go.
Hello nickr,
Here is chromium with xdotool for LE7.
Do not forget to enable "Run xdotool" in the addon settings when you test.
Thanks, downloading now. Will test and advise...
[hr]
OK installed that, have "run xdotool" switched on (.kodi/userdata/browser.chromium/settings.xml confirms).
However when chromium starts via netflix, xdotool doesn't seem to start.
unclutter does start. but ps ax|grep xdotool reveals nothing.
xdotool will run from the command line, and xdotool key alt+F4 closes chromium. However the lines in the startup script
if [ "$RUN_XDOTOOL" == "true" ]
then
xdotool &
XDOTOOL_PID=$!
fi
don't seem to be doing anything.
[hr]
Ahhh enlightenment
xdotool will not background like xdotool &.
In fact it needs to be run per keypress. So having it there and runnable should be enough and those lines won't be needed in the chromium startup script.
flix2kodi has a script:
/storage/.kodi/addons/plugin.video.flix2kodi/resources/scripts/keysender/linux/chromium.sh
It is effectivley a big if, then else case statement with stanzas like:
if [ "$1" = "close" ];
then
CMD="alt+F4"
I am trying to work out what feeds into this script.
Display More
Thanks, downloading now. Will test and advise...
[hr]
OK installed that, have "run xdotool" switched on (.kodi/userdata/browser.chromium/settings.xml confirms).However when chromium starts via netflix, xdotool doesn't seem to start.
unclutter does start. but ps ax|grep xdotool reveals nothing.
xdotool will run from the command line, and xdotool key alt+F4 closes chromium. However the lines in the startup script
if [ "$RUN_XDOTOOL" == "true" ]
then
xdotool &
XDOTOOL_PID=$!
fidon't seem to be doing anything.
[hr]
Ahhh enlightenmentxdotool will not background like xdotool &.
In fact it needs to be run per keypress. So having it there and runnable should be enough and those lines won't be needed in the chromium startup script.
flix2kodi has a script:
/storage/.kodi/addons/plugin.video.flix2kodi/resources/scripts/keysender/linux/chromium.sh
It is effectivley a big if, then else case statement with stanzas like:
if [ "$1" = "close" ];
then
CMD="alt+F4"I am trying to work out what feeds into this script.
Thank you for testing.
Waiting for further feedback.