Wednesday, July 29, 2009

Install CmapTools in chroot for LocalApp

This is a big accomplishment. Thanks to Ahmuck, ace_suares, mhall119|work and ogra, not to mention Tom Marble and 1 blog on the internet that I already lost track of. Here are the directions to install CmapTools on a chroot so that it works as a local app.

(First, move the .bin file to chroot root: /opt/ltsp/i386/ then make a directory there at /opt/ltsp/i386/IHMC_CmapTools.  My permissions for that directory are 777)

Make X session work, type in terminal:
  1. xhost +
  2. sudo su
  3. export DISPLAY=:0
Then to make it work for root, too.
  1. This needs to be installed where the root that will be running the shell script is located--the root in the chroot. Use this, still as root)
  2. cp /home/dgroos/.Xauthority /opt/ltsp/i386/root
  3. cp /home/dgroos/.Xauthority ~/
  4. exit (gets you out of the root account--this is important!)
Now you have to do some stuff to be able to install it in chroot--this is dangerous magic...



  1. sudo mount -t proc proc /opt/ltsp/i386/proc
    sudo mount --bind /tmp /opt/ltsp/i386/tmp
    sudo mount --bind /dev /opt/ltsp/i386/dev
    sudo mount --bind /home /opt/ltsp/i386/home
    sudo cp /opt/ltsp/i386/etc/passwd /opt/ltsp/i386/etc/passwd.bak
    sudo cp /opt/ltsp/i386/etc/group /opt/ltsp/i386/etc/group.bak
    sudo cp /etc/passwd /etc/group /opt/ltsp/i386/etc
    sudo chroot /opt/ltsp/i386/ su $SUDO_USER



and now you will be able to X-session in the chroot to hearts content. To install cmaptools I had already (before starting any command on this page) moved the cmaptools bin file into the chroot root folder (but can be done afterwards as well). So, I cd'ed into that folder and ran this command to initiate the install script: sh LinuxCmapTools_v5.03_04-07-09.bin. It launched the graphical user interface, I selected the "advanced" install and when it got to the page asking where to install it I typed in: /usr/lib/IHMC_CmapTools which remember is from the chroot's perspective. I also assigned the logs to go into /var/logs or something, but maybe that was wrong--I'll find out.

MAKE SURE YOU DO THIS WHEN YOU ARE DONE INSTALLING--DON'T FORGET.



  1. exit (in other words, you've got to get out of being the root user)
    sudo mv /opt/ltsp/i386/etc/passwd.bak /opt/ltsp/i386/etc/passwd
    sudo mv /opt/ltsp/i386/etc/group.bak /opt/ltsp/i386/etc/group
    sudo umount /opt/ltsp/i386/home
    sudo umount /opt/ltsp/i386/dev
    sudo umount /opt/ltsp/i386/tmp
    sudo umount /opt/ltsp/i386/proc
    



Cool, Ay?

Finally, I added both CmapTools and /usr/lib/IHMC_CmapTools/bin/CmapTools in the lts.conf file with sudo gedit /var/lib/tftpboot/ltsp/i386/lts.conf. Finally, I rebuilt the image with sudo ltsp-update-image to get those changes I had done into the image that gets loaded into the thin client at boot time.

Next step is to get it to boot as a local app!
And typing this into terminal did it...
  • ltsp-localapps /usr/lib/IHMC_CmapTools/bin/CmapTools
or... put this in for the command in a launcher' properties:
  • xprop -root -f LTSP_COMMAND 8s -set LTSP_COMMAND "sh /usr/lib/IHMC_CmapTools/bin/CmapTools"

:)

Here were install options as shown in install log:
User Interactions
-----------------


#Installation Type
#-----------------
CHOSEN_FEATURE_LIST=Advance,Applica
CHOSEN_INSTALL_FEATURE_LIST=Advance,Applica
CHOSEN_INSTALL_SET=Advanced

#Choose Install Folder
#---------------------
USER_INSTALL_DIR=/usr/lib/IHMC_CmapTools

#Choose Link Folder
#------------------
USER_SHORTCUTS=Do_Not_Install

#Configuration
#-------------
AUTOMATIC=0
ONDEMAND=1
KEEP_USERIDS=1
DELETE_USERIDS=0
USER_PROFILE=
USER_MYCMAPS=
AUTO_RECORDER=1
NO_AUTO_RECORDER=0
STOP_RECORDER=1
NO_STOP_RECORDER=0
pki.enable=false
pki.enable_1=
pki.enable_2=No
pki.enable_BOOLEAN_1=0
pki.enable_BOOLEAN_2=1
LOGS=1
NO_LOGS=0
LOGS_PATH=%h/CmapToolsLogs
LOGS_PREFIX=CmapTools
LOGS_SIZE=5242880
LOGS_NO=3



Did get this error at very bottom of log (non-fatal):
Status: ERROR
                          Additional Notes: ERROR - java.lang.NullPointerException

No comments:

Post a Comment