Skip to content

Commit

Permalink
expand remote user permissions check to render group
Browse files Browse the repository at this point in the history
remote users need to be a member of the `render` group to be able to use GPU devices.
  • Loading branch information
ardera committed Aug 8, 2024
1 parent 57b601f commit 1718682
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/cli/commands/devices.dart
Original file line number Diff line number Diff line change
Expand Up @@ -463,13 +463,13 @@ class DevicesAddCommand extends FlutterpiCommand {
}

final hasPermissions =
await ssh.remoteUserBelongsToGroups(['video', 'input']);
await ssh.remoteUserBelongsToGroups(['video', 'input', 'render']);
if (!hasPermissions) {
final addGroupsCommand = ssh
.buildSshCommand(
interactive: null,
allocateTTY: true,
command: r"'sudo usermod -aG video,input $USER'",
command: r"'sudo usermod -aG video,input,render $USER'",
)
.join(' ');

Expand All @@ -479,7 +479,7 @@ class DevicesAddCommand extends FlutterpiCommand {
'The remote user needs permission to use display and input devices.',
message:
'To add the necessary permissions, run the following command in your terminal.\n'
'NOTE: This gives any app running as the remote user access to the display and input devices. '
'NOTE: This gives any app running as the remote user access to the display, input and render devices. '
'If you\'re running untrusted code, consider the security implications.\n',
command: addGroupsCommand,
),
Expand Down

0 comments on commit 1718682

Please sign in to comment.