Another VMWare issue I started having is Unity mode wouldn’t start.  Click the button, the unity menu pops up and the VMWare window minimizes, but the unity app never displays.

This is also  a common problem with a very simple fix.  Apparently, sometime in the past, I added a line to my /etc/vmware/config file to problem fix or enable some other feature.  This line and Unity just don’t mix.

The fix, per this thread and ultimately this blog post, is to remove the following line from your /etc/vmware/config file.

xkeymap.nokeycodeMap = true

Keep reading the VMWare Communities post for additional details if you added that line to address some key mapping issues.

, , ,

Like many Linux users of VMWare, I live in a mixed world where not everything I need or want can be done in Linux so I have to resort to dual boots and virtual machines.  Combine that with the sad state of EXT2/3 FS drivers for Windows and you have a situation where you have make concessions just to get by.  For this particular story I am referring to having NTFS formated external hard drives.  I like to run my virtual machines on separate physical disks especially when the physical machine is an under-powered laptop.  So I have my VM on an NTFS external drive, trying to run it form my Linux desktop and I am getting terrible performance.  TERRIBLE.  Like the window graying out cause it is unresponsive and having to kill -9 processes just to get anything moving again.  Looking at the processes the FUSE ntfs-3g driver is pegged at 100% even after killing the vm.

It turns out that this is a known problem in the ntfs-3g driver and is being ‘worked on’.  I say ‘worked on’ cause the problem has apparently been around for a long time.  So long in fact, that it has made it to the FAQ on the ntfs-3g.org website here.  With all of that said, the solution is to simply add a line to your .vmx file.  Note:  This is a per-VM setting, so you will have to do it on all of them.

Edit your .vmx file and add the following.

mainMem.useNamedFile=FALSE

Do note as the state on the website that your /tmp dir must be on a non-ntfs-3g partition or else you could cause additional performance issues.

, , ,

As you use Ubuntu, you are bound to come across a time when you want to build a custom file association.  Inevitably, you are bound to make a mistake in that file association and end up with a second entry in your available applications that is wrong.

I managed to do this while installing uTorrent via CrossOver.  The entry in the available application field also had a funky ^C5 something something something for the “mirco” which translated itself as the entry name automagically.

When I managed to get it all sorted out, I ended up with two entries in there.  One working with a crap-tastic name and the other not working with the right now.  That is when I started digging into how to manually create/remove those entires.

It turns out that it is very easy.

The available associations are located in ~/.local/share/applications

It should be fairly obvious which one you need to edit/delete when you list the contents of that directory.

This is the resulting file I had after correcting and assigning the icon.

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Icon=/home/jon/.cxoffice/utorrent/windata/Desktop.C^5E3A^5Fwindows^5Fprofiles^5Fcrossover^5FDesktop/^C2^B5Torrent.xpm
Exec="/home/jon/.cxoffice/utorrent/desktopdata/cxmenu/StartMenu.C^5E3A^5Fwindows^5Fprofiles^5Fcrossover^5FStart^2BMenu/^C2^B5Torrent" %f
Name=uTorrent
Comment=Custom definition for crossover uTorrent
NoDisplay=true

If you use this, a couple of things to note. My username is jon and the bottle I created in CrossOver is called utorrent. If you adjust it for those two changes, you should be able to copy/paste and have a file association ready to go for uTorrent including a spiffy icon.

, , , ,

Anyone who runs GNU/Linux is bound to need a console at some point.  Sometimes it is just easier to switch over to a virtual console and do what you need to do.  The default state of most consoles is an 80×30 character display which is basically useless if you want to see any kind of information.

The simple solution to this minimalist display is to set the vga kernel flag.  This allows you to set the resolution on your console framebuffer to something more useful.

The default settings example shows vga=791.  This puts your console in a 1024×768 resultion.  Which while not great is a significate boost over the standard 800×600.  If you simply enable this resolution, you will notice the Ubuntu usplash logo off center.  Very annoying.  The following steps are needed to make your Console Framebuffer something to look at.

1. Figure out what resolution your primary monitor supports.  This is typically what you have your desktop resolution set to.

2. Determine what your vga kernel flag needs to be set to.

The Wikipedia article on VESA BIOS Extensions will probably answer your questions.  Specifically, the section on Linux Video Modes.

For us widescreen users, we are not as lucky with our resolution choices.  Though, through my expirimentation, I did find that vga=840 works to give me a 1400×1050@16bit on my Dell Inspiron 1505 with the NVidia 7300 Go.  This is actually VESA 348 and does not follow the 512 rule stated in the Wiki article.  My assumption about why is probably due to manufacturers implementation.

Note: Don’t worry too much about getting it wrong.  One of two things will happen.  1. You will get no display or 2. you will get a grub screen telling you your video mode is unsupported.  I will cover how to correct this in a moment.

3. Edit your menu.lst file and add the vga= option in two places.  First, add it to the default options line.  You are looking for this line.
# defoptions=quiet splash

Change it to:
# defoptions=quiet splash vga=840

Be sure to set the 840 to the mode that represents your preferences.

Next change the default Boot menu kernel entry at the bottom. In a standard Ubuntu build, the default entry will be the first entry following this line.

## ## End Default Options ##

It will look something like this:
title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid 636dc411-e53a-4776-a9e9-4fc9e277f445
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash
initrd /boot/initrd.img-2.6.27-9-generic
quiet

You need to add the vga=### to the end of the kernel line so it looks like this.

kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=636dc411-e53a-4776-a9e9-4fc9e277f445 ro quiet splash vga=840

4. Next you need to update the usplash config to match the resolution.  This is how you keep the logo centered.

sudo vi /etc/usplash.conf

Change the x and y resolution lines to match your chosen resolution.

# Usplash configuration file
xres=1400
yres=1050

5.  Update your initramfs to take advantage of the usplash settings change.

sudo update-initramfs -u

6. Reboot.

You should see a smaller, higher resolution Ubuntu logo and then Gnome startup.

Upon reboot, if you get a blank screen, that means you chose a resolution that is larger than what your display can support. In this case, you will need to boot your Ubuntu CD and chose rescue mode. From there, chose a command prompt for the rescue CD. CD to /target/boot/gurb. then edit menu.lst with nano. Remove the vga=840 line from the kernel entry at the bottom.

If you are getting a grub menu saying you have set and invalid mode, press the space bar to see a list of valid modes. If you would like to get a complete list. Type in scan and press enter. This table is what I used to help determine the 840 setting for my display.  Select the letter representing your choice and your machine will continue to boot.

The entries listed on the table are the only VESA modes your video card support. Find the entry that best matches your display preferences without exceeding the max resolution of your monitor.  Take that number, add 512 to it and update the menu.lst file.  If this results in the invalid mode error again, you will need to experiment to find the actual setting.

Note:  The number following the resolution is the color depth or the number of bits being used to describe color.  Unless you have a specific limitation, it is safe and preferable to chose the highest number following your chosen resolution.  You will typically see 8,16, and 32.

My monitor supports 1650×1050 max resolution. The max resolution my video card supports is 1600×1200. Since the 1200 is greater than the 1050, if I chose this resolution, my monitor will not display and/or give me an error indicating that it is out of range. In my case, my next best choice was 1400×1050@16bit. The menu displayed this resolution as VESA 348. My next step was to convert the VESA mode to a linux VGA mode. Per the VESA BIOS Wiki I linker earlier, the standard is to add 512 to the VESA mode which would give me 860. I set vga=860 and rebooted. Same problem but it gave me an error stating 361 was not a valid mode. Since my goal was 348, I tried decreasing it by 12. I set vga=853 and rebooted. I got the grub error again, but it said that 355 was not a valid mode. Some simple math showed that I moved from 361 to 355 by subtracting 12 from the VGA mode, this time I need to move 7. I subtracted 13 this time which gave me the 840 and no grub errors on boot.

, , ,

I have a Ubuntu 8.10 AMD64 Server.  In the syslog, I was getting the following error every few minutes.

console-kit-daemon[5013]: CRITICAL: cannot initialize libpolkit

The error is triggered by the update-modt cron job which runs ever 10 minutes.

This is a bug in Intrepid.  console-kit-daemon requires PolicyKit as a dependancy, but Intrepid (Server AMD64) does not install it when it installs console-daemon-kit.

The simple fix is to install policykit.

sudo apt-get install policykit

Next run of the update-motd job and the error is gone.

, , ,

A year or so ago a friend of mine told me about this little app called Synergy.  It is an open source utility which allows you to use a single KB/mouse to manage multiple PCs.  It is a very slick little tool that works on linux, windows, and OS X.

It is a client-server setup.  The server is the PC which has the keyboard and mouse attached to it.  The client is a very small agent running on each PC.  Configuration for the client is simply providing the DNS name or IP of the server.  The server config is a just a hair more involved.  You have to tell it which clients are connecting to it and how they relate to each other for mouse movement.

The behaviour acts like you have multiple monitors.  Simple move the mouse to the edge of the screen you have defined in the layout and it starts moving on the other PC.  I don’t see any limitations to the number of PCs you can have connected, though I am sure there is a point where it would become cumbersome to move between all of the screens.

Of course Ubuntu Communities has nice documentation on how to configure it including for autostartup at various points.

, , ,

Four vulnerabilities in the Ubuntu kernel were resolved today.  Go update your systems!

The details are here.

As a side note, I did not have to reconfig the VMWare kernel modules upon reboot.

From the command line:
sudo apt-get update; sudo apt-get upgrade

You will be good to go after that.

, , ,

I go to watch a movie of the Divx variety on my Ubuntu latop and I get this 1 frame/sec response.  I do a little googling and see a few others are having the same issue.  My first stop for a fix was trying Totem-xine.  This had better results but only lasted about 6 seconds into the film before it caused the application to lockup.  Also, there was no sound.  Next step, try VLC. I have had good luck with VLC in the best, but I refuse to use it full time due to its craptastic, user unfriendly interface.  This time, the movie was playing, just no audio.  I did a little test of the Sound System via the System -> Preferences -> Sound application with the result of Pulse Audio not working and Also is.  (Hint 1)  Given my past experience with Pulse, I am not really suprised by these results.

Next step, I find this suggested solution for setting up VLC to use Pulse Audio.  I checked the Audio Output setting and it was set to Pulse Audio.  So I changed it over to Alsa and badabing I have video and sound.

Given I was just hanging out in the Sound Preferences, I decided to go back and chance the default playback option for Music and Movies to ALSA and give Totem-gstreamer (the default version) a whirl again.  Sure enough, the problem is results.

Ubuntu Sounds Preferences Showing ALSA selected for Music and Movies.

Ubuntu Sounds Preferences Showing ALSA selected for Music and Movies.

This to me says the problem is with Pulse, yet again.  I can appreciate the perspective Gnome/Ubuntu took in moving to Pulse.  It is one of those you have to do it at some point as the OS level because the app developers won’t do it on their own.  But damn.. this is not the first time and I am certain it will not be the last time I will have an issue.

, , , , , ,

I saw this article this morning from Ars on virtualization and itmade mention that VMWare Workstation 6 contains the ability to run a linux guest in paravirtualized mode.  So I started digging around to see if Server offered this ability.  Much to my chagrin, the functionality it is only in Server 2 which is still in RC1.

My biggest issue with Server 2 is the Server Console application we all know and love has been replaced by a crap-tastic web interface running on a stripped down/modified Apache/tomcat service provided by the install.  In short.. teh suck.

I let my geek tendancies run and went ahead with the upgrade??? to Server 2.  So far.. I am NOT impressed.  The performance of the web interface is pathetic compared to the console.

First issue I ran into was it was prompting me to select a client certificate to authenticate myself.  Apparently this is a bug that hasn’t been resolved yet.  I had to backup and delete my client certificates to login.  This is not going to fly..

Second issue, it doesn’t automatically accept those who can run sudo commands as authorized users of the system.  I had to reset the root login and give the admin group that administrator role.

Third issue.. the HGFS module does not compile.  At least I do not need shared folders on here.

Forth Issue..The remote console plugin for Firefox does not work with 3.0.1.  I had to adjust it manually so it would.

Fifth Issue..the performance really sucks.  Slow, buggy.. a couple of times I got an error that said my console session was rejected.  No Permission To View The Console.. WFT.  I restarted the vmware services on the host and it started working.

Sixth Issue.. Shutting down the guest did not power off the VM until the tools were upgraded.  – I don’t mind they don’t fully function, but I would consider that one to be pretty important.  I had to manually kill the process before the web interface would let me do anything.

NOTE:  Before the paravirtualization option can be enabled (from the advanced options tab in the vm configuration) you have to have the upgrade tools installed and running and then shutdown the guest.  So.. install, reboot, shutdown.

NOTE 2: The server is using self-signed certificates for SSL encryption.  This means an exception will have to be made in Firefox to get to the site.

After all of this fun, I finally enabled the paravirtualization option and powered back on.  Much to my dismay the kernel was checking every SCSI ID on the device to see if it could find anything.  10-15 seconds per ID and 15 usable IDs on a wide SCSI chain.

At this time.. I just powered off and turned off the option.  I will build a new VM to try out the setting and migrate it over as the ‘prod’ box if I am happy with the performance.

I am definitely not happy about the resource usage of the web interface either..  formery console access used zero resources on my server.. now the web interface is using 1% CPU and 3% MEM.  While this isn’t much, I wasn’t giving up anything previously.  This is a serious step backwards..

, , ,

I was perusing the interweb a few days ago and I stumbled across an interesting statement. (I don’t have the link anymore.). The gist was, you could bridge VMWare Guest NIC to a host adapter that has no IP address. The security implications are what caught my attention. So I started digging a little further and I found it was true and then I managed to work a little bit of magic to make it happen!

Here is the scenario..

ServerLAN is an Ubuntu Server host running VMWare Server. 2 physical NICs bound to 2 bridged networks. NIC1 is attached to the private LAN, NIC 2 is attached to the DMZ. These networks are isolated by a firewall.

ServerDMZ is an Ubuntu Server guest Virtual Machine. 1 Virtual NIC

The idea is to isolate ServerDMZ from the private network and ServerLAN from the DMZ.

I had all of this working with a public IP on the ServerDMZ virtual NIC, DMZ private IP on NIC 2, and the LAN Private IP on NIC1. The problem with this setup is, my host was accessible from the DMZ. With proper blocking.. namely drop all traffic to and from that interface, it wasn’t much of a concern. But the IP was still there. So I did a little Ubunutu /etc/network/interfaces magic.
mapping eth0 eth1
script /etc/network/get-mac-address.sh
map 01:23:45:67:89:01 NIC1
map AB:CD:EF:GH:IJ:KL NIC2
iface lo inet loopback
iface NIC1 inet static
address 192.168.1.2
broadcast 192.168.1.255
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
metric 100
iface NIC2 inet manual
up ifconfig $IFACE up
down ifconfig $IFACE down

To break this down..
mapping eth0 eth1
script /etc/network/get-mac-address.sh
map 01:23:45:67:89:01 NIC1
map AB:CD:EF:GH:IJ:KL NIC2

This section is protection verses kernel updates causing my NICs from being brought up in a different order. The script get-mac-address.sh basically greps the interface for the MAC and then assigns the label NIC1 or NIC2 depending on the MAC returned.
iface lo inet loopback
This brings up the loopback interface.
iface NIC1 inet static
address 192.168.1.2
broadcast 192.168.1.255
netmask 255.255.255.0
network 192.168.1.0
gateway 192.168.1.1
metric 100

This brings up my private network NIC. Does all of the necessary mappings.

Side Note:If you have two NICs with gateways listed, you can supply the metric line to give one a priority. If they are the same, your system will be unable to decide which route to take and take none.
iface NIC2 inet manual
up ifconfig $IFACE up
down ifconfig $IFACE down

This final section is how you bring up the interface with out an IP address. It also allows you to set permiscious mode, etc.

Instructions for the interfaces file can be found file:///usr/share/doc/ifupdown as well as the get-mac-address.sh script from the examples sub-folder.

, , , ,

Something new.. Mounting a filesystem over SSH.  Kind of like NFS but simpler.

http://ubuntu.wordpress.com/2005/10/28/how-to-mount-a-remote-ssh-filesystem-using-sshfs/

, , ,

I will get it out here now.. I am a big fan of Ubuntu.  In my opinion.. (It is never humble).. Ubuntu is the best Linux distro for the masses.  I have tried several and I keep coming back.  It’s logo says it all.. “Linux for humans”

,