usbguard icon indicating copy to clipboard operation
usbguard copied to clipboard

Usbguard applet

Open aelth opened this issue 4 years ago • 20 comments

Please bring back the Qt applet - it was much easier and more user-friendly to quickly allow/block the device than using the CLI. Or at least make it a separate project that can be used as a GUI for usbguard.

Thanks in advance!

aelth avatar Oct 09 '19 18:10 aelth

FTR: There is https://github.com/6E006B/usbguard-gnome

And GNOME will most likely have a built-in frontend in the next release (3.36).

muelli avatar Oct 09 '19 20:10 muelli

Thanks muelli, I'm aware of that applet, but unfortunately I'm not using GNOME as my WM:(

aelth avatar Oct 10 '19 06:10 aelth

You don't have to in order to use https://github.com/6E006B/usbguard-gnome

muelli avatar Oct 10 '19 12:10 muelli

Hi guys, check this out! https://github.com/Cropi/usbguard-notifier

marektamaskovic avatar Nov 05 '19 14:11 marektamaskovic

As @dkopecek mentioned in his commit, it should be in a separate repo. Maybe he can give us some information?

Lem avatar Nov 06 '19 12:11 Lem

It would have been much better to leave the Qt applet as is, until other solutions are available in all distributions. Right now and for it's probable main purpose (desktop systems), usbguard seems pretty limited by this.

calestyo avatar Jan 22 '20 19:01 calestyo

As @dkopecek mentioned in his commit, it should be in a separate repo. Maybe he can give us some information?

Indeed -- Daniel, can you please upload the repository with the Qt applet? In case it is needed, I can help to create it from the usbguard.git repository.

pinotree avatar Feb 18 '20 19:02 pinotree

My quick and dirty script as an easy to use "gui" https://gist.github.com/kisst/3932f2cc30281915f8ec5be7deed98b3

kisst avatar Jun 16 '20 09:06 kisst

Anything new on this?

calestyo avatar Jul 03 '20 12:07 calestyo

Based on the work of @pinotree (https://github.com/pinotree/usbguard-applet-qt - thanks!) and my own changes, I have created packages for openSUSE Tumbleweed (https://build.opensuse.org/package/show/home:munix9/usbguard-applet-qt). Runs so far, but is not yet fully tested. I can't make a final statement about security, maybe an additional password protection would be useful (paranoia setting).

munix9 avatar Jul 23 '20 09:07 munix9

I actually meant to mention my repo, just that I forgot to do that. As @munix9 noticed, I created https://github.com/pinotree/usbguard-applet-qt, which provides the applet combining all the git history available for it:

  • Qt 5 only (Qt 4 support is dropped)
  • builds with cmake
  • still uses the libusbguard library, although I already started to work to get rid of that dependency (it communicates with usbguard-dbus)
    • at least in https://bugs.debian.org/961374 it was mentioned that this library is not stable; also this bug means you cannot built the applet on Debian distros currently

I need to write a proper README for it...

pinotree avatar Jul 23 '20 09:07 pinotree

I actually meant to mention my repo, just that I forgot to do that. As @munix9 noticed, I created https://github.com/pinotree/usbguard-applet-qt, which provides the applet combining all the git history available for it:

* Qt 5 only (Qt 4 support is dropped)

* builds with cmake

* still uses the libusbguard library, although I already started to work to get rid of that dependency (it communicates with usbguard-dbus)
  
  * at least in https://bugs.debian.org/961374 it was mentioned that this library is not stable; also this bug means you cannot built the applet on Debian distros currently

I need to write a proper README for it...

Thanks for your initiative. I believe we are close to 1.0.0 release and stable API.

radosroka avatar Jul 23 '20 10:07 radosroka

Thanks for your initiative. I believe we are close to 1.0.0 release and stable API.

Oh, and of course it is fine for me if you want to take the applet back within the usbguard project. However, judging from the past happenings, I'd think that this is not wanted. To be clear, I have no problem either way.

pinotree avatar Jul 23 '20 10:07 pinotree

Thanks for your initiative!

@munix9 wrote

I can't make a final statement about security, maybe an additional password protection would be useful (paranoia setting).

I wouldn't do that as it provides no additional security. If your GUI application can access the DBus service, so can any other application written to use DBus. Everyone who can run processes with your permission can do that.

genodeftest avatar Jul 23 '20 19:07 genodeftest

I just tried the CLI and it doesn't work:

usbguard allow-device 059f:1027 IPC ERROR: request id=1: Device lookup: device id: id doesn't exist

I just dont want to waste time with this. It's a shame the applet has been removed. So I'm uninstalling usbguard.

csoler avatar Oct 07 '20 11:10 csoler

okay. There are a few alternatives that you might consider exploring, e.g. usbauth. For the future, I'd be helpful to stick on-topic and avoid inflammatory language to keep everybody focussed on the issue at hand. Thanks.

muelli avatar Oct 07 '20 12:10 muelli

I just tried the CLI and it doesn't work:

usbguard allow-device 059f:1027 IPC ERROR: request id=1: Device lookup: device id: id doesn't exist

I just dont want to waste time with this. It's a shame the applet has been removed. So I'm uninstalling usbguard.

The applet is now in different location:

https://github.com/pinotree/usbguard-applet-qt

it is not part of the usbguard anymore...

When you want to allow a device you need an id. You can get it by listing devices.

$ usbguard list-devices # optionally --blocked
...
25: block id 17ef:6044 serial "" name "ThinkPad USB Laser Mouse" hash "3jp26uF2tSyJrW9tvgnCnniDb2Q4nxKAe/jKFcOGPuA=" parent-hash "1bfHz4/5nO4aYIwQG5Ci/F/9HBCKCPOdq/1eoUswB0M=" via-port "3-9.2" with-interface 03:01:02 with-connect-type "unknown"
...
$ usbguard allow-device 25

radosroka avatar Oct 07 '20 12:10 radosroka

@muelli don't give up, you still have easy options like https://github.com/USBGuard/usbguard/issues/334#issuecomment-644663738 or the external qt libs.

kisst avatar Oct 07 '20 12:10 kisst

Arh. Sorry about the ID. It wasn't very clear in the documentation. When you see "15: block id 059f:1027 serial "S170628000000114", it's not clear that the ID is 15 rather than 059... Thx anyway for the quick response. I'll stick to the CLI for now.

csoler avatar Oct 07 '20 12:10 csoler

Hi guys, anything new on this? I am using command line commands, this is not a problem for me. But for many users it is. And i believe those users also need protection and security, i. e. this application is intended to them. It would be great if there was some good GUI for them.

MatejKovacic avatar Nov 01 '22 14:11 MatejKovacic