Ubuntu

Quick Links

my DNS servers Free DNS @ afraid.org OzHosting
useful links WhoIs database Rebuilding Ubuntu (15.10) from scratch Ubuntu Samba Server configuration
programming ArgParse

Useful Tips

These are tips I have gleaned that describe useful (?) customizations in Ubuntu (13.10 - now 14.04). To find out what version of Ubuntu is running, type lsb_release -a into a terminal window at a shell prompt.

Rotate Console

When using a portrait monitor, or a monitor with rotating screen, you can rotate the display to suit according to the following parameter values:

For transient rotations, use

echo 1 | sudo tee /sys/class/graphics/fbcon/rotate

and for permanent rotation, (sudo) edit /etc/default/grub to ensure that it contains a line:

GRUB_CMDLINE_LINUX="fbcon=rotate:1"

In both cases, substitute the 1 with the required rotation parameter.

Make Print Directory

I got a bit fed up with make printing directory entry and exit messages when recursively making, so I added this to my master make directory:

          ifndef MAKEFLAGS
            MAKEFLAGS += --no-print-directory
          endif
        
The general advice is that if you want to debug makes that do use recursive makes, then you should turn this off (and resume printing the entry and exit messages).

Workspace Configuration and Shortcuts

To enable multiple workspaces:

  1. Open System Settings -> Appearance -> Behaviour
  2. Click on the Enable workspace checkbox

To change the nuumber of workspaces:

  1. Type gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ hsize 3 to change the number of columns to 3
  2. Type gsettings set org.compiz.core:/org/compiz/profiles/unity/plugins/core/ vsize 3 to change the number of rows to 3

To change the keyboard shortcuts for navigating between workspaces:

  1. Open System Settings -> Keyboard -> Shortcuts
  2. Click on Navigation in the left side bar
  3. Edit the shortcuts acording to the instructions.

Adding user name to title bar

gsettings set com.canonical.indicator.session show-real-name-on-panel true/false

The last word (true/false) turns on the display of the user name in the root window title bar (if true), and false turns it off.

Creating multiple machine pulldowns for remote terminals

These are my settings for the gnome-terminal configuration file /usr/share/applications/gnome-terminal.desktop. Actually, the proper place for this file is /home/ajh/.local/share/applications/gnome-terminal.desktop, which is now where it is placed. The /usr location is for system-wide defaults.

Exec=gnome-terminal
Icon=utilities-terminal
Type=Application
X-GNOME-DocPath=gnome-terminal/index.html
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-terminal
X-GNOME-Bugzilla-Component=BugBuddyBugs
X-GNOME-Bugzilla-Version=3.6.1
Categories=GNOME;GTK;Utility;
StartupNotify=true
OnlyShowIn=GNOME;Unity;
Keywords=Run;
Actions=wolseley;dimboola;lilydale;ringwood;bastille;
X-Ubuntu-Gettext-Domain=gnome-terminal

[Desktop Action wolseley]
Name=Wolseley
Exec=gnome-terminal --window-with-profile=Wolseley

[Desktop Action dimboola]
Name=Dimboola
Exec=/usr/bin/gnome-terminal --window-with-profile=Dimboola -x ssh dimboola.local

[Desktop Action lilydale]
Name=Lilydale
Exec=/usr/bin/gnome-terminal --window-with-profile=Lilydale -x ssh lilydale

[Desktop Action ringwood]
Name=Ringwood
Exec=/usr/bin/gnome-terminal --window-with-profile=Ringwood -x ssh ringwood

[Desktop Action bastille]
Name=Bastille
Exec=/usr/bin/gnome-terminal --window-with-profile=Bastille -x ssh bastille

Make sure when editing the Desktop Actions that you add the "Name" field to the list of "Actions" in the top entry.

The other thing to note is that when you first create this file, you need to drag it from the Files display to the Launcher bar. If the file is not visible in Files, click View->Show Hidden Files to make it visible.

The desktop file syntax is described in the Desktop File Specs page.

Samba

I am running a samba server on my disk farm server. Here's a useful page on how to configure a Ubuntu Samba Server.

Unix Stuff

To set the system timezone to Melbourne

      $ sudo bash
      $ cd /etc
      $ ln -sf /usr/share/zoneinfo/Australia/Melbourne localtime
    

Moving to Ubuntu

I got the irrits with Apple and have sworn not to buy a new system or upgrade the systems I have, preferring instead to move (back) to Linux as necessity demands. But Ubuntu has its own irrits, too! This is a log of things that I have fixed.

Virtual desktops

Mac OSX calls them "Spaces", Ubuntu calls them "Workspaces". I prefer "Virtual Desktops". Oh well. You can't please everyone.

The hassle is that there is no clear way of driving the number of them, and how to switch between them.

Setting Up
Go into the System Settings > Appearance > Behaviour, and check the box "Enable workspaces". This sets up the default 2x2 workspaces.
Changing the Number of Workspaces
Make sure that "CompizConfig Settings Manager" is installed (use the "Ubuntu Software Centre" to search for and install this). Then follow General Options > Desktop Size, and set the Horizontal Virtual Size and Vertical Virtual Size to your preferences. Close the CCSM.
Showing the Virtual Desktops
You show see an icon in the launcher that looks like this one (it may have a background colour to match the launcher). If you click this icon, a representation of the workspaces available will be shown. Click it again to dismiss, or click inside any of the workspaces to switch to that workspace.
Keyboard Shortcut to Switch Workspace
CTRL-ALT-arrow will change to the next workspace in the direction of arrow.

Emacs and PSGML

One of the hassles of upgrading a system (and moving from Apple to Linux counts as an upgrade) is that new versions of just about everything surface, just when you are not in the mood for dealing with them. I suppose the Nathans of the world would argue that this is why one should upgrade continuously, so that the Principle of Least Surprise is observed. Whatever. Moving to Ubuntu forced my Emacs from version 23 to version 24, and my PSGML scripts all stopped working.

Fortunately, PSGML has also been upgraded to now run with version 24. See the page by the author, Florian v. Savigny, or download the code directly

This page is copyright, and maintained by John Hurst. 441 accesses since
21 Feb 2016
My PhotoMy PhotoTrain Photo

Local servers: Localhost Spencer Echuca Dimboola Lilydale Bittern (Note that these are only accessible on my local network.)
Alternative Web Servers: Hurst Server 5 Fran Server 7 Fran Server CSSE Server Internode Server
Dynamically generated at 20170323:1457 from an XML file modified on 20170120:1715.

453 accesses since 21 Feb 2016, HTML cache rendered at 20170329:0533