Archive for the ‘Debian’ Category

 

How to Build a DEB package for the git sources – 9. January, 2010

I wanted to build python-moinmoin from the 1.8.x series because python-moinmoin 1.9 didn’t work for me.

So I went and grabbed the source tar ball from http://git.debian.org/?p=collab-maint/moin.git;a=summary.

Then I did the following:

tar xvzf moin.tar.gz
sudo apt-get build-dep python-moinmoin

dpkg-buildpackage -rfakeroot -uc

and then I got myself a debian package working, a few more edits on the website configuration, and I was good to go with my wiki.

That’s here short for reminding me, in can I need this again…

Posted in Debian

How not to use Kill Command on Linux – 22. November, 2009

A few months ago I installed Debian GNU/Linux on an old Sony Vaio Laptop of a friend of mine. The laptop is really nice with slim case and a 15″ screen. She was really happy she could write her thesis on this nice machine again because Windows XP could not function properly on this machine. Installation was a breeze and  the non technical friend of mine was working on it happily for 4 months now.

Three weeks ago she called me and asked how she can watch DVD’s with. I figured out I forgot to install libdvdcss2 on her Debian. So I dropped by her place to fix it. I opened Synaptics and searched for it. But somehow it got stuck. So I had a terminal open and I typed

ps aux | grep synaptic.

At this point she mad a remark on “oh, what is this magic and all those words…”

I murmured something about this is the linux terminal while reading the pid of synaptic, and then I typed:

kill -9 5322

At this moment she stopped breathing and then yelled “Oh, what’s going on… don’t kill my computer…”.

Trying to explain what is the meaning of the command kill where non-useful. She was really astound by this.

So my conclusion is for next type – to save panic from your non technical friends, avoid using the command kill in front of them. It sound scary I guess. If you really have to kill a process, to it from gnome-system-monitor or ask them to bring you a glass of water before you type kill on their computer !

Posted in Debian, Linux

MoinMoin wiki on Debian, Installation and configuration – 11. September, 2009

Sometimes, installation of Debian packages is too easy, but them configuration can be quite confusing.

This is the case, in my opinion, with the README.Debian file which describes an example of moin-moin wiki installation under a subdomain wiki.example.org.

Here are my notes of how to install moinmoin package from Debian Squeeze on Debian Lenny.

First, you need to install python-support from debian-backports.org.

Second, download manually or with apt-get the package of debian lenny for python-moinmoin.

Install both packages, if you downloaded them manually with the command:

dpkg -i python-support_1.0.3~bpo50+1_all.deb python-moinmoin_1.8.4-1_all.deb

After that you need to issue the following command, which are also described in the README.Debian:

1) Create and populate /var/www/mywiki

mkdir /var/www/mywiki
cp -r /usr/share/moin/server/moin.cgi /var/www/mywiki
mkdir /var/lib/mywiki
cp -r /usr/share/moin/data /usr/share/moin/underlay /var/lib/mywiki

2) Pass on the wiki to Apache:

 chown -R www-data: /var/www/mywiki /var/lib/mywiki

3) Configure Apache2:
Add the following as /etc/apache2/sites-available/mywiki:

<VirtualHost *:80>
 #comment the line below if you intend to use only http://localhost/mywiki
 ServerName wiki.example.org
 DocumentRoot /var/www/mywiki/
 Alias /moin_static184/applets/FCKeditor/ "/usr/share/fckeditor/"
 Alias /moin_static184/ "/usr/share/moin/htdocs/"
 ScriptAlias /MyWiki "/var/www/mywiki/moin.cgi"
</VirtualHost>
<Directory /var/www/mywiki/>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride None
 Order allow,deny
 allow from all
 Options +ExecCGI
</Directory>

4) Configure MoinMoin:

Edit /etc/moin/farmconfig.py to commentout data_dir and
data_underlay_dir (we need those defined separately for each wiki)

Edit /etc/moin/mywiki.py to include these lines:

 sitename = u'MyWiki' # [Unicode]
 data_dir = '/var/lib/mywiki/data'
 data_underlay_dir = '/var/lib/mywiki/underlay'

Edit /etc/moin/wikilist to include this line:

 www-data wiki.example.org/

5) Activate wiki:

a2ensite mywiki
invoke-rc.d apache2 reload

6) Enjoy your new wiki at http://your.site/MyWiki/

A Note about themes, debian, moin-moin

Debian is intended for the server… Thus it’s quite biased for a wiki-farm rather than a personal use wiki. Default moinmoin shares lot’s of files between different possible moinmoin installations.

The appropriate directory for installation of themes, under Debian won’t be the data directory (in the above example, /var/lib/mywiki/data)  rather a shared directory under /usr/share/moin/htdocs.

So the css/, img/, js/ directories of a plugin go there, and the python module of the theme goes to /var/lib/mywiki/data/plugin/theme.

Here is an example of how I installed fixedleft theme:

ls -p /usr/share/moin/
config/  data/    htdocs/  server/  underlay/

ls -p /usr/share/moin/htdocs/
applets/  common/      fixedleft/  modern/    rightsidebar/
classic/  favicon.ico  index.html  modernized/    robots.txt

ls -p /usr/share/moin/htdocs/fixedleft/
css/  img/  js/

ls -p /var/lib/mywiki/data/plugin/theme/
fixedleft.py  fixedleft.pyc  __init__.py  __init__.pyc

To activate the theme, you need to /etc/moin/mywiki.py, add the following line:

theme_default = 'fixedleft'

to activate fixed left as the default theme.

If you have two lines like this:

theme_default = 'rightsidebar'
theme_default = 'fixedleft'

The last one will be the effective one.

Posted in Debian, Python

Wicd ROCK on the roads ! – 27. August, 2009

Been traveling in the USA for a couple of weeks now. I was prepared for bitter timetime with my Debian and wireless roaming. So I’ve mastered the use of commands ifconfig and iwlist and such. The reason is that I’ve had my share already with network-manager.

I always found gnome-network-manager resource hog, and non reliable. And when I tried it two weeks ago after one and a half years I discovered it’s developed so much I can’t recognize it anymore. It has too many options, and it’s more suitable to a network engineer than a simple user. What happened to the GNOME simplicity I don’t know, some one in Red Hat really screwed up with the development of it.

Anyways, I decided to give WICD a shot. Hearing only warm words of it I downloaded the version from Debian repos, and after a minute I was already connected and running wireless.

What makes WICD awesome ?

It’s reliable, It’s easy to use because the user interface is clear and simple. And most importantly it stays out of my way, unlike gnome-network-manager.

The latter needed to many mouse clicks and dialogs to configure, whereas wicd just needs one click.

Here’s a screenshot of the simple wicd notification:

Screenshot

I really like the simplicity. Just for the nostalgia I keep also on the panel the gnome-netstatus-applet…

P.S I forgot to mention, I really think this should be the default network application in Debian/Ubuntu and other gnome based distros.

Posted in Debian, Linux

WOULD PAY FOR ANYTHING OPEN – 14. July, 2009

Hey, maybe some manufacturer read this desperate post.

I don’t like Windows, had enough from it’s crap. I use Linux. There are many people out there like me. And we would like to use devices that work. Just work with our Linux box.

Make us devices based on open source. It will save YOU costs of development. It will make us happier. I will pay. Many other too.

Here are a few examples:

I have a Nokia phone. Who know how much money they dumped on investing symbian OS. But it does not speak with my Linux. Syncing was never perfect. And I am sick of hacking. Just open the damn code, somebody will fix it for you NOKIA.

I bought an iRIVER T60. It was about 2 years ago. They box said it plays ogg vorbis files. But it doesn’t. It also has a poor alarm feature. Instead of actually playing song as alarm, it makes a quiet beep sound for 30 seconds and dies.
Stupid buggy software, which could have been fixed.

Music portable players should be chip. They should come by default with something like rockbox. This will save a few bucks on developing the software.

I will pay, and many will pay for a player, or a phone with open source software pre-installed.

So, who picks up the ball ??? I know it’s happening. I just hope it’s happening sooner than later.

Posted in Debian

Making Octave ploting nicer – 21. May, 2009

Personally I prefer python over Octave/Matlab. But since I’m being forced to write Matlab code for one of my course, I started playing around with octave.
By default octave makes ugly ugly plots because it uses the X11 terminal. But there’s a solution, you can switch to wxt terminal. In order to do that, add in the bottom of your .bashrc the following line:
export GNUTERM=wxt

And a magic will happen:
Before:

UGLY !!!

UGLY !!!

After:

NICE !!!

NICE !!!

That’s all folks.

Posted in Debian, Linux, science