It can be very fast to safely delete a drive using encryption. The idea is basically to encrypt the whole disk and afterwards to overwrite it with zeros. In this article, I use LUKS, which already ships with Ubuntu 14.04. This procedure may be quicker and more reliable than “copy-based” methods if your CPU supports crypto commands.

First, replace all partitions that should be safely deleted with one large unformatted partition. I assume that this partition is called /dev/sda1 . Afterwards, setup LUKS on the unformatted partition. The password may be a really simple one.

sudo cryptsetup -c aes-xts-plain64 -s 512 luksFormat /dev/sda1

Now, open the encrypted volume, entering the same password:

sudo cryptsetup luksOpen /dev/sda1 lukslvm

Afterwards, you start writing zeros into the encrypted partition, which will produce more or less random data on the disk:

sudo dd if=/dev/zero of=/dev/mapper/lukslvm bs=1M

 

The Java plugin for Firefox is activated if Firefox finds a symlink to libnpjp2.so in its plugins folder.

  1. Locate the plugins directory of Firefox. You may either use the per-profile or the global directory. In my case these are
    /usr/lib/firefox/browser/plugins
    /home/roland/.mozilla/firefox/<profile-name>/plugins
  2. Locate the path to your JRE’s browser plugin:
    $ locate libnpjp2.so
    /opt/jdk1.8.0_05/jre/lib/amd64/libnpjp2.so
  3. Remove any existing (links to) Java plugins from the plugins folders.
  4. Create a symbolic link to the plugin:
    cd /usr/lib/firefox/browser/plugins
    sudo ln -s /opt/jdk1.8.0_05/jre/lib/amd64/libnpjp2.so .
  5. Restart Firefox and verify that the plugin is recognized by opening about:plugins .

References

  • [1] Original instructions

I like to have system messages (such as those by apt-get) to be in their original language – English – while the rest of my localization should be for German. In KDE, this can configured in System Settings -> Locale or with

kcmshell4 language

But even after selecting “American English” as my favorite language, the results of apt-get remained in German, probably because these settings only affect KDE applications. Only after changing the LC_MESSAGES locale property to POSIX, these messages appeared in English.

sudo update-locale LC_MESSAGE=POSIX

The changed locale is reflected by the locale command after the next restart:

$ locale
LANG=de_DE.UTF-8
LANGUAGE=de_DE
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="de_DE.UTF-8"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES=POSIX
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LC_ALL=

 

 

Recently, when connecting an external monitor to my laptop, KDE turned off both displays, which sometimes even endured when disconnecting the monitor. Resetting the display configuration on the command line helped: Before plugging in the video cable, I opened a terminal and typed the following command:

xrandr --auto

After both screens had become black, I pressed Enter and the desktop re-appeared on the laptop screen and I could continue configuring with the regular Display Configuration:

kcmshell4 display

 

The standard shortcut for killing the X server is (was) Ctrl-Alt-Backspace, but it has been disabled by default in Ubuntu for a while. However, it can easily re-enabled in the KDE system settings (command: systemsettings) under

Input Devices -> Keyboard -> Tab: Advances -> Checkbox: Key sequence to kill the X server

The touchpad of the Lenovo Y510p laptop has no extra mouse buttons, but only soft-buttons below the surface. With the default settings, Kubuntu 14.04 recognizes a click on a soft-button additionally as move of the cursor, which led to imprecise behavior of the curosr.

KDE uses synaptiks to configure the touchpad. The option AreaBottomEdge can be used to set the y position of the bottom of the touchpad area (see man synpatiks for details).

It is sensible not to change the original synaptiks configuration, but to work with a copy, because the configuration file may be overridden by other tools:

sudo cp /usr/share/X11/xorg.conf.d/50-synaptics.conf \
        /usr/share/X11/xorg.conf.d/51-synaptics-userdefined.conf

In the new file, add the AreaBottomEdge option to the input device with identifier “Default clickpad buttons”. For me, it worked well with an area of 20% for the soft buttons.

Section "InputClass"
#     ...
#     To disable the bottom edge area so the buttons only work as buttons,
#     not for movement, set the AreaBottomEdge
       Option "AreaBottomEdge" "80%"
#     ...
EndSection

The new settings will be read when the X server gets restarted (e.g. by pressing Ctrl-Alt-Backspace, if enabled).

If everything works fine, the new option is reflected in /var/log/Xorg.0.log after the next start of X:

...
[    20.484] (**) Option "AreaBottomEdge" "80%"
[    20.484] (**) Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
...

 

When dd is done with copying data, it prints statistics that show the amount of copied data and the transfer rate such as in the following example:

$ dd if=/dev/zero of=/tmp/fileWithZeros bs=1M count=2
 2+0 records in
 2+0 records out
 2097152 bytes (2,1 MB) copied, 0,00179993 s, 1,2 GB/s

When dd receives the signal USR1 while it is running, it prints its current progress in the same format. For testing, start a process that copies data from /dev/zero to a new file (/tmp/fileWithZeros) indefinitely:

dd if=/dev/zero of=/tmp/fileWithZeros

Afterwards, open second terminal and execute

killall -USR1 dd

In the first terminal, dd prints transfer statistics to standard error. The process can be automatized with the following command (e.g. every 3 seconds)

watch --interval 3 killall -USR1 dd

References

  • [1] Detailed description of dd in Wikipedia
  • [2] Blog article with instructions how to send the USR1 signal to dd

The new file indexing system baloo appears quite unpopular because many users cannot figure out its benefits and see the tremendous amounts of disk space that it uses.

The question of how to stop baloo has already been widely discussed (e.g. on Stackoverflow) and the simplest solution is to open ~/.kde/share/config/baloofilerc and turn Indexing-Enabled=true into Indexing-Enabled=false:

[Basic Settings]
Indexing-Enabled=false

This will take effect on the next restart. If you want to stop baloo immediately, you need to kill its processes baloo_file_cleaner, baloo_file, baloo_file_extr.

Afterwards, the already created index files can be deleted by removing the contents of ~/.local/share/baloo.

Apparently, another method to stop baloo is to exclude the home directory from indexing as described here.

References

  • [1] Discussion and solution ideas on askubuntu.com

In KDE, you can toggle display effects (such as transparency, dynamic preview during window tabbing,…) by pressing Alt+Shift+F12. I actually liked mos t effects, but one annoying thing is that Gwenview turns almost completely transparent, making it hard to recognize anything within the window.

I finally found out how to solve this issue:

  1. Start Gwenview
  2. Right-click title bar (or press Alt+F3)
  3. Select More Actions -> Special Application Settings
  4. In the tab Appearance and Fixes, you can configure the Active Opacity to 100% (totally intransparent) or uncheck the entry (both worked for me).

References

  • [1] OpenSUSE guide to KDE – KDE Workspace