Saturday, June 30, 2007

Low bandwidth : Repository Moved!!


The domain kagesenshi.org (izhar) has reached 80% of its bandwidth limit (2434.04/3000.00 Megs).

!! Do not respond to this message. Your reply will go nowhere. !!


yikes!!

repository will be has moved to http://devel.foss.org.my/~kagesenshi/repo

config is @ http://devel.foss.org.my/~kagesenshi/repo/pub/kagesenshi.repo

Thursday, June 28, 2007

My Aztech DSL600EU just died

A shocking thing happened yesterday morning , suddenly I couldnt connect to any sites and the router's lights remain static. Rebooting it and pushing the reset button doesnt help. After tens of times trying to get it back running, nothing seems to work. So, my conclusion, this guy just died. T_T . The router have been showing problems since a few weeks ago, it keep freezing and I had to restart it to get it back running. I guess , that was its message to me that its dying.

So, today, a trip to lowyatt to get a new modem/router.

Just bought a Linksys WRT54G Router and a ZyXel Prestige 650M ADSL modem and they cost me - RM279 (~USD80). Now I'm back online (with a hole in my wallet) and will continue packaging compiz fusion every few days (well .. guess not today .. I'm damn tired right now, plus I want to play with my new router .. lol).

Also, I have contacted the compiz and beryl Fedora package maintainers, and will be working on with their guidance to improve the package for inclusion. Though I had a feeling it wont be until OpenCompositing.org release their first official tarball. Anyway .. its always better start stuff early, isnt it?.

-away-

Tuesday, June 26, 2007

Update on Compiz Fusion repository

I have updated the repository just now. A few noticable changes are:

package updated to 20070625 morning's git (I'm @ GMT +8 if that matters)
compiz package is slow splitted into compiz-gnome and compiz-kde
release numbering is changed to follow Fedora Packaging: Naming Guideline
a few bug fixes at the specfiles


IMPORTANT NOTE:

To those who are using 20070622git packages, you will need to remove them manually before upgrading through yum, or it wont work. This is because the change in the release numbering which make yum thinks the the older packages are newer.

To erase them
yum erase \*compiz\*
yum erase \*emerald\*


Installing the new packages


# Install the repository (if you havent)
cd /etc/yum.repos.d/
wget http://repo.kagesenshi.org/pub/kagesenshi.repo

# all compiz fusion packages (GNOME and KDE)
yum install compiz

# compiz fusion and emerald (for GNOME)
yum install compiz-gnome

# compiz fusion and KDE window decorator (for KDE)
yum install compiz-kde


Enjoy~

Original Post : Compiz Fusion Repository for Fedora 7

Monday, June 25, 2007

Compiz Fusion repository for Fedora 7


This post is obsolete ( Its hard to keep this page updated, so I created a wiki page for it :P ). Latest & updated guide can be acquired from my wiki page

http://wiki.kagesenshi.org/moin.fcgi/CategoryPackages/CompizFusion



At last ... I have finished the Compiz Fusion packages for Fedora 7 .. now for the grand announcement :D





Repository Location

Repository URL: http://repo.kagesenshi.org/pub/
http://devel.foss.org.my/~kagesenshi/repo/pub/
Repository YUM Config File: http://repo.kagesenshi.org/pub/kagesenshi.repo
http://devel.foss.org.my/~kagesenshi/repo/pub/kagesenshi.repo

The repository is hosted in a limited bandwidth shared hosting which I have for playing around with Django. Please dont abuse it. I couldnt afford larger hosting because I'm still a (jobless) student and currency exchange between MYR and USD is kindof too high for me.

Provided Packages

compiz
compiz-all
compiz-gnome
compiz-kde
compiz-devel
compiz-fusion-plugins-main
compiz-fusion-plugins-main-devel
compiz-fusion-plugins-extra
fusion-icon
compiz-bcop
compizconfig-python
compizconfig-python-devel
compizconfig-settings-manager
libcompizconfig-devel
libcompizconfig
emerald
emerald-devel

Edit Updated to follow 20070630git packages

The compiz packages are based on Fedora 7's compiz specfiles and added together with bits and pieces from Fedora beryl packages. The package sets are similar to beryl's. I dont have any KDE specific builds mainly because I don't use KDE and not familiar with beryl/compiz's KDE packages.

* NOTE: the compiz packages will obsolete Fedora 7's compiz-0.3.6 packages.
* Other Credits: the naming and description of some of the packages are taken from Trevino's Ubuntu Compiz repository

Some descriptions of common packages

compiz
compiz-all
- a meta package that will install all compiz packages from this repository
compiz-gnome
- a package that provide gtk-window-decorator and install compiz-core, compiz-fusion-plugins-main, emerald, emerald-themes and compizconfig-settings-manager
compiz-kde
- a package that provide kde-window-decorator and install compiz-core, compiz-fusion-plugins-main and compizconfig-settings-manager
compiz-core
compiz
- contains the core compiz files
compiz-fusion-plugins-main
- main plugins for compiz fusion ( cube, animation, expo, negative, opacify, scale, wall , etc)
compiz-fusion-plugins-extras
- extra plugins for compiz fusion ( addhelper, benchmark, cube reflection, firepaint, etc)
emerald
- a themable window decorator for compiz
compizconfig-settings-manager
- a GTK UI for configuring compiz fusion and its plugins

Edit: changed guide to follow GNOME KDE splitted packages
Edit Updated to follow 20070630git packages

Installation Instructions

As root, just follow these simple commands

# Install the repository 
cd /etc/yum.repos.d/
wget http://repo.kagesenshi.org/pub/kagesenshi.repo
wget http://devel.foss.org.my/~kagesenshi/repo/pub/kagesenshi.repo

# all compiz core packages (GNOME and KDE)
yum install compiz
yum install compiz-all

# compiz and GTK window decorator (for GNOME)
yum install compiz-gnome

# compiz and KDE window decorator (for KDE)
yum install compiz-kde


Edit: changed guide to follow GNOME KDE splitted packages
Edit Updated to follow 20070630git packages


After this step, you'll have compiz-core, compiz-fusion-plugins-main, emerald, emerald-themes, and compizconfig-settings-manager the core compiz 0.5 from freedesktop.org installed your computer. For Compiz-Fusion, you will require to also yum these.

yum install compizconfig-settings-manager compiz-fusion-plugins-main compiz-fusion-plugins-extra


and if you want Emerald decorator
 yum install emerald


Launching Compiz Fusion

The most convenient way to launch Compiz Fusion for now is by using its tray icon (similar to beryl-manager), called fusion-icon

yum install fusion-icon
fusion-icon &


* Theres also a launcher for it in the system menu . Located at Applications > System Tools > Fusion Icon

For the time being , there is no exact/convenient way to launch Compiz that I know of (yet).

OpenCompositing.org forum have a post on commands to launch Compiz here -> http://forums.opencompositing.org/viewtopic.php?f=51&t=758#p6439


If you have an Intel or an ATi Radeon card (using AIGLX or the radeon driver):
LIBGL_ALWAYS_INDIRECT=1 compiz --replace --indirect-rendering --sm-disable ccp &

If you are using the FGLRX driver:
LD_PRELOAD=/usr/lib/fglrx/libGL.so.1.2.xlibmesa compiz --replace --sm-disable ccp &

If you are using NVidia:
compiz --replace ccp &


Or, you can try out compiz-icon. compiz-icon is an app similar to beryl-manager. However, it does not work in my computer, but maybe you have better luck than me.
yum install compiz-icon
compiz-icon &


compiz-icon package also provide a script called compiz-manager that will do the if-else for the manual launch above, if compiz-icon doesn't work for you, you might have better luck with compiz-manager. However, compiz-mananager does not have any tray icons etc despite the name. It only launches compiz and provides some useful (to some) commandline tools.

# launching compiz-manager
compiz-manager &


Edit Updated to follow 20070630git packages

Conclusion

For technical support related to compiz itself, please goto OpenCompositing Forum at http://forums.opencompositing.org/ and ask there. I will only attend problems related to my packaging.

If you want a more bleeding edge build, read the tutorial on how to compile from source here -> http://forums.opencompositing.org/viewtopic.php?f=51&t=758

Enjoy~ :D

Sunday, June 24, 2007

Compiz Fusion is here

The merge of compiz and beryl have already created an offspring

Introducing Compiz Fusion
http://youtube.com/watch?v=E4Fbk52Mk1w

If you want to try it out, follow this guide to compile it on your system
http://forums.opencompositing.org/viewtopic.php?f=51&t=758

For Ubuntu users, checkout Trevino's repository http://3v1n0.tuxfamily.org/dists/feisty/eyecandy/

For Fedorans, theres no Fedora packages for Fusion for now .. So, follow the from-source guide above. However, fear not , I am putting up together the pieces into a YUM repository. Currently I'm in the process of building them properly in Mock and making sure no Errors appear on rpmlint. I will announce it when I have satisfied with the packages.

Friday, June 22, 2007

Using Glade to write GUI applications

A few useful links for people who want to learn on how to write GTK applications using Glade



The video for using Glade with Python is not very clear, so I'll explain a little bit the process below.

1. Build your GUI

2. Open a .py file, and import gtk and gtk.glade
#!/usr/bin/python
import gtk
import gtk.glade


3. define your handlers method
def hander_method(widget):
do_something_here
do_more


4. load the glade XML
xml = gtk.glade.XML("/path/to/glade/file")


5. connect handlers to its methods/functions
dict = { 'handler_name' : handler_method,
'handler_name2' : handler_method2
}

xml.signal_autoconnect(dict)


6. run gtk instance
gtk.main()


I also have written a similar script to the ruby glade template generator in Video 3. It'll generate a very basic Python template for use. ( I couldn't find where to download GladeGen )

pyglade-gentemplate.py

Thursday, June 21, 2007

VMXGenerator.py : Python program to generate VMware configuration

Ok, I'm bored during this holidays ..

While surfing around and playing with Xen and VMWare, I stumbled upon this http://sanbarrow.com/vmxbuilder.html and saw a DOS Shell script to generate VMX. The crazy me took over, I started converting the script to Python~ :P. I have reimplemented most of the basic functionalities of the script in Python classes. Below is the script.

vmxgenerator.py

If youre interested to improve it, Sanbarrow.com provides lots of useful docs related to VMX parameters here - http://sanbarrow.com/vmx.html

Monday, June 18, 2007

Setting up ADSL connection, the Fedora way

Some users might not notice that Fedora have a very easy to use GUI for setting up ADSL and other network connections. The tool is integrated together with Fedora/RH system-config utility called system-config-network. This howto will show you how to set-up a PPPoE/ADSL connection using it.

Starting Up system-config-network

If you are using GNOME, the menu for it is located at
System > Administration > Network



Okay, the interface is somewhat looks complicated. I was a little bit lost too when I first time using it. But after knowing that the tool support lots of other advanced network capabilities (like multiple IP per device, IPsec, VPN, etc), I accepted the UI is the best that way.

Creating a PPPoE/ADSL connection

To create a new PPPoE connection, click the New button and this window will appear. Select xDSL Connection.



Follow through the instructions and fill the forms. For the Ethernet Device entry, select the device that connected to your ADSL Modem.



Click Apply



Done



Connecting To The Network

To connect to the network, just select the connection click the Activate button.

You can also set it to start on boot by selecting the connection, click the Editbutton , select Activate device when computer start, and click OK.



Thats all~ :D. Btw, If you notice any missing step in this guide, please tell me about it because the last time I'm using ADSL modem to connect to internet was during Fedora Core 3 (which was 2 years ago, nothing much has changed in setting up ADSL using system-config-network since then).Now I'm using a router and doesn't use this anymore.

Sunday, June 17, 2007

Running X applications headless using Xvfb

Sometimes, you might want to run certain X applications as a daemon in the background. For example, in my case, I want to make Ktorrent run in the background on startup while I control the torrents using its WebUI. However, to run Ktorrent , I must have X running and logged in to the desktop. So, how can I do this? , the answer is by using X Virtual Framebuffer Server.

How it works?

Xvfb emulates an X server without outputing it to monitor. Applications connect to it and run under the impression the GUI is there. Its as simple as that!. No modification needed on the applications that going to be run on it.

Read more : http://en.wikipedia.org/wiki/Xvfb

How to do it?

First, make sure you have Xvfb installed. If you dont, install it using your package manager.
In Fedora, use
yum install xorg-x11-server-Xvfb


Then, run Xvfb in any unique/unused display number, in this example, I put 100. Disable access control to the display so that you dont have to go through the hassle of setting access control for it.
Xvfb :100 -ac


Now that you got Xvfb up and running, time to start the app.

Before starting the app, export the DISPLAY environment variable to point to display number 100
export DISPLAY=:100.0


execute the command for the app, and ure good to go :D
ktorrent


Enjoy~

Saturday, June 09, 2007

Fedora repository mirroring script using reposync

I'm back~ :D

As my first post of this holidays .. I give y'all the script i've been using to mirror and sync the fedora repos. The script is using reposync,repomanage (both provided by yum-utils) and createrepo , so you will need to yum for those them first.


#!/bin/bash -x

unset http_proxy
#export http_proxy=http://127.0.0.1:3128

# mirror root - the place you want the rpms to be downloaded
MROOT="/mnt/mirror/repos"

# processor architectures (space separated)
ARCHS="i686 x86_64"

# repository names (space separated)
REPOS="fedora updates"

if [ "$1" != "" ];then
REPOS="$@"
fi

downcomps(){
wget -N $1/repodata/comps.xml
}

# this part will download the comps.xml files .. it still need some improvements though
getcomps(){
case "$1" in
fedora)
downcomps http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Everything/i386/os/
;;
updates)
downcomps http://download.fedora.redhat.com/pub/fedora/linux/updates/7/i386/
;;
*)
echo error
;;
esac
}

downrepo () {
cd $MROOT
if [ "$2" == "i686" ];then
cd i386
else
cd $2
fi
echo "Sychronizing Repositories"
reposync -r $1 -a $2 --newest-only -t /var/tmp/reposync-cache
STAT=$?
if [ "$STAT" == "0" ];then
cd $1
echo "Cleaning old packages"
repomanage --withbroken --old . |grep -v 'kernel\-' |grep -v -i 'nvidia'|grep -v -i 'fglrx'|xargs rm -rf
rm -rf .repodata .olddata
echo "Recreating repodata"
getcomps $1
# rm -f comps.xml
if [ -e comps.xml ];then
createrepo --groupfile comps.xml .
else
createrepo .
fi
fi
cd $MROOT
}


#yum clean all --noplugins
while [ "1" == "1" ];do
for REPO in $REPOS;do
# yum makecache --disablerepo=* --enablerepo=$REPO
for ARCH in $ARCHS;do
echo downloading $REPO $ARCH
downrepo $REPO $ARCH
done
done
echo Update done, halting for 2 hours
sleep 7200
done