GLUA Tech Sessions

22 10 2008

The LUG (Linux User Group) I used to belong is organizing a series of talks about Open Source technologies. The final objective is to aproximate users, developers, professionals, designers, teachers and students making them share experiences related with the open source world.The event will take place in University of Aveiro in 8th of November. The registration is free. Find out more in the official site.

PS: Portuguese spoken event.



Stats and mon

30 09 2008

I’ve setup a simple and reliable monitoring mechanism on VPS. Basically i’m using:

  • Monit:  as stated in the site, monit is a utility for managing and monitoring, processes, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations. So basically I’m using it to monitor (and restart if necessary) the daemons I consider important.
  • Munin: well it generates a ton of graphs and stats that allows me to check up how everything is going.

I like these tools, they are simple and nice. So what do you guys use?



PS3 Linux Inside (2/2)

24 04 2008

I came back to this issue today. While I’m waiting for an “apt-get upgrade” on my ps3 machine I decided to enlighten you how to setup correctly your video resolution. So what you have to do is to play a little bit with ps3videomode command. If you try this on CLI:

jsantos@clarke:~$ ps3videomode -h
ps3-video-mode (ps3-utils) 2.0.2
Usage:
ps3-video-mode [options]
Options:
--help, -h print this message
--video, -v set video mode ID
--full, -f use full screen mode
--color, -c use HDMI full range
--dither,-d use dither ON mode
Video mode ID:
0:auto mode
YUV 60Hz 1:480i 2:480p 3:720p 4:1080i 5:1080p
YUV 50Hz 6:576i 7:576p 8:720p 9:1080i 10:1080p
RGB 60Hz 33:480i 34:480p 35:720p 36:1080i 37:1080p
RGB 50Hz 38:576i 39:576p 40:720p 41:1080i 42:1080p
VESA 11:WXGA 12:SXGA 13:WUXGA
full screen mode: + 128
dither ON mode : + 2048
Example:
ps3-video-mode -v 3 -f 720p 60Hz with full screen mode.
ps3-video-mode -v 131 Same as above.
If no argument is given, displays the current video mode.
Send bug reports to Geoff Levand .

First off all, you need stop GDM before proceeding. This is not an exact science here so you have to see the options available for you. In my case I have a Half HD TV so I can get 1080i tops. So looking for the table obtained above it seems that I should use 4 mode (ps3videomode -v 4), right? Wrong! It didn’t work well for me, i got the image shifted to one side and cut. Then I tried the full screen mode (128 + 4, so ps3videomode -v 132). Not yet there, although it worked on CLI, when I started GDM I got my LCD to 576p. That sucked, but I didn’t give up: I tried dither ON mode (2048 + 4 - ps3videomode -v 2052). Worked OK both on CLI and with a GDM restart!

So now I know how to set my resolution correct, lets make it permanent:

sudo vim /etc/event.d/ps3videomode

Then write this on the file:

start on runlevel 2
exec /usr/bin/ps3videomode -v INPUT_YOUR_VIDEOMODE

That’s it! Reboot and check if it is OK. My experience says that gnome based ubuntu has a jerky performance so I’m currently trying something lighter like XFCE based desktop (Xubuntu) and cleaning some startup apps that I do not need.

Next steps will be to check mplayer’s performance and get the damn wireless to work. And… A screenshot just for you:



PS3 Linux Inside (1/2)

8 04 2008

Well, I can’t get a new device without trying to put Linux on it. The same happened to my PS3. And before I forget how I did it, I’m posting here my instructions with all the twists and turns.

First of all, lets see the pre-conditions:

  • As we need to reformat PS3 hard disk, you need to backup your stuff: you don’t want to loose you save game in level 837 where the mythic bad ass boss appears with a BF287 blaster that you’re trying to get though for three week, do you?
  • A USB keyboard and mouse - I bought a cheap(est) wireless combo.
  • A burned CD (or DVD) with Ubuntu OS - use this image (Ubuntu Playstation 3 Desktop PC iso file)

That’s it. Ok, now the good clean fun. The first thing you need to do is to format the PS3s hard disk:

  • Go to [Settings] > [System Settings] > [Format Utility]. Choosing [Yes] here will not format everything, it will take you to the next screen - don’t worry, trust me.
  • Choose [Custom] and [Allot 10GB to the Other OS] - it’s more than enough.
  • Choose [Quick Format] and confirm - here we go! I hope you didn’t forget to backup the save games, now it’s to late.
  • When the format is completed, press X to restart the system. Restart didn’t work for me, I had to physically unplug the power on my PS3.
  • Check everything is OK - you should be in XMB again with no save games.
  • Load the burned CD or DVD in the tray and restart by pressing [Yes] at the [Default System] > [Other OS] prompt.
  • If everything turn out ok, you should have something like this in your TV.
  • This is an Ubuntu Live CDROM
    If in doubt, just press Enter.
    kboot: _

  • Just obey and press enter.
  • Probably your monitor resolution will not be detected. Live with that. (TIP: Simply hold down the keyboard Alt-key while you click and drag the mouse to position the window so you can see the Forward buttons on each screen.)
  • Just follow the instructions, it’s as simple as installing Ubuntu on a Desktop PC.
  • Go grab a snack - it will take a while.
  • When the installation completes, click the Restart now-button. The CD will be automatically ejected. Press enter.
  • Again, it won’t reboot. Just use the normal I/O button to force a shutdown. I/O again to power it up.
  • You should be on kboot again. Hit Enter. Wait for a while, and you will soon be greeted by the Ubuntu login screen. Congratulations, you have successfully installed Ubuntu on your PS3.

For now, this is all I have. You’ll probably be very disappointed with the resolution and performance (GNOME will eat all your RAM), but I promise that I’ll post some tweaks that worked nice for me.



Pretty permalinks

18 03 2008

My friend Alfredo Matos has redesigned his website (which, by the way, looks very nice) and I noticed that he had a lot better looking permalinks than me. So I decided to investigate what wordpress offered me to beautify my URLs. After googling a little, I got to this page which basically explains that you can have three types of URLs in wordpress:

  1. Ugly (the default option): something like http://www.mydomain.com/?p=X
  2. Almost pretty: an intermediate option for those running an apache without mod_rewrite - it looks something like http://www.mydomain.com/index.php/about-me
  3. Pretty: the holy grail and the option that I use now - it looks something like http://www.mydomain.com/about-me

Cutting out the bullshit the only thing you need to do is to allow .htaccess to be readable by www-data and enable mod_rewrite in apache.

sudo a2enmod rewrite
sudo /etc/init.d/apache2 force-reload

You will also probably need to change AllowOverride directives in apache sites enabled from None to All, otherwise rewrite directives in .htaccess will be ignored. There are other ways to do it, but this the simplier one but surely not the most secure.



SVN in five easy steps

8 02 2008

I was setting up a subversion repository for personal usage and I though it would be be nice to share the necessary steps for a simple ssh+svn access configuration for a Ubuntu based system. Beware that this is probably the simplest svn setup possible, but actually it mets my requirements: simple, fast and secure. So here it goes:

  1. Install subversion package:
  2. sudo apt-get install subversion

  3. Add subversion group:
  4. sudo addgroup subversion

  5. Add users to this group:
  6. sudo vim /etc/group
    Find subversion group created and add yourself (and others) to the group.

  7. Create basic directory structure and set permitions. Basic assumption are that main svn dir will be located in /home/svn/ and sample svn project will be called simply project
  8. cd /home/
    sudo mkdir svn
    cd svn/
    sudo mkdir project
    sudo chgrp -R subversion project/
    sudo chmod -R g+rws project/

  9. And finally create your project:
  10. sudo svnadmin create /home/svn/project/

Voila, it’s done! You can access it with the command:
svn co svn+ssh://[sshuser]@[hostname]/home/svn/project/
Happy versioning! :)



News from the world

29 03 2006

First of all, I would like to point out that Benfica did a pretty good in the Champions League, obtaining 0-0 against what I think it is one of the best teams in the world. I’m glad that I went to Estádio da Luz to see the match. Overcoming Barcelona is going to be very difficult, but at least it is still possible. Ah, those who don’t like him, Moretto rules!

News from the open source world: check prism54g project if you own a wireless card based on Conexant chipset. The goal is to write a completly open source firmware in such way that it will be possible to run your wireless station on 100%-free software.

It seems that Apple has sued Apple. The fuss is all about, as you can imagine, the bitten or not bitten apple. Apple Corp, the record label that protects the Beatles music heritage, is sueing Apple Computer for the misusage of the apple trademark in music business. Funny story, check details here.