You are not logged in.

#1 2017-09-17 11:44:03

Xaver
Member
Registered: 2017-07-26
Posts: 28

Menu item for system upgrades

For more comfortable system upgrades I have created a menu item with the following command:
lxterminal -e sudo -H pacman -Syu

It works fine: lxterminal opens and asks for the password. Then the upgrade is run and, if there are no problems, the lxterminal window closes automatically.
BUT: I would prefer, if lxterminal would stay open afterwards, so that I could see, wether everything has worked fine.

Does anyone have an idea, how to modify the command, so that lxterminal does not close, when the upgrade is finished?

Offline

#2 2017-09-17 11:56:39

peter
Member
Registered: 2016-02-16
Posts: 17

Re: Menu item for system upgrades

lxterminal --geometry=80x25 --title=Updating -e bash -c "sudo -H pacman -Syu; echo --Enter to Close Terminal--; read line" 

Offline

#3 2017-09-17 12:05:53

Mr Green
Administrator
Registered: 2010-11-07
Posts: 6,920

Re: Menu item for system upgrades

What about adding a & at end of line.....?

I simply added an alias to .bashrc called update


Comments, suggestions please feel free to contact me mrgreen(at)archbang(dot)org

Offline

#4 2017-09-17 13:19:58

Xaver
Member
Registered: 2017-07-26
Posts: 28

Re: Menu item for system upgrades

@ Peter
Thank you. Your command does exactly what I want.

-----------------------
@ Mr. Green
Thanks, but adding a '&' does not help.

I have also tried a .bashrc alias:  alias upgrade='sudo pacman -Syu'
and defined a menu command:  lxterminal -e upgrade
Then I only get an empty lxterminal window.

Which alias have you added? Which menu command is needed for that alias?

Last edited by Xaver (2017-09-17 13:48:38)

Offline

#5 2017-09-17 16:58:56

eric
Member
Registered: 2015-07-10
Posts: 240
Website

Re: Menu item for system upgrades

alias upgrade='lxterminal -e "sudo pacman -Syu; echo --Enter to Close Terminal--; read line"'

or a little more userful :

alias paccmd='f(){ lxterminal -x "sudo pacman -$@; echo tape enter to close;  read enter;"; unset -f f; };f'

then

# paccmd Syu
# paccmd Ss archlinux

Obarun : free to control your system

Offline

#6 2017-09-18 01:48:20

Xaver
Member
Registered: 2017-07-26
Posts: 28

Re: Menu item for system upgrades

@ Eric
Thank you.
Both alias do not work for me. Maybe I use the wrong commands for the menu item.
Which commands do you use in obmenu or menu.xml ?

Offline

#7 2017-09-18 03:16:51

eric
Member
Registered: 2015-07-10
Posts: 240
Website

Re: Menu item for system upgrades

arf, sorry i didn't realize that your tried to employ menu item lol.
so peter has answer you already


Obarun : free to control your system

Offline

Board footer

Powered by FluxBB