.ashrc will run on every shell process. Perhaps your commands would be better served in .profile (once per login) or .xsession (upon start of X), or even /opt/bootlocal.sh (once per bootup backgrounded) or /opt/bootsync.sh ( once per bootup not backgrounded).