Archive for September, 2008
How to enable X server on network in Fedora Linux systems
Sep 27th
Please read How to view remote UNIX desktop from Microsoft Windows system to know more about accessing X server from a remote host.
X server comes with built-in support for remote desktop because of its client and server architecture. In Fedora Linux systems, X server is disabled on the network by default. That means the X client programs residing on the same host only can connect to X server. If enabled, typically X server runs on port 6000.
To enable X server on the network, search for DisallowTCP in /etc/X11/gdm/gdm.conf file and modify it to look like the following.
DisallowTCP=false
You may have to either restart the More >
How to view remote UNIX desktop from Microsoft Windows system
Sep 27th
X server is the default Graphical User Interface (GUI) toolkit used in almost all flavors of UNIX family of operating systems and most notably Linux and FreeBSD. The famous desktops are KDE and GNOME. X server toolkit has bulit-in support for remote desktops because of its client and server architecture. X server hides the underlying graphics hardware and presents a unified Application Interface (API) for client programs like KDE and GNOME applications. Unlike Microsoft Windows, the client program can reside in another host and X server can reside on another host. i.e A Windows user with a X server software like More >
Map a directory with long pathname to a virtual drive in Microsoft Windows
Sep 27th
It is often very inconvenient to type long path names to move to a directory. Also sometimes code compilation fails if your command is taking more than certain length. In such cases, the base directory can be mapped to a Windows virtual drive so that the length of path can be reduced. For example “c:\mywork\myproject\release-10\” can be mapped to an unused drive “z:\“. Since then all files and directories present in “c:\mywork\myproject\release-10\” can be accessed using “z:\” as prefix.
Some old GNU compilation tools complain that command is too long when you have long pathnames and lot of command-line options. In More >
Script to delete CVS or SVN directories recursively for source code packaging
Sep 22nd
It is required to remove directories created by source code version control systems like CVS and SVN before releasing the source code. This can be done using the following command at the bash shell.
- Move to top level directory of your project sources
- Run the following commands
bash# find . -iname CVS -type d | xargs rm -rf bash# find . -iname .svn -type d | xargs rm -rf
Quick guide to profile C/C++ source code with gprof
Sep 22nd
This article is just a quick reference for profiing C/C++ source code using gprof. C/C++ source code can be profiled using gprof in three steps.
- Compile the sources and link the program with profiling options “-pg”
bash# gcc -pg -g -c source1.c source2.c bash# gcc -pg -o myapp source1.o source2.o
- Execute the program to generate profiling output in gmon.out
bash# ./myapp
- Analyze the profiling output with gprof. It prints the list of functions which have taken more time during the execution of process. This list is in descending order so probably you would want to start optimizing the code in the same order.The output also More >


Recent Comments