linux
Output to Multiple Audio Cards with Alsa
I like to have the option of playing music on my headphones or outputting to the stereo - it really improves family life when they don't always have to hear my dubstep ;) Unfortunately, the sound cards and devices you have available don't always fit together nicely. For Linux users, ALSA gives you a lot of control and flexibility over audio devices. However, it is usually difficult to figure out exactly what needs to be done.
In my case, I have an onboard audio device with optical digital out. But onboard audio usually receives a lot of noise from the rest of the components on the motherboard - your headphones buzz when a hard drive seeks or you move your mouse pointer. I have broad musical tastes and orchestras sound pretty awful with static in the background. By adding an old-school Creative Labs SoundBlaster Live card, I can get exceptional quality output for headphones.
What caused difficulty was getting audio output to both the onboard and SoundBlaster audio devices at the same time. By default, Linux applications will send audio directly to one specific device. All you need is a properly structured ~/.asoundrc file to configure ALSA. read more >>
Using GNU Screen as a Telnet Client
Yesterday I needed to install a telnet client to finish re-configuring my wifi router (telnet turns out to be a handy tool for testing services such as mail servers - don't use it for remote shell logins). Because general use of telnet is very insecure and frowned on by admins everywhere, this turned out to be a bit of a pain on my Gentoo installation. It didn't look like I could install a telnet client without also installing a telnet server, which I definitely don't need!
Thankfully, I learned that I already had a telnet client installed: GNU screen! Besides being an all-round useful tool for shell sessions, screen is easy to use as a telnet client:
# screen //telnet [host] [port]
As an example of something telnet is still useful for, suppose you needed to test the basic functionality of your mail server:
# screen //telnet mail.example.com 25
helo
mail from:<eliot@example.com>
rcpt to:<postmaster@example.com>
data
This is the body of the test e-mail. Make sure it ends with CRLF . CRLF
.
quit
Thanks to Google Postini for the details on SMTP sessions - I can never remember the details.
Improved Diff Tool - A Better Way to Compare Files
Both coders and system administrators encounter many cases where text files need to be compared. Every *nix system for the last few decades has included some type of plain-text diff tool, but this is often not enough. The human brain just doesn't have the capability/capacity to merge the differences between two files.
My grandfather taught me a very important lesson about manual labor: you let the tool do the work. The same lesson can be applied to other fields. Our brains are trained to quickly pick up on visual cues. I work much more efficiently with a utility that displays differences visually. read more >>
Installing Handbrake from Source
Twice now I've downloaded, built and installed Handbrake 0.9.4 without any problems. Then when I try to re-encode a video, I've found that the "Start" button is grayed out and Handbrake isn't actually working. Unfortunately, these two incidents were so far apart that I forgot the fix and had to start from scratch. I always assume it's a library/dependency problem, but it's not! read more >>
Installing Grub on a Linux Software RAID
Linux software RAIDs are very useful, but a lot of people seem to have trouble when they need to boot from an array. They just don't grok Grub well enough to get it installed properly. It's especially common to see everything work fine until one of the drives fails. Then they realize that Grub was only installed on one of the disks in the array (the one that failed) and it doesn't boot anymore. The correct process isn't tricky, but you have to know the right commands. read more >>
Linux Remote Clipboard
A fair number of users come to 6by9.net searching for "linux remote clipboard". I find this interesting, as I've never had a use for such a thing. I do not know your use case, but I think it's possible you're not considering some of the more powerful options available. There are a couple remote clipboard software packages for you to consider, although you may end up having to pay a license fee. You may also be going about the solution in the wrong manner, so I'll suggest some alternatives. read more >>
RSH, RLogin, and Bad User Interfaces
RSH and RLogin aren't that difficult to set up once you've gone through the man pages and done the installation a few times, but those first few times are a pain. They're old and insecure, but still frequently used on small compute clusters. I get the impression that a lot of beginners get stuck fiddling with them for hours or days. They're quite possibly the biggest stumbling block one faces when setting up a compute cluster by hand (setting /etc/hosts.equiv, setting /root/.rhosts, making sure the right flags are being sent to the rsh and rlogin daemons, etc).
Both use the xinetd daemon, which is one of those carry-overs from ancient Unix. Plenty of old Unix stuff made sense, but inetd is backwards. To enable a service, you set "disabled = no". To disable a service, you set "disabled = yes".
Putting double negatives in your configuration file is not a good idea. When a setting this basic takes a couple seconds of thought, you're doing it wrong. Were it something more complicated, administrators would be selecting the wrong option all the time.
NAT Conflicts with Windows File Sharing
I'm thankful to work in one of the most Linux dominated fields in the industry. But the rest of the world still uses Windows all over the place, so I do have to use it as part of my job. I recently made my life much better by installing Windows under Ubuntu Linux using VMware. Now the couple Windows apps I have to use are relegated to one virtual desktop on my Linux box.
The setup was mostly painless, but I did run across some very frustrating behavior with a couple of the Windows applications. read more >>
Moving and Resizing Windows Easily
There are a lot of user interface inefficiencies that we've all been forced to get used to. Moving and resizing windows is definitely one of them, as you have to carefully position the mouse cursor over a tiny section of a window.
However, there's no need for Linux users to do this. X-Windows supports moving and resizing windows by clicking and dragging on any portion of a window - the mouse cursor can be over any portion of the window, no matter what's underneath.
Here's how:
- To move: Hold down ALT while clicking and dragging with the left mouse button
- To resize: Hold down ALT while clicking and dragging with the right mouse button
You'll find that even though it's a small tip, your work will be just a little more efficient.
Linux and VNC Clipboard
I've had to use VNC many times to bridge the gap between Windows and Linux systems. It's not always the prettiest or most efficient way to get things done, but it can be quicker and less complex than virtualization or X11 through Cygwin. One stumbling block in my workflow has been the clipboard - you become so accustomed to moving data from one application to another that you really miss it when the functionality is missing.
Fortunately, there are VNC clients that will take care of this for you. I typically choose TightVNC, as it offers very good performance (including some accelerated Windows drivers) and is available for a variety of platforms. The details below may be specific to TightVNC. read more >>
