Thread: xdotool
View Single Post
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#1
Hello, I have compiled xdotool for the N900 just now, because I was a bit annoyed by the fact that for once the N900 didn't have something I wanted that was open source and ubiquitously useful. If someone wants to explain to me how to package it as a deb, or how to send the source to the autobuilder, or how to optify it, please chime in. For now, it's just raw compiled binaries, for the people who want them, but don't know how to, or are too lazy to, compile them. I suspect skilled devs who would need xdotool already compile it for themselves, but you never know, might help someone:
xdotool.tar
I put them in:
/usr/bin/xdotool
/usr/lib/libxdo.so
/usr/lib/libxdo.so.2
/usr/include/xdo.h
So as root, unpack them there if you know what you're doing enough to fiddle with xdotool, but not enough to play with file paths. Near as I can tell, they have to be in the same folders, until you hit the last folder. Then they split into bin, lib, and include.

I'm not sure if I even need xdo.h. I did not include the man file in the above, because, well, lazy, but if someone wants it, I suppose I can dump that here too.

I have searched www.maemo.org/packages, and I used power search, for xdotool and I haven't found it yet - so if it's buried somewhere and common knowledge, my apologies. The only references to xdotool I see are when talking about Easy Debian, which makes me presume it's the Debian package in the chroot, not for the N900 itself.

To be clear, I have barely tested this at all. This is not optified (wouldn't know where to start), and for all I know your N900 will burn a horrible death upon use.

I have thus far tested the one thing I wanted xdotool for: xdotool key(up/down)

That works - in X-Terminal (only place I tested it). I have succesfully enabled auto-rotation from command-line using:
Code:
xdotool keydown ctrl && xdotool keydown shift && xdotool key r && xdotool keyup shift && xdotool keyup ctrl
--- Random backstory, feel free to skip ---
Why did I even bother? Because about 3 months ago, I was working on an auto-rotating conky.conf file. Everything worked perfectly, except for the part where I couldn't auto-enable auto-rotation, and the dev never compiled conky with the auto-rotation flag set to true. I asked this: http://talk.maemo.org/showthread.php?t=64816 No one replied, I spent a bunch of time banging my head on walls, etc. But I was a newb then.

As time passed, I developed my coding skills enough to install scratchbox on my debian virtual machine, get comfortable with compiling, and so on. Then, recently, I fiddled with some dbus scripts to get some keyboard short-cuts for myself. This inspired me to come back to the auto-rotation thing. I started seeing if I could see if I could send keypresses over dbus. I haven't figured that bit out yet, though I'm sure it's possible, but meh. At some point I finally looked at the shortcutd source code, to see if I could get ideas, and realized it was using some weird XTest stuff I never heard of. Looking around, I realized it was a library for X itself. I had no clue how to call functions from that library from the command-line either, but I DID stumble upon xdotool in the process. At first I didn't want to go through a whole special package just to enable it, but I thought, well, might as well.

Looking at the current hildon-desktop developments, this might be useless soon, for the one task I bothered installing it for myself for, as portrait mode seems to be getting progressively included into more parts of Hildon.
--- End backstory/rambling ---

Anyway, the attached binaries are compiled from the source package found in the .tar.gz on this page, using "make all install": http://www.semicomplete.com/projects/xdotool/

It's a couple months more recent than the xdotool package in debian sid armel. For all I know, there's more recent versions available already compiled that will run on the N900, so if this is useless, well, it'll sink into obscurity, and oh well. If there's any actual demand for this to make it to the repositories, and I can figure out packaging and autobuilder and so on, I can use even more recent SVN sources for that.
 

The Following 11 Users Say Thank You to Mentalist Traceur For This Useful Post: