Sunday, September 19, 2010

How to Properly Delete a Drive

Shred is a Unix command that can be used to securely delete files and devices so that they can be recovered only with great difficulty with specialized hardware, if at all1. It is a part of GNU Core Utilities.

Erasing a file usually only erases the file system entry and keeps the content of the file intact. This frequently allows the file to be recovered using commonly available software. Even if the file is overwritten, residual magnetic fields may allow data recovery using specialist hardware equipment.

To prevent this, shred overwrites the file multiple times using patterns chosen to maximize destruction of the residual data. The articles data erasure and data remanence have additional information.
Source: Wikipedia

To use shred in a terminal type:
sudo shred -vfz -n 3 /path to drive

This command is dangerous as it makes your files unrecoverable. Make sure you know what you are doing.

The -vfz part:
v, --verbose show progress
f, --forces change permissions to allow writing if necessary
z, adds a final overwrite with zeros to hide shredding

The -n 3 part:
Overwrite the disk 3 times, the default is 3
You can change the number depending on how thorough you want to delete your data. The more overwrites the longer the process. If you're really paranoid 10 will shred it for sure plus a couple more times.

The /path to drive is the most important. Make sure you have the correct path to your drive.

To list all drives currently connected to your PC in a terminal type:
sudo fdisk -l

Saturday, September 4, 2010

Thunar Dropbox

Thunar Dropbox is a plugin that adds context-menu items from dropbox into the Thunar file manager.



You can find a installation .deb on maato's softwarebakery site.
http://www.softwarebakery.com/maato/thunar-dropbox.html

For help installing Dropbox in xfce read my guide.

Friday, September 3, 2010

Add A User To A Group

In a terminal with root/super user privileges:

adduser username group

For example I wanted to add myself to the groups lp sys & lpadmin to remove a old HP print driver I had installed.

red@red-desktop:~$ sudo adduser red lp
Adding user `red' to group `lp' ...
Adding user red to group lp
Done.
red@red-desktop:~$ sudo adduser red sys
Adding user `red' to group `sys' ...
Adding user red to group sys
Done.
red@red-desktop:~$ sudo adduser red lpadmin
Adding user `red' to group `lpadmin' ...
Adding user red to group lpadmin
Done.

Thursday, August 26, 2010

Disbale Zoom in Iceweasel/Firefox

To access Iceweasel/Firefox's configuration settings, type about:config into the Awesome Bar (URL).

In about:config change:
zoom.maxPercent : 100
zoom.minPercent : 100
toolkit.zoomManager.zoomValues : 1

The Original Values are:
zoom.maxPercent : 300
zoom.minPercent : 30
toolkit.zoomManager.zoomValues : .3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3
In case you want to turn zoom back on.

Tuesday, August 24, 2010

Fix Glipper Startup Bug

Glipper is clipboardmanager for GNOME. I use it extensively when writing. The only problem is that there is a bug that crashes Glipper when loading the GNOME desktop.

Glipper starts before a service it needs, resulting in this error message:
The panel encountered a problem while loading OAFIID:Glipper....

By adding a delay to Glipper at startup we can allow all need components to load before Glipper.

in a terminal type:
sudo gedit /usr/lib/glipper/glipper

add these two lines at the top of the file to delay glipper from loading:
import time
time.sleep(8)
- if your computer is older you might have to increase the (8) to a larger number.

Your file should look very similar to this:
#!/usr/bin/env python
# Glipper - Clipboardmanager for GNOME
# Copyright (C) 2007 Glipper Team
# bla bla bla
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
import time
time.sleep(8) 
import gobject
gobject.threads_init()
import gtk, gnomeapplet, gnome
import getopt, sys
from os.path import *

Monday, August 23, 2010

Install Skype in 64-Bit Debian Squeeze

In a terminal type:
install ia32-libs ia32-libs-gtk libqt4-core libqt4-gui
wget -O skype-install.deb http://www.skype.com/go/getskype-linux-beta-ubuntu-64
- This will install the 32-bit compatibility dependencies, download the Skype client

then:
sudo dpkg -i skype-install.deb
- this will install Skype

There is a know issue with Pulse Audio libraries crashing Skype in Debian Squeeze, use this work around:

In a terminal type:
sudo chmod a-r /usr/lib32/libpulse{-simple.so.0.0.2,.so.0.8.0,common-0.9.15.so}

Sunday, August 22, 2010

Generate an xorg.conf file

In order to generate xorg.conf you need to switch to a virtual console using the key combination CTRL + ALT + F1

Now execute the following commands:
sudo service gdm stop
- This command will stop the X.

sudo Xorg -configure
- this will generate the xorg.conf file in your home folder (the the proper location)

sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
- move and rename the newly created xorg file to the correct location

sudo reboot
- to reboot the machine, and allow the changes to take effect.