How to Install downloaded package?

Hello, new to Arch Linux and currently giving Garuda a try to see if it's going to service my need for work. I'm more accustom to Ubuntu/Mint but really wanted to give this a try as I've been hearing so much about it.

My question is this, I have a program I use for work called IBM iAccess which is just a fancy telnet program that communicates to an IBM i400 server. But I'm not well versed in the terminal commands on an Arch based distro to know how to install this software.

I have it downloaded to my desktop, and was able to get it to work without issue on other Linux distros using the $ sudo apt-get install ./install command when terminal is pointed to the appropriate folder.

What is the Garuda equivalent that will allow me to install this program from a folder on my desktop?

Thanks,

Josh

Hi there, welcome!
This could be
sudo pacman -U <filename>
But make sure it is a valid package for arch distros.
You can give a look at this useful table for better orienting with pacman package manager
https://wiki.archlinux.org/title/Pacman/Rosetta
In general, always search on the arch repositories and in the AUR, which needs an AUR helper for installing.

1 Like

What did you download? Is it a deb package or compressed archive?

Chances are it will have to manually installed. I wouldn't try installing it with pacman.

First, I want to recommend against installing an alien package. It can go sideways sometimes in terrible ways, plus it's next to impossible to maintain since pacman won't know about it. You should check on the AUR to see if someone packaged it up there.

Second, I am assuming it was a .deb package since you mentioned using apt.

That said: There is a dpkg for arch.

2 Likes

Thanks for the response and the welcome! I did try sudo pacman -U and got an error that it's an unrecognized archive format. I'm going to assume this isn't a program that is compatible with Arch. :frowning:

You can if you want but it would be better to share some more information so we can try to help.

Then it is probably a shell script, not a deb package :slight_smile:

Is it literally called install?

1 Like

Nope, it is likely a shell script. This is one of the common ways to distribute an all-distro application.

To install it, run it. "sh <script name>"

1 Like

Yes, it's called install_acs_64 I'm trying to find my way around this forum to see if I can post pictures so you all can better assist haha.

1 Like

That sounds like an installer script. It should be a text file. Without seeing the text inside it is impossible to know what it does or if it is safe to use with Garuda/Arch.

I would extremely hesitant to run a script without checking what it does first. It could be anything. It could assume you are running a certain distro or destroy something you don't want destroyed.

3 Likes

I use the software daily, and if it crashes this install I'm not too upset as I installed it on his laptop less than an hour ago. Just getting my feet wet as of today!

I'll give sh a try.

1 Like

p.s. I love hearing this, thanks! The Garuda folks are awesome.

2 Likes

I don't mind uploaded the text file, is there a safe way to do it?

I've found this in the AUR
https://aur.archlinux.org/packages/iacs/
But in this case I wouldn't even try, since you see
Last Updated: 2019-11-14 20:24

1 Like

That looks like it!

But looks to be broken? :frowning:

Not broken, no more maintained...?

If you are saying you can share it. Just pastebin the text inside.

Good idea.


#!/bin/bash
# Description:
# This script will install IBM i Access Client Solutions in the /opt/ibm/iAccessClientSolutions folder 
#
# Usage: ./install_acs_64
#


[email protected]
args_length=$#
arg1=$1
prefix_arg1=${arg1:0:9}
suffix_arg1=${arg1:9}
printhelp="no"
default_noparms="no"
reset_start_over="no"
quiet_mode="no"
exclude_functions=""
view_all_splf="no"
exclude_length=0
install_type_shared="no"
install_type_preset="no"
declare source
declare target
declare target_desktop
declare source_AcsConfig
declare target_AcsConfig


# Print the help text
function print_help {
dialog --backtitle "IBM i Access Client Solutions" --msgbox '

Name: install_acs_64

Syntax:
install_acs_64 [/Exclude=<function1,function2,...> | /Reset | /Q]

Description:
Installs or upgrades IBM i Access Client Solutions (ACS).

If no parameters are specified:
- an existing installation will be upgraded.
- and this is a new installation, the user will be prompted and allowed to customize the installation.

Note: If the source location of the product files was already customized using the /AdminConfig parameter, that configuration will be used for new installations and upgrades.

Optional parameters may be specified:

/Exclude=<function1,function2,...>
- specified functions will be excluded.
See /PLUGIN=RESTRICT in GettingStarted for a valid list of functions which can be excluded.
Note: This parameter will be ignored if the administrator has used /AdminConfig.

/Reset
A new installation will overwrite the current installation and will be customized based on user input.
Note: This parameter will be ignored if the administrator has used /AdminConfig.

/Q
Do not display installation completion message.
' 15 70

}


function ask_user_questions {
  echo "Asking about functions to be installed." >> $HOME/IBM/install_acs_log.txt


dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you want to use 5250 emulation?' 7 50
emulation1_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you want to view printer output?' 7 50
print_ans=$?

if [ 0 == $print_ans ]; then    // 0==yes  1==no
  dialog --backtitle "IBM i Access Client Solutions" --defaultno --yesno 'Is it ok to view printer output for all users?' 7 50
  all_output=$?
  if [ 0 == $all_output ]; then  // 0==yes  1==no
    view_all_splf="yes"
  fi
fi

dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you want to use the Integrated File System?' 7 50
ifs_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you want to transfer data to/from spreadsheets?' 7 50
dt_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you want to use Navigator for i?' 7 50
inav_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --yesno 'Do you need to manage SSL/TLS certificates?' 7 50
key_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --defaultno --yesno 'Do you need to use Database tools?' 7 50
db2tools_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --defaultno --yesno 'Do you need to use an HMC or LAN console?' 7 50
console_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --defaultno --yesno 'Do you need to issue remote commands? ' 7 50
rmtcmd_ans=$?
dialog --backtitle "IBM i Access Client Solutions" --defaultno --yesno 'Do you need to use the System Debugger?' 7 50
debug_ans=$?
          
  if [ 1 == $emulation1_ans ]; then // 0==yes  1==no
    exclude_functions=$exclude_functions"emulator,"
  fi
  if [ 1 == $print_ans ]; then
    exclude_functions=$exclude_functions"splf,"
  fi
  if [ 1 == $ifs_ans ]; then
    exclude_functions=$exclude_functions"ifs,"
  fi
  if [ 1 == $dt_ans ]; then
    exclude_functions=$exclude_functions"dataxfer,"
  fi
  if [ 1 == $inav_ans ]; then
    exclude_functions=$exclude_functions"l1cplugin,"
  fi
  if [ 1 == $key_ans ]; then
    exclude_functions=$exclude_functions"keyman,"
  fi
  if [ 1 == $db2tools_ans ]; then
    exclude_functions=$exclude_functions"database,"
  fi
  if [ 1 == $console_ans ]; then
    exclude_functions=$exclude_functions"opconsole,hwconsole,"
  fi
  if [ 1 == $rmtcmd_ans ]; then
    exclude_functions=$exclude_functions"rmtcmd,"
  fi
  if [ 1 == $debug_ans ]; then
    exclude_functions=$exclude_functions"debugger,"
  fi
}

function copyProductFiles {
  echo "Copying product files" >> $HOME/IBM/install_acs_log.txt
  
  cp -Rpf "$source/Linux_Application/acslaunch_64.desktop" "$target_desktop"
  if [ ! -d $target ]; then
    mkdir -p $target
  fi

  cp -Rpf "$source/Documentation" "$target"
  cp -Rpf "$source/Fonts" "$target"
  cp -Rpf "$source/Icons" "$target"
  # Do not copy the install scripts
  #cp -Rpf "$source/Mac_Application" "$target"
  #cp -Rpf "$source/Linux_Application" "$target"
  #cp -Rpf "$source/Windows_Application" "$target"
  cp -Rpf "$source/Start_Programs" "$target"
  cp -Rpf "$source/acsbundle.jar" "$target"

  if [ -e "$source/acs_bak.zip" ]; then
    cp -Rpf "$source/acs_bak.zip" "$target"
  fi

  if [ "yes" == $1 ]; then
    # The p in the following command sometimes causes the following message:
    # "cp: chflags: /Application/IBM i Access Client Solutions.app/AcsConfig.properties: Operation not permitted"
    # The message only seems to occur when copying an unmodified AcsConfig.properties file from a remote source location.
    # However, all testing indicates the file does get copied along with the timestamp from the source location.
    # If we remove the p, then the timestamp is not taken from the source file and gets changed to be current time.
    # The message can be safely ignored.
    cp -Rpf "$source_AcsConfig" "$target"
    echo "Copied AcsConfig.properties" >> $HOME/IBM/install_acs_log.txt
  else
    echo "Did not copy AcsConfig.properties" >> $HOME/IBM/install_acs_log.txt
  fi
  chmod 555 "$target/Start_Programs/Linux_i386-32/acslaunch_linux-32"
  chmod 555 "$target/Start_Programs/Linux_x86-64/acslaunch_linux-64"
}


function customize_local_install {
  echo "Customizing local installation" >> $HOME/IBM/install_acs_log.txt
  copyProductFiles yes
  ask_user_questions
  exclude_length=${#exclude_functions}
  if [ $exclude_length -eq 0 ]; then
    echo "Wrote AcsConfig.properties with no functions excluded" >> $HOME/IBM/install_acs_log.txt
  else
    echo " " >> "$target_AcsConfig"
    echo "# ——— $str_date ——— " >> "$target_AcsConfig"
    echo "com.ibm.iaccess.ExcludeComps=$exclude_functions" >> "$target_AcsConfig"
    echo "Wrote AcsConfig.properties and excluded: $exclude_functions" >> $HOME/IBM/install_acs_log.txt
  fi
  if [ "no" == $view_all_splf ]; then
    echo " " >> "$target_AcsConfig"
    echo "# ——— $str_date ——— " >> "$target_AcsConfig"
    echo "com.ibm.iaccess.splf.FilterRestricted=true" >> "$target_AcsConfig"
    echo "Wrote AcsConfig.properties com.ibm.iaccess.splf.FilterRestricted=true" >> $HOME/IBM/install_acs_log.txt
  fi

}


# Begin Main
#
if [ $EUID -ne 0 ]; then
  echo " "
  echo "This command must run with root authority."
  echo "Try using:"
  echo "   sudo ./install_acs_64"
  echo " "
  exit
fi

which dialog > /dev/null
result=$?
if [ $result -gt 0 ]; then
  echo " "
  echo "The dialog package needs to be installed in order to use install_acs_32"
  echo "Example 1: sudo apt-get install dialog"
  echo "Example 2: sudo yum install dialog"
  echo " "
  exit
fi


# Verify parameters
if [ $args_length -gt 1 ]; then
  print_help
  exit
fi
if [ $args_length -eq 1 ]; then
  if [[ ($prefix_arg1 != /Exclude=) && ($prefix_arg1 != /exclude=) && ($arg1 != /Reset) && ($arg1 != /reset) && ($arg1 != /Q) && ($arg1 != /q) ]]; then
    print_help
    exit
  fi 
fi

#Create the IBM directory for the install log
if [ ! -d $HOME/IBM ]; then
  mkdir $HOME/IBM
  chown $SUDO_USER $HOME/IBM

  touch $HOME/IBM/install_acs_log.txt
  chown $SUDO_USER $HOME/IBM/install_acs_log.txt
fi


str_date=`date`
echo "BEGIN =============== $str_date =============== BEGIN" >> $HOME/IBM/install_acs_log.txt

if [ $args_length -eq 0 ]; then
   default_noparms="yes"
   echo "No args specified" >> $HOME/IBM/install_acs_log.txt
else
   echo "Command-line args: $args" >> $HOME/IBM/install_acs_log.txt
   if [[ ($prefix_arg1 == /Exclude=) || ($prefix_arg1 == /exclude=) ]]; then
     exclude_length=${#suffix_arg1}
     if [ $exclude_length -gt 0 ]; then
       exclude_functions=$suffix_arg1
     else
       default_noparms="yes"
     fi
   elif [[ ($arg1 == /Reset) || ($arg1 == /reset) ]]; then
     reset_start_over="yes"
   elif [[ ($arg1 == /Q) || ($arg1 == /q) ]]; then
     quiet_mode="yes"
     default_noparms="yes"
   else
     dummy=do_nothing
   fi
fi


# cd to the directory where this script exists
cd "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "script: ${0}" >> $HOME/IBM/install_acs_log.txt

source=`pwd`/..
target_desktop="/usr/share/applications/IBM i Access Client Solutions.desktop"
target="/opt/ibm/iAccessClientSolutions"
echo "source: $source" >> $HOME/IBM/install_acs_log.txt
echo "InstallPath: $target" >> $HOME/IBM/install_acs_log.txt

source_AcsConfig="$source/AcsConfig.properties"
target_AcsConfig="$target/AcsConfig.properties"


# check for install_type_shared or install_type_preset
if [ -e "$source_AcsConfig" ]; then
  count=`grep -c "com.ibm.iaccess.InstallType=shared" "$source_AcsConfig"`
  if [ $count -gt 0 ]; then
    echo "com.ibm.iaccess.InstallType=shared was found" >> $HOME/IBM/install_acs_log.txt
    install_type_share="yes"
    echo "install_type_share is treated like install_type_preset on Linux" >> $HOME/IBM/install_acs_log.txt
    install_type_preset="yes"
  fi
  count=`grep -c "com.ibm.iaccess.InstallType=preset" "$source_AcsConfig"`
  if [ $count -gt 0 ]; then
    echo "com.ibm.iaccess.InstallType=preset was found" >> $HOME/IBM/install_acs_log.txt
    install_type_preset="yes"
  fi
fi


if [ "yes" == $install_type_preset ]; then
  echo "Install: preset functions by AdminConfig" >> $HOME/IBM/install_acs_log.txt
  if [ "no" == $default_noparms ]; then
    echo "$args ignored because Admin preset product functions" >> $HOME/IBM/install_acs_log.txt
  fi
  copyProductFiles yes
  echo "Install: Copied product files and configuration set by admin" >> $HOME/IBM/install_acs_log.txt
elif [ "yes" == $default_noparms ]; then
  if [ -e "$target_AcsConfig" ]; then
    # This is assumed to be the upgrade path
    echo "Upgrading existing installation" >> $HOME/IBM/install_acs_log.txt
    copyProductFiles no
    echo "Install: Did not write AcsConfig.properties" >> $HOME/IBM/install_acs_log.txt
  else
    # AcsConfig.properties does not exist at target.  We assume never been installed.
    customize_local_install
  fi
elif [ $exclude_length -gt 0 ]; then
  # Excluded functions were specified
  if [ -e "$target_AcsConfig" ]; then
    # Do not overlay AcsConfig.properties
    copyProductFiles no
  else
    copyProductFiles yes
  fi
  echo " " >> "$target_AcsConfig"
  echo "# ——— $str_date ———" >> "$target_AcsConfig"
  echo "com.ibm.iaccess.ExcludeComps=$exclude_functions" >> "$target_AcsConfig"
  echo "Excluded functions: $exclude_functions" >> $HOME/IBM/install_acs_log.txt 
elif [ "yes" == $reset_start_over ]; then
  echo "User requested a configuration reset" >> $HOME/IBM/install_acs_log.txt 
  customize_local_install
fi


echo " "
echo " Installation completed."
echo " You may exit this terminal window."
echo " "
echo "END ================= `date` ================= END" >> $HOME/IBM/install_acs_log.txt
if [ "no" == $quiet_mode ]; then
   dialog --backtitle "IBM i Access Client Solutions" --msgbox 'IBM i Access Client Solutions installation has finished.' 7 50
fi