Linux Tutorial Irssi
Linux Tutorial - Irssi
This Documents Assumes the following
You have followed the procedure to Access Linux on the device and have enabled the Optware repositories and software Portal:Accessing_Linux
You have installed the Terminal application Application:Terminal
Once these procedures are done you should have access to:
The Optware software repositories through ipkg-opt
The Terminal Application through the WebOS (should load, be the root user, and function)
Within the Terminal application use the following command:
ipkg-opt install screen irssi
Note: GNU Screen is *not* necessary for irssi to function, it only provides further functionality to be able to close the Terminal application if desired, keep irssi running in the background and reattach to it. Also, I have found that running irssi within a screen session gives irssi shows all its various colors while running natively within the terminal app leaves it mono-colored.
In order to run irssi you simply need to type irssi into the Terminal application at the shell prompt and once hitting enter(return) it will load.
However this is NOT RECOMMENDED as by default the Terminal Application is loaded as the root user and you should avoid using internet facing applications as the root user if it is not necessary (some IRC networks such as EFnet will go as far as to instantly disconnect you if it detects you are connecting to their servers as root).
Once the Terminal Application is opened you may change to the user you set up when completing the steps to Access Linux via the su command
root@castle:/var/home/root# su myuser myuser@castle:/var/home/root$
from here you can simply enter irssi and hit return and it shall load.
This will connect you to an irc network ex: /connect irc.freenode.net will connect you to the freenode network.
This will join the requested channel, ex: /join #webos-internals
Sym+n Will move to the 'next' window within the irssi interface Sym+p Will move you to the 'previous' window within the irssi interface
You can directly jump to a window (numbered in irssi) by hitting Orange Key+Space+Number.
GNU Screen History & Basics
If you're like me and you want to always keep your irssi session active as well as have the colors available to you a good solution is to use GNU Screen.
For those that don't know, screen acts as a window manager for terminal applications. Screen allows you to run multiple applications in a single terminal session, switch between the applications freely as well as being able to detach from it entirely, and reattach to it later while having those applications run in the background. Many consider screen to be one of the most important tools available for any type of command line work or administration - is is very powerful and very flexable, feel free to read up on it's customization and abilities to further enhance your experience with it.
To start using screen it is very simple, follow the instructions above but before switching to your local user to run irssi, first type screen and hit enter
You will be greeted with screen's opening text, letting you know that it is running, and the GPL license, simply press the space bar here and you will be taken back into the prompt and it will appear as if you're back to where you started.
From this point on, follow the instructions above to change into your user that is not root, and open irssi like normal.
You will see commands listed as such: Sym-A C
This key combination is important because it means 'Press and hold Sym, then hit A, release both and hit C'
This is how GNU Screen functions and is vital to it's usage, the example above creates a new window with a fresh terminal session.
Attach / Detach
In order to detach from your screen session use the command Sym-A D
Once a session is detached you may close out of the terminal app and any applications running within your screen session will continue to run.
In order to reattach to a session you left running, load the Terminal Application again and type the following at the command prompt and hit enter: screen -r
Screen Commands To Know
Sym-A C - Create a new window/terminal session
Sym-A N - Change to next window/terminal session within the current screen session
Sym-A P - Change to previous window/terminal session with the current screen session
Sym-A D - Detach from current screen session
Both irssi and GNU Screen are very rich applications with a plethora of scripts, customization and usage options that only a very small percentage of are covered in this document. If interested please search and find how you may be able to adjust them to fit your specific needs (and if you find anything worthwhile feel free to add it to this wiki!)
For information on irssi please visit their startup documentation http://irssi.org/documentation/startup
this site provides information that will help you in automating irssi to do tasks like autojoin set servers and channels and automatically identify your nickname with services.
When first loaded irssi tends to not properly format to the whole screen and a simple rotation to let the terminal rotate to the side and back to standard typing position will fix it (you will see the characters slowly refresh during this process)
Even with Screen running you can lose connection if the wifi radio turns off when the screen does, see http://www.webos-internals.org/wiki/Patch_webOS_Keep_Phone_Awake_While_in_Remote_Session