Wednesday, July 16, 2014

wget A Super Duper Image Scooper !

I love downloading images on the internet! Cars, pin up girls, scenery and of course I've downloaded my fair share of stupid human tricks and fail pix.

Occasionally you come across a page of content and you just don't feel like clicking on each image or video individually. The other day I came across a site of hot rods with over a thousand images. That's a lot of clicks ! Who has time for that. Here's what you do.

wget to the rescue !

 You may have used wget to download stuff from the internet. A simple file grab with wget would look like this :


If you've never used wget before to download a file, search the internet for a file to download, open up a terminal, type wget and paste the download link after it like in the example above.

I don't know why but for some reason when I download something from the command line using wget it seems to download so much faster than downloading it in Firefox or using a browser. So I often cut and paste download links from the internet and download with wget from the command line. Ahright, I digress ! Assuming you understand the very basics of wget, here's how we would use it to grab images from a webpage.

Note: Use man wget to learn more about this command. This is the very basics and just something I've been experimenting with. 

The Command

wget -r --level=2 -v -A jpeg,jpg --wait=2

The above is all one line of code. So what do we have here and why does it work?

wget (command line utility used to download files)

-r (this is recursive, and will continue scanning directories to find the images or videos)

--level=2 (this will only allow it to scan 2 levels of directories, the higher the number the more directories it will download.)

(if you wanted to download an entire website of files you could omit the --level=2 NOT RECOMMENDED, but you could if you want)

-v  (this is verbose, and will show you whats happening as it downloads, again this is optional)

-A jpeg,jpg (this creates the accept list in this example jpeg, jpg,. You could just as easily change jpg to gif, flv, mp3, mp4 etc, etc, or change it up a bit and download jpg, and mp4. That would download images and video. You can add as many file types as you want here separated by comma.You get the point ! )

--wait=2 (this is really important, this gives you a 2 second wait before each downloaded file. This command will download files so fast, that you really want to add this to help decrease server load. If you were to download an entire site, leaving out --level you should probably increase this number to around 5 to 10 seconds. You don't want to DDoS the server.

Finally ...  (the web page or website you want to download. Again I would refrain from downloading entire websites, as this can really strain the server your downloading from.)

So there you have it. This is the very basics, and you could really get more detailed in creating a Super Duper Image and Video Scooper command.  As always to learn all the command options type man wget to learn more about this powerful tool/command ! Once you create a really great command , create a script for it and then you could just run the script and add the web address for instant downloading fun.

Enjoy !

Here's a link to the ftp: man page on wget.

Just thought I'd put this right here.

I've always loved ascii art. I found this here, and just thought it would look good here. Enjoy.

Wednesday, July 9, 2014

15 Month Update Linux Full Time

It's been about 15 - 16 months since I switched over to Fedora from Windows 7. I have to say, the longer I use Fedora full time the happier I am with my decision to drop Windows all together. The more I dive into using Linux the more useful stuff I discover. Much of this I will start sharing on the blog.

After using Microsoft operating systems for a little over 20 years, I had a real comfort factor using the product. If anything broke, I knew what the problem was and how to fix it immediately. It was an almost Zen like computing experience, and things rarely went wrong. If it wasn't for the fact that I really hated Windows 8, and the over priced software updates that came with it,  I may never have switched.

This confident user experience is a feeling I miss using Fedora. It's not for any bad quality in the Fedora product itself, but a simple lack of understanding on my part. When something goes wrong, I have to really research and read, and learn in order to fix the problem. Just like I had to 20 years ago when I started using Windows 3.11.

Just this week I  realized that familiar safe feeling is coming back with Fedora now. I may not know how to fix everything but if something is off I can usually figure out whats wrong, and what needs to be done to fix it.
I occasionally make a n00b mistake, like the other day when I deleted yum instead of a different program using RPM. Ya, I was using RPM to remove part of a package without removing all the dependencies and thinking yum for some reason and with a quick $ rpm -e --nodeps yum return, yum was gone. Dope !!! Yet, even after doing something so ridiculously idiotic, it only took about 15 minutes to fix ! Something that probably would of taken all day 15 months ago :) I have to say, it was a bit of confidence builder.

The mystery repair is always nice as well. Although it sucks not really understanding how you fixed something, and what you did to actually fix the problem. The fact that you got it to work, and knew what you had to do to make it work, is always gratifying. When this happens it's just a matter of time before you understand the "why" and "how" of it all !

I look back on learning Windows 20 years ago and remember how amazed I was with the computer. I read everything I could get my hands on, and learned the system inside and out. I could tell you what files did what, and why Windows used that file. I want to get this feeling with Fedora and Linux in general. Then I thought about it and realized 15 months into this and I've got a pretty good handle on this thing. Everyday I learn a little more now, and the more I learn the easier it is to understand. In a couple more years I'm sure I'll have that zen like feeling using Fedora or any brand of GNU Linux I choose. In the mean time I have a ton of great open source software to use, and a million ways to tweak my system for maximum work-flow.

On a final note, that is one of the things I'm getting really comfortable with now. I love the way a system can be tweaked a dozen different ways depending on what you're doing. Things like multiple desktops, and setting up the alt tab Windows switching are all huge time savers. The more I learn about KDE and the Linux command line, the more I incorporate the functions into my daily work-flow, and the more time I save. This in itself is worth the price of admission and will probably be the reason I never switch to a different operating system again. Only time will tell.

Monday, June 30, 2014

The Linux Mystery Repair

The computer mystery man.
 The other day I decided it was time for a yum --security update. If you don't know about the security plugin for yum, oracle has a great explanation of it here. As long as everything is running smooth , I'm not a big fan of updates. However, every few months or so I like to do a quick security update and make sure my system isn't overly vulnerable. I'm one of those people who feel no configuration is completely fool proof, (for every fool proof plan there's a new and improved fool !) however it is important to stay on top of security when administering a GNU Linux system.

So, why don't I like running updates when my system is running great ? For the exact reason I'm about to tell you. I run my security update, and there's a new kernel version waiting for me and about 30 or 40 other updates all security related. The files download, install, alls good, I reboot and I can immediately tell something is wrong with my screen resolution and graphics. On top of that all the cute little desktop effects that KDE offers aren't working anymore. WTF !

I do a search to see if anyone has reported this problem after updates, and discover that many people have . Next I read through a ton of posts, some make sense others not so much. After looking at  /var/log/Xorg.0.log
I discover that the update probably switched my system to a generic graphics driver. I then found this thread on the Fedora Forums that had my exact problem with the same chipset and on board graphics card I'm using.

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

 I follow the thread and agree that the mesa-dri-drivers need to be updated. Now here's where things get interesting ! All the while I'm taking notes, thinking about doing the blog post on this and trying  fix the problem. I update a couple different sets of drivers and nothings working. I do some reboots and still nothing. Same problem. The last thing I do is install mesa-vdpau-drivers.x86_64 and still nothing.

I realize 4 hours have passed, and my favorite Sunday night T.V show is coming on so I shut down the computer and watch some t.v. After my t.v. show I decided to go for a jog, (I'm getting fat !) come home, hop in the shower to rinse off the sweat, and give it one last try .  I boot up my system and holy crap on a cracker my desktop effects are working again and the graphics card appears to be rendering everything properly !

Now I thought I rebooted after the last driver update, maybe not. Also from what I read I thought I didn't have to reboot. Anyway this is the mystery repair. I love and hate when this happens ! I'm glad the problems fixed but I'm still somewhat confused as to how the problem got fixed. Almost makes you wonder if I fixed it or some mystery computer guru snook into the room while I was out jogging and repaired my system. Stranger things have happened. 

Anyway if you're having a hard time with KDE desktop effects not working after your last update, check out the above thread and see if it works for you. From what I researched it's currently a known bug and effects mainly that chipset. Good luck and sorry I couldn't be more helpful. It's a mystery !

Friday, June 13, 2014

Old Keyboard PS2 to USB

This is the old keyboard I found in the garage. It was a PS2 and I wanted to use it as a USB keyboard to plug into my laptop at home. I've been using it for about two weeks and all is going well. I thought about just ordering another keyboard until I seen how much they go for these days. So I'm really glad I got the adapter.

The keyboard in the picture is probably close to 20 years old. It's a Microsoft keyboard , running on my Fedora machine. The windows keys are now used for foreign language accents like í ñ ö and making symbols.

Microsoft ps2 keyboard now being plugged into my usb port on my linux laptop.

I got to know a guy at one of the local mega mart computer stores. They had a close-out bin in the back of the store of returned and damaged merchandise. The guy at the store would call when there was anything good in there. Hard drives, keyboards, ports, cables, you never really knew what you would find in there. At one time I had enough extra parts to build a computer from extra parts.  I originally purchased this keyboard for $5.00 similiar keyboards on Amazon are like $50.00 + dollars now. Here's one on Amazon for $255.00 Microsoft Natural Keyboard It's pretty close to what I'm using. Twenty years later its still going strong.

I hate people using my computer so the keyboard was painted making it unusable to anyone that didn't know how to type. I hate telling people no, so when people asked, "Can I check my email real quick?" I'd say sure, and 9 out of 10 times they would take one look at the keyboard and say "Never mind, I'll do it when I get home." No more downloaded email virii from friends email attachements !

Anyway, I was bored, felt like doing a quick post, and that's the history of the microsoft ps2 keyboard now being used as USB on my Linux machine.

Wednesday, June 4, 2014

Use the Compose Key To Type Accents In KDE 4.12

I'm trying to become a bi-lingual citizen and broaden my horizons in the fine art of linguistics. I've had a love affair with the Spanish language for some time now, and recently decided to start a learning Spanish blog to help me stay focused with my studies. One of the first things I realized I needed to do was set up my keyboard so that I could use the funky accents found in so many Spanish words. Por ejemplo: the blogs name is Mi Palabra Del Día. I needed to be able to put the accent mark over the "i" in Día.

What is a GNU / Linux user to do using KDE 4.12 ? You need to enable the compose key so that it can be mapped to any modifier key. The great news is you can also use this for math symbols like ½ or the copyright symbol ©, or confusing friends with an upside down ¿. If you look around you can find all kinds of lists of symbols that you can create enabling the compose key. Here's how it works.

First things first lets enable that compose key. This tutorial is for KDE 4.12 if you're using Gnome you can check out the tutorial that helped me figure this out here. GNOME tutorial. If you're using KDE 3.x try this.

O.k, using the application launcher of your choice go to System Settings -> Hardware -> Input Devices.

Click image to enlage. System Settings -> Hardware -> Input Devices. This is the icon highlighted in blue and circled in bright green.
Now you want to click on the Layouts tab.In the third column that says Shortcuts for Switching Layout , click on the Main Shortcuts button.

Click on the layouts tab circled in green towards the upper left. Then in the third column where it says Shortcuts for Switching Layout click the Main Shortcust button highlighted in green.

Next click on Position Of Compose Key and select the keys you want to use as the compose key. I used the Windows key because I rarely use it and I have one on the left side of my keyboard and the right side, so I thought it would be easier to use once I was comfortable with it. Select your keys and then press the apply button in the bottom left hand corner.

Click on Postition of Compose key, select the key or keys you want to use as a compose key, click the apply button in the bottom left hand corner and you are done !

That's it ! You're done. Now when you need to accent a letter like ñ you just hit the compose key and the corresponding keys that create the ñ symbol. In this case you would hit compose ~ n . For the í in día you would hit compose ' i.

Here is a list of all the symbols for Spanish o para español.

¿ compose key ? (for this one you have to hit the ? mark key twice while holding shift.

¡ compose key ! (done the same as above, ex: compose key shift!! gives you ¡

á compose key ' a (compose key apostrophe a)

é compose key ' e (same as above just hit e instead of a)

í compose key ' i

ó compose key ' o

ú compose key ' u

ü compose u (compose " u)

ñ compose key ~ n

For a full list of characters to use with your compose key click here.

Articles referenced :

Wednesday, May 28, 2014

Linux Friendly Product Review PS2 to USB Keyboard

I had an old keyboard sitting in my garage and thought it would be nice to use it on my laptop when I'm at home. So I went on Amazon and looked for a PS2 to USB converter for a keyboard. I should mention that I'm an Amazon affiliate but I only review products that I've used on this blog. Also if the product sucks, I'll tell you it sucked. This product however, did not suck and did exactly what it was supposed to do.

The Story ...

So the other day I found my old desktop computer keyboard in the garage. I remembered how much I liked the keyboard, unfortunately it was PS2 and I didn't think it work in my laptop. Then I thought maybe I could find a PS2 to USB converter and plug it into my USB port on the laptop.

So off I went to radio shack and thought I would just get a PS2 to USB converter and all would be well. Luckily radio shack didn't have one. The girl at the counter didn't even know what PS2 to USB was. The Old Hack Shack,  Radio Shack just keeps getting crappier.  Next choice was to go on Amazon and order one. I looked at a couple different converters and discovered by reading the reviews that you can't just use a standard PS2 to USB that you would use for a mouse. This was news to me and I was really glad I figured this out before I placed my order.

Apparently, you should get a special PS2 to USB for a keyboard. For a keyboard the USB adapter needs to convert the signal from the keyboard, otherwise it will not work. This then brought up the dreaded question of "will it work with GNU /Linux ?"

My understanding of this is that if the device you're purchasing meets the  "standard device specification"  or the "standard device protocols" of the device it should work in your Linux box. This isn't always the case, Linux can be a fickle friend, but for the most part, if you follow this rule the device should work.This goes for sound cards, video capture devices, and anything USB related.

Problems usually arise when companies deviate from the industry standard specification and then fix the problem using proprietary drivers. This can make it difficult to use the product for a Linux box, unless of course you write code and can create your own device drivers.  I, myself, can not perform such a task. 

So I did a little research online, and I couldn't really find out a lot about the PS2 to USB keyboard converter. I had a good feeling though and it only costed a whopping $9.00 so I took a chance. The item arrived in a couple days, I plugged my PS2 keyboard into the USB converter, plugged the converter into my computers USB port and all worked great. I now have a standard desktop ergonomically correct keyboard to use when I'm working at home on my laptop.

This was literally plug and play. This is something that is happening more and more with Linux devices and I can't say how happy it makes me. You have to love unwrapping a product, installing it in your computer, and it works right out of the box. 

So if you have a old PS2 style keyboard lying around and you want to plug it into a USB port this converter worked great on my Linux rig running Fedora20.

As always thanks for reading. I have more information on fonts and font management to post in the next few days. Feel free to comment and have a great day !