Tony Narlock Living life in the cloud

28Mar/100

5 simple tips for KDE 4

These are the first things I do after get a fresh KDE install.

Double-click to open applications

Make applications on desktop and Dolphin open with double-click.

Open up Dolphin. Go to Settings. Configure Dolphin.

Go to Navtigation pane. Double-click to open. Apply. OK.

Change your background

Right-click on the desktop and go to Desktop Settings.

Pick a fresh desktop theme

In KDE 4.3 you right click the desktop, go to Desktop Settings.

In KDE 4.4 System Settings -> Appearance -> Style -> Workspace.

As a ludite. KDE 3.5's interface is my favorite.

If that's not your cup of tea, you can download your own, sorting the online KDE library by rating and popularity. Surprisingly, Klassik isn't very popular.

Launch Chrome in privacy mode by default

Launching Google Chrome or Chromium in incognito mode is great for privacy.

Right-click an icon on your desktop or taskbar. Go to Icon Settings. Go to the Application tab. Under Command, append -incognito.

Use huge icons

Make huge icons on the desktop for your favorite apps.

I find this hilarious yet useful.

Go to the KDE start menu, search for your favorite apps and add them to desktop.

You will probably want to use Large, transparent png icons for Chrome, Chromium and Firefox.

27Mar/100

Privacy tips for computer data and storage

Computer's are akin to personal black boxes. It records things without you consenting or knowing. A common folk would think they deleted a file, when it's merely be cleared from sight. Files aren't gone until they're overwritten. What's more, applications leave databases, caches, and other logfiles which are impossible to keep track of.

You can help protect and maintain privacy of your data using various methods:

  1. Avoid creation of extraneous logs - Use privacy mode in your browsers, avoid making logs in the first place. Watch out, vendors are always finding new ways to sneak spyware into your PC.
  2. Erase files securely - Overwrite data with scrambled junk, then delete.
  3. Overwrite empty space - Inflate a file with zeroes or random junk to swallow up any remaining data.
  4. Use light encryption for your Hard Disk or User folder - Using crypto will offer piece of mind if a laptop is lost or stolen.

Adobe Flash (cross-platform)

(Formerly known as Macromedia Flash.)

Delete flash cookies (Locally stored objects)

Flash settings manager will allow you to delete flash cookies.

Mozilla Firefox (cross-platform)

Grab, Flashblock and BetterPrivacy.

Locally Stored Objects

Get BetterPrivacy.

Flash junk

Grab Flashblock.

Javascript

Grab NoScript.

Advertisements

Grab Adblock Plus.

Launch Firefox by Privacy Mode by default

Launch Firefox.

In the location bar, type about:config.

It will "void your warranty", click OK.

In "Filter", type "private" and hit enter. This will help filter all those config variables.

Change browser.privatebrowsing.autostart to true.

Change browser.privatebrowsing.dont_prompt_on_enter to true.

Microsoft Windows

Internet Explorer 8 in Privacy Mode

Right-click an Internet Explorer Icon. Properties.  Shortcut.  After target, add " -private". Apply, OK. Click the icon, IE should launch in InPrivate mode.

By right clicking the IE icon on your taskbar, you'll also have the "task" of starting IE in inprivate mode. See this also.

Use Chrome in Incognito mode.

Go into your start menu, search "Chrome". Google Chrome will appear, right click. Go to properties, append (add to the end) -incognito.

Click the wrench icon, Go to Options. Click the "Privacy tab", Uncheck everything under privacy.

Your shortcut will look something like: C:\Users\<Your username>\AppData\Local\Google\Chrome\Application\chrome.exe -incognito

Pin this new shortcut to your taskbar.

Also consider using a privacy-friendly version of Chromium, SRWare Iron has been getting a lot of attention lately.

Shred documents

Download Eraser. Install it. You will now be able to right-click your trash bin to secure delete those files.

Download Ccleaner, go to "Options", Go to "Settings". Change Secure Deletion to "Secure file deletion (Slower)" and choose DOD 5220.22-M (3 passes). Check everything except "Wipe free space", even your form histories, close your browsers, Analyze. Run cleaner.

Wipe your free space

In CCleaner,  Every week or so, check "Wipe free space" then Run Cleaner.

Encrypt your Hard Drive

In 10+ useful applications for Windows 7 I recommended Truecrypt as a free solution for HD encryption. This How-to can help.  With truecrypt you can create containers for your documents and even your whole OS. If you keep a laptop with anything personal or professional on your computer make this a common practice.

Mac OS X

Chrome and Firefox

Use the tips above the Windows section. Firefox will let you go into about:config and change those variables. CoolGeex.com has a helpful post about making an incognito shortcut for Google Chrome.

Delete Locally Stored Objects

Download, install (Drag to Applications) and run Flush.app.

Encrypt your HD

Clear at least half of your hard drive space.

Go into System Preferences. Click Security. Enable Filevault.

Wait like 10 hours.

Secure delete files

Click a Finder Window.

Click File, click Secure Empty Trash.

Grab Cocktail. Drag it to your Applications folder (install) and open.

In Cocktail Preferences, choose to secure delete those files. Schedule it to run nightly and rotate/erase logs, clear browser caches, etc. If you're not open to shelling over a few cents to protect yourself, you can try Onyx.

Wipe your freespace

Open Disk Utility.

Choose your partition on the left. It may be named Macintosh Hard Drive.

Click the Erase tab.

Use Erase free space and run over it at least once. If you have more time, do more passes.

Linux

Chrome and Firefox

Use the tips above the Windows section. Firefox will let you go into about:config and change those variables.

If you use Google Chrome, open ~/.bashrc and append alias chrome='google-chrome -incognito &'. Run source ~/.profile or source ~/.bashrc. Now chrome will run google-chrome in incognito mode.

Encrypt hard drive

Fedora and Ubuntu all offer options on installation to encrypt your /home/ folder. Be sure to pay attention to your install wizard and encrypt them. Remember your password, the encryption is based upon it.

I don't want to go over encryption via pure command line because there is too much chance you can destroy your data if you make a mistake. If you google an article on this, just be sure to go into /home and copy cp -r /home/yourusername /home/yourusernamebackup so your data doesn't just die.

Secure delete commands

Note: These commands are for experienced Linux users. Don't use these unless you can understand what the commands inside mean, or else it's simply too much risk.

Open your terminal of choice. Open .bashrc vim or nano. vim ~/.bashrc.

Append this to the bottom of your .bashrc:

alias deleteeverything='find . -type f -execdir shred -u '{}' \;'
alias salttheearth='dd if=/dev/zero of=junkfile ; rm junkfile'
alias fogettaboutit='shred -u ~/.bash_history'

Run source ~/.profile or source ~/.bashrc. Here is an overview of these commands:

deleteeverything will shred files cursively then delete them. When you're done with this, type rm -rf because the -u flag in shred won't rm folders. This command works relative to the current directory your in. Thanks opentux from LinuxForums.

salttheearth will erase free space by inflating a gigantic file with /dev/zero to fill up all remaining free space, then delete the file. It takes a while. /dev/random can give you better security. Thanks ssd.eff.org.

fogettaboutit will securely delete your .bash_history. When you're done with this, you can exit your term session.

In combo moves, I like to use salttheearth & fogettaboutit.

Safely parting with your old hard drive

Don't sell people equipment with your hard drive data. Destroy it. Buy a cheap one. Find a computer geek friend to help with the hard drive. Go to best buy with your computer (which has your Windows license on a sticker) and ask them to install a windows from an on-hand OEM disc. You just gave someone a cleaner computer.

  1. Secure delete data - delete everything and fill the disk with 0's. Kill Disk is a solution that lets you put the software onto an ISO or floppy to run at boot. Do at least a single run of random data. The more passes and more randomness, the longer it will take. Theoretically, more randomness and passes is more secure.
  2. Physically destroy it - Get a Torx screw driver set. This will help you unscrew the screws that hold the drive together. Many drives now have multiple levels of wafers. Get a hammer to break them. Sand them. Shatter them into a million pieces. Put orange juice and pancake syrup on them. Get creative, make an art project out of it, put the digital flakes into colored sand-filled bottles and sell them at Sea World. Put them in a dumpster. You are secure my friend.

Overkill

Spybot Resident - Spybot resident prompts you everytime a registry alteration is made. This is annoying and unnecessary unless you know computers well enough to understand the warnings.

Norton and other chunky antiviruses - Norton is notorious with slowing and bogging down computers. In my Top 10 applications for Windows I tip my hat to Nod32 for a light, effective and fast AV solution.

Too much encryption - Unless you're really paranoid, is too painstaking. Many encryption appliances simply use your password as a key to encrypt your user folder. Typical people only need very light encryption. However if you have very important data know that using a portable medium is not a good idea, consider consulting professionals.

Updates

Monday May 17th, 2010 - Added Internet Explorer 8 InPrivate Mode.

26Mar/101

Large transparent PNG icons for Firefox, Chrome and Chromium

It's hard to find these around on the net. So here you go, the big icons in one place.

Large Firefox 3.5 PNG Icon

Large Google Chrome .PNG Icon

Large Chromium .PNG Icon

23Mar/100

Debugging and troubleshooting postfix

Error: Postfix isn't working with mail() on PHP automatically.

Common problem: You have exim or something else running.

Solution: try lsof -i :25. If you intend on using postfix, kill the pid of the app, remove the package of exim or sendmail if you have it installed. See This postfix thread on Ubuntu Forums.


Other issue: Postfix isn't working (miscellaneous)

Solution: tail /var/log/maillog or tail /var/log/mail.err (source)

Error: fatal: open lock file /var/lib/postfix/master.lock: unable to set exclusive lock: Resource temporarily unavailable

You may have another copy of postfix still open. Use lsof -i :25 to track down which process. kill the pid and postfix reload.


Error: postfix set-permissions returns
chown: cannot access `/usr/lib/postfix/dict_cdb.so': No such file or directory.

May be by design, #274108 in ubuntu launchpad says this command doesn't necessarily mean something's wrong.

Helpful resources

Ubuntu handbook page: https://help.ubuntu.com/community/Postfix

17Mar/100

Add your user groups to sudoers file

sudo allows system administrators to delegate authority to other users on a server. In this post, we will show how user groups can sudo.

Sudo (su "do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.

Some users mistakenly attempt to add themselves to the /etc/sudoers file directly. This doesn't work. Use the command visudo.

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

You can have add a user called penguin to users: useradd -G users penguin

Then, you can add penguin to the admin admin group. usermod -a -G admin penguin

Now penguin can sudo.

You can also give users ability to sudo without a password (for cron-type stuff).

Type visudo in terminal.

Uncomment # %sudo ALL=NOPASSWD: ALL by removing the #, or add %sudo ALL=NOPASSWD: ALL

Now add penguin to sudo group.

usermod -a -G sudo penguin

For more information on sudo, you can see the manual pages at man sudo.

10Mar/100

Remove services (mpd) from system startup in Linux

I'm using MPD on Ubuntu and Debian and get annoyed by mpd starting at boot time under root.

Your startup services lie in the /etc/rc.d folder. You will observe that ls -l /etc/rc4.d for instance, will show you these files are weighted to run in order and symlink to their corresponding startup scripts in /etc/init.d.

To disable mpd, for instance, update-rc.d can help:

sudo update-rc.d -f mpd remove

Now you will be able to add mpd to a local user script on startup without having to sudo mpd --kill or sudo killall mpd.

5Mar/100

Troubleshooting locales in the cloud on debian and ubuntu

If you use Amazon EC2 or Rackspace Cloud Servers, you may end up running into this after your create your instance. I often get these on Debian and Ubuntu (since it's debian based also).

lennycloud:~# perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

You're missing locales.

Update your apt database. sudo apt-get update

Download locales. sudo apt-get install locales

Now configure it, and download what locales you need. dpkg-reconfigure locales on Debian. sudo locale-gen en_US.UTF-8 on Ubuntu Hardy Heron 8.04 (Note: on server, you may be logged in as root).

I pick en_US ISO-8859-1, en_US.ISO-8859-15 ISO-8859-15 and en_US.UTF-8 UTF-8.

And that solves it.

Updated April 03, 2010 to include locale-gen.

5Mar/101

Use s3sync.rb + screen to move your files to the cloud

Move to your s3sync dir.

screen ./s3sync.rb -r /home/tony/backups/ backup:backups -v

screen means you will be able to run the command as a screen process. ctrl-d to detach screen, screen -r to resume.

-r means recursive copy.

/home/tony/backups is where cron stores you backupps. You can replace this with whatever dir you want to sync.

backups is the name of the bucket. Do ./s3cmd createbucket to create your bucket

: is a seperator

backups is a prefix for the bucket.

-v means verbose, so you can see the progress in your screen.

If screen quits too fast, the command may not have worked.

If you detached and screen doesn't resume, your job may done, check your s3 to see if files transferred.

Also, make sure you have your s3config.yml file ready, you need to copy your key from your Amazon AWS account.

5Mar/100

Troubleshooting s3sync

Amazon S3 is a superb, cost-effective, scalable storage solution. It's been around for a few years. s3sync.rb is a well-maintained ruby script to backup your important files.

[07:02 AM][root@local ~/.s3conf]# ./s3cmd.rb
/usr/bin/env: ruby: No such file or directory

You don't have ruby installed. Easy.

sudo apt-get install ruby
or
yum install ruby

[07:02 AM][root@local ~/.s3conf]# ./s3cmd.rb
./S3.rb:14:in `require': no such file to load -- openssl (LoadError)
from ./S3.rb:14
from ./s3try.rb:26:in `require'
from ./s3try.rb:26
from ./s3cmd.rb:16:in `require'
from ./s3cmd.rb:16

Missing openssl libraries.

sudo apt-get install libopenssl-ruby