I have access to my room mate's laptop and would like to play a practical joke on him.
It's easy enough to change the homepage to something like this (NSFW, two giraffes doing a little dance)
I think it would be fun to change his .bashrc so that every time he opens a terminal, it resets his firefox homepage. It's a childish, victimless prank. I know his boss, and he'd find the picture pretty hilarious, so there's definitely no issue.
In the user profile directory, there is a prefs.js and there is definitely a browser.startup.homepage there, but I'm not especially experienced with awk. I'm going to start playing around, but I was just wondering if anyone knew of a better way to do this. The biggest problem I have with this is the warning at the top of the prefs file
/* Do not edit this file.
*
* If you make changes to this file while the application is running,
* the changes will be overwritten when the application exits.
*
* To make a manual change to preferences, you can visit the URL about:config
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
*/
This indicates, to me, that most of the time this won't even work.
Edit
Here is what I've come up with
echo 'user_pref("browser.startup.homepage", "http://www.giraffes.org/amorous-giraffe.jpg");' >> ~/.mozilla/firefox/*.default/prefs.js
Edit 2:
For mac it would have to be something like
echo 'user_pref("browser.startup.homepage", "http://www.giraffes.org/amorous-giraffe.jpg");' >> ~/Library/'Application Support'/Firefox/Profiles/*.default/prefs.js
But since typically everyone has a different profile name, does anyone know if there's a default path? I tried tabbing on $fire and $FIRE and $m... but I guess there may not be an environmental variable set for easy pranking like what I have in mind
Edit: I didn't know you could do wildcards! Okay, this is totally ready for implementation. Just have to find an excuse to get on his computer and access Anandtech
It's easy enough to change the homepage to something like this (NSFW, two giraffes doing a little dance)
I think it would be fun to change his .bashrc so that every time he opens a terminal, it resets his firefox homepage. It's a childish, victimless prank. I know his boss, and he'd find the picture pretty hilarious, so there's definitely no issue.
In the user profile directory, there is a prefs.js and there is definitely a browser.startup.homepage there, but I'm not especially experienced with awk. I'm going to start playing around, but I was just wondering if anyone knew of a better way to do this. The biggest problem I have with this is the warning at the top of the prefs file
/* Do not edit this file.
*
* If you make changes to this file while the application is running,
* the changes will be overwritten when the application exits.
*
* To make a manual change to preferences, you can visit the URL about:config
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
*/
This indicates, to me, that most of the time this won't even work.
Edit
Here is what I've come up with
echo 'user_pref("browser.startup.homepage", "http://www.giraffes.org/amorous-giraffe.jpg");' >> ~/.mozilla/firefox/*.default/prefs.js
Edit 2:
For mac it would have to be something like
echo 'user_pref("browser.startup.homepage", "http://www.giraffes.org/amorous-giraffe.jpg");' >> ~/Library/'Application Support'/Firefox/Profiles/*.default/prefs.js
But since typically everyone has a different profile name, does anyone know if there's a default path? I tried tabbing on $fire and $FIRE and $m... but I guess there may not be an environmental variable set for easy pranking like what I have in mind
Edit: I didn't know you could do wildcards! Okay, this is totally ready for implementation. Just have to find an excuse to get on his computer and access Anandtech