fix not working in systemd injection
This commit is contained in:
@@ -3,6 +3,7 @@ package injection
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
)
|
||||
@@ -29,5 +30,14 @@ func checkWtypeAvailable() error {
|
||||
return fmt.Errorf("wtype not found: %w (install wtype package)", err)
|
||||
}
|
||||
|
||||
// Check for Wayland environment
|
||||
if os.Getenv("WAYLAND_DISPLAY") == "" {
|
||||
return fmt.Errorf("WAYLAND_DISPLAY not set - wtype requires Wayland session")
|
||||
}
|
||||
|
||||
if os.Getenv("XDG_RUNTIME_DIR") == "" {
|
||||
return fmt.Errorf("XDG_RUNTIME_DIR not set - wtype requires proper session environment")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user