-7

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 another app (say bitcoin-cli) which talks to bit-qt via rpc?

Or do I need to reconfigure the whole thing and run bitcoind as the server with the running bitcoin-qt talking to it via rpc and the browser-started bitcoin-qt doing the same?

Perhaps the only answer is to shut bitcoin-qt down before clicking the bitcoin:// link. Seems pretty messy tho.

harrym
  • 1

1 Answers1

0

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.

harrym
  • 1