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}

    • 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!


Filed under How To, Linux

Setting up Fluxbox

I’ve been threatening to try Fluxbox for a while, as the Gnome panel, and the fact that you can’t remove it, really annoys me. A lot of people complain about losing Compiz if they switch, but I have most Compiz options turned off. The only aspect of Compiz that I think is truly interesting is the transparency, and Fluxbox has fake-transparency built in so it does for my needs.

Where to find Guides

This isn’t going to be a how-to for installing Fluxbox from Ubuntu, as there are already some good ones out there: This excellent guide on the Ubuntu Community Docs website, and this guide by LinuxOwns are good places to start. The Fluxbox HomePage is a handy stop, and the Wiki is also a great source of information. If the worst comes to the worst and you just can’t figure it out, you can get help at the IRC #Fluxbox channel on Freenode.

A few Problems I ran Into

Gnome Desktop Control

I followed the Ubuntu guide without too many problems, but I did run into a couple of things of interest. Firstly, one of the first things I did was try to open up Nautilus to see how that looked. Don’t do that, at least, not through the main Application menu. Nautilus has some gnome-based features that basically take control of your desktop, which can cause a few problems. You can bypass this by running nautilus –no-desktop in a terminal, but there is a handy way to bypass these sorts of problems with Gnome apps on the Ubuntu guide here. I just pasted this small section in my ~/.fluxbox/startup script before the section to start Fluxbox.

GSDPID=`pidof gnome-settings-daemon`
if [ "x$GSDPID" == "x" ]; then
gnome-settings-daemon &

Once I had that in my startup config, I had no more problems with Gnome trying to reassert authority.

‘Suggested Packages’

After I finished the guide I made sure my Conky worked, and it didn’t. The reason for this was that I had followed the package manager’s advice and installed its suggested packages with Fluxbox: fbdesk, fbpager, and fluxconf. TIP: Don’t do this!

  • I’m told that fluxconf causes all sorts of difficulties with configuration settings that can really mess the system up. It’s supposed to make it easier to configure Fluxbox. Luckily I had not yet used it, so I just uninstalled it.
  • FBDesk was what was causing my Conky problems. It allows you to place icons on the desktop, which interferes with Conky, and shouldn’t really be necessary any in my opinion, as Fluxbox has much neater ways of organising the desktop, without clutter. I uninstalled that too.
  • I was not aware of any problems with FBPager, but I’ve been told it has been superceded by other things, and I wasn’t using it anyway. For good measure, I uninstalled that one too.

Missing Toolbars

My next problem was a bit, well, noobish. I was having trouble finding windows I’d minimized. I was able to make a key combination in the ~/.fluxbox/keys configuration file like this:

Mod4 Up :ToggleCmd {ShowDesktop} {Deiconify allworkspace originquiet}

This creates a toggle that minimises all the windows on your desktop, then returns them again, when you press <win-up>. It still didn’t return windows I’d minimised to the system-tray, though. I was advised to just ‘use the taskbar’, but what taskbar?

It turns out that there is a taskbar in Fluxbox, and I had accidentally hidden it. An instinctive reaction – see a taskbar, find a way to get rid of it. And in the case of Fluxbox, this is very easy. Just right click on it, and select ‘visible‘. The problem then becomes, how do you get it back again?

This is actually very easy too. Right click anywhere on the desktop to get the root menu, then Configuration>ToolBar>Visible. I felt very silly after that was pointed out to me!


One of the things that attracted me to Fluxbox (I’m a sucker for Eye-candy) was screenshots of translucent menus. This is actually done with ‘fake transparency’, which means that a picture of the relevant part of your desktop background is basically pasted onto the menu. It still looks good though!

It’s easy to setup. From the Root menu, select Configuration>Transparency. Make sure Force Pseudo-Transparency is enabled, then adjust the Alphas for the relevant elements you’re interested in. The main one is probably Menu Alpha. Click the left mouse-button to reduce the Alpha, and the right mouse-button to increase it. The lower it is, the more ‘see-through’ the menus will be.

Keyboard Layouts

Another problem I had was with keyboards. LinuxOwns mentions how to make sure the correct keyboard layout always loads on startup, from within the xorg.conf file. Open /etc/X11/xorg.conf in your favourite editor, using sudo. Find the section with:

Section “InputDevice”
Identifier “Keyboard01” #or something similar
#etcetera – they may be more below, there wasn’t on mine.

Look for a line like the one below, if it’s there, or put it in this section, if it isn’t:

Option "XkbLayout" "<your-layout-here>"

LinuxOwns tells us that you can use “be” for the azerty, or “us” for the american layout. My problem was that I have an English keyboard, so I need the UK layout. However, the code is not, as many often use, “uk”, but instead it is “gb”. So I need my line to read:

Option "XkbLayout" "<gb>"

Embedded Terminals

Once I’d finally got the code right, my keyboard worked properly again. Without it, I had no <win> key, and had been unable to use my keyboard shortcuts.

Finally, I having set up my keys, my startup apps, my icons, my theme, my desktop background, and my Conky, (never forget the Conky!) I set about trying to work out how to create my beloved Embedded terminals. You can do it all from within Fluxbox, through the config files, without having to resort to extras such as Compiz (you can’t run Compiz in Fluxbox.) It took a bit of fiddling to work out how to do it, as I couldn’t find a clear How-To, as there is for Gnome. However, I have finally achieved something that (I think) works, and I will write my own how-to about it later.

Leave a comment

Filed under Linux, Thoughts

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

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 :
    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 <>. Then set Use SMTP Server to the following:

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


Filed under How To, Linux

1000 Hits! Thanks to Everyone

Less than a month after starting my adventures in Linux, and deciding to write a Blog about what I’ve learned, I’ve hit 1000 total views! Thanks for the support of everyone who has stopped and made use of what I’ve written!


Leave a comment

Filed under Thoughts

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

Music and Music Players in Linux

A priority for any user of a new system is probably getting their music up and running. When using Windows, I was an ITunes user. This was not because I particularly liked ITunes, or its way of doing things, though I got used to it eventually. However, I have a large ipod, and I have not found another way of organising it so well, which was pretty much all I used ITunes for.

When switching to Linux, therefore, I needed another player that could organise my IPod. Since I could no longer use ITunes, I was going to have to look at other systems I may not like so well, but that also gave me more flexibility to look for something that actually plays and organises music in a style I like.

I’ve tried xmms and winamp in the past, and though I was once a great fan, I have to say that I no longer particularly like it. I’ve found that organising music purely through folders is useful in terms of keeping them organised, but clumsy in terms of playlists. To play an album requires making a play list for it. The newer versions have worked on this, and now have libraries that can be organised in a very similar manner to ITunes, but I still found I don’t like them. Therefore, this time I didn’t look at this style of player at all.

I started off using Amarok, which is supposed to be a good player if you like ITunes. Indeed, I found this to be pretty accurate. It does seem to be an excellent player for people who like ITunes. Unfortunately, I don’t like ITunes, and have been looking forward to getting rid of it. I moved on.

Next I tried Quod Libet. I really like this player. It’s based on an entirely new way of organising things, focussed around tags and searches rather than folders or libraries. It also works with your IPod – though it does take a long time to load the IPod song list. It can often appear to have crashed while doing this, but it does get there in the end so have patience with it! You can add songs from your music library by right clicking, and choosing ‘copy to device’. You can do the same with playlists. If you prefer a GUI music player, this is definitely the one I would recommend.

Quod Libet

Quod Libet


As I have mentioned before though, I’ve been experimenting heavily with Command-prompt programs, and if you want command prompt music, there’s only really one application worth looking at; MPD. MPD stands for ‘Music Player Daemon’ and is intended to facilitate running music over a network, or even over the internet. It can also be used for a personal desktop music system very effectively.

You can get MPD from the Ubuntu Universe repository; just apt-get install mpd. The website gives good instructions on configuring MPD here, and on getting started here.

MPD is just the back-end of a music-playing database. In order to use it effectively, you also need a client. You can find a list of the main clients on the MPD website here. The basic command-line client is MPC, which can be installed from the Ubuntu repository also, but does not come packaged with MPD. A slightly more graphical command line client is NCMPC, which makes it easier to visualise and manipulate your playlists and music database. If you prefer a GUI interface, Sonata is excellent. All of these can be downloaded from the repositories.

NCMPC client for MPD

NCMPC client for MPD

Sonata Graphical client for MPD

Sonata Graphical client for MPD

The beauty of MPD is that the clients just give the orders. It’s MPD that plays the music, and it runs happily in the background regardless. This means that you can load Sonata to organise your music, tags, and playlists, if you find its GUI interface easier. However, if you’re working in a terminal but don’t want to shift your train of thought, you can quickly type out a command to MPC. You can use whichever client suits your mood, or all of them at once! It also means that your music keeps playing even while you’re not in X-Windows. And of course, it can be used across a network, receiving commands remotely.


The drawback, for me, is that MPD does not have any IPod support, and there are no plans to implement it. This means that I cannot use MPD to manage my IPod. However, it can be used to create .m3u playlists, (I found ncmpc very effective for this). Quod Libet doesn’t seem able to create or read .m3u lists (please correct me if I’m wrong about this) but GTKPod, a program specifically created purely to manage and maintain ipods, can. This means that you can create playlists with MPD, then add them into GTKPod to add to your IPod. GTKPod can also deal with all the other major IPod tasks that I can think of, managing podcasts, photos, choosing ‘skip shuffle’, an essential for me since I have a lot of audio-files that I don’t want shuffled in with my music.

GTKPod IPod Manager

GTKPod IPod Manager

I haven’t yet decided which i prefer, MPD or Quod Libet, and in reality they are probably not truly comparable. However, the MPD/GTKPod combo does seem quite powerful for my needs, and as I’ve said before, I do like my Command Line apps. Don’t go for Rhythmbox or Amarok unless you really like ITunes.

1 Comment

Filed under Linux, Thoughts