Pages

Thursday, November 11, 2010

Notifications in Fedora 14

We use the following command
$ notify-send  "This is some text"
or
$zenity --info --text "This is some text"
This will display a text balloon "This is some text".
The problem appears when we want to display the output of a command.
For this, I used a python script. Here's the source code:
#!/usr/bin/env python
import os
import sys
import pynotify
pynotify.init("Output comand")
arg=sys.argv[1]
print arg
s = os.popen(arg).read()
n = pynotify.Notification("Output",s)
n.show()
If you wish to use a compound command, then you will need to use quotes.
For example, we use the command "ls-a 'as follows:
$python testpy.py "ls -a"
This is just a small example, you can create more complex applications.

Saturday, November 6, 2010

How Install Firefox 4 on Fedora 14.

Firefox is one of the latest versions of the Mozilla .

It is currently available in two repositories - Remi and Spot.

See the next steps if you want install Firefox 4.

First , go on super user shell.

# wget http://repos.fedorapeople.org/repos/spot/firefox4/fedora-firefox4.repo -O /etc/yum.repos.d/fedora-firefox4.repo

Now, you can install Firefox 4

# yum --enablerepo fedora-firefox4 install firefox4

That is all.

Fedora 14 and Blender 3D

It is a great disappointment to me that Fedora 14 comes with Blender 3D version 2.49b-10.
I expected a pleasant surprise to see version 2.5.
Here is the result:

# yum search blender
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
updates/pkgtags                                                   |  10 kB     00:00     
============= Matched: blender =====================
blenderplayer.i686 : Standalone blender player
LuxRender-blender.i686 : Blender export plugin to LuxRender
blender.i686 : 3D modeling, animation, rendering and post-production
spe.noarch : Python IDE with UML,PyChecker,Debugger,GUI design,Blender & more
libpano13-tools.i686 : Tools that use the libpano13 library
yofrankie-bge.noarch : 3D Game with characters from Big Buck Bunny movie
Of course, you can use version 2.5 from the official site.

Sunday, October 31, 2010

Ogre 3D on Fedora - first step.

My son has 2 years old.
I had to make a little game to keep him busy.
Little known to push so I used the arrow keys to make it more interesting.
First Ogre 3D tutorial

Saturday, October 2, 2010

"Sintel premiere" by Blender 3D Team

The last project named "Sintel" is better than expected .
I watched all projects and this  is one of the best.
Sintel official page

Thursday, September 30, 2010

A new update for "SEO Starter Guide".

Google say us:
"About two years ago we published our first SEO Starter Guide, which we have since translated into 40 languages..." The new version is more explicit and useful to have it.
Unfortunately, it is not translated in all languages.
I wonder why Google does not use the open source community to translate them.
Now we can download the new update from here.

Wednesday, September 22, 2010

Python, pyuno and OpenOffice

Some time ago, I discovered Python. Then I saw that he can work with the OpenOffice.
Today I will briefly introduce how to do this. I do this in Windows XP, and Windows users could benefit.
In the folder : C:\Program Files\OpenOffice.org 3\program there was a file called python.exe.
Go there and type the following script to start OpenOffice:

import os
import subprocess
import sys
import time
import uno

NoConnectionException = uno.getClass("com.sun.star.connection.NoConnectException")
ooffice = 'soffice "-accept=socket,host=localhost,port=8100;urp;"'
def start_OOo():
    '''Starts OpenOffice.org with a listening socket.'''
    # Start OpenOffice.org and report any errors that
    # occur.
    try:
        retcode = subprocess.call(ooffice, shell=True)
        if retcode < 0:
            print >>sys.stderr, \
                "OOo was terminated by signal", \
                -retcode
        elif retcode > 0:
            print >>sys.stderr, \
                "OOo returned", \
                retcode
    except OSError, e:
        print >>sys.stderr, "Execution failed:", e
    # Terminate this process when OOo has closed.
    raise SystemExit()
started_OOo = False
if not started_OOo:
    print "Starting OOo"
    started_OOo = True
    start_OOo()
time.sleep(3)
print "OOo started"
This will start OpenOffice 3.
We can use now python scripts to create any type of file used by OpenOffice.
Let show one image create with few lines :