Secure deletion of a file via the KDE GUI

One of the various Linux tools for secure deletion of files is the srm command. In Gentoo Linux the srm command and other security-related commands are available by installing the package secure-delete. Now, srm is easy enough to use from the command line:

$ srm mysecrets.doc

You can do the same thing from the KDE GUI very easily by adding the srm command to the KDE Service Menu. To do this, first install KDE Service Menu Editor. Then launch it and do the following:

On the Actions tab:

1. Enter “Securely Delete” (without the quotes) in the Label box.

2. Enter srm -r %u in the Exec box. As you will see if you use the man srm command, the “-r” option means “recursive mode, deletes all subdirectories”. I’ve added this option so that I can securely delete directories and all their contents including sub-directories, as well as individual files.

3. Click on the blank Icon and choose a suitable icon. I selected System Icons > Actions, entered “delete” (without the quotes) in the Search box and selected the big red X (edit-delete) icon.

On the Conditions tab:

4. Against ‘Display the menu for:’, click on All Files.

5. Click OK then Close, and you’re done.

Now all you need to do in KDE is right-click on a file or directory and select Actions > Securely Delete.

The above configuration will only allow you to delete files and directories owned by your user name. However, if you also want to be able to delete files owned by other Linux accounts on your machine then you can modify the command in the KDE Service Menu to prompt you for the root user’s password. To do that, in Step 2 above you would use the following command instead:

kdesu srm -r %u

Now when you right-click on a file or directory, a window will pop up and prompt you to enter the root user’s password.

Of course, if you would prefer to use a different tool to securely delete a file or directory then you could substitute the srm command with e.g. wipe or bcwipe if you have those installed. Use man wipe and man bcwipe after installing them, to check which options you might want to use.

Note that some of your data might be in a temporary (deleted) copy of the file somewhere on the disk. If you installed the secure-delete package then you could use the sfill command to wipe free disk space on any mounted partition, but you would need to be root user to use it. Note also that, if a small file has already acquired a block with your data, no tool can remove that data. Anyway, if you also want to securely wipe any free disk space you can modify the aforementioned command in the KDE Service Menu even further:

kdesu srm -r %u && kdesu sfill directory/mountpoint

I have my /home directory on its own partition, so, in my case the KDE Service Menu entry would be:

kdesu srm -r %u && kdesu sfill /home

This would pop up a window twice prompting you to enter the root user’s password: once for the srm command, and once for the sfill command. Note that the sfill command can take a very, very long time to wipe the free space if it is large (I personally don’t bother using it, as I don’t want my hard disk thrashing for hours). The sfill command works by creating one big file to fill all the free space, then writes to that file using several steps to ensure all the previously-free areas of the disk have had their original contents erased. Once that is completed, the utility then removes the big file, releasing the free disk space.

If you think your swap space contains some of your data, you could use the sswap command — also available if you install the secure-delete package — for secure deletion of the swap space, but you would need to disable your swap space first. I have 4 GB of RAM and my swap partition is virtually never used, so I don’t bother putting my tinfoil hat on in the case of swap either.

KDE 4 Service Menu Editor

You would have thought that it would be possible to edit the KDE Service Menu (the menu that you see when you right-click on an entry in a Dolphin or Konqueror window) or add your own commands to it. However, this is not a feature of KDE 4 to date (June 2011). Fortunately, KDE developer David Edmundson produced a handy GUI utility to do just this. His blog post KDE Service Menu Editor and KDE-Apps.org entry give the details.

I hope this utility will become part of KDE in a future release, but, until it does, below I explain how I installed it in KDE 4.6.2 for Sabayon Linux. The same procedure should apply in the case of Gentoo Linux.

1. Download kservicemenueditor-0.2a.tar.gz and extract it to ~/kservicemenueditor-0.2a/

2. N.B. This step is distribution-dependent, and may not be necessary for your distribution. Use the following command to determine whether or not you need to perform this edit:

$ kde4-config --path data

If the above command returns the following paths:

/home/fitzcarraldo/.kde4/share/apps/:/usr/share/apps/

then edit setup.py and change the line:

('share/kde4/apps/servicemenueditor', glob.glob("*.ui")),

to:

('share/apps/servicemenueditor', glob.glob("*.ui")),

3. To install KDE Service Menu Editor:

$ cd ~/kservicemenueditor-0.2a/
$ su
Password:
# ./setup.py install
# exit
exit
$

4. To launch the utility, either run it on the command line from your normal user account:

$ servicemenueditor

or double-click the Desktop Configuration File servicemenueditor.desktop (which you can place on your Desktop or in any other directory).

5. Usage example:

Let’s assume you want to make a right-click menu for compressing a file with GZip. In that case you would carry out the steps listed below.

a) Launch servicemenueditor.
b) Click ‘Add’.
c) In the box type the name “compress” (without the quotes) and click ‘OK’.
d) Click on the ‘Conditions’ tab and select ‘All Files’ as you want to be able to work on all files.
e) Click the ‘Action’ tab and enter “Compress Files” (without the quotes) in the ‘Label’ box. This is what will appear in the ‘Actions’ Menu.
f) Click on the blank icon and select an icon of your choice.
g) In the ‘Exec’ box, type the command needed. For this example “gzip %u” would be the command.

Help for Windows users: How to create a Linux LiveCD, LiveDVD or LivePenDrive from an ISO file

Existing Linux users are completely familiar with ISO image files, LiveCDs and LiveDVDs, but a newcomer to Linux may have never heard of ISO files, let alone created a LiveCD or LiveDVD. I was reminded of this yesterday when a confused Windows user contacted me to ask how to create a LiveCD, so I thought I’d post the instructions here as they may help other Windows users wanting to create a bootable LiveCD, LiveDVD or pen drive in order to try Linux without installing it, or indeed to use to install Linux to their hard drive.

In this particular case the Windows user wanted to create a LiveDVD for 64-bit Sabayon Linux 5.5 KDE Edition, so I oriented my instructions to Sabayon Linux. But the procedure is essentially the same for other Linux distributions that release ISO files for the creation of LiveCDs or LiveDVDs.

Below I cover two options: the creation of a bootable ‘Live’ optical disc (be it a CD or a DVD), and the creation of a bootable ‘Live’ pen drive. Steps 1 to 3 below are common to both options.

1. Download e.g. the ISO file for 64-bit Sabayon Linux 5.5 KDE Edition from one of the repository mirrors listed on the Sabayon Linux Web site’s Download page. For example: http://na.mirror.garr.it/mirrors/sabayonlinux/iso/Sabayon_Linux_5.5_amd64_K.iso

2. Find the MD5 checksum of the ISO file you downloaded. In Windows you can do this by using e.g. the freeware GUI utility WinMD5sum.

3. Visually compare the MD5 checksum with the MD5 checksum listed in the .md5 file for the ISO file you downloaded in Step 1 (some distributions just list the MD5 checksum on the Download page, rather than issuing a file). For example: http://na.mirror.garr.it/mirrors/sabayonlinux/iso/Sabayon_Linux_5.5_amd64_K.iso.md5

If they differ then the downloaded ISO file is corrupt, so go back to Step 1, otherwise proceed to Step 4.

Option A: How to create a LiveCD/DVD via Windows

If the ISO file size is less than the capacity of a CD-R (usually 650 MiB, but check on the media box or disc label) then use a CD-R. If the ISO file size is bigger than the capacity of a CD-R then use a DVD-R. If you burn to a CD-R then you will create a ‘LiveCD’; if you burn to a DVD-R then you will create a ‘LiveDVD’. Even if the ISO file is smaller than the capacity of a CD-R, there is nothing stopping you using a DVD-R instead of a CD-R if you wish.

4. Burn the ISO file to a blank optical disc, but not as a data file: you need to select the ‘Burn Image’ or ‘Burn ISO’ option in your burning utility. Optical media and optical drives are notoriously fickle, so burn using a low speed e.g. x1 or x2 in order to maximise the chance of a good burn. There are many commercial and freeware burning utilities for burning to CD-R and DVD-R. Commercial burning utilities include well-know applications such as Nero and Roxio. There are also many freeware burning utilities which you can find using e.g. Google. The Sabayon Linux Wiki article HOWTO:_Burn_Sabayon_from_Windows recommends the freeware burner ISO RECORDER but you can also find others using Google.

Many burning utilities have a Verify option to check that the burn was successful. If the utility you use does have such an option, select it. If it does not have a Verify option, there are other ways of checking the burnt CD/DVD in Windows (and Linux) if you want to. For example, see Method 3 in Sabayon Linux Wiki article HOWTO: Checking the integrity of a LiveCD or LiveDVD.

5. Boot the LiveCD/DVD to see if it works. You may need to configure your computer’s BIOS to boot first from an optical drive, or your computer may have a boot menu option which lets you select which drive to boot.

Option B: How to create a LiveCD/DVD on a pen drive (I call this a ‘LivePenDrive’) via Windows

This is only viable if your computer has a BIOS option to boot from USB pen drives, or a boot menu option to boot from USB pen drives. Legacy computers did not have these options, so, if you have an old computer that cannot boot from a pen drive, your only option would be to create a ‘Live’ optical disc.

4. Download the utility UNetbootin for Windows, and install it.

5. Run UNetbootin to create the LivePenDrive using the ISO file you downloaded. In the UNetbootin GUI window, don’t tick ‘Distribution’, tick ‘Diskimage’. Then select ‘ISO’, browse (use the ‘…’ button) to the folder containing the ISO file and select it. Make sure you have selected Type: ‘USB Drive’, and Drive: the drive letter for the pen drive. The pen drive will probably be D:\ or E:\ but, if you are not sure, check in Start > Computer (Start > My Computer if you are using Windows XP).

6. Boot the LivePenDrive to see if it works. You may need to configure your computer’s BIOS to boot first from a pen drive, or your computer may have a boot menu option which lets you select which drive to boot.

The beauty of using a pen drive is that you can overwrite its contents in future if you want to create a LivePenDrive of a newer version of the same Linux distribution or a different distribution. Unlike a CD-R or DVD-R, which will probably end up being thrown away when a new version of the ISO is released. Another advantage of using a pen drive is that the creation of a LivePenDrive is more reliable than burning an optical disc. It is not uncommon to end up with a corrupted optical disc, which is just a waste of plastic.

Converseen, a GUI batch image converter and resizer using Qt4 and ImageMagick

I normally use ImageMagick on the command line to convert and/or resize my photographs, and the two commands I use are convert and mogrify. However, I learned recently of Converseen, a GUI tool for batch conversion and resizing of image files which is a front-end for ImageMagick. Although it’s easy enough to use the command line, a GUI tool does save having to remember the command syntax each time, so I thought I’d install Converseen in Gentoo. Converseen is not in the main Portage tree, but I found an ebuild for version 0.2 from the qting-edge overlay. However, rather than add the overlay I decided instead to use a local overlay to install Converseen, which is currently at version 0.4.1, and the procedure I used is given below.

1. I downloaded to ~/Desktop/ the ebuild file from http://gitorious.org/gentoo-qt/qting-edge/blobs/master/media-gfx/converseen/converseen-0.2.ebuild and renamed it as converseen-0.4.1.ebuild, which contains the following:

# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

LANGSLONG="it_IT pl_PL"

inherit qt4-edge

MY_P=${PN}-${PV}

DESCRIPTION="GUI image conversion tool based on imagemagick"
HOMEPAGE="http://converseen.sourceforge.net"
SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="debug"

DEPEND="x11-libs/qt-gui:4
|| ( media-gfx/graphicsmagick[imagemagick] media-gfx/imagemagick )"
RDEPEND="${DEPEND}"

S="${WORKDIR}/${MY_P}"

DOCS="README"

src_prepare() {
qt4-edge_src_prepare

sed -i -e "s!/usr/lib!/usr/$(get_libdir)!" ${PN}.pro \
|| die "sed libdir failed"

local ts_files=
for lingua in ${LINGUAS}; do
for a in ${LANGSLONG}; do
if [[ ${lingua} == ${a%_*} ]]; then
ts_files="${ts_files} loc/${PN}_${a}.ts"
fi
done
done
local qm_files="${ts_files/.ts/.qm}"

sed -e '/^ loc/d' \
-e "s!\(TRANSLATIONS += \).*!\1${ts_files}!" \
-e "s!\(translations\.files = \).*!\1${qm_files}!" \
-i ${PN}.pro || die "sed translations failed"
}

2. I downloaded to ~/Desktop/ the file qt4-edge.eclass, which contains the following:

# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# @ECLASS: qt4-edge.eclass
# @MAINTAINER:
# Ben de Groot ,
# Markos Chandras ,
# Davide Pesavento ,
# Dominik Kapusta
# @BLURB: Experimental eclass for Qt4 packages
# @DESCRIPTION:
# This eclass contains various functions that may be useful when
# dealing with packages using Qt4 libraries. Requires EAPI=2.

inherit base eutils multilib qt4-r2 toolchain-funcs

export XDG_CONFIG_HOME="${T}"

qt4-edge_pkg_setup() {
if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
ewarn
ewarn "Please file bugs on bugs.gentoo.org and prepend the summary with"
ewarn "[qting-edge]. Alternatively, contact qt@gentoo.org."
ewarn "Thank you for using qting-edge overlay."
ewarn
ebeep 5
fi
}

qt4-edge_src_unpack() {
debug-print-function $FUNCNAME "$@"

qt4-r2_src_unpack "$@"
}

# @FUNCTION: qt4-edge_src_prepare
# @DESCRIPTION:
# Default src_prepare function for packages that depend on qt4. If you have to
# override src_prepare in your ebuild, you should call qt4-edge_src_prepare in it,
# otherwise autopatcher will not work!
qt4-edge_src_prepare() {
debug-print-function $FUNCNAME "$@"

qt4-r2_src_prepare
}

# @FUNCTION: qt4-edge_src_configure
# @DESCRIPTION:
# Default src_configure function for packages that depends on qt4. If you have to
# override src_configure in your ebuild, call qt4-edge_src_configure in it.
qt4-edge_src_configure() {
debug-print-function $FUNCNAME "$@"

qt4-r2_src_configure
}

# @FUNCTION: qt4-edge_src_compile
# @DESCRIPTION:
# Default src_compile function for packages that depends on qt4. If you have to
# override src_compile in your ebuild (probably you don't need to), call
# qt4-edge_src_compile in it.
qt4-edge_src_compile() {
debug-print-function $FUNCNAME "$@"

qt4-r2_src_compile
}

# @FUNCTION: qt4-edge_src_install
# @DESCRIPTION:
# Default src_install function for qt4-based packages. Installs compiled code,
# documentation (via DOCS variable) and translations (via LANGS and
# LANGSLONG variables).
qt4-edge_src_install() {
debug-print-function $FUNCNAME "$@"

qt4-r2_src_install

# install translations # hwoarang: Is this valid for every package???
# need to have specified LANGS or LANGSLONG for this to work
[[ -n "${LANGS}" || -n "${LANGSLONG}" ]] && prepare_translations
}

# Internal function
_do_qm() {
debug-print-function $FUNCNAME "$@"
[[ $# -ne 2 ]] && die "$FUNCNAME requires exactly 2 arguments!"

local transfile="$(find "${1}" -type f -name "*${2}".qm)"
if [[ -e ${transfile} ]]; then
INSDESTTREE="/usr/share/${PN}/${1#${S}}" \
doins "${transfile}" \
|| die "failed to install ${2} translation"
else
eerror
eerror "Failed to install ${2} translation. Contact eclass maintainer."
eerror
die "Failed to install translations"
fi
}

# @VARIABLE: TRANSLATIONSDIR
# @DESCRIPTION: Translations directory. If not set, ${S} will be used

# @FUNCTION: prepare_translations
# @DESCRIPTION:
# Choose and install translation files. Normally you don't need to call
# this function directly as it is called from qt4-edge_src_install.
prepare_translations() {
debug-print-function $FUNCNAME "$@"

# Find translations directory
# Changed default to . - crazy upstreams :)
local roottrdir="${TRANSLATIONSDIR:-${S}}" trdir=.
for dir in lang langs translations; do
[[ -d ${roottrdir}/${dir} ]] && trdir="${roottrdir}/${dir}"
done

local lang=
for lang in ${LINGUAS}; do
for x in ${LANGS}; do
[[ ${lang} == ${x%_*} ]] && _do_qm "${trdir}" ${x}
done
for x in ${LANGSLONG}; do
[[ ${lang} == ${x} ]] && _do_qm "${trdir}" ${x}
done
done
}

EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install

3. I synchronised the Portage main tree’s ebuilds on my PC with those in the repositories:

# emerge --sync

4. I made sure that /etc/make.conf has the following lines at the end of the file:

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
ACCEPT_LICENSE="*"

5. I created the necessary directories in the local overlay:

# mkdir -p /usr/local/portage/media-gfx/converseen
# mkdir -p /usr/local/portage/eclass

6. I made sure Portage would not nag me about a missing name for my local overlay:

# mkdir /usr/local/portage/profiles
# echo "local_overlay" > /usr/local/portage/profiles/repo_name

7. I copied the converseen ebuild and eclass file into the relevant directories:

# cp /home/fitzcarraldo/Desktop/converseen-0.4.1.ebuild /usr/local/portage/media-gfx/converseen/
# cp /home/fitzcarraldo/Desktop/qt4-edge.eclass /usr/local/portage/eclass/

8. I generated the manifest for the package:

# cd /usr/local/portage/media-gfx/converseen/
# ebuild converseen-0.4.1.ebuild manifest

9. I merged the package:

# emerge -1v converseen

An entry for Converseen was added to Kickoff > Applications > Graphics, and I can either use that to launch it or I can launch it from the command line by entering the command converseen. The user interface is easy to master, and I’ve already put Converseen to use at work and at home. Overall, then, a useful addition to my KDE toolkit.

EDIT (July 23, 2012}: There is an ebuild for Converseen in Portage these days, so use that instead to install Converseen.

Cannot browse some Web sites: yet another cause

Having spent hours yesterday trying to figure out why I could no longer browse a few specific Web sites from my old Gateway Solo 9300 laptop running Linux, whereas all the other Linux and Windows laptops that use my wireless network can browse any Web site, I thought I’d post the solution as Google did not turn up this particular cause.

There are several possible reasons why one may not be able to browse some Web sites: IPv6; the MTU; a black hole router en route; the settings in the various ip_* and tcp_* files in /proc/sys/net/ipv4/, and so on. So, unfortunately I had many avenues to pursue.

My old Gateway Solo 9300 laptop had enabled me to browse the Web reliably via my home wireless network until recently. Suddenly I could neither browse the Sabayon Linux Web site nor access the Entropy package manager’s repository. I could also no longer browse some other Web sites, although most Web sites were still accessible without trouble.

I tried many different things without success, and then finally remembered that I had reconfigured my router a couple of weeks ago because one of my family had reset it whilst I was away from home. Now, when this model of router (BT Home Hub, Version 1.0) is reset it defaults to WEP encryption for wireless networking. However, I normally have it set to use WPA-PSK encryption. So, when I got home I accessed the router’s Web interface via Ethernet from a Desktop PC and changed wireless networking encryption to “WPA-PSK Version: WPA+WPA2″. In the past I had set it to “WPA-PSK Version: WPA”, and thought that setting “WPA+WPA2″ instead of “WPA” this time would not cause any problems. Well, it didn’t on all the other laptops using my network, but my old Gateway Solo 9300 with Linksys CardBus card (‘Linksys WPC54G (EU) v7.1 wireless notebook adapter card’) was different.

As soon as I wondered if the encryption setting was the cause of my problem, I browsed to the BT Home Hub configuration page and changed wireless networking encryption from “WPA-PSK Version: WPA+WPA2″ to “WPA-PSK Version: WPA”. Bingo, my Gateway Solo 9300 running Sabayon Linux E17 Edition and Firefox 4 could browse all Web sites again. Mind you, I also need to have the ipv6 module disabled (I had previously uncommented the line alias net-pf-10 off in the file /etc/modprobe.d/aliases.conf and used the command update-modules) as well as the modifications mentioned in an earlier post (Why can’t I access a specific Web site?). But all those other measures do not solve the problem if the router is configured for “WPA-PSK Version: WPA+WPA2″.

The router’s wireless security option “WPA-PSK Version: WPA” is intended for a network that would only be used by clients configured to use WPA encryption; the router’s option “WPA-PSK Version: WPA2″ is intended for a network that would only be used by clients configured to use WPA2 encryption; the router’s option “WPA-PSK Version: WPA+WPA2″ is intended for a network that would be used by clients configured to use either WPA or WPA2 encryption. So I wonder why there was a problem, as the laptop and CardBus card are configured for “WPA & WPA2 Personal” in nm-applet, and the card supports WPA (TKIP) and WPA2 (CCMP a.k.a. AES).

Pimping my Desktop: have KWin Desktop Effects improved in KDE 4.6.2?

KWin Desktop Effects in past releases of KDE 4 were lacking in comparison to Compiz. After installing KDE 4.6.2 recently I decided to see if there has been any progress, and was pleasantly surprised. Although KWin is still not quite up to the standard of Compiz in all areas (the behaviour of 3D windows, especially around the corners of the Desktop Cube, being one example), KWin’s Desktop Effects are now very pleasant and a viable alternative to Compiz. I’ll talk you though my Desktop-pimping exercise using KWin on my main laptop running KDE 4.6.2, and then I’ll describe briefly a similar exercise using Compiz on the same machine.

KWin

I decided to have water and the colour blue as my theme. For wallpaper I chose a striking image created by Sabayon Linux user tarabaz.

I selected Oxygen for the widget and icons style (System Settings > Application Appearance) and for the Window Decorations (System Settings > Workspace Appearance), and Air for the Desktop Theme (System Settings > Workspace Appearance). With an attractive wallpaper, it is nice to have the ability, using the Folder View plasmoid, to contain the contents of the directory ~/Desktop in a window on the Desktop. The only other thing I placed on the Desktop was the excellent yaWP plasmoid. To download and install yaWP, follow the instructions on the yaWP page at KDE-Look.org.

I right-clicked on the Pager widget on the Panel, selected Pager Settings, and configured the Pager as follows in order to be able to switch Desktops in KWin in a similar way to Compiz:

General

  • Number of rows: 1

Virtual Desktops (Shortcuts on the ‘Switching’ tab):

  • Switch One Desktop Down > Ctrl+Alt+Down
  • Switch One Desktop to the Left > Ctrl+Alt+Left
  • Switch One Desktop to the Right > Ctrl+Alt+Right
  • Switch One Desktop Up > Ctrl+Alt+Up

The result looks like this:

KDE 4.6.2 Desktop

KDE 4.6.2 Desktop

KDE 4.6.2 Desktop with open windows

KDE 4.6.2 Desktop with open windows

I thought dolphins would look cool on the top and bottom of the Desktop Cube, and I found a gorgeous wallpaper from Vladstudio which matched my vision. I loaded the image into the GIMP, cropped and resized it to the required 800×800 pixels and saved it as a PNG image cubecap.png in my directory ~/Pictures/ (the images on the top and bottom of the Desktop Cube must be the same, unlike Compiz). To specify a KWin cubecap, you have to click on System Settings > Desktop Effects, click on the spanner icon for the Desktop Cube on the All Effects tab, and tick both ‘Show caps’ and ‘Display image on caps’ on the Advanced tab.

The KWin cubecap image must be stored in the /usr/share/apps/kwin/ directory. I backed up the default KWin cubecap first:

mv /usr/share/apps/kwin/cubecap.png /usr/share/apps/kwin/cubecap.png.bak

and then moved my new cubecap to that directory:

mv /home/fitzcarraldo/Pictures/cubecap.png /usr/share/apps/kwin/cubecap.png

For the background wallpaper behind the Desktop Cube (what in Compiz is called the ‘Skydome’), I selected a graduated undersea image that shows off the reflection of the base of the Desktop Cube and complements well the dolphins on the cubecaps. I saved the image in my directory ~/Pictures/. To set the background wallpaper, you have to click on System Settings > Desktop Effects, select the Desktop Cube on the All Effects tab, click on the spanner icon, and under Background on the Basic tab you’ll find a field in which to specify the Wallpaper. I hope you like the results, shown below.

KDE 4.6.2 Desktop Cube

KDE 4.6.2 Desktop Cube

KDE 4.6.2 Desktop Cube

KDE 4.6.2 Desktop Cube

KDE 4.6.2 Desktop Cube viewed from above

KDE 4.6.2 Desktop Cube viewed from above

KDE 4.6.2 Desktop Cube viewed from below

KDE 4.6.2 Desktop Cube viewed from below

Unlike the Desktop Cube, which I do find useful when I have many windows open, wobbly windows are pure ‘eye candy’. Nevertheless, they are fun to show off and impress users of that other OS. The trouble is, the default settings for wobbly windows in KWin Desktop Effects are too stiff for my liking, and the wobble is much less satisfying than in Compiz. Fortunately it is possible to adjust the behaviour in KWin, and I have found settings which make wobbly windows more like those in Compiz and more satisfying. To set the parameters for wobbly windows, you have to click on System Settings > Desktop Effects, then click on the spanner icon for Wobbly Windows on the All Effects tab. The settings that I like are:

Wobbliness: move the slider to More
Wobble when moving: ticked
Wobble when resizing: ticked
Enable advanced mode: ticked
Stiffness: 10
Drag: 50
Move factor: 9

KDE 4.6.2 Desktop Effects - Wobbly Windows

KDE 4.6.2 Desktop Effects - Wobbly Windows

So, there we have it. With little effort it is possible to set up an attractive and eminently usable 3D Desktop environment in KDE 4.6.2. I was so pleased with the result that I’m keeping it for the moment.

I have not yet tried it, but, as with Compiz, it is possible to configure KWin to use a Desktop Cylinder or Desktop Sphere instead of a Desktop Cube.

Compiz

I’ve been using Compiz, its ‘mother’ Compiz-Fusion and its ‘grandmother’ Beryl since 2007. As is the case with the newer KWin Desktop Effects, Compiz is a mixture of useful 3D effects and eye candy. I like Compiz very much. I use the Fusion Icon on the Panel to switch between KWin window manager and Compiz window manager. So, now let’s look at pimping my Compiz Desktop in KDE 4.6.2. This time I chose a darker theme.

I used a brushed aluminium wallpaper created in the GIMP by Sabayon Linux user alonsoty. I saved the wallpaper in my directory ~/Pictures/ and used the standard KDE 4 method of setting the Desktop wallpaper.

A dark Panel looks best with this wallpaper, so I selected a user-customised Desktop Theme (System Settings > Workspace Appearance) ‘(Customized)’ that is installed from the Sabayon Linux LiveDVD, although KDE’s Oxygen theme looks similar to this and would also work.

KDE 4.6.2 with Compiz Desktop

KDE 4.6.2 with Compiz Desktop

I used the Fusion Icon to launch the Emerald Theme Manager, and selected DarkLight v1.1 as the window theme. This Emerald theme was originally developed for use with Beryl and still looks gorgeous today with Compiz.

KDE 4.6.2 with Compiz Desktop with open windows

KDE 4.6.2 with Compiz Desktop with open windows

The above images show that Compiz looks good with KDE 4.6.2. The only problem I have found is with the Pager on the Panel: occasionally it shows all four Desktops, but usually only displays Desktop 1. Nevertheless I can rotate the Desktop Cube using either the keyboard shortcuts or the mouse, so this is only a minor issue. The CCSM (Compiz Config Settings Manager) is used in a similar way to System Settings > Desktop Effects in KWin. However, CCSM has an even more bewildering set of configuration options and is more complicated to use than the KWin equivalent.

Unlike KWin, it is possible for the cubecaps on the top and bottom of the Desktop Cube to be different to each other. I downloaded from the Web an image of the Earth and Moon from space for the top of the Desktop Cube and and an image of the Moon for the bottom of the Desktop Cube, saved them in my directory ~/Pictures/ and used CCSM > ‘Cube Reflection and Deformation’ > Appearance and specified the location of the top and bottom image files. Unlike KWin, they can have any file name.

The Skydome (the background wallpaper behind the Desktop Cube) is specially designed so that it pans when you rotate the Desktop Cube, providing you have selected ‘Animate Skydome’ in CCSM > Desktop Cube > Appearance > Skydome. The image, which must be 2048×1024 pixels, looks distorted when viewed in a browser window or graphics application but looks good in Compiz. This is more sophisticated than KWin’s Desktop Effects. Various Web sites have Skydome files for Compiz (Skydomes for Beryl and Compiz-Fusion work in Compiz too), and, in keeping with my space images on the top and bottom of the Desktop Cube, I downloaded a space-themed Skydome to my directory ~/Pictures/ and used CCSM > Desktop Cube > Appearance > Skydome to specify the file. Any file name is allowed.

Compiz Desktop Cube in KDE 4.6.2

Compiz Desktop Cube in KDE 4.6.2

Compiz Desktop Cube in KDE 4.6.2

Compiz Desktop Cube in KDE 4.6.2

Compiz Desktop Cube viewed from above in KDE 4.6.2

Compiz Desktop Cube viewed from above in KDE 4.6.2

Compiz Desktop Cube viewed from below in KDE 4.6.2

Compiz Desktop Cube viewed from below in KDE 4.6.2

Setting up wobbly windows was as simple as ticking Wobbly Windows in CCSM. I stayed with the default settings.

Compiz Wobbly Windows in KDE 4.6.2

Compiz Wobbly Windows in KDE 4.6.2

Compiz has some more features up its sleeve, though, and I show a couple of them below.

Compiz window top corner pulled down in KDE 4.6.2

Compiz window top corner pulled down in KDE 4.6.2

Compiz window top centre pulled down in KDE 4.6.2

Compiz window top centre pulled down in KDE 4.6.2

The picture above illustrates one area where Compiz (and its predecessor Compiz-Fusion) is less sophisticated than Beryl used to be: notice the polygonal shape of the top of the window that I was pulling down. I won’t bother posting one of the images I have from my Beryl-using days, but, with Beryl, the top of the pulled-down window had a smooth curvature and looked much nicer.

Something else which I don’t believe KWin Desktop Effects has is the ability to vary the transparency of a window by using the Alt key and the mouse wheel, as illustrated in the image below.

Compiz window transparency changed by mouse in KDE 4.6.2

Compiz window transparency changed by mouse in KDE 4.6.2

EDIT (April 28, 2011): Reader lefty.crupps has pointed out that it is possible to do this with KWin too; see his post in the COMMENTS section for how to do it.

Summary

I hope I have given you a taste of what is possible in KDE 4.6.2 using either KWin or Compiz. I have only scratched the surface of either window manager, as there are many features. And, hopefully, KWin Desktop Effects will continue to improve in future releases of KDE, as it has improved noticeably in this release.

Reboot button which allows you to specify which GRUB 2 menu entry to boot

When clicking on Leave > Restart Computer in your Desktop Environment it might be convenient to be able to specify straight away which GRUB 2 menu entry to boot, rather than having to wait for the machine to reboot and display the GRUB 2 menu. Here is how to do it. I use KDE, but the same approach would work in other desktop environments.

N.B. Some distributions use /boot/grub2/ rather than /boot/grub/ for GRUB 2, so replace the path accordingly if the distribution you use is one of them.

Setting it all up

1. Use your favourite text editor to create the simple Bash script shown below in your home directory. I’ll call the script reboot.sh for example:

#!/bin/bash
echo
echo "== SELECT WHICH OS TO BOOT =="
echo
# Delete the next line if you do not have a separate boot partition:
sudo mount /dev/sda3 /boot &>/dev/null # Change "/dev/sda3" to match your boot partition.
echo
sudo cat /boot/grub/grub.cfg | grep menuentry | awk -F\" '{print N++,$(NF-1)}'
echo
read -p "Enter number (q to abort) and press ENTER: " CHOICE
if [ "$CHOICE" != "q" ] ; then
sudo grub-reboot $CHOICE
sudo shutdown -r now
fi

In this script, the GRUB 2 menu entries are read directly from the grub.cfg file instead of being hard-coded in the script. Therefore this script would work as-is on anyone’s installation.

2. Make the script executable:

$ chmod +x ~/reboot.sh

3. Create an icon (Desktop Config File) on your Desktop (right-click on the Desktop and select Create New > Link to Application…), configure it to execute the command sh reboot.sh in a terminal, and give it a nice icon (the icon shown below would suffice). Drag it onto your Panel so it will always be visible and only needs a single click to activate.

Reboot button

Reboot button


4. Edit the file /etc/default/grub to have GRUB_DEFAULT=saved and GRUB_SAVEDEFAULT=true (if it is not already like that).

5. Regenerate the file /boot/grub/grub.cfg (this would only be necessary if you changed anything in /etc/default/grub):

# grub-mkconfig -o /boot/grub/grub.cfg

In some distributions the command is instead:

# grub2-mkconfig -o /boot/grub/grub.cfg

How to use it

1. Click on the new icon on your Panel.

2.You will be presented with a menu similar to the following:

== SELECT WHICH OS TO BOOT ==

Password:

0 Sabayon GNU/Linux, with Linux x86_64-2.6.38-sabayon
1 Sabayon GNU/Linux, with Linux x86_64-2.6.38-sabayon (recovery mode)
2 Sabayon GNU/Linux, with Linux x86_64-2.6.37-sabayon
3 Sabayon GNU/Linux, with Linux x86_64-2.6.37-sabayon (recovery mode)
4 Windows 7 (loader) (on /dev/sda1)
5 Windows 7 (loader) (on /dev/sda2)

Enter number (q to abort) and press ENTER:

You will first be prompted to enter your password, then the menu will be displayed and you will be prompted to enter the number of the menu item you want to boot. The example above is from my machine; your menu will have different entries, depending on what is in your /boot/grub/grub.cfg file.

The machine will then reboot to the kernel or OS you just selected, without you having to touch any further keys, or will exit the script and do nothing if you selected the Abort option (q).

Nostalgia for those ALSA mixer channels that KMix and GNOME Volume Control used to have?

These days the GUI mixers KMix and GNOME Sound Preferences display PulseAudio devices and streams rather than ALSA mixer channels. For example, prior to its integration with PulseAudio, KMix typically displayed a mixer window that looked like the one below.

KMix showing ALSA channels

KMix with ALSA channels

whereas, today, a KMix window typically looks like the following:

KMix with PulseAudio channels

KMix with PulseAudio channels

 

KMix 3.8 in KDE 4.6.1 does not provide separate speaker and headphone channels. You can alter the headphone and speaker volume by using PulseAudio Volume Control instead (see the picture below), but people are not as familiar with the PulseAudio GUI, and it is yet another step to perform.

PulseAudio Volume Control showing selection of Headphones channel

PulseAudio Volume Control showing selection of Headphones channel

 

If you are like me, you probably end up using KMix (or GNOME Sound Preferences) but also launch ALSA Mixer in a Konsole/Terminal for fine-grained control of the underlying ALSA channels:

ALSA Mixer running in Konsole

ALSA Mixer running in Konsole

 

This is more hassle, because you launch Konsole/Terminal and you enter the command alsamixer and press F6 (alternatively, use the command alsamixer -c 0 if your sound card is Card 0). The PulseAudio channels are displayed by default if you don’t specify your sound card when you launch ALSA Mixer.

EDIT (January 28, 2012): With recent versions of ALSA Mixer I have found that I must specify the card in the alsamixer command (e.g. alsamixer -c 0) because the command alsamixer alone results in a Segmentation fault message.

It would be handy to have an icon on the Panel or on the Desktop that you could use to launch ALSA Mixer. Well, you can. In fact, as there is also a GUI version of ALSA Mixer (albeit with a few less features than its console equivalent) you can use that instead if you prefer. Below I explain a few of the possible ways you can display ALSA Mixer easily from within a desktop environment.

 

Change KMix from a PulseAudio mixer to an ALSA mixer

By default KMix displays PulseAudio channels instead of ALSA channels. However, if you want to display the ALSA channels instead (as shown in the first picture above), quit KMix and enter the following command in a Konsole window or in KRunner:

export KMIX_PULSEAUDIO_DISABLE=1 && kmix

If you want to make this permanent then add KMIX_PULSEAUDIO_DISABLE=1 to the file /etc/conf.d/alsasound

Personally, though, I prefer not to do this as I want to control the PulseAudio channels via the KMix mixer. Try running two or more audio/video apps simultaneously and you’ll see what I mean – it’s useful! For example, I can control the volume of various applications separately (handy when you want to check something or are using Skype), as illustrated by the picture below:

KMix showing PulseAudio playback streams tab

KMix showing PulseAudio playback streams tab

 

and I run ALSA Mixer separately to tweak the underlying ALSA channels. Using Yakuake (or Guake in GNOME) is quite a good way to run ALSA Mixer in a console: it is quick and easy to pop-up a window to launch ALSA Mixer, and ALSA Mixer is displayed in colour at nearly the width of the desktop.

 

Launch ALSA Mixer GUI from an icon on the Panel

First, use your package manager to install the package alsamixergui. It’s a GUI equivalent of the console ALSA Mixer, but with a few less options.

Once you install it, you should find ALSA Mixer GUI in your desktop environment menu (e.g. Kickoff > Applications > Multimedia > ALSA Mixer GUI). By default this will show the PulseAudio channels, so use the menu editor (e.g. right-click on Kickoff and select Menu Editor) to change the command to the following if your sound card is Card 0:

alsamixergui -c 0

Once you have done this, save the new menu entry, log out and log in again, and when you launch ALSA Mixer GUI from the menu a window similar to the following will pop-up:

ALSA Mixer GUI

ALSA Mixer GUI

 

To put an icon on the Panel in order to make it even easier to launch ALSA Mixer GUI, just drag the icon from the menu to the Panel and it will be copied to the Panel. Simple as that.

 

Launch ALSA Mixer in a Konsole docked in the System Tray

You can do this using KDocker, which works in KDE, GNOME, Xfce and other desktop environments.

For KDE, create the following Desktop Configuration File Konsole-alsamixer.desktop (or whatever name you want) and put it in the directory ~/.kde4/Autostart/

[Desktop Entry]
Comment[en_GB]=Console (docked) running ALSA Mixer
Comment=Console (docked) running ALSA Mixer
Exec=kdocker konsole -e alsamixer -c 0
GenericName[en_GB]=Dock Konsole running ALSA Mixer in the System Tray
GenericName=Dock Konsole running ALSA Mixer in the System Tray
Icon=kmix
MimeType=
Name[en_GB]=Konsole (Docked)
Name=Konsole (Docked)
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

KDE System Tray showing Konsole docked using KDocker

KDE System Tray showing Konsole docked using KDocker

Clicking on the docked Konsole icon in the System Tray will pop-up a Konsole window with the familiar ALSA Mixer running in it, as shown in the fourth picture above. Clicking on the icon again will minimise the Konsole to the System Tray.

 

Launch ALSA Mixer in a Konsole from an icon on the Desktop

For KDE, create the following Desktop Configuration File Konsole-alsamixer.desktop (or whatever name you want) and put it in the directory ~/Desktop/

[Desktop Entry]
Comment[en_GB]=Console running ALSA Mixer
Comment=Console running ALSA Mixer
Exec=konsole -e alsamixer -c 0
GenericName[en_GB]=Konsole running ALSA Mixer
GenericName=Konsole running ALSA Mixer
Icon=kmix
MimeType=
Name[en_GB]=Konsole
Name=Konsole
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DBUS-ServiceName=
X-DBUS-StartupType=
X-KDE-SubstituteUID=false
X-KDE-Username=

You can change the icon displayed on the Desktop either by right-clicking on the icon on the Desktop and selecting Properties or by editing the file directly. For example, I specified Icon=/usr/share/icons/mono/scalable/apps/kmix.svgz which looks rather retro and I think suits the unsophisticated looks of ALSA Mixer.

 

Summary

I have not covered all the options for making it easy to display ALSA channels as well as PulseAudio channels, but hopefully one of the above methods will suit your needs or will spur you to experiment.

A fast and easy-to-use scanner of IP addresses and ports

This week I’m working in offices with a local network that uses static IP addressing. Believe it or not, it seems the IT department does not keep a list of configured IP addresses, and sometimes inadvertently configure devices to have the same IP address.

A couple of days ago I was printing quite happily to a networked printer from my laptop in the morning but, when I got back from lunch, found that I couldn’t print any more. It transpired that someone had allocated the IP address of my laptop to a new plotter in my absence. What to do if the organisation has no central list of configured IP addresses? There are too many devices on the local network to check them manually, and I do not have access to them anyway.

So I installed Angry IP Scanner (a.k.a. ipscan), an easy-to-use scanner of IP addresses and ports, and use it to find an IP address that is currently unused on the network.

I wanted to install ipscan by using Gentoo’s package manager Portage. There is no ebuild for it in the Portage main tree, but a quick search of the Web told me that there is an ebuild in the floppym overlay (http://gpo.zugaina.org/Overlays/floppym/net-analyzer/ipscan). Rather than add the floppym overlay, I decided to install the package using a local overlay:

1. I downloaded the ebuild:

wget http://gpo.zugaina.org/AJAX/Ebuild/2251131/View --output-document=/home/fitzcarraldo/Desktop/ipscan-3.0_beta4.ebuild

The ebuild contents are as follows:

# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=3

inherit java-pkg-2

DESCRIPTION="Angry IP - The fast and friendly network scanner"
HOMEPAGE="http://www.angryip.org"

MY_PV=${PV/_/-}
SRC_BASE="mirror://sourceforge/${PN}/${PN}${PV:0:1}-binary/${MY_PV}"
SRC_URI="amd64? ( ${SRC_BASE}/${PN}-linux64-${MY_PV}.jar )
x86? ( ${SRC_BASE}/${PN}-linux-${MY_PV}.jar )"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=""
RDEPEND=">=virtual/jre-1.6.0"

INSTALL_DIR=/opt/AngryIP

S=${WORKDIR}

src_unpack() {
:
}

src_install() {
local jarname
use amd64 && jarname="${PN}-linux64-${MY_PV}.jar"
use x86 && jarname="${PN}-linux-${MY_PV}.jar"
java-pkg_jarinto "${INSTALL_DIR}"
java-pkg_newjar "${DISTDIR}/${jarname}"
java-pkg_dolauncher
}

2. I synchronised the Portage main tree’s ebuilds on my PC with those in the repositories:

# emerge --sync

3. I made sure that /etc/make.conf has the following lines at the end of the file:

PORTDIR_OVERLAY="${PORTDIR_OVERLAY} /usr/local/portage/"
ACCEPT_LICENSE="*"

4. I created the required directories in the local overlay:

# mkdir -p /usr/local/portage/net-analyzer/ipscan

5. I made sure Portage would not nag me about a missing name for my local overlay:

# mkdir /usr/local/portage/profiles
# echo "local_overlay" > /usr/local/portage/profiles/repo_name

6. I copied the ipscan ebuild into the relevant directory in the local overlay:

# cd /usr/local/portage/net-analyzer/ipscan
# cp /home/fitzcarraldo/Desktop/ipscan-3.0_beta4.ebuild .

7. I generated the manifest for the package:

# ebuild ipscan-3.0_beta4.ebuild manifest

8. I merged the package:

# emerge -1v ipscan

9. I downloaded a 64×64 pixel PNG image of the Angry IP Scanner logo from http://www.angryip.org/icon.png. Then I right-clicked on Kickoff, selected Menu Editor and added an entry for Angry IP Scanner under Applications | System, although I can also launch ipscan from the command line if I want:

$ ipscan

To find an unused IP address on the local network which I can allocate to my laptop whilst I’m working in this office, I launch ipscan and enter the start and end IP addresses of the range I wish to check, and click on Start. The application quickly searches through the IP addresses in that range and lists which are in use and which are not. It’s as simple as that. I then use Network Management to edit the connection and enter the static IP address.

Note that Angry IP Scanner will not detect a live IP address if the device is behind a properly-configured firewall. See the Angry IP Scanner Web site’s FAQ and Documentation pages for further details.

Automounting a NTFS partition or drive when Linux boots

So you have a NTFS partition on your hard drive, or perhaps a separate NTFS hard drive or even an external USB NTFS hard drive? And you want to mount the NTFS partition or NTFS drive automatically when Linux boots? In this post I explain how to do this, and also take into account removable drives.

Open a Terminal window, enter the command su and login as the root user:

$ su
Password: <--- type the root user's password here and hit Enter
#

Then use the blkid command to see what device your NTFS drive is seen as:

# blkid
/dev/sda1: LABEL="PQSERVICE" UUID="0E4E-05CE" TYPE="vfat"
/dev/sda2: LABEL="ACER" UUID="320D-180E" TYPE="vfat"
/dev/sda3: UUID="6922fb8c-6ba1-4657-97a9-a640eb8e6537" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: UUID="e19b8c79-b65e-46bf-9273-abd228d7eec2" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda6: UUID="2322ac6a-3f45-451a-a57a-a88f63d41e8b" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: TYPE="swap" UUID="f6c9d273-f339-4d21-be63-ca64bcb88534"
/dev/sdb1: UUID="9884B0A684B08870" LABEL="SEA_DISC" TYPE="ntfs"
/dev/sdc1: UUID="E8E8ED01E8ECCEBE" LABEL="IOMEGA_HDD" TYPE="ntfs"
/dev/sdd1: LABEL="IHP100" UUID="1B05-1B41" TYPE="vfat"

Notice that my two NTFS drives SEA_DISC and IOMEGA_HDD are devices /dev/sdb1 and /dev/sdc1 respectively.

Let’s say that I want my NTFS drive SEA_DISC (/dev/sdb1) to be mounted automatically upon boot. Type the following commands into your open Terminal window (substituting, of course, the drive label for yours):

# mkdir /media/SEA_DISC  <--- This creates a mount point called "SEA_DISC" for your drive.
# locale -a  <--- This lists the locales (countries and languages) currently configured on your PC
# nano /etc/fstab  <--- This runs the text editor Nano to open the fstab file

(Nano is an easy-to-use text editor that does not need a GUI to run. You’ll see the commands it accepts listed along the bottom of the Terminal window.)

So I would add the following line to the end of my fstab file:

/dev/sdb1 /media/SEA_DISC ntfs-3g defaults 0 0

If you use a language that uses diacritics — let’s assume you use French, for the sake of argument — and you have that locale configured on your PC (as shown above, enter the command locale -a to find out what locales are configured on your PC), then you’ll want to be able to save file names with diacritics. In that case, you can add the locale to the new fstab command like so:

/dev/sdb1 /media/SEA_DISC ntfs-3g defaults,locale=fr_FR.utf-8 0 0

(If the output of the locale -a command earlier was fr_FR.UTF-8 then I would type fr_FR.UTF-8, but if it was fr_FR.utf-8 then I would type fr_FR.utf-8)

Reboot and you’ll find that your NTFS drive is automatically mounted.

Now, notice something called a ‘UUID’ in the output from the blkid command I posted above. UUID stands for ‘Universally Unique Identifier’. If your NTFS drives are external and connected via USB, and you sometimes plug USB pen drives or other hard drives into your PC, you may find (just like under Windows) that your NTFS drive is no longer seen as the same device (e.g. in my case no longer /dev/sdb1). However the UUID should stay the same. So I could refer to the drive by its UUID instead in my fstab file, like so:

UUID=9884B0A684B08870 /media/SEA_DISC ntfs-3g defaults 0 0

or, e.g.

UUID=9884B0A684B08870 /media/SEA_DISC ntfs-3g defaults,locale=fr_FR.utf-8 0 0

To summarise, here’s what my original /etc/fstab file looked like:

UUID=2322ac6a-3f45-451a-a57a-a88f63d41e8b /                       ext3    user_xattr,commit=60,noatime,nodiratime      1 1
UUID=e19b8c79-b65e-46bf-9273-abd228d7eec2 /home                   ext3    user_xattr,commit=60,noatime,nodiratime      1 2
UUID=6922fb8c-6ba1-4657-97a9-a640eb8e6537 /boot                   ext3    user_xattr,commit=60,noatime,nodiratime      1 2
/dev/shm                                  /dev/shm                tmpfs   defaults                                     0 0
UUID=f6c9d273-f339-4d21-be63-ca64bcb88534 swap                    swap    defaults                                     0 0

and here’s what it would look like after my edit (this time with the locale en_GB.utf-8 as an example):

UUID=2322ac6a-3f45-451a-a57a-a88f63d41e8b /                       ext3    user_xattr,commit=60,noatime,nodiratime      1 1
UUID=e19b8c79-b65e-46bf-9273-abd228d7eec2 /home                   ext3    user_xattr,commit=60,noatime,nodiratime      1 2
UUID=6922fb8c-6ba1-4657-97a9-a640eb8e6537 /boot                   ext3    user_xattr,commit=60,noatime,nodiratime      1 2
/dev/shm                                  /dev/shm                tmpfs   defaults                                     0 0
UUID=f6c9d273-f339-4d21-be63-ca64bcb88534 swap                    swap    defaults                                     0 0
UUID=9884B0A684B08870                     /media/SEA_DISC         ntfs-3g defaults,locale=en_GB.utf-8                  0 0

Here’s a good, easy-to-understand guide to fstab: How to edit and understand /etc/fstab.

Follow

Get every new post delivered to your Inbox.

Join 26 other followers