Load Chrome and Thunderbird on startup

Started 6th September 2024
It is a bit tedious to manually run Chrome and Thunderbird every time I turn my Ubuntu OS, computer on. There's a Startup Applications Preferences application that allows programs to be automatically loaded on machine boot.

The snag is that things like Chrome and Thunderbird don't like being run before the network is up and running. Typically I turn on the network and the computer at the same time.

I devised this string (probably copied from somewhere on the 'net) which pings until it succeeds and only then runs Chrome:

sh -c "until ping -c1 -q 8.8.8.8 > /dev/null 2>&1 ; do sleep 2s ; done && /usr/bin/google-chrome-stable %U"

It is entered in the Command field of Startup Applications Preferences.

This is the Thunderbird equivalent:

sh -c "until ping -c1 -q 8.8.8.8 > /dev/null 2>&1 ; do sleep 2s ; done && thunderbird %u"

Mostly these work well, however once in a while, audio fails to start correctly (MSI Modern-15-B12M), and it is then necessary to restart it with:

pulseaudio -k && sudo alsa force-reload

Click to email a comment
Click to return to index

Page last modified on September 08, 2024, at 10:25 AM
Powered by PmWiki