Ubuntu and the Symantec Backup client

At our company we’re using Symantec Backup Exec to back up all our servers, including some Linux machines. I set up a newer Ubuntu install (9.04) on VMWare, and was pretty confident I would be able to get the backup working (using the Legacy agent). Well, that was not as easy as it seemed…

I followed the instructions on installing the legacy agent. After some tweaking here and there, the server was now showing up in the list of legacy agents on the Backup Exec server. However, every time I tried to pull up information on the server, Backup Exec returned an error, saying the server refused connections and may be running out of available network connections. Nonsense. But something was not right apparently.

Googling around for instructions, and suspecting a firewall or security setting, I tried tweaking access to the ports Backup Exec is using. No effect. Then I hit upon something: luckily I had an older Ubuntu server running with the legacy Backup Exec client, and could compare settings. It turns out that Ubuntu installs a host file with the following content: localhost fqdn.domain.com fqdn

Why is there a difference in the third tuple? On the older server, both lines referred to I decided to change the 2nd line on the newer server to and reboot. After giving everything some time to publicize itself on the network, it appeared and asked for the credentials to use for the new server. I selected the correct user, and to my astonishment, the complete directory structure appeared.

I don’t know why there are two different entries for the local machine, but it definitely broke the legacy Backup Exec client. Now I can only hope I never have use our backups…!

Cursor keys not working in Ubuntu 8.10 VMWare client

After last week’s problem with the Terminal Services client, I also experienced problems with the cursor keys in the VMWare client for Ubuntu 8.10. This was particularly annoying, since I use Quicken in a VMWare machine, and the selection of categories is much easier with the cursor keys than with the mouse.

It turns out that this is a bug in Ubuntu Intrepid 8.10. None of the patches since October 2008 have addressed this issue, but the manual fix is very simple:

  • Open a terminal window
  • Type the following in the terminal:

    echo ‘xkeymap.nokeycodeMap = true’ > ~/.vmware/config

After entering this you have to restart your VMWare client session. If it doesn’t work, try restarting the VMWare server, however, since this is a client setting, it shouldn’t affect the server or be affected by server settings.

Cursor keys not working in Ubuntu Terminal Services client

I’m using VPN and the Terminal Services client pretty frequently to access my computer at work. As discussed in this article, the Ubuntu VPN setup is much simpler in 8.10. However, when using the Terminal Services client, I had some problems with some of the function keys, in particular the cursor keys.

Now, being an old Unix hack, I managed to use the hjkl keys to navigate around the vi screen, but in some of the applications, this became an issue. With some Googling, the solution turned out to be fairly simple.

When you start up the Terminal Services client, go to the Local Resources tab. Under the keyboard heading, select as your keyboard language en-us instead of us. Now connect to the remote computer, and all the keys should function as they were intended.

Hope this helps somebody!

Ubuntu 8.10 connect to Cisco VPN through vpnc

One of the things I need to do with my home machine is occasionally connect to our VPN at work. In 6.06LTS this required downloading the Cisco VPN client, compile it, install it, and hope it will work in the next kernel update. On top of that, you had to run a script to create the VPN connection.

In 8.10 Intrepid Ibex this is much simpler, and much more elgant. First, you need to install the VPN Connection Manager (VPNC) package. When you do this through the Add/Remove Applications, it should install three packages:

  • vpnc
  • resolvconf
  • network-manager-vpnc
The first two are essential, but the third one is the kicker in 8.10: it allows you to manage your VPN certificates, and choose which connections to make and break.
After you’ve installed these three packages, do the following:
  • right-click on the Network Manager applet.
  • Choose Edit connections
  • Click the VPN tab
  • You should have the options to Add a connection manually, or to Import a VPN certificate.
  • Since our network admin provided me with a certificate, I chose Import, and selected the certificate file.
  • The import will try to get as much information as possible out of the selected file. In most cases, you need to provide the group and user password.
  • If the group password is encrypted, it can be determined by taking the encrypted string and running it through the Cisco decoder at http://www.unix-ag.uni-kl.de/~massar/bin/cisco-decode
  • Save your changes
  • Close the Edit Connections screen
You should now be able to left-click on the Network Manager applet, select VPN connections, and click on the newly added connection. The Network icon will show a circling star for a couple of seconds, and then indicate that the VPN connection is established by showing a yellow padlock in the bottom right of the icon.

Disconnecting is just as easy: left-click on the applet, select VPN connections, and select Disconnect VPN.

Ubuntu 8.10 installation – GRUB error 18

Over the Christmas break I’ve installed Ubuntu 8.10 on my main machine. The installation was not upgradeable without some serious wizardry (the /boot partition was too small, and increasing that on a full disk is not easy), so I decided to do a fresh install.

After going through all the installation steps, and booting up Ubuntu 8.10 for the first time, I was greeted with a GRUB error 18. Some Googling revealed that this was caused by the hard disk being too large for the BIOS to handle. And there was even a helpful post that described a three step process:

  • Set your hard disk for LBA mode
  • Install Ubuntu
  • Set your hard disk back to normal
Unfortunately, this didn’t work for me. The installation resulted in the same GRUB error. However, there is an easier fix.
GRUB error 18 means actually that the kernel cannot be found in the first 1023 cylinders. You can change that by creating a /boot partition that is completely within those first 1023 cylinders. So, after the first try at installing, and failing with the GRUB error, try this:
  • Restart your machine, with the Ubuntu CD as startup.
  • Install Ubuntu as normal, until you get to the partition information.
  • Select Manual from the partition options.
  • The only thing you need to change is the main partition (/). Delete the one that is on the disk now. The partitioner may tell you it needs to write changes to the disk – by all means, let it write them.
  • Next, create a partition at the very beginning of the hard disk, of sufficient size, but not too big (I decided on 1GB, but it may be better to go with 512KB or even smaller – not too small, since I couldn’t do an upgrade on my 128KB boot partition). Choose ext2 as file system – you won’t need journaling or anything fancy on that partition. Your mount point is /boot.
  • Finally, create the main partition, covering the remainder of the hard disk. Make the file system ext3 – you want the journaling etc. on this one.
  • You should now have a /boot partition at the beginning of your disk, a / partition for most of the rest, and a small swap partition (about twice the size of your memory). If not, you need to manually adjust the partitions until you have all three.
  • Continue with the rest of the installation.
Your mileage may vary, but this worked for me (it’s also the trick I used when installing 6.06LTS). Hope this helps someone!

Holiday break over

Well, it’s been a while on this blog. But with Thanksgiving, Christmas, New Year, a stomach virus and an insane workload at my day job, there was little time for blogging.

We’ve done some interesting things at work, we’re finally implementing some real web services for communicating between applications and even sister companies, we’re doing data mining, so lots of new things for me to pick up.

At home, things have been quite on the automation front. We did invest in a GPS device, to cut the Verizon Wireless bill by about $10 a month, and have some more options. Apart from that, I’ve installed Ubuntu 8.10 Intrepid Ibex on my main computer, and like it a lot (more about that in upcoming posts).

Anyways, I hope everybody had a great holiday season, Happy New Year to y’all and on to a more blog-ful 2009!

Setting up MXP to run under Linux

Recently our systems administrator asked me if it was possible to run MXP under Linux. “I don’t think there is a client of Progress for Linux, at least not graphical”, was my first response. But I got intrigued, and started digging (or rather, googling) around. And it is possible.

I’ll describe what I did under Ubuntu 7.10 with Progress 10.0B, and MXP 8.1E. The steps should be very similar for other Linux flavors, or later versions of Progress and MXP.

Step 1: Install Wine

The first step is the easiest: install wine.

sudo apt-get install wine

This should install wine (if it wasn’t already installed), and any dependencies.

Step 2: Configure wine with IEs4Linux

The next step is to configure wine. You can do all of it manually, but by far the easiest is to use IEs4Linux. You don’t have to use the latest beta (which includes support for IE7), since we’re only interested in the underlying framework, not the support of IE.

The best place to look is the IEs4Linux website, but in case the steps aren’t available:

  1. Open a terminal
  2. Open /etc/apt/sources.list
        sudo gedit /etc/apt/sources.list
  3. Uncomment or add the following lines
        deb http://us.archive.ubuntu.com/ubuntu gutsy universe
  4. Add this line:
        deb http://wine.budgetdedicated.com/apt gutsy main
  5. Close gedit, update apt-get package list and install cabextract:
        sudo apt-get update
        sudo apt-get install cabextract
    You might get an error about an untrusted site (wine.budgetdedicated.com), but you can ignore that.
  6. Download IEs4Linux and install
        wget http://www.tatanka.com.br/ies4linux/downloads/ies4linux-latest.tar.gz
        tar zxvf ies4linux-latest.tar.gz
        cd ies4linux-*

Step 3: Install Progress 10.0B

To install Progress, you have to have your license code handy. Also, in my case I had the installation CD copied to the hard drive. In any case, it’s as easy as typing

wine setup.exe

and following the prompts.

Note: the standard installation of wine treats everything as Windows 2000. I ran the setup under Windows 2000, then switched to Windows XP as standard. I don’t think there is a difference for Progress.

Step 4: Installing MXP

I’m assuming that you already have an installation of MXP on your network somewhere. If not, install it from a regular Windows machine, and copy your settings over.
The installation of MXP hinges on a couple of things:

  1. The startup icon. Copy this from a Windows machine already running MXP
  2. The services file. This is used to connect to the proper databases. Add the services needed to /etc/services.
  3. Most installations have a shared drive that contains sources or compiled programs. So that will be our next step.

Step 5: Creating a mount to a Windows Share

We have all the compiled programs installed on a share on our Windows server, which is mapped to the Q drive. The first step is to make this Windows share visible on our Linux box:

  1. Make sure you have the Samba filesystem installed:
        sudo apt-get install smbfs
  2. Add a line to /etc/fstab like this:
        //admin/progress.mxp /mnt/progress.mxp smbfs credentials=/home/ronald/.smbpassword,user,defaults 0 0
    This will allow the system to automatically mount the Windows share (//admin/progress.mxp) on a mounting point on Linux (/mnt/progress.mxp) as Samba (smbfs) with the credentials from a hidden file .smbpassword
  3. Create the .smbpassword file:
        gedit .smbpassword
You can get fancy by not automatically mounting the share during system startup, but adding an entry to your login script that mounts the drive properly. Let me know how that turns out… 🙂

Step 6: Linking a drive letter to a Windows Share

Wine has a nice little solution to map shares to drive letters:

  1. Select Applications->Wine->Configure Wine
  2. Select the Drives tab
  3. Add a drive mapping
The drive mapping will be the next available drive letter. If you’re not happy with that, open a terminal, navigate to .wine/dosdevices, and create a symbolic link to the desired mounting point:

ln -s /mnt/progress.mxp q:

Step 7: Install the foresight.fon font

At this point you should be able to start MXP with the icon, and be OK until you actually enter a username and password. After that, all hell breaks lose because the foresight font is not installed properly. I muddled around for a while, and finally came across this:

  1. Make sure you have the microsoft core fonts installed.
        sudo apt-get install msttcorefonts
  2. Install fontforge
        sudo apt-get install fontforge
  3. Use fontforge to convert foresight.fon to a BCF file.
    1. Open foresight.fon in fontforge.
    2. Go to the “Element” menu, and choose “Font Info…”
    3. Go to the Encoding tab
    4. Click the box next to Encoding (probably reads Windows Latin (“ANSI”)
    5. Choose “ISO 8859-1 (Latin1)”
    6. Click “OK”
    7. Go to the File menu, choose “Generate Fonts…”
    8. The right hand box should be set to BDF, if not, change it to BDF
    9. Click “Save”
    10. 96 dpi is sufficient, click OK
    11. Go to where you saved the font, and rename it to how you want it to show up, i.e. foresight.bdf
  4. Convert it from BDF to PCF format:
        bdftopcf -o foresight.pcf foresight.bdf
  5. Create a bitmapped fonts directory
        sudo mkdir /usr/share/fonts/bitmaps
  6. Copy and install the font
    1. sudo cp foresight.pcf /usr/share/fonts/bitmaps
    2. sudo mkfontdir /usr/share/fonts/bitmaps
  7. Make the new directory available as a font directory
        xset fp+ /usr/share/fonts/bitmaps
  8. Refresh the font server
        sudo xset fp rehash
The font should now be available, and MXP shouldn’t complain about weird geometry anymore.