what i was not able to do is the read only mode. what is this "xpub" thing?
xpub = Master Public Key. Can be used to generate addresses, but does NOT (and can not be used to) generate private keys. So, if "compromised", will only degrade your privacy (someone could see all your balances/transactions), but it does not degrade your security... as no-one could steal the coins.
To export the "xpub" from Ledger... load up the "Ledger Wallet Bitcoin" in Chrome, connect your ledger device, enter PIN, select Bitcoin app on device. Then in the Chrome webapp click on the account (listed under "Quick View") then "Account Settings" and "Export" (next to "Extended Public Key")... you'll get an "Xpub".
NOTE: This "xpub" won't work with "SegWit" wallets... as Electrum wants a "ypub" or "zpub" for SegWit Wallets
If you are using the SegWit chain on your Ledger, you can get the "ypub" from Electrum:
- Import your Ledger SegWit wallet into Electrum. (File -> New\Restore -> Standard Wallet -> Use hardware device -> Connect/Unlock your Ledger device -> set Derivation Path to m/
49'/0'/0')
- Look at the "Wallet -> Information", you will see you actually get a "
ypub" and not an "
xpub".
and now i have a encrypted wallet.dat. decrypting it only works with the ledger? i could not chose a pw.
That is a design choice by the Electrum devs... if you want to have an encrypted Electrum wallet when using Hardware Wallets, you don't use a password to unlock it, you use the device.
If you would rather use a password, then you could setup a "watching only" wallet, using the "xpub/ypub" to generate the addresses as above... but you'll never be able to send coins from it as the wallet does NOT contain private keys and you can not "connect" it to the hardware wallet to confirm transactions etc.