<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Amateur Topologist &#187; irssi</title>
	<atom:link href="http://www.amateurtopologist.com/blog/tag/irssi/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.amateurtopologist.com/blog</link>
	<description>Everything but topology.</description>
	<lastBuildDate>Sun, 15 Jan 2012 21:33:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-alpha-19719</generator>
		<item>
		<title>Irssi, ssh, and screen: Three great tastes that go great together</title>
		<link>http://www.amateurtopologist.com/blog/2009/07/22/irssi-ssh-and-screen-three-great-tastes-that-go-great-together/</link>
		<comments>http://www.amateurtopologist.com/blog/2009/07/22/irssi-ssh-and-screen-three-great-tastes-that-go-great-together/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 03:24:23 +0000</pubDate>
		<dc:creator>Patrick Hurst</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[useful programs]]></category>

		<guid isPermaLink="false">http://www.amateurtopologist.com/?p=161</guid>
		<description><![CDATA[If you&#8217;re a total IRC addict like I am, then it can be extremely handy to have a client running 24/7 in case something interesting happens and your computer is off or whatever; if you have logging on, then you can just scroll through the logs. But the only way I know of to do [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re a total IRC addict like I am, then it can be extremely handy to have a client running 24/7 in case something interesting happens and your computer is off or whatever; if you have logging on, then you can just scroll through the logs. But the only way I know of to do this is to use <a href="http://irssi.org/">Irssi</a>, a terminal-based IRC client for Linux/Unix (although OSX ports do exist, and it can be installed on a Windows machine using cygwin). The long and short of it is: you SSH into a remote server and run Irssi under a screen session. If you know what all that means, great, you can go do that now; skip down to the &#8216;configuration&#8221; section below. If not, I&#8217;ll walk you through it step by step.</p>
<h1>Setup</h1>
<ol>
<li><strong>Get a shell account on a server somewhere.</strong> This very well may be the hardest step for some; I don&#8217;t know offhand of any easily-obtainable free servers that will allow you to run Irssi under screen. Most of them either forbid long-running processes or any sort of IRC out right, due to abuse. I happen to know someone who gave me a shell account on their server, so I can&#8217;t speak as to the reliability of any free/paid servers that might be out there. If you have a computer that&#8217;s always on and runs Linux, you can install openssh via your distribution&#8217;s package manager and use that instead. Make sure to forward port 22 on your router, obviously.</li>
<li><strong>Get Irssi installed on that server.</strong> If you have admin rights on the server, then you can just install it via whatever package manager; otherwise, you&#8217;ll have to ask the admin nicely to do this for you.</li>
<li><strong>Start up Irssi under screen.</strong> Connect to the server and run screen -U; if all goes well, you should see a totally blank screen except for a new prompt. You are now inside screen, which is like a subshell inside your existing shell, only it won&#8217;t quit when you close the window. To get out of screen, press Ctrl-a and then d; to get back in, run screen -raAdU. You can make new &#8216;windows&#8217; inside screen with Ctrl-a, c (meaning ctrl-a followed by a c) and delete them with Ctrl-a, k; use Ctrl-a, n and Ctrl-a,p to switch between windows. Once you have a screen window set up, just run irssi.</li>
</ol>
<h1>An Irssi primer</h1>
<p>If you know how to work irssi, you can skip this part and go on down to the Configuration section. If you don&#8217;t, read on.</p>
<p>Irssi supports all the usual commands: /whois, /msg, /join, /connect, etc. But there are two major differences you&#8217;re going to have to get used to. The most obvious one is that, by default, you can only have one window visible at a time. You can switch via /win &lt;number&gt;, or by pressing Alt followed by the number of the window (using 10 for window 0); the letters q through o on the keyboard are mapped to windows 11-19. You can move windows around by switching to whatever window and using /win move &lt;number&gt;, and close windows with /win close &lt;number&gt; or just plain /wc &lt;number&gt;. Omit the &lt;number&gt; to close the current window. Alt-a will move you to a window with &#8216;activity&#8217;; I&#8217;m not sure how it picks which window to move you to though.</p>
<p>The statusbar indicates which windows have had some sort of activity since you saw them last; dark green indicates a /join or /part or something similar, white indicates someone actually saying something, and hot pink means that someone said your name or someone PM&#8217;d you. But I use a script called adv_windowlist, and I recommend you do too; it makes keeping track of windows much easier.</p>
<p>The other thing that you&#8217;ll need to keep in mind when using Irssi is that whenever you tell it to join a channel, open up a query with a person, etc., it&#8217;ll join the channel on the network you&#8217;re currently on, if you&#8217;re in a window with a channel or query open, or if you&#8217;re in the special status window (window 1), whichever network&#8217;s name is specified in the statusbar. You can switch the latter by pressing ctrl-X.</p>
<h1>Configuration</h1>
<p>Half the reason that you might want to set up in this way is so that you can log every conversation; useful in case there&#8217;s a dispute in a channel. Irssi doesn&#8217;t log by default, but you can easily enable it: simply /set autolog on. You can chagne the timestamps in the log by adjusting log_timestamp; I personally use &#8220;%H:%M:%S &#8221; (without quotes, note the space after the S!), which produces lines of the form</p>
<blockquote><p>23:31 &lt;@Waxx&gt; No magic ever, under any circumstances.</p></blockquote>
<p>You can also set the irc autolog path via the variable autolog_path; it accepts the special variables $tag, which is the name of the server the channel/query is on, $0, the name of the query or channel itself. It also accepts all the special strings listed here, although the ones you&#8217;re most likely to use are %Y for the four-number year, %m for the two-digit month, and %d for the two-digit day. So, for example, an autolog_path setting of ~/irclogs/$tag/%Y/$0-%m-%d.log would produce logfiles at, say, ~/irclogs/synirc/2009/#site19-07-22.log.</p>
<p>One of Irssi&#8217;s key strengths is its ability to be customized by the end-user via perl scripts. Installation is simple; put them in your scripts directory, ~/.irssi/scripts, and then run them via /load scriptname.pl. If you want them to automatically run, put them in ~/.irssi/scripts/autorun and run them with /load autorun/scriptname.pl. The twothat I couldn&#8217;t live without are:</p>
<ul>
<li><a href="http://www.irssi.org/scripts/scripts/splitlong.pl">splitlong.pl</a>: Automatically splits long lines you copy-paste into Irssi to get around IRC&#8217;s character line limit. Install and forget; no configuration necessary.</li>
<li><a href="http://anti.teamidiot.de/static/nei/*/Code/Irssi/adv_windowlist.pl">adv_windowlist.pl</a>: Converts the window list into something actually useful: lists all your windows in a grid, along with their names. After downloading, running, and installing it, you might as well remove the standard activity statusbar itemwith /statusbar window remove act as it&#8217;s now redundant. You can modify how the window looks by following the instructions in adv_windowlist.pl; personally, I use
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/set awl_display_key $Q%K|%n$H$C$S<br />
/set awl_block -15</div></div>
<p>to pad each window&#8217;s entry out to 15 symbols and to make each entry be hilighted appropriately as well as have the alt-keymap for that window (if available) prepended to the window name or have the window&#8217;s number (if not). Regardless, you should run</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/statusbar window remove act</div></div>
<p>to remove the &#8216;activity&#8217; window, as adv_windowlist.pl renders it redundant.</li>
</ul>
<p>There you have it; now you should be able to use irssi proficiently. As always, leave questions in the comments. I haven&#8217;t covered some of the other stuff you can do, such as theming and setting up automatic rejoin, but this post is getting long as it is and so I think I&#8217;ll put those in another post. Happy IRCing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.amateurtopologist.com/blog/2009/07/22/irssi-ssh-and-screen-three-great-tastes-that-go-great-together/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 1/9 queries in 0.003 seconds using apc
Object Caching 458/467 objects using apc

Served from: www.amateurtopologist.com @ 2012-02-05 21:13:42 -->
