tag:blogger.com,1999:blog-58392708412988136472010-01-22T10:19:53.570-05:00Notes on LinuxAnything interesting regarding Linux including programming, system administration and gamescubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.comBlogger35125tag:blogger.com,1999:blog-5839270841298813647.post-50570069591411706242010-01-12T00:36:00.002-05:002010-01-12T01:47:20.575-05:00Command Line ApplicationsThis article assumes some knowledge of the command line. Before we get into the specifics I should say a little about ncurses. Ncurses is a programming library enables a programmer to write a text interface for programs running under a terminal emulator, e.g. bash. An application using ncurses can resize itself within certain limits set by the programmer. Note that it is possible to ssh into devices with small displays to use a larger external display.<br /><br />Text based programs come from three main development groups: GNU, Linux and BSD.<br /><br />Here are some of the things I find useful to do at the command line:<br /><br />Script to look up a word in the dictionary:<br />curl dict://dict.org/d:$1<br /><br />Script to listen to CBC Radio 1:<br />mplayer http://icy1.abacast.com/cbc-r1toronto-96<br />(CBC tends to change things around a lot and this script may not work in the future)<br /><br />Stream classic music from WGBH:<br />mplayer http://streams.wgbh.org/classical.asx<br /><br />Check spelling of standard input (gives suggestions)<br />ispell -a<br /><br />This is a script I use when I can remember what a file is called, but can't remember which directory it's in:<br />TEST=$(dirname `locate -n 1 $1`)<br />eval cd $TEST<br /><br />I put this in ~/bin as locate.sh but to get the desired result one would use:<br />. locate.sh SAK.txt<br />This would put you in the directory where SAK.txt was located.<br /><br />The two calendar programs cal and gcal (cal is from the Linux world, and gcal is GNU's version).<br /><br />Ncurses based IRC program:<br />irssi<br /><br />Ncurses based spreadsheet program:<br />sc (7.16 seems to be the newest version)<br /><br />Unit conversion:<br />units<br />(Example: You have: 0 degC<br /> You want: degF<br /> * 0)<br /><br />Various text based browsers like elinks, lynx and w3m.<br /><br />I run bc a lot for simple math calculations:<br />bc -l (run bc with standard math library)<br /><br />I have accumulated a rather large collection of bash shell scripts over the years but even more useful than the scripts was the text file I keep here: <a href="http://cubeman.org/linuxnotes.txt">Accumulated Linux Notes.</a> Text based programs are generally smaller in size and execute faster and (this might be the most important concept of all) can be easily ported to other systems.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-5057006959141170624?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-23823441788556829192009-12-01T19:19:00.003-05:002009-12-01T20:24:25.663-05:00Linux Laptops and NetbooksWell, once again I headed out to the stores looking for the perfect Linux based laptop or notebook. Were there super cool ARM based netbooks running Linux? Have the stores started to stock non-Windows based computers? Could I at least find some Linux based laptops?<br /><br />The current situation is bad but not hopeless. If you are willing to import you can get a <a href="http://en.wikipedia.org/wiki/Lemote">Lemote</a> manufacturered device. One can order them online from Tekmote Electronics (based in the Netherlands). Richard Stallman uses the Lemote mini-laptop because it uses 100% Free and Open Software up to and including the BIOS. Lemote's high end model is the YeeLoong 8089 which has a 64-bit Loongson-2F processor running at 900 Mhz and an 8.9" screen. This system runs Debian Linux.<br /><br />Dell Canada is selling their Mini 10v netbook for $329 Canadian which comes with Ubuntu 8.04. The Mini 10v comes with an IntelĀ® AtomĀ® Processor N270 running at 1.6 Ghz, a 10.1" screen with 1024x600 resolution, 1 GB of RAM, the Intel Graphics Media Accelerator 950 and a 160 GB hard drive. This device comes with a one year warranty. Their other Linux computer is the Vostro A90 for $319 which has the same memory and graphics hardware, but a smaller 8.9" screen and a 8 GB Solid State Drive.<br /><br />The third choice is to buy used on ebay. One of these days I'll get one of those Sharp SL-C3000 series PDAs. I already own a SL-5500 machine and I had a lot of fun porting GNU, Linux and BSD programs to it. You should be able to find a SL-5500 for under $100. Recently I bought a Lexar 4 GB compact flash card for the SL-5500 and it worked fine. If you are willing to go for a higher price I have seen the Netwalker go for about $520 on ebay.<br /><br />Unfortunately I was not able to find any ARM based laptops or netbooks, not in the retail stores in Canada or online. What I am hearing is that next year will be a big year for ARM based netbooks. I would be happy to hear about any such devices so if anyone comes across an ARM based netbook or any other kind of Linux based netbook or laptop please comment about it.<br /><span style="font-size:13;"><span style="font-family:verdana,arial,helvetica,sans-serif;"></span></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-2382344178855682919?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-24057912123852352212009-10-09T01:26:00.007-04:002009-10-09T22:42:32.544-04:00The Importance of GNUIf you are a Linux fan, then you probably know something about the GNU utilities. In short, Linus Torvalds (and others later) used the GNU utilities to write the Linux kernel. But before that happened Richard Stallman realized back in the 80's that computer users needed a portable operating system.<br /><br />What we see happening over and over again is any hardware system will eventually become obsolete. In Stallman's case it was the PDP-10 system. Over time the system became obsolete and for some reason a lot of Stallman's early programming work was lost, perhaps because it was written in assembly language. Stallman, or RMS as he is often called, realized for any operating system to survive the passage of time it needed to be a portable system.<br /><br />RMS decided he would be the one to write this new portable system and not only would it be portable but it would be free as well. In this case the word free refers to freedom: the source code of the operating system would be free to modify and exchange with other programmers. RMS decided to base his new system on Unix and that at minimum the computer needed to be at least a 32-bit system. This was a task of Herculean proportions.<br /><br />Unix was a good choice in that it was compartmentalized and it was relatively straightforward to replace each Unix component with it's GNU replacement. (For anyone who doesn't know: GNU is a recursive acronym that means 'GNU is Not Unix'). Bit by bit RMS worked and by the early 1990's he had almost a complete system. Only one major part was missing and that was the kernel.<br /><br />As we know Linus Torvalds wrote a kernel and then people started to use the GNU utilities to create a complete operating system. Of course there were many contributions from different places, but the two most important parts were the GNU utilities and the Linux kernel.<br /><br />It is important to remember Stallman's original objectives: to write a free operating system and insure that it is portable. Basically his objectives were met and we now have several free operating systems. But it is also important to remember that Linus needed a compiler to write the Linux kernel and that compiler was the GNU C compiler gcc.<br /><br />We can see the critical importance of portability: Hardware will grow old and die and manufacturers will cease to make replacement parts. They will only concentrate on new hardware. So the time will come went one will need to port a program to a new architecture. Fortunately this is made somewhat easier with the GNU utilities. Using the GNU utilities I've started to port programs which I felt were missing from the Sharp Zaurus SL-5500 PDA.<br /><br />Now even though I have a lot of ideas on how the GNU utilities could be made better I can easily see how valuable a toolset it makes for any programmer. I'm sure that given enough time I could port any GNU utility or any program under the GPL (although I admit it would be a ton of work in some cases). Once I started to port programs I felt quite liberated. So what if my PDA didn't have an IRC client, it couldn't be that hard to port one, and it wasn't :)<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-2405791212385235221?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-38465084021470199092009-08-28T19:55:00.002-04:002009-08-28T20:31:40.091-04:00Sharp Releases the 'Netwalker'Sharp has released a new Linux based computer called the 'Netwalker'.<br /><br />The Netwalker has a 1024x600 WSVGA display (5 inch or 127 mm) and runs a Freescale processor at 800 Mhz. For memory it has 512MB of RAM and 4GB of SSD storage which is expandable with a microSDHC card. Sharp is claiming 10 hours of battery life.<br /><br />This device is a little unusual. It could be considered a big PDA or a really tiny<br />netbook. Sharp is saying the boot-up time for this device is under 3 seconds and<br />in this case the Linux distribution is Ubuntu. It's dimensions are 6.33 x 4.25 inches<br />or 161 x 108 mm which would require a rather big pocket.<br /><br />Unfortunately the Sharp Netwalker is only available in Japan but chip makers<br />Freescale are looking for ways to import the device into the USA. The good news<br />is that Sharp is continuing to develop devices which run Linux and hopefully<br />the Netwalker can pick up where the Zaurus series ended (the Zaurus series<br />ended in February 2007).<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-3846508402147019909?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-72557000605888285492009-07-13T15:51:00.003-04:002009-07-13T18:07:29.455-04:00The Importance of FreedomOne of the most important and fundamental aspects of using computers is choice. The simple ability of the customer to choose which hardware and software they want. Not too long ago you would go out and buy a 'Brand System' from a manufacturer like a Commodore Amiga or an Apple Macintosh and you would just use the operating system that came with it. Often you had to buy additional peripherals such as printers or external floppy drives from that same manufacturer. Basically your only choice was the manufacturer. There were a few third-party manufacturers who would also build devices which could work on your Amiga but there was a great deal of manufacturer lock-in.<br /><br />Nowadays we have more choice and also less choice. Long gone are the Atari and Commodore computers. Also gone are GEM, AmigaDOS and (for the most part) the BeOS operating system. Where we have greater choice is at the component level. One can go online and buy tons of different hardware on ebay or tigerdirect. One can choose which video card, hard drive, and motherboard they want from a number of different manufacturers, used or new.<br /><br />With the rise of FOSS (Free Open Source Software) one now has the additional choice of an open or closed source operating system. For many computer users the importance of this choice is stifled. When one goes into a brick and mortar computer store they don't have the luxury of choosing their operating system, you get Microsoft Windows. Of course the tech-savvy user is free to erase Windows and put Linux or FreeBSD on there. The point remains that the manufacturers and retailers have gone with a 'one size fits all' solution and kowtowing to Microsoft is still the rule of the day.<br /><br />Can I go into a Staples store and buy a Linux netbook? No. Can I go into Staples and get a Linux based PDA? Nope. Can I go into any store in Canada and get a Linux based computer? The answer is no, not in a traditional store (at least I haven't found one yet). Occasionally I see devices like the Sharp Zaurus SL-5500 on ebay but I don't think <a href="http://www.sharp.ca/">Sharp Canada</a> carries them. The only real choice for the Linux enthusiast is to go online to sites like <a href="http://www.linuxdevices.com/">Linux Devices</a> and do some research.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-7255700060588828549?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-88522010812767289532009-05-26T00:20:00.003-04:002009-05-26T21:38:14.078-04:00TV and Radio CardsOne of the great things about Linux and FOSS (Free Open Source Software) is that you can download the source code not only of programs but of modules. Modules under Linux are also known as <a href="http://en.wikipedia.org/wiki/LKM">LKMs</a> or Loadable Kernel Modules. One very interesting example is the bttv module and you can download the source <a href="http://linux.bytesex.org/v4l2/bttv.html">here</a>. The bttv module is the module I used to get an old TV tuner card to work under Fedora.<br /><br />The <span style="color:black;">WinTV-GO-FM is a PCI </span>card which can receive analog television and FM radio. With the pending switch-over to digital television these cards can be purchased on ebay for very little money. You might be thinking analog TV is on the way out but there are still channels like TV Ontario which are still analog only. Even with the change to digital it is still nice to have the ability to receive FM radio.<br /><br />Linux applications which can be used with this card include gnomeradio for GNOME and kradio for KDE and the console radio program from the xawtv package. I prefer to use gnomeradio. The console radio program can only have 8 presets which is rather limiting.<br /><br />The main thing is that you can learn a lot about your cards by looking at the source code of modules like bttv. I know my WinTV-GO-FM card is kind of limited, it can only do mono audio and can't do any mpeg2 compression in the hardware. It can act as a composite video input for a VCR which is nice to have. One could conceivably modify the bttv module to add features or even port it to another operating system. One might even learn enough from looking at the module to write their own module for hardware not yet supported!<br /><span style="text-decoration: underline;"></span><a href="http://en.wikipedia.org/wiki/LKM"></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8852201081276728953?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-88287967172437796272009-05-23T23:31:00.001-04:002009-05-23T23:39:07.387-04:00Thoughts on Fedora 10Starting in the year 2009 I have been asked to replace Windows installs with Linux installs. Before this I had to coax people to try Linux. Over time this process has become easier and easier. My Linux distribution of choice nowadays is Fedora 10.<br /><br />My experience with Fedora 10 has been mostly positive. I have installed it successfully on a Dell D610 laptop and also a Panasonic CF-48. I prefer using GNOME over KDE for a windows manager. I used to like KDE 3.4.2 over GNOME but Fedora 10 uses KDE 4.2.1 which to me just seems overly complex.<br /><br />Some software seems to have become abandoned such as the scanner program Kooka. On one of my older systems I run Kooka 0.44 on Fedora Core 1 (using my old HP 5200C which runs like a tank) and I still prefer it to xsane. Of course both programs do mostly the same job. The thing is developers will usually stop working on older versions of software, so if you want your yum updates then you are pretty much forced to use latest and greatest.<br /><br />All is not perfect with Fedora 10. One of the things it does which I don't like is auto-logout. Basically Fedora 10 is emulating what Windows XP does: after a period of time you are send back to the user login screen. There doesn't seem to be any way of disabling it which is annoying. It seems to perform software updates often which is good, but I'd rather it buffered all the updates and did it once a week. Doing updates every day seems like overkill.<br /><br />Still all in all I was able to make Fedora 10 work well, which is important. Java, Flash, etc all worked correctly. One must still exercise some care in choosing your cards and peripherals but for the most part this newest Fedora was painless and even enjoyable. One may order Fedora Discs <a href="http://www.osdisc.com/cgi-bin/view.cgi/products/linux/fedora?affiliate=cubeman">here.</a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8828796717243779627?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-18085754032452217622009-04-23T23:32:00.004-04:002009-12-12T09:06:18.894-05:00Why I Use LinuxWhen I first started to see computers in stores it was fascinating stuff. It is hard to understand now, but back in the late 1970's kids growing up didn't have computers in the home. Around 1978 I started to see TRS-80 Model One's in Radio Shack and Commodore PETs in Eatons. (Both gone now, Radio Shack only exists in the U.S. and Eatons is completely gone). You could get a TRS-80 Model One for about $800 which was more money than I could afford at the time.<br /><br />My High School got Commodore PETs for the first time in 1980 (Model 4016's) and put them in the library. Students were allowed to go into the library early and sometimes I got there as early as 7 am. Microcomputers of that time were simpler and easier to program. You turned it on and you could instantly start programming in BASIC. Programs were stored on cassette tape or 5.25" floppy disks. Later on there were "Fat Fortys", Pets with larger monitors but still only 40 characters per line was supported.<br /><br />As time when by we saw the Vic-20, C64, C128 and finally the Amiga arrived. My first computer was a Vic-20 and one of the first things I did was program a simple Rubik's Cube simulation on it. I had to substitute purple for orange as the Vic-20 couldn't display orange. Later on in 1986 I got a C64 and in 1988 I got an Amiga 500. With the Amiga it was now possible to control the colour of each individual pixel and it had a GUI based operating system called AmigaDos and came standard with a whopping 512K of memory. Common to all these computers was the fact that programming documentation was easy to come by, for the computer itself and all it's peripherals. Unfortunately this state of documentation would greatly change in the future.<br /><br />In 1987 I started to see a few businesses experiment with gui based systems like Windows 2.0 and Desqview. At the time I didn't like Microsoft Windows because I thought the gui made the computer too slow. I liked Desqview a little more as it could run MS DOS programs. Around this time came into contact with one of the predecessors of Linux, Unix System V. I have to admit I found it overly complex at the time and actually preferred MS DOS. Still I believe it was this earlier exposure to Unix that made me more interested in Linux later on.<br /><br />In the early 1990's I started to see computer users ask for software which ran on Windows 3. People seem to prefer this gui based system and it gradually started to become more popular. Although I never liked any of the versions of Windows the idea of a Graphical User Interface was to become the norm. The learning curve for programming this new systems was much steeper than the earlier ones like the Commodore PET. Many hobbyist programmers never made the leap into gui based programming and preferred the simpler text based systems.<br /><br />But it was the release of Windows 95 which was to turn my dislike of Microsoft into something approaching hatred. Computer crashes started to become common-place but even worse I started to see something I never saw before: Peripherals which would only run on Microsoft Windows. Things like Windows-only printers and Windows-only modems and eventually Windows-only scanners. Programming documentation of peripherals became a guarded secret and few programmers were allowed to see the documentation unless they signed a Non-Disclosure Agreement or NDA.<br /><br />In the micro-computer world the non-Microsoft systems were swept aside and systems like OS/2 and BeOS were to become practically extinct. Commodore itself became bankrupt in 1994 and so AmigaDos was also marginalized. Microsoft strode the world as an unassailable behemoth and it seemed a Dark Ages of Programming had begun, at least in the micro-computer world. Programming for Microsoft Windows was not fun and the very concept of programming for the fun of it seemed to vanish.<br /><br />Of course there was no going back to the C64 or even the Amiga to write programs. Although there are no doubt a few hard-core programmers still writing code for older systems technology has moved forward. Personal Computer hardware became more modular and new advantages in technology made any given system obsolete in a very short time period. What was needed to end the Dark Ages of Programming was a new system which could update itself along with the hardware but still be accessible to the hobbyist programmer.<br /><br />Although I didn't realize it at the time Linux version 1.0 was released in 1994. Sadly I didn't free myself from Microsoft's grip until 2003 when I started to use Redhat version 8. Still even as a late comer to Linux I was able to adapt myself to the new system faster than some due to my earlier experience with Unix System V. Once I started using Linux something amazing started to happen: I was having fun using computers again and I started programming for the fun of it again, something I stopped doing after my Amiga 500 stopped working.<br /><br />Still there was the problem of the dreaded "Microsoft-Only Peripherals". You can read about my epic battle with the HP 4470C scanner here: <a href="http://cubeman.org/hp.txt">HP</a>. Fortunately there was a happy ending. Gradually programmers all over the world started to compare notes and many of the peripherals with secret communication protocols became deciphered. Linux fans world-wide warned each other to stay away from certain devices and suggested alternatives which were better supported. Programming was fun again, or at least more fun than it was before.<br /><br />This then is the reason why I use Linux. It's fun to program with it. Not as easy as programming the C64 but still fun. You can rebuild it you have the technology. There are user groups for Linux just like there used to be user groups for C64 and Amigas. You could build your own computer and with some care choose cards which are Linux compatible. You can go into any book-store and see lots of Linux books and magazines on the shelves. You have the freedom to look at the source code and make improvements which is a freedom I wouldn't have appreciated before but now I consider it extremely important.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-1808575403245221762?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-29464313515045468362009-02-13T09:14:00.016-05:002009-03-22T12:13:48.473-04:00Kauffman FoundationThe Kauffman Foundation is an organization which provides grants in the areas of education and entrepreneurship. Based in the United States it was established by Ewing Kauffman in the mid-1960's to help young people reach their full potential by finding pathways to new technologies and information on becoming an entreprenueur. You can see their web page at <a href="http://kauffman.org/">kauffman.org</a><br /><br />The Kauffman Foundation draws on many open source ideas including <a href="http://www.kauffman.org/uploadedfiles/open_collaboration_principles_12_05.pdf">collaboration principles</a> and draws interesting comparisons to <a href="http://www.kauffman.org/advancing-innovation/open-innovatioin.aspx">Open Innovations</a> and the World Wide Web. Using open source ideas to make medical science more accessible is one example. Ways to improve human welfare and improve health by the creation of a <a href="http://sciencecommons.org/">Science Commons</a> are also discussed.<br /><br />Another activity the Kauffman Foundation tries to encourage is young entrepreneurship. The ability of young people to take risks and their natural curiosity combine together to create the entrepreneurial spirit. The programs supported by the Kauffman Foundation such as the <a href="http://www.kauffman.org/entrepreneurship/all-terrain.aspx"><span style="font-weight: bold;">All Terrain Brain</span></a> and <a href="http://www.kauffman.org/entrepreneurship/hot-shot-business.aspx">Hot Shot Business</a> are designed to help kids develop their entrepreneurial skills.<br /><br />Included in the Kauffman Foundation's web site are many embedded flash <a href="http://video.kauffman.org/services/player/bcpid1811456713?bclid=1612721919&bctid=1805490969">videos</a> of student entrepreneurs. Many ideas on starting a business are discussed such as social networks, book writing and business plans. Some of the young entrepreneurs featured are as young as 19. Although the Kauffman Foundation is not the largest such foundation the grants are of significant amounts reaching several hundred thousand dollars in some cases.<br /><br />The Kauffman Foundation is planning to help entrepreneurs during the current economic downturn. It has recently launched a new national training program called the <a href="http://www.fasttrac.org/highlight.cfm?id=427">FastTrac LaunchPad Initiative</a>, designed to help entrepreneurial start-ups after a job loss. One of the goals of FastTrac, a program of the Kauffman Foundation, is a hands-on business development program designed to help entrepreneurs improve their skills to create, plan, manage, and grow a successful business. The program includes facilitator-led sessions, small-group discussions, guest experts, idea sharing with peers, and business coaching and mentoring.<br /><a href="http://en.wikipedia.org/w/index.php?title=Special:Search&search=entrepreneurial&fulltext=Search&ns0=1&redirs=0" title="Special:Search"><em></em></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-2946431351504546836?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-55529124060186366912009-01-27T13:34:00.017-05:002009-01-28T15:28:21.707-05:00Web Hosting RatingI came across some interesting information the other day at <a href="http://webhostingrating.com/articles/">Web Hosting Articles</a>. This site acts as a concentrator of information about web hosting which includes reviews on hosts and articles on co-location, <a href="http://webhostingrating.com/articles/category/scripting/">scripting,</a> <a href="http://webhostingrating.com/articles/category/ecommerce/">e-commerce</a>, <a href="http://webhostingrating.com/articles/category/security-issues/">security,</a> <a href="http://webhostingrating.com/articles/category/linux-web-hosting/">Linux hosts</a>, Windows hosts, Domain names and general news. Each month visitors can submit hosts to the site and vote for the <a href="http://webhostingrating.com/awards">best web host</a> in twelve different categories.<br /><br />Anyone interested in a <a href="http://en.wikipedia.org/wiki/Content_management_system">Content Management System</a> including Joomla, Drupal, Wordpress, Coppermine and more can check out the ratings and price of various <a href="http://webhostingrating.com/rating/cms/joomla">hosts</a> who offer such services. Each host is ranked by vote and limits on space and traffic are listed along with a detailed review of all the <a href="http://webhostingrating.com/directory/InMotion">features</a> provided. New hosts are listed as they are <a href="http://webhostingrating.com/submit">submitted</a> to a <a href="http://webhostingrating.com/directory">directory.</a><br /><br />Developers and programmers may find a list various <a href="http://webhostingrating.com/articles/category/scripting/">web hosting tutorials</a> of interest. A concise review of each of the major scripting languages shows their pros and cons along with their uses. I'm pleased to see that open source scripts are recommended and clearly there is a price saving of PHP and Perl over ASP. Not that I missed it but one technology I didn't see mentioned or used on the site was Adobe Flash.<br /><br />Even though I am a command line sort of person I checked out the page on <a href="http://webhostingrating.com/articles/category/control-panels/">Control Panels</a>. There is a plethora of information there. The first time sys admin will probably be glad of some sort of control panel. I've used <a href="http://en.wikipedia.org/wiki/Plesk">Plesk</a> before and it seemed pretty easy to use. Other ones mentioned include cPanel, Supreme Control Panel, Helm and SiteWorx. There are also <a href="http://webhostingrating.com/articles/category/cpanel/">web hosting tutorials</a> on control panels which talk about ease of use and security in greater detail.<br /><br />If you are looking for information on hosts this site is a good starting point, especially if you are just getting started. People looking for budget hosting or a host for their blog will find plenty of <a href="http://webhostingrating.com/directory/globat">choices</a>. Even if you are more experienced you will probably find information you didn't know before.<br /><br /><br /><a href="http://webhostingrating.com/"><img src="http://webhostingrating.com/images/banners/04_120x90ar_v01.gif" alt="Web Hosting Rating" border="0" height="90" width="120" /></a><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-5552912406018636691?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com1tag:blogger.com,1999:blog-5839270841298813647.post-58433617864739634072009-01-21T15:12:00.009-05:002009-01-21T15:43:21.824-05:00The Funny Papers 1934 Part III've been looking at the old funny pages in the Toronto Star again. Everything seems new when you have never seen it before even when it's very old. This one was actually funny, complete with cigar-chomping boss:<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://maxhost.org/blog/uploaded_images/crusty-710771.jpeg"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 140px;" src="http://maxhost.org/blog/uploaded_images/crusty-710766.jpeg" border="0" alt="" /></a><br /><br><br />You can see Part I of the article here: <a href="http://maxhost.org/blog/2008/09/funny-papers-circa-1934.html">Funny Papers Part I</a><br /><br><br><br />Not even mighty <a href="http://wikipedia.org">Wikipedia</a> seems to know of Chris Crusty, but I have seen him on ebay! This comic strip was dated December 8th, 1934. Chris Crusty was created by Bill Conselman and Charlie Plumb.<br />This image was too big to fit on my scanner so I used the Gimp to combine two scans into one. A full page of the Saturday funnies was 15.5 inches wide and 21 inches long.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-5843361786473963407?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-48637239471491015382009-01-16T13:16:00.002-05:002009-01-16T13:28:38.070-05:00Get a CoderLooking for a programmer, web designer or freelance writer? Got a project but need help to finish? Do you have Linux skills and bills to pay? If so then click on the link below:<br /><br><br /><a href="http://www.getacoder.com/affiliates/ref.php?u=cubexyz"><img src="http://www.getacoder.com/img/affiliates/afbanner.gif" width=468 height=60 alt="Get custom programming done at GetACoder.com!" border=0></a><br /><br><br />There are many categories including graphics, gaming, marketing and promotion, training and many others. On the main page you can see projects with their average price, bids, categories and the date the project started. One of the main benefits of <a href="http://getacoder.com">GetaCoder</a> is the ability to shop around for low labour rates. Students can see exactly which skill sets are most common and train themselves accordingly.<br /><br><br />There is no fee to join and listing projects is also free.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-4863723947149101538?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-30841529370886547772008-12-28T14:15:00.002-05:002008-12-28T14:30:35.145-05:00Text Processing with PerlI was trying to use OpenOffice for spreadsheet purposes and I quickly came to the conclusion it was too slow and bloated. Then I remembered that awk could be used for text processing. Someone on IRC suggested to simply use awk and vim. All I needed was an easy way to add up some numbers in a text file and this is what I came up with:<br /><br />awk '/\// { sum1 += $3 }; END { print sum1 }' /hd1/text/ptc.txt | while read a<br />do<br /> echo "ptc total: " $a > /hd1/text/current-earnings.txt<br />done<br />awk ' { sum2 += $2 }; END { print sum2 }' /hd1/text/surveys.txt \<br />| while read b<br />do<br /> echo "survey total: " $b >> /hd1/text/current-earnings.txt<br />done<br />awk ' { sum3 += $2 }; END { print sum3 }' /hd1/text/ads.txt \<br />| while read c<br />do<br /> echo "ad total : " $c >> /hd1/text/current-earnings.txt<br />done<br /><br />Not very elegant is it? Then another IRC person suggested to use Perl. The big problem with the awk script above is the awk task gets spawned in a child shell and can't set any environment variables in bash. Let's try again and use Perl:<br /><br />sum1=`perl -e 'foreach (<>){@a = split(/\s+/); $s1 += $a[2];}; print $s1;' /hd1/text/ptc.txt`<br />echo "ptc total: $" $sum1<br />sum2=`perl -e 'foreach (<>){@a = split(/\s+/); $s2 += $a[1];}; print $s2;' /hd1/text/surveys.txt`<br />echo "survey total: $" $sum2<br />sum3=`perl -e 'foreach (<>){@a = split(/\s+/); $s3 += $a[1];}; print $s3;' /hd1/text/ads.txt`<br />echo "ads total: $" $sum3<br />total=`perl -e '$e += $_ foreach(@ARGV); print $e' $sum1 $sum2 $sum3`<br />echo "Grand total: $" $total<br /><br />That's better. Now I can put this into a file called 'earnings' and make it executable and I'm off to the races. Paid surveys make the most money for me followed by PTC and the ads make the least. One can easily adjust things if you need to add numbers in a different field. The variable $a[2] refers to the 3rd field in the text file, as an example:<br /><br />12/26/08 clixsense 0.70 (min $10)<br /><br />The last part of the script adds the sums and gives the total.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-3084152937088654777?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-59718671317675766782008-12-12T01:14:00.007-05:002008-12-14T02:49:40.814-05:00Hacker ScriptsOne of the things bad hackers like to do is run their code on other people's computers. Some of the ways this is done is via Perl or PHP scripts. Here is an example of a simple information gathering script written in PHP:<br /><br /><a href="http://maxhost.org/scripts/v7id.txt">v7id.txt</a><br /><br />It looks innocuous, but what does it do exactly?<br /><br />It returns the UID, GID and Groups numbers of the account the script was executed on as well as all the group names. After that it does a "uname -a" and returns some system information (e.g. the exact version of the kernel you are running). Finally it returns the amount of free disk space and the total amount of disk space.<br /><br />This is still bad because it means that there is some vulnerability in your system even though the script doesn't do anything destructive. After scouting out your system they are in a better position to compromise it.<br /><br />Now if someone is always on the server they can keep an eye out for certain tell-tale signs of hacker activity. Sometimes you'll see things that look like hacker activity but aren't, e.g. <a href="http://reddit.com/">Reddit</a> or some other popular site linking to one of your web pages.<br /><br />Some of the danger signs:<br /><br /><ol><li>Much higher than normal disk activity</li><li>Too many instances of sendmail</li><li>Instances of lwp-download or wget running when they shouldn't be</li><li>More than one process running klogd or acpid </li></ol>Danger sign #4 is interesting because it's an example of misdirection. Usually when you see two processes running klogd one of them is a fake. The hacker knows that if the system admin sees some weird process running that they're going to kill it right away, but if it's something that should be running like klogd then maybe they're not going to notice.<br /><br />Security of your server is an on-going job and this blog entry is only scratching the surface. One simple thing you can do is to lock down important executables with "chmod 700" so only root can read, write or execute them.<br /><br />Here is a list of executables that should be locked down, assuming they're on your system:<br /><br />wget, elinks, curl, lynx, vsftpd, ftp<br /><br />Basically any command that can "phone home" should be locked down. Even if you think your security is pretty good some new exploit could allow the bad hackers a way to execute scripts on your system.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-5971867131767576678?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-17426104910668506402008-11-22T14:20:00.003-05:002008-11-22T15:15:16.096-05:00Tools for Web PagesWhen I first started creating web pages back in early 1996 I used a text editor. Now almost 13 years later I still use a text editor for my own site <a href="http://cubeman.org/">cubeman.org</a>. As you can see everything is pretty simple. No great effort was expended to select a particular font or colour. The over-riding criteria was that the site should work correctly on the maximum number of browers.<br /><br />To this end one can quickly develop a list of things one should <span style="font-style: italic;">not </span>do<span style="font-style: italic;">.<br /><br /></span>Do not:<br /><ol><li>Use Flash</li><li>Use animated gifs (these are really annoying)</li><li>Use technology that only works in IE</li></ol>Now with sites that are artistic things change a bit. Let's take <a href="http://mandalacreation.com/">mandalacreation</a> as an example. It's far better looking than the cubeman.org site. If you look at the HTML files of mandalacreation you will see that the largest file is over 20,000 bytes. It's too complex to go in there with a text editor and update things especially with all the tables. In this situation I would recommend using <a href="http://net2.com/nvu/">NVU</a>.<br /><br />As one can see from the site NVU is a free web authoring program which is available for Linux, Windows and Mac. It's a relatively easy to use program in the "What You See Is What You Get" mode. Better still NVU is open source and covered under the MPL/LGPL/GPL tri-license.<br /><br />What other software you will find useful depends on what you are trying to do. For picture gallerys I use <a href="http://coppermine-gallery.net/">Coppermine</a> and for forums I use <a href="http://drupal.org/">Drupal</a> and your host server will need to run the open source database <a href="http://www.mysql.com/">Mysql</a> (along with Apache, PHP, and GD).<br /><br />Things change so quickly on the Web that there's no way to keep up with all the newest technologies. My main advice remains the same: Keep things simple and provide as much useful information as possible.<span style="font-style: italic;"><span style="font-style: italic;"><br /></span></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-1742610491066850640?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-30950190571011142712008-11-15T15:14:00.008-05:002008-12-07T07:08:56.247-05:00The Best PTC SiteOne of the newest net phenomenas are the rise of numerous PTC or Pay to Click sites. To briefly describe PTC: basically they are sites where you are paid to look at online ads, usually for a minimum of 30 seconds. Judging by the number of these sites advertisers must love them. I've tried a number of PTC sites and one site stood out from the rest:<br /><br /><a href="http://www.neobux.com/?r=cubexyz"><img src="http://www.neobux.com/imagens/banner/?u=cubexyz&u2=657" border="0" height="60" width="468" /></a><br /><br />Naturally it is Linux compatible. There was only one PTC I tried which wasn't compatible and that was <a href="http://sandraclicks.com/">SandraClicks.</a> Sandraclicks is still a pretty good site, just not for hard-core penguinistas!<br />UPDATE: Dec. 6, 2008 It appears that the Sandraclicks site is now dead.<br /><br />Neobux has a clean design and has a forum for any questions you may have. Looking around the net you will find that many sites rate this PTC site as the best of it's kind. You will get at least 4 ads per day even for standard members and possibly more if you check back often.<br /><br />One may rent referrals and the system will replace inactive referrals after 14 days of no clicks. Paidouts are fast and requests are filled within 48 hours via <a href="http://alertpay.com/">AlertPay</a>.<br /><br />After thinking about PTC sites it seems that it is better to concentrate your efforts into a few really decent sites rather than signing up to a bunch of them and given the good qualities of Neobux I can say that this one is worth the effort.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-3095019057101114271?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com1tag:blogger.com,1999:blog-5839270841298813647.post-51291926804096827012008-11-12T14:35:00.003-05:002008-11-12T14:40:33.173-05:00Linux Game Publishing Auction for EFFThis appeared today from <a href="http://linuxgamepublishing.com/">Linux Game Publishing</a>:<br /><br /><span style=""><span style="font-size:100%;">Today, we have made the decision to do some good with the extremely sought-after #1 copy of <a href="http://www.linuxgamepublishing.com/info.php?id=36&">X3: Reunion - Special Edition</a>. We have assigned #1 as a special For Charity Auction on Ebay, with the proceeds going to the <a href="http://www.eff.org/" target="_blank">EFF</a>. We ask all of our customers to consider bidding on <a href="http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=270301957810" target="_blank">this auction</a> and raising money for a great cause.</span><br /></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-5129192680409682701?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-9479280774162160762008-11-11T19:07:00.003-05:002008-11-11T19:33:45.781-05:00Linux Accounting SoftwareIf you have your own small business you probably need some sort of accounting software. It would be nice to be able to download a basic account package at no cost and run it on your Linux box wouldn't it? Fortunately such a package exists called <a href="http://linuxcanada.com">Quasar</a>.<br /><br />I should mention that I have used this program to issue invoices and quotations to customers. As I am in Ontario it was setup to charge GST and PST where appropriate. It's easy to use.<br /><br />Here is an example of an <a href="http://maxhost.org/invoices/sample-invoice.pdf">invoice</a>.<br /><br />The program can print to a ps file. In the example above I used the utility ps2pdf to convert from ps to pdf. Usually I email my customers the pdf file as everyone has software that understands pdf.<br /><br />The source code is available and can be modified and licensed if one wishes to use it for their geographical area.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-947928077416216076?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-84750258394826576802008-11-04T07:41:00.004-05:002008-11-04T08:28:40.160-05:00The Trouble with DRMRecently I experienced first hand one of the major problems with DRM or Digital Rights Management. It seems that under certain conditions that Windows will not play certain media, even if the media has been legally purchased. Now the situation is rather bad on Linux as there is no DRM mechanism to legally buy music or videos so I use a secondary computer running Windows 2000 to do that. The problem was that I would get a codec error after Windows Media Player downloaded the license for the media. Using a program called <a href="http://fileforum.betanews.com/download/FairUse4WM/1156529648/1">Fairuse4wm</a> I was able to remove the DRM. Once the DRM was removed I no longer got the codec error and could play the media, which to me means the codec error was bogus.<br /><br />For Canada the online music store of choice seems to be <a href="http://www.puretracks.com/content/viewer.aspx?cid=GlobalNav_Home">Puretracks</a>. Most of the music there is DRM-laden I'm sorry to say but there are also some mp3 songs. One can purchse music using their credit card (songs are usually 99 cents to $1.25 each), use Fairuse4wm and then transfer your songs over to your Linux box.<br /><br />Now there are three big sticking points with DRM:<br /><br />1) You must obtain a license to play media files with DRM but all sorts of problems can occur. You might not be able to talk to the server which provides the license or your operating system could have some problem with files used in the DRM process. DRM essentially adds another level of complexity which makes screw-ups more likely.<br /><br />2) Your media could have some expiration term. Some of the tennis videos will expire after one year.<br /><br />3) You are forced to use Microsoft Windows in almost every situation so your choice is restricted unless you remove the DRM. This is quasi-legal ground but to me the greater good is to have files which can be backed up and transferred to another device, whether it be the CD-player in your car, or a portable mp3 device or your Linux box.<br /><br />Now let me just say that I don't advocate downloading music illegally or using file sharing programs to share copyrighted material with the rest of the world. My policy is to buy DVDs, CDs and to download music from respectable online stores. The big problem is that the powers that be continue to tweak their DRM so many folks can't even play the media they legally purchased. So far I can report that the removal of DRM was possible every time I encountered it. It's the old story once again: You will need a Windows computer to make this minor miracle possible.<br /><br />Even if some DRM mechanism was made for Linux I don't think it would work very well, and let me say that the prospect of my media becoming expired really kills the whole idea for me. DRM is so problematic that many customers who are normally law-abiding citizens could be tempted to use file sharing programs instead of using legitimate downloading services. The best solution is to make downloads easy and perhaps make some appeal to customers like "OK folks, we got rid of the DRM. Almost everyone hated it so we removed it. Please don't share the files and we promise not to reintroduce the DRM". It could work, 99 cents per song is a price people are willing to pay.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8475025839482657680?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-62702547225014373682008-10-31T06:30:00.004-04:002008-12-12T00:52:07.187-05:00Making money using LinuxYes, it is possible! :)<br /><br />First you can run ads on your web site and/or blog. Like many others I have tried <a href="http://www.adbrite.com/">Adbrite</a> and <a href="http://www.google.com/adsense">Adsense</a>. Both services will work using a Linux server. Of the two services most people will probably earn more money with Adsense but there is no reason why you can't try both. The usual logic applies here, the more traffic = more clicks = more earnings.<br /><br />Another way you can generate some extra money is to participate in online surveys. My experience so far is that one can make more money with surveys than with ads. If you are Canadian then one of the best survey sites is <a href="http://www.webperspectives.ca/">Webperspectives</a>. This is a really good site and it pays via paypal but I'm not sure it is 100% Linux compatible. I hate to say this but if you are a Linux user it may be a good idea to have a second computer handy running Windows 2000 or newer just in case you encounter a survey that uses activex or is otherwise Linux unfriendly. I can also recommend <a href="http://www.inboxdollars.com/">InboxDollars</a> (link to the left or at the bottom) but unfortunately this one will probably require a Windows computer.<br /><br />There are also many sites that will pay you to look at ads. You can even buy referrals so you can receive money via other people looking at ads. There are tons of these types of sites but I had the most luck with <a href="http://bux.to/">Bux.to</a>. One advantage is that many of these sites will pay out quickly via Paypal or Alertpay. I haven't had any problems using my Linux computer and Firefox to use these sites, but the earnings were significantly less than the survey sites, at least without buying any referrals.<br /><br />A third method for making money is to write articles for services like PayPerPost and <a href="http://blogsvertise.com/">Blogsvertise</a>. PayPerPost requires a blog to be at least 90 days old and have 20 articles or more before it can be considered for paying jobs. Evidently some people are making some serious money, upwards to $20,000. So far I haven't made anything from these services as my blog is too new. On a positive note it appears that Linux users will have no problem signing up and the people there seem friendly.<br /><br />This topic definitely needs a follow-up so I'll be sure to write more on my future experiences, especially where PayPerPost is concerned. I enjoyed most of the surveys and it didn't really eat up too much time. Getting paid to look at ads is definitely less fun and the money doesn't seem to be too good but some others do report earnings of hundreds of dollars. The trends are clear, it seems online jobs are here to stay and if one is determined enough you can indeed make some money. If you feel that the earnings are too meager with one particular site don't be afraid to drop it as there are tons of sites out there.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-6270254722501437368?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-87789757636338442872008-10-28T02:51:00.005-04:002009-01-17T20:03:43.330-05:00Determining Filenames for DevicesIn Linux each device is given a filename but it is not always obvious what filename goes with each device. One package which can help is <a href="http://freshmeat.net/redir/sg3_utils/20654/url_tgz/sg3_utils-1.26.tgz">sg3_utils</a>. Download it and do the usual ./configure and make all. Once the package is installed do as root:<br /><br />sg_scan -i<br /><br />On my system the output is as follows:<br /><br />/dev/sg0: scsi0 channel=0 id=0 lun=0 [em]<br /> Generic USB SD Reader 1.00 [rmb=1 cmdq=0 pqual=0 pdev=0x0]<br />/dev/sg1: scsi0 channel=0 id=0 lun=1 [em]<br /> Generic USB CF Reader 1.01 [rmb=1 cmdq=0 pqual=0 pdev=0x0]<br />/dev/sg2: scsi0 channel=0 id=0 lun=2 [em]<br /> Generic USB SM Reader 1.02 [rmb=1 cmdq=0 pqual=0 pdev=0x0]<br />/dev/sg3: scsi0 channel=0 id=0 lun=3 [em]<br /> Generic USB MS Reader 1.03 [rmb=1 cmdq=0 pqual=0 pdev=0x0]<br />/dev/sg4: scsi1 channel=0 id=0 lun=0 [em]<br /> ST380211 0A 0000 [rmb=0 cmdq=0 pqual=0 pdev=0x0]<br />/dev/sg5: scsi2 channel=0 id=0 lun=0 [em]<br /> SONY DVD RW DRU-190A 1.64 [rmb=1 cmdq=0 pqual=0 pdev=0x5]<br />/dev/sg6: scsi2 channel=0 id=1 lun=0 [em]<br /> BENQ DVD DUAL DW1610 B8B9 [rmb=1 cmdq=0 pqual=0 pdev=0x5]<br /><br />Now it's clear what the filenames are for each device but it's still rather hard to remember that one's second DVD burner is called /dev/sg6. So we use the sg_map command as root:<br /><br />sg_map<br /><br />The output on my system:<br /><br />/dev/sg0 /dev/sda<br />/dev/sg1 /dev/sdb<br />/dev/sg2 /dev/sdc<br />/dev/sg3 /dev/sdd<br />/dev/sg4 /dev/sde<br />/dev/sg5 /dev/scd0<br />/dev/sg6 /dev/scd1<br /><br />Now we have enough information to figure out what the names are for each of the sg devices. In my case it includes the multi-card reader (sda to sdd), the external usb hard drive (sde) and the two DVD writers (scd0 and scd1).<br /><br />To mount an SD card:<br /><br />mount /dev/sda1 /mnt/usb3<br /><br />On my system I don't usually refer to /dev/scd0 when I'm accessing one of my DVD writers. Instead I link it do a more descriptive name:<br /><br />ln -sf scd0 /dev/dvd1<br />ln -sf scd1 /dev/dvd2<br /><br />This does not include everything, only those units the system considers sg devices. You may find that the device names are different on your version of Linux. Finally one can check out the filenames for their scanners via:<br /><br />scanimage --list-devices<br /><br />Which outputs on my system:<br /><br />device `v4l:/dev/video0' is a Noname BT878(Hauppauge (bt878)) virtual device<br />device `hp:/dev/usb/scanner0' is a Hewlett-Packard ScanJet 5200C flatbed scanner<br /><br />If I want to tell kooka to use the HP scanner I do:<br /><br />kooka -d hp:/dev/usb/scanner0<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8778975763633844287?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-45288612043586690902008-10-24T01:12:00.006-04:002008-10-25T02:00:06.298-04:00Sherlock Holmes in the 21st CenturyIt was a cold day in October as Holmes and I went to visit the computer museum. The streets were rather crowded with automobiles and we were glad to remove from this somewhat hazardous environment. Although we considered ourselves Victorian gentleman it had become obvious to both of us that we needed to become familiar with these new devices. As we looked about us the museum seemed a stark clinical place with very little charm. The walls and floor were white with computers lined up against both sides. There was a time-piece visible as we came in which had a red digital LED display, common in this era.<br /><br />Holmes keen eyes quickly took in the surroundings and remarked "Well Watson, how do you like the 21st century so far?".<br /><br />I was feeling out of place and had a slight headache. "It seems to me that the world has become very noisy Holmes. Was it really necessary to come here?"<br /><br />"We must fully avail our minds with the technology of the times, Watson. Our purpose here is to find a suitable computing device for us both. You can be sure that the criminals of this era have already done so. But since computer technology changes so quickly it is not in the hardware we should concentrate on, but the software."<br /><br />"Software Holmes? I'm not even sure what the term means! I gather that these devices here that resemble typewriters are the hardware, but what is meant by software?"<br /><br />Holmes began typing on one of the units, a somewhat out of date machine called an 'Amiga 4000'. There were various cables and plugs, one of which disappeared into the wall.<br /><br />"It is a bit like cooking Watson. Think of the recipes your wife kept in the kitchen. A list of instructions to prepare a meal. Although it is more sophisticated than that as there are different kinds of software. In this case we are interested in operating systems."<br /><br />"Why operating systems Holmes?"<br /><br />Holmes folded his arms and formed a judicial pose.<br /><br />"Well you see hardware is transitory, due to the rapid improvements in technology. If we were to choose this machine here we would be at a dead-end. It's operating system is no longer maintained and improved upon, so despite the fact that it was an excellent computer in it's day, it is not a good choice in the long run. We need an operating system that is actively maintained and there are three choices which come to mind."<br /><br />I looked around spotted three devices which were separated from all the others.<br /><br />"Do these ones here represent your final choices Holmes?"<br /><br />"Yes, indeed" Holmes remarked as he walked over to me. "These three computers have actively maintained software and represent the best of what is available. There was a fourth one which I briefly considered called 'Macintosh' but I discounted it on the basis of cost. These three computers have generic hardware and are all identical save for the operating system on each."<br /><br />Holmes gestured to the computer on the left.<br /><br />"This one has Windows XP, a fairly modern incarnation of the series. It is the most commonly used OS and has the advantage of being fairly easy to use. It's main disadvantage is that it is a closed system and the user can not modify except in a very limited fashion and also the user must pay a significant price to legally use it."<br /><br />Holmes pointed to the computer on the right.<br /><br />"On this one we have BSD which stands for Berkeley Software Distribution. It's advantage is in it's security. It is very difficult to attack it from the outside. It is also an open system which is freely downloadable. Thus a dedicated user can modify and make improvements to their taste. It's main disadvantage is the lack of applications for it which makes for a rather boring desktop, nevertheless it makes an excellent server."<br /><br />Holmes sat down to the computer in the centre position.<br /><br />"Finally we have the Linux operating system which has many programs to choose from, has no cost to download and can be tailored to the taste of the user. It has most of the advantages of the other two and has an actively growing user base and most importantly a good variety of applications. While other systems have fallen by the wayside over the years this one, much like it's mascot the penguin, continues to endure in a harsh environment. This is the system we must now learn Watson."<br /><br />I looked over to my companion with rather bleary eyes and commented "Surely not now Holmes. I'm feeling rather weary and in the need of some <span class="ResultBody">sustenance."<br /><br />Holmes rubbed his hands together and said "I know just what you need Old Boy: Fish and Chips!"<br /><br />I groaned "Please Holmes, not Fishbone Alley again! I'll never live down that interpretation of myself!"<br /><br />Holmes grin broadened. "Surely such a dire fate can be avoided Watson. I'll get Mrs. Hudson to make us some shepherd's pie."<br /><br />Somewhat mollified I allowed Holmes to lead the way back to Baker's street. Even though I still felt uncertain of my ability to learn computers, given sufficient time and Holmes' help surely I would become competent at least.<br /></span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-4528861204358669090?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-89626489853865694382008-10-19T07:37:00.004-04:002008-10-19T23:05:55.075-04:00Fixing FTP Problems with BloggerThere's plenty of folks out there having ftp problems with blogger. There are a lot of folks running blogs on their own domains. I was one of those people. Basically any time I tried to publish a post for my blog it would timeout.<br /><br />First, a little background information. I run my own server which is connected to a Dlink DI-704P router. My first piece of advice to people in this situation is to make sure your router is getting the proper power it needs! Many times I have seen routers and DSL modems not work correctly because the DC power transformer was faulty. Sometimes the transformer will heat up a lot and that is a sign that it could be defective. If you are in doubt check your transformers with a volt meter.<br /><br />The problem I was having occurred when I had to switch from a DI-604 router to the older DI-704P router. The power transformer failed on the DI-604 and so I swapped the DI-704P router in. After the DI-704P router was connected I couldn't publish any blogger posts. I use vsftpd as my FTP server so I started looking at vsftpd.conf and tried different things to get it to work. <br /><br />Now I know that blogger is using passive ftp so one needs to make sure that their ftp server is set up for that. In my vsftpd.conf file there are the following lines:<br /><br />pasv_min_port=1023<br />pasv_max_port=1500<br /><br />Now as it turns out I had everything set correctly on the router itself. It had the necessary ports 1023 to 1500 open. The next line in the vsftpd.conf was the cause of all my problems:<br /><br />pasv_address=192.168.0.101<br /><br />This is the INTERNAL ip address of the computer on my LAN that runs the ftp server. I changed this address to my EXTERNAL IP ADDRESS and after a quick "/sbin/service vsftpd restart" everything worked perfectly. Now the strange part was that I was able to publish posts on the DI-604 with vsftpd set up with "pasv_address=192.168.0.101" before. It didn't always work but it worked some of the time. When I switched over to the DI-704P it would always have the timeout problem when posting. Now I'm pleased to say I can publish my blogger posts with no timeout problems.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8962648985386569438?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-1242322775368025432008-10-17T22:49:00.006-04:002008-12-12T00:54:51.722-05:00How Linux Friendly are Media Sites?<span colour="black"><br />A while ago I evaluated how easy it was to access video on several news and media sites. Below is how I rated them:<br /><pre><span style="color:black;">sux doesn't work at all<br />marginal works with severe limitations (e.g. flash-only)<br />good works with some limitations (e.g. microsoft formats only)<br />excellent works with standard formats (e.g. mp4)</span></pre><pre><span style="color:black;">video.citynews.ca citytv (toronto) sux<br />ctv.ca sux<br />cbc.ca good<br />wned.org good<br />cnn.com marginal<br />tvo.org flash 9, mp4 excellent<br />bbc.co.uk wmv, realplayer excellent<br />kob.com mp4 excellent<br /><br /></span><br /></pre>Since that time I had to again revise my opinion on the level of Linux friendliness of cnn.com. It was never that good but recently it's become downright hostile to Linux users. Not too long ago I could use flash 9 to see videos on cnn and before that I could look at the page source and actually capture video to the hard drive. Now one needs to have the "Turner Media Plugin" if you want to see the videos.<br /><br />As you can see from the list TVO and BBC were excellent, CBC was good and CTV was awful. Now I must add CNN to the list of awful sites (with respect to Linux). Now when I try to see a video all I get is a gray rectangle with the words "General Error". Like a bad virus cnn.com keeps morphing itself so that Linux users are unable to use their video services.<br /><br />In the past I would delve into CNN's site and try to decipher all the technical mumbo-jumbo, but this is the end. If by some miracle one manages to figure out a way to see videos on CNN under Linux no doubt it will morph again and all your work and time spent will be wasted. So now I will no longer bother with it and move over to other sites.<br /><br />As alternatives allow me to suggest <a href="http://tvo.org/">TVO</a> and <a href="http://wned.org/">WNED</a>.<br /><br />UPDATE: Oct. 21, 2008<br />Did a quick check on <a href="http://citytv.com">CITYTV</a> (the Canadian TV channel's web page) and for the Linux aficionado the pickings are slim. There are lots of flash ads and little interesting content. </span><div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-124232277536802543?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0tag:blogger.com,1999:blog-5839270841298813647.post-85581413349785100002008-10-14T00:44:00.011-04:002008-10-18T00:08:09.893-04:00Common uses of MencoderOne of the most popular uses of the internet is viewing videos on <a href="http://youtube.com/">youtube</a>. The 10 minute limit is rather short and often users will upload videos in parts to comply with the time limit. Let's say the video you're interested in is in three parts. One can download all the parts via a <a href="http://www.arrakis.es/%7Erggi3/youtube-dl/">python script</a> and use mencoder to combine the parts together:<br /><br />mencoder part1.flv part2.flv part3.flv -o all.flv -ovc copy -oac copy -of lavf -lavfopts format=flv<br /><br />Another interesting problem I came across was a video on VHS that was recorded on it's side. The reason this was done was because it was a recording of an upright video game and the display was higher than it was tall. The bash script to record from VHS to the computer is <a href="http://maxhost.org/other/record-from-vcr.sh.txt">here</a>.<br /><br />Then I used mencoder like so:<br /><br />mencoder -vf rotate=2 -o tempest-rotated.avi -oac copy -ovc lavc -lavcopts vcodec=mpeg1video tempest.avi<br /><br />One can also use mencoder to take a bunch of png files and make a video out of it:<br /><br />mencoder "mf://*.png" -mf fps=10 -ovc lavc -o file.avi<br /><br />This only scratches the surface of what mencoder can do, but it's definitely a useful tool.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5839270841298813647-8558141334978510000?l=maxhost.org%2Fblog%2Flinux-blog.html' alt='' /></div>cubexhttp://www.blogger.com/profile/06334616051847604357noreply@blogger.com0