This commit is contained in:
Dain Nilsson 2024-03-25 17:20:14 +01:00
commit e683126ea3
No known key found for this signature in database
GPG Key ID: F04367096FBA95E8
3 changed files with 19 additions and 5 deletions

View File

@ -61,12 +61,22 @@ framework. The previous Qt codebase can be found in the `legacy` branch.
|Android 5 (Lollipop)
|===
On Linux systems, make sure the `pcscd` service is installed and running.
=== Installation
Downloads for all supported operating systems are available
https://www.yubico.com/products/yubico-authenticator/[here].
==== Linux
On Linux platforms you will need pcscd installed and running to be able to
communicate with a YubiKey over the SmartCard interface. Additionally, you may
need to set permissions for your user to access YubiKeys via the HID
interfaces. The relevant permissions are described
https://developers.yubico.com/yubikey-manager/Device_Permissions.html[here].
For some configurations running Wayland, copying an OTP to clipboard only works
when the app has focus. If you are unable to reliably copy to clipboard from
the systray icon, you can set the environment variable `_YA_WL_CLIPFIX=1` to
enable a workaround that attempts to give the window focus before copying.
=== Command line interface
Looking for a command line option? Try our
https://github.com/Yubico/yubikey-manager/[YubiKey Manager CLI] tool.

View File

@ -158,9 +158,11 @@ class _DesktopClipboard extends AppClipboard {
@override
Future<void> setText(String toClipboard, {bool isSensitive = false}) async {
// Wayland requires the window to be focused to copy to clipboard
await Clipboard.setData(ClipboardData(text: toClipboard));
// Wayland may require the window to be focused to copy to clipboard
final needsFocus = Platform.isLinux &&
Platform.environment['XDG_SESSION_TYPE'] == 'wayland';
Platform.environment['XDG_SESSION_TYPE'] == 'wayland' &&
Platform.environment['_YA_WL_CLIPFIX'] != null;
var hidden = false;
try {
if (needsFocus && !await windowManager.isFocused()) {

View File

@ -47,7 +47,9 @@ static void my_application_activate(GApplication* application) {
gtk_window_set_title(window, "Yubico Authenticator");
}
gtk_window_set_default_size(window, 400, 720);
gtk_window_set_default_size(window, 320, 720);
// Sets the minimum window size, should match desktop/window_manager_helper/defaults.dart
gtk_widget_set_size_request(GTK_WIDGET(window), 300, 0);
gtk_widget_realize(GTK_WIDGET(window));
g_autoptr(FlDartProject) project = fl_dart_project_new();