I like the idea of using different interfaces on my data through different form factors 🙂
I’ve previously blogged on installing lazarus on ubuntu but unfortunately upgrading to ubuntu 11.10 broke my lazarus installation 😦 Here’s how I fixed it all.
1. Totally remove previous Lazarus and fpc installations
sudo apt-get purge lazarus* sudo apt-get purge fpc* sudo rm -Rf /usr/lib/fpc sudo rm -Rf /usr/lib/lazarus sudo rm -Rf /usr/share/fpcsrc sudo rm -f ~/.fpc sudo rm -Rf ~/.lazarus sudo rm -f /usr/bin/lazarus* sudo rm -f /usr/bin/lazres* sudo rm -f /usr/bin/lazbuild* sudo rm -f ~/.local/share/applications/lazarus*
2. Install fpc so you can use it from the command line
sudo apt-get install fp-compiler-2.4.4
You can see if this has worked properly by writing a hello world command line app, comiling it and running it before you’ve even tried to install lazarus. Save the following in a file called cmdline_helloworld.pas:
begin writeln('hello world!'); end.
Then compile using
and run using:
3. Install lazarus
sudo apt-get install lazarus
You probably need to disable overlay scrollbars otherwise you can get problems using menus and dialogs in Lazarus and apps made with lazarus:
if you don’t want to make such a global change then just make a script to start lazarus like this:
#!/bin/sh LIBOVERLAY_SCROLLBAR=0 lazarus-ide
4. Change IDE settings to make it easier to use with Unity
Unity is annoying for many reasons, but it doesn’t deal with multi-window apps like Lazarus very well. So here’s some suggestions to make it all behave a bit better.
First, if you use a taskbar plugin like tint you can have Lazarus only show one button rather than loads on the task bar (Environment -> Options -> Window and slect “Show single button in Taskbar” at the top.
Second, I recommend making lazarus use single window mode. This is a little experimental but I think it’s a major improvement over the old-fashioned pre-Delphi 2005 layout.
To transform Lazarus into a single window mode application you need to install the AnchorDockingDsgn package which is helpfully installed with Lazarus. On ubuntu in a standard installation it’ll be in /usr/lib/lazarus/0.9.30/examples/anchordocking/design.
Do this as sudo otherwise the recompiling process doesn’t have enough rights to backup packages and wotnot. So start lazarus by doing
In Lazarus File -> Open and browse to anchordockingdsgn.lpk
When the package editor comes up select the install button. Lazarus will ask for confirmation and tell you only static packages are supported so you need to rebuild lazarus (that really needs sorting out!), say yes and then sit back and enjoy the compilation process.
Next time you start Lazarus it’ll be in single window mode. For some reason the Object Inspector (F11) isn’t docked by default but you can easily add it yourself.
Call me old fashioned, it’s probably true but I can’t get going with unity. Where’s the app menu? I need it! Ok I can just press the “Super” (windows key) and type for whatever I want, and accessing my most popular apps is easy enough but what about the thing I use to edit music meta data, can’t remember it’s name right now…. Or the thing that grabs stuff from the internet and adds it to my build logs, what category is that in again… And what did I download and install from the uber duper super software centre that I thought looked cool…
All these questions and more are normally answered by the Application Menu. I need it back! After upgrading to Ubuntu 11 I got so frustrated with Unity I decided to install Gnome 3 to bring it back, but some evil Unity conspirators have infiltrated the Gnome developer team and persuaded them to kill the app menu too. It’s time to fight back against this conspiracy that’s trying to turn our desktops into smart phones. To do that, just install classicmenu-indicator from Florian Diesch
sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install classicmenu-indicator
Once installed, run it: Alt-F2 type classicmenu-indicator and you’re good to go 🙂
Again I know that there’s ways of clicking on what’s running from the Unity dock, but for me it’s not very reliable in terms of popping up. In fact the Gnome3 dock is better, it kind of pings out of the top corner but both Unity and Gnome 3 have done away with taskbars for the current running windows. I use a lot of windows when I’m doing stuff, split between multiple workspaces and I just want a simple bunch of buttons to make life simple for me. Thankfully the same solution works for both Unity and Gnome3 and magically supports multiple monitors beautifully: tint2
sudo apt-get install tint2
You’ll also need to get it to auto-run which you can do by running
and adding /usr/bin/tint2 as an startup application, then you’ll need to log out/log in for it to run up 🙂
For me adding these bits are enough to make Unity usable 🙂
I like to play guitar. Not very well, but I enjoy playing. A while ago I added to my collection a Behringer iAxe which is basically a normal electric guitar with a USB port. It came with a CD of impossible to setup properly and use Windows software for sound effects. Since moving to Ubuntu I’ve been wondering how I’d be able to still play with it but last weekend I decided to try and search.
1 google search, 1 ubuntu software centre search, no reading of instructions and 20 mins later and I had achieved marvellous noise! I installed QJackCtl which starts and stops the realtime audio driver and also lets you map the input to virtual amps and then speakers (without having to read instructions, it mostly worked out what to do for itself) and then rakarrack which is like a big virtual guitar effects board. Then I just plugged in my guitar and make all sorts of horrible noises 😀
It all just worked and best of all it’s all free – well except for the guitar!
[Update: this post was from May 2011 for Ubuntu 10, for Ubuntu 11 see here]
I tried updating apt sources with “deb http://www.hu.freepascal.org/lazarus/ lazarus-stable universe” but got an error:
Failed to fetch http://www.hu.freepascal.org/lazarus/dists/lazarus-stable/Release Unable to find expected entry ‘universe/source/Sources’ in Release file (Wrong sources.list entry or malformed file)
I tried checking out the daily source from SVN but couldn’t work out how to make it all build properly. I tried the daily downloads of deb packages but got an error on starting that said “LCLBase 1.0” – “Unit not found: RegisterLCL” error.
I tried downloading various archives full of stuff and either making, installing debs or whatever with a variety of problems. Often there were broken package dependencies around e(.g. “package lcl-units-0.9.30 is not installed”).
Finally I found a way that worked over the weekend so I thought I’d share it for others having these difficulties. First if you’ve got a corrupt/broken installation or an old version installed it’s a good idea to get rid of it. I did this by doing:
1. Delete any existing FPC and Lazarus stuff, conflicts between versions are the source of many of the problems!
sudo apt-get purge fpc lazarus*
sudo rm -Rf /usr/lib/fpc
sudo rm -Rf /usr/lib/lazarus
sudo rm -Rf /usr/share/fpcsrc
sudo rm -f ~/.fpc
sudo rm -Rf ~/.lazarus
2. Download and extract the fpc packages (although at time of writing the ones packaged with ubuntu 11.10 are good enough – 22/10/11) and the latest lazarus packages. This ends up with two folders full or .deb files. Going into the fpc one first, then the lazarus one and entering:
sudo dpkg -i *
Installs FPC and then Lazarus.
3. Finally run Lazarus from your main menu, weird unity thingy or whatever you use 😀