multibootusb icon indicating copy to clipboard operation
multibootusb copied to clipboard

Remove requirement to run as root on Linux

Open bgni opened this issue 5 years ago • 2 comments

Basic functionality of running as non-privileged user is working but I've not written a lot of Python and I don't know a lot about making a bootable usb so I expect that there are issues with this PR.

bgni avatar Apr 08 '20 17:04 bgni

I get Error: Error opening /dev/sdb: Permission denied:

No USB disk found...
Using pyudev for detecting USB drives...
	/dev/sdb
	/dev/sdb1
Traceback (most recent call last):
  File "/home/fubar/temp/multibootusb/scripts/mbusb_gui.py", line 167, in onComboChange
    usb.gpt_device(config.usb_disk)
  File "/home/fubar/temp/multibootusb/scripts/usb.py", line 387, in gpt_device
    is_gpt = osdriver.gpt_device(dev_name)
  File "/home/fubar/temp/multibootusb/scripts/osdriver.py", line 412, in gpt_device
    raise RuntimeError(str(_err_out, encoding))
RuntimeError: Error: Error opening /dev/sdb: Permission denied

It fails running parted /dev/sdb -s print. Are you able to use parted with a non-root user? I thought root permissions are required for this!?

PS: If the USB stick isn't already mounted with udisk (through GNOME), it cannot even find the device:

No USB device found...
Using pyudev for detecting USB drives...

But this happens also when running under root.

ckotte avatar Jul 20 '20 18:07 ckotte

I like how multibootusb currently can make modifications to the USB drive whenever the user clicks "Install distro" and installs another distro. This requires either root/sudo access or more fine grained access for the current user. This is not a problem with multibootusb.

However, multibootusb could also, in theory, provide value just by letting users assemble an image and then launch it in QEMU using the "Boot ISO/USB" button, without needing to access a device.

xyproto avatar Sep 22 '20 21:09 xyproto