Category Archives: Tips & Tricks

Customising GTK

Since I seem to be on the ‘gnome customisation’ band-wagon at the moment, I thought I would look into trying to make my own GTK+ 2.0 themes, along the lines of some of the excellent ones I’ve found at places like this.

For those of you eagerly anticipating a nice clear ‘How-To’ on the subject, I’m afraid I was defeated. If you are interested in making your own theme, then the Gnome Wiki has a tutorial here, which is probably best combined with simply going into the directory of a nice simple theme you like and having a look at the gtkrc file.

I decided that this degree of customisation was a little too difficult still at this point in my Linux education, so I started looking for alternatives. I found some fantastic examples of the sort of things I could do here but sadly very little explanation on how to do them myself.

Just as I was about to give up, I was thrown a lifeline of hope by another IRC friend.

The Gnome Color Chooser

The Gnome Color Chooser

Gnome-Color-Chooser is a GTK theming application, available for download off the Ubuntu Repositories. It doesn’t modify your existing theme at all, but simply super-imposes it’s own theme on top through a ‘tick box’ system. Simply untick the boxes, and you have your original theme back as good as new. Only tick some of the boxes, and you end up with a combination of your existing theme and Gnome-Color-Chooser’s additions.

It’s very easy to lose a lot of time to playing with this app, so to help you along, I found a couple of other tools which are quite useful.

  • ‘The Widget Factory’ can be installed from the Ubuntu Repositories. It is, quite simply, an application that creates a window full of widgets, so that you can see exactly what your new theme will look like. It can show your current theme, or any of the themes that you have currently installed, without you having to set them in Appearance properties.
  • This website provides a very good color picker, which is very handy with all those color options to choose from in Gnome-Color-Chooser!

I’m still looking into ways to create a proper GTK+ 2.0 theme, and any pointers are appreciated. For the moment though, this will leave me enough to be going on with, I think. I hope it helps you as well!

1 Comment

Filed under Customisation, Linux, Tips & Tricks

Embedding Terminals

Following on from my love of Conky, I’ve been playing around with embedding other applications into the desktop. One of the most useful tricks with this is to embed a terminal that’s always there for a quick command or two.

An easy way to get an embedded terminal is with Screenlets, which can be downloaded and installed through Synaptic if you’re using Ubuntu. The terminal screenlet can be downloaded from the website, and installed within the screenlets manager. It can be set to transparent, with its own colour scheme.

If you’re using screenlets anyway, this may be a good system, but I found it slightly buggy, and since I’m not using another other screenlets, it’s just another program to start up.

Instead, I found this guide on how to embed gnome-terminal windows, if you’re using gnome and Compiz, perfect for us Ubuntu users.

I followed the guide, but hit a problem with specifying the geometry dimensions of my window, as I didn’t like the dimensions the writer had used for his window.

The solution is in a handy little command-line tool, xwininfo. Set up a terminal exactly the size and shape you want your embedded terminal to be. Then type:

xwininfo | grep geometry

This will give you a little mouse pointer. Use it to click on the window you want the information about, in this case our terminal window. It will return the exact size and position, which you can then use for your start-up script.

The result of all this embedding is a desktop that looks like this:

A minimalistic look with Embedded Terminals

A minimalistic look with Embedded Terminals

Leave a comment

Filed under Linux, Thoughts, Tips & Tricks

The power of Vim

Anyone who wants to actually get to grips with their Linux system and get the most out of it is going to spend a lot of time in text-editors. Ubuntu provides gnome’s gedit for this purpose, and it’s pretty good.

However, I thought I would just mention Vim, a terminal-based editor (with GVim for those who prefer a GUI). I’d heard about it and decided to give it a try, and I have to say I loved it. It’s powerful, quick, and highly configurable. I’m even editing this blog with it, through a plugin called vimpress.

There’s no point writing a lot about Vim, since it’s been around since the dawn of time (it feels like) and is well documented elsewhere. However, it has a very steep learning curve that can be quite daunting to the new user. It’s still very much worth getting to grips with though, so I thought I would put together a quick collection of good places to look if you want to learn to use Vim properly.

The best place to start is probably with Vim’s own tutorial. To run this, simply type vimtutor at the command prompt (you need to have Vim installed, of course!). It should take about 30 minutes to run through

Vim’s home page is another good place to get information, with extensive documentation and guides. However, I found it quite daunting.

For me, this is the best reference I found. Once you start to understand the basic principles of Vim, you can use this to learn the rest. I printed off a copy which I keep by my desk, literally for quick reference, with highlighting for the commands which I find most useful. It takes a little effort to get the hang of the symbology, but it’s well worth it.

I also found this guide helpful. It takes less time than the Vim tutor, and its reference list is smaller and easier to understand than the quick reference. However, it is only a basic guide and you can do a lot more with Vim than is listed here. I started off with this guide, and moved onto the quick reference later when I had begun to get the hang of things a bit more.

Another source of help if you really can’t find what you’re looking for online is the #vim IRC channel on Freenode. I’ve found the people here are extremely helpful with good response times. They also have a handy Topic message with a few more links you might want to check out.

If none of these suggestions really help, there are literally hundreds of guides out there on the web for Vim. A quick google search should set you up with plenty of helpful material.

If all else fails, remember that Vim isn’t everyone’s cup of tea. There are plenty of other options out there that you can use instead, emacs, gedit, kedit, kate, to name but a few. If you do like Vim, though, don’t forget, you can also get it for Windows!


Filed under Linux, Thoughts, Tips & Tricks

Pastebinit: Uploading from the Command Line

One thing you will swiftly learn while trying to solve problems, learn how to do things, and generally share code in Linux, is that websites like and the like are very very useful. Cutting and pasting your code, or terminal output, or anything else, can get a bit boring though.

Enter Pastebinit, a handy little command-line tool that lets you upload a file, or pipe a terminal output, to a choice of different Pastebin websites.

It’s easy to install, if you have Ubuntu you can just pull it off the repositories:

sudo apt-get install pastebinit

You can either pass a file to it directly as an argument:

$ pastebinit /etc/X11/xorg.conf

or pipe output through it:

$ ps aux | pastebinit

It requires either a filename, or piped data, as an argument. The main options are -b [url of pastebin] and -a [author]. man pastebinit will show you a few more.

This tool is great for troubleshooting from the terminal, especially if you haven’t got access to a browser for some reason, or just generally for being lazy when sharing information. You can also use it if you’re working on some document in an editor, and you want to ask someone else for their opinion, eg for content checking. All in all, a very handy tool for the lazy!

1 Comment

Filed under Linux, Tips & Tricks