Thursday, May 29, 2008

SliTak and Damn Small Linux

Using Virtualbox, I've started playing around with the two mini-distributions of Linux: SliTak and Damn Small Linux (and I'm looking forward to playing around with more). Overall I'm really impressed with these two distributions! Here are my first impressions of how they compare.

Damn Small Linux (DSL)

I've been using this one for a while on an old 400MHz machine with 64mb of RAM. Its only a 50mb distribution that is very full-featured, including most everything you would expect from a Desktop distro (wordprocessor, browser, music player, etc). You can also install any number of apps through the MyDSL Browser. The developers of this distribution are constantly improving it, releasing new beta versions almost every month.

The target audience seems to be older, slower computers. I thought, before trying SliTak, that the reason that a lot of the software on this distribution is dated is because it is less bloated, less resource intensive, and functions better on old hardware. There is probably some truth to this. For example, the reason this distrubution uses the 2.4 linux kernel and not the 2.6 kernel is because the 2.6 kernel drops support for certain legacy hardware that DSL would be perfect for.But I'm not so sure anymore about the bloat thing (and I wonder about the resource intensive thing). The reason for this is because I've seen the power of SliTak, which I'll turn to now.

SliTak

This new distribution weighs in at 1/2 the size of DSL - a mere 25mb! I tried the most recent cooking version, and it incorporates a LOT! I'm very impressed. It includes the newest software--including, for example, the 2.6 Linux kernel and Firefox 3 beta. Its got a very slick modern user interface that makes DSL look dated and clunky by comparison. In fact, I'd go so far as to say that this well integrated system is damn sexy! That said, there are a couple of things that could improve my experience:
  1. It needs a wordprocessor - it doesn't ship with one by default (I think Ted would be an excellent choice).
  2. The stable version lacks some important key features: like support for the Dvorak keymapping and the ability to easily swith between keymappings.
  3. The beta version is somewhat buggy (the Dvorak keymap is wrong).
  4. I'm not sure how the username/password thing is supposed to work on this distribution. Can I only be "hacker"? Can I set my own password? I'm somewhat confused, and this is important, because when I drop to the command line, I need to know these things to execute certain commands.
  5. Although it is better in the beta, still much of the documentation appears to only be in French.
Nonetheless, these minor shortcomings are fairly trivial compared to the amazing things already been accomplished by this tiny distribution. I'll keep a close eye on its development!

Technorati Tags: , ,

Wednesday, May 28, 2008

How to incorporate WordFlashReader into your Ubuntu Main Menus

Ok, you've just installed WordFlashReader on your Ubuntu machine. And now you want an easy way to access it. Doing the following three things will make it very easily accessible:

  1. Aliasing it in your .bashrc
alias wfr='[installation path]/wordflashreader.linux.bin'
  1. Launch it directly from your browser using Launchy (firefox addon). Insructions are here.
  2. Add it to your Ubuntu main menus.
In order to do this, go to System->Preferences->Main Menu. Choose which category you wish to add you menu item to. I chose the 'Office' category. Click 'New Item' on the right side of the window.

Name: WordFlashReader
Command: [browse to the place where you installed the program and select wordflashreader.linux.bin]

Next, click the button on the upper left and corner of the Create Lancher window. Again, browse to the WordFlashReader installation path and click 'Open'. Two icons will show up. Choose WFReader.ico and hit ok. Hit ok one more time and the next time you open your Ubuntu menu it should be there. Cheers!

Technorati Tags:

Sunday, May 25, 2008

Installing XP on SATA Harddrives

XP, even XP sp3 does not include support for SATA hard drives. Here is a great guide to getting it working.

Saturday, May 24, 2008

Firefox crashing on Youtube in Ubuntu Hardy

If you've been surfing Youtube a lot using the default configuration of Ubuntu Hardy, chances are you've experienced an unusual amount of crashing. An absurd amount, in fact. It has been driving me crazy! I've finally been able to cobble together a solution from suggestions here and there on various forums (with special thanks to the works of Conn in these forums):

  • Download the new Flash 10 beta player from here to your home directory and unzip it.
  • Remove 'flashplugin-nonfree' and 'libflashsupport' using Synaptic
  • Using the command line: mkdir ~/.mozilla/plugins/ (if it is not already there)
  • cp ~/install_flash_player_10_linux/libflashplayer.so ~/.mozilla/plugins/libflashplayer.so
  • Using Synaptic, make sure you have the latest of the following installed: 'alsa-base', 'pulseaudio', and 'libasound2-plugins'
  • Then create and edit ~/.asoundrc and add:
pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

That should do it! Restart your browser and see if you still get all those crashes!
Technorati Tags: , ,

Tuesday, May 20, 2008

Conky and my .conkyrc file (on debian and fluxbox)

To install conky:

sudo aptitude install conky

Then create and modify ~/.conkyrc. Here is what I used:

-----
# set to yes if you want Conky to be forked in the background
background no

cpu_avg_samples 2
net_avg_samples 2

out_to_console no

# Use Xft?
use_xft yes

# Xft font when Xft is enabled
xftfont Bitstream Vera Sans Mono:size=8

own_window_transparent no
own_window_colour hotpink
# Text alpha when using Xft
xftalpha 0.8

on_bottom yes

# mail spool
mail_spool $MAIL

# Update interval in seconds
update_interval 1
# Create own window instead of using desktop (required in nautilus)
own_window no

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer no

# Minimum size of text area
#minimum_size 280 5
#maximum_width 150

# Draw shades?
draw_shades no

# Draw outlines?
draw_outline no

# Draw borders around text
draw_borders no

# Stippled borders?
stippled_borders 10

# border margins
border_margin 4

# border width
border_width 1

# Default colors and also border colors
default_color white
default_shade_color white
default_outline_color white

# Text alignment, other possible values are commented
#alignment top_left
#minimum_size 10 10
gap_x 13
gap_y 13
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text

# Add spaces to keep things from moving about? This only affects certain objects.
use_spacer no

# Subtract file system buffers from used memory?
no_buffers yes

# set to yes if you want all text to be in uppercase
uppercase no

TEXT
$nodename - $sysname $kernel on $machine
$stippled_hr
${color lightgrey}Uptime:$color $uptime ${color lightgrey}- Load:$color $loadavg
${color lightgrey}CPU Usage:${color #5000a0} ${cpu}% ${cpubar}
${color black}${cpugraph 000000 5000a0}
${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% $membar
${color lightgrey}Swap Usage:$color $swap/$swapmax - $swapperc% ${swapbar}
${color lightgrey}Processes:$color $processes ${color grey}Running:$color $running_processes
$color$stippled_hr
${color lightgrey}Networking:
Down:${color #8844ee} ${downspeed eth0} k/s${color lightgrey} ${offset 70}Up:${color #22ccff} ${upspeed eth0} k/s
${color black}${downspeedgraph eth0 32,150 ff0000 0000ff} $alignr${color black}${upspeedgraph eth0 32,150 0000ff ff0000}
${color lightgrey}File systems:
/ $color${fs_used /}/${fs_size /} ${fs_bar /}
${color lightgrey}Temperatures:
CPU:$color ${i2c temp 2}C${color grey} - MB:$color ${i2c temp 1}C
${font Dungeon:style=Bold:pixelsize=12}${color #88aadd}MPD: ${alignc}$mpd_artist - $mpd_title
${color #88aadd}$mpd_bar
${color #88aadd}${alignc}$mpd_status
${color}Name PID CPU% MEM%
${color #ddaa00} ${top name 1} ${top pid 1} ${top cpu 1} ${top mem 1}
${color lightgrey} ${top name 2} ${top pid 2} ${top cpu 2} ${top mem 2}
${color lightgrey} ${top name 3} ${top pid 3} ${top cpu 3} ${top mem 3}
${color}Mem usage
${color #ddaa00} ${top_mem name 1} ${top_mem pid 1} ${top_mem cpu 1} ${top_mem mem 1}
${color lightgrey} ${top_mem name 2} ${top_mem pid 2} ${top_mem cpu 2} ${top_mem mem 2}
${color lightgrey} ${top_mem name 3} ${top_mem pid 3} ${top_mem cpu 3} ${top_mem mem 3}

-----

Finally, add 'conky &' before 'exec /usr/bin/fluxbox' in ~/.fluxbox/startup

Installing Virtualbox's Guest Additions on Debian and getting shared folders to work

Follow these steps to install the Guest Additions on your Debian virtual machine:

1. Login as root;
2. Update your APT database with apt-get update;
3. Install the latest security updates with apt-get upgrade;
4. Install required packages with apt-get install build-essential module-assistant;
5. Configure your system for building kernel modules by running m-a prepare;
6. Click on Install Guest Additions… from the Devices menu, then run mount /media/cdrom.
7. Run sh /media/cdrom/VBoxLinuxAdditions.run, and follow the instructions on screen.

Once you install and reboot, then you can add shared folders from the device menu, and mount it with the following command:

# mount.vboxsf [the_name_of_the_shared_folder] /media/[name_of_mount_point]

Minimal Debian install with Fluxbox

Basic Installation

Install only the base system (w/ networking) of the latest Debian (I don't select any of the package bundles when given the option).

$ su -
$ nano /etc/apt/sources.list

Comment out the line with the CD in it with a #.

Add these lines (adjust for the version of debian you're installing):

deb http://ftp.debian.org/debian etch main contrib non-free
deb-src http://ftp.debian.org/debian etch main contrib non-free

Now is generally a good time to update your system with any security patches:

# apt-get update
# apt-get upgrade

Installing sudo

I have gotten really used to using sudo, so the first thing I do is:

$ su -
# aptitude install sudo

Then I edit /etc/sudoers
# export VISUAL="nano"
# visudo

Add the following line:

username ALL=(ALL) ALL

(Note ganked from somewhere: So the first part is the user, the second is the terminal from where the user can use sudo, the third is as which user he may act, and the last one, is which commands he may run.)

Installing X and Fluxbox

$ sudo aptitude install fluxbox
$ sudo aptitude install xserver-xorg
$ sudo aptitude install xdm

To run Fluxbox from xdm you should create a .xsession file in your home_directory. Insert the line:

exec startfluxbox

$ sudo reboot

Installing Xterm

sudo aptitude install xterm

Installing other Useful Apps

Install your preferred editor, browser and any other programs you want:

sudo aptitude install geany [full featured editor, though there are lighter ones out there]
sudo aptitude install firefox
sudo aptitude install gentoo [useful graphical file manager]

Other Tweaks

One program I generally like to install is Conky, which gives me all the stats about my system resources and whatnot. Here's the installation I've use. Recently, though, I've had a problem with it flickering on my screen (and I've tried the suggested fixes), so I've started using the curses based Saidar.

$ sudo aptitude install saidar

Next, in order to easily switch between keymaps edit ~/.bashrc by adding

alias aoeu="setxkbmap us"
alias asdf="setxkbmap dvorak"
Technorati Tags: ,

Monday, May 19, 2008

Backup and Restore VirtualBox .vdi files

The command is this:

VBoxManage clonevdi /home/winship/.VirtualBox/VDI/WinXP.vdi /media/storage2/tmp/WinXP.vdi

To restore it, go to File->Virtual Disk Manager->Add and select your backup .vdi file

SSH, FTP, and SFTP in Nautilus

In the Location Bar, enter the following:

For SSH, use:

ssh://username@ssh.server.com

For FTP, use:

ftp://username@ftp.server.com

For SFTP, use:

sftp://username@sftp.server.com

Limit login to certain users over ssh

The default installation of ssh in ubuntu allows any user to login to the system over ssh. If you wish to restrict this, here is how:

Modify /etc/ssh/sshd_config. If you wished to allow only the users jhendrix, and svaughan to login via ssh, you could use the AllowUsers directive in your /etc/ssh/sshd_config file as such:

AllowUsers jhendrix svaughan

If you didn't mind all users logging in via ssh, with the exception of the users wgates, or sballmer then you could add the DenyUsers directive to your /etc/ssh/sshd_config in a similar manner, like this:

DenyUsers wgates sballmer

Of course, restart the server by typing:

sudo /etc/init.d/ssh restart

Accessing your Ubuntu Box from anywhere using vsftpd and ssl encryption

If you don't have a static ip, register an account with DynDNS and follow the tutorial (you can download ddclient through synaptic). Note: enter 'web' for 'Interface used...'.

Now we need to make sure ddclient sends the information in an encrypted form. I found these instructions here to be very useful.

Basically, through synaptic I installed ssh and libio-socket-ssl-perl.

The I edited /etc/ddclient.conf so that the line:

use=if, if=web

looks like this:

use=web, web=checkip.dyndns.com/, web-skip='IP Address'

And also, right under the comments I added:

ssl=yes
daemon=300

Then I checked to make sure ddclient was running as a deamon by opening /etc/default/ddclient and making sure:

run_daemon="true"

Start it up:

sudo /etc/init.d/ddclient restart

If you have a router, you may need to do port forwarding.

-------
Now its time to get vsftpd working. Install it through synaptic. Then configure /etc/vsftpd.conf. A great tutorial on how to do this is here. This is how mine looks:

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
# Filezilla uses port 21 if you don't set any port
# in Servertype "FTPES - FTP over explicit TLS/SSL"
# Port 990 is the default used for FTPS protocol.
# Uncomment it if you want/have to use port 990.
#listen_port=990
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
#xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
ftpd_banner=My SFTP server, bitches! Login if you can....
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
chroot_local_user=YES
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
#
# Debian customization
#
# Some of vsftpd's settings don't fit the Debian filesystem layout by
# default. These settings are more Debian-friendly.
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

------------

sudo /etc/init.d/vsftpd start

Thursday, May 15, 2008

WordFlashReader 1.0rc1 Released!

I've uploaded the first release candidate for the 1.0 version. Try it out, its the future of on-screen computer reading (or so I say)! After the 1.0 release, I plan on slowly porting it to a Gtk+ interface so It doesn't look as crappy on Linux.

Monday, May 05, 2008

Bill Ayers - In His Own Words

Although I'm not sure how this is consistent with many of his previous actions, here's what he has to say about terrorism:

Some readers apparently responded to her piece, published on the same day as the vicious terrorist attacks in New York and Washington, by associating my book with them. This is absurd. My memoir is from start to finish a condemnation of terrorism, of the indiscriminate murder of human beings, whether driven by fanaticism or official policy. It begins literally in the shadow of Hiroshima and comes of age in the killing fields of Southeast Asia. My book criticizes the American obsession with a clean and distanced violence, and the culture of thoughtlessness and carelessness that results from it. We are now witnessing crimes against humanity in our own land on an unthinkable scale, and I fear that we might soon see innocent people in other parts of the world as well as in the U.S. dying and suffering in response.

The rest of his blog post can be found here.
Technorati Tags: ,