Open jdwk opened 9 years ago
Try make static
from your computer then copy xdotool.static
to your workstation and make a Bash alias to run it from any directory (assuming the two Linux distros are not very different)
Thanks NLK, But my computer is a current gen MacBook Pro and my workstation is an x86-64 RHEL 5.11, I doubt they are very compatible.
If it's possible to install a virtual machine for that distro on your computer, you can make static
in that VM instead.
Another way that doesn't require static compilation on a similar Linux distro (which can be done on Mac even though using a different tool than what I explain below, but the idea is similar) is to copy all of the shared objects and place them in the same directory with the executable file. Some header *.h files may also needed.
In Linux, $ ldd xdotool
will print all of the shared objects required for the executable. otool -L
is the equivalence of ldd
in Mac but I haven't used yet.
The following commands copy all xdotool's shared objects to dependencies
directory. Most of those are likely to be available in your workstation system already.
$ mkdir -p dependencies
$ ldd xdotool | grep "=> /" | awk '{print $3}' | xargs -I '{}' cp -v '{}' /dependencies
Then copy all files in the dependencies
directory along with xdotool exectuable file to your workstation. Put them in the same directory. When you run it, it may ask for some header files so simply copy what it asks for. If you're lucky, it will work :)
Never mind the second way for Mac. You need to get your hand on a Linux to do that way.
Yeah. I've got a few PCs at home that I could put a Linux dist on to create it, but they are all boxed up. I just moved, so it'll take me a few days to get everything unpacked. I think one old P4 tower I took off of a friend of mine already has Linux installed, but not sure what flavor.
Thanks a bunch for your help. It isn't super critical. My main goal with this whole endeavor is to get gvim to check for an open version of the same file and bring that window to the front if it is. It's something I've wanted to figure out for years, but only now have I had any time to mess around with it. Usually too busy with work, but since I just changed jobs, my workload is pretty light.
I do not have root permissions to my workstation since it is a corporate supported server.
I do not have write permissions to /usr/local, but I was able to simply mod the Makefile to install to my home directory. I've done this for other utilities such as wmctrl without much issue.
However, ldconfig which is called during post-install is trying to create the temporary cache file at /etc/ld.so.cach~ to which I also do not have write permissions.
ldconfig has an option (-C) to specify the cache file so I am able to get rid of the error by adding that flag to the makefile and specifying a file in my home directory, but even without any errors during the install, I get the following error when calling the binary.
$ xdotool --help xdotool: error while loading shared libraries: libxdo.so.2: cannot open shared object file: No such file or directory
Hoping there is a way to get it to work without being "root".
Thanks.