Ubuntu 16.04 some applications take too long to start up

When I start up Ubuntu 16.04 some applications take too long to run the first time I open them, including Chrome and any PDF viewer. Others, like nautilus, start up immediately.

The first time I try to use a PDF viewer like okular, it takes too long to open. After it opens a PDF file for the first time, other files open quickly. Even if I close all and open some after a long time, it happens quickly.

How can I speed up these programs opening on the first run?


Solution 1:

I got the same problem out of the blue on my new notebook. After that I did a new ubuntu installation on a desktop machine, and the problem didn't happened there.

After some research, I found the solution here on the Arch Linux Forums

Close all your apps (like Chrome) and try running the following command on a terminal:

gnome-keyring-daemon &

After that, open Chrome again. It might ask for your account password again once. For me this solves the delay problem. Chrome and gnome-terminal are opening very fast now (< 1 sec delay instead 30 sec delay).

For you knowledge, Chrome was throwing the following error before this fix:

Gkr-Message: secret service operation failed: Did not receive a reply.
Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

I logged Chrome startup with strace, and this message alone took 25 seconds to appear. I guess this is a system message, not only for Chrome, because I was having the same issue with gnome-terminal starting up as well, and this fix solve that issue too.