Linuxtipstricks – Just another /linux/blog

November 29, 2008

How to open files with gedit using the right click menu in Ubuntu

Filed under: user tipstricks — Antonio Portuesi @ 3:55 pm
Tags: , , , , , , , ,

Many times it could be useful to open and edit a file in a straightforward way with a mouse click without any further action.

Let’s open a terminal window and type in the following command, which will create a new script file in our nautilus scripts directory

user@pc:~$ gedit ~/.gnome2/nautilus-scripts/Open\ file\ with\ gedit

Write the following script lines:

while [ $# -gt 0 ]
files=`echo “$1″ | sed ‘s/ /\?/g’`
filesall=”$files $filesall”
gedit $filesall&

Save the script and close gedit, then execute the already known command to make the script executable:

chmod u+x ~/.gnome2/nautilus-scripts/Open\ file\ with\ gedit

Now when you right click a file in gnome environment, you should see the related context menu item “Open file with gedit”


November 15, 2008

How to handle e2dk links with Firefox easily

Filed under: user tipstricks — Antonio Portuesi @ 5:29 pm
Tags: , , , , , ,

In most Linux systems, self-compiled aMule will install the ed2k utility in /usr/local/bin/ed2k, while package-installed aMule version will install it in /usr/bin/ed2k. SuSE packages put it in /usr/local/bin/ed2k.

Even if you installed Debian or Ubuntu distros you have to get “amule-utils” package to allow everything working properly.

Handling ED2k links in Firefox can be configured in two different ways: for an individual user or for all computer users as well.

Configuration for Firefox 2

  1. Open up your browser
  2. Write about:config in the address bar
  3. Right click on the list, select New, then Boolean
  4. Insert network.protocol-handler.external.ed2k as Preference Name and set Value to true
  5. Right click again, select New and String
  6. Insert as Preference Name and set Value as /path/to/ed2k (path to where the file is installed on your linux box)

Configuration for Firefox 3

Follow the above todo list and:

7.  Right click on the list, select New, then Boolean, insert network.protocol-handler.expose.ed2k as Preference Name and set Value to false

After those steps, click an ed2k link, and Firefox should ask which application you want to use to open the same link. Choose /usr/local/bin/ed2k and it should work fine.

November 1, 2008

How to check if Linux kernel supports IPv6

Filed under: user tipstricks — Antonio Portuesi @ 3:35 pm
Tags: , , , , , , , , , ,

As we know, IPv6 addresses are classified into three types:

  1. Unicast addresses: A unicast address identifies a single network interface. The protocol delivers packets sent to a unicast address to that specific interface. Unicast IPv6 addresses can have a scope which is reflected in more specific address names: global unicast address, link-local address, and unique local unicast address.
  2. Anycast addresses: An anycast address is assigned to a group of interfaces, usually belonging to different nodes. A packet sent to an anycast address is delivered to just one of the member interfaces, typically the “nearest” according to the routing protocol’s choice of distance. Anycast addresses cannot be identified easily: they have the structure of normal unicast addresses, and differ only by being injected into the routing protocol at multiple points in the network.
  3. Multicast addresses: A multicast address is also assigned to a set of interfaces that typically belong to different nodes. A packet that is sent to a multicast address is delivered to all interfaces identified by that address. Multicast addresses begin with the first octet being one (1) bits, i.e., they have prefix FF00::/8. The four least-significant bits of the second address octet identify the address scope, i.e. the span over which the multicast address is propagated.

What if I would like to start using IPv6 on a Linux system? How could I test, whether my Linux server system is IPv6 ready or not? If not, how could I enable IPv6 support under Ubuntu, OpenSuSE, Mandriva, Gentoo, Fedora and so on?

Many people know that Linux kernel has IPv6 support since 1996 release. All you need to do is compile kernel with IPv6 networking support. However, there is a so easy way to find out if Linux kernel is already compiled with IPv6 settings.

Check if the current running kernel supports IPv6 taking a look at your /proc-file-system:

user@pc:~$ cat /proc/net/if_inet6

Following lines should be shown:

user@pc:~$ 00000000000000000000000000000001 01 80 10 80 lo
user@pc:~$ fe800000000000000219d1fffe2abaa8 02 40 20 80 ath0

ipv6 module has IPv6 protocol stack for Linux. If above cat command fails the IPv6 module is not loaded.

Just type the following command:

user@pc:~$ sudo modprobe ipv6

Now to test again if all is ok write on your console:

user@pc:~$ lsmod | grep ipv6

that generates an output like that:

user@pc:~$ ipv6 411425 18

Now your system is ready for IPv6 jobs.

Create a free website or blog at