Ubuntu Cheat Sheet from FOSS for Hardy Heron

There is a neat cheat sheet out in PDF format from FOSS covering, among many others, the new Ubuntu Uncomplicated Firewall ufw, special packages, of course apt-family package management, services a.k.a init scripts and daemons, …

It’s released under CC-BY-SA 3.0. By the way, did you know

Type the phrase โ€œREISUBโ€ while
holding down Alt and SysRq (PrintScrn) with
about 1 second between each letter. Your system
will reboot.

Ubuntu Hardy Heron Dist-Upgrade via Command Line

You can do Dist-Upgrades not only with the GUI update-manager but also via do-release-update. The tool tells me what awaits me (I have 6000 kB/s):

66 packages are going to be removed. 193 new packages are going to be
installed. 1269 packages are going to be upgraded.

You have to download a total of 1005M. This download will take about
23 minutes with your connection.

Fetching and installing the upgrade can take several hours. Once the
download has finished, the process cannot be cancelled.

So, let’s see.

Btw do-release-update by itself notices if you are connected via ssh and asks if you want to proceed. If you do you’ll get a second sshd on Port 9904. Using screen it shouldn’t be a problem for me but very nice of the tool to ask ๐Ÿ™‚

Traffic Shaping Linux (restrict Bandwidth)

Allthough I haven’t found some shiny GUI somewhat like Netlimiter there is Wonder shaper (and shaper and trickle and squid for http and …) where a single command line sets your over-all bandwidth for network interface X. And, isn’t that all you really need?:

sudo wondershaper ethX downlink(kbit/s) uplink(kbit/s)

This is, from the perspective of the host doing the shaping. For example to set download to 10000kb (750*8 = 6000 DSL but don’t limit intranet connections on 1Mb Ethernet) but limit upload to, say, 35kB (~280kb) — e.g. if you have a server running on the same connection you do your daily internetting, you do:

sudo wondershaper eth0 10000 280


Howto Extract all Files from Microsoft Installer Files (msi) rather than to Install the Package

All you need is the Windows Installer itself. Hit Win+R (command line dialog) and execute the following line (change file name and target folder, of course):

msiexec /a c:\tmp\MSIFileName.msi /qb TARGETDIR="c:\tmp\msitmp\"

You’ll find all files in your target folder.

How to Move VirtualBox’s Guest Hard Drives to Another (Physical) Location

If you ever wanted to move your (very large) file that contains a Virtualbox’s guest hard drive (file extension is .vdi) to another location and did so just like that Virtualbox wouldn’t find it the next time you wanted to boot into your guest system. The only thing Virtualbox needs to be pointed to is the new location of that file.

The standart location of VDI files is (for Linux) ~/.VirtualBox/VDI/ (see global settings, where you could also change this if that’s all you want). Remember the old file name and close Virtualbox, just in case it would overwrite settings when closed after the following changes. Now let’s move one file to, say, /media/USBDrive/virtualbox/. Now do:

  1. Use your favorite editor to open ~/.VirtualBox/Virtualbox.xml
  2. Find the line that says something like:
    <VirtualDiskImage filePath="VDI/old file name.vdi"/>
  3. Change it to point to your new location. So it should read something like:
    <VirtualDiskImage filePath="/media/USBDrive/new file name.vdi"/>
  4. Done.

How to Build a Windows XP SP3 Integrated Installation CD

You need:

  1. Old/original Windows XP installation CD (any of SP0 to SP2 will do even though only those from SP2 are supported officially). Make sure to use build 5512 or above.
  2. Microsoft Windows SP3
  3. unzipper like WinRar, unrar forย  Linux / Ubuntu or the like
  4. ISO creator / CD burn program like mkisofs, InfraRecorder, UltraISO, Basero (or others) or even old school
  5. Boot image exctracted using BBIE or use this (also see Box.net box below)
  6. ~ 1 GB free tmp space on disk

You do:

  1. Extract / copy old Windows CD‘s content (including hidden files!) to one folder (e.g. c:\XPCD)
  2. extract SP3‘s content to another folder (e.g. c:\XPSP3) using e.g. unrar, winrar or hit Win+R and type
    c:\XPSP3\windowsxp-kb936929-sp3-x86-enu.exe โ€“x

    and select target folder, here c:\XPSP3

  3. To slipstream the old CD do Win+R and copy+paste or type
    c:\XPSP3\i386\update\update.exe /integrate:c:\XPCD
  4. Create bootable CD image or CD using the boot image and your updated folder c:\XPCD. I recommend using mkisofs (Windows or Linux executable) using
    mkisofs \
        -b cdboot/msboot.img -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 \
        -iso-level 2 -J -l -D -N -joliet-long -relaxed-filenames \
        -V "WINSP" \
        -o ../winsp.iso .

    from within the root folder of the CD to be, i.e. c:\XPCD. You need to extract the El Torito image first. Create a new folder there and drop your boot image, i.e. cdboot/msboot.img. This can be done under Linux for example using geteltorito /dev/scd0 > cdboot/msboot.img (or use BBIE or IsoBuster in Windows or Wine).

  5. Done.

You might want to try booting from the image using VirtualBox.


/dev/scd0 > {in-dir}/boot.bin

Making Apache server use SSL only

Here is a forum post on how to make all incoming connections to your apache web server redirect to https, i.e. take encripted connections via ssl by using apache’s rewrite module.

Opera, Flash and Ubuntu (Feisty Fawn, Gutsy Gibbon and Hardy Heron also)

Note 08/01/08: There have been issues after the original plugin has been updated. See Ubuntu Forum, Bug description (workaround or fixed deb for firefox only which is version 9.0.115!) or comments below for more. Components have been removed that also opera needs! Yet another example why closed source is bad… Hence you might want to give gnash a go, i.e. open source flash. The new Flash version is meant to work with opera version > 9.50 Beta, though (see bottom note). Anyway, here it goes for Flash version \leq

Note 2008/04/19: Before you get all frustrated about Flash and Opera you might enjoy operas’ ads.

Here we go

To install Adobe Flash Player after you installed Opera in Ubuntu, I found the best way is to, once again, use the debian way:

sudo aptitude install flashplugin-nonfree

After the install routine is done you need to add the path to plugins options in opera. Alternatively you could link there. To find where the new binaries are located do:

dpkg -S flashplugin-nonfree
app-install-data: /usr/share/app-install/desktop/flashplugin-nonfree.desktop
flashplugin-nonfree: /usr/lib/flashplugin-nonfree
flashplugin-nonfree: /var/cache/flashplugin-nonfree
flashplugin-nonfree: /usr/share/lintian/overrides/flashplugin-nonfree
flashplugin-nonfree: /usr/share/doc/flashplugin-nonfree
flashplugin-nonfree: /usr/share/doc/flashplugin-nonfree/changelog.gz
flashplugin-nonfree: /usr/share/doc/flashplugin-nonfree/copyright

Update 2008/04/16: The correct “list flag” for dpkg would be -L instead of -S:

dpkg -L flashplugin-nonfree | grep -i 'lib'


Alternatively you could link the lib’s binary to Opera’s plugin directory:

sudo ln /usr/lib/flashplugin-nonfree/libflashplayer.so /usr/lib/opera/plugins/

Some say you may need to restart opera in order for plugins to actually work. Fortunally, for me it work right away. In opera’s address field type opera:plugins to see what opera knows about flash.Update: See this blog on bleeding edge info on plugin’s development status if interested.


Update: This works for 7.04, a.k.a. Feisty Fawn, and 7.10, a.k.a. Gutsy Gibbon.

Update 2008/04/16: On a side note: There is the option reinstall for aptitude if one wants to make sure the newest files are all in the right places.

Update 2008/04/19:I stumbled upon the close to be release of Opera 9.5 which is currently in beta state (and has even more great features once again before Firefox has them ๐Ÿ˜‰ ). Supposingly the Debian package should get flash working. I tried the i386 version for Gutsy and it did work for me.

Update 2008/06/28: Here are some command line parameters you can start Opera with. Especially useful would be -debugplugin. To use it you have to open a terminal to see the additional information:

opera -debugplugin [Enter/Return Key]

« Older entries Newer entries »