Categories
Command Line HowTo Linux Ubuntu

fatal error: libconfig.h: No such file or directory | Ubuntu 12.04

If you’re getting the following error:

fatal error: libconfig.h: No such file or directory

Then you’re probably missing the libconfig-dev package from your system. Simply run the following command and it’ll fix it:

sudo apt-get install libconfig-dev
Categories
Linux Ubuntu

gimp: error while loading shared libraries: libgegl-0.0.so.0: cannot open shared object file: No such file or directory

After upgrading from Ubuntu 11.10 to 12.04 I found gimp couldn’t access the shared libraries it needed, most likely an error with symbolic links as described by lovelyindia in this post.

Fix 1:

He managed to fix the issue by removing gimp and purging the offending libraries and then letting apt deal with the libraries when he re-installed gimp, as per the below commands:

sudo apt-get update 
sudo apt-get purge gimp libgegl* libbabl* 
sudo apt-get install gimp 
sudo apt-get clean

While this is likely to work for most people encountering this issue, it didn’t for me.

Fix 2:

Then I remembered I had used the repogen source list generator, in which I chose to include the gimp svn build. While you may not have gone about it the same way, you may also have a different repository in your sources.list file which is causing this issue, if the previous method did not resolve the issue.

In order to fix this, I had to open the sources.list file and comment out the offending repo.

sudo gedit /etc/apt/sources.list

Now search for any reference to gimp, in my case this was the lines I changed:

#### Gimp SVN - https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 405A15CB
deb http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu precise main

I commented out the line linking to the repo by adding a ‘#’ to the front, as below:

#### Gimp SVN - https://launchpad.net/~matthaeus123/+archive/mrw-gimp-svn
## Run this command: sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 405A15CB
# deb http://ppa.launchpad.net/matthaeus123/mrw-gimp-svn/ubuntu precise main

I then uninstalled gimp, once I knew it may have been the newly added repository that I had added:

sudo apt-get purge gimp

Then I saved and exited the file and updated apt:

sudo apt-get update

I then re-installed gimp:

sudo apt-get install gimp

This solved the issue for me, I hope this helps!

Categories
Command Line Linux Ubuntu

Ubuntu 12.04 – Moving The Windows Buttons Back To The Right.

Those pesky windows buttons (maximise, minimise and close) default to the left of the menu bar after a new Ubuntu installations, and it’s been happening since 10.04. Most people, like myself, are stuck in our ways and just want them back where they belong. It’s pretty easy to do this, just open up a terminal (ctrl+alt+t) and copy in the following:

gconftool -s /apps/metacity/general/button_layout -t string menu:minimize,maximize,close

Once you hit enter, you should see the buttons return to their rightful place on the right, also in the right order.

Categories
Linux Ubuntu

AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up – Ubuntu 11.10

./blender
connect failed: No such file or directory
ndof: spacenavd not found
AL lib: pulseaudio.c:331: PulseAudio returned minreq > tlength/2; expect break up
Floating point exception

Download and install the associated package to your processor from here : https://launchpad.net/ubuntu/oneiric/+package/python-openal

Restart your computer and the issue should now be resolved.

Categories
Linux Posts Ubuntu

OpenNI – error CS0006: cannot find metadata file `System.Windows.Forms.dll’

During installing the OpenNi kinect drivers, found here: https://github.com/OpenNI/OpenNI, I came across this error:

make[1]: Entering directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Samples/SimpleViewer.net’
gmcs -out:../../../Bin/Release/SimpleViewer.net.exe -target:winexe -unsafe -o+ -r:OpenNI.net.dll -r:System.Windows.Forms.dll -r:System.Drawing.dll -lib:../../../Bin/Release ../../../../../Samples/SimpleViewer.net/*.cs ../../Res/AssemblyInfo-OpenNI.cs
error CS0006: cannot find metadata file `System.Windows.Forms.dll’
Compilation failed: 1 error(s), 0 warnings
make[1]: *** [../../../Bin/Release/SimpleViewer.net.exe] Error 1
make[1]: Leaving directory `/home/alex/kinect/OpenNI/Platform/Linux-x86/Build/Samples/SimpleViewer.net’
make: *** [Samples/SimpleViewer.net] Error 2

To fix it, simply install the following package:

sudo apt-get install mono-complete

Once finished, re-make and make install and everything should be dandy!

Categories
Arch Linux Blog Command Line Fedora Linux Posts Ubuntu

Switching Between Two Resolutions in Linux

I have a TV and my monitor connected to my PC by a VGA switch box but what’s annoying is they aren’t the same resolution. This causes problems because I can’t see what I’m doing when I have switched to TV and usually have to leave the setting manager open so that when I change between them I just have to hit return and the resolution changes. That’s great and all but it’s far more effort than I want for something I do fairly often.

My plan was initially to create two xorg.conf files and switch between them using a script, I figured this would be the easiest way even though I haven’t messed around with xorg stuff for a few years ever since things just started working better in Linux. Turns out I couldn’t even find where they keep the xorg.conf file, it sure isn’t in /etc/X11 where it was the last time I looked..

On the search for this file though I came across another useful tool called xrandr, which essentially allows you to change the resolution from the command line.

Xrandr is used to set the size, orientation and/or reflection of the outputs for a
screen. It can also set the screen size.

If invoked without any option, it will dump the state of the outputs, showing the
existing modes for each of them, with a ‘+’ after the preferred mode and a ‘*’
after the current mode.

There are a few global options. Other options modify the last output that is spec‐
ified in earlier parameters in the command line. Multiple outputs may be modified
at the same time by passing multiple –output options followed immediately by
their corresponding modifying options.

For more information on xrandr check out the manual page (or type man xrandr in terminal).

It turns out it’s an extremely easy tool to use, with a command as simple as the following changing the resolution:

xrandr --output VGA1 --mode 1440x900

So the next thing I did was create the following script which allows the resolution to switch between 1440×900 and 1360×768 (my monitor and my TV native resolutions).

#!/bin/bash

TV="1360 x 768"
MONITOR="1440 x 900"

TEST="$(xrandr | grep current | sed -e 's/.*current //;s/, maximum.*//')"

#echo $TEST

if [ "$TEST" == "$MONITOR" ]
        then
                xrandr --output VGA1 --mode 1360x768

elif [ "$TEST" == "$TV" ]
        then
                xrandr --output VGA1 --mode 1440x900

else

        exit

fi

This script simply checks what the current resolution is being used and then toggles between the two set resolutions.

Categories
Linux Posts Ubuntu

Ubuntu requires CD for software (installs and updates)

If when attempting to update software or install new software in Ubuntu you find yourself being asked to insert the installation/live CD or if you find the following errors while trying to update your sources the following should help fix this error.

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/restricted/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot be used to add new CD-ROMs

W: Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognised by APT. apt-get update cannot be used to add new CD-ROMs

E: Some index files failed to download. They have been ignored, or old ones used instead.

In order to fix this you’ll need to open up a terminal and type:

 sudo nano /etc/apt/sources.list 

Now you’ll see something similar to the following:

From here add a # to any lines starting with “deb cdrom:” then save and exit nano (Ctrl+X, Y, Enter).

Now from terminal type:

 sudo apt-get update 

You should now be able to install and update all the things without the need for a CD being mounted.

Categories
HowTo Linux Posts Ubuntu

OpenShot, libmp3lame and Ubuntu

If you’re getting the following error while trying export a video under several different codecs in OpenShot including AVI, MOV and MPEG using (mpeg2, mpeg4 or h.264) chances are this might help you with that error.

The following formats/codecs are missing from your system:

libmp3lame

You will not be able to use the selected export profile. You will need to install the missing formats/codecs or choose a different export profile.

This is a simple fix:

  • Open up Synaptic Package Manager
  • Search “libavformat”,
    • If the current package installed is “libavformat52” select “libavformat-extra-52” (alternativly “libavformat-unstripped-52” should also work).
    • Else the package might be “libavformat53” so simply change to “libavformat-extra-53”, basically it might end in different numbers, it should work the same.
  • Hit Apply and approve the changes.
Categories
HowTo Posts Ubuntu

Howto: Reinstall Grub using Ubuntu Live CD

I recently installed Fedora 12 on my desktop alongside Ubuntu Karmic and Windows 7, however doing so I overwrite my grub which meant my Ubuntu system was hidden. To fix this is pretty simple..

Insert your Ubuntu Live CD
Click “Try Ubuntu without any changes to your computer”
Once loaded click Applications > Accessories > Terminal

sudo fdisk -l 

#That’s a lower case L
This displays all partitions on your system, in my case the installation of my Ubuntu system was /dev/sda5 so replace this for yours in the rest of the code.

sudo mount /dev/sda5 /mnt
sudo grub-install --root-directory=/mnt/ /dev/sda

#thats a double dash before root-directory, wordpress keeps changing it to a long dash, Ill fix it sometime..
If all goes successfully you should be done, try rebooting and see if your Ubuntu shows up.

Thanks to Whiblog in the comments this also works in Ubuntu 11.04:

“same thing except the last line : sudo grub-install –boot-directory=/mnt/ /dev/sda”