Technology


4
Jan 10

Using x2x on Linux for KVM like goodness

Recently I purchased one of those little “nettop” computers to plug into my HDTV and act as my multimedia center (more on that when it arrives). I also purchased a IR remote, but I wanted a way to be able to use a keyboard and mouse on it as well, as it is more than just a movie player. However, I didn’t want a physical keyboard/mouse, as that would look out of place.

After reading up on the subject, I decided to give Synergy a try. Synergy lets you use use your keyboard and mouse on another computer over a network, just as if it was a second screen attached. Synergy looked promising, but several things about it did not work out for me.

Being a network application, Synergy consists of both a client app and a server app. It turns out that with Synergy the “server” is the computer with the keyboard and mouse you want to use on multiple machines. I’m sure this works fine for most people, but it does not make sense for my multimedia system. This computer will be on most of the time, being controlled by several different machines For my setup, the logical place for the “server” would be the multimedia system. I probably could have hacked it to make the client (running on my server) act more like a server, except each time the client app fails to connect to the server (running on my laptops), the time it waits for another connection increments.

When looking for Synergy alternatives, I found x2x. x2x is only designed for Linux, so it would not be usable for someone who needs to use a keyboard and mouse on multiple operating systems. I only use Ubuntu Linux at home, so this was not a problem for me. An advantage of x2x is that setup is very simple. First, install the x2x package (“x2x” in Ubuntu) on both machines, and openssh-server on the computer you want to control remotely. Then, from the computer with the keyboard and mouse you want to use on another system, run:

ssh -X user@server x2x -south -to :0

With this, you can now move your cursor beyond the bottom of your screen, onto the remote system. If you want to use a different edge of your screen, replace -south with -north, -east or -west. If you have key based authentication set up for ssh, you could stick this into the applications menu.

Updated 08 January 2010

It seems there is a bit of an issue with x2x in Ubuntu 9.10. Some people are seeing the following error when they try to run x2x:

No protocol specified
x2x - error: can not open display :0

To work around this issue until it is fixed, SSH into the box you want to remotely control, then run the following command:

xauth merge /var/run/gdm/auth-for-$USER-*/database

12
Jul 09

Android Screenshots

I just got done taking some screenshots of my snazzy Android phone. I ran into a bit of difficulty getting the DDMS (Dalvik Debug Monitor Service) tool running in Ubuntu 9.04 64 bit, but post #2 on this thread helped. To summarize:

  1. Use the package manager of your choice to install ia32-sun-java6-bin.
  2. Download the Android SDK for Linux, then extract the zip file.
  3. In the SDK tools folder, open up the ddms file in your favorite text editor.
  4. Modify line #72 to the following: java_cmd=”/usr/lib/jvm/ia32-java-6-sun/bin/java”

Here are the screenshots I took:

As you can see, I’m running a clone of the theme on HTC’s Hero Android phone. This theme can be downloaded here. All the install took was downloading the theme, putting it on my phone’s SD card as update.zip, booting into recovery mode and flashing the update. Of course, you’ll need a rooted G1 for this to work. I’m running JesusFreke’s wonderful 1.5 build. Read this guide for instructions for rooting your G1.


21
Jun 09

Fighting Juno’s address book lock-in with Python

This week I helped a friend with an OS re-install (XP unfortunately). He used Juno for his email service, which refused to work properly when re-installed. I helped him switch to Gmail, but it turns out that Juno refused to implement an export feature for their contacts. After a little hunting around, I discovered the text file the software used to store contacts, somewhere in it’s Program Files folder. What follows is a quick bit of code I wrote to convert the contacts into a CSV file. Hopefully it will be useful to someone else in their efforts to fight lock-in.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/python
 
# import libraries
import csv
 
class entry():
    """A simple data structure for each contact."""
    Name = ''
    Phone = ''
    Birthday = ''
    Address = ''
 
 
class contacts():
    """This class will contain pure input from the Juno contacts file."""
 
    def __init__(self, input):
        # Open the input file
        readFile = open(input, 'r')
 
        # Put the header into list
        header = entry()
        header.Name = "Name"
        header.Email = 'Email'
        header.Phone = "Phone Number"
        header.Address = "Address"
 
        self.list = [header]
 
        # Put the input file into a list and close file
        self.rawContent = readFile.readlines()
        readFile.close()
 
    def parse(self):
        """Parse everything and put it in the list"""
 
        count = 0
        while(count < = len(self.rawContent) -1):
            person = entry()
            count += 1 # Skips over the field specifying the contact as an entry            
 
            # Get email address
            item = self.rawContent[count][6:-2]
            if (item == ''):
                person.Email = ''
            else:
                person.Email = item
            count += 1
 
            # Throw alias into bit-bucket
            count += 1
 
            # Get first and last name
            item = self.rawContent[count][5:-2]
            if (item == ''):
                person.Name = ''
            else:
                person.Name = item
            count += 1
 
            # Get the phone number
            item = self.rawContent[count][14:-2]
            if (item == ''):
                person.Phone = ''
            else:
                person.Phone = item
            count += 1
 
            # Throw birthday into bit-bucket
            count += 1
 
            # Get the address
            item = self.rawContent[count][8:-2]
            if (item == ''):
                person.Address = ''
            else:
                person.Address = item
 
            # incriment count by four to get to the beginning of next entry
            count += 4
 
            # add person to the list
            self.list += [person]
 
    def output(self):
        """Make a CSV file"""
 
        # Set up the output file
        outFile = open('output.txt', 'w')
        output = csv.writer(outFile, delimiter=',')
 
        # Iterate through self.list and write stuff
        for person in self.list:
            output.writerow([person.Name, person.Email, person.Phone, person.Address])
 
        # Close the file
        outFile.close()

21
May 09

SHA1 is epic fail (aka new keys)

I seem to have the worst of luck, in that shortly after I created new GPG keys and published them, someone found a new attack on the SHA1 hash algorithm. This attack is such that someone could probably pull it off if they had the financial resources of a government or large organization. Therefore, I’ve made a new key, 4096 RSA. The key is on the public internets, and is signed by my old key. I will be keeping my old key active until my purchase of 250 business cards runs out, at which point that key will expire. Please make sure to send all emails with my new key.

Also, it is a good idea to use better hash algorithms than SHA1. To do this automatically, simply put the following lines at the end of your .gnupg/gpg.conf file:
personal-digest-preferences SHA256
cert-digest-algo SHA256

Old key fingerprint: E1F6 ADF3 88B4 E5C4 E3B1
New key fingerprint: 37F9 E685 576A CFD3 B08C

P.S.

I had planned on having an inline signature with this blog post, but GPG and/or WordPress and/or Firefox and FireGPG have foiled my plans. Click here to see a text document containing this post plus valid signatures from my old new key and my new new key.


10
May 09

Does High Price Attract Mac Users?

I was on the #ubuntu-us-fl IRC channel recently, when one of my fellow geeks put forward an interesting theory: People are attracted to Apple products by a high price. The theory assumes that in our society people usually equate price with quality, and not always accurately. Today I decided to do a little price comparison. I gladly admit that I have a bias towards the Linux operating system, specifically the Ubuntu distribution. However, in this post I will try to let hopefully unbiased numbers speak for themselves, with the exception of my summary at the end.

Below I have the configurations and prices for four machines: an Apple Mac Pro, a Dell XPS 630, The Wild Dog performance desktop from System76, and finally a custom built machine with parts from Newegg (thanks to excid3 for the build specs). Though the machines are from four different OEMs (aka companies that build computers), I configured each to be as close as possible in specifications and performance.

Apple Mac Pro, $2,849.00

  • Processor: One 2.66GHz Quad-Core Intel Xeon
  • RAM: 8GB (4x2GB)
  • Hard drive: 1TB 7200-rpm Serial ATA 3Gb
  • Graphics card: NVIDIA GeForce GT 120 512MB
  • DVD burner: One 18x SuperDrive

Dell XPS 630, $1,679

  • Processor: Intel® Core™2 Q9550 (12MB,2.83GHz, 1333FSB) (Also a quad core)
  • RAM: 8GB Dual Channel DDR2 SDRAM at 800MHz (4 DIMM)
  • Hard drive: 1TB Performance RAID 0 (2 x 500GB SATA 3Gb/s 7200 RPM HDDs)
  • Graphics card: SLi, Dual nVidia GeForce 9800GT 512MB
  • DVD burner: 16X CD/DVD burner (DVD+/-RW) w/double layer write capability

System76 Wild Dog Performance Desktop, $1,089.00

  • Processor: Quad Core Q6600 2.40 GHz FSB 1066 MHz L2 8 MB
  • RAM: 8 GB – 4 x 2 GB – DDR3 – 1333 MHz
  • Hard Drive:  1 TB SATA II 300Mbps – 7200 rpm 32 MB Buffer
  • Graphics card: 512 MB ATI Radeon 4550 PCI-Express x16 GDDR3 (DVI, VGA, S-Video, DVI to HDMI, DVI to VGA)
  • DVD burner: CD-RW / DVD-RW

Custom built machine, $608.90

Note: If you wanted Windows Vista on this machine (not recommended), just add $179.99 to the price. Also, the links to all the parts are listed below, seeing as there is a lot more customization that goes into a custom build.

Biased Summary

I’ll start off with the most obvious and least controversial conclusion: you’d be crazy not to get a custom built machine. Due to the geeky tendencies of this blog, most people reading this are likely to be fellow geeks. Any geek worth their weight in old CRT monitors can put that machine together. If however you are not a geek, surely you know someone who is. For $200 and a few hours to play with all the shiny parts, any geek would be glad to put this machine together for you, and you’d still be saving a huge amount of money.

Now for the slightly more controversial conclusions. I believe that a higher price does play a role in a person’s decision to buy a Mac. It is certainly not the only factor, since as far as OEM equipment goes, Apple is fairly nice. I agree that Apple has some very high quality hardware. However, the hardware in each of these machines is very similar, and all high quality, and yet the Apple machine is $1,170 more expensive than the second most expensive and yet very similar machine. You could even get any one of these machines and put OSX on it yourself if Apple would let you (or you felt like using The Pirate Bay).

Given the fact that all four machines are very similar, lets assume for a moment that the custom built machine represents the price each manufacturer pays to build their computer (not quite accurate, as the OEM’s save money by buying parts in bulk). This would mean that what you are really buying from an OEM is the convenience of having someone else put a computer together for you. That convenience costs you $2,240 if Apple builds it and $1,070 if Dell builds it. The lowest OEM service price is from System76, at $480, which is just over twice my recommended build price from the friendly neighborhood geek.

My numbers are certianly not perfect, especially since it is impossible to get an exactly identical machine from two OEMs. However, even after doing tweaking for any innacuracies in my calculations or configurations, I think your findings will be the same: all OEMs are expensive, but Apple is by far the most expensive.


AWSOM Powered