April 6, 2008

Ubuntu & Leopard

Posted in Computers, Linux tagged , , , at 12:49 pm by pmatos

As a Gentoo user, all my Gentoo / XPTO OS comparison will always be biased, so I will refrain from that… still…

Ubuntu impresses… Leopard disappoints.

A dry sentence like this might cause panic and cardiac arrests to some so let me try to find an excuse on why I might be feeling this. For long I have been using Linux and I had never tried Ubuntu and I never thought they could make a Linux installation so simple and user-friendly, I never thought they could design such nice buttons, backgrounds, etc. I was really impressed with the overall feeling… On the other hand, for years, I have been fed by promises that Apple will save the world from 3rd world OSes and “find the cure for cancer”, if you know what I mean… However, I am using Leopard… the champion, the OS ruler, the king of good design, the elite of simplicity… and I just feel the need to cry!

Advertisements

April 4, 2008

The Linux… the Freedom!

Posted in Linux tagged , , at 4:13 pm by pmatos

Regarding my last post on Ubuntu and the next on Leopard [MacOS X 10.5] here’s something…

Ubuntu is for U

Posted in Linux tagged , , , , , at 3:44 pm by pmatos

Yes, I know… It’s good… why? I tested it for a couple of weeks.  I just came from a longer than usual stay in Portugal and since Euler, my laptop, went dead my girlfriend kindly game gave me a PC to work on. Since I had no time to compile Gentoo from scratch I gave Ubuntu 7.10 a try.

The hype around Ubuntu has in fact its reasons. The installation is fast, straightforward and flawless. You can grab the CD ISO from the web or request a CD to be shipped to you for free. In an hour or so, everything is set up. The design/colours etc, are extremelly appealing and everything seems to fit together nicely.

Network, Cameras, Disks, Display, etc… everything seems to be supported out of the box. The work environment is great without any hassles. If you need a security update, you’re warned about it. If you want some new software, you can install it using a simple package manager. If there’s no package for your software, you’re on linux so you just configure and make the source and install it to usr local, or something similar.

The weeks I spent working on it were very good… however, there are some hassles for those of us who want to have several versions of software installed. Like for example GCC… however, that’s not the common use.

So, let me tell you, dump your Windows, Leopard, SuSE, Fedora, <insert your OS version/distro here> and switch to Ubuntu because most probably Ubuntu is for you.

I… well, I still use Gentoo!

January 15, 2008

Linux on PS3

Posted in Linux tagged , , , , , , at 10:43 pm by pmatos

Well, Linux on the PS3 is definitely no news… the news are that I finally installed a decent Linux distro in it. By decent I mean Gentoo (which is definitely better than decent).

I’ve installed Gentoo several times past the last 7 years or so, just because it is IMO the best distro out there for what I need. When it came to install a distro on the PS3, I wanted to play safe because I didn’t want my PS3 to break down all of a sudden, so I went for the official Linux distro Yellow Dog Linux. What I nightmare!!! Let me say that again: What a nightmare!!! Not that installation was hard (not at all, as hard as Gentoo I might add) but the distro itself is just obnocious. User support is terrible, community is horrible, homepage is a complex maze where you get lost before you enter it, it is hard to do what you want and you can’t install this or that because it is not supported yet…. ahhhhhhh but it will be on the next version….. which by the way nobody knows when it will come out. ARGH… It smells like Windows running on a Linux Kernel.

The tutorial you can find on installing Gentoo on PS3 is good but far from perfect. Hopefully the following details should make it clearer (I’ll assume in the following set of tips that you know how to install and how Linux works on the usual architecture):

  •  First, remember PS3 is just basically a normal PC with a very powerful processor which, since it has to have XMB (Sony Media Bar / Operating System) installed at all times, makes some things a bit different;
  • For a start, the boot loader (to boot another OS) is called KBoot, and it needs to be installed before installing a new other OS. If you already have KBoot installed from a previous Linux installation maybe it’s better to reinstall the latest version of it;
  • The media containing KBoot needs to be formatted as FAT as currently is the only file system XMB supports;
  • After installing KBoot, you can select in XMB to reboot PS3 with otheros and then PS3 will boot into the kboot prompt. This is where you should have a distro livecd handy (be it in USB or CD, doesn’t matter) prepared to be booted by KBoot. This media can theoretically be formatted using any filesystem supported by Linux, however, for Gentoo I suggest (and even think there’s no other way) Ext3;
  • Once you get into the livecd, you’re on your way, USB slots are /dev/sdX and PS3 drive is /dev/ps3da (for kernels >=2.6.23);
  • In Gentoo, partition ps3da and download a stage4 tarball from a mirror, and install it as usual, refer to the guide on installing Gentoo on PS3 and maybe even the guide for installing Gentoo on PPC64 assuming you’ll want to run PS3 on a Gentoo PPC64 (you can choose PPC32 but there’s no reason to);
  • After Gentoo is installed… throw a party and have fun!

December 21, 2007

And it’s Christmas, once again…

Posted in Computers, Life, Linux, Programming tagged at 11:29 am by pmatos

I have been silent for too long, however, the silence has a reason and it is good one.

For the last months the work has been too much and as I arrive home to write something I need to do something else as I have also been accumulating hobbies and free-time programming projects.

Lets then start at the beginning and see what has happened since my last posts a couple of months ago:

  1. In October I started my second year in Southampton and it made a year I was around. I should definitely write more about this but unfortunately time has not been a friend of mine. However, it was a year with loads of fun and work where I met great people and it was definitely one of the best years of my life. Now that I’m starting my second year I should think about what will happen after the PhD in about 2 year. Well, hopefully I’ll move on to a PostDoc somewhere here in the UK, if possible, here in Southampton. I just love it!
  2. I bought myself a PS3. Yay! After 2 weeks I had finished both RFOM and Heavenly Sword! :-D
  3. I integrated two european union research projects that I’m doing at the same time as my PhD.
  4. I founded the Functional Programming Special Interest Group  of the University of Southampton which I’m currently leading. We have been looking for the wonderful language: Haskell.
  5. My girl got herself a Macbook (will she miss Linux?!?)
  6. I’ve been polishing a software that allows you to get the most recent prices our of Amazon, showing to you the best prices and giving information on sales, etc. That helps me get the most out of my money, Amazon sales and brings you the Amazon Bargains category of this blog. Soon out for the public!
  7. I should start thinking about a 2008 todo list, however, this blogs drafts contains two posts called “2006 Todo” and “2007 Todo” which shows I never write todos!
  8. I managed to organize a trip to Portugal in February with some of my friends from Soton. That should be fun. Next countries to visit will hopefully be Germany, Spain and Syria.

That’s all for now folks. Hopefully this blog will come slowly to life. :-)

July 14, 2007

Stow it…

Posted in Linux at 12:29 pm by pmatos

Not in your distro package repository?!? Stow it!

All of us feel that sometimes the package we want is not on our distribution repository, be it Gentoo, Ubuntu or Debian. The general solution which I found only a couple of months ago and has been working perfectly is GNU Stow.

Stow allows you to install packages in /usr/local and keep track of what was installed or not. The general procedure is:

  1. Get the software tarball;
  2. Unpack it;
  3. Configure it using a prefixed directory (usually inside /usr/local/stow);
    1.  ./configure –prefix=/usr/local/stow/<packagename>
  4. Stow it using the package name. Go to /usr/local/stow and write ‘stow <packagename>’. Stow will create the correct symlinks  from usr local directory to the package directory.
    1. cd /usr/local/stow
    2. stow <packagename>

Use the software!!! Whenever you want to remove it just go to the stow directory, e.g. /usr/local/stow and

stow  -D <packagename>

With this I was able to build, install and later remove all of E17 packages cleanly. Nice, heh? (Many more options to tweak stow behavior can be found in its manual.

April 15, 2007

The Way to Enlightenment [Part III]

Posted in Linux at 12:37 pm by pmatos

As you may remember, more than a month ago I changed from KDE to E16 and posted two parts of this tutorial series. Now, it’s time to end it. Not only because it’s on my stack for too long but also because Catarina, my girlfriend, asked me for them.

In this part I’ll guide you through the configuration of E16 itself and some side-apps that’ll improve your user experience.

E16 Config

Basically, once you start E16 you indeed, have a very basic setting. Let’s get it working. I’ll go through all the options in the configuration windows in E16. Set everything up to your taste.

menu.png
By clicking on the background with your right mouse button you’ll get which is the basic menu with all the settings. The first option “Enlightenment Settings” is just a window that opens all the others without too much clutter. Anyhow, in this tutorial is simpler for me to go through all the option windows, one by one. Moreover, this first option is quite recent so you may not have it in your E16 version.
Now, I’ll go through the most important options. E16 has a huge number of options. Most of which are better explained if tried. So my opinion is that no matter what I say here, try them yourself.

Focus Settings

The first three options determine how your windows get the focus as you move the mouse pointer along. If you’re a windows user, you’re used to the third one. Windows get focus only when you click them. The other options are very nice and easy to get used to. The first option “Focus follows pointer” means that the focus will change as you move the mouse, i.e. the current focus is on the window where the pointer is. If the pointer is on the desktop background, no window has focus. The following option is like the first except that the focus will not get lost if you move the pointer to the desktop background, basically is the pointer is on the desktop background, the focus is on the last window with focus.The tick box “Clicking in a window always raises it”, when on, means the obvious. What you might ask is: “Why is this option interesting?” Well, simple, guess you have window A over window B and you click on B. Do you want B to come on top of A just because you clicked it? Your choice regarding this option depends on your answer. The next set of tick boxes might seem confusing but the main idea is when to you want windows to raise, i.e., windows to get on top of others. If you just don’t know… leave them as is and you can then come back if you don’t like the current settings. On to the next settings, the focus list is shown with Alt+Tab if you want it to be displayed, it’s really just a list, nothing fancy. On to some concepts, sticky windows are windows that are on all virtual desktops. You can make a window sticky by clicking with your right mouse button on the window bar and click “Stick/Unstick”. A shaded windows is a window which is not visible except the bar. To shade a window click on its bar with the middle mouse button or click again on the window bar with right mouse button and then “Shade/Unshade”. The next set of options has to do with, how do you want E16 to select the icon which shows up on the focus list, if any. Quite straightforward.

Move & Resize Settings

This sets how do you want windows to be handled while moving or resizing them. The first left set of radio buttons defines how do you want to see the windows while moving them: a snapshot of the window as when you started moving, a technical description of the move (useful for debugging), just the box encircling the window, as a shaded rectangle, as a semi solid rectangle, or translucent? On the resize methods you have mostly the same options. Regarding the geometry info position, usually it’s uninteresting for the user, so you can just select “Don’t show” or you can ask it to be in the screen corner or window center. Now, as two final options you can choose the window to be updated while moving it and you can ask to synch the move/resize with the application (both, I think, CPU intensive, in the sense that more CPU will be used if they are selected).

Window Placement Settings

This dialog is mostly about some eye candy (Slide options) and pratical issues of window placement which I think are self explanatory through the window labels.

Desktop Background Settings

The desktop background settings allow you to setup the background. However, you can only setup a given background if the background file is found in ~/.e16/backgrounds. So, move your background files there and then use this dialog to set it up.

Session SettingsNow, you surely want to start some programs when you enter E16. The best way is to enable the session script here and add the respective session script to its correct folder. The Init scripts which should be put in ~/.e16/Init are ran when E16 initiates (i.e., when it starts up, but not from a restart). The Start scripts which go to ~/.e16/Start are ran when E16 starts up from a restart or not (you can restart E16 by Middle Mouse Button -> Restart Enlightenment). The Stop scripts are to be ran when you stop/exit E16. So, for example, my scripts found in ~/e16/Init/start-apps.sh (and made executable):

$ cat .e16/Init/start-apps.sh
#! /bin/bash
# Program Startup

# Starting GKrellm2
gkrellm2 &

# Starting adesklets
nice -n 15 adesklets &

# Starting Xscreensaver
xscreensaver &

# Starting GAIM
gaim &

This bash script starts gkrellm2, adesklets (with low priority), xscreensaver and gaim!

This some of the most important options, you can also configure the iconbox (place where minimized apps go to) and the pager (place where you can see your set of virtual desktops).

System Tray

systray.pngTo add a system tray (this is a FAQ) just do Middle Mouse Button (on desktop) -> Desktop -> Create systray. And that’s it. You can also configure it.
aDesklets and Yab

We already installed adesklets and yab and have registered yab so it must be on your desktop by now, and if you followed the above session settings instructions you’ll have it started with E16 also. Now, how can you configure it? Not that easy but you’ll get used to it. With the right mouse button you can select configure and you’ll get into an editor (probably nano in Gentoo) and directly configure the file. There are some option description there which you should read. By using PageDown you’ll reach the options:

'caption_above': True

Use this if you want the bar to be on the bottom, so that the caption shows up above. The value False, makes the caption appear on the bottom of the menu.

'icon_max_height': 128,
'icon_max_width': 128,
'icon_maximize_threshold': 0.90000000000000002,
'icon_min_height': 48,
'icon_min_width': 48,
'icon_spacing': 5,

I don’t advise you to play with maximize_threshold. I don’t this it’ll be very good. Leave it as is. The max/min width and height should be the same as most icons are usually square. Moreover, the max should not be bigger than 128 if you wish quality icons since there aren’t many SVG icons nowadays (most are bitmaps which look terrible when stretched. Usually you have 24, 48, 64, 96 and 128 icons so use those numbers.

To configure the buttons in the bar use:
'icons': [('skype.png', 'Skype', 'skype'),
('amarok.png', 'AmaroK', 'amarok'),
('rosegarden.png', 'Rosegarden', 'rosegarden'),
('gimp.png', 'Gimp', 'gimp')]}

Just add lines like (‘x’, ‘y’, ‘z’) where x is icon filename, y is caption, and z is the program to start when you click it.
If you use simple file names they are relative to the icons/ subfolder of yab. You can however use absolute paths as noted in the config file:

You may specify here, for each yab instance you use,
what icons should be loaded (stored under `icons/’ by default,
but absolute path names are also valid), what commands they should trigger,
what the captions should be, what font to use, how generating effects,
etc.

Exit the file by doing Ctrl-X (if you’re in nano) and then confirm the save by answering the questions.

April 7, 2007

Upload feature in WP hosted by SF

Posted in Computers, Linux at 11:28 am by pmatos

As part of a new project which is hosted at SF, I decided to create a blog there using WP. Installation was quite simple since you have a lot of information available from SF regarding the shell and mysql server so everything went smoothly but then I couldn’t upload any files to the blog! :-(

“Damn”, I though… So, I remembered that it was obvious there was a permission problem with the

wp-content/uploads

directory. I logged in the shell server and chmoded to 755… didn’t work so I tried 775, still not working …. tried 777 and damn… not working!

The solution is not straightforward, so if you do not want to waste the time I did, here’s the solution.

So, tried several things… but they were not working so after several half hours or searching, giving up, searching, giving up… I posted a support request at sourceforge and they finally I got that:

Greetings,

The project group mounts are done read-only on the webservers, please
read:

https://www.sf.net/docs/E07

The fix is to create a directory in /tmp/persistent with your project’s
UNIX name, and then use that directory for any file reading/writing.

So, this seemed the solution but it is not. I created a directory in

/tmp/persistent

for my project but then I needed to tell wordpress that the uploads directory was outside the WP dir which is not possible. After several tries, the solution is to setup the directory to be

wp-content/uploads

and create a symbolic link uploads in wp-content to the directory you created in

/tmp/persistent

. This will work, I don’t think you’ll get there using any other solution, without modifying a WP code itself.

February 24, 2007

The Way to Enlightenment [Part II]

Posted in Linux at 1:25 pm by pmatos

Basic Programs & Configuration

Ok, so we have a usable system but it’s quite rude to use it like this without any tweaking, configuration or side-apps which will improve your user experience. So, basically in what follows I’ll install and configure some basic apps and I’ll leave configuration of Enlightenment itself for Part III.

Eterm

First we need a terminal. If we really want “full” enlightenment get eterm sources from:
http://www.eterm.org/ or using gentoo:

$ emerge eterm

(couldn’t be more simple!)

Now, this is a hell of a terminal and configuration is not so simple so I’ll leave that for part IV. Still you can already start one with the default options:
eterm.png

GKrellm2
gkrellm2.png
Now get this magic app: GKrellm2 which is a monitor which seats on your desktop and informs you of what is going on.

If also has some pretty nice plugins which you can install to do more that what is initially programmed to and a set of themes so you can change its look to better fit your style. So, again, you can find it’s page here: http://members.dslextreme.com/users/billw/gkrellm/gkrellm.html to install from source or if you’re using gentoo:

$ emerge -av gkrellm gkrellm-plugins gkrellm-themes

After this everything is installed and I advise you to start the gkrellmd daemon at the beginning so:

$ rc-update add gkrellmd default
$ /etc/init.d/gkrellmd start

will install the daemon in the default runlevel and start it. Now, fire up eterm and do

$ gkrellm2 &
$ exit

will start gkrellm2 and exit the terminal without quitting the application (of course, we will have to set up enlightenment to start this whenever E16 itself starts but that I’ll leave for Part III, among other gkrellm2 tweaks).

I like to have it on my top right part of the screen so I just drag it there and right click it to get to the configuration window which should look like this:
gkrellm-config.png

The options are pretty straightforward to set as are the plugins and the ones I’ll describe are biased to my taste, suit yourself when picking options and plugins for you.

No sensors. I enable the 24hour clock with seconds shown. CPU is left untouched. Enable my disk usage graph, disable net ppp0, disable mail check, enable battery time and uptime.
I didn’t setup any plugins.

This is just a very quick review of what I did. It by no means is conformant with this gkrellm shot or with your system. Just choose those you prefer.

And finally I selected the Invisible theme.

aDesklets

aDesklets is a nice thing for your desktop. Mainly I want two desklets: photo and yab. First get adesklets from the site or:

$ emerge adesklets

Then let’s install the desklets:

$ adesklets -i

Select the desklets you wish to install and that’s it, they’ll be automagically installed to your home dir.

Get to the terminal and run the scripts corresponding to the desklets you wish to start, in my case:

$ .desklets/photo-0.0.5/photo.py
$ .desklets/yab-0.0.2/yab.py

Press r in both for register them. Now start adesklets

$ adesklets

and the desklets should appear in your desktop every time you start adesklets.

KeyBindings Editor

Now, let’s one of my favourite feature working: Keybindings.
Get e16keyedit from http://www.enlightenment.org/ or:

$ emerge -av e16keyedit

Well, now, run it! You get as you can see a whole bunch of already defined keybindings. I define a bunch of other to run applications I commonly use without accessing the menus. Emacs, DrScheme, Firefox and Eterm:
e16keyedit.png

I’ve zoomed a bit so you can see what I configured:
keys.png

The usage is really simple, you just select a key, a modifier and an action. Remember to click on “New Keybinding” each time you start creating a new one and on save at the end, otherwise they’ll no be saved!

If you are confused by the Eterm line, don’t worry, I’ll explain it in Part IV and I’ll also what goes into .eterm.cfg. :-)

Next we’ll configure enlightenment itself, along with some udev rules and an easy way to mount devices.

February 23, 2007

The Way to Enlightenment [Part I]

Posted in Linux at 12:25 am by pmatos

Getting Enlightenment

Well, for those using gentoo is pretty simple:

emerge -av enlightenment

With this you’ll get enlightenment 0.16.8.1 (currently), since this is the current stable Gentoo version. For other distros it should be pretty easy too, however I don’t know how.

Note: I’ve just sent a bug report for Gentoo to add 0.16.8.6 to the portage repository, however, it’ll still probably take a while. Anyway, an easy way to get this version is just to do, as root:

$ cp /usr/portage/x11-wm/enlightenment/enlightenment-0.16.8.5.ebuild /usr/portage/x11-wm/enlightenment/enlightenment-0.16.8.6.ebuild
$ ACCEPT_KEYWORDS=”~arch” emerge -av enlightenment

For those installing from sources the procedure is simple since development is based on autotools so it is pretty standard. The sources can be find at : http://www.enlightenment.org/Enlightenment/Get_Enlightenment/

This is the first big step for the series of Enlightenment configuration which should be coming up one at a time for the following days. After this you should be able to select E16 from your current desktop manager (usually kdm, gdm or xdm) and start it up.

And you get…
E16 Desktop

Next page