Wednesday, June 29, 2011

change download directory in firefox automatically


1. go to /home/user/.mozilla/firefox/
2. find the directory ending in .default. This is your profile and will be a mix of letters and numbers.
3. Edit the file "prefs.js", adding the following line to the bottom:
user_pref("browser.download.dir", "/path/to/dir/ ");

Saturday, June 11, 2011

execute sudo commands in a bash script without password

visudo -f /etc/sudoers


user   ALL=(ALL) NOPASSWD: ALL
user   ALL=(ALL) NOPASSWD: /home/user/script