Logitech Marble Mouse

I wanted to use the scroll buttons on my Logitech Marble Mouse. After a bit of poking, I got it to work as I wished. Here’s my xorg.conf file:

# /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 /etc/X11/xorg.conf manual page.
# (Type "man /etc/X11/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  "unix/:7101"
  FontPath  "/usr/share/fonts/truetype"
  FontPath  "/usr/share/fonts/X11/misc"
  FontPath  "/usr/X11R6/lib/X11/fonts/misc"
  FontPath  "/usr/share/fonts/X11/cyrillic"
  FontPath  "/usr/X11R6/lib/X11/fonts/cyrillic"
  FontPath  "/usr/share/fonts/X11/100dpi/:unscaled"
  FontPath  "/usr/X11R6/lib/X11/fonts/100dpi/:unscaled"
  FontPath  "/usr/share/fonts/X11/75dpi/:unscaled"
  FontPath  "/usr/X11R6/lib/X11/fonts/75dpi/:unscaled"
  FontPath  "/usr/share/fonts/X11/Type1"
  FontPath  "/usr/X11R6/lib/X11/fonts/Type1"
  FontPath  "/usr/share/fonts/X11/100dpi"
  FontPath  "/usr/X11R6/lib/X11/fonts/100dpi"
  FontPath  "/usr/share/fonts/X11/75dpi"
  FontPath  "/usr/X11R6/lib/X11/fonts/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"  "pc104"
  Option    "XkbLayout" "us"
EndSection

Section "InputDevice"
  Identifier  "Configured Mouse"
  Driver    "mouse"
  Option    "CorePointer"
  Option    "Device"    "/dev/input/mice"
  Option    "Protocol"    "Auto"
  Option    "Buttons" "4"
  Option    "EmulateWheel" "true"
  Option    "EmulateWheelButton" "8"  #Option   "Emulate3Buttons" "true"
EndSection

Section "Device"
  Identifier  "nVidia Corporation C51 [GeForce 6150 LE]"
  Driver "nvidia"
  #Driver   "nv"
  BusID   "PCI:0:5:0"
  Option "SWcursor"
EndSection

Section "Monitor"
  Identifier  "Generic Monitor"
  Option    "DPMS"
  HorizSync 28-84
  VertRefresh 43-60
EndSection

Section "Screen"
  Identifier  "Default Screen"
  Device    "nVidia Corporation C51 [GeForce 6150 LE]"
  Monitor   "Generic Monitor"
  DefaultDepth  24
  SubSection "Display"
    Depth   1
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   4
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   8
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   15
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   16
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
  SubSection "Display"
    Depth   24
    Modes   "1680x1050" "1024x768" "800x600" "640x480"
  EndSubSection
EndSection

Section "ServerLayout"
  Identifier  "Default Layout"
  Screen    "Default Screen"
  InputDevice "Generic Keyboard"
  InputDevice "Configured Mouse"
EndSection

Section "DRI"
  Mode  0666
EndSection

New TrueType fonts in Debian

I had a font I needed to install to make some graphics for a web project. It was easy enough to buy the font – I just chose the option for the TrueType file (TTF) and I knew I’d be fine. I had a little trouble getting the font to show up though, so I record my efforts here.

  1. Put the TTF files (there’s usually three) in their own subdirectory of /usr/share/fonts/truetype.
  2. As root, run these two commands in the new subdirectory: mkfontscale and mkfontdir
  3. Check to see if the font is installed: run xlsfonts and see if your font is there
  4. If you don’t see your font, start Googling, but perhaps start here.

Cloning your Debian Install

Sometimes you need to reinstall a Debian system. Maybe your hard drive is going pear-shaped, maybe you got a new computer, maybe you are replicating a system, maybe you are building a lab. In any case, if you want all the packages that are installed on system 1 on your new/other system 2, here’s an easy way:

  1. On system 1, make a file with your installed/removed packages: dpkg --get-selections > packages.txt
  2. Get a base install done on system 2, and set /etc/apt/sources.list to be the same as on system 1
  3. Get packages.txt onto system 2
  4. Run dpkg --set-selections < packages.txt on system 2
  5. Run dselect install on system 2
  6. Optional: Dance