TomTomSportsConnect icon indicating copy to clipboard operation
TomTomSportsConnect copied to clipboard

[enhancement] / [discussion] Opening synchronized activity in web browser after sync

Open railfox opened this issue 6 years ago • 1 comments

It's intended by the tomtom app to open the last acitivty on tomtom's web based platform at the end of sync.

This fails with the containerized TomTomSportsConnect - you see log entries on standard output like: virtual bool QGenericUnixServices::openUrl(const QUrl&): Unable to detect a web browser to launch 'https://mysports.tomtom.com/app/activity/295280437'

To fix this, it would be possible to install a graphical browser to run inside the image - but I guess this will lead to an unneeded bloating image for a quite unimportant feature.

I've tried to use the host system's browser. Of course it is not possible to call host system's applications from within containers, but you can use the logging output.

With ./TomTomSportsConnect | grep -o "https://mysports.tomtom.com/app/activity/[[:digit:]]*" | xargs xdg-open I've got the result, that my standard browser was opened with the last acitivity - but this may not be the best way:

  • package xdg-utils needs to be installed
  • there's no error handling if there's no new activity to sync

Is there any better suggestion?

Regards, Martin

railfox avatar Sep 22 '18 22:09 railfox

Hi @railfox, I understand your idea/request but I also agree with you that providing a web browser inside the container is not a good idea (not an option).

Your approach is not bad at all. We might be able to overcome xdg-utils need and TomTomSportsConnect bash script can decide whether a web browser should be launched based on container' STDOUT (like you showed with pipes).

Let me think.

Cheers, Paulo A. Silva

PauloASilva avatar Sep 26 '18 22:09 PauloASilva