franglais125 / apt-update-indicator

Apt Update Indicator
https://extensions.gnome.org/extension/1139/apt-update-indicator/
GNU General Public License v3.0
44 stars 17 forks source link

How to show packages upgrade messages in terminal #2

Closed lucatrv closed 7 years ago

lucatrv commented 7 years ago

Hi, I always like to to read output messages from apt or aptitude when I upgrade packages. I tried to modify the "command to update packages" in "advanced settings" but could not how to open a terminal. I tried for instance to set "xterm -hold -e apt upgrade -y" or "gnome-terminal aptitude", but no terminal is opened. Is there any way to achieve this? For me the best option would be to open a terminal with "aptitude" and let me run the packages update manually. Thanks

franglais125 commented 7 years ago

Hi! I got your email too. I usually reply much faster, you juat caught me travelling and with limited connectivity... I'll look into this when I get back in two weeks. Sorry! Cheers

lucatrv commented 7 years ago

Hi, thanks for your answer and... sorry for bothering you so much [😊]

Have a good vacation for now!

Cheers


Da: franglais125 notifications@github.com Inviato: lunedì 26 dicembre 2016 03.36 A: franglais125/apt-update-indicator Cc: lucatrv; Author Oggetto: Re: [franglais125/apt-update-indicator] How to show packages upgrade messages in terminal (#2)

Hi! I got your email too. I usually reply much faster, you juat caught me travelling and with limited connectivity... I'll look into this when I get back in two weeks. Sorry! Cheers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/franglais125/apt-update-indicator/issues/2#issuecomment-269150620, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH_gUwWfxYDzFbLCLyVKeotk9KTzVLqRks5rLyhCgaJpZM4LRQjF.

jadenPete commented 7 years ago

Yeah I run Debian Testing and it is CRUCIAL that I see the bug lists and changelogs, as well as answer any prompts (not just answer yes every time) and read any messages before upgrading. It would be nice if this would open a terminal and still show the prompt, just to see if everything is alright. Sometimes, unstable packages fall into testing. I heard of one guy who was prompted to uninstall over 100+ packages.

franglais125 commented 7 years ago

@lucatrv @jadenPete Hey guys, so I finally took the time to look at this.

I implemented a first version of this here: https://github.com/franglais125/apt-update-indicator/tree/terminal_output I set the default to use gnome-terminal. You can fill the new option with xterm -e, no need for -hold as I don't exit after applying the updates.

Do you mind testing it? Suggestions are welcome. To install that branch, simply download and run "make install".

Cheers!

lucatrv commented 7 years ago

Seems to work to me! Only one doubt, once I applied the updates and pressed enter to close the terminal, I noticed that the package update notification icon was not reset immediately as I think it used to do previously, but after some time. Not sure though, and I need to wait for next updates available to double check... Cheers!

franglais125 commented 7 years ago

@lucatrv indeed, I tried to correct this problem, but so far no luck. In my tests, if you use xterm instead of gnome-terminal it works. i.e. replace gnome-terminal -x bash -c with xterm -e in the options.

The problem is that gnome-terminal sends an exit signal and, hence, the indicator immediately refreshes (before the updates even began...). Then I have no way of triggering a refresh when apt is actually done. Oh well... I kept gnome-terminal as the default as it's what I use, but xterm seems fine too.

franglais125 commented 7 years ago

FYI I implemented this in the master branch and submitted a new version to extensions.gnome.org

lucatrv commented 7 years ago

I confirm it works as expected with xterm. I do not have enough insight into this to help you out with gnome-terminal, but have you tried to discuss the issue here? https://wiki.gnome.org/Apps/Terminal/ReportingBugs

Until the issue with gnome-terminal is fixed I would change the default terminal command into something like this: "xterm -fa monospace -fs 10 -e"

franglais125 commented 7 years ago

@lucatrv thanks a lot for that suggestion, it looks pretty nice with those settings. I'd make it default, I'm just hesitant about xterm's behaviour under Wayland. Do you know if there are any hiccups? My quick test showed that xterm runs under xwayland.

lucatrv commented 7 years ago

After having used it for a few days, this is actually the best setting IMHO: "xterm -fa monospace -fs 11 -maximized -e" (monospace 11 is the default Gnome terminal font).

From what I know xterm should run fine under xwayland. If in future Debian defaults to Wayland, this setting could be quickly changed for instance to use wlterm: https://wayland.freedesktop.org/extras.html

franglais125 commented 7 years ago

Thanks, I think I will change the default to something like what you suggest.

As for wlterm, it seems it is not being maintained anymore - judging from its github page. Also, Debian doesn't seem to package it. If you happen to have more info on this (or something like this), I'd be interested! xterm will do it I guess, until something better takes its place.

I'll close this issue now! Thank you for your help and inputs.