Category Archives: How To

How To: Embedding Terminals in Linux

I’ve already pointed out a couple of places where Gnome-users can get good information on creating Embedded terminals, but I haven’t been able to find a good guide to do the same thing in Fluxbox.

It’s actually quite easy, once you know how. Which is, of course, the trick. Here I will explain the process for others who want to achieve the same look.

Setting up the Window

Start by opening a terminal, sizing it to the right dimensions, and placing it where you want it to be.

Next go to File and select New Profile. Choose a distinctive name, and go to the profile config window.

Here, you can configure your terminal to have the no-trimmings look we’re going for.

  • On the ‘general’ tab, unselect ‘system fixed width font’ and choose your own if you wish. Untick ‘Show menubar by default in new terminals’.
  • Under ‘Title and Command’ change ‘Dynamically-set title’ to ‘isn’t displayed’.
  • Change colours to whatever seems suitable. I have a light background, so I prefer a darker text color.
  • Effects dictates the background for your terminal. In this case, we want a transparent background, so tick that and set shade to none. You can also choose to display any image file as a background.
  • In the ‘Scrolling’ tab, set ‘Scrollbar is’ to ‘disabled’. Increase the scrollback lines if necessary.

We can ignore the Compatability tab so close the window.

Right click on the terminal and choose ‘change profile’. Change it to your new profile.

The App File

Now we need to set up our auto-start settings, and get rid of the decorations.

Open up ~/.fluxbox/apps in your favourite editor. You don’t need sudo, as it’s in your home directory.

The apps file is where you set the properties for windows and applications that you want to open in a particular way. You can define the properties for all instances of an application, for set number of instances, or for windows with a particular title. You can find more information about the apps file, and how to use it, here.

Our terminal now has it’s own title, the name of the profile you created. Any terminal with the same profile will have the same title, but terminals with other profiles, or the default profile, will not. Lets say we called our profile termie.

  1. First we need to find the dimensions for our terminal. To do this, type xwininfo in a terminal, and click on the window you want information about (in this case, our terminal). This will bring up a long list of stats. Put it to one side to refer to.
  2. Now copy the following into your apps file:
    [app] (title=termie) {1}
    [Dimensions] {538 274}
    [Position] (UPPERLEFT) {0 0}
    [Layer] {12}
    [IconHidden] {yes}
    [Deco] {NONE}
    [Sticky] {yes}
    [end]

    • Replace termie with the name of your profile.
    • Dimensions are in {width height} format. Get your width and height from the xwininfo.
    • This position will place the window right in the upper left corner. You can choose from WINCENTER, CENTRE, UPPERLEFT, UPPERRIGHT, LOWERLEFTLOWERRIGHT. You then state how far from that position your window is in x-y co-ordinates. If you leave your position as ‘UPPERLEFT’ then you can find the appropriate co-ordinates in xwininfo, as the Absolute upper-left X: and Absolute upper-left Y:.
    • Layer {12} states that the window will be part of the desktop layer.
    • IconHidden determines whether or not the program shows up on your taskbar.
    • Deco {None} gets rid of all the window decorations, leaving just the window contents.
    • Sticky {yes} shows the terminal on all workspaces, not just the current one, so when you switch workspace, it’s still there.
  3. Save the file when you’re happy with the settings, and open your startup file at ~/.fluxbox/startup
    • If you followed the guides, you will already have various programs listed in here that you want to start on reboot. For example I have conky and emesene auto-starting. Now we’re going to add our terminal.
    • In the same section as the other startup programs, add this line:
    • gnome-terminal –window-with-profile=termie &
    • Change ‘termie’ to the name of your profile.
    • It may be that you want your embedded terminal to automatically run a particular command on startup. For example, I have a terminal that automatically runs IRSSI. To do that, edit your startup command to look like this:

      gnome-terminal --window-with-profile=termie --command=irssi &
  4. Save the file when you’re happy with it, and close the terminal.
  5. Now try rebooting, to see if it worked!
Advertisements

4 Comments

Filed under How To, Linux

How To: Using Gmail with Alpine

I’ve tried a few of the different GUI clients out there, and I tend to find them to be almost as slow and bloated as Microsoft’s infamous Outlook. The main clients are Mozilla’s Thunderbird and Gnome’s Evolution.

In search of speedier email access, I decided to go searching for a command-line solution. My Conky tells me when I have new mail, and at that point I want to be able to quickly open a client, look at the email, and close it again, without having to wait for the client to load up and then pack itself away again after. I also don’t want to have to leave the client open all the time.

Since I use Gmail, the best solution is for me to find a client that can use the IMAP protocol. As far as I can tell, this comes down to two options: Mutt or Alpine, the successor to the old Pine client. I tried Mutt, but I found it difficult to configure, especially considering I want access to all of my accounts, not just one, or one pooled inbox accepting mail from all of them.

That leaves Alpine, and to be honest, I’m quite happy with that. Alpine seems to do everything I need it to do, with relative ease. If you’re using Ubuntu, you can download and install it from the repository. Otherwise, you can find the latest version here.

The following guide just gives a basic rundown of how to set up Alpine for multiple gmail accounts. It assumes you are not also using a local mail server. For more detail on working with Alpine, you should see this excellent in-depth reference website.

Retrieving your INBOX

The first thing to worry about is how to set up Alpine so you can read your Gmail.

  • Once you’ve installed Alpine, run it by typing alpine at the command prompt. Then type go to Main>Setup>collectionLists>Add. In each case, you can get to the menu by just typing the letter I’ve highlighted in bold.
  • Fill in the options like this:


    Nickname : <choose a nickname>
    Server : imap.gmail.com/ssl/user=username@gmail.com
    Path :
    View :

    You can leave path and view blank.

  • Press <ctrl-x> to save your settings, and then go back to the collectionList and choose to Add as many different accounts as you wish. Press ‘E’ to exit the collectionList menu
  • There are a couple of configuration options you will want to change.
    • Go to Main Menu>Configuration and scroll down until you find the [Advanced User Preferences] section. Mark Save will Not Delete toward the end of that section.
    • Next go to Pruning Rule and choose don’t rename, don’t delete.
  • Hit ‘E’ to Exit setup, and choose yes to keep the settings.
  • To read your mails, go to the Main menu and choose ‘Folder List’. Hit ‘Enter’ to choose the folder you wish to look at, put in the password if necessary, and use ‘>’ and ‘<‘ to go back and forward between your folders to read your mails.

Sending mails through Gmail

To have the option of sending mails from different accounts, you need to use a feature called ‘Roles’.

  • Choose Setup>Rules, and type ‘R’ to choose ‘Roles’. ‘Add’ a new role.
  • Press ‘Enter’ to type in a nickname of your choice.
  • Under Current Folder Type go down to Specific and choose that.
  • Then go just below that to Folder List and press ‘T‘. You may need to input the password for your current folder. You can then navigate around the folder list and choose the folder that you want that Role to apply to. For example, if you’re looking at the inbox for account foo you want to send emails from foo. If you’re looking at account bar then that’s the account you want to send from too.
  • Now scroll all the way down to the section titled ACTIONS BEGIN HERE. Set the Set From field to the relevant account, eg ‘Foo Bar <foo.bar@gmail.com>. Then set Use SMTP Server to the following:

    smtp.gmail.com/tls/user=username@gmail.com

  • Finally set Compose Use = to ‘With confirmation’. Hit ‘E’ to exit and save changes. Add a new role for each gmail account.

30 Comments

Filed under How To, Linux

How To: Making ‘Flame’ Backgrounds in Gimp

I’ve had a few questions about how I make my current background. It was a trick passed on to me by a friend in IRC, and I’m more than happy to pass it on to anyone else who is interested. You don’t need any artistic skill, just Gimp.

A minimalistic look with Embedded Terminals

A Screenshot showing my Homemade Background

To start with, open Gimp, and set the background colour to the colour you want to use for your image background. Then start a new image. Set the image size to your monitor resolution, and under ‘Advanced Options’ change ‘Fill with:’ to ‘Background colour’

Now make a new layer, and choose ‘transparency’ as the Layer Fill Type.

Next, <right-click> on the image and select ‘Filters –> Render –> Nature –> Flame’.

The 'Flame' Render in Gimp

The'Flame' Render in Gimp

First, go to the ‘Camera’ tab and choose a zoom level. We’ve found that 3.00 works pretty well. Then hit ‘Edit’. Here is where you have the fun. At the bottom, the option ‘Variation’ can be changed to create a wide variety of effects. I chose ‘Linear’ but you can use any of them. Have a flick through them, and hit ‘randomise’ ever so often, to see the options. You can also adjust ‘speed’ to get different effects. Keep playing until you find one you like.

Choosing a Flame Effect

Choosing a Flame Effect

Once you’ve chosen and hit ‘okay’ you go back to the original Flame window. Now play with the zoom some more, and the ‘X’ and ‘Y’ coordinates, until you’ve got things just right. Don’t worry about colours for now, just hit okay. It will take quite a long time to render the effect.

Once it’s done, we can play with colours. <right-click> on the image and choose ‘Colours –> Colourise’. This will give you a window you can use to play with the hue, saturation, and lightness, until you get the colour effect you want.

This shows you how to get one layer of flame. However, you can also superimpose different layers with different colours very easily. Just add a new layer, and proceed as above. The possibilities are almost endless!

Below is a marble-like example I made with one layer, using these methods.

A Pink Marble Effect

A Pink Marble Effect

Leave a comment

Filed under Customisation, How To, Linux

How To: Modify my .conkyrc

I have described elsewhere how to make your own .conkyrc, but it can get confusing. If you find one that is almost what you want, then, how do you know which bits to change, without having to go through and understand the whole thing? Hopefully, this post will show you that.

We’ll be using my own .conkyrc as the basis for the guide. You can find the code here. Just copy the whole post, paste it into your favourite editor, and save the file in your home directory as .conkyrc. It creates a Conky that looks like this:

A screenshot of my Conky

A screenshot of my Conky

Configuration Options

Most of these should be left as they are, especially if you’re using gnome. Options you should change are xftfont comicsansms:size=8 which you should change to the font you would prefer to use as the default. alignment bottome_left should be changed to reflect where you wish Conky to be positioned – top_left, top_right, bottom_right or bottom_left. The colours should be changed to any choice of hex colour codes or html colour names. For example, default_color 577587 would change the basic colour to hex code #577587, a kind of dirty blue. Set all the colours to ones you prefer.

The default_outline_color option defines the colour for any borders, including those around your graphs. You can choose to remove borders around your graphs using the draw_graph_borders Set it to false to remove borders. Border colours can be defined by changing the default_outline_color option.

TEXT Options

If you’re really interested in changing the Conky layout a lot, you should read my more detailed guide here. Otherwise, the only bits you will really be interested in are the $font variables. I have set the $color variables so that they can all be controlled by the colour settings in the configuration part, described above. Unfortunately, it is not so easy to set up the fonts in this way, (or if it is, I have not yet discovered how to do it). This means that you need to go through this section and alter the fonts for the headings: where I have put ${font augie:style=Bold:size=8} you should change this to the font of your choice. Alternatively, if you like the augie font, you can get it here: .

The process and memory usage lists only display well in their columns if a monotype font is used. I have used bitstream vera sans mono, but if you have another monotype you prefer, use that instead.

The final part you may want to modify may be quite complex. I have a wireless network. To use the variables that allow me to display my wireless information, I have had to compile Conky in a special way, described here. If you don’t have a wireless network, you will need to use a completely different set of variables.


${font augie:style=Bold:size=8}$color1 Network > ${addr eth0}${font augie:style=Bold:size=8} $font $color
Down / Up Speed: ${downspeed eth0} k/s / ${upspeed eth0} k/s
${downspeedgraph eth0 20,120 F660AB F52887} $alignr ${upspeedgraph eth0 20,120 F660AB F52887}
Down / Up Bytes: ${totaldown eth0} / ${totalup eth0}
Inbound / Outbound / Total: ${tcp_portmon 1 32767 count} / ${tcp_portmon 32768 61000 count} / ${tcp_portmon 1 65535 count}

Copy this section of text, and use it instead of all the code between

${font augie:style=Bold:size=8}$color1 Network > ${wireless_essid wlan0} > ${addr wlan0}${font augie:style=Bold:size=8} $font $color

and

Inbound / Outbound / Total: ${tcp_portmon 1 32767 count} / ${tcp_portmon 32768 61000 count} / ${tcp_portmon 1 65535 count}

You will need to change the hex codes for $downspeedgraph to ones more suitable for your scheme. The first code (here F660AB) is the one that will show as the actual graph.

This should ensure that all your Font and Colour configuration options have now been changed to fit in with your preferred scheme. As an example, here is a Conky I have made by doing just that:

A modified version of my Conky

A modified version of my Conky

1 Comment

Filed under How To, Linux

How To: Configuring Conky

As I have mentioned elsewhere, Conky is a great little application for displaying system information and other odds and ends. It’s lightweight, fast, it can be embedded on the desktop, and it’s highly customisable.

This last point could also cause a problem; Conky can afford to be so customisable because it is customised entirely through its configuration file in the home directory: ~/.conkyrc. This mass of text based commands and code might seem daunting, but it’s not too bad to configure once you get the hang of it. This guide aims to show you how.

Getting a Premade .conkyrc

To start with, many, many, many people have already posted their .conkyrc files online; you can find most of them on the Ubuntu forums here or on the Conky home page here.  If making your own Conky file seems too scary, you can always copy one of these and save it into your home directory as .conkyrc. If you like my .conkyrc (shown at the bottom of the page) I will be doing a quick and easy guide to fixing that up to a more customised look, without having to learn the meaning of every configurable option available.

Making a .conkyrc

If you do want to customise your own, it’s still good to start with the code of a look that’s similar to what you want, and then modify that. I started by using the guide that Linux Owns posted here, and expanding from that.

Two other sites you will want are from the Conky home page: the lists of Config Settings and Variables. You use the Config Settings to describe general features of how you want your Conky to appear, and the Variables to define what actually gets displayed.

Lets say we start with the basic example Conky code that comes when you install it. To find it and use it, type this:

cp /usr/share/doc/conky/examples/conkyrc.sample.gz ~/.conkyrc

The resulting conky will look like this:

The default Conky

The default Conky

Not very attractive, and certainly not very embedded. Lets see if we can work with that.

Open your .conkyrc in an editor of your choice. There is actually a Conky syntax Stylesheet available for Vim users, which you will find in the ‘extras’ folder of the archive, if you downloaded Conky from the website here. Just extract the archive and copy extras/vim to ~/.vim, then restart vim.

Looking at your .conkyrc, you may notice that it is divided into two sections. The first section describes your Conky appearance; default colours, location, size constraints, how it appears on the desktop (eg does it look embedded) etc. The second section is divided from the first by the line TEXT. This second section defines what information Conky will actually show, how it will be laid out, and what colours it will be in. We will look at both sections in this guide.

Section 1: Configuration Settings

The Conky website has a good list of Config Settings which make a handy reference. We’ll start by looking at Fonts. You can define a font to use using the ‘font’ option, but most people will want to use Xft, which allows you to use any font you have installed on your system. On the default .conkyrc, use_xft yes shows that Xft is already enabled. The default font is defined by xftfont and is currently set to Bitstream Vera Sans Mono:size=8. You can also set the alpha and whether the font is in Uppercase. I have MSCoreFonts installed on my system (if you’re using Ubuntu you can get this from a package called ‘Ubuntu-Restricted-Extras’). I’ve therefore chosen to set my fonts as:

xftfont comicsansms:size=8

MPD is a ‘music player daemon’ which can be used with a client to maintain and play mp3 lists over a network. Conky has the ability to display MPD music information, but unless you actually have MPD and think this would be useful, you can delete all the references to it. There are ways to display music for other players as well, and I will discuss these later.

If you use the mail spool for checking your mail, you can use mail_spool to define which it is, and see how many mails you have unread. If you use another mail client, for example gmail, don’t worry, I will also be showing a little script that allows you to show how link your gmail account to Conky.

Next we come to some of the more important settings. update_interval defines how often Conky updates its information. total_run_times defines how often it will run before it shuts down (setting this to 0 will keep Conky running permanently). Double_buffer is often necessary to eliminate flicker, but if it’s set to yes, you will have to have own_window set to yes as well. Don’t worry, you can still have the embedded appearance like this. If own_window yes is set, then set:

own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager

This will give the embedded look. You can also set own_window_colour if you don’t want the transparent look, define what colour the background should be.

Next define the location and size. alignment can be top_left, top_right, bottom_left, bottom_right or none. gap_x and gap_y define the location from the edge of the screen, and will be taken from whichever alignment has been specified. So if I have specified I want Conky to be in the bottom left of the screen, alignment_x will define how far from the left edge of the screen Conky will be displayed, and alignment_y will display how far from the bottom edge of the screen it will be. If you specify top right, then x will display how far from the right, and y will be how far from the top.

minimum_size and maximum_width are fairly self explanatory. I have found that, even with double_buffer and own_window set, there can still be some flickering, and it seems that this occurs if changing data is causing Conky to have to resize constantly. minimum_size can prevent this, if you set it to the largest size you think it is likely to have to change to. Maximum width can help you prevent Conky spreading over the width of your monitor, but if you set it too narrow, it may give a squashed appearance and make it hard for Conky to display everything it needs to.

Conky can also be set to have borders, and the appearance of these can be set with:

draw_shades
draw_outline
draw_borders
draw_graph_borders
stippled_borders
border_margin
border_width

I have shades, outline, and borders set to ‘no’, but graphs can be somewhat harder to read without defining borders, so this is set to ‘yes’ for me. You can choose how you like it. stippled_borders is set with a number that defines how stippled the border will be.

use_spacer can be useful when displaying columned lists, such as for displaying active processes and memory usage. If this is set to ‘yes’, then monotype fonts will be spaced into neat columns if there are gaps between them. It doesn’t work for truetype fonts.

You can also set the number of cpu samples that will be used to find the averages, the same for the network data, and whether or not you want to force UTF8 support.

Finally, you can define the colours. This is probably a section you will fiddle with a lot, even once you’ve got your basic Conky configuration to a setup you are happy with. All the colour settings accept hexadecimal values, but leave out the # sign, as that will just comment the number after it out, which is no good! You can also use pre-defined colour aliases, just as with html colour assignment.

default_coloris self explanatory, and you should set it to the colour you want for the majority of the text. default_shade_color will define the colour for shadows, and default_outline_color, the same for borders.

You can also define colour aliases, to use later when defining the variables conky will display. These are color1, color2 and so on to color9.

Section 2: Customising .conkyrc TEXT variables

This section is where stuff really starts to happen. There are a huge amount of variables you can choose to show for all aspects of your system’s operation. See the Conky website here for a full list. Popular choices are uptime, CPU usage, RAM usage, processes, network speed, hard drive space, you name it. If you want to show information about wireless statistics, you will need to enable this when you ./configure your Conky during install. The details on how to do this can be found on the Ubuntu forums here.

As well as using the built-in variables, you can also get Conky to display information outputted from scripts. This is more complicated, but it can be used to display information from GMail, from Amarok (or music player of your choice), information about the weather, or output from your BOINC processes. If you’re not much of a programmer yourself, don’t worry, other people have kindly posted their scripts for all of these things and more on the web, and I’ll be showing you how to take advantage of some of these.

To start with, this section is more complex than the configuration section, so lets look at some of the basics. Variables are called with the $ sign. If the variable requires options, these can be grouped using { } brackets. So for example, $color will set any text after it is called to the default colour. ${color lightgrey} specifies that the text colour should be set to lightgrey, regardless of the default colour. As with the configuration colour options, the $color variable can take any hex colour code. Unlike the configuration settings, though, hex codes need to be preceded with the # symbol.

Another important appearance variable is $font You can use this to alter fonts from the default for different parts of text. For example, to change to a monotype font for my process listings, I used:

${font bitstreamverasansmono:size=8}

Apart from the variables, text is displayed (more or less) as typed. So if you type:

This is line one.
And this is line two.

They would be shown in Conky as separate lines, just the same. If you type everything on one line, Conky will show it all as one line. This can be useful for creating strip information displays along the bottom or top of your monitor. If you leave a blank line between two lines in your Conky TEXT config, then your Conky display will have blank lines there as well. As I mentioned earlier, if you want neatly spaced columns, you will need to use a monotype font to ensure they are spaced out properly and evenly. Sections can be separated with a horizontal line, through the $hr variable. A stippled horizontal line can be created with $stippled_hr.

As you can see if you have looked at the Conky variables web-page list, there is a lot of information you can display. It probably is best to get hold of someone else’s Conky and adapt it. Once you’ve found one similar, you can cut and paste to move things around, and update the text in between the variables as you prefer. The trick is keeping track of what is where, especially with all the different colour and font variables thrown in, and it can make the code very daunting to look at. When in doubt, you can always save it, open conky to see how it looks, and then go back to it again with a fresh eye.

Although there are too many variables to go through every single one of them, I’ll look at a line of sample code from the default .conkyrc, and go through that. Hopefully, that will make the whole thing a little more comprehensible.

${color lightgrey}RAM Usage:$color $mem/$memmax - $memperc% ${membar}

The first variable defines the colour. The text RAM Usage: will appear in light grey. $color (without an argument) returns the next part of text to the default colour. The next few variables deal with displaying memory information. $mem shows the memory currently in use. / is then just a visual divider, that will display between the two values of $mem and $memmax, which displays the maximum available memory. is just another text divider, that will display before $memperc which will show how much memory is being used as a percentage, emphasised by the text symbol %. Finally, the whole thing is finished off with a graphical bar representing memory usage – $membar. When run in Conky, this line will result in this:

RAM Usage Line

RAM Usage Line

The ‘MiB’ and ‘GiB’ text is returned by the $mem and $memax with the data, and the ‘/’ divider and % symbol where part of the text specified on the line.

Another section of TEXT from the sample .conkyrc file:

${color lightgrey}Networking:
Down:${color #8844ee} ${downspeed eth0} k/s${color lightgrey} ${offset 80}Up:${color #22ccff} ${upspeed eth0} k/s
${color #0000ff}${downspeedgraph eth0 32,150 ff0000 0000ff} ${color #22ccff}${upspeedgraph eth0 32,150 0000ff ff0000}

This text produces this section of display:

Network Usage segment

Network Usage segment

The first line just produces the heading ‘Networking:’ in light grey. The second line continues in grey for the label ‘Down:’ but then switches to hex code #8844ee (purple) to display the download speed in k/s. ‘Up:’ is in light grey again, and the upload speed is displayed in hex code #22ccff (blue) in k/s. Finally, the same information is displayed as graphs with the network label, height and width, and two gradient colours as options within the curly brackets.

And Finally

There is a problem for people running Compiz, or other graphical style window managers. If Conky is set to auto-start as soon as the system boots, the Window Manager may put a shadow effect around the window frame, as it does for other programs. To prevent this, a small delay is needed on starting up. There is a special script that can be used to implement this:

#!/bin/bash
sleep 10
if pidof conky | grep [0-0] > /dev/null
then
exec killall conky
else
exec conky
fi

Save this script, for example, as conky.sh in a Scripts directory in your home folder. Set your autostart to this script, instead of directly to Conky. This script will wait a set time, before launching Conky. This should prevent any shadows.

As I hope I’ve shown, the .conkyrc is not nearly as complex as it looks, and its high customisability make it a very powerful tool.  Below is an example of just one of many looks that can be created with it.  However, if you’re still feeling confused, I will be including my own .conkyrc and a guide on how to make it less pink, later.

Conky

Conky

12 Comments

Filed under How To, Linux

How To – Configuring Cairo-Dock

I have already mentioned Cairo Dock, my preferred choice of Linux Docking tool. In this How-To, I’m going to go through some basics in how to get it looking just the way you want.

Contents

1. Contents
2. Setting Up
3.The Configuration Menu
4. The Dock
5. Icons
6. Indicators
7. Results

Setting Up

To start with, you have to install it. You can download the latest version from the BerliOS website. If you download the .deb file, you will also need the plug-ins .deb.

Once it’s installed, run it, and you will be asked to choose a theme. The packaged themes are very nice, and you may be happy just using one of those. I preferred to create my own though. I used coz’s ‘clear’ theme as my starting base.

Coz's Clear Theme for Cairo-Dock

Coz's Clear Theme for Cairo-Dock

If you want to change themes at a later point, just <right-click> on Cairo-Dock, go to the Cairo-Dock sub-menu, and choose ‘Manage Themes’.

You can also set up ‘sub-docks’, one of the features that makes Cairo-Dock so powerful. To set one up, <right-click> on an empty space in the main dock, and choose add a sub-launcher. A dialog will pop-up where you can enter a name and an icon for the sub-launcher. Under Extra Parameters you can also choose its position in the dock, which dock or sub-dock it is attached to, and which view you wish to have the dock rendered in.

The Configuration Menu

To start making your own customisations, <right-click> on Cairo-Dock, go to the Cairo-Dock sub-menu, and choose Configure. If you’re using ‘simple mode’ you will only see a couple of tabs that don’t let you do much. Click ‘advanced mode’ in the bottom left corner. You will then see that there are quite a few different settings groups you can modify:

  • The first tab, position, can be used to modify where the dock is in relation to the desktop. However, it’s usually easier just to hit alt and drag it where you want it to be. You can also turn on auto-hide and ‘keep below’ features here.
  • The task bar tab is quite interesting. Here you can toggle features like the ‘window’ display – Cairo-Dock can show the current applications in the dock alongside the launcher icons, if you choose. You can configure how launchers and applications are grouped, how application icons display, and so on.
  • The system tab isn’t one I’ve fiddled with a lot, but it has a few useful options, namely the option to ‘click to show sub-docks’, which I like.
  • Applets is far more handy; here you find some of the fun little gadgets that are being developed and adapted for Cairo-Dock. A few of them are in early days yet, but I’ve found wifi, logout, and a few others quite useful.
  • The background tab is the most useful for customising the look of your dock, and I will come back to this in more detail later.
  • There are a few options to play with in the icons tab, especially customising the labels that appear on mouse-over, (unless you set them to appear all the time). You can set the behaviour of your icons here as well, whether they bounce, rotate, etc, their size. You can choose whether or not to have seperators between different icon types, and what form these seperators should take. You can tie all the icons together with a bit of ‘string’ of a thickness and colour of your choice. Finally, you can change the order the different types of icons appear in.
  • Views changes the type of dock you have; you can specify this for the main dock, and also for sub-docks. You can have a panel-type box, a 3d platform, a curve, a slide, a rainbow – there are lots of choices! Once you’ve chosen your view, you can hit preferences to configure it further, such as changing the vanishing point of a 3D dock.
  • Dialogs changes the appearance and behaviour of the warning, notice, and general query dialogs that occasionally pop up. However, I haven’t seen too many of these, so I haven’t done much with configure it.
  • Desklets are Cairo-Dock applets that can be removed from the dock and placed directly on the desktop. The desklets tab lets you modify a few settings for these.
  • Finally, we have indicators. These are graphics that show when an application wants some attention. You can create your own graphic, or modify existing graphics.

The Dock

To start with, we’ll make the actual dock look good. For this, we need to go to the background tab of the Configure window.

  • The callback zone is the area behind the dock. When Cairo-Dock is set to ‘autohide’, putting the mouse in the callback zone will cause the dock to return. You can choose to decorate the callback zone with an image, which will appear whenever the dock is hidden.
  • Next is the Extern Frame, which configures the appearance of the line that runs around the edge of your dock. Here you can choose how ’rounded’ the corners of your dock will be, how thick the line around it will be, (or if there will be a line at all), and the colour.
  • You can set a background image for your dock using Background image, or you can just adjust the colours and gradiations in Gradiation. You can choose a ‘bright colour’ and a ‘dark colour’. By default, (if you’ve used the ‘clear’ theme as your base at least) the ‘bright colour’ is along the front of the dock, the ‘dark colour’ is along the back. If you want these colours the other way around, you can simply swap them around. You can also change the angle they appear at, the number of stripes that will be shown, and the width of the stripes.

Using these options, you can actually create quite a wide variety of looks.

A Pink themed Cairo-Dock

A Pink themed Cairo-Dock

Blue themed Cairo-Dock

Blue themed Cairo-Dock

Both these looks were created from the ‘clear’ theme using only the Frame and Gradiation options described above.

Icons

This still leaves us with the default icons, however, and sadly, they are not yet so easy to change. To change the icon for a single launcher, right click on the launcher, <right click> on the launcher, select modify this launcher, and change the image’s name or path to the icon you want to use. Using .svg is better than .png because of Cairo’s ability to ‘zoom in’ on active icons.

If you set the entire path for the launcher, then everytime you want to change theme, you will have to change the launcher as well. As an alternative, you can just enter the name fo the file, without the extension. Then go to the Icons tab and scroll down to Icons’ themes. You can add your icon directory to here, and Cairo-Dock will look in that directory for an icon of the same name that you entered for the launcher. If _ThemeDirectory_ is top, then Cairo will first look there, and if it doesn’t find anything, then look in your folder. If you move your folder up the list, Cairo will look there first. It will also look in these folders for application icons it can use.

An alternative is to create your own proper icon theme for Cairo-Dock. To do this, place your chosen icons in ~/.cairo-dock/current_theme/launchers. Each icon must have the same name as the class for the relevant application. To find the class for an application, make sure it’s open, and then go to a terminal and type

xprop | grep WM_CLASS

This will bring up a little pointer, which you use to click on the relevant window. This will call up a range of information on that window, which grep will then search for the WM_CLASS section. The feedback you get will look something like this:

WM_CLASS(STRING) = “abiword”, “Abiword”

To get Cairo-Dock to show the correct icon, the icon in current_theme/launchers must be given the same name as the application class, so for example ‘abiword.svg’ or ‘abiword.png’. You will need to set up icons for all the major programs you’re likely to need. If in doubt, just make a list of the icons in there from the default theme, and make sure that all your icons have the same names.

You can also change icons for Cairo-Docks applets. For example, if you’re using the trash applet, <right click> on it, configure this module, go to the module tab and choose the relevant images there.

Indicators

Indicators are another area where a little effort can have a big effect on your Cairo look. Apart from anything else, if you’ve set up a lovely looking dock, and you still have the indicators from the old theme, they could completely ruin it!

You customise indicators by going to the Indicators tab of the configuration panel. If you don’t want any indicators, you can turn them off by unticking the relevant boxes; ‘Display a drop indicator on icon while dragging over them’, ‘Draw indicator above the icon’, ‘Display the indicator above the icon’ and ‘Link the indicator with its icon’. You will also need to set ‘Linewidth of the frame around the active window’ to 0.

However, indicators could be set up to have some nice effects, so you may not want to just simply turn them all off. To truly get the best from them, you may have to be a little artistic. You need to create an image for each indicator.

  • The drag-and-drop indciator should be orientated from top to bottom, to symbolise falling. An arrow would be a good example.
  • The drag-over indicator is displayed on an icon when you drag something over it. It is usually about 1/3 the size of the icon.
  • The active window indicator can be a colored frame around the active window. You can set the color, the thickness, and how rounded the corners of the frame will be here.
  • The active launcher indicator should be shown under the icon for launchers that have been activated, however you can adjust it vertically if you prefer it higher. You can input any suitable image, just as with the drag’n’drop indicator.

Results

Just changing the dock view type, the appearance in Backgrounds and changing the icon set, should be enough to create a wide variety of very different looks. Here are some simple examples. There are many more on the Cairo-Dock Website.  My current dock uses the ‘Gartoon Redux‘ icon set from Gnome-Look. My old one used the ‘Black-white 2 gloss‘ set.

A fun pink-themed Cairo

A fun pink-themed Cairo

An early Cairo-Theme I made

An early Cairo-Theme I made

A very Grey Cairo-Dock

A very Grey Cairo-Dock

4 Comments

Filed under How To, Linux

How To – Installing Graphics Drivers (NVIDIA)

When I first installed Ubuntu, I found that my Graphics card was not automatically set up properly by the system. This is because it was such a new card that the standard drivers had not yet been configured to work with it.

This guide aims to help others in a similar situation, by explaining how to install your NVIDIA graphics card manually. It also explains a bit about Envy, an alternative, automated driver-installation system. The Envy section comes with a warning though, as I have heard reports that the program is still a bit rough around the edges, and has been known to cause problems. It is also apparently very difficult to uninstall properly, and can conflict with any attempt to install a driver manually at a later time. If in doubt, it’s probably better to follow the instructions for a manual driver install, for now. I didn’t find it that hard.

Continue reading

Leave a comment

Filed under How To, Linux