by Igor | May 26, 2015 | Linux
By default sudo remembers your password for 15 minutes.
Disable sudo timeout with this command:
sudo sh -c 'echo "\nDefaults timestamp_timeout=-1">>/etc/sudoers'
To re-enable sudo timeout use this command:
sudo sed -i "/Defaults timestamp_timeout=-1/d" /etc/sudoers
You can also change or disable sudo timeout with visudo.
sudo visudo
This opens an editor and points it to the sudoers file — Ubuntu defaults to nano, other systems use Vi.
To the defaults line, add :
timestamp_timeout=2
So it will look like this:
Defaults env_reset,timestamp_timeout=20
You might want to read the sudoers manual pages for additional information.
man sudoers
by Igor | May 25, 2015 | Linux
To remove LibreOffice on Ubuntu in terminal:
sudo apt-get remove libreoffice-core
If you also want to remove LibreOffice configuration files, use the purge switch:
sudo apt-get remove --purge libreoffice-core
That’s all folks!
by Igor | May 25, 2015 | Linux
Sed replace path with slash separators by using a different separator char.
If you have an environment variable that contains a slash like a path, let say
addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons
and you want to replace “addons_path = /home/netjunky/projects/odoo-dev/odoo/openerp/addons” with “addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons” using sed, usually you would try something like this
sudo sed -i ‘s/addons_path = */addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons/’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf
this raise an error like
sed: -i expression #1, char 9: unknown option to `s’
but if you try
sudo sed -i ‘s|addons_path = *|addons_path = /home/netjunky/projects/odoo-dev/odoo/custom/addons,|’ /home/netjunky/projects/odoo-dev/odoo/config/openerp-server.conf
It works!!!
You can use any other separator instead of |.
Recent Comments