If you have a Debian-based system, once you've got everything installed, you can create a Debian repository from it and use that repository for installing additional similarly configured systems, or you can use it as a source for a re-install in the event that your system somehow becomes corrupted.
To do this, install the package dpkg-dev. You can install it with apt-get from the command line, or you can install it using a GUI package manager, such as Synaptic.
Now, create a directory—for example, my_repo. This will be the root of your repository. Under this, create a directory named binary. Next, copy all the .deb files from /var/cache/apt/archives/ into the binary directory. Then, go to the my_repo directory, and run the command:
$ dpkg-scanpackages binary /dev/null | gzip -9c > binary/Packages.gz
This creates your packages list. After that, save the whole my_repo directory onto another system. Then, change the /etc/apt/sources.list file, and add the path of the my_repo:
deb file:///home/boss/my_repo binary/
Now, reload the repository list and check your new repository.
Sometimes you may need to type the same thing repeatedly, whether it's filling out a form or typing a common word or phrase over and over again. There is a simple program for Linux called xte that allows you to control virtual key presses and mouse gestures that are sent to a program. xte is part of the xautomation package. It should be available through your package manager. For Debian-based systems, you can run:
$ sudo aptitude install xautomation
Once the package is downloaded and installed, you can use xte from the command line, like so:
$ xte 'sleep 5' 'str hello world'
This command waits five seconds and then types the string “hello world” into whatever application has focus. You not only can send strings, but you also can send key presses. So, let's say you want to send the key press for Enter, after you send the string “hello world”. Simply do the following:
$ xte 'sleep 5' 'str hello world' 'key Return'
There are a number of keys that can be sent using xte. Some modifier keys include Shift_L, Shift_R, Ctrl_L and Ctrl_R. As you can see, xte not only can send a Ctrl key press, but it also can distinguish between left and right Ctrl key presses. This is important, because some programs have different functions for the left and right Ctrl keys.
When typing the command for these key presses, keep in mind that the commands are case-sensitive. For instance, key Return will work, but key return will not. Use the xte --help command to get a full list of useful keys that you can send.
You can use xte for many useful things. Let's say you type your name, or maybe the name of your company, a lot throughout the day. You easily can create a script with xte that will send the string of information and then link that script to a set of shortcut keys for your desktop environment. So, instead of typing out “Johnson, Joseph and Jack's Law Office”, you simply can press Ctrl-Alt-N, and the script will type it for you.
I also use xte for was controlling Compiz on the touchscreen in my car. Without a mouse or keyboard, I was unable to use some of Compiz's useful features, such as scaling. So, after setting scaling to be controlled by moving the cursor to the top-right corner of the screen, I added an icon to the GNOME toolbar that ran a script that did the following:
$ xte 'sleep 1' 'mousemove 9999 0'
The first number (9999) is the X-axis value, and the second (0) is the Y-axis value. This command waits one second, which allows me to lift my finger from the touchscreen before the cursor moves, and then relocates the mouse cursor to the far right of the screen and up to the very top. Now, in combination with my Compiz settings, I can press the icon on my toolbar and get a nice view of all my open windows. I click the one I want, and I'm off and running. This makes touchscreen usage much more convenient and raises the cool factor a bit.
xte has many options I haven't touched on here (such as mouse clicks and holding a key or a mouse press for a given amount of time). I hope it has sparked an interest in you to give it a try and play with some. It just may be the tool you need to get a job done.
|Non-Linux FOSS: libnotify, OS X Style||Jun 18, 2013|
|Containers—Not Virtual Machines—Are the Future Cloud||Jun 17, 2013|
|Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer||Jun 12, 2013|
|Weechat, Irssi's Little Brother||Jun 11, 2013|
|One Tail Just Isn't Enough||Jun 07, 2013|
|Introduction to MapReduce with Hadoop on Linux||Jun 05, 2013|
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Linux Systems Administrator
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Validate an E-Mail Address with PHP, the Right Way
- Senior Perl Developer
- Technical Support Rep
- UX Designer
- Introduction to MapReduce with Hadoop on Linux
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?