This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
documentation:irssi_screen [2010/02/08 16:01] – mcooper6 | documentation:irssi_screen [2019/10/05 17:18] (current) – [Step 2. Connect with irssi] wedge | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | =====Screen/ | ||
+ | One of the underused resources utilized in class is the IRC channel. | ||
+ | |||
+ | Mixed with some good old UNIXy capabilities, | ||
+ | |||
+ | This guide will get you set up with a screened irssi session on Lab46 to the class IRC channel. | ||
+ | |||
+ | If you've already set this up, skip to the end section that details regular usage (and re-attaching to your screen session). | ||
+ | |||
+ | ====Step 0. Do we have any screens? | ||
+ | If you're not sure if you need to launch a new screen session, a quick and easy test can be performed: | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ screen -ls | ||
+ | No Sockets found in / | ||
+ | |||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | See the part that says "No Sockets found"? | ||
+ | |||
+ | If you do have an existing screen session (or sessions), the result of " | ||
+ | |||
+ | ====Step 1. Starting from scratch==== | ||
+ | This assumes you have yet to establish your screened irssi session for the semester (or the server has been reboot, so you have to go through these steps again), otherwise, if you've already performed these steps, you can skip these steps and just re-attach to your screen session. | ||
+ | |||
+ | First order of business is to actually log in, and have the Lab46 prompt eagerly awaiting your bidding: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | What we need to do now is start ourselves a new screen session: | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ screen | ||
+ | </ | ||
+ | |||
+ | When you do this, you will get the screen " | ||
+ | |||
+ | You should now be inside of screen, as is witnessed by the seeing the following: | ||
+ | |||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | What?! Isn't that where I started? Yes.. and is to where you've progressed. If screen is doing its job, you shouldn' | ||
+ | ====Step 2. Connect with irssi==== | ||
+ | Before we play with screen, let's fire up our IRC client, this nifty command-line program known as ' | ||
+ | |||
+ | ===Start irssi=== | ||
+ | |||
+ | So, from within our brand new screen session terminal, do the following: | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ irssi | ||
+ | </ | ||
+ | |||
+ | Your terminal should change appearance... the same black background, but probably some blue bars (maybe one at the top and bottom of the terminal)... may or may not have any text there, save for: | ||
+ | |||
+ | <cli> | ||
+ | [(status)] | ||
+ | </ | ||
+ | |||
+ | hanging out at the very bottom. | ||
+ | |||
+ | ===Connect to the server=== | ||
+ | What we want to do now is connect to the IRC server, which can be done by issuing a command from within irrsi, as follows: | ||
+ | |||
+ | <cli> | ||
+ | [(status)] /connect irc | ||
+ | </ | ||
+ | |||
+ | Upon doing this, a bunch of information will appear on the screen. If you read through it, it should indicate you've connected to the IRC server, along with other bits of information that may or may not make any appreciable sense. | ||
+ | |||
+ | ====Step 3. Join the channel==== | ||
+ | Almost there! We've just connected to the server, and now must select a channel to join. | ||
+ | |||
+ | Depending on the class, the IRC channel you seek will be different. Here are some examples of class IRC channels that are in use: | ||
+ | |||
+ | * unix - for the UNIX/Linux Fundamentals class | ||
+ | * asm - for the Computer Organization class | ||
+ | * hpc - for the various HPC classes | ||
+ | * data - for the Data Structures class | ||
+ | * discrete - for the Discrete Structures class | ||
+ | * sys - for the Systems Programming and HPC Systems and Networking classes | ||
+ | * cprog - for the C/C++ Programming class | ||
+ | |||
+ | Additionally, | ||
+ | |||
+ | * lab46 | ||
+ | |||
+ | To join a channel (we're going to use the example of joining the lab46 channel... substitute your actual class channel), we'd do the following: | ||
+ | |||
+ | <cli> | ||
+ | [(status)] /join lab46 | ||
+ | </ | ||
+ | |||
+ | Some more activity should take place on your terminal, which should indicate you've successfully joined the channel. The real tell-tale sign will be your irssi prompt: | ||
+ | |||
+ | <cli> | ||
+ | [#lab46] | ||
+ | </ | ||
+ | |||
+ | Channels in IRC are prefixed with a #. Now you can type a message and hit enter, and it will show up in the channel. Others in the class are doing the same. | ||
+ | |||
+ | The purpose is to have and maintain a resource for class communications outside of any scheduled class meeting times. This can (and has) come in handy, and also serves as a source for entertainment (you'd be amazed what sometimes happens late at night when some people aren't sleeping). | ||
+ | |||
+ | Now, irssi is a very capable IRC client, and you can do many things with it (as well as screen, but both are beyond the scope of this tutorial). You *can* join multiple channels, it's just a matter of issuing another "/join // | ||
+ | |||
+ | And hey, now you're effectively done with the setup part of this tutorial. | ||
+ | |||
+ | You can move on to the " | ||
+ | =====Regular Usage of your Screen/ | ||
+ | The big advantage to using screen is that you can have a persistent terminal session, regardless of your physical ability to maintain a connection to the system. | ||
+ | |||
+ | Typically, we've all been exposed to situations where we connect and utilize a resource, then disconnect when we're done. This is necessary because we simply cannot remain logged in constantly. | ||
+ | |||
+ | The abilities ' | ||
+ | |||
+ | To that ends, what follows will be the typical ' | ||
+ | |||
+ | ====Detaching from your screen session==== | ||
+ | When you are ready to depart physically from your current location, you need to detach yourself from your existing screen session, allowing it to remain running, while you tend to other matters; logging out, shutting off the computer, etc. | ||
+ | |||
+ | To detach yourself from your currently running ' | ||
+ | |||
+ | - press and hold down the CTRL key | ||
+ | - while you hit the ' | ||
+ | - release both, then tap the ' | ||
+ | |||
+ | Your terminal should resemble something like the following: | ||
+ | |||
+ | <cli> | ||
+ | [detached] | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | You are now in the original session of your terminal as you logged in. You can log out now. | ||
+ | ====Re-Attaching to your screen session==== | ||
+ | After some time away, you've returned, and wish to resume your activities in your screen session. | ||
+ | |||
+ | You log in, and are at the Lab46 prompt. | ||
+ | |||
+ | All you need to do to reconnect to your screen session is to: | ||
+ | |||
+ | <cli> | ||
+ | lab46:~$ screen -r | ||
+ | </ | ||
+ | |||
+ | And voila! You'll be back where you left off. | ||
+ | |||
+ | ====Split Screen==== | ||
+ | Say you want to do some of your work while chatting in the class IRC but don't want to have multiple terminal windows open. Luckily screen is a fantastic utility, and gives you the ability to divide your screen session into multiple different windows for your viewing pleasure. The command to do so is very similar to the command you use to detach from your screen session. Hold Ctrl and press a, now release them both and instead of tapping the d key hold shift and tap s. You should notice your screen shrink. If this happens then you have issued the command correctly. "But there isn't anything there" You say? Fear not, we simply have to navigate to our new split screen by pressing Ctrl+a followed by tab and create a new screen to view by pressing Ctrl+a followed by c. Now you should see a new Lab46 prompt appear in the lower screen. Now you can work and chat all from the comfort and convenience of a single terminal screen. | ||
+ | |||
+ | ====The End==== | ||
+ | Basically, that's all you do--- detach and re-attach. | ||
+ | |||
+ | That's the basic premise behind screen. | ||
+ | |||
+ | As you get used to it, you may want to branch out and explore some of screen' | ||
+ | |||
+ | ===== Useful Information & Links ===== | ||
+ | * [[http:// |