how to get sudo permission on installtion of Qt application on Linux?
Unsolved
General and Desktop
-
I would like to set some custom rule while installing my application on linux platform.
#!/bin/bash # Add user to dialout group sudo usermod -aG dialout $USER # Create or update Udev rule for changing the group of HID raw devices echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"' | sudo tee /etc/udev/rules.d/99-change-hidraw-group.rules > /dev/null # Reload Udev rules sudo udevadm control --reload-rules
how can i execute this custom rule during installtion process. since it is require enter password from user.
function Controller() { // Execute the setup_permissions.sh script installer.executeDetached("sudo", ["./setup_permissions.sh"]); }
I can add this things installtion in script. But I don't know how the user will enter password during installtion.
or
Is there any alternative available such that user do not require permission or group for USB and hid devices?
-
@Yash001 this is just general advice. on linux, to run commands as part of the installation is usually handled by postinst.src if deb based, or under %dir section (.spec file) if centos based distro, which are part of respective .rpm or .deb files.