Tuesday, January 13, 2009

Setting up the terminal (Ubuntu)

My first encounter with Ubuntu happened when I started my current job. In contrast to Fedora (the Linux distribution installed in school) it was easy and stable, and for the first time I really started to appreciate Linux. When I had to pick a distro to install on my laptop for Communication Applications course the choice was pretty obvious.

Now 2 month deep in to the semester I find myself using Ubuntu in general a lot (yes, I watch movies in Linux) and the terminal specifically (for debugging Comm Apps exercises). There are a few little terminal tips I'd like to share with the Ubuntu terminal beginners:

Adding terminal launcher to panel
Instead of going to Application > Accessories > Terminal every time, you can add the launcher (shortcut in Windowsian) to the panel for a quick reach like this: go to Application > Accessories, but instead of left clicking the Terminal right click it and pick Add this launcher to panel.


Changing the default terminal size
If you're running the terminal for debugging purposes like me, chances are you are not satisfied with the default size of the terminal - especially if you want to have a few tabs (in Ubuntu you can open a few tabs in one terminal - to open a new tab press CTRL + SHIFT + T). Resizing manually every time you open the terminal is an option, but a lame one. So here are two ways to make it happen automatically:
The first way is through the launcher on the panel we've just added: Right click the terminal launcher and pick Properties


In the properties window edit the Command field, so it looks something like:
gnome-terminal --geometry=120x26
Where 120 is the number of chars in a row (width) and 26 is the number of rows (height)

The second way (if you're having troublems with the first one - clashes and stuffs or if you need a lower level control for some reason) is to edit the /usr/share/vte/termcap/xterm file, which holds the terminal profiles. To do this, run the terminal, and type this command:
sudo gedit /usr/share/vte/termcap/xterm
This will open gedit text editor with the xterm file in it (you type in the sudo before the command to open the file in super user mode which gives you access to special system files) look for a line which says something like:
:co#80:it#8:li#24:\
and change it to:
:co#120:it#8:li#26:\
To get the default size of 120x26

That's it for now, critics and questions and general replies are welcome!

No comments:

Post a Comment