I want to create a simple script that a user can download, click on, and it will:
- request their root password through some sort of pop-up interface
- then sudo apt-get install a package to their computer
- and finally, run a few other commands to configure said software.
I know all the necessary bash in order to install and configure the software, my problem is in getting it to run with a single click. (Sort of like a windows .exe installer).
How might this be accomplished?
With Windows
.exe
s you always have to at least double click. In ubuntu, there is no way to single click either, other than a.deb
.One of the ways Ubuntu is more secure is because it doesn;t let things run. To allow something to execute, you have to run the command
chmod +x file/to/be/executable
or right click, and change the permissions.Because of this, there is no way to just double click and install.
Alternatives are to get the user to run the command themselves -
sudo apt-get install <package> && some-software-config-commands && another-config-command
etc.You could also package it in a
.deb
file, the equivilent of a.exe