From a871081ee20922f22a6f2ea907f21359f4b4e53c Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Wed, 10 Mar 2021 16:09:05 +0900 Subject: [PATCH 01/11] Change setting method of the DRM device filename. --- README.md | 2 ++ .../platform/linux_embedded/window/linuxes_window_drm.cc | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 82eda2dc..7580dcf5 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,8 @@ $ make ### Build for DRM backend +This binary will run by setting the DRM device file name(/dev/dri/card xx) to the environment variable `DRM_DEVICE_FILENAME`. + ```Shell $ mkdir build $ cd build diff --git a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc index 2383a2de..8b40b839 100644 --- a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc +++ b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc @@ -13,8 +13,6 @@ namespace flutter { -static constexpr char kDrmDeviceFilename[] = "/dev/dri/card0"; - const libinput_interface LinuxesWindowDrm::kLibinputInterface = { .open_restricted = [](const char* path, int flags, void* user_data) -> int { auto ret = open(path, flags | O_CLOEXEC); @@ -97,7 +95,12 @@ bool LinuxesWindowDrm::DispatchEvent() { } bool LinuxesWindowDrm::CreateRenderSurface(int32_t width, int32_t height) { - native_window_ = std::make_unique(kDrmDeviceFilename); + auto device_filename = getenv("DRM_DEVICE_FILENAME"); + if ((!device_filename) || (device_filename[0] == '\0')) { + LINUXES_LOG(ERROR) << "DRM_DEVICE_FILENAME is not set."; + return false; + } + native_window_ = std::make_unique(device_filename); if (!native_window_->IsValid()) { LINUXES_LOG(ERROR) << "Failed to create the native window"; return false; From b9f187645fd9f5ae51562df0485c1c6c83ffa19c Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Wed, 10 Mar 2021 18:20:21 +0900 Subject: [PATCH 02/11] Fix for review. --- README.md | 4 ++-- .../linux_embedded/window/linuxes_window_drm.cc | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 7580dcf5..3c506277 100644 --- a/README.md +++ b/README.md @@ -108,8 +108,6 @@ $ make ### Build for DRM backend -This binary will run by setting the DRM device file name(/dev/dri/card xx) to the environment variable `DRM_DEVICE_FILENAME`. - ```Shell $ mkdir build $ cd build @@ -172,6 +170,8 @@ Comming soon. We are contributing to support this now. See: https://github.com/f Wayland compositor (weston) must be running before running the program when you use the Wayland backend. +The DRM device file name must be set to the environment variable `FLUTTER_DRM_DEVICE` when you use the DRM backend. For example, run `export FLUTTER_DRM_DEVICE="/dev/dri/card1"`. If it is not set, `/dev/dri/card0` is used. + ```Shell $ ./flutter-client ./sample/build/linux/x64/release/bundle ``` diff --git a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc index 8b40b839..4fd0d431 100644 --- a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc +++ b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc @@ -13,6 +13,8 @@ namespace flutter { +static constexpr char kDrmDeviceDefaultFilename[] = "/dev/dri/card0"; + const libinput_interface LinuxesWindowDrm::kLibinputInterface = { .open_restricted = [](const char* path, int flags, void* user_data) -> int { auto ret = open(path, flags | O_CLOEXEC); @@ -27,8 +29,7 @@ const libinput_interface LinuxesWindowDrm::kLibinputInterface = { LinuxesWindowDrm::LinuxesWindowDrm(FlutterWindowMode window_mode, int32_t width, int32_t height, bool show_cursor) - : display_valid_(false), - is_pending_cursor_add_event_(false) { + : display_valid_(false), is_pending_cursor_add_event_(false) { window_mode_ = window_mode; current_width_ = width; current_height_ = height; @@ -95,12 +96,11 @@ bool LinuxesWindowDrm::DispatchEvent() { } bool LinuxesWindowDrm::CreateRenderSurface(int32_t width, int32_t height) { - auto device_filename = getenv("DRM_DEVICE_FILENAME"); - if ((!device_filename) || (device_filename[0] == '\0')) { - LINUXES_LOG(ERROR) << "DRM_DEVICE_FILENAME is not set."; - return false; - } - native_window_ = std::make_unique(device_filename); + auto device_filename = std::getenv("FLUTTER_DRM_DEVICE"); + native_window_ = std::make_unique( + ((device_filename) && (device_filename[0] != '\0')) + ? device_filename + : kDrmDeviceDefaultFilename); if (!native_window_->IsValid()) { LINUXES_LOG(ERROR) << "Failed to create the native window"; return false; From 60604ba832561d382b60de942eec872c23849c41 Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 10:09:56 +0900 Subject: [PATCH 03/11] Fix for review. --- README.md | 7 +++++-- .../linux_embedded/window/linuxes_window_drm.cc | 16 +++++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 3c506277..a2dffe3c 100644 --- a/README.md +++ b/README.md @@ -170,8 +170,6 @@ Comming soon. We are contributing to support this now. See: https://github.com/f Wayland compositor (weston) must be running before running the program when you use the Wayland backend. -The DRM device file name must be set to the environment variable `FLUTTER_DRM_DEVICE` when you use the DRM backend. For example, run `export FLUTTER_DRM_DEVICE="/dev/dri/card1"`. If it is not set, `/dev/dri/card0` is used. - ```Shell $ ./flutter-client ./sample/build/linux/x64/release/bundle ``` @@ -179,6 +177,11 @@ $ ./flutter-client ./sample/build/linux/x64/release/bundle #### Note You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. +Note that `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. +``` +$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle +``` + ## 5. Settings of weston.ini file (Only when you use weston desktop-shell) Sets the following parameters when this embedder works as a desktop-shell on weston. Sample file can be found [examples/config/weston.ini](./examples/config/weston.ini). See also `man weston.ini`. diff --git a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc index 4fd0d431..a9638960 100644 --- a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc +++ b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc @@ -13,6 +13,7 @@ namespace flutter { +static constexpr char kFlutterDrmDevice[] = "FLUTTER_DRM_DEVICE"; static constexpr char kDrmDeviceDefaultFilename[] = "/dev/dri/card0"; const libinput_interface LinuxesWindowDrm::kLibinputInterface = { @@ -96,11 +97,16 @@ bool LinuxesWindowDrm::DispatchEvent() { } bool LinuxesWindowDrm::CreateRenderSurface(int32_t width, int32_t height) { - auto device_filename = std::getenv("FLUTTER_DRM_DEVICE"); - native_window_ = std::make_unique( - ((device_filename) && (device_filename[0] != '\0')) - ? device_filename - : kDrmDeviceDefaultFilename); + auto device_filename = std::getenv(kFlutterDrmDevice); + if ((!device_filename) || (device_filename[0] == '\0')) { + LINUXES_LOG(WARNING) << kFlutterDrmDevice << " is not set, use " + << kDrmDeviceDefaultFilename; + native_window_ = + std::make_unique(kDrmDeviceDefaultFilename); + } else { + native_window_ = std::make_unique(device_filename); + } + if (!native_window_->IsValid()) { LINUXES_LOG(ERROR) << "Failed to create the native window"; return false; From 04465aebfa7808c9e36ddb502d3f3a9620cd3485 Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 11:05:36 +0900 Subject: [PATCH 04/11] Fix for review. --- README.md | 11 +++++------ examples/flutter-drm-backend/README.md | 8 ++++++++ .../linux_embedded/window/linuxes_window_drm.cc | 15 ++++++--------- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index a2dffe3c..d8ce3785 100644 --- a/README.md +++ b/README.md @@ -175,12 +175,11 @@ $ ./flutter-client ./sample/build/linux/x64/release/bundle ``` #### Note -You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. - -Note that `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. -``` -$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle -``` +- You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. +- `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. + ``` + $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle + ``` ## 5. Settings of weston.ini file (Only when you use weston desktop-shell) diff --git a/examples/flutter-drm-backend/README.md b/examples/flutter-drm-backend/README.md index d6d4145d..f1cfbba1 100644 --- a/examples/flutter-drm-backend/README.md +++ b/examples/flutter-drm-backend/README.md @@ -10,3 +10,11 @@ $ cd build $ cmake -DUSER_PROJECT_PATH=examples/flutter-drm-backend .. $ make ``` + +## Running your Flutter app + +`FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. + +``` +$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle +``` diff --git a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc index a9638960..a9fffb93 100644 --- a/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc +++ b/src/flutter/shell/platform/linux_embedded/window/linuxes_window_drm.cc @@ -13,7 +13,7 @@ namespace flutter { -static constexpr char kFlutterDrmDevice[] = "FLUTTER_DRM_DEVICE"; +static constexpr char kFlutterDrmDeviceEnvironmentKey[] = "FLUTTER_DRM_DEVICE"; static constexpr char kDrmDeviceDefaultFilename[] = "/dev/dri/card0"; const libinput_interface LinuxesWindowDrm::kLibinputInterface = { @@ -97,16 +97,13 @@ bool LinuxesWindowDrm::DispatchEvent() { } bool LinuxesWindowDrm::CreateRenderSurface(int32_t width, int32_t height) { - auto device_filename = std::getenv(kFlutterDrmDevice); + auto device_filename = std::getenv(kFlutterDrmDeviceEnvironmentKey); if ((!device_filename) || (device_filename[0] == '\0')) { - LINUXES_LOG(WARNING) << kFlutterDrmDevice << " is not set, use " - << kDrmDeviceDefaultFilename; - native_window_ = - std::make_unique(kDrmDeviceDefaultFilename); - } else { - native_window_ = std::make_unique(device_filename); + LINUXES_LOG(WARNING) << kFlutterDrmDeviceEnvironmentKey + << " is not set, use " << kDrmDeviceDefaultFilename; + device_filename = const_cast(kDrmDeviceDefaultFilename); } - + native_window_ = std::make_unique(device_filename); if (!native_window_->IsValid()) { LINUXES_LOG(ERROR) << "Failed to create the native window"; return false; From 4bfb58fb8493663b278a5e5a7b58bb46f1b5bbc7 Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 13:22:05 +0900 Subject: [PATCH 05/11] Fix for review. --- README.md | 3 ++- examples/flutter-drm-backend/README.md | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d8ce3785..c32e2461 100644 --- a/README.md +++ b/README.md @@ -177,9 +177,10 @@ $ ./flutter-client ./sample/build/linux/x64/release/bundle #### Note - You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. - `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. - ``` + ```Shell $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` +- To use the DRM backend, you need to switch the environment from running x11 to not running x11 with Ctrl+Alt+F3, etc. ## 5. Settings of weston.ini file (Only when you use weston desktop-shell) diff --git a/examples/flutter-drm-backend/README.md b/examples/flutter-drm-backend/README.md index f1cfbba1..59fb9c50 100644 --- a/examples/flutter-drm-backend/README.md +++ b/examples/flutter-drm-backend/README.md @@ -11,10 +11,12 @@ $ cmake -DUSER_PROJECT_PATH=examples/flutter-drm-backend .. $ make ``` -## Running your Flutter app +## Running Flutter app `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. +```Shell +$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend FLUTTER_BUNDLE_PATH ``` -$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle -``` + +Note that replace `FLUTTER_BUNDLE_PATH` with the flutter bundle path you want to use like ./sample/build/linux/x64/release/bundle. From 13f7a6e9a97bee92c35d150f675f884cae5574df Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 15:42:24 +0900 Subject: [PATCH 06/11] Fix for review. --- README.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index c32e2461..5d025590 100644 --- a/README.md +++ b/README.md @@ -168,19 +168,26 @@ Comming soon. We are contributing to support this now. See: https://github.com/f ### Run Fluter app -Wayland compositor (weston) must be running before running the program when you use the Wayland backend. +#### for Wayland backend + +Wayland compositor (weston) must be running before running the program. ```Shell $ ./flutter-client ./sample/build/linux/x64/release/bundle ``` -#### Note +#### for DRM backend + +You should use an environment where x11 is not running. To turn off x11, switch to the CUI environment by pressing such as Shift+Alt+F3. + +`FLUTTER_DRM_DEVICE` must be set properly. The default value is `/dev/dri/card0`. + +```Shell +$ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle +``` + +##### Note - You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. -- `FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. - ```Shell - $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle - ``` -- To use the DRM backend, you need to switch the environment from running x11 to not running x11 with Ctrl+Alt+F3, etc. ## 5. Settings of weston.ini file (Only when you use weston desktop-shell) From 18e1fe902bb75f81c933837d1d65c03c287db0ab Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 16:15:11 +0900 Subject: [PATCH 07/11] Fix for review. --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 5d025590..757b679a 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ Comming soon. We are contributing to support this now. See: https://github.com/f ### Run Fluter app -#### for Wayland backend +#### Run with Wayland backend Wayland compositor (weston) must be running before running the program. @@ -176,13 +176,12 @@ Wayland compositor (weston) must be running before running the program. $ ./flutter-client ./sample/build/linux/x64/release/bundle ``` -#### for DRM backend +#### Run with DRM backend -You should use an environment where x11 is not running. To turn off x11, switch to the CUI environment by pressing such as Shift+Alt+F3. - -`FLUTTER_DRM_DEVICE` must be set properly. The default value is `/dev/dri/card0`. +You need to switch from GUI which is running X11 or Wayland to the Character User Interface (CUI). In addition, `FLUTTER_DRM_DEVICE` must be set properly. The default value is `/dev/dri/card0`. ```Shell +$ Shift + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` From 23a421fa39832cecd221b1db78cd4108c1768a2e Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 16:22:55 +0900 Subject: [PATCH 08/11] Fix for review. --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 757b679a..81b24b1a 100644 --- a/README.md +++ b/README.md @@ -181,10 +181,15 @@ $ ./flutter-client ./sample/build/linux/x64/release/bundle You need to switch from GUI which is running X11 or Wayland to the Character User Interface (CUI). In addition, `FLUTTER_DRM_DEVICE` must be set properly. The default value is `/dev/dri/card0`. ```Shell -$ Shift + Alt + F3 # Switching to CUI +$ Ctrl + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` +To switch back to GUI: +``` +$ Ctrl + Alt + F2 +``` + ##### Note - You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. From 1b757a8d3e0ca37fdb5451bd81ad7a00bae8a234 Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 16:35:04 +0900 Subject: [PATCH 09/11] Fix for review. --- README.md | 4 ++-- examples/flutter-drm-backend/README.md | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 81b24b1a..5a3af1b7 100644 --- a/README.md +++ b/README.md @@ -185,13 +185,13 @@ $ Ctrl + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` -To switch back to GUI: +You need the following command to switch back from CUI to GUI. ``` $ Ctrl + Alt + F2 ``` ##### Note -- You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. +You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. ## 5. Settings of weston.ini file (Only when you use weston desktop-shell) diff --git a/examples/flutter-drm-backend/README.md b/examples/flutter-drm-backend/README.md index 59fb9c50..114df6c3 100644 --- a/examples/flutter-drm-backend/README.md +++ b/examples/flutter-drm-backend/README.md @@ -13,10 +13,16 @@ $ make ## Running Flutter app -`FLUTTER_DRM_DEVICE` must be set properly when you use the DRM backend. The default value is `/dev/dri/card0`. +You need to switch from GUI which is running X11 or Wayland to the Character User Interface (CUI). In addition, `FLUTTER_DRM_DEVICE` must be set properly. The default value is `/dev/dri/card0`. ```Shell +$ Ctrl + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend FLUTTER_BUNDLE_PATH ``` Note that replace `FLUTTER_BUNDLE_PATH` with the flutter bundle path you want to use like ./sample/build/linux/x64/release/bundle. + +You need the following command to switch back from CUI to GUI. +``` +$ Ctrl + Alt + F2 +``` From 733873fde4fc8ddd1be9f742ff19d9e8c68246f8 Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 16:50:13 +0900 Subject: [PATCH 10/11] Fix for review. --- README.md | 2 +- examples/flutter-drm-backend/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a3af1b7..5251db1c 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ $ Ctrl + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` -You need the following command to switch back from CUI to GUI. +If you want to switch back from CUI to GUI, run the following command. ``` $ Ctrl + Alt + F2 ``` diff --git a/examples/flutter-drm-backend/README.md b/examples/flutter-drm-backend/README.md index 114df6c3..3e047216 100644 --- a/examples/flutter-drm-backend/README.md +++ b/examples/flutter-drm-backend/README.md @@ -22,7 +22,7 @@ $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend FLUTTER_BUNDLE_PATH Note that replace `FLUTTER_BUNDLE_PATH` with the flutter bundle path you want to use like ./sample/build/linux/x64/release/bundle. -You need the following command to switch back from CUI to GUI. +If you want to switch back from CUI to GUI, run the following command. ``` $ Ctrl + Alt + F2 ``` From 4c1114848106fe1e90c144d56bce47705c174f5d Mon Sep 17 00:00:00 2001 From: "xMai.Matsuura" Date: Thu, 11 Mar 2021 17:00:42 +0900 Subject: [PATCH 11/11] Fix for revies. --- README.md | 5 +---- examples/flutter-drm-backend/README.md | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 5251db1c..0652ca7c 100644 --- a/README.md +++ b/README.md @@ -185,10 +185,7 @@ $ Ctrl + Alt + F3 # Switching to CUI $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend ./sample/build/linux/x64/release/bundle ``` -If you want to switch back from CUI to GUI, run the following command. -``` -$ Ctrl + Alt + F2 -``` +If you want to switch back from CUI to GUI, run `Ctrl + Alt + F2` keys in a terminal. ##### Note You need to run this program by a user who has the permission to access the input devices(/dev/input/xxx), if you use the DRM backend. Generally, it is a root user or a user who belongs to an input group. diff --git a/examples/flutter-drm-backend/README.md b/examples/flutter-drm-backend/README.md index 3e047216..d40ce64d 100644 --- a/examples/flutter-drm-backend/README.md +++ b/examples/flutter-drm-backend/README.md @@ -22,7 +22,4 @@ $ FLUTTER_DRM_DEVICE="/dev/dri/card1" ./flutter-drm-backend FLUTTER_BUNDLE_PATH Note that replace `FLUTTER_BUNDLE_PATH` with the flutter bundle path you want to use like ./sample/build/linux/x64/release/bundle. -If you want to switch back from CUI to GUI, run the following command. -``` -$ Ctrl + Alt + F2 -``` +If you want to switch back from CUI to GUI, run `Ctrl + Alt + F2` keys in a terminal.