github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/pinentry/pinentry_x11.go (about) 1 // Copyright 2015 Keybase, Inc. All rights reserved. Use of 2 // this source code is governed by the included BSD license. 3 4 //go:build dragonfly || freebsd || linux || nacl || netbsd || openbsd || solaris 5 // +build dragonfly freebsd linux nacl netbsd openbsd solaris 6 7 package pinentry 8 9 import "os" 10 11 func HasWindows() bool { 12 // If there is a DISPLAY then we can spawn a window to it. 13 return len(os.Getenv("DISPLAY")) > 0 14 }