Archive for September 20th, 2009

Enable festival Linux (text-to-speech-system) to read/speak PDF and DOC files (Speech PDF and DOC in Festival Script)

Sunday, September 20th, 2009

Today I wondered if festival supports reading of PDF files on Linux? The answer due to my short research was NO!.

Well though I couldn’t find official program to speak PDFs for me it’s not such a big deal since it’s not so hard to convert PDF files into plain text files in Linux with pdftotext command. 

pdftotext is part of the poppler-utils which is a nice package which alsocontains pdfimages – enabling you to extract images from pdfs,
pdftohtml – pdf to html converter and
pdffonts – pdf font analyzier. The normal way to read PDF files via festival is: First use pdftotext to convert your PDF to text file

$ pdftotext filename.pdf outputfile.txt

and then to make computer speak it over festival default configured synthesizer:

$ cat outfile.txt | festival –tts
For convenience I’ve created a small shell script I calledfestival-read-pdf.sh which does this directly.

Please download the festival-read-pdf.sh shell script here Furthermore I wondered how to make the Microsoft Office .doc files to be played throughfestival. On that account It was required something to convert again the .doc file extension to plain text. I came across antiword which I’ve blogged about in my previous post. Thus to carry it via festival you need to: antiword filename.doc | festival –tts I’ve fastly scripted it for some convenience. Download the festival-doc-read.sh script here I’ve also created a third bash script which enables you to select either to play DOC or PDF file in Festival.
Here is a link to the festival’s festival-read-doc-en-pdf.sh PDF, DOC speaker script .
Talking about festival it might be interesting to mention fala – A simple text reader.If you’re a Debian user you’ll be glad to know there is already a package containg fala. Well I hope you’ll find the PDF, DOC festival speech scripts useful. Enjoy

END—–

Convert doc files to plain text (txt) in terminal / console (tty) on GNU / Linux

Sunday, September 20th, 2009

I was looking for a way to convert Microsoft .doc files to plain text (txt) in Linux directly through terminal.
After some lookup in Google Groups I found ANTIWORD! .
Luckily Debian comes even with a package containing the nice nifty program.
Here is the description of antiword – Converts MS Word files to text, PS and PDF
Fun, desciprtion Eh? 🙂 Ain’t it?
There are some other ways to Convert doc files to plain text, for instance you could use the command catdoc , for example to convert simple .doc to .txt file usecatdoc -a whitepaper.doc.
Another way to convert .doc files to .txt mostly used by developers is via the wvware (nothing to do with vmware!:)) utility.
wvware could directly convert it to html. For example:
wvWare file.doc >file.htmlor
wvText file.doc file.txt
.A lot of things I’ll skip here are well explained in the article Viewing Word files at the command line .
END—–

Windows Vista Commands (Windows Vista Command Line List)

Sunday, September 20th, 2009

Some time ago I needed to have get some insight in Windows Vista commands.To achieve my tasks back then I used some the following Windows Vista Commands list . It would be probably interesting for you to check out commandswindows’s website .END—–

Alltray, The Linux, BSD, Unix, handy program to send any application into the system tray

Sunday, September 20th, 2009

Yesterday I found an interesting small proggie that enables you to tray in a fast manner any unix application
to the GNOME, KDE’s system tray.
Alltray also works with many other desktop environments and window managers.
This application made my life a bit easier since now I’m able to send into the tray my mail application of choice (Thunderbird),or as called in Debian icedove. To do that all I had to do was:

$ alltray icedove . To make this behaviour permanent you can use:
The program alacarte which allows you to edit your Gnome menus in a fast and comfortable manner.
For instance on Debian run alacarte Go to Internet -> Icedove Mail/News click Properties and changethe default command: icedove %u change with alltray icedove %u
Congrats your Thunderbird will now go to tray any time you run it.
Now you can do the same with any other application that lacks tray support.
Here is a link to Alltray’s website
END—–

Workaround to a problem With Bulgarian Cyrillic CP1251 Subtitles in MPLAYER and VLC

Sunday, September 20th, 2009

I think I mentioned on my blog that until I’ve upgraded to Debian Unstable, my subtitles in Bulgarian stopped working.
That happens in all of the Video supporting programs. I do a lot of reading and writting in English thus I have exported default LANG variable to en_US.UTF8
(my LANG is LANG=en_UTF-8). I tried everything via configuration files in Both Mplayer and Vlc to make the players work with Cyrillic in CP1251, badly enough nothing helped.
After some time of trying out stuff I came to the following solution.I’ve created files:
/usr/local/bin/vlc and /usr/local/bin/gmplayer
containing:
1. vlc’s file#!/bin/shLANG=bg_BG.CP1251 exec /usr/bin/vlc “$@”2. gmplayer’s file#!/bin/shLANG=bg_BG.CP1251 exec /usr/bin/gmplayer “$@”
The “$@” is a default bash variable which contains everything passed by next to /usr/bin/vlc and /usr/bin/gmplayer
END—–

Howto Change MAC address in Linux and Windows 2000, XP and Vista (Mac Spoofing :)

Sunday, September 20th, 2009

MAC stands for (Media Access Control) and stands for the computer physical address in LAN networks.
Ethernet MAC is a six byte number, usually expressed as a twelve digit hexadecimal number.
IPs are translated to Mac via a protocol called ARP (Address Resolution Protocol).
Let’s say Computer with IP 10.10.10.1 wants to send information to another system on the LAN with anIP of 10.10.10.2.
10.10.10.1 will first send broadcast to all stations on the LAN asking who has the address of 10.10.10.2.
Then the box possessing 10.10.10.2 will respond to 10.10.10.2 with it’s MAC address which would be temporary stored
in 10.10.10.2′s ARP’s table in order to make 10.10.10.1 recognize 10.10.10.2 later on.

Host 1 (10.10.10.1): Hello everyone on the LAN (FF:FF:FF:FF:FF:FF), who has the IP 10.10.10.2? My MAC is DE:AB:BE:EF:FF:FE so you can respond back to me.Host 2 (10.10.10.2): Hello DE:AB:BE:EF:FF:FE, I have IP 10.10.10.2 and my MAC address is 1C:43:B6:F8:9B:1E so you can send your IP packets to me.
There are a plenty of reasons that might force to wish for changing your mac. Though I’ll mention only one
1. To get across MAC filtering set on a router. Or in other words to bee able to access your internet withall your computers at home (don’t try them simultaneously!). For example recently a cousin of mine bought a secondnotebook for her daughter.
They desired to be able to access the internet with both the PCs. I contacted the ISPwith a request to add me a second MAC address, just to find that this wasn’t possible with this exact ISP.
Their computer ran dual boot install of a GNU/Linux system as well as Windows Vista, thus I needed to change their existing MACaddress in both Windows and Linux
Here is how I achieved that:
1. In Linux
Really simple:/sbin/ifconfig eth0 hw ether 00:00:00:00:00:00 (substitute here with your desired MAC)/sbin/ifconfig eth0 up
2. On BSD
/sbin/ifconfig xl0 link 00:00:00:AA:AA:AB (subst with MAC here), xl0 is your interface name/sbin/ifconfig xl0 up
3. In Windows XP
There are a couple of ways to go in Windows. The hardest way is to use regedit and to look and substitute some obscure values.
Another a bit easier way is to use either MacMakeUp , Smac or EtherChange
The classic way to change Mac in Windows XP is:
Go to Start->Settings->Control Panel and double click on Network and Dial-up Connectionsa) Right click on the NIC you want to change the MAC address and click on properties.b) Under “General” tab, click on the “Configure” buttonc) Click on “Advanced” tabd) Under “Property section”, you should see an item called “Network Address” or “Locally Administered Address”, click on it.e) On the right side, under “Value”, type in the New MAC address you want to assign to your NIC. Usually this value is entered without the “-” between the MAC address numbers.f) Goto command prompt and type in “ipconfig /all” or “net config rdr” to verify the changes are applied.
4. In Windows Vista
Go to Control Panel -> Network Connections -> Properties (on Connection using …) Configure -> Advanced -> Network Address (Then type your MAC Here)
All the credits for this post go to the article Changing Your MAC Address In Window XP/Vista, Linux And Mac OS X which explains what you read above even more thoroughly.
Most of the information here is originally found in the above article.END—–

Ubuntu 9.04 Jaunty on Toshiba L300 PLSBGE Laptop

Sunday, September 20th, 2009

toshiba-l300-plsbge-laptop-ubuntu-9.04-install

Today I had the task to Install Ubuntu GNU / Linux on Toshiba L300 PLSBGE Laptop.

I had already installed Windows Vista Enterprise on the notebook. Thus I used Acronis Disk Directory Suite to partition the harddrive for Ubuntu even though I could have used the gparted included on Ubuntu’s installation CD. I’ve asked specificly if
I could use the Ubuntu CD to repartition my hard drive in #ubuntu in irc.freenode.net.
The answer was positive it’s absolutely safe to resize an NTFS partition using Ubuntu’s installation LiveCD and gparted.That seems like a good news for all of us the free software users / enthusiasts / hobbyists etc.
I hated the default Ubuntu behaviour it automatically decided to install itself on a automatically created 2.5 GB partition.
I thought it won’t be so dumb to install itself on such a tiny partition. Well guess what I was wrong IT WAS SO DUMB!
Even though I had already 80 GB ext3 partition. Ubuntu’s default behaviour was to install on an automatically created 2.5GB partition.
Right after the installation I was stunned just to realize there was no free space on the drive where the dumbass installed itself.
After that I had some issues deleting the already cretead partitions, which for some reason messed up. Luckily the good old fdisk fixed the situation so I could easily delete all the partitions except the vista and recreate them again using gparted with Ubuntu’s install LiveCD. The install was completely flawless. Everything worked out of the box, no external efforts to fix broken stuff like usually happens in Linux fantastic! The only broken thing was that switching to plain console with ctrl+alt+f1 would visualize a non working display output and I couldn’t see the ttys at all. That wasn’t such a hassle since the system is planned to work only in GUI mode. I guess Ubuntu is going through a real development with a positive end results. Even external USB printer Canon PIXMA IP3300 worked by simply plugging it in. For some weird reason to make the printer work correctly I had to use driver for Canon PIXMA IP3000. Anyways it worked with it and the printer started printing correctly even though officially on some of the linux printers databases it’s reported the printer won’t work correctly never ever.END—–