Monthly Archives: April 2011

Webcam settings on Ubuntu and Fedora Linux CLI from terminal

About a month ago I gave a few examples on the topic of controlling your Video4Linux compatible webcam device on Ubuntu Linux operating system. Here's the link if you are interested:

Webcam settings control on Ubuntu Linux operating system

Today we will approach that topic from a different angle. We will use CLI to control our webcam device. Who would want to control visual device like webcam from CLI you might ask? I'm doing it CLI way, because I want to tweak my webcam using my Linux operating system startup scripts. That's something I can't do by using GUI.

Second reason for using CLI for webcam control could be that you feel better typing commands on your terminal instead of clicking around with your mouse. Or maybe you don't have mouse or GUI available? Anyways, lets get started...

Continue reading

C/C++ library programming on Linux - Part three: Dynamic libraries using POSIX API

This is my third article in the “C/C++ library programming on Linux” series. I strongly suggest you read the first two parts parts of this article series where I’ve given some background about libraries on Linux operating system and explained static and dynamic libraries.

C/C++ library programming on Linux – Part one: Static libraries

C/C++ library programming on Linux – Part two: Dynamic libraries

In this third article I will explain the most interesting way of reusing code using libraries on Linux operating system - by using POSIX ("Portable Operating System Interface for Unix") application programming interface. Using POSIX functions dlopen(), dlsym(), dlclose() and dlerror() you can load and unload your shared libraries during the course of your programs operation. This functions present interface to the Linux dynamic linking loader explained in the first part of my "C/C++ library programming on Linux" article series. This system calls are typically used for implementing stuff like plugins for your application so that you can load functionality provided inside plugin specific dynamic library on-demand. So here's simple example of loading dynamic library into the "cprog" program presented inside my first article "C/C++ library programming on Linux – Part one: Static libraries".

Continue reading

C/C++ library programming on Linux – Part two: Dynamic libraries

This is my second article in the "C/C++ library programming on Linux" series. I recommend that you read the first part of this article series where I've explained the whole library thing, and gave an example of creating and using static library.

C/C++ library programming on Linux – Part one: Static libraries

In this article I will explain dynamic libraries and compare them to static libraries. I will also give an example of creating and using dynamic library.

Dynamic (shared) libraries

Dynamic libraries are different from static libraries in a way that by using them, during compilation process, GCC ads only code "hooks" and soname. That "hooks" and library soname are used during the startup of your application to load correct library and connect "inside" with the "outside" code.

Continue reading

C/C++ library programming on Linux - Part one: Static libraries

Background

One of the most important aspects of modern programming is concept of reuse of code. Even C programming language allows us to reuse our code using concepts like simple functions and structures. C++ programming language goes one step further and allows us to group related variables and functions into classes with the same purpose - the reuse of our valuable code. By using libraries we can go even further from sharing code inside one process - we can share code between completely different programs.

What changes when using libraries? Answer to that question is: "link phase" of your program. In this phase GNU linker links all code modules in fully functional program. When it comes to libraries on Linux operating system we have two basic concepts: static and dynamic (often called "shared"). In this article series I will do my best to explain both Linux libraries concepts using simple C language examples.

Continue reading

Firefox 4.0 on Ubuntu 10.04 Lucid and Ubuntu 10.10 Maverick

Mozilla Firefox 4.0 Screenshot

Firefox 4 is here as you might have already heard. I've noticed that not many people had updated their Firefox installations cause Firefox 4 won't be in official repositories until Ubuntu 11.04 Natty arrives. But fear not, "Mozilla Team" maintains Firefox Stable PPA for all of you waiting to update their favorite Firefox browser on Ubuntu 10.04 and 10.10. So here's the procedure for updating to Firefox 4.0:

sudo add-apt-repository ppa:mozillateam/firefox-stable
sudo apt-get update && sudo apt-get upgrade

Enjoy!