Does the Desktop version of Trezor Suite Require Trezor Bridge to Run/Connect?

Hello all,

Anyone can shed light on this? My OS is Linux if that makes a difference.

There is an embedded bridge in Trezo Suite.

The flow is as following:

  1. when you start the Suite it will try to connect to the bridge (external one).
  2. if that fails, the Suite runs its own copy of the bridge.
  3. When you exit Suite it will kill the bridge if it was launched in step 2.

However if you’d need to use your Trezor with 3rd party apps because of some advanced features, coin support and so on you will need Trezor Bridge (so I’d recommend to install it anyway).

1 Like

Ah, no wonder! That clarifies for me. I’m currently having problem connecting to my device via Metamask so the bridge is needed. Unfortunately, it turned out (i think) the Trezor Bridge appears to be written to work under Systemd only which I;m having problem booting into right now. Can you confirm that’s the case, that Trezor Bridge works only under Systemd? Below is the error that seems to suggest that:

Setting up trezor-bridge (2.0.27) …
System has not been booted with systemd as init system (PID 1). Can’t operate.
Failed to connect to bus: Host is down
dpkg: error processing package trezor-bridge (–configure):
installed trezor-bridge package post-installation script subprocess returned error exit status 1
Processing triggers for ntp (1:4.2.8p12+dfsg-4) …
[ ok ] Stopping NTP server: ntpd.
[ ok ] Starting NTP server: ntpd.
Errors were encountered while processing:
trezor-bridge
E: Sub-process /usr/bin/dpkg returned an error code (1)

I did submit a ticket so sorry if this is a redundant post.

yes, Trezor-bridge package for Linux has a dependency for systemd.
This means that distributions without systemd can not install trezor bridge.

Could you please provide your ticket ID ?
Thank you in advance.

I’m so very sad to learn just now that trezor bridge is systemd dependent. Systemd is a security risk. I’m using Devuan GNU/Linux, spent a lot of time and energy to set up a separate laptop with encrypted disk etc etc.

Using only the Suite I get “device is used in another window” errors and failed transactions and it seemed like installing the bridge was the solution.

Please Trezor team support non-systemd systems!

Feel free to compile and install trezord-go from source, it’s as easy as go install https://github.com/trezor/trezord-go.

The systemd dependency only exists to make the maintenance load lower for Bridge development, as there is no need to write two sets of startup/shutdown scripts.

1 Like

Thank you matejcik!

After installing go, this command seemed to work:
~$ go install github.com/trezor/trezord-go@latest

this was the output, I’m not sure the installation was successful or not, because I was unable to start trezord-go

> go: downloading github.com/trezor/trezord-go v2.0.29+incompatible
> go: finding module for package gopkg.in/natefinch/lumberjack.v2
> go: finding module for package github.com/gorilla/handlers
> go: downloading gopkg.in/natefinch/lumberjack.v2 v2.2.1
> go: finding module for package github.com/gorilla/mux
> go: downloading github.com/gorilla/handlers v1.5.1
> go: finding module for package github.com/gorilla/csrf
> go: downloading github.com/gorilla/mux v1.8.0
> go: downloading github.com/gorilla/csrf v1.7.1
> go: found gopkg.in/natefinch/lumberjack.v2 in gopkg.in/natefinch/lumberjack.v2 v2.2.1
> go: found github.com/gorilla/handlers in github.com/gorilla/handlers v1.5.1
> go: found github.com/gorilla/mux in github.com/gorilla/mux v1.8.0
> go: found github.com/gorilla/csrf in github.com/gorilla/csrf v1.7.1
> go: downloading github.com/felixge/httpsnoop v1.0.1
> go: downloading github.com/gorilla/securecookie v1.1.1
> go: downloading github.com/pkg/errors v0.9.1
> package github.com/trezor/trezord-go
> 	imports github.com/trezor/trezord-go/usb
> 	imports github.com/trezor/trezord-go/usb/lowlevel/libusb: build constraints exclude all Go files in /home/fr/go/pkg/mod/github.com/trezor/[email protected]+incompatible/usb/lowlevel/libusb

After chmod +x trezord.go and ./trezord.go -h this:
./trezord.go: line 1: package: command not found ./trezord.go: line 3: syntax error near unexpected token newline’
./trezord.go: line 3: import ('

Any ideas? Shall I open a new thread?

> ./trezord.go: line 1: package: command not found
> ./trezord.go: line 3: syntax error near unexpected token `newline'
> ./trezord.go: line 3: `import ('

this looks like you made executable a Go source file that you found somewhere in the package?? no, that’s not gonna work.

the result of go install should be a binary called trezord-go (dash, not dot) and placed, my guess would be, ~/.local/bin. You should not need to chmod +x anything – if the file is not executable already, 98% chance it’s not it.

Whichever the location, Go tries to put the file on your PATH, so you should just be able to type trezord-go and run it. (Try closing and reopening your terminal window in case the shell doesn’t automatically find the newly added file.)

Or try searching for the file trezord-go

Thank you for helping with this!

I did an #updatedb and a #locate trezord-go but there is no such file anywhere.

Is it possible that the last line of the installation output means that the installation did not finish?
build constraints exclude all Go files in /home/fr/go/pkg/mod/github.com/trezor/[email protected]+incompatible/usb/lowlevel/libusb

I don’t think so.

anyway, help for go install tells me the binary should be in ~/go/bin, so try ~/go/bin/trezord-go.

which won’t see it at that location if you don’t have it in PATH.
locate isn’t a good search tool for this kind of task, because it only looks into a pregenerated index which by default excludes a lot of things.
you would need to run something like find ~ -name trezord-go

find ~ -name trezord-go only gives the ~/go/pkg/mod/cache/download/github.com/trezor/trezord-go folder

there is no bin folder in ~/go/

the only /go/bin folder is /usr/local/go/bin with go and gofmt within

go env says my
GOPATH=“/home/fr/go”
GOROOT=“/usr/local/go”

the last line of the output of $go install github.com/trezor/trezord-go@latest

is build constraints exclude all Go files in /home/fr/go/pkg/mod/github.com/trezor/[email protected]+incompatible/usb/lowlevel/libusb

this is an up-to-date Devuan current stable release (based on Devuan 11) with:
libusb-0.1-4 is version 2:0.1.12-32
libusb-1.0-0 is version 2:1.0.24-3

what is the exit code of the go install command?

to find out, you can run echo $? immediately after the command exits.

The exit code after the go install is
“1”

and what is your go version?
go version

go version go1.20.4 linux/amd64 - installed today from the official website

make sure you have libusb-1.0-0-dev installed from the Devuan repositories
try to force enable CGo: export CGO_ENABLED=1

then try this install command:

go install -v github.com/trezor/[email protected]

(as a complete aside, i’m very curious as to why go is fetching “v2.0.29”. that’s definitely not the latest)

Thank you!

libusb-1.0.0-dev was not installed
did the export command

looks like I have to install git too, as this is the output of the go install:
go: github.com/trezor/[email protected]: git init --bare in /home/fr/go/pkg/mod/cache/vcs/eedf21cda8adc53bca28443ef9e2f589b7c3df231e1d9351f46119fd3842d1b3: exec: "git": executable file not found in $PATH

very promising improvement, I’m grateful

now with git version 2.30.2 the output is this:
go: github.com/trezor/[email protected]: github.com/trezor/[email protected]: invalid version: module contains a go.mod file, so module path must match major version ("github.com/trezor/trezord-go/v2")
might shed some light to the complete aside :slight_smile: