1

I would like to automate in a single command execution the installation of .run file (xampp in this case) which requires interactive answer from user:

Here is the manual installation:

sudo ./xampp-linux-1.8.3-5-installer.run
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.

----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want 
to install. Click Next when you are ready to continue.

XAMPP Core Files : **Y** (Cannot be edited)

XAMPP Developer Files [Y/n] :**n**

Is the selection above correct? [Y/n]: **Y**

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp
Press **[Enter]** to continue:

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: **Y**

----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.

 Installing
 0% ______________ 50% ______________ 100%
 #########################################

----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

How can I pre-set the following user entry from the beginning without user intervention? Y N Y [enter] Y

  • 2
    expect – HalosGhost Oct 27 '14 at 23:10
  • Thanks HalosGhost. Looks like expect is the right direction. – AJN Oct 28 '14 at 0:34
0

There is the mysterious

 --optionfile <optionfile>      Installation option file

with no documentation I could find (which would be combined with --mode unattended).

Otherwise, I've had some success with the hackish echo -e "YNY\nY" | <command> where <command> will be sudo ./xampp-linux-1.8.3-5-installer.run. (N.B. I've done the installing EMC Networker, not XAMPP.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.