Right after my login session, I would like Ubuntu to execute sudo apt-get update & apt-get dist-upgrade
, systematically / automatically. The terminal must be opened so that I can see the output of each of these executions. In particular, I want to be asked to type "y/n" due to the command apt-get dist-upgrade
. I don't want to have to type my password : thus, Ubuntu must use it as input of the sudo
execution instead of me.
The modifications involved must be independant of any upgrade and migration of Ubuntu.
Question
Which bash
file should I edit and in which way ?
Create a Startup-Application like descriped in the askuubuntu forum: here.
As command use
So in your case for example
Afterwards the terminal should be opened and you have to enter your password.
Edit: Use sh -c "..." to get both commands run and the sleep command to prevent the terminal of closing immediately (read is not working here?)