Simple espeak Program (speak_lib)

One of my friends was making a project requiring espeak. He was using speak_lib.h and wanted help on using it , so here is a simple c/c++ program  i wrote:




(Assuming speak_lib.h in your current dir)

(Replace g++ by gcc and .cpp with .c for compiling as c )

g++ -g -I. Speak.cpp -lportaudio -lespeak -o Speak



Freeing up RAM in Linux

NOTE: Little clarification, this is not needed at all ,as memory is freed when required.

WHY IT MAY BE HELP-FULL: This clears the page-cache , dentires and inodes.

IT’S TRANSLATION : It may be that you are watching a movie or using a Virtual Machine , a resource hungry process has filled up your ram by caching data and the data needs to be continuously removed  to make space for new data . This is managed by the kernel.

IF YOU STILL DON’T  GET IT: Notice  video in your movie hanging (not audio) while your ram gets cached Or your system running a bit slow ?

1) Stop the process consuming loads of memory. (Check System Monitor).
2) Open a terminal with root privileges .
3) Sync
4) echo 3 > /proc/sys/vm/drop_caches
5) echo 0 > /proc/sys/vm/drop_caches

Fedora 11 Fixing Various Problems

0)  Graphic Driver Problems

– For ATI RadeonHD cards (especially x1250 and x1200)

yum install xorg-x11-drv-radeonhd

if /etc/X11/xorg.conf doesnt exist
yum install system-config-display
Run system-config-display –reconfig in terminal.

Modify /etc/X11/xorg.conf

"Device" Section
Driver "radeonhd"
Option "DRI" "True"

– Or Install fglrx (At the time of writing of post official rpmfusion drivers dont exist)

Hence Fedora 10 ‘s kernel needs to be installed .Refer this post

(Make sure that you use correct driver since ati recently removed support for many cards )

1)  Enabling OSS
(This is needed for Real Player 11 as it crashes with ALSA)

(In Root /Sudo Mode)

nano /etc/modprobe.d/dist-oss.conf

uncomment line as mentioned

2)  Fixing glitchy sound problems.
There are many solutions to the sound problems listed in
They mainly deal with time scheduling
Other solutions consist of

– Enable OSS (See Above)
– Install OSS v4.x ( This replaces all the ALSA/Pulse Audio kernel modules)

3)  Enabling TAP in MousePad / Touchpad

– Temporary Measure

synclient TapButton1=1
synclient TapButton2=1

– Permanent Measures

– System > Prefrences > Mouse >Touchpad > Enable mouse clicks


– Modifying xorg.conf

See this link.


Fedora 11 Leonidas Essentials Guide Part 2: More Config

NOTE:All Commands to be entered in terminal in Super User/root mode. (.:. su – or sudo)

1) Setup sudo
In Fedora the root and normal user accounts are different and one can switch between them to do administrative tasks.
However if you want to give a user other than root administrative priviliges

nano /etc/sudoers

Add to the end
Continue reading Fedora 11 Leonidas Essentials Guide Part 2: More Config

Fedora 11 Leonidas Essentials Guide Part 1: Getting Started

Fedora 11 Leonidas essentials guide

Well Howdy Folks ! ,thou having trouble with getting Fedora 11 Leonidas Up and Running ?

Well then you have come to the right place !!!
NOTE:all commands r to be typed in terminal with sudo or su login or su -c
PS: All yum commands can be replaced by package kit alternatives type “info pkcon” in terminal.

0) PRESTO PLUGIN FOR YUM: Presto is a delta rpm plugin for  yum . (Delta rpm is only the difference in old and new version of packages Hence Saves Precious Bandwidth.
yum install yum-presto
Continue reading Fedora 11 Leonidas Essentials Guide Part 1: Getting Started

Fedora 11 Leonidas Whats New!

Fedora 11 Leonidas has been released today (9th June 2009).

10 Reasons for you to Download it now

1) DNSSEC (DNS Security Extensions) – services protect against most of the threats to the Domain Name System

2) 20 sec Boot up time being the fastest in Major desktop Linux distributions

3) EXT4 As default file system which raises max file system size up to 1 Exabyte and max file size to 16 TB boosts computers overall speed

4) Xserver 1.6 = Better Graphics (however ctrl+alt+backspace combo is disabled by default)

5) RPM 4.7 reduces the memory consumption (of packaging process)

6) Much more responsive synaptic touchpad

7) Automatic Fonts & Mime Installer – Allows programs on the desktop to automatically install applications, fonts, multimedia capabilities, and clipart.

8)Fingerprint Readers – Support for finger print authentication on some devices.

9) Volume Control (Widget) – An awesome, flexible volume control.

10) MinGW Cross-compiler – Build and test Microsoft Windows programs directly from fedora without getting blue screens

Ubuntu 9.04 Jaunty Jackalope A Review

Ubuntu 9.04
Ubuntu 9.04 with Dark Room Theme

Ubuntu is back with its new flavour “Jaunty Jackalope” . After the not so exciting 8.10 Release , the new edition has quite a few improvements. The old theme is still retained as the default but with refreshing new themes Dust ,Dust Sand And New Wave


– The boot up acpi problem is fixed

– Kernel being used is 2.6.28-11 .

– EXT4 Filesystem Support

– GNOME 2.26

– New Notification System

– Coherence tools (UPnP Plugin)

– Computer Janitor ( For removing unused Packages)

– USB Startup Disk Creator

– System Testing ( For Submitting Details to Ubuntu Hardware Database)


The radeon driver being used is glitchy (screen break up) and fps is low (as compared to fedora 10) but is bearable.

The b43/ssb drivers for wireless support for Broadcom Card still don’t work for BCM4312 Series but they can be replaced with wl which works directly.

The Notification System looks great ( hmm.. reminds me of the Mac Notification System Growl).

It comes with Firefox 3.08 instead of Firefox 3.1 Beta which is a bit disappointing.


Overall Canonical has done a decent job to avoid another disappointment like Intrepid Ibex.

Rating: 8.5/10 (Try it Out!)

Python GMail SMTP Send Email Script

Here is a small script that i made some time ago , it uses GMail’s mail servers to send an email.

# PyGms 1.0
# Gmail SMTP  Script Made by Djays

import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText import MIMEText
from email import Encoders
import os

ver = "v1.0"
gmail_user = ""	#Username
gmail_pwd  = ""		#Password
gmail_alt  = " "		#Alias ID
gmail_alias = ""+gmail_alt		#nickname
mailing_list = ""
class mailz:
  def __init__(self):
    self.mail = MIMEMultipart()

  def attach(self,fil):

  def mailprep(self,to, subject, text): = to
    self.mail['From'] = gmail_alias
    self.mail['To'] = to
    self.mail['Subject'] = subject
    if (mailtoBcc !="") :
      self.mail['BCC'] = mailtoBcc

    text+="nnn_________________________nMail generated By  PyGmS "+ver+"n       - Made By Djaysn"

    print self.files

    for attach in self.files:
      if (attach != "") :
          part = MIMEBase('application', 'octet-stream')
          part.set_payload(open(attach, 'rb').read())
          part.add_header('Content-Disposition','attachment; filename="%s"' % os.path.basename(attach))

  def sendmail(self):
    self.mailServer = smtplib.SMTP("", 587)
    self.mailServer.login(gmail_user, gmail_pwd)
    self.mailServer.sendmail(gmail_user,, self.mail.as_string())

mailto   =  raw_input("Enter Recepients (Seperated By a Comma): ")
mailtoBcc=  raw_input("Enter BCCRecepients (Seperated By a Comma): ")
mailsubj =  raw_input("Enter Subject: ")
mailmsg  =  raw_input("Enter Message: ")
mailattch = ""
newmail  = mailz()

while 1:
 mailattch = ""
 c = raw_input("Attach a File ? (y/n)")
 if c == 'n':
 if c != 'y':
 mailattch = raw_input("Enter Path of file: ")


Lost in Cyberspace