The problem you are getting with the chaindata being locked is because you have started one instance of
geth and then Ethereum Wallet is trying to start another instance of `geth.
Before/when/after you get the error, in another terminal window, type
ps -ef | grep geth
If you see two instances of
geth, this is the cause of your locking issue.
The cause of this is that Ethereum Wallet tries to communicate with any existing
geth instance by using the IPC file and this is hardcoded in Ethereum Wallet to be
~/.ethereum/geth.ipc . When Ethereum Wallet is unable to detect an existing
geth instance, it will attempt to start a new
geth instance, and this is when you have the locking issue.
To fix this issue, see the usage of the
--ipcpath ~/.ethereum/geth.ipc command line parameter below.
Try the following:
Create a password file
echo "testpassword" > /tmp/passwordfile
Create a new account using a temp datadir
geth --dev --datadir /tmp/devdatadir --password /tmp/passwordfile account new
geth in mining mode
geth --dev --datadir /tmp/devdatadir --mine --minerthreads 1 --password /tmp/passwordfile --ipcpath ~/.ethereum/geth.ipc console
Then running Ethereum Wallet. You should see a PRIVATE-NET indicator on the top of the Ethereum Wallet screen. And you should see your MAIN ACCOUNT (ETHERBASE) clicking out 5 ethers quite quickly.
If this works, set
--datadir to your desired destination and use
/tmp/passwordfile if you want to.
See also How to change to private network in etherum wallet?