Category Archives: Ubuntu - Page 2

How to add and delete package signing keys of apt in Ubuntu

To install a package signing key you have to use the apt-key add command. For example if you want to add the Google signing key:

wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

To remove a key you first need to know its keyid. You use apt-key list for this:

sudo apt-key list
...
pub   1024D/7FAC5991 2007-03-08
uid                  Google, Inc. Linux Package Signing Key 
sub   2048g/C07CB649 2007-03-08

Once you know the keyid you delete it with this command:

sudo apt-key del 7FAC5991

Source: Askubuntu

Preview files in Ubuntu with space bar

I like the preview feature with the space bar that comes in Mac OS X and I wanted that same feature in Ubuntu.

You have at least two options: gnome-sushi or gloobus.

To install gnome-sushi just run this in your terminal:

sudo apt-get update
sudo apt-get -y install gnome-sushi

You may need to log-out and log-in again or just run gnome-sushi in a terminal to make it work for the first time.

To install gloobus you have to add its repository and then install it:

sudo add-apt-repository ppa:gloobus-dev/gloobus-preview
sudo apt-get update
sudo apt-get install gloobus-preview gloobus-sushi

You many need to install unoconv to preview some files like .odf, .ods, etc.

sudo apt-get -y install unoconv

Sources: http://www.webupd8.org/2011/10/install-sushi-file-previewer-in-ubuntu.html
http://www.webupd8.org/2012/04/gloobus-preview-update-brings-gtk3-and.html

Install Skype in Ubuntu

Since Ubuntu 10.04 you can add the repository for Skype running this command:

sudo add-apt-repository "deb http://archive.canonical.com/ $(lsb_release -sc) partner"

Then installing Skype is as easy as running:

sudo apt-get update && sudo apt-get install skype

Source: https://help.ubuntu.com/community/Skype

Collada-dom 3D models having black textures bug solution

I used to have a problem with Collada-dom 3D models textures. Some times they were not correctly applied and appeared black colored. Just like in this case:

Some time ago I found out that this was related with the locale (the language) in which the Ubuntu system was configured. I usually use my Ubuntu in english and haven’t had any problem until one person lend me a Ubuntu laptop with spanish locale. I was all the weekend trying to figure what was going on (I didn’t get any error message so I was clue less) until I noticed that difference with my working system. I told to my colleague “I know what the problem is but don’t know how to solve, and we are out of time so just install Ubuntu in english”.

Today I made the mistake of installing the spanish locale along side with the english locale in order to have the calendars first day on monday, numbers and dates in spanish way and so on. Then… textures black. So I just uninstalled the spanish locale and though all would be OK again… but no… now the program crashed every time I tried to load a Collada-dom 3D model. But hey, this time I got an error on the console:

locale::facet::_S_create_c_locale name not valid

I could start digging with this! And found out that the problem is with the boost library. Depending on the version of your boost library (I’m using 1.46, and this is supposed to be fixed on 1.48) If the locale is not set to “C” it crashes.

So a quick fix is to export a LC_ALL environment variable to value C. You can do it permanent on your system configuring it on you profile file (in you home folder) or on a terminal just before running your program (in that same terminal of course) like this:

export LC_ALL=C

I use Eclipse-CDT to develop so the easiest way to configure this environment variable only for my application is using the Debug/Run Configurations. Click on the small arrow of the Degug or Run buttons and select “Debug Configurations…” or “Run Configurations…”. The got to the “Environment” tab and add the variable:

Hope this helps you because this has been a pain in the $%! for me! And this is how you should see now the 3D model:

UPDATE: Once I changed the locales I found out that when trying to install any package with apt-get a error was telling me that my locales were not correctly set:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LC_TIME = "es_ES.UTF-8",
        LC_MONETARY = "es_ES.UTF-8",
        LC_ADDRESS = "es_ES.UTF-8",
        LC_TELEPHONE = "es_ES.UTF-8",
        LC_NAME = "es_ES.UTF-8",
        LC_MEASUREMENT = "es_ES.UTF-8",
        LC_IDENTIFICATION = "es_ES.UTF-8",
        LC_NUMERIC = "es_ES.UTF-8",
        LC_PAPER = "es_ES.UTF-8",
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_ALL to default locale: No such file or directory

As you can see my locales for time, monetary, address, telephone, name, measurement, identification, numeric and paper are in spanish (es_ES.UTF-8), my language is set up to english (es_US.UTF-8) and I have none set for LC_ALL. To fix this error I executed this on the terminal:

export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo dpkg-reconfigure locales

And now the error is gone because all my locale variables are en_US.UTF-8. You can verify your locales running “locale”:

$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=en_US.UTF-8

Sources: https://svn.boost.org/trac/boost/ticket/4688
https://svn.boost.org/trac/boost/ticket/5928
http://www.becodemyfriend.com/2011/11/perl-warning-falling-back-to-the-standard-locale-%E2%80%9Cc%E2%80%9D/

Installation scripts for ARToolKit, Collada DOM, OpenSceneGraph and osgART

I’ve created some scripts and patches so installation of all this libraries will be much less painful. The patches fix the compatibility issues with Ubuntu 11.10 and 12.04 I explained in other post and some small bugs in osgART and ARToolKit (you can also add support of V4L2 to it, credits to Kameda Yoshinari for this). I still have to test those on some versions of Ubuntu but I think they work quite well and if something goes wrong they are quite self explanatory and you’ll be able to fix them (would be nice if you tell me what you changed so I can improve them for us all ;) ). If you find any errors or a way to improve them don’t hesitate to comment here or in my Github repository. You can download all the files from here:

https://github.com/enekochan/installation-scripts

You should download all the files and place them in the same folder to proceed with the installation. The correct order to execute those scripts is:

  1. installARToolKit.sh
  2. installCollada.sh
  3. installOpenSceneGraph.sh
  4. installosgART.sh

Once you install all the libraries you will be able to use osgART with Collada (.dae) files as I do in this picture:

Don’t worry I’ll explain very soon (and with source code of course) how this is done.

UPDATE: You can find here the source code for this augmented reality application!

  • Page 2 of 5
  • <
  • 1
  • 2
  • 3
  • 4
  • 5
  • >