Bitcoin Forum

Bitcoin => Hardware wallets => Topic started by: BitcoinArsenal on July 28, 2018, 02:53:10 PM



Title: Problems with Ledger Live and Ubuntu
Post by: BitcoinArsenal on July 28, 2018, 02:53:10 PM
Does anyone use Ledger Live software on Ubuntu and having trouble to connect the hardware? And has anyone managed to fix it?

I have the following problem:

When I start the software and choose "use a device that is already initialized" and "Ledger Nano S", I get to security list where I choose yes on point 1 and 2, and click "check now" on point 3 (is your ledger device genuine?). On genuine check first step is successful (connect and unlock your ledger device) but it stucks on step 2 although I navigated to dashboard on my device. I can not get to the third step.

I also run Win10 on the same machine and there it works without problems.



Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on July 31, 2018, 12:05:26 PM
Did you download and use the *.AppImage file?
You need to open it with root rights for the wallet to be able to sync the nano s for the first time.

Code:
sudo ./NameOfFile.AppImage


Title: Re: Problems with Ledger Live and Ubuntu
Post by: BitcoinArsenal on August 11, 2018, 07:04:02 PM
Did you download and use the *.AppImage file?
You need to open it with root rights for the wallet to be able to sync the nano s for the first time.

Code:
sudo ./NameOfFile.AppImage

Thank you very much!
It fixed the problem. I did know that I need to run it with root rights but I thought - since I use root standardly - its enough to run appimage with simple click. Running it with sudo via console works fine :)


Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on August 13, 2018, 06:44:44 AM
[...] since I use root standardly [...]

It is heavily advised to NOT run your PC under the root user on a usual basis.
You are basically bypassing the security model, where programs are meant to be run with user privileges without being to be able to access/modify the underlying system.
Any small bug or vulnerability could crash/compromise your whole system since any process you start (graphical destkop environment, browser, flash, .. ) runs with root privileges.

The better alternative would be to create individual user and move them (if you want them to be able to gain root privileges) into the sudo group.



Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on July 31, 2019, 04:43:43 PM
useful topic this one.. but please explain to me how is this possible..

when I run the ledger-live.AppImage on Ubuntu LIVE it works by just enabling the "run as application" with the right-click on properties and then double click on the icon, BUT once I installed ubuntu (19.04) on the hard drive (ssd) alongside win 7 it won't open anymore UNLESS I perform a sudo command from terminal ..

can someone explain that? thanks :)


Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on August 01, 2019, 08:30:57 AM
when I run the ledger-live.AppImage on Ubuntu LIVE it works by just enabling the "run as application" with the right-click on properties and then double click on the icon, BUT once I installed ubuntu (19.04) on the hard drive (ssd) alongside win 7 it won't open anymore UNLESS I perform a sudo command from terminal ..

With live-distros you are mostly logged in as the root user.
And after installing it, a standard user has been created.


Now, am i right assuming that you can't open it at all ?
If so, i guess the permissions aren't correctly set (did you download/install it with sudo ?)
Navigate (via terminal) into the folder where the appimage is located, then enter these 2 commands:

Code:
sudo chown USERNAME:USERNAME NameOfFile.AppImage
chmod 554 NameOfFile.AppImage

Try to open it afterwards without sudo (preferably via the terminal, to see any error output). If it works, it also works via right-click.



If, on the other side, you can open it.. but can't access you ledger (when opening without root), then i'd assume you didn't add the udev-rules ?
Without them, your standard user is not allowed to access USB devices (more specifically, the ledger device).
In this case, you need to adjust them.

Look at https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues) under 'Linux' for a How-to.


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 01, 2019, 12:58:35 PM

With live-distros you are mostly logged in as the root user.
And after installing it, a standard user has been created.

first of all, thanks for the answer. This explains a lot in the first place, I guess.

Now, am i right assuming that you can't open it at all ?
If so, i guess the permissions aren't correctly set (did you download/install it with sudo ?)
Navigate (via terminal) into the folder where the appimage is located, then enter these 2 commands:

Code:
sudo chown USERNAME:USERNAME NameOfFile.AppImage
chmod 554 NameOfFile.AppImage

Try to open it afterwards without sudo (preferably via the terminal, to see any error output). If it works, it also works via right-click.

Let me explain what happens in my case: I do am able to open the application, but just by terminal, using this line of command:

Code:
sudo ./NameOfFile.AppImage

which of course I took from this topic some answers ago.

Now, what I can't do is just double click on the icon and launch the application, or press enter or right-click and run whatever.

And no: I didn't install with sudo. I don't even know what install means in this case: it looks like one of those .dmg application where you never really have and installation: the icon just sits on the folder and anytime you want to open it it looks like a new start ..

or may be this line of code means installation ..
Code:
sudo ./NameOfFile.AppImage
I don't know

I am going to try what you suggested and then get back here



If, on the other side, you can open it.. but can't access you ledger (when opening without root), then i'd assume you didn't add the udev-rules ?
Without them, your standard user is not allowed to access USB devices (more specifically, the ledger device).
In this case, you need to adjust them.

Look at https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues) under 'Linux' for a How-to.
[/quote]


Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on August 01, 2019, 01:02:42 PM
Let me explain what happens in my case: I do am able to open the application, but just by terminal, using this line of command:

Code:
sudo ./NameOfFile.AppImage

which of course I took from this topic some answers ago.

Now, what I can't do is just double click on the icon and launch the application, or press enter or right-click and run whatever.

You could also try to open the file without sudo (within the command line).
If you get permission denied (or similar), then the above proposed commands (chown and chmod) will fix it.



And no: I didn't install with sudo. I don't even know what install means in this case: it looks like one of those .dmg application where you never really have and installation: the icon just sits on the folder and anytime you want to open it it looks like a new start ..

Yes, that was my mistake.
.AppImage files come with all dependencies and are ready to be run without installation.

I assume the file is owned by root (not sure why tho) and therefore you can't open it with your regular user.


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 01, 2019, 01:30:53 PM

You could also try to open the file without sudo (within the command line).
If you get permission denied (or similar), then the above proposed commands (chown and chmod) will fix it.

let me provide a screenshot of my attempt at opening without sudo, like you suggested:
https://imgur.com/FXPU2ys

while if, on the other hand, I open with the full formula sudoku etc etc .. it opens correctly

so: is this the case you were talking about?

thanks


Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on August 01, 2019, 01:36:11 PM
This is most probably a permission issue.

Run the following commands to give your user permission to read/write these folder (it seems that currently only root can):

Code:
sudo chmod -R 700 /home/USERNAME/.config/Ledger\ Live
sudo chown -R USERNAME:USERNAME /home/USERNAME/.config/Ledger\ Live

Replace 'USERNAME' with your username and the backslash is intended (to tell the command line that the next space is part of the folder name and not a command seperator).


Then try it again, please.


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 01, 2019, 01:46:51 PM
This is most probably a permission issue.

Run the following commands to give your user permission to read/write these folder (it seems that currently only root can):

Code:
sudo chmod -R 700 /home/USERNAME/.config/Ledger\ Live
sudo chown -R USERNAME:USERNAME /home/USERNAME/.config/Ledger\ Live

Replace 'USERNAME' with your username and the backslash is intended (to tell the command line that the next space is part of the folder name and not a command seperator).


Then try it again, please.

thanks, my friend!! It appears it's working! Not only I am able to run ledger live from a simple command line without sudoku, but I also can launch the application with the right-click and run or just by hitting enter.

thanks very much again; I am going to connect the ledger now: I hope I can get back here in case I need it


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 01, 2019, 02:03:28 PM

If, on the other side, you can open it.. but can't access you ledger (when opening without root), then i'd assume you didn't add the udev-rules ?
Without them, your standard user is not allowed to access USB devices (more specifically, the ledger device).
In this case, you need to adjust them.

Look at https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues) under 'Linux' for a How-to.

now it's this what I get:
https://imgur.com/PZ9D59A

is this what you were talking about?


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 01, 2019, 02:11:41 PM
and there it is: it does look like I am in the group, doesn't it..

https://imgur.com/0aXjUhj


and at this point I may just want to stop, to prevent any mess I could do ..

any suggestion is much appriciated


Title: Re: Problems with Ledger Live and Ubuntu
Post by: HCP on August 02, 2019, 04:57:13 AM
Did you try following the instructions on the Ledger Support page (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues) that was linked to by bob123? ???

It's fairly easy to follow and should be able to do the first two steps without creating any "mess" ;)


Title: Re: Problems with Ledger Live and Ubuntu
Post by: bob123 on August 02, 2019, 07:25:57 AM
is this what you were talking about?

Yes.

Since you are already in the plugdev group (ubuntu creates it upon installation and adds the initial user account into it; other distros don't), you can skip step 1 and continue with step 2 of the guide from ledger.com (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues).

Enter this command:
Code:
wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash

This command downloads the script from ledger's github and pipes it into bash (i.e. executes it).

Your OS does not know yet how to handle this unknown USB device you are plugging in.
That's what the udev rules are for.


Afterwards ledger live (and electrum or any other wallet) should be able to connect to your nano s.  :)


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 02, 2019, 08:01:52 AM

Yes.

Since you are already in the plugdev group (ubuntu creates it upon installation and adds the initial user account into it; other distros don't), you can skip step 1 and continue with step 2 of the guide from ledger.com (https://support.ledger.com/hc/en-us/articles/115005165269-Fix-connection-issues).

Enter this command:
Code:
wget -q -O - https://raw.githubusercontent.com/LedgerHQ/udev-rules/master/add_udev_rules.sh | sudo bash

This command downloads the script from ledger's github and pipes it into bash (i.e. executes it).

Your OS does not know yet how to handle this unknown USB device you are plugging in.
That's what the udev rules are for.


Afterwards ledger live (and electrum or any other wallet) should be able to connect to your nano s.  :)

ok, thanks. I'll try that out asap. I had stopped because I wasn't sure I had cleared step one and could proceed with step two


Title: Re: Problems with Ledger Live and Ubuntu
Post by: niccolo_21 on August 02, 2019, 12:07:48 PM
thanks guys, it worked.!!