#!/bin/bash # This comes with no warranty whatsoever, bla bla bla. # Use at own risk. And may the force be with you. USER=some_user_name HOME_URL=http://www.opensourceschool.de xhost + sudo -u tux firefox --display ':0.0' & while [ ! -d /home/tux/.mozilla/firefox/ ] do sleep 1 done sleep 5 PROFILE_DIR="$(LOCALE= ls -l /home/$USER/.mozilla/firefox/ | grep default | grep -o '[a-z0-9\.]*default$')" echo "user_pref(\"browser.startup.homepage\", \"$HOME_URL\");' > /home/tux/.mozilla/firefox/$PROFILE_DIR/user.js sleep 1 killall firefox