0

Since I have problems with my Internet connection I'm not able to always run command
apt-get install xdotool in Terminal, so I would like to download the xdotool package manually from website in .zip or .deb format and then install it manually every time I need it. (I'm using Usb Live Kali Linux 2016.2-amd64 and every time I reboot it deletes all files).

I've tried to download xdotool from https://github.com/jordansissel/xdotool at the right side in green box "Clone or download" there is option download ZIP. After that I extract all files in Home folder and then open it in Terminal.
in README file there are instructions like this:

See the website for more up-to-date documentation
http://www.semicomplete.com/projects/xdotool/ or the manpage listed below.

Compile: make
Install: make install
Remove: make uninstall

You may have to set 'PREFIX' to the location you want to install to. The default PREFIX is /usr/local

For packagers, there's also support for DESTDIR for staged install.

I type in make then make install and it always outputs me this error:

    root@kali:~/xdotool-master# make
cc -pipe -O2 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -Wno-missing-field-initializers -g    -std=c99 -I/usr/X11R6/include -I/usr/local/include -fPIC -c xdo.c
xdo.c:29:34: fatal error: X11/extensions/XTest.h: No such file or directory
 #include <X11/extensions/XTest.h>
                                  ^
compilation terminated.
Makefile:124: recipe for target 'xdo.o' failed
make: *** [xdo.o] Error 1  


root@kali:~/xdotool-master# make install
install -d /usr/local
cc -pipe -O2 -pedantic -Wall -W -Wundef -Wendif-labels -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline -Wdisabled-optimization -Wno-missing-field-initializers -g    -std=c99 -I/usr/X11R6/include -I/usr/local/include -fPIC -c xdo.c
xdo.c:29:34: fatal error: X11/extensions/XTest.h: No such file or directory
 #include <X11/extensions/XTest.h>
                                  ^
compilation terminated.
Makefile:124: recipe for target 'xdo.o' failed
make: *** [xdo.o] Error 1
root@kali:~/xdotool-master# 

What I'm doing wrong?
Can you suggest me other methods of installation of xdotool (but without Internet connection)?

4
  • 1
    Did you run make before make install? You are also likely to need development packages to compile. Commented Mar 29, 2017 at 18:12
  • 3
    ALSO, read up about persistent storage for live mediums. It looks like the real game changer for your issue Commented Mar 29, 2017 at 18:13
  • @Bruno9779 for first comment I edited my question above. For second comment, I know for persistence and already tried different tutorials and none of them unfortunately didn't work. Commented Mar 29, 2017 at 18:33
  • Why do you download the source code and try to compile it, instead of downloading the binary .deb (the one apt-get install xdotool would also fetch and install, without compiling)? Commented Mar 30, 2017 at 0:11

2 Answers 2

1

The error you are getting says that you miss the file XTest.h.

Look up which package provides it with (on debian derivates):

dpkg -S Xtest.h

The package should be libXtst-dev, you might need to add some repositories, if the command doesn't return anything

0

Sounds like you're just booting off a live Kali USB image -- if you use that to formally install Kali on another USB stick and then run off that stick, that may avoid the "delete all files" issue you're seeing, if that's a good option.

(I haven't worked with Kali in a while, so my experience with it is rusty, but this is how some other live distros work.)

Beyond that, I believe Kali's apt repositories are under http://http.kali.org/kali and apt (and friends) take care of all the hard work in finding the right packages and installing them.

So, in your case what is probably the best plan (if you're not doing away with the "everything is removed at reboot" part) is to just download the deb file (and any others that you need, while you do have Internet) --

cd /whatever  # you may need to be in a world writable directory like /tmp
apt-get download xdotool

... and then that should create a file like "xdotool_1%3a3.20160805.1-5_amd64.deb".

Then save that file wherever you're persisting your files, and when you need to install it, use this --

dpkg -i xdotool_1%3a3.20160805.1-5_amd64.deb

and then you don't have to build anything and this can be done without Internet. If you have a lot of packages to do this with, write a script to do it for you and keep it wherever you're saving files too.

If xdotool has any dependencies that your base install doesn't provide, you will probably need to also download them each manually and install them at the same time. In this case, "apt-get install xdotool" should show you the packages its installing, so you'll want to download each listed *.deb file.

You must log in to answer this question.