Suramya's Blog : Welcome to my crazy life…

September 20, 2011

New Script Web2Email Released

Filed under: Linux/Unix Related,Software Releases,Tech Related — Suramya @ 2:47 AM

Just released Ver 0.1 of Web2Email. Web2Email is a Perl Script that allows the user to send a message with a list of URL’s to a special mail account and get back a snapshot of the websites as PDF files.

You can download it from Scripts.Suramya.com: Web2Email.

If you want a demo, send an email to: web2email@suramya.com with website URL’s in the email body (one per line) and after about 5 mins you will get an email with the snapshots of the sites listed as PDF files.

Update: The cron job running this on my machine is having issues, will fix it once I get back home and this should be back up again tonight.

Update (22nd Sep 2011): The project wasn’t the cron job, there is an issue with the version of wkhtmltopdf that is available in the Debian repo. Basically if you have both http & https images in a site it goes for a toss. The static built version should fix this issue but haven’t got the time to install and test. Till that is done the demo version will be on hold.

As always I would appreciated any feedback/suggestions you might have.

– Suramya

September 19, 2011

Trouble-Maker: Learn to fix computer issues

Filed under: Computer Software,Linux/Unix Related,Tech Related — Suramya @ 2:38 AM

This interesting app randomly breaks your system so you can learn how to fix it.

Haven’t tried it yet because as of now I only have one working Linux system at home, but as soon as I fix that I will be installing this on my secondary system. Once I do that I will log my experiences here.

You can download it from Trouble-Maker‘s site.

– Suramya

September 18, 2011

How to set different backgrounds for each desktop in KDE 4.6.5

Filed under: Computer Tips,Linux/Unix Related,Tech Related — Suramya @ 11:59 PM

I have talked about How to set different backgrounds for each desktop in KDE4 in a previous post. However in KDE 4.6.5 the previous steps no longer work, so posting the new steps to get different backgrounds in KDE:

  • Click on the ‘Start Menu’ (The K at the bottom Right of the screen)
  • Click on ‘System Settings’ under the Settings menu
  • Double Click on the ‘Workspace Behavior’ under the “Workspace Appearance and Behavior” section
  • Check the “Different widgets for each desktop”
  • Click Apply

That’s it. Now you can change the wallpaper by Right clicking on the desktop and selecting ‘Desktop Settings’. Its good to know that the KDE Developers paid attention to complaints that the users made about their software and addressed it.

– Suramya

September 5, 2011

Getting RTL8111/8168B PCI Express Gigabit Ethernet controller to work in Debian 6

Filed under: Knowledgebase,Linux/Unix Related,Tech Related,Tutorials — Suramya @ 11:28 PM

Once I got Debian 6 installed on my server I needed to connect it to the internet to download updates etc, however my network card wasn’t being detected correctly so I had to perform the following steps to get it to work correctly:

  • Download the latest Linux drivers for the RTL8111 Chipset from the Realtek site on a computer that can connect to the Internet.
  • Copy the file over to your new system via USB or smoke signals
  • Login as root to the server
  • Identify the kernel version that you are running, using the following command:
  • uname -a

    It will give you a result like the following:

    Linux StarKnight 2.6.30-2-686 #1 SMP Sat Aug 27 16:41:03 UTC 2011 i686 GNU/Linux

    Now you need to install the kernel source code for this version on the server. First we need to find the package name of the kernel source code, we do that by running the following command:

    apt-cache search linux |grep header |grep 2.6 

    If you have a 2.4.x kernel, replace grep 2.6 with grep 2.4. Once you have the package name install it using the following command as root:

    apt-get install linux-headers-2.6.30-2-686

    Make sure you replace linux-headers-2.6.30-2-686 with the package name you got.

    Once we have the kernel source installed we can go ahead and install the driver using the following commands:

    tar -jxvf r8168-8.025.00.tar.bz
    cd r8168-8.025.00
    ./autorun.sh 
    

    This will compile the drive and install it. I didn’t get any errors when I ran it, but if you do get errors try searching for the error message on Google, it usually provides a solution.

    After I installed the driver I tried initializing my network but kept getting the following error message:

    StarKnight:~# ifdown eth0
    ifdown: interface eth0 not configured
    StarKnight:~# ifup eth0
    Ignoring unknown interface eth0=eth0.
    

    Fixing it was fairly simple though, all I had to do was edit the /etc/network/interfaces file and add the following lines to it (This assumes you are using DHCP):

    auto eth0
    iface eth0 inet dhcp
    

    Once you add the lines, you can try starting the network again using the command:

    ifup eth0

    If all went well, you will be assigned an IP address and will now be able to successfully browse the net.

    Hope this helped.

    – Suramya

    June 11, 2010

    The first foldable dual screen ebook reader/netbook is out

    Filed under: Computer Hardware,Linux/Unix Related,Tech Related — Suramya @ 2:07 AM

    If I would ever get a ebook reader I think I will go for this one or something similar.

    This is an Android device which has a 9.7″ E-paper Display and a 10.1″ LCD Touchscreen Display. So you can have a book open on one side and surf the web on the other side. Or have a programming manual open on one side and code on the other.

    The enTourage eDGeâ„¢ Specifications are as follows:

    * Dimensions: 8.25″ x 10.75″ by 1.0″ (closed)
    * Weight: approx. 3 lbs.
    * Internal Memory: 4 GB (3 GB for user)
    * E-reader File Formats: ePub, PDF
    * LCD Touchscreen Display Size: 1024 x 600 (10.1″)
    * E-paper Display Size: 9.7″ e-Ink®(1200 x 825), 8 shades of gray
    * E-paper Input: Wacom® Penabled®
    * Operating System: Linux with Google® Android®
    * Screen Rotation: 90 and 180 degrees
    * Connectivity: WiFi 802.11 b/g, Bluetooth capability
    * Battery Life: 16+ hours utilizing the e-reader screen / up to 6 hours running the LCD screen
    * Battery Type: Lithium-ion polymer
    * External Memory: SD card slot, 2 USB ports
    * Audio and Microphone Jack: 3.5 mm each. Includes internal microphone and speakers.
    * Audio playback: MP3, WAV, 3GPP, MP4, AAC, OGG, M4A
    * Video playback: 3GP, MP4, Adobe Flash Lite (H.264)
    * Input: Stylus input on e-paper and touchscreen. Virtual keyboard. USB keyboard (optional)

    The cost is $499.

    – Suramya

    Source: Handle With Linux.

    April 4, 2010

    What to do if your printer suddenly stops working on Linux

    Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 10:22 PM

    Its happened to me twice so far that when I try to print to my HP Deskjet F380 the job just sits in the print queue and is apparently on hold. Canceling the job and printing again doesn’t fix the problem and when I hook up the printer to another system it works fine.

    The problem is that the printer has been ‘disabled’ for some reason on the system. I think that this happens when you are printing something and you switch off the printer in the middle but haven’t confirmed that yet.

    To fix it you need to ‘Enable’ the printer. There are two ways you can do this:

    Using the Printer Configuration GUI

    1. Run the ‘system-config-printer’ GUI via Start -> system -> Printing or from the command prompt.
    2. Right click on the printer
    3. Click on ‘Enable’ in the drop down menu.

    That’s it. Now the queued print jobs should start processing again.

    The other method is using the CUPS Web interface

    1. Login to the CUPS interface at: http://localhost:631/
    2. Click on the ‘Printers’ tab
    3. Click on the Printer that is having issues from the list on the page
    4. Click on the ‘Maintainence’ Drop box
    5. Select ‘Resume Printer’

    You should get a message like: “Printer Deskjet_F300_series has been resumed. and you are done.

    Hope this helps someone.

    – Suramya

    February 24, 2010

    Getting Wireless on my HP Pavilion DV5000 to work on Linux

    Filed under: Computer Software,Knowledgebase,Linux/Unix Related,Tech Related — Suramya @ 10:46 PM

    I have heard that connecting to wireless networks can give a lot of trouble in Linux. I have even experienced the same when I tried out Debian and Red Hat Enterprise Linux (RHEL) 5 on my HP Pavilion DV5000 laptop. In Debian I managed to get the card working but on RHEL I couldn’t get it to work.

    Actually I could have gotten it to work but lacked the time to spend trying out various solutions. Plus the final solution wasn’t very elegant or portable. Basically what I ended up doing was hardcoding the config file to connect to a particular wireless network. Which obviously wasn’t a very portable solution.

    When I decided to try out Backtrack 4 which is a Linux-based penetration testing distribution that is based off Ubuntu I was worried that my wireless card (Broadcom BCM4318) would again cause issues. If you have been using Linux then you probably have heard of this-chip set as earlier versions of Linux had a lot of problems getting this card to work and so I was expecting a lot of work before I got the card to work.

    While the OS was installing I did a little search on google and that reminded me of a post on Tech Republic that talked about 10 tools to connect to wireless networks in Linux so I decided to try out each of them to see which one worked for me.

    Fortunately for me the first program I tried (wicd) solved my problem. All I had to do to get the network working was: log in as root and then run the following command:

    /etc/init.d/wicd start

    Once I ran the command all my network cards were automatically detected and I could configure them. However since its a pain to configure the cards manually, I ran the following command to start the GUI based client for wicd:

    wicd-client

    When you run wicd-client a new icon shows up in the system tray (next to the clock) and if you double click on the icon the Wicd manager starts and allows you to configure any wireless/wired network that the system detects.

    Over all, wicd is quite easy and a lot more intuitive than the default KDE Network manager, plus another advantage is that wicd supports WPA which the default KDE Network manager doesn’t.

    Now that I have gotten the card working on Ubuntu I am going to re-install RHEL on the laptop and see if wicd can get the card working over there also. But that’s work for another day.

    – Suramya

    February 13, 2010

    Determine If Shell Input is Coming From the Terminal or From a Pipe

    Filed under: Knowledgebase,Linux/Unix Related — Suramya @ 2:23 AM

    Figuring out if the input to a script is coming from the terminal or from a pipe is not something that I have ever had to use but I found the possibility very interesting so sharing it over here:

    #!/bin/bash
    
    stdin="$(ls -l /dev/fd/0)"
    stdin="${stdin/*-> /}"
    ftype="$(stat --printf=%F $stdin)"
    
    if   [[ "$ftype" == 'character special file' ]]; then 
    	echo Terminal
    elif [[ "$ftype" == 'regular file' ]]; then 
    	echo Pipe: $stdin
    else
    	echo Unknown: $stdin
    fi
    

    – Suramya

    Source: Linux Journal

    February 5, 2010

    Learn to use search effectively in Linux using grep

    Filed under: Linux/Unix Related,Tech Related,Tutorials — Suramya @ 11:59 PM

    grep is a really powerful tool that allows you to search for specific string/data within a given text. This text can be a list of files or the content of a given file, even a list of programs running. Basically it allows you to filter the required text from background noise.

    As you can imagine it is a very powerful tool but most people don’t really learn to use it well. Zahid Irfan wrote a very nice blog post on ‘Why grep almost never yields something productive‘ for new Linux users and has some great examples that explain grep usage quite well for all users both new and experienced

    Check it out.

    – Suramya

    January 12, 2010

    TinyOgg: Convert flash videos to ogg for viewing and download

    Filed under: Interesting Sites,Linux/Unix Related — Suramya @ 11:37 PM

    The site TinyOgg.com which was launched recently allows you watch, listen and download Flash-based videos without the need to use Flash technology. What this means is that you can use the site to convert videos from sites like YouTube to .ogg files and download them to your local computer.

    Now you might be asking what the problem is using Flash to view the video directly, instead of converting it to ogg. Here’s what the site FAQ has to say about this:

    What’s the advantages of choosing Ogg over Flash?
    Choosing Ogg over Flash is both an ethical and technical question. We all want our computers to do better, so here is how our computers are better with Free Formats:

    1. You will be able to enjoy the media “natively”; there is no need to install any plug-in or add-on to your standard-friendly browser.
    2. You will not need to load heavy and possibly unsafe scripts, which helps with speed and stability.
    3. You will support a free, open Web where no corporation monopolizes an important technology, such as video.
    4. You will enjoy more control over your digital life with Free Formats and Open Standards because no corporation decides what you can and cannot do with the files you have.

    Personally I think that flash is a very resource intensive way to view videos. I tried it on a couple of videos and it worked great. Plus using this site lets me download the video to my local system without hassle. One of the other things I liked is that you can have the script download the highest available quality of the video automatically. So if a HD version of the video is available it will download it instead of the regular version.

    The whole site is built on top of Free Software. Currently the site only supports YouTube but support for other service is under development.

    Check it out. You might like it 😉

    – Suramya

    – Suramya

    « Newer PostsOlder Posts »

    Powered by WordPress