Wednesday, 24 September 2008

Primers Coming Up

Thru my work I'm thrown into alot of technologies that i dont nearly know enough about and as with alot of tech related things, the education scene is basic basic basic..GURU with little or no gradiation, so what I'm going to do is post what i learn when i learn it and where i learn it from and hopefully it'll be useful for someone else, and I'll also take the opportunity to rehash stuff I've already done.

ATM I'll probably be doing Bash scripting, Perl Scripting, XML, and whatever UNIX stuff comes up whenever I'm writing, but for now and for a relativly simple start; X display fowarding...

This is the setup: Linux/Unix based "client" and "server"; in my case I have headless systems that i fiddle with from time to time, but after a while vim just becomes a pain, and as for viewing html files etcetc copying things back and forth is a pain in the ass.

The solution is already there; From its beginning the X server has always been client server based on some level. Basically what were gonna do is tell the server to use the client as an X display; this is controlled thru an environment variable, strangly called DISPLAY

Lets assume were using SSH. *nix SSHd has a simple system for fowarding and routing the relevent X ports (these wont show up in your "tunnels" tab if your using something like putty, but you shouldnt be using putty anyway)

Theres two versions of this fowarding ability, X and Y. in a nutshell, X is compressed and encrypted. Y isnt. On slow links, Y is probably your best bet, also some servers dont support the X flag. Also also, some sysadms disable this X fowarding.

Anyway, to the point. 
login to the server thusly
client# ssh user@server -X

then when you get a shell check to see if DISPLAY isnt already set (some servers are good enough to do this for you)

server# echo $DISPLAY

if your lucky it'll say localhost:10.0
otherwise it'll probably say :0.0 or something similar

If your in this unlucky situation, just enter
server# DISPLAY=localhost:10:0

then try it out, by running the clock and forking it into the background (&)
server# xclock &


Job done. Later

Sunday, 14 September 2008

Long Extended Break: Hardware Update


So, gonna do a quick write up on my current setup.
Ok, from the top:
Linksys WRT54GL DD-WRT v24 std firmware (also running on the bottom right screen)
Generic Wireless headphones (not used since i heard someone else on the channel :P )
top screens : Windows server 2008 AMD Athlon X2 64 6000+ on an Nvidia MCP 65 based motherboard carrying 6GB, with the dangerous RAID 0 arrangement of two 500GB sata drives and an IDE 320GB for essential backups. (this system is hidden, lol)

The bottom two screens run off of an old Toshiba Laptop that i "repurposed", more or less the keyboard has been removed and the screen flipped around and re positioned, Intel Celeron something or other, 512 MB memory, 60 GB HDD, running Ubuntu Hardy Heron that i mainly use for chat, downloads, news, system monitoring and notes.

Fairly standard hidden speakers and everythings as hidden so i get to be messy the rest of the time. 

As for functionality, i use the laptop as an always on remote access hub that also lets me dial into work from anywhere. Also, since the laptop is keyboard mouseless, I use synergy to automatically start the client on the laptop (using the desktop as the server)

FYI easy enough to set up, just insert this:
/usr/bin/killall synergyc
/usr/bin/synergyc (server)

in these
/etc/gdm/Init/Default
/etc/gdm/PostLogin/Default
/etc/gdm/PostSession/Default
/etc/gdm/PreSession/Default

And this more or less starts and stops the server at every stage of bootup and login (note, you are not going to get to play with BIOS options et al, read the synergy FAQ

Anyway, Otherwise, I've been working on alot of bash script that I will post about separatly, but I am going to be learning perl so i will hopefully be using this thing alot more than usual.

Later guys

Saturday, 24 May 2008

EEEpc note

Ok, got the 900, sorry this blog is very very late

Pros:
AMAZINGLY small, you wont believe how small it is until you use one
The keyboard is just managable
the Webcam is amazing quality when it works
More responsive than i imagined
The Extra 16GB SSD really helps
Wonderfully fast bootups (If you never plug it in to any accessories (other than charger) set the Boot Booster enabled under the BIOS, trims a second or two)

Cons:
Battery life less than expected
Wireless strength depends on the driver you use
Webcam and Webcam-mic not fully functional (currently) under Ubuntu 8.04


What I've done:
Managed to get a dual boot system between the Xandros OS and Ubuntu 8.04 by resizing my home partition on the 16GB SSD and installing in there (dont bother with a swap drive)
Grub works wonderfully and straight out of the install i still have both the standard and recovery boot options thru xandros.

As for install, use this
And for tweaking use this BUT to fix the sound you have to go back in and re fix alsa (the 700 tweak doesnt work for the 900)

  • Edit /etc/modprobe.d/alsa-base and change the line “options snd-hda-intel model=3stack-dig”to “options snd-hda-intel model=auto”

  • ALSO, run the following command:

sudo alsactl store
  • Run:

sudo alsactl restore

I think that was all i had to do for basic operations.

Also got Kismet and the Aircrack-ng suites working with a bit of giggery pokery with an aim of stealing my dads old GPS and getting gpsmap to work properly, My personal recommendation is to install both from source, in the case of aircrack, you need to go into the folder that was built and make sure that all of the generated binary files are copied to /usr/bin or /usr/sbin depending on how paranoid you are (I'm not) because the install script doesnt install airmon, aireply, ivstools, packetforge, and a few other things i cant remember off the top of my head

As for the kismet source, i use source=madwifi_ag,atho,atheros and instead of relying on kismet to open the card as monitor, i use airmon and wlanconfig to kill the other interfaces first, eg

sudo wlanconfig ath0 destroy
sudo airmon-ng start wifi0
kismet (i did the suidinstall of kismet so there is no need for sudo. for a single user system the suidinstall is probably easiest)

I cant really talk about the performance of aircrack because truth be told i wouldnt have the patience for a 900MHz to get thru that kinda work, i collect as many packets as i can and get my dual core 3GHz 64bit system to do the dirty work (also usually do this over ssh if i can get an alternate connection, am working on a system where the ivs file can be emailed and an email reply will be sent back, with either the key, or "MEGAFAIL")

Anyway
Battery life. thats a joke. Its less that the 701 my dad has. yeah, yeah, i know, its more powerful, bigger screen, that wud be fine if it wasnt just the UK getting the kneecapped batteries:

List of countries getting 5200mAh battery:TW,HK,USA,CAN,IT
4400mAh:UK

If anyone is reading this please go to http://forum.eeeuser.com/viewtopic.php?id=27140 and make your voice heard, cus i want the battery that was handed out to reviewers! (the forum explains it better than me)

Tuesday, 13 May 2008

EEE Update etc


Just got a call from home saying that my EEE was delivered today, now thats what i call super fast delivery, kudos to clove for being so speedy

On another note my dad is cycling from ballymoney in northern ireland to montouliers in the south of france, he has an EEEpc 701 with him and hes been using it to make a blog here

Another Uni Project

If anyone is interested in Erlang B Calculations, very relevent to any communications or engineering students, I've written a little quick piece of code to calculate them.

There are several levels of functionality in the code.
Erlang B itself only has 2 variables, System load in Erlangs, and the number of "trunks" (read: servers/call center operators/phone lines), and its output is a blocking probability from 0 to 1

All three of these variables or none atall can be defined at runtime;
  • The desired blocking probability can be input to stop the calculation at that point. (default 0)
  • The Load can be defined (See Erlang A) (default 1)
  • The maximum trunks to be calculated (default 100)
The code uses the unistd.h library for argument parsing so is more or less unix only (or cygwin alternativly) and long doubles for more or less everything inside the code.

Having tested the limits, it kinda conks out then calculating large (read 1000 erlangs) on large trunks (got as far as 1234 trunks, then died)

When i get a bit of time i might optimise the factorial part so it doesnt run thru the entire factorial sequence for each number.

Anyway, the code is here. I'm not wasting my time laying out code on blogger.

I want

Jeff Han, a researcher at NYU, surpassed himself again with the most georgous multitouch display interface I've ever seen (surface/iphone eat your heart out). I always love watching TED talks, and if anyone really wants to see a good reason why Powerpoint should be killed, I'd recomment Hans Roslings talk on global poverty here

Monday, 12 May 2008

Asus EEEpc

Just off the phone with Clove saying that my shiny new black eee 900 is winging its way to my homestead, which unfortunatly is not wer i am, but at least i wont be losing any time for revision (read: have any other reasons not to study)

I have to say I'm really disappointed with Asus's attitude to they're british customers regarding the battery issue and i really cant say any more about it except that were paying above the board globally, and not getting an equivalent product and an even less equivilant service.

Nevertheless I'll be installing Ubuntu as soon as i get my grubby little mits on it, and will hopefully get some pictures, maybe actually get off my ass and do a how to. Might install an internal bluetooth mod aswell.....

On a brighter note, i really have to say Clove have been fantastic, i ordered mine about a month and a half ago and called me back the next day telling me that they were looking at a mid may delivery date, and then called me when the white eee's came in stock at the beginning of the month, i pointed out that i had previously changed my order to the black, and they were great about it. Highly recommended! Not expensive atall either!

www.clove.co.uk

DISCLAIMER : no i dont work for them