Difference between pages "Funtoo:User Services/Containers" and "Package:Irssi"

From Funtoo
< Funtoo:User Services(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== Funtoo Linux Hosting ==
{{Ebuild
|Summary=A modular textUI IRC client with IPv6 support.
|CatPkg=net-irc/irssi
|Maintainer=
|Homepage=http://www.irssi.org/
}}


If you support Funtoo Linux, we also want to support ''you'' in your Funtoo Linux adventure. Supporters of Funtoo Linux of at least $15/mo can request a Funtoo Linux virtual container. Here are the configurations currently being offered:
=== 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.  


* $15/mo : '''4GB''' RAM, '''6''' CPU threads, 50GB disk
=== Installation ===
* $30/mo : '''12GB''' RAM, '''12''' CPU threads, 100GB disk
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.
* $45/mo : '''48GB''' RAM, '''24''' CPU threads, 200GB disk
{{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.


As you can see, this pricing is well below market rates, and includes fast SSD (solid state disk) storage, one IPv4 address, and lots of bandwidth. We believe that by enabling you to do with great things with Funtoo Linux, our community and technology will benefit. So we see this as a win for everyone.
When you have connected to the server of your choice, you can join a channel simply by:
{{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.  


== Container FAQ ==
When you're ready to leave, you can simply type in:
{{file|body=
/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.


;How do I sign up?: Set up a monthly support subscription via PayPal or credit card on our [[Support Funtoo]] page. Then see the [[#Getting Started|Getting Started]] section below.
{{file|name=fnotify.pl|lang=perl|desc=fnotify.pl|body=
# todo: grap topic changes


;Do I get root access?: Yes, you get full root access to your container.
use strict;
use vars qw($VERSION %IRSSI);


;Can I reboot my container?: Yes, reboot normally and it will come back up.
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) $'
);


;How much bandwidth is ''really'' included?: Practically unlimited. Please let me know if you plan to go over several hundred gigabytes of traffic per month.
#--------------------------------------------------------------------
# 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/
#
#--------------------------------------------------------------------


;How do I upgrade the kernel in my VPS?: A virtual container shares a kernel with the host, so you do not have the ability to change the kernel from "inside" the container.
#--------------------------------------------------------------------
# Private message parsing
#--------------------------------------------------------------------


;Can I run Docker inside my container?: The OpenVZ development team is the largest code contributor to the Linux Containers kernel code (which is part of Docker,) and we use OpenVZ, but right now it is not possible to run LXC inside an OpenVZ container. This may change with the release of newer OpenVZ kernels based on 3.x.
sub priv_msg {
my ($server,$msg,$nick,$address,$target) = @_;
filewrite($nick." " .$msg );
}


{{fancyimportant|This next bit of information is important. A number of people have temporarily locked themselves out of their containers by setting up a firewall incorrectly. I plan to develop a firewall management UI that configures a firewall for you to make this step easier. For the time being, please avoid setting up a firewall unless you ''really'' need one.}}
#--------------------------------------------------------------------
# Printing hilight's
#--------------------------------------------------------------------


;Can I set up my own firewall?: Before you do, please contact me (Daniel) and let me know. I need to flip a few switches in your container to make iptables work properly. Otherwise it will silently fail on stateful firewalls and you may end up locking yourself out of your container.
sub hilight {
    my ($dest, $text, $stripped) = @_;
    if ($dest->{level} & MSGLEVEL_HILIGHT) {
filewrite($dest->{target}. " " .$stripped );
    }
}


== Getting Started ==
#--------------------------------------------------------------------
# The actual printing
#--------------------------------------------------------------------


Once you have [[Support Funtoo|signed up for Funtoo Monthly support]], contact me (drobbins@funtoo.org) and request a virtual container. You'll need to send me two things:
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);
}


# The hostname you'd like for your container. It will be ''something''.host.funtoo.org.
Irssi::signal_add_last("message private", "priv_msg");
# Attach your SSH public key. I will use this to grant you root access to your container.
Irssi::signal_add_last("print text", "hilight");


== Generating SSH Keys ==
#- end
To generate an SSH key pair, do this as the user that you'll be using to log in to your container:  
}}
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}}. 


$ ssh-keygen -t rsa
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=
$ ##i##wget -O ~/.irssi/scripts/nickcolor.pl http://scripts.irssi.org/scripts/nickcolor.pl
$ ##i##cd ~/.irssi/scripts/autorun
$ ##i##ln -s ~/.irssi/scripts/nickcolor.pl .
$ ##i##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:
{{file|body=
/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 [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:
{{file|body=
/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.


If you specify a passphrase when prompted, your local private key (~/.ssh/id_rsa) will be encrypted, and ssh will prompt you for this passphrase prior to connecting. If you don't specify a passphrase, then you won't need to enter anything to connect but it you need to be extra careful that you don't allow others to access your private key.  
== External Resources ==
[http://www.irssi.org/documentation Further documentation]


The file you will need to send me is ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub. This is the public key... it's safe to send over email since all I or anyone else can use it for is to grant you access to a system using your private key. Just don't send your private key to me.
{{EbuildFooter}}
 
[[Category:IRC]]
== Policies ==
 
{{Policies}}
 
=== VPS Usage Rules ===
 
{{fancyimportant|Please read these policies and make sure you understand them. This is not an exhaustive list.}}
 
The VPS is for '''your personal use'''. No reselling.
 
There is currently no Web panel - these servers will be set up using my own automated tool and you will be provided with ssh access. I can periodically reload VPS images as needed.
 
This service is offered as a thank-you gift to Funtoo Linux supporters as long as sufficient capacity is available, with no warranty for uptime or anything else.
 
There are no refunds.
 
While I host several production sites on this infrastructure, you assume all risk for hosting your production services on your VPS.
 
I will make a best-effort-only attempt to provide support via IRC and email, and do not offer 24/7 support for your VPS.
 
'''US-Legal activities only. No spam will be tolerated.'''
 
These VPS systems are intended for funtoo enthusiasts only. I am providing (particularly in the higher-level plans) generous default resource limits with the understanding that the VPS will be used for general Funtoo use and server stuff.
 
Compiling with -j(NUM-CPUS+1) is encouraged (this is Funtoo, after all -- I want you to enjoy fast compiles :), but it's not okay to continually max CPU, IO, or network utilization. '''So, no folding@home, massive file sharing, etc. '''
 
I am currently not supporting IPv6 but will look into adding such support if there is enough interest.
 
'''You are responsible for backups. '''
 
I reserve the right to change plans and pricing in the future.

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