Things That Suck: Ubuntu Unity

I just upgraded my virtual machine to Unity. All the negatives I’d read rang true. The interface really does seem like a poor copy of OS X, for tablets. Complaints are often dismissed with a curt suggestion to switch distributions. However, there is an inescapable truth:



If the #2 Google suggestion is “your product sucks”, you can take it as strong evidence that you’ve made a poor product development decision.

Personally, I’m rolling my virtual machine back to a prior snapshot.

Posted in Linux, Technology | Leave a comment

Ubuntu: Keyboard Reverts to German After Reboot

Every time I rebooted or logged out of my Ubuntu virtual machine, my keyboard layout would switch to “Germany Eliminate dead keys” (“Deu”). Removing the offending layout from the keyboard manager seemed to work, but the problem would reappear the next time I logged in!

Ultimately, the solution that worked for me was:

  1. Open System | Preferences | Keyboard
  2. Select the Layouts tab
  3. Select the German keyboard layout and click ‘Remove’
  4. Click “Apply System-Wide” (critical step)
  5. Close and reboot (critical step)

For some reason, the reboot was required. Merely logging out and back in resulted in the old behavior.

If you wish to keep the other keyboard layout(s), make sure that the correct language is selected at the bottom of the login screen. If you don’t have a login screen, turn it on by selecting System | Administration | Login Screen, click Unlock, select “Show the screen for choosing who will log in,” and log out.

Posted in Linux, Technology | Leave a comment

SSH Tunneling Windows RDC

This article explains how to securely port-forward Windows Remote Desktop (Terminal Services) over SSH, using standard SSH command line syntax. If you prefer to use GUI SSH tools, such as PuTTY, there are other guides for that.

Terminology Notes

My terminology assumes that you are connecting to a machine on your home network, which is protected by a firewall. However, the diagrams and commands are valid regardless of whether the remote network is at home or not.

Additionally, I use RDCHOST to represent the local name or IP of your RDC server within the home network, and my_home_ip to represent your home IP address as visible from the Internet.

Prerequisites

  • Depending on network configuration, port-forwarding may have to be configured on the firewall.
  • An SSH client (e.g. Cygwin’s OpenSSH for Windows) must be installed on the local machine.
  • An SSH server (e.g. Cygwin’s OpenSSHD for Windows) must be present on some machine within the home network.
  • SSH keys must be generated and deployed appropriately.

SSH Command Syntax

ssh -C -N -L localPort:destinationHost:3389 proxyHost

  • localPort is the port on localhost through which you wish to connect.
  • destinationHost is the Remote Desktop host, as it appears on the home network.
  • proxyHost is the host running SSHD, through which you will tunnel.

Configuration 1: Discrete Servers

This configuration has the firewall port-forward SSH to a server on the home network, which proxies the connection to the RDC server:

                       +-----------[ Home Network ]---------------+
                       |                                          |
localhost <----> Home Firewall <---> SSH Server <---> RDC Server  |
                       |                                          |
                       +------------------------------------------+

Command line:

ssh -C -N -L 6009:RDCHOST:3389 my_home_ip

Configuration 2: Combined RDC & SSH Servers

In this configuration, the RDC server also has an SSH server, and the firewall port-forwards directly to it:

                       +------[ Home Network ]-----+
                       |                           |
localhost <----> Home Firewall <-----> RDC & SSH   |
                       |                Server     |
                       +---------------------------+

Command line:

ssh -C -N -L 6009:localhost:3389 my_home_ip

Configuration 3: Firewall as SSH Server

In this configuration, the firewall acts as the SSH server, proxying the connection directly to the RDC server on the home network:

                       +----[ Home Network ]----+
                       |                        |
localhost <----> Home Firewall <---> RDC Server |
                  & SSH Server                  |
                       |                        |
                       +------------------------+

Command line:

ssh -C -N -L 6009:RDCHOST:3389 my_home_ip

Additional Suggestions

Rather than specifying the IP address of your home firewall, I suggest using DynDNS to get a dynamic DNS entry.

Posted in Linux, Scripting, Technology, Windows | Leave a comment

Tearing on MythTV with VLC

After updating to Ubuntu 8.10, I started to get tearing artifacts. This crop up especially badly during scenes that involve panning.

The MythTV Wiki explains the fix for tearing:

echo 1024 > /proc/sys/dev/hpet/max-user-freq

Well, it works for me, anyway. I just keep forgetting what to do when it crops up.

Posted in Linux, Technology | Leave a comment

Can’t Log in to VMware Server Console on Ubuntu

As usual, I sped through the VMware Server installation, just using default settings. I then found myself unable to log in to the VMware Server Console. I would always get an error:

You do not have permissions to login to the server.

Some searching turned up a solution which is to log in as root and set a password (root has no password by default on Ubuntu). This is an ugly solution, so I re-ran VMware Server configuration. That’s when I noticed this question:

The current administrative user for VMware Server is 'root'. Would you like
to specify a different administrator? [no]

Answering yes allows you to specify the local account which will be administrator for VMware Server:

Please specify the user whom you wish to be the VMware Server administrator
[root] fitzsimj

Using fitzsimj as the VMware Server administrator.

Posted in Linux, Technology | Leave a comment

Stripping Vertical Whitespace Using tr

The Translate command, tr, is available on all Unix-y systems, including Cygwin. tr -d will delete the specified characters from a stream. Several handy escape sequences are provided for stripping newlines, carriage returns, and form-feeds:

  • \f – form feed
  • \n – new line
  • \r – return

Since tr is deleting characters, not strings, we can simply specify all of these in a single command:

cat input.txt | tr -d \r\n\f > output.txt

Another way to assemble this command:

tr -d \r\n\f < input.txt > output.txt

Posted in Linux, Scripting, Technology | Leave a comment

Autohide Ubuntu Menu in MythTV

When running MythTV under Ubuntu, the top menu (panel) may appear over MythTV’s output. The panel can be set to auto-hide, but even when hidden, several pixels will be displayed to remind you of its presence. Luckily, the number of pixels shown can be customized.

  1. Run gconf-editor.
  2. Select apps | panel | toplevels | top_panel_screen0.
  3. Check auto_hide, if you haven’t already turned auto-hiding on.
  4. Set auto_hide_size to 0 (or whatever number of pixels you want to be displayed in “hidden” mode).
Posted in Linux, Technology | Leave a comment

Hauppauge HVR-1800 with MythTV

The Hauppauge WinTV HVR-1800 is a PCI-Express card which has two tuners: one for ATSC/QAM digital video, and one for NTSC analog video. According to the MythTV wiki, only the digital video tuner is currently supported.

Hauppauge’s Windows driver, which contains the proper firmware, plus a shell script to perform the extraction, can be found on Steven Toth’s site (last updated Jan 2008).

Posted in Linux, Technology | Leave a comment

Hacking the Buffalo TeraStation Live

The Buffalo TeraStation Live is a NAS device which uses an embedded, ARM-based computer running a variant of Linux. Originally, I wanted to enable NFS, though later I stuck with CIFS/Samba. However, enabling SSH access proved invaluable for performing backups without having to worry about whether or not my Mac was able to automount the CIFS/Samba share.

Enable Telnet Logins

As this guide details, acp_commander is used to enable telnet logins and deploy addons.tar to the TeraStation. What the guide doesn’t mention is that acp_commander may fail, I had to run it several times before it succeeded. Here is the output from my successful run:

macbook:~/TeraStation jeff$ java -jar acp_commander.jar -t 192.168.1.9 -o -addons
ACP_commander out of the linkstationwiki.net project.
Used to send ACP-commands to Buffalo linkstation(R) LS-PRO.

WARNING: This is experimental software that might brick your linkstation!

Using random connID value = 07CAA8F945F3
Using target:   raid/192.168.1.9
Authenticate:   OK (ACP_STATE_FAILURE)
Installing addons.tar ...
creating directory...   OK
Didn't find  locally, looking at

http://downloads.linkstationwiki.net/Uploads/LSPro/Binaries/

java.io.FileNotFoundException: /192.168.1.9/share/acp_commander/addons.tar (No such file or directory)
        at java.io.FileOutputStream.open(Native Method)
        at java.io.FileOutputStream.(FileOutputStream.java:179)
        at java.io.FileOutputStream.(FileOutputStream.java:70)
        at acpcommander.FileSystem.copyFile(FileSystem.java:44)
        at acpcommander.acp_commander.main(acp_commander.java:862)
start telnetd...        OK (ACP_STATE_OK)
Reset root pwd...       Password changed.

You can now telnet to your box as user 'root' providingno / an empty password.
macbook:~/TeraStation jeff$ 

Note that, in this run, addons.tar wasn’t successfully retrieved and deployed. addons.tar provides wget, su, and joe.

Add Software

The TeraStation Live uses an ARM processor just like the Linksys NSLU2. The NSLU2 has a great community, so there are a large number of pre-built modules available.

Posted in Linux, Technology | Leave a comment