Dennis Blog – Just another blog.


Rainlendar on Ubuntu: everything fine except…

Posted in Ubuntu by Dennis on the 14 July 2008
Tags: , , , , , , ,

I’ve been using rainlendar for quite a while now. I really love it, I can easily manage all my schedule and remember staff that I would forget..

There is just a little problem in using Rainlendar with Ubuntu. Probably you would like your Rainlendar calender to start at the startup. In order to do this you probably did the following:

System->Options->Sessions->Add (Name: rainlendar, Command:rainlendar2, Comment: whatever you want)

this action is supposed to make Rainlendar start at the startup. It’s actually the right way, and it actually starts in the majority of cases. But in a non-trascurable number of cases, it doesn’t start properly. This mean that Rainlendar could not start at all or that it maybe starts but it’s interface is splitted over the whole desktop (there is typically a small number in the upper left corner of your Desktop).

This happens if Rainlendar starts before some important elements of the GNOME toolbar has been initialized.

An easy and powerful way to resolv this issue is quite obvious: delay the startup of Rainlendar.

Creating the script
As you maybe already know the Terminal is really, really powerful. For an advanced user it’s basilar to have a terminal to use, because it gives you the full (well, almost :D ) control on your machine. As this tool is really useful, it also provides a nice function which can be used in our case: sleep. As the name states, this function make the script sleep (wait) for X seconds before going on executing the script content). So these are the steps to take:

  1. Open a terminal
  2. Move to the directory where you want to create the script (maybe you home directory it you just want to modify the behavior for your user, otherwise you can put it in /home). To move between your directories, the command to use is cd. For example: cd ~/Desktop will lead you to your user’s desktop as the tilde (~) stays for home directory;
  3. If you are in your home directory you don’t need any particular permission to move. If you on the other hand are in the /home directory you need to get the rights of administrator. In order to do this you can try sudo su. After this command you will be asked for your password. If you are among the sudoers (administrators) you should immediatly gain the administrator rights. If you are not among them, well… you can only act in your home directory;
  4. Create the script. Now type nano startRainlendar.sh. Nano is a small but very powerful command-line writing tool. This command will open the newly created startRainlendar.sh file;
  5. Now fill in this file! As we discovered before we need to use the sleep command. So these are the rows you have to insert:#!/bin/sh
    sleep 10
    rainlendar2
  6. Now save the file. To do this type CTRL+O and then ENTER;
  7. We now have the file we need. Making this file start at the startup should solve our problem. But there is just another issue: we must make our file executable! To do this the command to use is chmod. I’ll probably tell you what I know about this command in another post some day. So far you just need to execute this command chmod 700
  8. The last thing to do is to make this script start at the startup. You should already have a rainlender2 entry in your startup list. To modify this (or to add a new one) go on System->Preferences->Session. Find the rainlendar2 entry and change the “Command” to /home/startRainlendar.sh or /home/USER/YOURDIR/startRainlendar.sh depending on where you decided to create your startup script. If you don’t have a rainlendar2 entry, click on the “Add” button and simply create a new entry (the important field is “Command”, the other two fields are just your your usage.

This should solve the issue. Hope this helps.

Now let’s go on with studies.

Ubuntu: Top programs for normal users

Posted in Ubuntu by Dennis on the 10 July 2008
Tags: , , , , , , , , ,

I am sitting here in the library studying and I just took a pause. Today I want to describe some programs which I use everyday and which are really good.This programs are about browsing, calendar, music listening, istant messanging, calls, office and dictionary. So, let’s start.

  • Firefox 3: Well, I think many of you use Firefox, as it comes pre installed on Ubuntu. This new Firefox 3 has really improved from the former version. I expecially like the new address bar which seems to be kind of “intelligent”, trying to recognize where you want to go while you type the address; Together with Firefox I use GMAIL notifier, a small add-on which keeps constantly controlled my e-mail address. You can find it here: https://addons.mozilla.org/en-US/firefox/addon/173;
  • Rainlendar2: This program is a really nice desktop calendar. As I tend to forget a lot of stuff it’s really useful for me to have this small application on the right side of my desktop. I use it really much: exams, things to do, birthdays, everything. Rainlendar2 comes with 2 skins. I don’t like the default one, but the second one is… really nice! Rainlander2 has plenty of useful feauters. There are two version avaiable: the free one and the pro one, which costs some dollars. You can read more about this program on it’s official website: http://www.rainlendar.net. I suggest you to have a loot to the FAQ section, really useful expecially for Linux users. The installation for Ubuntu users is really simple: you only have to download the *.DEB package, click on it, insert your admin password (sudo password) and install it. There is a version for Windows;
  • BMPX: I love it’s simply, light and complete interface. This player lets you play your own music from your hard disk (library), listen to internat radios (shouthcast, icecast), listen to lastfm (if you don’t know what it is I suggest you do discover it: http://www.last.fm), Podcasts, CDs and finally Jamendo, a really intresting music database on internet (http://www.jamendo.com). It is still in a quite early stage of the developement and it sometimes crashes (it happens to me when I listen for hours to lastfm) but I’m sure that if a lot of people will download and use this software the community will fix the bugs and provide new intresting and useful features. To get this software: http://bmpx.backtrace.info/site/BMPx_Homepage;
  • Pidgin: this IM (Istant Messaging) comes preinstalled (If I’m not wrong) with Ubuntu. If it doesn’t you can install it via terminal typing sudo apt-get install pidgin. I love it because it easily lets me to use different accounts (Messenger, GMAIL, ICQ) at the same time. It’s interface is really simple, so that this software is nothing for you if you love spectacular effects and complex interfaces. It still doesn’t support audio/video call and this is really a pity. But for the rest is really nice. It functions without problems even behind proxy: it can use the system’s (GNOME’s) settings (System->Settings->Proxy). Website: http://www.pidgin.im;
  • Skype: not much to say about this software. I use it quite a lot, both for calling other computer and normal phones to good rates (expecially cheap if you have to call fix mobile numbers around the globe). As for Rainlenard2, you can install Skype downloading the *.DEB package from the official website. With this newer versions, Skype starts a good support of webcams. http://www.skype.com;
  • OpenOffice: it’s simply a wonderfull application, containing a really powerful set of tools to handle many kind of documents (databases, written documents, excel files, presentation and much more). You simply have to try it out, as it comes preinstalled with Ubuntu. If you were used to Microsoft Office it will take you a while to understand how OpenOffice really works (there are some differences, of course) but after that you will love it. On the net there is a lot of material and tutorials teaching you everything you need. If you want, try to go on Youtube and type “OpenOffice” to get some tutorials! Website: http://www.openoffice.org;
  • Stardict: a really powerful dictionary on your desktop. It can both function with local and remote databases. I make it start automatically when the computer stars and if I don’t know a word I just have to select it and click the WIN button (you can set this behavior in the options window). Stardict opens a small window telling me what the word means (of course, I installed some dictionaries on my computer). To check out more about this software visit: http://stardict.sourceforge.net/. There is even a version for Windows.

That’s it, if you liked my description the best thing to do is to go and get the software and to try it out yourself!These are just opinions and you maybe like other software better than these ones! :)

Now, back to my studies.

Ubuntu: How to create a link to a directory on your Desktop

Posted in Ubuntu by Dennis on the 9 July 2008
Tags: , , , , ,

I remember it took me some time to understand how this worked… so I want to let you know how you can add a link to a generic directory on your Desktop. It’s really easy to do that, but it can be quite of tricky because it’s a different way from Window’s one.

In Ubuntu (assuming that you are using GNOME), there are many different ways to create your link:

  1. Nautilus. Simply navigate to the containter of the directory you want to link, right click on that directory and “Create Link”. This will place a link to your dir exactly where you are. Now take the link (cut: CTRL+X) and paste (CTRL+V) it on the desktop;
  2. Mouse. Drag the folder to the Desktop using the middle mouse button. A small window will open: select “Link here”;
  3. Terminal. ln -s /path/directory ~/Desktop/Name
  4. Right click on the Desktop and choose “create launcher”. In the “command” field write “nautilus /path/directory” without the quotes.

A short (and hope useful for somebody) post today! :)

OpenOffice: Working with formulas

Posted in Tutorials, Ubuntu by Dennis on the 7 July 2008
Tags: , , , , ,

As I am studying telecommunication engineering and I like to work with my computer, I use quite a lot OpenOffice to write pages of formulas for my projects, essays and so on. Working with formulas in OpenOffice is not difficult at all. What I want to do today is to give you some basic advice on how to work with formulas in an easy and quick way.

Supporting Formulas

First of all you have to make sure that your OpenOffice has the support for formulas. It can happen that you didn’t install it when you installed OpenOffice… some years ago maybe. It’s simply to understand if your OpenOffice can work with formulas or not. Simply go on Insert -> Objects -> Formula. If you are able to do this then everything is fine. Otherwise, if you are not able to select the “Formula” option then you have to install something.

If you are under Linux then you have to install the package “openoffice.org-math”. If you use Ubuntu you can do this in two ways:

  • By using Synaptic package manager (System->Administration->Package Manager Synaptic;
  • By using a simple terminal (Programs->Accessories->Terminal)

I’ll explain you how to do this in the second way. Open a terminal and write

sudo apt-get install openoffice.org-math

and click ENTER. You should see something like this:

now insert your password. Sudo is the command you have to use in order to (try..) to gain administrator rights on your machine. If your account (username) is among the sudoers (administrators), you will be able to install whatever you want, otherwise you will be blocked and you have to ask an administrator to install things for you.

You have of course to be connected to Internet in order to permit Ubuntu to go on a repository and pick up your package. After that the package should be installed. Close and open OpenOffice again and try to go on Insert->Object->Formula. Wow, it functions!

The formula syntax

Of course there is a syntax you have to use in order to correctly insert your formulas. The best way of quickly understand how this syntax works is try, try and try. OpenOffice will show some ? when you write something it doesn’t really like. I suggest you to have a look on this PDF File:

http://documentation.openoffice.org/HOW_TO/formula/Formula_CommandRef0_4_1.pdf

This is the official Formula Reference by OpenOffice. It contains all the symbols and stuff you can insert in your formulas.

Quick tips

Here are some quick trick you may need to know:

  • If you need invisible parenthesis use this ones: {};
  • To create a division bar write over. For example {3+x} over {e^x};
  • To insert a letter of the Greek alphabet write %nameofletter. For example %alpha, %omega, %BETA. Case matters here!;
  • For writing something just over or under something (apex position: powers and so on) try a^2, or a_2, or a^1_2;
  • If you use lots of formulas it’s boring to always go on Insert->Object->Formula. Select one formula and copy it (select the object formula, not its text). Then paste it and modify it whenever you need a new formula.

That’s it. You can have a look on this file, which is a ODT doc (OpenOffice written document) which contains some basic test I did with OpenOffice Formula: formulatest.odt

How-to: Create a linked index with Openoffice

Posted in Tutorials, Ubuntu by Dennis on the 6 July 2008
Tags: , , , , ,

Today I am going to explian how it’s possibile to create a linked index of a document. All of us know the importante of indexes in written documents. But if this documents are stored electronically (tipically in PDF format) it’s nice to have a clickable index, which immediatly redirects you to the part of the document you are intrested in.

Creating an index

To easily created an index the quickest way is to format your index entries through the most intuitive instrument: Headers. You can find this options in the toolbar Formatting (View->Toolbars->Formatting).

On this toolbar you find the Heading style I am talking about. As you can see you don’t just have one heading, but at least three. Heading 1 is to be used for the most important titles (es: chapter titles). After this you can use Heading 2-3-4 to create your gerarchy. Once you have created your documents structure is time to create the index.

Select where on your document you want to set your index (usually at the beginning) and go on Insert -> Indexes and Tables -> Indexes and Tables

A small window will open. That’s the window which lets you control your index. Give your index a name and move to the tab named Entries that’s the one which matters for our scope, which is to create a linked index.

Index and Tables windows

The part really interesting for us is the Structure section. This structure specifies, for each level, how one entry of the index should look like. The standard format is the following:

  • E#: Chapter number
  • E: Entry
  • T: Tab stop (this gives the line of spots we see)
  • #: Page number

Linking index entries

Between one an another of this buttons there is a small textbox which can be used both to write something or to add new pieces to the line entry layout. Our goal is to create a linked index. In order to to this:

  • Click on the “E#” button. Click on the “Hyperlink” button. The label of “E#” is now changed to “LS” which stands for “Link Start”. Below select “Page number” from the Character style.
  • Click now on the small textbox after the last entry of the line structure, “#”. Click now on “Hyperlink” again. A new piece should be added and it’s label should be “LE” (Link End).

The is how your structure should look like now:

Final structure

Final structure

The last thing to do is to click on “All“. This will apply the newly created structure to the whole index and not just to the “first level” (Heading 1).

Click now on “OK”. Your index will now be inserted in your document and the entries will be clickable. When you will click on the entries you will automatically been redirected to the specific header. In order to try links in OpenOffice you have to click on the index entries while you keep CTRL button down.

You can now for exemple export your document as PDF and have a really nice clickable index in the PDF format!

Small tip: to automatically update your index after some changes you do in the doc’s structure just right-click on your index and select “Update Index/Table”.

Solved: Ubuntu network applet doesn’t work properly

Posted in Tutorials, Ubuntu by Dennis on the 4 July 2008
Tags: , , , , ,

PROBLEM

When I go to my university’s library (http://www.unitn.it) I have two main ways to connect my computer to the net. The first way (the old one) is to use pppoe connection. The second one simply let’s you login from a webpage (which actually functions quite well.

It happened already two times that trying to setup the network by the first way results in Ubuntu’s nm-applet (Network Manager) not to work properly. Clicking in the applet’s icon should result in a list of the reacheable wireless networks (if your wireless card works correctly of couse).

Well, I noticed that after using pppoeconf the applet didn’t work correcly anymore, not showing me the list of wireless networks. Connecting via terminal (sudo iwconfig wlan0 essid NAME and then dhclient) still worked without problems. So the problem had to be in applet and it’s way of controlling the wireless card.

SOLUTION

After trying different solutions, I found the one which did the trick for me. The magic file is /etc/network/interfaces. After using pppoeconf it looked like this:

auto lo
iface lo inet loopback

iface dsl-provider inet ppp
pre-up /sbin/ifconfig wlan0 up # line maintained by pppoeconf

provider dsl-provider

auto wlan0
iface wlan0 inet manual

well, changing this to:
auto lo
iface lo inet loopback

or simply commenting the other lines should make the nm-applet work fine again.

!! do NOT delete auto lo and iface lo inet loopback lines as this action could risult in other network errors.

Bye bye!

How-to: Create PDF forms with OpenOffice

Posted in Tutorials by Dennis on the 2 July 2008
Tags: , ,

Hi everybody,

under these month I’ve been managing a lot of burocracy due to my Erasmus period which will start in August in Tampere, Finland. Among all the forms I had to fill in, I recieved a PDF file from Finland which actually was a form. I hadn’t seen such files before! So I asked me: How do I create one of them? So after some tries… here you are! My experience.

Why
But why should you need to create such a form? Well, PDF forms are really much better than *.doc or *.odt forms. That’s because in a PDF files fields remain exaclty where you put them and you can set plenty of intresting parameters. They are easily online-fillable and this is nowadays really important.

How
To create a PDF Form you will need OpenOffice. As far as I know Microsoft Office doesn’t support PDF export (but I heard this feauter will be implemented in the next version of Office). You can easily get the OpenOffice suite here: http://www.openoffice.org/

There is not a big difference between OpenOffice and Microsoft Office for what concerns the GUI (Graphical User Interface). So even if you are new to OpenOffice and used to work with MS Office you should not find any big difficulty in working on this easy stuff.

Open now OpenOffice Writer. Here you are. You can now handle this page as you usually do as any other written document. But your question surely is: How do I insert form controls/fields?

To insert Form controls and fields go on View -> Toolbars -> Form Controls .This will show you a toolbar with plenty of useful form stuff such as Labels, Text Boxes, Check Boxes, etc…
In this toolbar you will also find another useful button, More Controls which allows you to insert even more controls.

Inserting form controls in your page should not be a problem. Just find a layout you like. You can treat this elements exactly as any other element like an image, a paragraph or whatever. With a right click on the object you can modify its properties. Really intresting are the “Control…” and “Data…” entries which allow you to set advanced properties of your newly creted object.

Once you have created your form it’s time to create the PDF file. You can click on the “Export directly as PDF” button directly from OpenOffice’s standard bar or either go on File->Export as PDF and select some more advanced options.

There you are! Now you have your PDF Form. You can fill it and print it obtaining a really standard piece of paper, useful if you have to collect lots of the same information from many people.

Pay attention
Please note that you PDF module won’t be saveable. People just have to fill it in and take a print in order not to loose their work!

That’s it. Hope this will be of some help for somebody. Otherwise it has been a great exercise in written English for me! :)