I run bitcoin-qt all the time, so I set the browser to handle bitcoin: URI with bitcoin-qt. Unfortunately that causes a new instance to be started, which fails coz it fails to get a lock on the database.

What's the best way to do this?

I have 'server=1' to enable json-rpc access to bitcoin-qt.

Do I need to set the browser to handle these links with (say) bitcoin-cli? Or do I need to reconfigure the whole thing and run bitcoind as well?

  • I've duplicated the question on askubuntu as well: askubuntu.com/questions/1383898/bitcoin-uri-handling
    – harrym
    Dec 26, 2021 at 22:32
  • My question isn't about general URI handling tho. It's only bitcoin that I have the problem with. Even a mp4 link works when (say) vlc is already running. There's no issue with locking of course, but vlc has an option to run a new instance or start the video in the existing instance. That's why I'm here. It's very bitcoin specific, but I feel sure there's a 'best' way to handle it.
    – harrym
    Dec 27, 2021 at 1:50
  • 1
    Sorry I am unable to reproduce this. For me it does not try to run another bitcoin-qt instead its added as second address in send form: i.imgur.com/Isfcm89.png
    – user103136
    Dec 27, 2021 at 13:06
  • Ouch! That's what I want. What is that '-W1' in the title? Is that relevant? Mine is v22.0.0
    – harrym
    Dec 27, 2021 at 15:10
  • 1
    W1 is name of wallet. Even I tried it using Bitcoin Core 22.0 and Browser chromium in Ubuntu. Yes bitcoin-qt was already running when I clicked the bitcoin:address URI link.
    – user103136
    Dec 27, 2021 at 15:30

1 Answer 1


The simple answer is that when the parameter '%U' is missing from the 'Exec' line in a gnome/Ubuntu desktop file, the OS creates a new instance whenever the application is called (in this case by the browser on clicking a bitcoin: link on a web page). That fails when the application can only have one instance running (bitcoin-qt by itself handles the bitcoin database; no other app/instance can be simultaneously doing this).

The 'magic' is that when the '%U' parameter is present, the OS sends the request to the running app and, in this case, that appears as a bitcoin transaction in bitcoin-qt as expected.

Over the years of playing with bitcoin.desktop, i had managed to lose that parameter somehow. Very confusing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.