Monthly Archives: November 2011

Removing advertising from Ubuntu Server motd

Ubuntu is a good product, mainly because it’s free.  They recently started some service called Landscape that lets you graph your server activity or something – I don’t really care as I don’t have hundreds of machines running Ubuntu Server (nor do about 99% of their users).  I got tired of seeing this when logging in over ssh:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

Welcome to Ubuntu!
 * Documentation:  https://help.ubuntu.com/

  System information as of Fri Nov 25 06:08:51 UTC 2011

  System load:  0.0                Processes:           79
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 11%                IP address for eth0: 10.0.0.1
  Swap usage:   0%

  Graph this data and manage this system at https://landscape.canonical.com/
---------------------------------------------------------------------
At the moment, only the core of the system is installed. To tune the
system to your needs, you can choose to install one or more
predefined collections of software by running the following
command:                                                             

   sudo tasksel --section server
---------------------------------------------------------------------

No mail.

I mean, jeez, that’s some text to print on login!  I found out it’s all controlled with this script and directory in /etc/update-motd.d.  There’s a bunch of scripts in there that run in order using normal SYSV startup script logic.  If you do the following, it produces a much nicer message:

sudo rm 51_update-motd 
sudo vi 50-landscape-sysinfoz
  # Change this line:
      /usr/bin/landscape-sysinfo 
  # to this line
      /usr/bin/landscape-sysinfo | head -n -2
sudo rm 10-help-text

Now, it should look more like this when you log in:

Linux joint 2.6.32-309-ec2 #18-Ubuntu SMP Mon Oct 18 21:00:50 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04.3 LTS

  System information as of Fri Nov 25 06:26:45 UTC 2011

  System load:  0.01               Processes:           85
  Usage of /:   16.1% of 14.76GB   Users logged in:     0
  Memory usage: 15%                IP address for eth0: 10.0.0.1
  Swap usage:   0%

No mail.

Much more manageable!


An adventure with Debian Wheezy

I installed the new Debian testing release on my NAS, and was so impressed with it I decided to convert my main desktop from Ubuntu 11.10.  I was really unhappy with the new Ubuntu – it kept kicking me into Unity instead of GNOME, sound wouldn’t work, it felt really sluggish, it was packed with stuff I’d never use, etc.  Debian is clean, runs faster, and boots faster (possibly thanks to Linux kernel 3.0).  It automatically recognized and assembled my software RAID, so all I had to do was make a mountpoint and an entry in fstab and exports, run mount -a, then do a quick exportfs -a and everything was mounted and exported.  Brilliant!  To get samba working, all I had to do was add this to /etc/samba/smb.conf:

[vector]
   comment = Vector
   browseable = yes
   path = /vector/vector
   guest ok = yes
   read only = yes

And do a quick /etc/init.d/samba restart.  Shared!

Sound wouldn’t work at first (a common problem with Linux and the Nvidia GT210/220 HDMI audio), but after I built and installed the latest Nvidia driver, everything kinda started working like magic (I also had to unmute all the S/PDIF channels in alsamixer).  Now I only have a few problems.  The first is default window dimensions.  Here’s what it looks like when I open gnome-terminal:

Yeah, a little bit too narrow, right?  So, every single time I open one, I have to drag it out to be a usable size.  I have 80×24 set in the settings, but those are apparently being overridden by something else in GNOME 3.  Any help on this would be much appreciated.  It happens with other apps to, like KeepassX, so it seems to be something at the GNOME 3 level and not within the terminal app.

Another thing that was annoying at first was the inclusion of Music, Documents, Downloads, etc. in my nautilus favorites area (even though I never use these folders in my home directory).  The solution was simple and can be done with vim, so I was sold.  Just look in ~/.config/user-dirs.dirs and edit/delete whatever you want.  I ended up linking the folders I actually use to where they should be (on my NFS mounted RAID) and deleting things like Documents (those belong on Google Docs, obviously).

Installing wine is a bit weird.  To do it easily, go here, then download all the packages for your architecture one-by-one into /tmp, then do this:

  sudo apt-get install lib32nss-mdns
  sudo dpkg -i *wine*
  sudo apt-get install -f
  sudo dpkg -i *wine*
  sudo apt-get install -f
  winecfg

Yes, I know it’s all there twice, but that’s what I had to do.  Dependencies are weird.  Winecfg will prompt you to install some stuff.  Do it.

Update 2011-11-13

I figured out the problem with the window sizes.  If you set up TwinView with Nvidia driver version 285.05.09 x86_64 in the following way:

  • 1920×1080 monitor at absolute position 0,0
  • 1680×1050 primary monitor at absolute position 1080,0

You can’t move windows on most of the TV screen – it only lets you use about 1/4 of it.  Also, the alt-tab menu stretches out the previews horribly vertically so you can’t actually preview them.  Also, the default window size is stretched as shown above.  I have no idea why all this geometry is dependent on overall desktop size, but it should really be fixed.  After changing it so the 1920×1080 monitor is logically Right of the 1680 monitor in nvidia-settings (which is annoying since it’s hanging on the wall above the other monitor in real life), all the problems I mentioned go away.   It seems like this is a problem with GNOME3, but it could be nvidia’s problem too.  It’s hard to know which bug tracker to report it to, but this setup worked with LXDE and old GNOME, so maybe I’ll try the GNOME people first.

Another thing I did today was adjust my MTU to 9000 on both network cards.  You need a switch that supports jumbo frames for this, and I happen to have one.  If you don’t know if yours does, it probably doesn’t.  Also, I changed my fstab line for mounting the NFS share and the exports line on the NAS to the following, respectively:

/vector/vector 192.168.0.0/16(rw,async,no_subtree_check)
192.168.1.5:/vector/vector	/vector	nfs	async,noatime,rsize=32768,wsize=32768	0	1

This should improve performance.

Save As… a dying breed

OK – I’ve been thinking about this for a while, and something in Google+ prompted me to make this post.  It goes like this:

Please don’t change the following:

See that?  See how there’s things like Save As… (I’m looking at you, OSX).  See how there’s actually a menu with entries in it that drops down and allows you to quickly scan text rather than randomly shoot your eyes around a “ribbon” (I’m looking at you, Microsoft Office 2007).  Stop changing this.  We’ve had this design for more than 20 years, so it’s likely quite a few of us are more than a little used to it now.  Also, make all the keyboard shortcuts work right.  For instance, Ctrl-Shift-s should always be Save As… and Ctrl-s should always be Save.  This applies to any and all applications that have some sort of document editing capability.

There.  Just had to get that off my chest.  I couldn’t find Bullets and Numbering in the stupid MS Office 2007 ribbon at work, since they got rid of the entire Format menu and replaced it with the impossible-to-navigate ribbon.  And today I heard there’s no Save As… in OSX Lion – I feel for you, dudes and dudettes.