Ubuntu

From Organic Design wiki
Revision as of 17:01, 12 June 2013 by Nad (talk | contribs) (Software center)

Ubuntu was an excellent user-friendly operating system based on Debian GNU/Linux, but has recently started become very corporate and playing some dirty corporate tricks like installing spyware and preventing users from having control over what's installed and what's not. We've been using Debian on our servers, but Ubuntu on our desktops for the last five years or so, but we'll now begin migrating over to pure Debian for our desktops as well.

NZ sources

The Brazilian sources are often broken or unresponsive, so I like to stick to my old NZ sources. Here's my current list generated from the handy SimplyLinux.ch tool.

###### Ubuntu Main Repos
deb http://nz.archive.ubuntu.com/ubuntu/ precise main restricted
deb-src http://nz.archive.ubuntu.com/ubuntu/ precise main restricted

###### Ubuntu Update Repos
deb http://nz.archive.ubuntu.com/ubuntu/ precise-security main restricted
deb http://nz.archive.ubuntu.com/ubuntu/ precise-updates main restricted
deb-src http://nz.archive.ubuntu.com/ubuntu/ precise-security main restricted
deb-src http://nz.archive.ubuntu.com/ubuntu/ precise-updates main restricted

###### Ubuntu Main Repos
deb http://nz.archive.ubuntu.com/ubuntu/ precise universe 
deb-src http://nz.archive.ubuntu.com/ubuntu/ precise universe 

Post install checklist

APT

  • subversion
  • git
  • p7zip-full

Software center

  • Advanced settings (then add all buttons to windows from shell menu)
  • Geany
  • VLC
  • Pidgin (with OTR and plugin pack and copy backed up .purple after install)
  • Thunderbird (install enigmail and import keys or close, copy and chown backed up .gnupg dir and reboot - and don't forget to set this)
  • Skype

GNOME 3

The first thing I do after a basic update and upgrade is not install GNOME 3 as I can't stand the Unity desktop.

<bash>

sudo add-apt-repository ppa:gnome3-team/gnome3 sudo apt-get update sudo apt-get install gnome-shell </bash>

eBooks

Often eBooks are only in formats readable by Amazon Kindles, Androids or other specific devices. The free Calibre e-book management system is an awesome application for converting eBooks between any of around twenty popular formats.

Flash

There can be a number of different problems with flash installation and operation in Firefox under Ubuntu, but most issues can be dealt with by installing the FLASH-AID plugin which checks for the correct versions of flash components for your architecture and browser version. If version problems are found, FLASH-AID will build and run a script to uninstall incorrect components and install the correct ones.

DVD Ripping

We use dvd::rip, install it from the add/remove menu, then see Rip a DVD for usage details. I think some of the things installed for DVD reading above are required for the ripping to work properly. Note that currently our procedure only allows the xvid4 codec for the encoded result, divx is not working for us yet.

Adobe Acrobat Reader

The default evince document viewer that comes with Ubuntu is very good, but it doesn't handle some of the more sophisticated aspects of PDF document handling such as editable forms. To do these things currently still requires the Adobe package which can be installed from the Medibuntu repository.

echo deb http://packages.medibuntu.org/ jaunty free non-free >> /etc/apt/sources.list
apt-get update
apt-get install acroread

Windows Emulator (Wine)

The windows emulator allows practically seamless integration of native windows applications into the Linux desktop environment. Internet Explorer is more difficult to set up in it than other applications due to its tight integration with the windows internal components, but a package is available allowing easy installation of multiple simultaneous Internet Explorer versions (see Installation on Ubuntu).

Below is a screenshot of my local laptop running Ubuntu. As you can see all the open windows are integrated naturally into the normal desktop environment but some of them are windows applications and some native Linux ones. The top browser window is Internet Explorer 6 running in windows emulation, but the bottom one is Ubuntu's Firefox. Music is playing from the Windows emulated Winamp in the top right, and the middle application is a Windows-only family tree program. I was able to drop a folder of music directly into the Winamp window to play it, and all file paths and open/save dialogue boxes can navigate the entire Linux directory tree just like a native application behaves.

Dual Monitor issues

One problem that often comes up with dual monitor setup in Ubuntu (persisting as of 11.04) is that there's nothing in the interface allowing the user to define which is the primary monitor having the panels with the launcher and notification icons etc.

But the monitors applet is actually just a graphical interface over the powerful xrandr utility. This tool can also be used to set the resolution - even custom resolutions, as for example shown in HDMI to DVI problem. The changes made with xrandr occur in real-time without any need to log out or restart anything to see the effects.

As an example, when I plugged a second monitor into my laptops HDMI port it automatically changed to an extended desktop setup, but the panels were all on the laptop screen. To move them across to the external monitor involves first querying xrandr to see what the current monitor names are:

Screen 0: minimum 320 x 200, current 3286 x 1080, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 293mm x 165mm
   1366x768       60.0*+
   1360x768       59.8     60.0  
   1024x768       60.0  
   800x600        60.3     56.2  
   640x480        59.9  
VGA1 disconnected (normal left inverted right x axis y axis)
HDMI1 connected 1920x1080+1366+0 (normal left inverted right x axis y axis) 531mm x 299mm
   1920x1080      60.0*+
   1280x1024      75.0     60.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1  
DP1 disconnected (normal left inverted right x axis y axis)


From this we see that the external monitor is named HDMI1, so we can now make it primary as follows:

xrandr --output HDMI1 --primary


And voila, straight away, the panels shift across to the other screen :-)

Dell specific

Most of our laptops are Dell's because they're a very Linux friendly manufacturer. Dell maintain their own repository of kernel modules (such as those needed for modems to work etc) and other specific configuration. So add it to your sources.list by appending the following (change hardy to what ever you're distro of Ubuntu is such as gutsy, intrepid or jaunty).

deb http://ppa.launchpad.net/dell-team/ubuntu jaunty main
deb-src http://ppa.launchpad.net/dell-team/ubuntu jaunty main


Then update and upgrade as usual,

apt-get update
apt-get upgrade

Dell modems

I found Dell dgc modems to install easily with the driver from Dell, eg dgcmodem_1.04_i386.deb. But the other popular Conexant modem they use is hsf and I found that wouldn't compile on many Dell laptop models.

I was able to get an hsf modem to work at 14.4Kbps using the free driver from Linuxant. I had downloaded the deb version of the generic packages with source, for example hsfmodem_7.80.02.01full_i386.deb. After I installed it with dpkg -i it gave no errors, but still it would fail to detect a modem from the gnome ppp, but I then ran hsfconfig which compiled successfully and then asked questions about area code etc which it had not been able to do before. After this process, the auto-detection of the modem succeeded from gnome ppp.

Note: It's best to run through pppconfig from root and fill in the ISP details so that all the files are already set up before trying to connect from gnome ppp because it doesn't have permission to write to the ppp configuration files itself.

Note II: You can fix this permissions issue by setting permissions manually as follows:

chmod 777 /etc/ppp/chap-secrets
chmod 777 /etc/ppp/pap-secrets
chmod 777 /etc/ppp/peers
chmod 777 /etc/ppp/peers/*

World Clock

Since the clock in GNOME3 sucks we have to now install the stand-alone World Clock app. I like to use the following custom date format:

%H:%M (%A)

Working with small screens

Something that used to worm on prior versions of Ubuntu and seems to have stopped working in version 12 is the desktop panning feature. This allows your desktop to be bigger than you physical screen size and to scroll when you move the mouse to the edges. You used to be able to do this by typing a simple xrandr command such as the following:

<bash>xrandr --output LVDS1 --panning 1920x1080</bash>


But this no longer works, which is a real pain if you have a tiny screen because you often have dialog boxes with the buttons off the bottom where they can't be seen! However it turns out there's a simple solution to this - you can hold down the ALT key and drag the window around to reveal the hidden parts!

Adding your own apps to the search

You'll need to create a .desktop file for your application in the ~/.local/share/applications directory with the name of your application as its filename. The content of the file is of the following format:

[Desktop Entry]
Name=My applications name
Comment=My cool application
Exec=/full/path/to/my/app
Icon=/full/path/to/my/app/icon
Terminal=false
Type=Application
StartupNotify=true

Mobile broadband connection suddenly requires password

One day when I tried to connect to the net using 3G on my USB stick it wouldn't connect and after removing and reinserting the SIM in the device I was asked for a password when trying to connect. I tried my chip's PIN and PUK codes, "1234", "12345" and "vivo" as well but all failed. But when I tried the chip in my phone and in Beth's laptop it connected without issue.

I compared the /etc/NetworkManager/NetworkManager.conf configuration in Beth's computer to mine and found that mine had somehow gained en extra line:

no-auto-default=18:03:91:8E:90:BC,

The digits correspond to my eth0 MAC address, and the trailing comma seems a little odd. I removed this line and found that after a full reboot everything worked again (I first tried just restarting the Network Manager but that didn't fix it). I'm not sure how this line got added, but it could have happened during a lot of plugging and unplugging of different routers and things when we had some connection problems earlier in the week.

See also