Tuesday, May 28, 2013

Export Display over TELNET on Ubuntu 12.04 64 bit LTS


The solution is derived from this link

Edit the file /etc/lightgdm/lightgdm.conf and add the following line towards the end of file:

xserver-allow-tcp=true

and restart your system.

Open a terminal and run the following commands:

$ xhost +

allow any user to connect to the xserver


$ telnet  

Once you login, type in the following commands:

$ export DISPLAY=:0.0

$ xterm &

You should be able to see the terminal.

On your own computer (not the remote server), you can run the following command to verify if there is any "-nolisten" variable with tcp.

$ ps -ef | grep listen
nobody    1182   839  0 19:33 ?        00:00:00 /usr/sbin/dnsmasq --no-resolv --keep-in-foreground --no-hosts --bind-interfaces --pid-file=/var/run/sendsigs.omit.d/network-manager.dnsmasq.pid --listen-address=127.0.0.1 --conf-file=/var/run/nm-dns-dnsmasq.conf --cache-size=0 --proxy-dnssec
mayank    5323  5064  0 20:17 pts/0    00:00:00 grep --color=auto listen


As you can see, it is not there and hence things should work properly now.

Disable Graphical login manager on Boot or Changing Default Runlevel on Ubuntu 12.04 64bit LTS

One of the following three methods should work for you:

1. If you just want to disable x-server after log-in. Then press CLT+ALT+F1. You can recover the x server by  running the following command:

$ startx


2. Ubuntu uses lightgdm instead of GDM as the default desktop manager.  So disable lightgdm on  boot by using the following command:

$ update-rc.d -f lightgdm remove

Then reboot the system.

You can start it by using either of the following two commands:

$ sudo service lightgdm restart
or
$ update-rc.d -f lightgdm defaults



3.  Edit the file /etc/default/grub and find the line containing the text:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

replace it by

GRUB_CMDLINE_LINUX_DEFAULT="text"

save the file and update the grub using the following command:

$ sudo update-grub

Now restart the system.

Monday, May 27, 2013

Making Webex work on Ubuntu 12.04 64 bit LTS with Firefox

I could finally get webex work on my ubuntu 12.04 64 bit LTS, thanks to Shariq's blog on the same topic. I will just enumerate few things in addition to what Shariq has already explained.


1. Install ia32-libs using apt-get:

$ sudo apt-get install ia32-libs


I did not downgrade the distribution as Shariq explained in his blog (see this link). I simply installed them using apt-get.

2. Create the folder ~/webex in your home folder as explained by Shariq. 

3. Download the firefox tar ball from the official firefox website. Just click on the download button to get the tar ball. I got the firefox-21.0.tar.bz2. I am not sure if it is a 32-bit or a 64-bit version. At least it did not matter to me.

4. Download the 32-bit JDK version from Oracle's official website. I got the package "jdk-7u21-linux-i586.tar.gz".

5. Extract these packages with in the ~/webex folder as shown below:

$ cd ~/webex
$ tar -xjvf firefox-21.0.tar.bz2
$ tar -xzvf dk-7u21-linux-i586.tar.gz

It creates two folders: 'firefox' and 'jdk1.7.0_21' within the webex folder.

6. Now link the java plugin within the firefox folder:

$ cd firefox
$ mkdir plugins
$ cd plugins
$ ln -s ~/webex/jdk1.7.0_21/jre/lib/i386/libnpjp2.so

Now you should be ready to go.  'Run the firefox executable within the firefox folder.

$ cd ~/webex/firefox
$ ./firefox &

Now open the webex link. You should be able to see the following screenshots. Note the blue 'share desktop' symbol. It indicates that webex is properly. The second screen shows the presentation shared on the webex.






Friday, May 24, 2013

Grub Rescue on Ubuntu 12.04

OS: Ubuntu 12.04

I have two versions of Ubuntu installed on a low-end PC. I resized partitions and it finally messed up the grub settings and I finally ended up getting a grub rescue > prompt on reboot:


I could finally resolve it but still I am not sure if it is the right method. If you know a better method, please let me know.  I basically followed the instructions given here.


Step 1.  It is necessary to identify and locate the partitions where the boot images of your distribution is available.

grub rescue> ls
(hd0)  (hd0,msdos3) (hd0,msdos7)  (hd0, msdos2) (hd0,msdos1)

grub rescue> ls (hd0,msdos1)/boot
... grub .. initrd.img-3.2.0-43-generic-pae ... vmlinuz-3.2.0-43-generic-pae ...

This is the right partition where we would like the grub to boot into

Step 2. It is necessary to find "linux.mod" file which usually lies inside /boot/grub folder.  Do the following:

grub rescue> set prefix=(hd0,msdos1)/boot/grub
grub rescue> insmod (hd0,msdos1)/boot/grub/linux.mod
grub rescue> insmod part_msdos
grub rescue> insmod ext2
grub rescue> insmod gzio

Last two may or may not be necessary. At least I don't get any errors so far.

Step 3. Now its time to tell grub to find the boot images.

grub rescue> set root=(hd0,msdos1)
grub rescue> linux /boot/vmlinuz-3.2.0-43-generic-pae root=/dev/sda1 ro 
grub rescue> initrd /boot/initrd.img-3.2.0-43-generic-pae
no partition found 
grub rescue> boot

The initrd command does not work for me. However, the system boots properly and I get back the login page of my distribution.

Once I log into the system, I open a terminal and install the 'boot-repair' package as follows:

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair
 
I go for the 'recommended step' and everything gets into its place. When I reboot, I get 
the usual grub menu. If you have a live CD or Live USB, then you can boot into the system 
and install & run boot-repair as explained above to restore your grub. 
 


Monday, March 25, 2013

Removing Non-embedded fonts in PDF



IF you are creating a PDF file using latex ( latex -> dvi -> ps -> pdf), then you can embed your fonts into your postscript file using the following command:

$ latex file.tex 
$ dvips -Ppdf  -G0 -j0 -t letter file.dvi 

$ ps2pdf14 -dPDFSETTINGS=/prepress file.ps
$ pdffonts file.pdf


name                                 type              emb sub uni object ID
------------------------------------ ----------------- --- --- --- ---------
ZKCWKK+Times-Italic                  Type 1C           yes yes no      20  0
SVPEPR+rtxb                          Type 1C           yes yes no      10  0
CFBFDF+rtxr                          Type 1C           yes yes no      18  0
AGNTKT+Times-Bold                    Type 1C           yes yes no       8  0
EFIXFI+txtt                          Type 1C           yes yes no      22  0
KFDWSB+Times-BoldItalic              Type 1C           yes yes no      16  0
HECNON+txsy                          Type 1C           yes yes yes     14  0
YDYILI+Times-Roman                   Type 1C           yes yes no      12  0
SLYWED+rtxmi                         Type 1C           yes yes no      29  0
UWMAWR+txex                          Type 1C           yes yes no      38  0
CQYSUU+rsfs10                        Type 1C           yes yes no      36  0
CQYSUU+rsfs5                         Type 1C           yes yes no      54  0
[none]                               Type 3            yes no  no      50  0
[none]                               Type 3            yes no  no      48  0
[none]                               Type 3            yes no  no      46  0
[none]                               Type 3            yes no  no      52  0
ZPCTTR+rtxsc                         Type 1C           yes yes no      70  0
GPRMLS+txsyc                         Type 1C           yes yes no      68  0
KLAHGF+rtxi                          Type 1C           yes yes no      85  0

For original post on this topic, click here

If you are having the latex source for the file. Install cm-super as shown below and insert the line \usepackage{lmodern} in your latex preamble and compile it. 

$ sudo apt-get install cm-super




Friday, February 22, 2013

C++: 3 Dimensional STL Vector with dynamic Re-sizing

Problem:

I want to create a 3 Dimensional Array whose dimensions are not known a priori. Let us that our 3 dimensional array is A[NP][NR][NC].  In my case, I know NP and NC a priori (before the execution of the program), but NR will be known only during run time.

Well I could make this array using pointers and using dynamic allocation functions like new/delete to get the desired effect. That is something I do regularly.

STL Vectors provide much better interface with several useful functions that can make your life lot easier. For instance, it is possible to resize these vectors during runtime. You can check for index bounds while accessing the elements etc.

So, I want to use STL vector to solve this problem.

Solution:

The following code demonstrates two ways by which you can accomplish the above objective.


  size_t np = 5; // no of pages
  size_t nc = 2; // no. of columns
  

  Method 1: Keep pushing the matrices into the page


  std::vector > matrix;
  std::vector > >page;

  for(size_t i = 0; i < np; ++i)
  {
    matrix.resize(i+1, std::vector(nc));
    for(size_t j = 0; j < matrix.size(); ++j)
    {
      for(size_t k = 0; k < matrix[j].size(); ++k)
        matrix.at(j).at(k) = rand()/(double)RAND_MAX;
    }
    page.push_back(matrix);
  }   


Method 2: Dynamically re-sizing 3D Array

  std::vector < std::vector > > page;

  page.resize(np); //np is known

  for(size_t i = 0; i < np; ++i)
  {
    page[i].resize(i+1, std::vector(nc));
    for(size_t j = 0; j < page[i].size(); ++j)
      for(size_t k = 0; k < page[i][j].size(); ++k)
        page[i][j][k] = rand()/(double)RAND_MAX;
  }        

           

                                


Tuesday, February 12, 2013

Installing Lotus Notes 8.5.3 on Ubuntu 12.04 64bit LTS


My office mail supports only Lotus Notes and hence I want to configure it on my ubuntu 12.04 64 bit LTS system. A very good tutorial on this is available here. I will not repeat the steps that are already mentioned at this site. Rather, I will only elaborate on errors that I encountered during my installation and tell you how I got around them.

It is easy to follow the steps from 1 to 5 of this tutorial.

Update:   In step 5, you need to download the getlibs from this link. The original link is not working any more.



 On step 6, when I execute the installation process:

$ sudo getlibs -p libgnomeprintui2.2-0 libgnomeprint2.2-0 libgnomevfs2-0 libgnomeui-0 libxkbfile1 libstartup-notification0 libsepol1 libselinux1 libgsf-1-114 libgsf-1-dev librsvg2-2 librsvg2-common libavahi-client3 libavahi-common3 libavahi-glib1 libbonoboui2-0 libcroco3 libdbus-1-3 libdbus-glib-1-2  libgnome2-0 libgnomecanvas2-0 libgnome-keyring0 libgnome-menu2 libesd0 gtk2-engines libgnome-desktop-2-17 libmotif4 libmotif3 libgnome-desktop-3-0 libavahi-glib1 gtk2-engines-oxygen gtk2-engines-aurora gtk2-engines-qtcurve  gtk2-engines-murrine gtk2-engines-equinox  alsa-base alsa-utils iproute libgnome-desktop-3-2 liborbit2 libbonobo2-0 libgconf2-4 libx11-6 libxt6 libxext6  libc6  libgcc1  libgtk2.0-0  libxkbfile1 libglib2.0-0  libstdc++6 bash libart-2.0-2 libpopt0 libgnomeui-0


libmotif3 was not found in your repositories
Make sure you have all repositories enabled and updated
E: No packages found
libgnome-desktop-3-0 was not found in your repositories
Make sure you have all repositories enabled and updated
Downloading ...
Installing libraries ...

But I think this is not serious enough and I decided to proceed further.



 In step 7, I get the following error when I try to install sametime:

$ sudo dpkg -i ibm-lotus-sametime-8.5.3.i586.deb

dpkg: regarding ibm-lotus-sametime-8.5.3.i586.deb containing ibm-lotus-sametime:i386, pre-dependency problem:
 ibm-lotus-sametime:i386 pre-depends on alsa-base
  alsa-base is not installed.
dpkg: error processing ibm-lotus-sametime-8.5.3.i586.deb (--install):
 pre-dependency problem - not installing ibm-lotus-sametime:i386
Errors were encountered while processing:
 ibm-lotus-sametime-8.5.3.i586.deb

I decide to ignore this as I am not worried about using same time at this time.


Update:  On a fresh install of Ubuntu 12.04 64 bit LTS, I could install the above package for 'sametime' without any error.  

Step 8 also works well.


Now in Step 9, I get the following error when I attempt to run the 'make' command:

$ make
gcc -Wall -Wextra -m32 `pkg-config –cflags gtk+-2.0`–shared libnotesgtkfix.c -o libnotesgtkfix.so -ldl 
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so when searching for -lgcc_s
/usr/bin/ld: cannot find -lgcc_s

When I search for this library, I find that it is available at two locations: 

$ locate libgcc_s.so
/lib/i386-linux-gnu/libgcc_s.so.1
/lib/x86_64-linux-gnu/libgcc_s.so.1
/lib32/i386-linux-gnu/libgcc_s.so.1
/usr/lib/gcc/x86_64-linux-gnu/4.6/libgcc_s.so
/usr/lib/gcc/x86_64-linux-gnu/4.6/32/libgcc_s.so

Somehow the linker was not able to link the 32-bit version of this library. So I decided to create a hard link inside the folder '/usr/lib/gcc/x86_64-linux-gnu/4.6'. 

$ sudo rm libgcc_s.so
$ sudo ln /lib32/i386-linux-gnu/libgcc_s.so.1 ./libgcc_s.so

It seemed to solve the problem and 'libnotesgtkfix.so' library is created.  


Update: Compiling notes-wrapper works fine. It does not give any error.  So, the make command works properly without any error generating 'libnotesgtkfix.so' library.  Just make sure your 'Makefile' looks something like this:

----------

all:
    gcc -Wall -Wextra -shared -m32 -L/lib32/i386-linux-gnu -lgcc_s `pkg-config --cflags gtk+-2.0`-shared libnotesgtkfix.c -o libnotesgtkfix.so -ldl

clean:
    rm -f libnotesgtkfix.so  

------------------


Also, while applying 'sed' to notes-wrapper, you still need to do the following:


While applying sed to the 'notes-wrapper' file, replace the command 

sudo sed -i ‘s/../notes %F/../notes-wrapper %F/g’ /usr/share/applications/LotusNotes8.5.desktop

with

sudo sed -i ‘s/\.\.\/notes\ \%F/\.\.\/notes\-wrapper\ \%F/g’ /usr/share/applications/LotusNotes8.5.desktop


Step 10 is OK. Only change the LD_LIBRARY_PATH from

LD_LIBRARY_PATH=$NOTESBIN:/usr/lib/i386-linux-gnu:$NOTESBIN/jvm/bin/classic:$NOTESBIN/jvm/bin:$LD_LIBRARY_PATH

to 

LD_LIBRARY_PATH=$NOTESBIN:/usr/lib32/:/usr/lib32/i386-linux-gnu:$NOTESBIN/jvm/bin/classic:$NOTESBIN/jvm/bin:$LD_LIBRARY_PATH 


In step 11, You need to include some more symlinks as given below:

$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libgnomevfs-2.so.0.2400.4 /usr/lib32/libgnomevfs-2.so.0
$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libgnome-2.so.0.3200.1 /usr/lib32/libgnome-2.so.0
$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libart_lgpl_2.so.2.3.21 /usr/lib32/libart_lgpl_2.so.2
$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libbonobo-2.so.0.0.0 /usr/lib32/libbonobo-2.so.0
$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libbonobo-activation.so.4.0.0 /usr/lib32/libbonobo-activation.so.4
$ sudo ln -s /usr/lib/i386-linux-gnu/i386-linux-gnu/libbonoboui-2.so.0.0.0 /usr/lib32/libbonoboui-2.so.0

If you get any error related to a library not found, just find its location and create a symbolic link within /usr/lib32 folder.

First time, run from the command line as a normal user as shown below: 

$ /opt/ibm/lotus/notes/notes-wrapper


setting locale …

setting notes environment …

starting notes …

`menu_proxy_module_load': /opt/ibm/lotus/notes/notes: undefined symbol: menu_proxy_module_load



(notes:3116): Gtk-WARNING **: Failed to load type module: (null)


`menu_proxy_module_load': /opt/ibm/lotus/notes/notes: undefined symbol: menu_proxy_module_load

(notes:3116): Gtk-WARNING **: Failed to load type module: (null)

ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
[03116:00002-4078790848] Error writing to process file pid.nbf, (other applications may be inappropriately accessing this file)SUT: OSSmartUpgradeInit: OSFileCreateDirectory: error: Cannot write or create file (file or disk is read-only)
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object '/opt/ibm/lotus/notes/libnotesgtkfix.so' from LD_PRELOAD cannot be preloaded: ignored.
[03116:00002-4078790848] 02/12/2013 03:17:01.49 PM NEMInit> The declaration for notation '{0}' is invalid! Errorcode=39054.


[03116:00002-4078790848]  Thread=[03116:00002-4078790848]
Stack base=0xFFE2A25C, Stack size = 2268 bytes
PANIC: DESK create failed
Stack base = 0xffe2a25c, Stack size = 4092 bytes 
Fatal Error signal = 0x0000000b PID/TID = 3116/-216176448 
2/12/2013 15:17:02  Running NSD
2/12/2013 15:17:14  Termination is in progress
2/12/2013 15:17:14  Too many crashes, restart disabled
2/12/2013 15:17:14  Terminating tasks
2/12/2013 15:17:19  Freeing resources
2/12/2013 15:17:19  Termination completed


First time, it gives error and lotus note crashes. Ignore the error related to 'libnotesgtkfix.so' not getting preloaded. 

Not able to write the pid.nbf file is the real problem here. It is related to NSD. It does not let you start the notes. It gives a warning and terminates the program.  Little search on google lead to this link.

To solve this, add the following lines to the file /home/lotus/notes/data/notes.ini 

DISABLE_SAVENSDCONFIG=1

and Change the line

NotesProgram=/opt/ibm/lotus/notes/notes 

to 

NotesProgram=/opt/ibm/lotus/notes/notes-wrapper


You might need root permission to edit this file even though it is in your home directory.  Now when you give the above command, it finally starts without any error.  You need to have your ID file in order to configure the Lotus Client.  I also use the modification as suggested in this link as well: 

sudo mv /opt/ibm/lotus/notes/openwith /opt/ibm/lotus/notes/openwith.bak
sudo ln -s /usr/bin/gnome-open /opt/ibm/lotus/notes/openwith


The home screen opens after you give the password. But I get an error : CWPCA4003W: Failed to load application from url:nrpc:/ ....  (see the screenshot below). It has to do with some template design problem. I tried refreshing the template, but it did not help.


I am also able to create a local replica and synchronize it with the server. But I am not able to view my mailbox.  I am able to send a mail though. I think the problem lies with updating / upgrading templates.

Update: I don't get any error when I run the command '$ /opt/ibm/lotus/notes/notes-wrapper'. Everything works seamlessly.Put your lotus note ID file into "~/lotus/notes/data/"  folder located in your home directory. 

Monday, January 14, 2013

A Simple Cmake Tutorial

There are many Cmake tutorials available on internet. Still I had to struggle a bit to get exactly the things that I wanted. So I believe that the tutorial given below will be useful for a beginner who is looking for a quick and simple introduction into how cmake works. So, here we go !!

We are looking into the aspect of building static libraries in this example. I have the following directory structure for my package:

Utilities
  |------------ CMakeLists.txt
  |------------ /include
  |                    |------------ memalloc.h
  |------------ /lib
  |                    |------------ libmemalloc.a
  |------------ /src
                       |-------------- /memalloc
                                              |-------- CMakeLists.txt
                                              |--------- memalloc.cpp

The main folder 'Utilities' has three folders, namely, include, lib and src. The include contains all header files at one place. 'lib' should contain the static library 'libmemalloc.a' once it is built and the 'src' folder contains another folder named 'memalloc' that contains the file 'memalloc.cpp' that is needed for building the static library.

For this case, I need two 'CMakeLists.txt' one inside the main folder 'Utilities' and one inside the 'memalloc' folder within 'src' folder. Infact, all folders that would potentially produce an output such as a library or an executable should contain on 'CMakeLists.txt' file inside it.

The 'CMakeLists.txt' file within the main folder looks something as shown below:


#Specify the version being used
cmake_minimum_required(VERSION 2.8)

#Name your project here
project(UTIL)

# compiler
SET(CMAKE_CXX_COMPILER "g++")

# cpp flags
SET(CMAKE_CXX_FLAGS "-g -Wall")

# various project names
# go on adding multiple names for different projects
SET(PROJECT_NAMES "memalloc")

foreach(PROJECT_NAME ${PROJECT_NAMES})

  # add sub-directories
  add_subdirectory("${CMAKE_SOURCE_DIR}/src/${PROJECT_NAME}"
    "${CMAKE_CURRENT_BINARY_DIR}/out/${PROJECT_NAME}")

endforeach(PROJECT_NAME ${PROJECT_NAMES})

   -----------------------------------
For every project, there is a corresponding folder inside the 'src' folder. The content of the 'CMakeLists.txt' file inside the 'memalloc' folder is given below:


#include headers from this folder
include_directories(${UTIL_SOURCE_DIR}/include)

# source files
set(MEMALLOC_SOURCES "memalloc.cpp")

# Build Library
add_library(memalloc STATIC ${MEMALLOC_SOURCES})

# install directory
install(TARGETS memalloc 
  ARCHIVE DESTINATION "${UTIL_SOURCE_DIR}/lib" )

--------------------------------------------


Now execute the following commands inside the 'Utilities' folder:

$ mkdir build
$ cd build

$ cmake ../
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/swagat/TCS/Programs/utilities/build

$ make
Scanning dependencies of target memalloc
[100%] Building CXX object out/memalloc/CMakeFiles/memalloc.dir/memalloc.cpp.o
Linking CXX static library libmemalloc.a
[100%] Built target memalloc

$ make install
[100%] Built target memalloc
Install the project...
-- Install configuration: ""
-- Installing: /home/swg/utilities/lib/libmemalloc.a

------------------------------

If you want to build libraries within a given folder, then your CMakeLists.txt file should contain the following lines:



set(MVG_SOURCE "mvg.cpp")
# Build Library
add_library(mvg STATIC ${MVG_SOURCE})
set_target_properties(mvg PROPERTIES ARCHIVE_OUTPUT_DIRECTORY
  ${CMAKE_SOURCE_DIR}/lib)   

The library will be built within the lib folder under the root directory. Hence, you do not have use make install command as you did above. Make install command should be used for putting the files at a different location within your system. 

-----------------------------------

In order to build binary inside a specific directory instead of the default location, use the following statements:


add_executable(testmvg ${MVG_TEST_SRC})
target_link_libraries(testmvg ${GLIBS} ${MVG_LIB} ${MEM_LIB} )           
set_target_properties(testmvg PROPERTIES RUNTIME_OUTPUT_DIRECTORY
  ${CMAKE_SOURCE_DIR}/bin)  

--------------------------------