Making Your Computer Your Slave with Linux

Mr. Slave

And learn some stuff too while you’re at it.

Or how I learned to stop fearing my PC

Linux taught me how computers and networking works through hands-on experience, I was/am constantly trying to do stuff with Linux that I have had no experience with. I knew what I had been taught in school about computers, but that often aint nothing compared to what I learn by trying to do things I had never really done before.

Linux will teach you much about computers and their capabilities, which is necessary in the real world for any EE. Embedded Linux is also the way the embedded industry is headed. Here is a simple time-line of my recent (2004), but fun Linux/computing addiction, with example projects along the way. Warning this may get lengthy:

1. Heard about Linux from fellow geek in lab, heard it was a free OS to use along with compatable free versions of Photoshop, MS Word/Office, Matlab, h/pspice, verilog simulator, firefox w/ flashplayer, etc. Check this out for more info:

linuxquestions wiki on this subject

I heard some things were much easier, some things harder, no spyware/viruses, better security, blah blah you’ve heard this all before. You should try dual booting.

2. Installed it on an old PC and used it as my primary desktop machine as dual boot. Googled any problems/errors I had such as printing, etc. Some things were a pain, but I learned some things about software and hardware/networking that I had never known before. Usually its pretty fun and valuable to fix problems you run into yourself.

3. Decided to Setup an ssh server at home (really easy) that I could access anywhere. Created a simple web page that had php scripting enabled (so you can build interactive web sites and/or control your computer from a web page). Setup an email server (easy to do, very tough to keep out spam). Learned much about setting up and traversing firewalls/routers. Learned about setting up ssh tunnels, so you could do anything from anywhere on your private LAN through ssh. Learned lots about security too.

4. Setup a full C/C++ build environment so I can compile any program I have sourcecode to from places like sourceforge.net, etc. Play around with various scripting languages like Perl, Python, especially Bash.

5. Having taken C++, learned to use libraries to build my own short simple but powerful programs that access sound card hardware and other hardware, click buttons on the screen without a mouse (from anywhere on the net), and even wrote some simple networked servers/clients that can talk to each other on a home LAN.

6. Found out that many wireless routers (like the old Linksys WRT54G) run or can run Linux (openwrt.org). Downloaded the Openwrt SDK (Software Development Kit) for building custom software for it in C. Found out that the routers also usually have 2 serial ports and 4-8 GPIO (General Purpose Input Output) for LED’s and switches. I wrote a simple program to stream audio from another PC on a LAN to the serial port on the WRT. I had a $40 wireless speaker with WPA-PSK encryption. Used two or three simple 70-80 line C programs to do it. Fun stuff.

7. Recently started putting small Linux installs on Fanless, Hard disk-drive-less (use a usb stick), computers that cost under $200. They have VGA and full audio outputs and have no moving parts. In the pro-audio world this is pretty fscking awesome b/c it will last 10 years if it is kept out of water/beer (beer is for the equipment installer, not the equipment) and at a reasonable temp.

8. I also use gnu-octave (open source version of matlab) on Linux to crunch numbers / simulate simple DSP algorithms such as Sigma-Delta Modulators, FIR/IIR filters and architectures for FPGA’s or C code, and play w/ the amazing FFT and its DCT cousins (discrete cosine transform) which has applications in audio analysis and compression.

9. I run vmware server under Linux now so that what few Windows apps I must use, I can use them from a virtual machine (simulated computer on a computer like Parallels for the Mac) in Linux. I no longer dual-boot the two OS’s. VMWare can access USB, serial/parallel ports, and sound card access. Can’t kill windows off my PC entirely b/c unfortunately in the pro-audio world, much of the pro audio equipment is MS Windows only configurable, which is sad, but thats what happens when there is a government dependent/sponsored monopoly in a particular industry, they become “defacto standards” whether they are actually better or not. The linux kernel is capable of running uninterrupted for years at a time, and some machines have been doing so. It is very robust.

Also the command prompt or “shell” (Bash) in Linux/Unix is very, very powerful and eye-opening. It is basically a programming/scripting interface to programs. You can do things with it that will blow your mind once you learn your way around. You can use programs that they were never designed for specifically, unlike GUI programs in windows.

Example:
I have done things like encode audio from the soundcard (mic input), as an mp3, streamed it to another computer over a network and played it out the sound at the remote location (home), all with general purpose applications with one long command (mp3 encoder, ssh, mp3 decode to sound card at home). Apps in the *nix world have “standard input” and “options” and “standard output” among other interfaces and can be “connected” together with pipes and manipulated in more ways than you or even the original designers imagined. GUI (Windows) programs can’t compare. Wanna download a file without opening a browser?

file example:
$ curl http://example.com/file.mp3 > file.mp3

puts the file.mp3 in your present directory

What programs are listening on which ports:

$ sudo lsof -nPi

Find all files recursively in a directory with the string “gtk.h” and print the name of the file and line it is on:

$ grep -rn "gtk\.h" *

Linux is for people who want to know their computer better. It is a different approach to computing. It will help you eliminate your fear of the Computer, and even make it your slave. I use Ubuntu now, but almost any distribution gets you going fast (CentOS, PCLinux, Suse, Fedora, etc). Avoid slackware or gentoo unless you are really gung-ho about spending hours reading a manual, installing and getting a usable system. I know that statement will get me death threats, but I believe they have their place, and its not with a newbie unless they have help. If the newbie wants to learn the hard stuff all at once, they can use gentoo or slack, but I still prefer the simplicity of an ubuntu install and maintenence.

This is a living document and more will be added later.

Advertisements

4 Responses to “Making Your Computer Your Slave with Linux”

  1. The BDSMSisters Says:

    Wow Man!

    That’s an inspiring article. I have been holding out on Linux, but looks like its time to give it a go.

    The only complications I face, are that most my work related softwares are windows based. So I have been stalling it till my puter gets old and I get a new one, and use the old one with Linux.

    Anyways, thanks for this wonderful read, dear friend. I will certainly return for more. :-)

    Love & Peace
    -Maya

    PS
    Our blog on wordpress is on an entirely different topic. One that you might not really like, so if you choose to visit, dont say I didnt warn you! lol

  2. electronjunkie Says:

    I guess with a blog entry title like this I was begging for a response from the bdsm community! I guess all we need now are some pictures of me whipping my Laptop while its hogtied by USB cables with a gag in its cdrom drive.

    Maybe your blog topic isn’t so different from mine after all.

    Now where was I? Oh yeah you’ve been a naughty Compaq. No no no, the safety word is not 1010100101010110100101010100101 sorry! 0x4f?? Don’t pretend like you forgot it, you’ve got 1G of RAM.

  3. The BDSMSisters Says:

    LOL!!!

    Dear Electron Junkie,

    Being interested in BDSM does not mean that I do not have other interests or do not have a life! Who knows I might just be a ‘tech-junkie’? ;-)

    Any ways, I was searching for some related info, landed up on your page, read your post and liked it, so said thank you.

    Whether your’s was a sarcastic reply, or whether it was a friendly joke,
    Either way, all the very best to you,
    -Maya

  4. electronjunkie Says:

    Hi Maya,
    Thank you for your kind words. I do appreciate your responses, I was unsure if your reply was serious, my title and your blogs title was just too coincindental! I’m sorry I came off sounding sarcastic.

    I did look at your blog, and while I am not interested in BDSM and know very little about it, I did recognize some of the stars names from their role in other fine films I may have seen.

    Have you tried dual booting? Ubuntu does a great job of resizing your MS partition (NTFS) and installing itself alongside it. If its not your PC don’t do it obviously, but if you have at least 5G or so to use on your own PC, go ahead. While I have never had a problem doing this, you should backup any valuable files 1st. Install is really simple. But if there is a hardware problem, things can get tricky.

    I personally no longer dual boot, I have my original PC windows partition inside a virtual machine (VMWare) so I can use what MS programs my job requires. VMWare is free to use, (or use the totally free qemu) and you could use it to run Linux inside your MS windows environment. Either way you need lots of ram and a modern CPU since there are 2 OS’s running.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: