tail -f findings.out

Quick tips for NVIDIA and ATI graphics configuration repairs on Ubuntu

While graphics card and display configuration on Ubuntu has come a long way from the days of always having to edit xorg.conf by hand, I still run into issues now and again. I almost never have problems any more when setting up a new system. But changing cards in an existing system is another story, especially if switching between NVIDIA and ATI.

Today I did indeed switch from an NVIDIA to an ATI graphics card on an Ubuntu 9.10 machine. I had the nvidia-glx kernel mod in place, and xorg.conf specified the NVIDIA related modules to load, so just switching out the card and rebooting resulted in a flickering text login, no more desktop. This post covers the commands needed to install the appropriate kernel module and reconfigure Xorg in such situations.

After putting in your new card if you aren’t able to get to your desktop/get sent to a text login when you boot/get an Xorg error, reboot and hit Escape when GRUB prompts you. Boot into the recovery mode for the latest kernel shown in the list. Drop into root prompt with networking when prompted.

NVIDIA to ATI

This assumes you have an ATI card in place. Once at the root prompt run:

1
apt-get install xorg-driver-fglrx

This will remove nvidia-glx if you have it installed and install the driver for ATI Radeon and FireGL graphics cards. After this is complete you need to reconfigure xorg.conf to use the new module. Fear not, no manual editing should be required to get a basic configuration working. Just run:

1
aticonfig --initial

This script comes with the xorg-driver-fglrx. Running this will add screen and device sections in /etc/X11/xorg.conf appropriate for an ATI card, backing up /etc/X11/xorg.conf beforehand. If you added any special configurations for your screen section before you might want to edit the file manually and copy the customizations into the appropriate new sections. The sections already in xorg.conf will still be there, just commented out or not actually called when loading X. Next run:

1
startx

If all goes well you will be back to a working desktop. You can also check from the command line by running “fglrxinfo”.

For more information on using the ATI drivers on Ubuntu see this wiki article.

ATI to NVIDIA

And in the reverse situation:

1
2
3
apt-cache search nvidia-glx
# Install the latest stable one. Currently:
apt-get install nvidia-glx-185

And the equivalent for aticonfig:

1
nvidia-xconfig

As above:

1
startx

For more information on using the NVIDIA drivers on Ubuntu see this wiki article.

No guarantees here, but these have worked for me.

Tags: ,
November 4, 2009 - 9:15 PM Comments (2)

Great open source virtualization with VirtualBox

My first forays into virtualization were at work and utilized VMware’s myriad offerings (Player, Workstation, Server, ESX, VI). I was impressed by the capabilities of VMware’s products, and of course excited by the possibilities of virtualization. But for home use I didn’t push past getting VMware Player installed. I was annoyed at not being about to create my own virtual machines with the free products, and the product not being open source didn’t generate much excitement for me either.

So when I finally decided to set up some VMs for my own use, my criteria were straightforward: I wanted a broadly supported, performant, free virtualization solution that was open source. There is quite a range of options out there, e.g. Xen and OpenVZ. I decided to give Sun’s VirtualBox a try and have been nothing but impressed so far:

virtualbox_small

I’ve found VirtualBox easy to install, quite fast, attractive and easy to use.

Installation

Installation on Ubuntu 9.04 was fairly simple following this guide. You add the VirtualBox repository, install the package, and follow the configuration wizard. I didn’t have to do anything special kernel-wise that the installation guide mentions. One thing they leave out: you need to add your user to the vboxusers group. Easy enough:

1
sudo usermod -a -G vboxusers YOURUSERNAME

The manual describes installing on a wide range of other platforms, and there are plenty of tutorials out there as well.

First steps

After VirtualBox is installed, you need to create a VM and then install an OS on it. Click “New” in the top left of the VirtualBox window and follow the wizard. You might run into an issue in this process (only annoyance I’ve encountered so far) when selecting the OS Type and Version. For me the OS options in the drop down show up as very light grey on white until you hover over them:

Nearly invisible OS options

Not a critical issue, you can see the options by hovering down the list.

After you’ve followed the wizard to create the VM and provided it with storage space and other resources, you’ll end up at the VirtualBox main screen. At this point, select the VM you just made and click settings. Then go to CD/DVD-ROM on the left and check “Mount CD/DVD Drive”. If you have an actual install CD/DVD you want to use, select Host CD/DVD Drive. You can also just download the ISO for the OS you want to install and select ISO Image File:

vm_settings_small

After selecting your drive or ISO for installation, save the settings and start the VM. A new window will open displaying the output of the running VM. If all goes well, you should be shown the installation menu for the CD or ISO you’ve mounted.

Miscellaneous

  • You can take snapshots of your VMs in case you need to roll back to a known safe state. When the VM is turned off, go to the Snapshots tab to take new snapshots, review current ones, and roll back if needed.
  • Once you click on the VM window your output is sent to it alone. To get back out and interact with your own desktop, press the right CTRL key (configurable). Or install VirtualBox Guest Additions (see below) and not worry about this at all!
  • Your VMs (and assorted configuration info) are stored in ~/.VirtualBox:
    virtualbox_home_tree
  • Installing VirtualBox Guest Additions is quite helpful. Aside from graphical improvements, after it’s installed you don’t have to click inside a VM to get focus. You just move your pointer into the VM and it has focus. Move out and the host GUI has control again.

Resources

Tags: ,
October 4, 2009 - 12:49 PM Comment (1)

Permanently remember password for gksudo

I’m all about security practices on my remote server systems. On my firewalled desktop systems, however, I’d rather err on the side of convenience. I prefer to not have to type my password to use sudo or gksudo (graphical sudo). If I type my password to login to my account once, I want to have access to everything unfettered thereafter.

While there are plenty of posts on how to get sudo without password going, I never could seem to find information on how to do this for gksudo as well. So here’s how to do that.

First open the gconf-editor (gnome configuration):

1
gksu gconf-editor

Once that opens, go to /apps/gksu, and check “save-to-keyring”:

gconf_gksu

This will remember your password for gksudo, so you won’t get any more auth popups.

Tags: , ,
September 26, 2009 - 10:44 PM Comment (1)

64-bit Ubuntu: Not a problem

I recently had occasion to upgrade one of my home PCs. I went with a Core 2 Duo for the processor, and decided to give 64-bit Ubuntu (9.04, Jaunty Jackelope) a shot. I found it quite easy, with only a few adjustments needed to my usual system setup steps. General recommendations aside, I wanted to share a few particular application notes I found useful.

  • Adobe Air: I love Pandora One, TweetDeck, and a number of other Air applications, so getting this working on 64-bit was a requirement. While there aren’t any 64-bit packages for Air on Linux, the 32-bit version works just fine. I was a bit dismayed when I saw the lengthy instructions Adobe has listed for this process, but I must admit they did work perfectly. So grab the eyedrops and hit up this page. Be sure to follow the step at the end for 9.04, otherwise the Air apps won’t be able to connect to the internet on a 64-bit system.
  • Pandora One: You have to subscribe to get access to Pandora One, but rest assured it works just fine on 64-bit Ubuntu.
  • Java: This used to present some complications for Ubuntu users, but following this guide I had things running in no time.
  • Flash: All I needed to run was “sudo apt-get install flashplugin-nonfree”. Flash in Firefox worked perfectly.
  • TweetDeck: TweetDeck is a great application to keep better track of your Twitter feed. v0.30.5 works just fine on 64-bit Jaunty.

While the benefits of running a 64-bit OS aren’t as substantial for most desktop tasks, there is still a performance boost across the board. And at least for the applications I love and use everyday, the packages are definitely at a stable state for running under 64-bit.

Tags: , ,
September 26, 2009 - 9:39 PM No Comments

Using a Juniper SSL VPN on Ubuntu

Juniper’s SSL-based VPNs are wonderfully easy to use. Windows and OS X users simply sign into the VPN website, click Connect, install the Java-based app (if it’s the first time) and are good to go. On the Linux side, it seems Juniper didn’t quite expend the effort to make it so easy. I’ve heard it works fine on RPM-based distros, but it doesn’t work on Ubuntu without some preparation. The steps below are what I needed to do to get it working. This tutorial got me part of the way, so if you run into issues you might want to check it out.

Here’s what I had to do the first time:

  • Set up the Sun Java Runtime Environment and configure the system to use it. This guide explains how to do this.
  • Set up the Firefox Java plugin. You’ve probably already done this, but check this page if not.
  • Ubuntu doesn’t have a password on the root account or enable it by default. However, the install will ask for root’s password. Your sudo password will not work, as the install script dumbly switches to the root user. So set it beforehand (”sudo passwd root”) and remember it.

At this point I was able to login to the VPN site, click Connect, and complete the install. After the app installs, if all goes well, you should see something like this:

vpn

[EDIT, 2010-01-23: Commenter Jld9za helpfully reports that on Ubuntu 9.10 the following DNS and continual re-install issues aren't encountered. If you are on 9.10 or later you should be good at this point. If not, keep reading.]

Once I was connected, I could sign into things over the VPN by IP but not by name. This was due to the VPN install adding an entry to /etc/resolv.conf after my current nameserver entry. This was /etc/resolv.conf before connecting to the VPN:

1
2
3
4
# Generated by NetworkManager
domain home
search home
nameserver 192.168.1.1

And after:

1
2
3
search home MYCOOLDOMAIN.loc
nameserver 192.168.1.1
nameserver 10.175.211.10

Once I switched the VPN entry to be first, all worked fine:

1
2
3
search home MYCOOLDOMAIN.loc
nameserver 10.175.211.10
nameserver 192.168.1.1

You have to remember to switch the nameserver order in /etc/resolv.conf every time you connect. This is fairly annoying, but haven’t I found a way around it yet.

There one other problem with this setup. You have to put in the root password every time you connect, because it claims it has to reinstall a service each time. This is the popup that appears after hitting connect every time after the initial install:

vpn-reinstall

Taking a look inside the script referenced (~/.juniper_networks/network_connect/installNC.sh):

1
2
3
4
5
6
if [ -e "$1/ncsvc" ]
then
    echo "Service needs to be reinstalled."
else
    echo "Service needs to be installed for the first time."
fi

After I installed the client for the first time, ~/.juniper_networks/network_connect/ncsvc did exist. This is what prompts the re-install each time. I’m not sure why they have to initialize this every single time. I thought I could get around it by changing installNC.sh, but it gets recreated every time you click Connect. So currently you have to type in your root password for each connection.

Tags: , , ,
August 2, 2009 - 11:41 AM Comments (3)

« Older Entries

Twitter links powered by Tweet This v1.6.1, a WordPress plugin for Twitter.