Ubuntu Guides

From JonWiki

jontse.com > HOWTOs > Ubuntu Guides
Jump to: navigation, search

I've compiled some notes about Gutsy here, primarily for my own use. Feel free to use them if they help you.

Contents

VMWare and USB

I had some trouble getting USB devices to enumerate in Windows under VMWare Server. I found two fixes, and applied them both. It appears the former is more effective, but I didn't really make a fuss since it just works now.

Actual Fix

Problem solved on the VMWare Forums: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=3862823

Relevant Snip Below:

To work around this issue, mount USBFS to /proc/bus/usb.

To do this while the host  is running, execute the following command as root:

mount -t usbfs none /proc/bus/usb

 
You need to power cycle the virtual machines after the mount command to have access to available USB devices.

To configure the host to mount USBFS automatically on bootup, add the  following line in the /etc/fstab file:

usbfs  /proc/bus/usb  usbfs  auto  0  0

 
If this line is already present in /etc/fstab, it likely has the noauto option set in the options column (4th column). Change this to auto.

Some of the Linux distributions that are known not to mount USBFS by default include:

    *
      Ubuntu Linux 6.06
    *
      SUSE Linux 10.1
    *
      SUSE Enterprise Linux Server 10
    *
      Mandriva Linux 2006
    *
      SLES9 SP3 64 bit

Note: This issue affects these operating systems only when they are used as a host for VMware virtual machines.  These operating systems, when used as guests, do not exhibit this problem.

Potential Fix

Found this handy guide to fixing USB with WinXP in Gusty under VMWare: http://www.digitalearth.com.au/2006/07/27/vmware-on-ubuntu/

Unfortunately, it didn't fix the sync issues with my HTC TyTN II, but this might come in handy someday.

Relevant Snip Below:

"To get the Palm sync working I added the following line to the VMX file, after the ethernet settings and before the shared folder settings."

# Edit to allow Palm to sync
usb.generic.skipSetConfig = "TRUE"

Compiz

Compiz Settings Manager

You'll want to grab some packages to make compiz setup and config easy. It should add an applet here:

System->Preferences->Advanced Desktop Effects Settings

The applet will allow you to turn on the rotating cube, etc etc.

You can also configure whether or not compiz works or not using this:

System->Preferences->Appearance->Visual Effects (Tab)

sudo apt-get install compizconfig-settings-manager

Compiz Fixes on Gutsy

In order to get compiz working on my D600, I used this guide: http://ubuntuforums.org/showthread.php?p=3696969

I also had to edit /usr/bin/compiz as described here: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/124519/comments/18

Edit below:

compiz wouldn't start untill /usr/bin/compiz modified and lines starting from 228 in function check_texture_size() are commented out.

 #if [ $VRES -gt $TEXTURE_LIMIT ] || [ $HRES -gt $TEXTURE_LIMIT ]; then
 # verbose "Failed.\n"
 # return 1;
 #fi
 #verbose "Passed.\n"

Also, to fix MATLAB's weird compiz rendering problem, I added this line to my bashrc from here: http://www.rdegraaf.nl/index.asp?sND_ID=291639

# matlab fix when running compiz
export AWT_TOOLKIT=MToolkit

Here's the xorg.conf:

# /etc/X11/xorg.conf (xorg X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the xorg.conf(5) manual page.
# (Type "man xorg.conf" at the shell prompt.)
#
# This file is automatically updated on xserver-xorg package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xorg
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following command:
#   sudo dpkg-reconfigure -phigh xserver-xorg

Section "Files"
	FontPath	"/usr/share/fonts/X11/misc"
	FontPath	"/usr/share/fonts/X11/cyrillic"
	FontPath	"/usr/share/fonts/X11/100dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/75dpi/:unscaled"
	FontPath	"/usr/share/fonts/X11/Type1"
	FontPath	"/usr/share/fonts/X11/100dpi"
	FontPath	"/usr/share/fonts/X11/75dpi"
	# path to defoma fonts
	FontPath	"/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
EndSection

Section "Module"
	Load	"i2c"
	Load	"bitmap"
	Load	"ddc"
	Load	"dri"
	Load	"extmod"
	Load	"freetype"
	Load	"glx"
	Load	"int10"
	Load	"vbe"
EndSection

Section "InputDevice"
	Identifier	"Generic Keyboard"
	Driver		"kbd"
	Option		"CoreKeyboard"
	Option		"XkbRules"	"xorg"
	Option		"XkbModel"	"pc105"
	Option		"XkbLayout"	"us"
EndSection

Section "InputDevice"
	Identifier	"Configured Mouse"
	Driver		"mouse"
	Option		"CorePointer"
	Option		"Device"		"/dev/input/mice"
	Option		"Protocol"		"ImPS/2"
	Option		"ZAxisMapping"		"4 5"
	Option		"Emulate3Buttons"	"true"
EndSection

Section "InputDevice"
	Identifier	"Synaptics Touchpad"
	Driver		"synaptics"
	Option		"SendCoreEvents"	"true"
	Option		"Device"		"/dev/psaux"
	Option		"Protocol"		"event"
	Option          "SHMConfig"             "on"
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"stylus"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"stylus"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"eraser"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"eraser"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "InputDevice"
	Driver		"wacom"
	Identifier	"cursor"
	Option		"Device"	"/dev/input/wacom"
	Option		"Type"		"cursor"
	Option		"ForceDevice"	"ISDV4"		# Tablet PC ONLY
EndSection

Section "Device"
	Identifier	"ATI Technologies Inc Radeon R250 [Mobility FireGL 9000]"
	Driver		"ati"
	BusID		"PCI:1:0:0"
EndSection

Section "Monitor"
	Identifier	"Generic Monitor"
	Option		"DPMS"
EndSection

Section "Screen"
	Identifier	"Default Screen"
	Device		"ATI Technologies Inc Radeon R250 [Mobility FireGL 9000]"
	Monitor		"Generic Monitor"
	DefaultDepth	16
	SubSection "Display"
		Depth		1
		Modes		"1400x1050"
	EndSubSection
	SubSection "Display"
		Depth		4
		Modes		"1400x1050"
	EndSubSection
	SubSection "Display"
		Depth		8
		Modes		"1400x1050"
	EndSubSection
	SubSection "Display"
		Depth		15
		Modes		"1400x1050"
	EndSubSection
	SubSection "Display"
		Depth		16
		Modes		"1400x1050"
	EndSubSection
	SubSection "Display"
		Depth		24
		Modes		"1400x1050"
	EndSubSection
EndSection

Section "ServerLayout"
	Identifier	"Default Layout"
	Screen		"Default Screen"
	InputDevice	"Generic Keyboard"
	InputDevice	"Configured Mouse"
	InputDevice     "stylus"	"SendCoreEvents"
	InputDevice     "cursor"	"SendCoreEvents"
	InputDevice     "eraser"	"SendCoreEvents"
	InputDevice	"Synaptics Touchpad"
EndSection

Section "DRI"
	Mode	0666
EndSection

Ubuntu as a server

Most people would want to use the Ubuntu server distribution, but I wanted a no-fuss no-muss box running X and Gnome, so I chose to use the desktop config.

dnsmasq

I'm using dnsmasq as my DHCP/DNS server on Ubuntu, and I ran into some problems. I have multiple domains, and I use the following subdomains to organize my servers:

  • location1.mydomain.tld (First server's physical location)
  • location2.mydomain.tld (Second server's physical location)
  • mydomain.tld (Main domain as served from a hosting provider)

Now, the problem is that behind the firewall of location1, dnsmasq thinks that because it's assigned to resolve *.location1.mydomain.tld with the line "local=/location1/mydomain.tld/" that it's also supposed to resolve records for location2.

This caused me a great deal of grief, so I added this line:

server=/location2.mydomain.tld/208.67.222.222

That line forces dnsmasq to use OpenDNS to resolve the external IP, which is what I want. Unfortunately, mydomain.tld still is resolved behind the firewall, which means I can't get to it. However, I don't use the domain for much, so I've decided that it isn't that big of a deal.

I could put in an address for the domain, using

address=/www.mydomain.tld/xxx.xxx.xxx.xxx

but I'm not sure if the server's IP is dynamic or not.

Some notes

  • When running ddclient for DynDns, set the "use" flag to "web" instead of "if." Otherwise, you'll get your local IP. Very sad.
  • There's some minimal you need to do with apache for ssl, but that's well documented on the Ubuntu websites and such.