Using IRC and IRSSI for Linux Support

Using IRC and IRSSI for Linux Support

Using IRC and IRSSI for Linux Support

IRC is often one of the greates assests to UNIX/Linux that gets overlooked. IRC or Internet Relay Chat, is the Defacto-Standard way of getting support for UNIX/Linux, and is often overlooked as a source of how to get live answers quick.

Techincal Defenition:

Internet Relay Chat (IRC) is an application layer protocol that facilitates transfer of messages in the form of text. The chat process works on a client/server model of networking. IRC clients are computer programs that a user can install on their system.

In Linux, the IRSSI is the standard (although there are many other clients) that is used for Internet Relay Chat, or IRC.

Basic Usage:

Let’s get staretd, Login, and su to root

Root shell on host irc running yum -y install irssi

install the irssi client, for redhat use yum, debian use apt-get

yum -y install irssi typed at the root prompt (same screenshot repeated at the install step)

once installed, switch back to a standard user account, since root privileges are no longer necessary.

whoami returning blog, showing irssi will run as a normal user, not root

** EACH CHAT ROOM HAS IT’s OWN RULES AND REGULATIONS, YOU ARE EXPECTED TO HAVE READ THEM BEFORE, AGAIN, BEFORE YOU LOGIN, IF YOU DO NOT, YOU MAY NOT UNDERSTAND WHAT’S ACCEPTABLE, OR NOT, THEREFORE MEANING YOU MAY NOT GET AN ANSWER BECAUSE YOU DID NOT FOLLOW THE RULES ** REMEMBER, THESE PEOPLE ARE VOLUNTEERING THEIR FREE TIME TO HELP YOU, BE RESPECTFUL!!!!

launch the irssi client by typing the irssi command

Typing irssi at a user shell prompt to launch the client

you should see a window similar to the following:

Irssi start screen with ASCII banner, clock bar and empty [(status)] prompt

It’s important to understand that there are many IRC servers out on the internet, and within those servers, there are many chanels, that’s why you are brought to this screen by default, because you have to connect to one of the millions of IRC servers before you can do anything.

A popular server is chat.freenode.net, we will start here, type the following:

/connect chat.freenode.net typed in the Irssi status window

you shoudl see the following:

Freenode MOTD ending: End of /MOTD command and Mode change [+i] for user blog

this will stay like to for a few seconds, and then go to the “MOTD” or message of the day.

Same freenode connection screen: MOTD finished and user mode +i set for blog

before we log into any chatrooms, we need to setup a chat Nick (short for nickname) type the following (customize the nick name)

/nick linuxdude501 typed in the Irssi status window to set a nickname

hit enter, you should see the following (again be smart, substitute your own nickname)

Irssi confirming You're now known as linuxdude501 in the status bar

so…. at this point we have connected to the chat Server, set a Nick, but not logged into any chat Rooms. You must use the join command to log into a chat room, like so:

/join ##linux typed in the Irssi status window while connected to freenode

all chat rooms are generally named #something, such as #cacti, or #samba

you should see something similar when you join a chat room:

Joined ##linux: Total of 1673 nicks, channel home page and created date

from here is where you can normally ask, and get the answers to questions you are looking for.

once joined, there are a few things to take note of:

Irssi channel window 2:freenode/##linux after the join synced

1) Your nick shows up

2) the 2 = irssi window 2, hit ALT+1 to go back to main window, alt+2 to go back to this window

3) you are logged into the freenode server, in the ##linux chat room

To Leave the chat room, type the following:

Irssi status bar showing the ##linux window before typing /part to leave

/part will close the chat room (think of it as parting ways)

/save will save some of the presently configured settings

/save typed in the Irssi status window to save current settings

to Quit out of the IRSSI Application, type /quit

/quit typed in the Irssi status window to exit the client

Advanced Usage:

if you plan on using IRC frequently what we have above is a good start for the occasional user, however, some of us work with UNIX/Linux and need to be able to get a bit more granular.

Each time we logout/log back in, our chat windows are lost, and the server we log into. Wouldn’t it be nice if we could make it Automated, so it launched, connected, and signed into all chat rooms? You are in luck… we can, it’s Linux, where there’s a shell, there’s a way.

start this whole thing off by using SCREEN, if you are not familiar with screen, see the GNU Screen manual

Basically start a screen session, the idea is to leave the session running, and come back to it when you want to look at your chat windows, usually in an emergency :)

Starting a screen session with the screen command so Irssi can keep running

you should notice the following, if not similar

New GNU screen session title bar showing [screen 0: ksh]

from here we need to register our NIC for the longterm, so nobody can take our nick while we are logged out.

connect to the server you want to register your nick at

/connect chat.freenode.net typed again before registering a nickname

once connected, to register your NIC, first you need to set your nick, as it more than likely did not save

/nick happyclown190 set and Irssi reporting You're now known as happyclown190

from here we need to register the password for the longterm

/msg nickserv register easypassword your@email.address to register the nick

you should recieve an email with your verification code, now we need to verify the code against the server

/msg nickserv VERIFY REGISTER happyclown190 with the code from the email

from here we should be good with our Nick.

Setup Servers/Chat Windows to be remembered:

This is pretty cool, the first thing we need to do is add our network(s) to the list to be remembered, we can do so with the following syntax:

/server add -auto -network freenode chat.freenode.net 6667 to remember the server

if you want to connect via SSL (more than likely you do) issue the following:

/server add -auto -ssl -network freenode chat.freenode.net 6697 for an SSL connection

freenode allows the following ports for SSL: 6697 7000 and 7070

if you have the need to verify the cert, check here

ok, so now we have our network added securely, we can view/remove with the following commands:

/network list {name}

/network remove {name}

We also need to setup irssi to load your Nick by default

/network add -nick happyclown190 freenode to load the nick by default

you should see the following:

Irssi output: Server chat.freenode.net saved and Network freenode saved

once the network is added, this is really only the server, now we need to add the channels to be auto-remembered so they can be logged into by default, let’s setup chat rooms

/channel add #linux freenode to auto-join a channel on the freenode network

this adds as many chat rooms in the order you enter them to be added, like before the syntax is List/Remove/Add

/channel list

/channel remove {channelname}

after the work has been completed, hit save

/save typed after adding the network and channel settings

now quit, and test that everything worked properly

Relaunching irssi from the shell to test the saved configuration

you should see your window auto-connecting to the network defined as freenode

Irssi auto-connecting to chat.freenode.net port 6667 and checking ident

In the status window, you should also see that you have been joined to the various chat rooms, or channels by default

ChanServ welcome notice for ##linux shown after the automatic channel join

Busy Channels:

if you are on a busy channel, you will see alot of “so and so person joined” and “so and so person left”

to disable these messages, and have the irssi window to a minimal of chats, issue the following command, on a per-chat room basis:

/save typed in the status window after the join and part message changes

always remember to do a /save when making changes

/save typed again: always save after changing Irssi settings

Navigating Multiple Windows/Channels:

IRSSI allows up to 19 channels to be working at once, this is great!

There are 2 ways to navigate through windows 1-10:

1) ALT + 1-9

2) ESC + 1-9

For channels higher than numbers 1-9, you must type the command /win list

/win list output showing window 1 (status), 2 nickserv and 3 ##linux on freenode

/win 11 (to change to window or channel 11)

Additional Command Reference:

There is a great reference for additional commands that can be used for IRC/IRSSI, please check these out, as it will make your life sooo much easier.

http://www.godspeak.net/chat/basic_irc.html

That’s it!

Hosted Linux Servers at www.zwiegnet.com/go

Related: Configure Signature in Mutt and Setup SSH Password-less Login Linux

Leave a Reply

Your email address will not be published. Required fields are marked *