Firefox is started automatically but it looks corrupted
On my home desktop I have autologin enabled, i.e. I don’t need to log in manually. Since I always need a terminal and a browser, “
konsole” and “
firefox” are started automatically. So I just switch on my machine and when I come back 5 minutes later, I’m ready to work.
However, sometimes Firefox doesn’t start normally. It looks strange: some colors are replaced with a different one, fonts are different, tooltips on tabs are plain black (text in tooltips is not visible), etc. If I restart Firefox, it becomes OK. I’m not sure what causes this problem, but my guess is that Firefox is started too quickly. I think it would require some libraries that are not yet loaded when Firefox is started. Then these pieces of software are loaded, that’s why Firefox gets OK after a restart.
The solution is simple. Don’t start Firefox immediately after the login. Wait some time until everything else is loaded, and start it after. Of course, we still want to start Firefox automatically, not manually. So we need a simple script:
#!/usr/bin/env bash # /home/jabba/bin/start_firefox.sh sleep 60 # Wait 60 seconds. You can play with this value. /usr/bin/firefox &
Then in the Startup Applications, remove “
firefox” and add this script instead. Provide the absolute path of the script. Make sure it’s executable. Here is a screenshot of the applications that are started automatically on my machine: