Author: Rares Aioanei


You're already in the know regarding the C programming language. You got the taste of it and felt like you want to go further and write your own. Or maybe help the community and package that favorite software of yours for the distribution you like and use. Regardless of the situation, this part of the C development series will show you how to create packages for two of the most popular distributions, Debian and Fedora. If you read our articles so far and you have some solid knowledge of the command line, and you can say that you know your distro of choice, you're ready.

Before we go further...

Let's get some concepts and general ideas out of the way, just so we make sure we are on the same page. What we are about to outline here is available regardless of the project you decide to package (or contribute) for, be it Arch, NetBSD or OpenSolaris. The idea is: be careful. Check the code, whether it's yours or not, and make sure you remember that perhaps lots of people will use your code. You have a responsibility on your hands, and a pretty big one at that. If you doubt this, reverse places for a second: a package maintainer isn't careful when inspecting code and some sneaky, but grave bug makes his way installed on your computer. It's sneaky, as it only manifests itself on certain hardware and in certain situations, but it's grave enough to delete all the files resident inside your home folder. You happen to have that exact combination of hardware and mayhem ensues, as you forgot to write to DVD those pictures from your holiday. You get angry, your first reaction is to manifest negative feeling towards the operating system (or distribution) and so, following your decision to change distributions immediatley, that distro loses one user, all because one person's lack of attention and thoroughness.


Given Debian's excellent documentation, we won't be able to cover all the things one needs to become a developer. After all, this is not what we wanted. What we wanted is to show you basically how to get from a tarball to a .deb. Becoming a Debian developer takes lots of time and involves you helping out the community via IRC or mailing lists, reporting and helping fixing bugs, and so on, so that is not the object of our article. Have a look at the documentation the project provides for more insight. The Debian policy, New maintainer's guide and the Developer's reference are more than important for starting up, they must be like some kind of a book you sleep under the pillow with.

Your first stop should be, as outlined above, the policy, where you MUST acquaint yourself with the filesystem hierarchy, the archives, the fields in a control file and specific items to be remembered regarding diferent categories of software: binaries, libraries, source, games, documentation, ... Remember that a .deb file is nothing more than an archive, and it's made of two parts: the control part, with the control file and the install/ uninstall scripts, and the payload, where the files to be installed reside. It's not as hard as one would think it is. It's a very good idea that you download a .deb file, even better if it's packing some software you are familiar with, and start looking inside to see what's what. [HINT] - You can use the control file to create your own, as long as you're careful. As an example, let's take vim. deb files are nothing but ar(1) archives, so they can simply be unpacked by using the following linux command:

 $ ar vx vim-nox_7.3.547-5_amd64.deb

The intention of this config is to provide simple to follow steps on how to configure anonymous Internet browsing on Fedora Linux using privoxy and tor. Both services tor and privoxy are standalone services where tor provides anonymity using onion routing techniques and privoxy is a proxy server with content filtering and advertisement blocking.

Let's start by installation of both services:
# yum install privoxy tor
After the install start tor:
# service tor start
Redirecting to /bin/systemctl start  tor.service

The following config will demonstrate how to install Adobe Flash player on Fedora Linux. The following linux commands are separated into two sections to show Adobe Flash player installation for 32-bit and 64-bit architectures.

Adobe Flash player installation on Fedora Linux 32-bit

# rpm -ivh
# rpm –import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
# yum -y install flash-plugin

Currently, the default python version on Fedora Linux is Python 2. Later Fedora Linux release 22 will ship with the Python 3 as a default version. In this config you will learn how to switch between python versions on Fedora Linux. Let's start by listing all Python versions available on your Fedora system:
# ls /usr/bin/python*
/usr/bin/python   /usr/bin/python2.7         /usr/bin/python3    /usr/bin/python3.4m           /usr/bin/python-coverage
/usr/bin/python2  /usr/bin/python2-coverage  /usr/bin/python3.4  /usr/bin/python3-mako-render
Now, check your default python version:
# python -V
Python 2.7.8
To change python version on per user basis simply create a new alias in you .bashrc located under your home directory:
$ alias python='/usr/bin/python3.4'
$ . ~/.bashrc
$ python --version
Python 3.4.2

Below we will install missing video and audio plugins such us MPEG-4, MP3 on Fedora linux. First enable free and nonfree package repository on your system RPMFusion on your system:
# yum localinstall --nogpgcheck
# yum localinstall --nogpgcheck
The above packages are for Fedora 21 Linux so check RPMFusion website to update the above links so they math your Fedora Linux system. Once you have run the above commands you need to update repository index:
# yum update

The tutorial will explain the basics behind SSH server and SSH client connections on Fedora Linux Workstation. By default the SSH server on Fedora Workstation may be installed but not enabled. This will cause a following error message when connecting via SSH client:
ssh: connect to host fedora-workstation port 22: Connection refused
In this tutorial you will learn:
  • How to Install SSH server
  • How to enable SSH server
  • How to Start SSH server
  • How to Connect to SSH server

Disregarding GUI you can always put your Linux system to sleep from command line. This is especially useful if you GUI breaks from some reason and becomes unresponsive to suspend command or you wish to suspend your system remotely. Suspend also known as sleep is a state where your system current running state is saved directly to RAM and remains dormant until awaken by some sort of wake up event such as pressing power button, opening laptop lid or mouse move.

Since RAM is a volatile memory and requires electrical power to hold data your system while in suspended state continues to use electrical power. To suspend/sleep your Redhat/Fedora system you can enter the following linux command:
rhel7~]$ systemctl suspend

KeePassX is a cross platform password manager to allow users to store and organize password and keep them safe using advanced encryption techniques. This guide describes how to install KeePassX password manager on Fedora Linux.

KeePassX Download

First download source code from the KeePassX official download page. Example:
$ wget

Installation Prerequisites

In the next step we are going to install all prerequisites in order to success fly compile KeePassX:
$ sudo yum install qt-devel qt-config gcc-c++ libXtst-devel

Compilation and Installation

At this point we are ready to decompress KeePassX. Please note your version maybe different:
$ tar xzf keepassx-0.4.3.tar.gz 
$ cd keepassx-0.4.3/
and compile using make:

By default a Fedora Linux does not support playing MP3 files. The same must then apply also for an Amarok music player. To enable MP3 support a user needs to install non-free codec. First add rmpfusion repositories:

NOTE: the command below will enable both free and non-free rmpfusion repositories

$ su -c 'yum localinstall --nogpgcheck \ \'

Virtualbox installation on Fedora Linux This short howto will guide a Fedora user with a steps on howto install VirtualBox on a Fedora linux system.

System: Fedora 14 Laughlin , i386


Virtualbox Version: 3.2.12 for Linux

First, become a root and install all required prerequisites:

# yum install SDL make automake autoconf gcc kernel-devel dkms

By default your Fedora Linux system comes with a OpenJDK Java fetched from a standard Fedora repository. You may have some reasons to switch from OpenJDK to Oracle Java JRE. In order to achieve this firs download a java binary form oracle website:

as a root user make jre binary executable:

# chmod +x jre-6u23-linux-i586.bin

Rar archive utility is not avaiable on Fedora linux by default. If you are i need to extract / unrar rar archive files you can use official rarlab command line tool.

First download rar utility package for linux from .

Extract gzip tarball:

tar xvzf rarlinux-4.0.b6.tar.gz

Submit your RESUME, create a JOB ALERT.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: