Paul’s Linux Blog

Just Another Uber-Geek

This week I decided to learn about irc?

I knew this was known as Internet relay chat and has been around a long time. I've met people who raved about it but I never found the use as I always used web forums of posed a question, but what about real time help? Queue IRSSI

I used irssi as it was pre-installed on my crunchbang, it's a terminal application, I personal like the command line so I fired it up.

First thing I saw was a command prompt? I quick Google brought up lots of information on irc and irssi. I soon realised I needed to type "/connect irc.freenode.net" this logged me into a server, ok straight forward.
Next to connect to a irc channel, I knew there was one for crunchbang so typed "/join #crunchbang" and volia I was engaged in a chat about subject matter I knew about. I learned to use /quit or /wc to exit and even tried running multiple sessions to servers.

All in all I like it, and that's why it is my topic of the week, why not give it a go yourself, there's lot's of like minded people out there who don't bite, not much anyway. :)

I have been using crunchbang for some time now and it seems sensible to perform an update.
After looking though several articles I notice there is no official way to perform the upgrade so I followed the Ubuntu upgrade path instead.

To upgrade crunchbang you will need an internet connection and some time., they recommend not doing the upgrade over an ssh connection but I am fearless so I did it against the warnings.

The first step is to make sure you have update-manager-core installed.

 sudo apt-get install update-manager-core

Then to perform the upgrade type:

 sudo do-release-upgrade

This start's the upgrade process, you will be asked a few questions before it starts to download the many packages and begin the install procedure this can take some time.

I left mine overnight, it did not help much as in the morning I noticed the upgrade was waiting for some manual input into what to do with some of the package configurations, before installing the next package in the list.

If you say yes you would like to keep the current configuration for example on grub, then when you reboot you will not see the new kernel as it has not been appended to the config, if you say use package mainainers config then you will lose any custom settings in your own one, most people would be ok with this but I had made a few changes such as adding vga=791 to the kernel line as I like my text on boot to be smaller and I like to remove the quiet boot option too. (Note this does affect the boot graphics, until the Login box appears)

The best thing to do would be open another terminator / console and make a backup of the file then accept the new config. It is a bit slower but safer.

 # cp /boot/grub/menu.lst /boot/grub/menu/lst.20090729

Let me know if it works for you.

Today was one of those days when I had to fall back to windows :(

I wanted to backup my DVD to avi for the PS3 and found my unusual method of using dd to dump the DVD to an iso file failed. I kept getting the message error reading disc.

I tried my other method of using vobcopy but this failed as well with errors.

My next try was DVD-Shrink via wine this method has worked on occasion but only on old discs, this time the app hung.

My last resort was booting into windows and using DVDFab, I could have installed it via wine but after spending so long trying I just wanted it done, so I could get on with other things.

Anyway windows came through and the image can now be converted into a ps3 compatible format.

In case you wonder why I do it the long way, I just don't like having my DVD drive spinning for several hours when I am converting video, especially if I do higher resolution backup.

Well it's almost done and I have probably saved another disc from the sticky hands of my kids.

Right now I need to convert some flv's to avi so I can watch them on my ps3.

Once again a little googling and 5 minutes later I have the method. Once again I find that mencoder comes to the rescue.

 mencoder -oac copy -ovc lavc -o output_name.avi input_name.flv

I love mencoder it probably one of my most used commands these days. I travel to work on the train every day and it's an hour each way. I find that wathcing a DVD is ok but it drains the battery on the laptop and also generates heat not to mention I don't like carrying my DVD around in my drive all day.

The solution is MENCODER. more on this to follow.

I have been trying a new routine that forces me to learn a new command or utility a day, realistically it's more like 2 a week but I am still trying.

This week I finally found time to use "screen"

I knew what it was beforehand as I had tried it thanks to Linux Format several years a ago but never used it for longer than 30 mins. I have now been using it on a daily basis for 5 days and I must admit I am very impressed.
I still have to think a little before knowing the best time to use it but have found it very useful in the work place and at home.
Here's why.

Screen allows you to run multiple terminal sessions in one screen. So what you say?
It makes management easy as I can have one window open to a server and know I have several sessions available with out having to ssh in and open another one.
Screen allows me to pull out my network connection and not lose my work. Wow I hear you say say that again?
Well because the screen is running on the remote computer, If I disconnect my screen session it does not die. I can reconnect again to the screen session as if nothing ever happened.
This opens up possibilities that I can run a program then be told oh that one takes 10 hours to complete so you can't go home now or turn off your laptop.
Yes I can simply detach the session and go home and VPN into work, then simply reattach the session.

How about this scenario: You are in trouble the server is falling over and everything is wrong errors flashing up all over the place, what do I do, so many changes you need to make and files to check but how to document them, simple turn on the screen logging facility and let it do the hard work for you, simply look back over the session history to find out what action you took, could save your bacon.

Screen even allows you to monitor for noise or silence so it can notify you when that update has completed.
Well now you know as much as me, and you have to admit it is good at what it does.

So how do I use this magical utility, well it is probably installed already, most Linux has it as default.

Just type:
screen

How to do I open multiple sessions:
ctrl+a and c together creates a new session.

ctrl+a and n switches window / session

ctrl+a w list which session you are in

ctrl+a and d disconnects the session

But how do I reconnect?

To see the sessions running use:
screen -ls

If you only have one session running and you want to connect type:
screen -d -r
This will drop then reattach the session, good if you forget to disconnect before leaving work.

You can also specify the session you wish to connect to:
screen -r session name

To start logging use:
ctrl+a and H

Or to monitor the output use:
ctrl+a _ silence or M for activity

There are many more options but these I feel are the most used.

Has this converted you to use screen?

Now to update my server and check the progress when I get home :)

I learned all this from cyberciti here

Powered by WordPress Web Design by SRS Solutions © 2010 Paul’s Linux Blog Design by SRS Solutions