Get ok message when installing deb with apt in terminal (from context menu or click)












3














I find apt in terminal as the best way to install a program from a deb package. As I prefer it to other gui tools, I want that in the context menu for deb files or as a launcher among applications in order to install the deb by executing it with (double) click.



In Kubuntu with Dolphin I have created a service menu to create that context menu, also a desktop file in ~/.local/share/applications to achieve the same action by executing the deb file.



The file ~/.local/share/kservices5/ServiceMenus/install-deb.desktop:



[Desktop Entry]

Actions=install
Icon=dialog-information
MimeType=application/vnd.debian.binary-package
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel


[Desktop Action install]
Exec=konsole --hold -e sudo apt install %f
Icon=dialog-information
Name=Install


The file ~/.local/share/applications/install_deb_term.desktop:



[Desktop Entry]
Name=Install in terminal with apt
Comment=Install deb files in terminal with apt
Exec=konsole --hold -e sudo apt install %f
Icon=gdebi
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;




All is well, excepting the fact that without the --hold argument in konsole the terminal closes to quickly (which is not good in case of error), while with that argument the terminal stays open with a rather inconclusive message like so:



 Setting up <whatever_program> ...


which is not what I expect if the installation went fine.





Can I get some "OK" message at the end of the installation process with apt? Maybe through a script containing the apt command?





Update:



Following comments by @DKBose: modifying ~/.bashrc as in this answer I get the desired notification popup with a command in terminal like



sudo apt install /path/to/deb; alert



but not with the line



Exec=konsole --hold -e sudo apt install %f; alert



in the files above (installation works, but no popup).



For the alert argument to work at all, installation of libnotify-bin was needed.










share|improve this question
























  • @DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
    – cipricus
    Dec 11 at 13:32








  • 1




    So, apt install ... && echo OK?
    – muru
    Dec 11 at 13:33






  • 1




    @DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
    – cipricus
    Dec 11 at 13:39








  • 1




    And is askubuntu.com/questions/748860/… of help?
    – DK Bose
    Dec 11 at 13:59






  • 1




    And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
    – DK Bose
    Dec 11 at 14:03
















3














I find apt in terminal as the best way to install a program from a deb package. As I prefer it to other gui tools, I want that in the context menu for deb files or as a launcher among applications in order to install the deb by executing it with (double) click.



In Kubuntu with Dolphin I have created a service menu to create that context menu, also a desktop file in ~/.local/share/applications to achieve the same action by executing the deb file.



The file ~/.local/share/kservices5/ServiceMenus/install-deb.desktop:



[Desktop Entry]

Actions=install
Icon=dialog-information
MimeType=application/vnd.debian.binary-package
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel


[Desktop Action install]
Exec=konsole --hold -e sudo apt install %f
Icon=dialog-information
Name=Install


The file ~/.local/share/applications/install_deb_term.desktop:



[Desktop Entry]
Name=Install in terminal with apt
Comment=Install deb files in terminal with apt
Exec=konsole --hold -e sudo apt install %f
Icon=gdebi
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;




All is well, excepting the fact that without the --hold argument in konsole the terminal closes to quickly (which is not good in case of error), while with that argument the terminal stays open with a rather inconclusive message like so:



 Setting up <whatever_program> ...


which is not what I expect if the installation went fine.





Can I get some "OK" message at the end of the installation process with apt? Maybe through a script containing the apt command?





Update:



Following comments by @DKBose: modifying ~/.bashrc as in this answer I get the desired notification popup with a command in terminal like



sudo apt install /path/to/deb; alert



but not with the line



Exec=konsole --hold -e sudo apt install %f; alert



in the files above (installation works, but no popup).



For the alert argument to work at all, installation of libnotify-bin was needed.










share|improve this question
























  • @DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
    – cipricus
    Dec 11 at 13:32








  • 1




    So, apt install ... && echo OK?
    – muru
    Dec 11 at 13:33






  • 1




    @DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
    – cipricus
    Dec 11 at 13:39








  • 1




    And is askubuntu.com/questions/748860/… of help?
    – DK Bose
    Dec 11 at 13:59






  • 1




    And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
    – DK Bose
    Dec 11 at 14:03














3












3








3


1





I find apt in terminal as the best way to install a program from a deb package. As I prefer it to other gui tools, I want that in the context menu for deb files or as a launcher among applications in order to install the deb by executing it with (double) click.



In Kubuntu with Dolphin I have created a service menu to create that context menu, also a desktop file in ~/.local/share/applications to achieve the same action by executing the deb file.



The file ~/.local/share/kservices5/ServiceMenus/install-deb.desktop:



[Desktop Entry]

Actions=install
Icon=dialog-information
MimeType=application/vnd.debian.binary-package
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel


[Desktop Action install]
Exec=konsole --hold -e sudo apt install %f
Icon=dialog-information
Name=Install


The file ~/.local/share/applications/install_deb_term.desktop:



[Desktop Entry]
Name=Install in terminal with apt
Comment=Install deb files in terminal with apt
Exec=konsole --hold -e sudo apt install %f
Icon=gdebi
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;




All is well, excepting the fact that without the --hold argument in konsole the terminal closes to quickly (which is not good in case of error), while with that argument the terminal stays open with a rather inconclusive message like so:



 Setting up <whatever_program> ...


which is not what I expect if the installation went fine.





Can I get some "OK" message at the end of the installation process with apt? Maybe through a script containing the apt command?





Update:



Following comments by @DKBose: modifying ~/.bashrc as in this answer I get the desired notification popup with a command in terminal like



sudo apt install /path/to/deb; alert



but not with the line



Exec=konsole --hold -e sudo apt install %f; alert



in the files above (installation works, but no popup).



For the alert argument to work at all, installation of libnotify-bin was needed.










share|improve this question















I find apt in terminal as the best way to install a program from a deb package. As I prefer it to other gui tools, I want that in the context menu for deb files or as a launcher among applications in order to install the deb by executing it with (double) click.



In Kubuntu with Dolphin I have created a service menu to create that context menu, also a desktop file in ~/.local/share/applications to achieve the same action by executing the deb file.



The file ~/.local/share/kservices5/ServiceMenus/install-deb.desktop:



[Desktop Entry]

Actions=install
Icon=dialog-information
MimeType=application/vnd.debian.binary-package
ServiceTypes=KonqPopupMenu/Plugin
Type=Service
X-KDE-Priority=TopLevel


[Desktop Action install]
Exec=konsole --hold -e sudo apt install %f
Icon=dialog-information
Name=Install


The file ~/.local/share/applications/install_deb_term.desktop:



[Desktop Entry]
Name=Install in terminal with apt
Comment=Install deb files in terminal with apt
Exec=konsole --hold -e sudo apt install %f
Icon=gdebi
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;HardwareSettings;X-GNOME-Settings-Panel;System;




All is well, excepting the fact that without the --hold argument in konsole the terminal closes to quickly (which is not good in case of error), while with that argument the terminal stays open with a rather inconclusive message like so:



 Setting up <whatever_program> ...


which is not what I expect if the installation went fine.





Can I get some "OK" message at the end of the installation process with apt? Maybe through a script containing the apt command?





Update:



Following comments by @DKBose: modifying ~/.bashrc as in this answer I get the desired notification popup with a command in terminal like



sudo apt install /path/to/deb; alert



but not with the line



Exec=konsole --hold -e sudo apt install %f; alert



in the files above (installation works, but no popup).



For the alert argument to work at all, installation of libnotify-bin was needed.







command-line apt package-management scripts






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 12 at 12:26

























asked Dec 11 at 13:24









cipricus

9,97046172338




9,97046172338












  • @DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
    – cipricus
    Dec 11 at 13:32








  • 1




    So, apt install ... && echo OK?
    – muru
    Dec 11 at 13:33






  • 1




    @DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
    – cipricus
    Dec 11 at 13:39








  • 1




    And is askubuntu.com/questions/748860/… of help?
    – DK Bose
    Dec 11 at 13:59






  • 1




    And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
    – DK Bose
    Dec 11 at 14:03


















  • @DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
    – cipricus
    Dec 11 at 13:32








  • 1




    So, apt install ... && echo OK?
    – muru
    Dec 11 at 13:33






  • 1




    @DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
    – cipricus
    Dec 11 at 13:39








  • 1




    And is askubuntu.com/questions/748860/… of help?
    – DK Bose
    Dec 11 at 13:59






  • 1




    And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
    – DK Bose
    Dec 11 at 14:03
















@DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
– cipricus
Dec 11 at 13:32






@DKBose - That one gives far less info. When missing dependencies it doesn't say which. Apt in terminal, like gdebi, shows a lot more info. I am trying to avoid gdebi in kde. A script should do it. I just need an ok message at the end, and even that just for the fun of it.
– cipricus
Dec 11 at 13:32






1




1




So, apt install ... && echo OK?
– muru
Dec 11 at 13:33




So, apt install ... && echo OK?
– muru
Dec 11 at 13:33




1




1




@DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
– cipricus
Dec 11 at 13:39






@DKBose - When missing dependencies cannot be installed (I just tested with an Exaile package in Kubuntu 18.04) they are not specified in qapt-deb-installer.
– cipricus
Dec 11 at 13:39






1




1




And is askubuntu.com/questions/748860/… of help?
– DK Bose
Dec 11 at 13:59




And is askubuntu.com/questions/748860/… of help?
– DK Bose
Dec 11 at 13:59




1




1




And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
– DK Bose
Dec 11 at 14:03




And this too: askubuntu.com/questions/749202/modify-the-alert-alias-in-bashrc
– DK Bose
Dec 11 at 14:03















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100044%2fget-ok-message-when-installing-deb-with-apt-in-terminal-from-context-menu-or-cl%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100044%2fget-ok-message-when-installing-deb-with-apt-in-terminal-from-context-menu-or-cl%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕