Sunday, January 31, 2010

[BLUG] Fun 4D game to play

If you've ever been interested in the visualization of 4 dimensions,
you might check out the game Adanaxis. Its available in Ubuntu and
probably other distros. It makes aiming and flying in 4 dimensions
rather straight forward. Aiming in the 4th axis feels kinda like
focusing the lens on a camera. I found it to be a nice quick diversion
and a unique game.


--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Thursday, January 14, 2010

[BLUG] Something to keep in mind when using du -b

I use the du command a lot. Usually I use it with just -s and
sometimes with -h, for human readable size information like 100M or
4.3G

Recently, I was checking directory sizes of some home dirs to determine
how to split up a home partition for a new server. I ran du using the
-b option, so that I would get the bytes in full form, 1byte per block.
What I didn't realize before when I read the man page was that when you
use -b instead of --block-size=1, you also get an extra option called
--apparent-size. Now what this does may not be so obvious, but
sometimes you can have files that look like a certain size but take up
more or less space in reality. For instance, if you make a sparse file
like this:

# dd if=/dev/zero of=lookslikebigfile bs=1M count=1 seek=1024

You will make a file that will appear to be 1GB in size, but is actually
only taking up 1MB on the disk.

So I was very confused when I ran du -sb on a directory and got
490837261, but then -sh returned 862M. WTF?

It turns out that this directory had lots of files that were smaller
than the block size of the filesystem, which is the default 4096 bytes
per block.

Here is the difference between the three commands for the same data:

# du -s --block-size=1 dir
903499776 dir
# du -sh dir
862M dir
# du -sb dir
490837261 dir

Its kinda annoying that the -b option adds that --appearent-size
option, but none of the other size display modifying options do (like
-h, -k, and -m). Its probably a performance issue or something.


By the way, you can experiment with this problem on your own by creating
a test directory and then running this command to create a bunch of
under the block size files:

# mkdir test
# cd test
# for i in `seq 1 1000` ; do dd if=/dev/urandom of=$i bs=1 count=900 ; done

So you'd think that 1000 900 byte files would only use 900KB on the
disk, but they actually use 4MB:

# du -sb test
920480 test
# du -sh test
4.0M test

So be careful when using du -b

BTW, 900 bytes is about the same size as a single line email message.
;-)


--
Mark Krenz
Bloomington Linux Users Group
http://www.bloomingtonlinux.org/
_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Tuesday, January 5, 2010

Re: [BLUG] available and wanted equipment

>> If anyone has a spare or old wireless PCMIA card lying around, I would
>> be happy to pick it up from you.  I can't seem to get the built-in
>> wireless working on my laptop so I'm looking for a Linux-friendly card
>> that I could get running a couple of minutes.
>
> If the machine has USB 2.0 ports, you may also be able to use a USB
> wireless card. Note that is *only* if it is USB 2.0, as all the modern
> USB cards I've seen do not work with USB 1.1.


I didn't see the original message but I have a PCMCIA wan card that I
will part with. Send me an email and you can have it.


--
Matt Standish
www.mattstandish.org

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] available and wanted equipment

On Sat, Jan 02, 2010 at 04:36:47PM -0500, Colvard, Christopher James wrote:
> I have a Digital VT510-C2 terminal with keyboard that I'm looking to
> place in a good home. Also available is a non-functional HP desktop if
> anyone wants it for parts.

Man, if I had a place to put it, I would be all over that VT510. I let
my old Beehive dumb terminal go a few years back. The VT510 is the best
a terminal can get, the peak of perfection.

> If anyone has a spare or old wireless PCMIA card lying around, I would
> be happy to pick it up from you. I can't seem to get the built-in
> wireless working on my laptop so I'm looking for a Linux-friendly card
> that I could get running a couple of minutes.

If the machine has USB 2.0 ports, you may also be able to use a USB
wireless card. Note that is *only* if it is USB 2.0, as all the modern
USB cards I've seen do not work with USB 1.1.

Cheers,
Steven Black

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Saturday, January 2, 2010

[BLUG] available and wanted equipment

I have a Digital VT510-C2 terminal with keyboard that I'm looking to
place in a good home. Also available is a non-functional HP desktop if
anyone wants it for parts.

If anyone has a spare or old wireless PCMIA card lying around, I would
be happy to pick it up from you. I can't seem to get the built-in
wireless working on my laptop so I'm looking for a Linux-friendly card
that I could get running a couple of minutes.

Thanks,
Chris

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Friday, January 1, 2010

Re: [BLUG] My KDExperience

2009/12/28 Steven Black <blacks@indiana.edu>:
> On Mon, Dec 28, 2009 at 09:07:07PM +0000, Mark Krenz wrote:
[snip]
>> Right now the desktop still feels a bit strange because I'm getting used
>> to things like having to press Ctrl+shift+n for a new terminal tab
>> instead of Ctrl+Shift+t.  But those are minor things that will pass.
>> We've definately come a long ways since the days of the FVWM window
>> manager, which could do pretty much anything you wanted, but you had to
>> modify a text file to do it and then reload FVWM.
>
> You can easily tweak the keymap in konsole. It is handy to (for
> instance) disable F1 for help if you find you accidentally press it when
> reaching for ESC.
>
> In fact, you can tweak the keys in pretty much any KDE application. I
> recently wanted to disable Alt-Left-Arrow in Firefox and, to my dismay,
> I found I couldn't change any of the key-mappings. I'm used to KDE
> allowing me to get things to work the way I want.

This is only because Firefox is a Windows application masquerading as
a gtk application in linux. The gnome hid says that users should be
able to change keyboard shortcuts for menu items by hovering the mouse
over the item (or at least, highlighting the item) and pressing the
new shortcut (backspace once clears). Try it in any hid-compliant gtk
program.

Disabling Alt-← in a real gtk browser (like galeon or epiphany) is as
easy as going into the "Go" or "View" or whatever menu, highlighting
"Back", and hitting backspace over it.

--
Jonathan

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] New Years Countdown timer

I modified this some to work with zsh and so that it doesn't crash if
you start it after the new year ;)

Also, I tried running it shortly before midnight last night, only to
find that my clock was a couple decaseconds (not deciseconds!) off. I
poked at ntpdate frantically, but my wife and parents were trying to
hand me a glass of champagne already, so I decided there were more
important things to spend the last few seconds of 2009 on ;)

In the spirit of keeping modifications to open source things out
there, I've included my [only slightly] modified version below. Maybe
there should be a clause for "Sorry, you missed it already" instead of
saying "Happy New Year!" when run at this point..

while V=$((`date +%s -d"2010-01-01"`-`date +%s`)); do \
if [[ $V -le 0 ]]; then \
toilet -f smmono12 --gay 'Happy New Year!'; \
break; \
else \
clear; \
toilet -f bigmono12 --gay $V; \
sleep 1; \
fi; \
done;

P.S. one of my later BASIC programs over a decade ago (a few years
before I really discovered linux) was a new year countdown timer. I
think I was preparing it for y2k, but I'm not sure anymore. It was
much longer and more complicated than this script, since I didn't know
about / have utilities like date and toilet, much less regexes (which
I did all by hand, ugh).

--
Jonathan

2009/12/30 Steven Black <blacks@indiana.edu>:
> I ran the script and found (1) I didn't have figlet installed, and (2) it
> suggested I install either figlet or toilet. I installed them both, but
> I think I like toilet's default letters better.
>
> In fact, here's my extended edition of the command (wrapped to be easy
> to read, but with line-continuation so you can copy/paste):
>
> while V=$((`date +%s -d"2010-01-01"`-`date +%s`)); do \
>    if [ $V == 0 ]; then \
>        toilet -f smmono12 --gay 'Happy New Year!'; \
>        break; \
>    else \
>        clear; \
>        toilet -f bigmono12 --gay $V; \
>        sleep 1; \
>    fi; \
> done
>
> I think the --gay toilet is just thing the any New Year's bash.
>
> Cheers,
> Steven Black
>
> On Wed, Dec 30, 2009 at 06:43:48PM +0000, Mark Krenz wrote:
>>
>>
>> This is what I just posted to the climagic account on twitter and
>> identi.ca:
>>
>> while V=$((`date +%s -d"2010-01-01"`-`date +%s`));do if [ $V == 0 ];then figlet 'Happy New Year!';break;else figlet $V;sleep 1;clear;fi;done
>>
>>  Of course I was limited to 140 characters.  Anyways, I thought some
>> people here might appreciate this little snippet.
>
> _______________________________________________
> BLUG mailing list
> BLUG@linuxfan.com
> http://mailman.cs.indiana.edu/mailman/listinfo/blug
>

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug