Monthly Archives: September 2011

Introduction to Yum package management.

Yum is the package manager of Fedora.It is able to install, remove, update and query packages.

First of all, if you want to work with Yum, you have to have superuser privileges, so we first log in as root:

$ su -

Updating packages

If we want to check if there are updates, we can use the next command:

# yum check-update

Easy, isn’t it? Next step, is update packages. We can choose whether update all or just a single one.

Updating everything:

# yum update

Updating a single one:

# yum update packagename

# yum update google-chrome-stable

We are also able to make queries to find our desired package.

# yum search term1 [term2 term3 termN]

If we want to list available packages we can use:

# yum list available

To list installed packages:

# yum list installed

To retrieve information about a package we use:

# yum search packagename

To install a package:

# yum install packagename

And to remove:

# yum remove packagename

 

Yum is a quit powerful package manager, with a good and clear syntax.

Functions: How to return more than one value.

We cannot return two variables from a function, but we could use an array for that.

So for example, in JavaScript, it would be like this:

function foo() {
	// do something here
	// whatever
	return [myvalue, myothervalue, otherthing];
}

And then, for use those values:

foo()[0] // this is myvalue
foo()[1] // this is myothervalue
foo()[2] // this is otherthing

This can be applied to any other language  you may know. And that’s how we return more than one value from a function

Enable “delete key” on GNOME3 (Fedora 15 and Ubuntu 11.04)

By default, we can’t delete files in Nautilus 3 with delete key, as we did always, because it’s deactivated.

For  enable this on Fedora 15, go to terminal and write this down:

$ gsettings set org.gnome.desktop.interface can-change-accels true

Then go to a nautilus window, click on Edit menu and put the mouse over (don’t press, only hover) ”Delete” and press delete key. You will see the new shortcut at the right.

Once you’ve done it, I recommend to turn it off again:

$ gsettings set org.gnome.desktop.interface can-change-accels false

If you use ubuntu you can use dconf-editor. Press ALT+F2 and write dconf-editor and then follow this path: org > gnome > desktop > interface and check can-change-accels.

Then, do the same as in Fedora, but you may have to hit the key twice.

Don’t forget to uncheck the box for preventing changing other shortcuts.