Difference between pages "Building a Kernel from Source" and "Package:Irssi"

From Funtoo
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
Setting up a proper kernel yourself - lean, mean and tailored to your hardware,  is the challenge by which a linux user can graduate to becoming a Funtoo knight ;-)
{{Ebuild
|Summary=A modular textUI IRC client with IPv6 support.
|CatPkg=net-irc/irssi
|Maintainer=
|Homepage=http://www.irssi.org/
}}


Even though many of us are using enterprise-ready kernels in datacenters, there is almost nobody who hasn't at least considered building a kernel for his laptop / PC.
=== Description ===
We are showing here how an intermediate Linux user can use an alternative to the standard beginners "genkernel" approach,  to compile a custom kernel, in a relatively speedy and easy set up.
irssi is a small command line IRC client based on ncurses. It's a great thing to use when you SSH into a server, or just simply for your main IRC client.  


== Minimum Requirements ==
=== Installation ===
* '''Understand the command line'''
The install of irssi is pretty straight forward. There are not many USE flags, but one that is worth looking at is the {{c|SSL}} flag. This enables you to use SSL when connecting to servers.
* '''Know where the kernel files are located'''
{{console|body=
###i## echo "net-irc/irssi ssl" >> /etc/portage/package.use
###i## emerge irssi
}}
=== Using irssi ===
Using irssi initially can be a little intimidating if you're not used to command line programs. To first start irssi, you just simply run:
{{console|body=
$ ##i##irssi
}}
There are flags you can pass to the command line while starting irssi, such as:
{{console|body=
$ ##i##irssi -n mynick -c irc.freenode.org
}}
This would connect you to Freenode with the nick 'mynick'. Or alternatively you can just run the {{c|irssi}} command and connect via SSL if you need to:
{{file|body=
/connect -ssl irc.freenode.org
}}
This will automatically connect you over port 6697.


== Assumptions ==
When you have connected to the server of your choice, you can join a channel simply by:
You start from an installed Funtoo system on the disk, or at least, you are on stage3 in a chrooted environment from a live cd, following somehow the Funto [[Installation (Tutorial)|Installation Tutorial]].
{{file|body=
/j #funtoo
}}
If you want to leave any channel you've entered you can use the {{c|part}} command:
{{file|body=
/part #funtoo reasons...
}}
There are a few ways of navigating through your channels, you can use {{c|alt+<nowiki>{1-9}{q-p}</nowiki>}}, or alternatively you can use the {{c|window}} command that is in irssi:
{{file|body=
/window 1
/window 2
/window 3
}}
For as many channels you are apart of.  


== Less advanced version ==
When you're ready to leave, you can simply type in:
=== Emerging the kernel sources ===
{{file|body=
To begin, we have to figure out which kernel sources we will use. If you are unsure about which sources are available and what their benefits and drawbacks are, check out the [[Funtoo_Linux_Kernels| Kernels]] page.
/exit
}}
Which will close out connections to the IRC networks you've joined, and take you back to your console window.
=== Themes and scripts ===
==== Scripts ====
There are a few things you can do to make irssi look a little bit better and add some cool features. There are a few plugins that are pretty useful, such as {{c|fnotify.pl}} which is a script that utilizes {{f|libnotify}} to send you popup notifications for when your nick is pinged or you are sent a private message.  


After you have made a decsion as to which kernel you want to install, emerge it:
{{file|name=fnotify.pl|lang=perl|desc=fnotify.pl|body=
<console>
# todo: grap topic changes
###i## emerge vanilla-sources
</console>
Portage will now go about installing the sources to ''/usr/src''. It will also symlink the kernel-version directory to a directory called ''linux''.


=== Configuring the kernel ===
use strict;
Now that the kernel sources are on your system, you should configure them. To do this, change your directory to ''/usr/src/linux''
use vars qw($VERSION %IRSSI);
<console>
###i## cd /usr/src/linux
</console>
As we are now in the kernel sources directory, we can run a script that allows us to modify them. Run:
<console>
###i## make menuconfig
</console>
While you edit the sources, keep the following in mind:
* To build something into your kernel, press y when you have it selected.
* To exclude something from your kernel, press n when you have it selected.
* To build something as a module, press m.


Things that you may need to include in your kernel:
use Irssi;
* Wireless/LAN drivers
$VERSION = '0.0.3';
* Support for your graphics card
%IRSSI = (
* Support for your audio card
authors    => 'Thorsten Leemhuis',
* Support for USB devices
contact    => 'fedora@leemhuis.info',
{{fancynote| Many pages on the wiki will tell you the kernel requirements for the application that they are about. Keep your eyes open for the blue background, white text sections of pages. Like on this one: [[uvesafb| uvesafb]]}}
name        => 'fnotify',
description => 'Write a notification to a file that shows who is talking to you in which channel.',
url        => 'http://www.leemhuis.info/files/fnotify/',
license    => 'GNU General Public License',
changed    => '$Date: 2007-01-13 12:00:00 +0100 (Sat, 13 Jan 2007) $'
);


=== Building and installing the kernel sources ===
#--------------------------------------------------------------------
After you finish configuring your kernel sources, you will need to build them. To build your sources, run the following:
# In parts based on knotify.pl 0.1.1 by Hugo Haas
<console>
# http://larve.net/people/hugo/2005/01/knotify.pl
###i## make
# which is based on osd.pl 0.3.3 by Jeroen Coekaerts, Koenraad Heijlen
</console>
# http://www.irssi.org/scripts/scripts/osd.pl
{{fancytip| You can add -j<number of processing cores + 1> after make to build the kernel more quickly.}}
 
When the kernel and its modules finish building, install them:
<console>
###i## make install modules_install
</console>
Now that you have installed your kernel and modules, it is a good idea to install an initramfs. If your system has a separate ''/usr'' partition, is encrypted, or uses some other non-standard configuration, it will probably not boot without an initramfs. See [[Building_a_Kernel_from_Source#Initramfs| Initramfs]].
 
== Advanced version ==
=== Getting ready to start ===
 
{{fancynote| In this case we are building a kernel that is booting root in LVM over encrypted LUKS container.
If you don't have this setup, don't worry, you just don't need all the modules, but everything else is similar.}}
First, there is the decision which linux kernel sources we need.
There are plenty of them in the repositories around, often it is not easy to distinguish between them.
 
I would always trust my distribution of choice and take what is has to offer - and funtoo has a lot to offer!
 
I really do recommend (especially if it is your first time) to build a debian-sourced genkernel like described in chapter 5 "Using Debian-Sources with Genkernel" in the [[Funtoo_Linux_Kernels| Funtoo Kernels Tutorial]].
 
From there you should have a running system booting nicely from your own build (just little bit bloated) kernel. This is more than you can expect from any other ready to go distribution.
 
{{fancynote| We are using RedHat's dracut in order to build a nice initramfs (containing all the necessary tools and extra drivers our kernel might need to start the system). Although dracut is the way to go, more sophisticated and not as buggy as gentoo's genkernel approach, more and more funtoo geeks start using slashbeast's better-initramfs, which we will cover at the end of this howto! So after having set up a genkernel from debian or gentoo sources we are going to build a kernel with either (or both) dracut or/and better-initramfs. So gentoo sources with genkernel is always my backup if anything is not working correctly on my system. For the slightly more geeky approach with my own initram I am using pf-sources, ck-sources or any other more or less heavily patched sources.}}
 
Let's go!
 
=== Kernel Sources ===
The source you use on your system is up to you. For a laptop or desktop system, the following are recommended:
* '''{{Package|sys-kernel/pf-sources}}'''
* '''{{Package|sys-kernel/ck-sources}}'''
* '''{{Package|sys-kernel/gentoo-sources}}'''
* '''{{Package|sys-kernel/git-sources}}'''
* '''{{Package|sys-kernel/sysrescue-std-sources}}'''
* '''{{Package|sys-kernel/debian-sources}}'''
{{fancynote| If you are unsure of which sources you would like to use, emerge <code>gentoo-sources</code>. That's always a safe bet for a general system. For more information on available kernels, check out: [[Funtoo Linux Kernels]]}}
 
=== Prerequisites ===
 
Regardless of the tools you already have installed, it is recommended to follow the steps below, even if you find them to be redundant.
First, we edit our <code>/etc/portage/make.conf</code>:
 
<pre>
#These compiler flags are just tweaking (optimazation) and NOT necessary:
CFLAGS="-O2 -pipe -march=native -ftracer -fforce-addr"
CXXFLAGS="${CFLAGS} -fpermissive -fomit-frame-pointer"
KDIR=/usr/src/linux
KERNEL="symlink build"
USE="$KERNEL ....here are your use flags...."
## These modules are available:
## DRACUT_MODULES="dracut_modules_biosdevname dracut_modules_btrfs dracut_modules_caps dracut_modules_crypt dracut_modules_crypt-gpg dracut_modules_dmraid dracut_modules_dmsquash-live dracut_modules_gensplash dracut_modules_iscsi dracut_modules_livenet dracut_modules_lvm dracut_modules_mdraid dracut_modules_multipath dracut_modules_nbd dracut_modules_nfs dracut_modules_plymouth dracut_modules_ssh-client dracut_modules_syslog"
## We will use these modules for LVM / LUKS:
DRACUT_MODULES="crypt lvm plymouth biosdevname dmraid crypt-gpg dmsquash-live ssh-client syslog"
</pre>
 
Next, we set the package keywords by adding the following to <code>/etc/portage/package.use</code>:
 
<pre>
sys-kernel/dracut dm net device-mapper crypt lvm
</pre>
 
{{fancynote| If you don't have lvm over encrypted LUKS you just add the "net" keyword here, or "selinux".}}
 
 
Next, we build our packages:
<console>
###i## emerge -av app-portage/gentoolkit sys-kernel/pf-sources sys-kernel/dracut sys-boot/plymouth sys-boot/plymouth-openrc-plugin
</console>
 
=== Preparing the kernel ===
 
We go now to the sources directory and enter the following commands to update the kernel's  .config  file:
<console>
###i## cd /usr/src/linux/
###i## make clean
  CLEAN  .
  CLEAN  arch/x86/kernel/acpi/realmode
  CLEAN  arch/x86/kernel/cpu
  CLEAN  arch/x86/kernel
  CLEAN  arch/x86/vdso
  CLEAN  arch/x86/lib
  CLEAN  drivers/gpu/drm/radeon
  CLEAN  drivers/net/wan
  CLEAN  drivers/scsi/aic7xxx
  CLEAN  drivers/tty/vt
  CLEAN  drivers/video/logo
  CLEAN  firmware
  CLEAN  kernel
  CLEAN  lib/raid6
  CLEAN  lib
  CLEAN  security/apparmor
  CLEAN  security/selinux
  CLEAN  usr
  CLEAN  arch/x86/boot/compressed
  CLEAN  arch/x86/boot
  CLEAN  .tmp_versions
  CLEAN  vmlinux System.map .tmp_kallsyms2.S .tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms1.S .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map
###i## zcat /proc/config.gz > /usr/src/linux/.config
</console>
 
Next, we run <tt>make localmodconfig</tt>. You will get some questions which you can answer mostly with either M (compiled as a module) or Y (compiled directly into the kernel). If you are not sure what to choose, press enter, and the default option will be selected.
<console>
###i## make localmodconfig
Enable different security models (SECURITY) [Y/n/?] y
Enable the securityfs filesystem (SECURITYFS) [Y/?] y
Socket and Networking Security Hooks (SECURITY_NETWORK) [Y/?] y
Security hooks for pathname based access control (SECURITY_PATH) [Y/?] y
Low address space for LSM to protect from user allocation (LSM_MMAP_MIN_ADDR) [65536] 65536
NSA SELinux Support (SECURITY_SELINUX) [Y/n/?] y
  NSA SELinux boot parameter (SECURITY_SELINUX_BOOTPARAM) [N/y/?] n
  NSA SELinux runtime disable (SECURITY_SELINUX_DISABLE) [N/y/?] n
  NSA SELinux Development Support (SECURITY_SELINUX_DEVELOP) [Y/n/?] y
  NSA SELinux AVC Statistics (SECURITY_SELINUX_AVC_STATS) [Y/n/?] y
  NSA SELinux checkreqprot default value (SECURITY_SELINUX_CHECKREQPROT_VALUE) [1] 1
  NSA SELinux maximum supported policy format version (SECURITY_SELINUX_POLICYDB_VERSION_MAX) [Y/n/?] y
    NSA SELinux maximum supported policy format version value (SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE) [19] 19
TOMOYO Linux Support (SECURITY_TOMOYO) [Y/n/?] y
  Default maximal count for learning mode (SECURITY_TOMOYO_MAX_ACCEPT_ENTRY) [2048] 2048
  Default maximal count for audit log (SECURITY_TOMOYO_MAX_AUDIT_LOG) [1024] 1024
  Activate without calling userspace policy loader. (SECURITY_TOMOYO_OMIT_USERSPACE_LOADER) [Y/n/?] y
AppArmor support (SECURITY_APPARMOR) [Y/n/?] y
  AppArmor boot parameter default value (SECURITY_APPARMOR_BOOTPARAM_VALUE) [1] 1
Integrity Measurement Architecture(IMA) (IMA) [Y/n/?] y
EVM support (EVM) [N/y/?] (NEW)
Default security module
  1. SELinux (DEFAULT_SECURITY_SELINUX)
  2. TOMOYO (DEFAULT_SECURITY_TOMOYO)
  3. AppArmor (DEFAULT_SECURITY_APPARMOR)
> 4. Unix Discretionary Access Controls (DEFAULT_SECURITY_DAC)
choice[1-4?]: 4
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI && EXPERIMENTAL)
warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_MEDIA && I2C && EXPERIMENTAL)
#
#
# configuration written to .config
# Other parts based on notify.pl from Luke Macken
# http://fedora.feedjack.org/user/918/
#
#
warning: (GFS2_FS) selects DLM which has unmet direct dependencies (EXPERIMENTAL && INET && SYSFS && CONFIGFS_FS && (IPV6 || IPV6=n))
#--------------------------------------------------------------------
warning: (IMA) selects TCG_TPM which has unmet direct dependencies (HAS_IOMEM && EXPERIMENTAL)
warning: (MEDIA_TUNER) selects MEDIA_TUNER_TEA5761 which has unmet direct dependencies (MEDIA_SUPPORT && VIDEO_MEDIA && I2C && EXPERIMENTAL)
warning: (ACPI_HOTPLUG_CPU) selects ACPI_CONTAINER which has unmet direct dependencies (ACPI && EXPERIMENTAL)
</console>


Now comes the most adventurous part!
#--------------------------------------------------------------------
# Private message parsing
#--------------------------------------------------------------------


=== Building the Kernel ===
sub priv_msg {
<console>
my ($server,$msg,$nick,$address,$target) = @_;
###i## make -j8  bzImage
filewrite($nick." " .$msg );
###i## make -j8 modules
}
###i## make modules_install
###i## make install
</console>
 
== Initramfs ==
{{fancywarning| Make sure that you have built and installed your kernel sources / modules before building an initramfs.}}
=== Initramfs, or not? ===
The reason to build a kernel with an initramfs is mostly for interoperability (e.g. live-cd's) and special features like an included busybox, ssh, etc.  But mostly, and that's why we are doing this here now, to have a proper kernel up and running quick'n dirty in a reasonable time without fighting hours and days until a more or less exotic hardware is perfectly run by the kernel.
After having a proper basic kernel running with the help of an initramfs, I really recommend you to go a step further and build a true kernel with all features includes without an initramfs. But this could be pain in the butt and very time consuming - so we do it the funtoo way here - at least in the second example when we stick to better-initramfs instead of Red-Hat's ''dracut''.
 
=== Option two: using better-initramfs ===
 
Piotr's better-initramfs is another approach to building an initramfs. It is quick, nice and shiny, and is popular among funtoo'ers. The biggest plus is that, once built it is kernel version independent. Follow the instructions below to get better-initramfs up and running.
 
==== Downloading better-initramfs ====
<console>
###i## cd /opt
###i## git clone git://github.com/slashbeast/better-initramfs.git
###i## cd better-initramfs
</console>
Above, we have moved to the <code>/opt</code> directory, which is often used for '''opt'''ional software on Linux systems. Next, we get a copy of better-initramfs from github.com. Finally, we change to the better-initramfs directory so that we can build it in the next step.


==== Build better-initramfs ====
#--------------------------------------------------------------------
<console>
# Printing hilight's
###i## bootstrap/bootstrap-all
#--------------------------------------------------------------------
###i## make prepare image
###i## cp output/initramfs.cpio.gz /boot
</console>
In this step, we first run the ''bootstrap-all'' command to build all of the applications and libraries required for better-initramfs. Then, we make an initramfs image using <code>make prepare image</code>. Lastly, we move the newly created initramfs to <tt>/boot</tt>.


=== Adjust boot.conf ===
sub hilight {
 
    my ($dest, $text, $stripped) = @_;
Now that we have the initramfs and kernel sources, we can edit <tt>/etc/boot.conf</tt> to tell GRUB about our initramfs and kernel. The configuration below is for a system that is encrypted and uses lvm. If your system is not configured like this, take a look at this page: [https://bitbucket.org/piotrkarbowski/better-initramfs| better-initramfs configuration options].
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
{{file|name=/etc/boot.conf|desc= |body=
filewrite($dest->{target}. " " .$stripped );
boot {
    }
        generate grub
        default "Funtoo Linux"
        timeout 3
}
}


"Funtoo Linux" {
#--------------------------------------------------------------------
        kernel vmlinuz[-v]
# The actual printing
        initrd /initramfs.cpio.gz
#--------------------------------------------------------------------
        params += enc_root=/dev/sda3 lvm luks root=/dev/mapper/vg-root rootfstype=ext4 quiet
}


"Funtoo Linux dracut" {
sub filewrite {
        kernel vmlinuz[-v]
my ($text) = @_;
## this is the dracut generated initrd
# FIXME: there is probably a better way to get the irssi-dir...
        initrd initramfs[-v].img
         open(FILE,">>$ENV{HOME}/.irssi/fnotify");
         params  = quiet rootfstype=ext4
print FILE $text . "\n";
        params += luks enc_root=/dev/sda3
         close (FILE);
         params += lvm root=/dev/mapper/vg-root
}
}


Irssi::signal_add_last("message private", "priv_msg");
Irssi::signal_add_last("print text", "hilight");


"Funtoo Linux genkernel" {
#- end
        kernel kernel-genkernel[-v]
        initrd initramfs-genkernel[-v]
        params = quiet rootfstype=ext4
        params += luks enc_root=/dev/sda3
        params += lvm root=/dev/mapper/vg-root
}
}}
}}
Okay,... here you go..! :)
Another very useful script is for colored nicks, to better tell people apart. Which can be found at [http://scripts.irssi.org irssi scripts] called {{f|nickcolor.pl}}.


update the <tt>grub.cfg</tt> with boot update, then reboot and see how it works!
When you have the scripts you would like you would put them into {{f|~/.irssi/scripts}} and set a link to {{f|~/.irssi/scripts/autorun}}.
 
{{console|body=
<console>
$ ##i##wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
###i## boot-update -v   
$ ##i##cd ~/.irssi/scripts/autorun
 
$ ##i##ln -s ~/.irssi/scripts/nickcolor.pl .
boot-update 1.5.2 / Copyright 2009-2011 Funtoo Technologies
$ ##i##ln -s ~/.irssi/scripts/fnotify.pl .
 
}}
[use option "-l" for license info, "-h" for help]
You can do this for as many scripts as you've chosen to use. They will automatically load when you start irssi. You can also manually load scripts:
 
{{file|body=
* Generating config for grub...
/load ~/.irssi/scripts/fnotify.pl
 
Irssi: Loaded script fnotify
DEFAULT > Funtoo Linux better-initramfs - vmlinuz-3.2.6-pf
}}
          Funtoo Linux dracut - vmlinuz-3.2.6-pf
Whichever works best for you is what you should do.  
          Funtoo Linux genkernel - kernel-genkernel-x86_64-3.2.6-ck
==== Themes ====
 
You can choose from many themes on the [http://irssi.org/themes irssi themes] page if you don't like the default look of it. Once you've chosen the them you like, you can simply put it in your {{f|~/.irssi/}} directory and when you run just run:
* Completed successfully.
{{file|body=
###i## reboot
/set theme mycooltheme
</console>
}}
 
And there you have it, the theme you have chosen is now there.  
=== Option one: Initrd with dracut ===
=== Conclusion ===
 
irssi is a great IRC client, and really helpful if you spend a lot of time in a terminal emulator or on a server.  
To build the initrd with dracut, we just execute:
<console>
# ##i##dracut -f --fstab --xz /boot/initramfs-3.2.6-pf.img  3.2.6-pf
</console>
 
Generally, this should be enough!
If you experience booting problems like missing modules / drivers then just boot from the genkernel section and fix the initrd building. You can look into the man page to tweak the command a bit (e.g. --add-drivers "xz dm_crypt" etc...).
 
Ok let's go on and finish the taks, we are now going to tell grub how to boot off correctly! Edit <tt>/etc/boot.conf</tt>:
 
<pre>
 
boot {
        generate grub
        default "Funtoo Linux dracut"
        timeout 3
}
 
"Funtoo Linux genkernel" {
        kernel kernel-genkernel[-v]
        initrd initramfs-genkernel[-v]
        params = quiet rootfstype=ext4
        params += luks enc_root=/dev/sda3
        params += lvm root=/dev/mapper/vg-root
}
 
"Funtoo Linux dracut" {
        kernel vmlinuz[-v]
## this is the better-initramfs generated initrd
        initrd initramfs[-v].img
        params  = quiet rootfstype=ext4
        params += luks enc_root=/dev/sda3
        params += lvm root=/dev/mapper/vg-root
}
</pre>
 
That's it -- almost!
 
Now write to the <code>grub.cfg</code> with the handy [[Boot-Update]] script:
<console>
###i## boot-update -v
 
boot-update 1.5.2 / Copyright 2009-2011 Funtoo Technologies
 
[use option "-l" for license info, "-h" for help]
 
* Generating config for grub...
 
DEFAULT > Funtoo Linux - vmlinuz-3.2.6-pf
          Funtoo Linux genkernel - kernel-genkernel-x86_64-3.2.6-pf
 
* Completed successfully.
</console>
 
Okay,... here you go..! :)
 
Reboot and see how it works!


== External Resources ==
[http://www.irssi.org/documentation Further documentation]


[[Category:HOWTO]]
{{EbuildFooter}}
[[Category:Featured]]
[[Category:IRC]]
[[Category:Kernel]]

Revision as of 07:49, January 22, 2015

Irssi

   Tip

We welcome improvements to this page. To edit this page, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Description

irssi is a small command line IRC client based on ncurses. It's a great thing to use when you SSH into a server, or just simply for your main IRC client.

Installation

The install of irssi is pretty straight forward. There are not many USE flags, but one that is worth looking at is the SSL flag. This enables you to use SSL when connecting to servers.

root # echo "net-irc/irssi ssl" >> /etc/portage/package.use
root # emerge irssi

Using irssi

Using irssi initially can be a little intimidating if you're not used to command line programs. To first start irssi, you just simply run:

user $ irssi

There are flags you can pass to the command line while starting irssi, such as:

user $ irssi -n mynick -c irc.freenode.org

This would connect you to Freenode with the nick 'mynick'. Or alternatively you can just run the irssi command and connect via SSL if you need to:

   
/connect -ssl irc.freenode.org

This will automatically connect you over port 6697.

When you have connected to the server of your choice, you can join a channel simply by:

   
/j #funtoo

If you want to leave any channel you've entered you can use the part command:

   
/part #funtoo reasons...

There are a few ways of navigating through your channels, you can use alt+{1-9}{q-p}, or alternatively you can use the window command that is in irssi:

   
/window 1
/window 2
/window 3

For as many channels you are apart of.

When you're ready to leave, you can simply type in:

   
/exit

Which will close out connections to the IRC networks you've joined, and take you back to your console window.

Themes and scripts

Scripts

There are a few things you can do to make irssi look a little bit better and add some cool features. There are a few plugins that are pretty useful, such as fnotify.pl which is a script that utilizes libnotify to send you popup notifications for when your nick is pinged or you are sent a private message.

   fnotify.pl (perl source code) - fnotify.pl
# todo: grap topic changes

use strict;
use vars qw($VERSION %IRSSI);

use Irssi;
$VERSION = '0.0.3';
%IRSSI = (
	authors     => 'Thorsten Leemhuis',
	contact     => 'fedora@leemhuis.info',
	name        => 'fnotify',
	description => 'Write a notification to a file that shows who is talking to you in which channel.',
	url         => 'http://www.leemhuis.info/files/fnotify/',
	license     => 'GNU General Public License',
	changed     => '$Date: 2007-01-13 12:00:00 +0100 (Sat, 13 Jan 2007) $'
);

#--------------------------------------------------------------------
# In parts based on knotify.pl 0.1.1 by Hugo Haas
# http://larve.net/people/hugo/2005/01/knotify.pl
# which is based on osd.pl 0.3.3 by Jeroen Coekaerts, Koenraad Heijlen
# http://www.irssi.org/scripts/scripts/osd.pl
#
# Other parts based on notify.pl from Luke Macken
# http://fedora.feedjack.org/user/918/
#
#--------------------------------------------------------------------

#--------------------------------------------------------------------
# Private message parsing
#--------------------------------------------------------------------

sub priv_msg {
	my ($server,$msg,$nick,$address,$target) = @_;
	filewrite($nick." " .$msg );
}

#--------------------------------------------------------------------
# Printing hilight's
#--------------------------------------------------------------------

sub hilight {
    my ($dest, $text, $stripped) = @_;
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
	filewrite($dest->{target}. " " .$stripped );
    }
}

#--------------------------------------------------------------------
# The actual printing
#--------------------------------------------------------------------

sub filewrite {
	my ($text) = @_;
	# FIXME: there is probably a better way to get the irssi-dir...
        open(FILE,">>$ENV{HOME}/.irssi/fnotify");
	print FILE $text . "\n";
        close (FILE);
}

Irssi::signal_add_last("message private", "priv_msg");
Irssi::signal_add_last("print text", "hilight");

#- end

Another very useful script is for colored nicks, to better tell people apart. Which can be found at irssi scripts called nickcolor.pl.

When you have the scripts you would like you would put them into ~/.irssi/scripts and set a link to ~/.irssi/scripts/autorun.

user $ wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
user $ cd ~/.irssi/scripts/autorun
user $ ln -s ~/.irssi/scripts/nickcolor.pl .
user $ ln -s ~/.irssi/scripts/fnotify.pl .

You can do this for as many scripts as you've chosen to use. They will automatically load when you start irssi. You can also manually load scripts:

   
/load ~/.irssi/scripts/fnotify.pl
Irssi: Loaded script fnotify

Whichever works best for you is what you should do.

Themes

You can choose from many themes on the irssi themes page if you don't like the default look of it. Once you've chosen the them you like, you can simply put it in your ~/.irssi/ directory and when you run just run:

   
/set theme mycooltheme

And there you have it, the theme you have chosen is now there.

Conclusion

irssi is a great IRC client, and really helpful if you spend a lot of time in a terminal emulator or on a server.

External Resources

Further documentation