113 lines
2.9 KiB
Bash
113 lines
2.9 KiB
Bash
#!/bin/bash
|
|
#### Install Pre-requisites ####
|
|
##
|
|
##
|
|
## With Fonts ##
|
|
#apt-get install dialog make automake autoconf libtool glibc* alien odbcinst unixodbc libmotif-common msttcorefonts ttf-mscorefonts-installer numlockx -y
|
|
## Without Fonts ##
|
|
apt-get install dialog make automake autoconf libtool glibc* alien odbcinst unixodbc libmotif-common numlockx -y
|
|
|
|
|
|
#### Java ####
|
|
##
|
|
##
|
|
echo "Please wait while we prepare to install Java (1.8.0_381)."
|
|
sleep 5
|
|
##
|
|
##
|
|
## create destination directory ##
|
|
mkdir /usr/java
|
|
##
|
|
##
|
|
### unzip files ###
|
|
tar xzvf /home/terminal/Desktop/temp/jre-8u381-linux-x64.tar.gz -C /usr/java/
|
|
##
|
|
##
|
|
### add $JAVA_HOME variable to OS Environment ###
|
|
#echo "JAVA_HOME=/usr/java/jre1.8.0_111" >> /etc/environment
|
|
echo "JAVA_HOME=/usr/java/jre1.8.0_381" >> /etc/environment
|
|
##
|
|
##
|
|
### Set OS to use new variable ###
|
|
source /etc/environment
|
|
|
|
|
|
#### ODBC ####
|
|
##
|
|
##
|
|
echo "Please wait while we prepare to install ODBC."
|
|
sleep 5
|
|
#
|
|
### unzip files ###
|
|
##
|
|
##
|
|
tar xzvf unixODBC-2.3.12.tar.gz
|
|
#
|
|
### enter directory ###
|
|
cd unixODBC-2.3.12
|
|
#
|
|
### compile and install ###
|
|
./configure
|
|
make
|
|
make install
|
|
#
|
|
### remove installer files ###
|
|
cd /home/terminal/Desktop/temp
|
|
rm /home/terminal/Desktop/temp/unixODBC-2.3.12 -rf
|
|
|
|
|
|
#### iAccess Emulator ####
|
|
echo "Please wait while we prepare to install the iAccess Emulator."
|
|
##
|
|
##
|
|
## unzip files ##
|
|
unzip /home/terminal/Desktop/temp/IBMiAccess_v1r9 -d /home/terminal/Desktop/temp/IBMiAccess_v1r9
|
|
##
|
|
##
|
|
## install 64-bit version of software ##
|
|
./IBMiAccess_v1r9/Linux_Application/install_acs_64
|
|
##
|
|
##
|
|
## delete installer files ##
|
|
rm /home/terminal/Desktop/temp/IBMiAccess_v1r9 -rf
|
|
|
|
|
|
#### Disable F11 for Fullscreen ####
|
|
#echo "Attempting to disable F11 for fullscreen"
|
|
|
|
|
|
### Write and update configuration ###
|
|
## Swap Function Mode. 3 is default ##
|
|
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
|
|
|
|
### Disable F11 - Full Screen
|
|
if [ -f /home/terminal/.config/openbox/rc.xml]; then
|
|
sed -i -e 's/ToggleFullscreen//g' /home/terminal/.config/openbox/rc.xml
|
|
openbox --reconfigure
|
|
else
|
|
cp /home/terminal/Desktop/temp/rc.xml /home/terminal/.config/openbox/rc.xml
|
|
chown terminal:terminal /home/terminal/.config/openbox/rc.xml
|
|
openbox --reconfigure
|
|
fi
|
|
|
|
|
|
### Copying configuration templates to locations ###
|
|
echo "Copying configuration files to the correct places"
|
|
|
|
cp default.hod /home/terminal/Desktop/default.hod
|
|
chown terminal:terminal /home/terminal/Desktop/default.hod
|
|
|
|
### Add autostart file for the IBM software ###
|
|
cp AS400-desktop /home/terminal/.config/autostart/AS400.desktop
|
|
chown terminal:terminal /home/terminal/.config/autostart/AS400.desktop
|
|
|
|
# for Ubuntu 18
|
|
#cp config-lxsession-Lubuntu-autostart /home/terminal/.config/lxsession/Lubuntu/autostart
|
|
# for Ubuntu 24
|
|
cp as400-desktop /home/terminal/.config/autostart/AS400.desktop
|
|
|
|
### Follow up instructions ###
|
|
echo "To finish the install, do the following."
|
|
echo " - Auto hide the taskbar"
|
|
echo " - Reboot"
|