Files
teleport/BUILD_macos.md
T
a2e3c53e42 [v18] Add Linux desktop support (#68401)
* Add LinuxDesktop protos and generated code (#62971)

* Add LinuxDesktop gRPC and backend (#62974)

* Add LinuxDesktop gRPC and backend

* Remove CloneResource

* Review comments

* Fix logins

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add LinuxDesktop resource to unified resources (#63101)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* e

* skip gogoproto

* e

* fix test

* Update api/client/proto/linuxdesktop.go

Co-authored-by: Zac Bergquist <[email protected]>

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add tctl support for Linux desktop (#63273)

* Add LinuxDesktop gRPC and backend

* Add tctl support for Linux desktop

* Add LinuxDesktop gRPC and backend

* Remove CloneResource

* Review comments

* Fix logins

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix role

* Remove duplicate code

* Cleanup

* Fix test

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop (#65692)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Review comments

* Review comments

* e

* skip gogoproto

* e

* fix test

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Add locks support for Linux desktop (#65761)

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Remove CloneResource

* Review comments

* Fix logins

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Proto changes for Linux Desktop

* Add locks support for Linux desktop

* Fix role

* Update lib/auth/auth_with_roles.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/ui/server.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Review comments

* Review comments

* fix e

---------

Co-authored-by: Zac Bergquist <[email protected]>

* Fix compilation

* Operator CRD

* Fix test

* Add Linux desktop support (#65841)

* Implement support for TDPB in Desktop Agent.

* Add LinuxDesktop gRPC and backend

* Add LinuxDesktop resource to unified resources

* Add Linux desktop service

* Remove CloneResource

* Review comments

* Unifide fix

* routing

* Fix logins

* Fix logins

* Fix CA cache and write basic loop

* Review comment

* Fix components and handleConnection

* Review comment

* Add ClonableResourceWithLabels

* Fix missing CloneResource

* Add Xvfb handlers

* Add Xephyr

* Add Xvfb controller

* Add QOI encoder

* encoder + xsession

* reexec

* ChildLogConfig

* session

* add forceloginshell

* update frontend + fix session

* Review comments

* Fix code, update docs

* Fix TARGETS format, reuse waiting

* Remove direct mode

* Update lib/auth/linuxdesktop/linuxdesktopv1/service.go

Co-authored-by: Zac Bergquist <[email protected]>

* Add MFA and cert usage support

* Add RemoteAddr

* Revert Uacc setup

* Add session selector

* Refactor code

* Add session recording, tracking and events

* Add session recording, tracking and events

* Refactor command reexecution

* Review comments

* Use reexec.ConfigureCommand

* Proto changes for Linux Desktop

* Proto changes for Linux Desktop

* Add locks support for Linux desktop

* Add guard around m.ScreenSpec

* Cleanup

* Add activity monitor

* Cleanup

* Fix compilation

* Cleanup unified view

* Refactor linux session

* Add logging

* Add logging

* go mod tidy

* Adjust logging

* go mod tidy

* Grab stderr from reexec

* Fix UACC

* pass remote addr to uacc

* TMP: debug images

* Fix panic

* TMP: debug images

* limit change size

* Monitor resolution and restore it

* TMP: debug images

* TMP: debug images

* TMP: debug images

* Modify screen resize

* TMP: debug images

* TMP: debug images

* Add XDG env variable

* Use dbus-run-session

* pam

* variables fix

* variables fix

* revert uacc

* cleanup

* EncodeQOIZ noop

* EncodeQOIZ noop

* Fix auditing

* Cleanup

* Fix type check

* Fix formatting

* Fix licenses

* Fix lint

* go mod tidy

* Fix audit reference

* Fix log

* Fix tests

* Fix tests

* Remove testing from xgb

* go mod tidy

* Fix tests

* xgb 1.3.1

* Handle multiple SessionSelection messages

* Add filters for sessions

* fix events

* Fix compilation + events

* Fix test

* Fix test

* Fix UI

* cleanup

* review comments

* Rework poll eq

* Fix bounds clipping

* fix imports

* lint

* lint

* err

* Fix locking in resize

* Fix ReadChildError

* remove dependabot exclusion

* Fix session end

* Cleanup metedata

* Fix session events

* Ignore multiple ClientHello

* Use slices.IndexFunc in setScreenSize

* Cleanup unused code

* Update lib/service/linux_desktop.go

Co-authored-by: Zac Bergquist <[email protected]>

* Use slices.Clone

* Update lib/srv/desktop/x11/xsession.go

Co-authored-by: Zac Bergquist <[email protected]>

* Fix import

* Use filepath.Glob

* Simplify testdata path calculation

* Cleanup comment

* Cleanup endpoints

* Update lib/web/apiserver.go

Co-authored-by: Zac Bergquist <[email protected]>

* Update lib/web/desktop.go

Co-authored-by: Zac Bergquist <[email protected]>

* Cleanup createDesktopConnection signature

* Cleanup createDesktopConnection signature

* Use server capabilities

* Remove dep override

* Add bounds check

* Cleanup

* Add EndTime to reconstructed event

* use cleanupCtx

* cleanup

* Add configuration test

* Add horizontal scroll

* Review comments

* Fix scrolling

* Fix scrolling

* Sort available sessions

* Fix build

* Add bounds check

* Fix tests

* Move expiry

* lint

* Add back metadata nil check

* lint

* Add usage reporting

* Fix error handling

* Fix resizing, add lock prevention

* Move backend creation after authorization

* Fix possible panic in handleSessionSelection

* Check if clipboard is allowed

* Cleanup errors during normal session ending

* use errgroup for all backround tasks

* Review comments

* fix heartbeat

* add guard for root

* fix tests

* add negative check in changes

* cleanup

* cleanup

* add guard

* Review comments

* Review comments

* Review comments

* Review comments

* Review comments

* Read only access for RoleLinuxDesktop

* use dbus-launch

* Add Linux Desktops to inventory UI

* Use X11 launcher script to start sessions

Use a launch script instead of executing the Exec= line from the
Xsession file directly. This handles the "default" case on Debian
systems where the Xsession file reads `Exec=default`.

The launcher can be explicitly configured at the agent level or
left blank, in which case we probe a set of well-known launchers.

* Compositing support

* Fix dbus launcher

Support both `dbus-run-session` and the older `dbus-launch`.

* Fix error messages when Xvfb is not installed

* Add non-root warning

* Use forceFullDamage for resize

* Fix Open API usage

* invalid user test fix

* remove commented code

* Complete TLS handshake

* Improve error message

* Logged wrapped command

* Add dbus-daemon as dependency for dbus-launch

* Update dbus warning and add llvm check to macos build

* Add LinuxDesktop to role list in new token dialog

* Fix teleport start role validation

* Run messageLoop in separate goroutine

* Add LinuxDesktop labels to Admin role

* Add handling for extended keys and ID reuse

* Cleanup shut down logs

* Xsession cleanup

* Rework llvm requirement in Makefile

---------

Co-authored-by: Ryan Hammonds <[email protected]>
Co-authored-by: Zac Bergquist <[email protected]>

* Add support for `internal.linux_desktop_logins` trait (#67777)

* Add support for internal.linux_desktop_logins trait

* Fix xsession test

* Check Linux Desktop Kind is valid (#68675)

* Fix compilation

* Validate Kind at service level (#68710)

* tctl fix

* Fix reexecution

* Fix UI and service

* Fix Windows webassets build

* Add desktop name to active session

* Fix tctl get/edit linux_desktop

* imports

* fix logging

* fix logging

* License

* lint

* Clean logs

* Add xauth entry before starting Xvfb

* Fix release build

* Fix release build

* Fix labels handling

* lint

* tsh recordings export: support Linux desktop recordings

* Fix ListLinuxDesktops

---------

Co-authored-by: Zac Bergquist <[email protected]>
Co-authored-by: Ryan Hammonds <[email protected]>
Co-authored-by: Dan Share <[email protected]>
2026-07-28 17:02:35 +00:00

2.9 KiB

MacOS environment setup

The instructions below are provided as in a best-effort basis. PRs with corrections and updates are welcome!

  • Install Homebrew

  • Go version from go.mod

    • Follow official instructions to install Go

      • On an M1 Mac, download ARM64 installer from https://go.dev/dl/
      • Download the installer for <version from go.mod>
      • After installing, don't forget to export PATH="/usr/local/go/bin:$PATH" in ~/.zprofile
      • If you need other go versions, see https://go.dev/doc/manage-install
        • You will need to add export PATH="$HOME/go/bin:$PATH" to the ~/.zprofile
    • Or install required version of Go with homebrew:

    # if we are not on the latest, you might need to install like this:
    # brew install go@<version from go.mod>, i.e. 1.16
    #
    # check which version will be installed by running:
    # brew info go
    
    brew install go
    
    brew install rustup
    
    • Initialize Rustup
    rustup-init
    #
    # accept defaults
    #
    # Once command finishes successfully, you might need to add
    #
    # export PATH="$HOME/.cargo/bin:$PATH"
    #
    # into ~/.zprofile and run:
    #
    # . ~/.zprofile
    #
    # or open a new shell
    
  • Install llvm:

    brew install llvm
    
    # Update PATH and apply changes to shell
    echo 'export PATH="/opt/homebrew/opt/llvm/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc
    
  • To install libfido2 (pulls openssl 3 as dependency)

    brew install libfido2
    
  • To install pkg-config

    brew install pkg-config
    
  • To install tools for building the UI:

    • brew install node corepack
    • corepack enable pnpm
    • The Rust and Cargo version in build.assets/Makefile (search for RUST_VERSION) are required.
Local Tests Dependencies

To run a full test suite locally, you will need

  • helm and helm-unittest plugin

    brew install helm
    helm plugin install https://github.com/quintush/helm-unittest
    
  • bats-core version from build.assets/Dockerfile (search for bats-core)

    curl -L https://github.com/bats-core/bats-core/archive/v1.2.1.tar.gz -o ~/Downloads/bats.tar.gz
    cd ~/Downloads
    tar xzvf bats.tar.gz
    sudo mkdir /usr/local/libexec
    sudo chown $USER /usr/local/libexec
    cd bats-core-1.2.1
    sudo ./install.sh /usr/local
    cd ../
    rm -rf bats-core-1.2.1 bats.tar.gz
    
  • protoc binary, typically found in protobuf package

    brew install protobuf
    
  • increased ulimit -n

    ulimit -n 2560 # 10x default