Forum › Forums › antiX-development › Development › GUI to “sudo apt install” a .deb file
- This topic has 5 replies, 2 voices, and was last updated May 19-9:58 am by PPC.
-
AuthorPosts
-
May 13, 2021 at 4:48 pm #59362Member
PPC
Since it seems that it’s more advisable to use “apt install” to install a .deb file, instead of gdebi, I’ve been playing with some ideas about how to provide a GUI for the average user that dislikes using the cli…
I had some ideas, one was a fully GUI way, when using it, no terminal window was displayed, but because no terminal was used, it installed using the “-y” flag, that can be dangerous…
So when back to the drawing board and used something more inspired in antiX-updater:
The user is presented with a window that displays some info about the .deb that’s about to be installed, and if the “ok” button is clicked, a terminal window pops open, displays the intire process (asking for user’s input when necessary) and the end, a pop up window informs that the process is done- like in antiX-updater it’s an half way- the user sees a nice GUI but also the terminal- but interaction with the terminal is minimal…TODO:
-If you folks think this tool is useful- I may work on the fully GUI interface and also
-Check if the package is already installed- if so ask the user if it should be uninstalled (purged); if it should be installed or quit
-Check the repo if the package is available there and warn the user that the user should install the package from the repo, for security reasons…The link to the beta script:
https://pastebin.com/raw/xR1bDg7K
P.
May 13, 2021 at 5:43 pm #59369Member
Xecure
::There is something wrong with the sudo check, I think. Also, the terminal window closes too fast when there is an error during installation.
I think a lot of users will prefer an interface, instead of a wall of text, so using grep, sed, etc to get important strings, like version and package description, to later display on a gui might work well.Will the gui be able to launch on ist own and let you select the .deb file to later install?
antiX Live system enthusiast.
General Live Boot Parameters for antiX.May 13, 2021 at 6:12 pm #59384MemberPPC
::Thanks for the input:
* I noticed no problem with sudo… What happens in your end?
* I’m not really sure how to “sudo apt install [debfile.deb]” without showing the users a terminal, unless I use “sudo apt install -y”, forcing the user to blinding accepts the automatic suggestions from apt…
* I never pictured the script having an interface to select .deb files, but I can add that- I always thought of this script as being associated with the .deb MIME file type… Users click a .deb file from their file managers, and the script runs, displays the info on the package on a window, and if the user chooses to proceed, asks for the sudo password in a GUI window using “gksu”, then installs the package (in this version of the script, using a terminal window, in the initial versions, running apt on the background, and then presents the user with a window informing the process was finished (in the original, fully non cli script, it showed a log that mirrors what the users would have seen if they used the terminal..)This is a very initial idea for a script – If I do further work on it depends on the feedback I get…
The fully GUI automated version of the .deb installer is here: https://pastebin.com/ND2JHUS4
May 13, 2021 at 9:32 pm #59393MemberPPC
::New version: https://pastebin.com/zyfJV4dE
Changes:
– following Xecure’s input, I trimmed down a lot the info window about the .deb package
– install only proceeds if user clicks “ok”
– the script now checks if the user is running it with another file (the .deb file), if not, it exitsI need a new name for this script, any ideas? (Not something like “yyy off line .deb package installer” 🙂 )
P.
PS: I probably won’t be developing this script in the next days, but I wanted to leave here something that was “production ready” despite being in a beta state, you can use it to install .deb packages form your file manager, running it with the script.
May 17, 2021 at 3:56 pm #59614MemberPPC
::Since this tiny script only needed a few teaks to be fully usable, here is the last beta version (for the assisted .deb file install) – https://pastebin.com/2y2AErj4
This is a simple GUI that displays the deb’s package name, version and description on a yad window. The user can click “- Uninstall” or ” + Install”- any option with pop up a gksu window that asks for the sudo password, then run the apropriate command ( sudo apt purge or sudo apt install) in a new terminal window. When the process finishes, a yad window pops open informing the user that the process is finished.
It’s like “antiX-updater” but for dealing with local (off-line) .deb packages.Since this script is only a shell for running the apt commands, it’s less than 70 lines and as secure as using the terminal- this is meant to be used to install .deb files from a file manager (like a simpler version of gdebi). the script’s provisional name is “Debinstaller”
P.
May 19, 2021 at 9:58 am #59762MemberPPC
::Everyone stayed silent about this script (except Xecure), but even so, I want to let you know that its latest version can always be downloaded here: https://gitlab.com/antix-contribs/contribs-goodies
The latest version added error handling, when something goes wrong when trying to install a .deb package, a yad warning window pops up, and the user can read the output on the terminal [in my tests this happened only once, when trying to install a .deb I knew probably was not compatible with antiX 19.X].
I’ve been playing with the idea of adding a funcionality to translate the description of the .deb file to the system’s language, that is doable, but it requires internet access and adds a dependency (the “trans” command).
For now, unless someone finds a bug that I missed, the script is ready for production use, and it can probably replace the gdebi GUI to install/uninstall .deb files directly from a file manager.P.
- This reply was modified 1 year, 11 months ago by PPC.
-
AuthorPosts
- You must be logged in to reply to this topic.