Results 1 to 8 of 8

Thread: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

  1. #1
    Join Date
    Aug 2020
    Beans
    12

    How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    Solved by running chromium with this command:
    Code:
    /snap/chromium/current/usr/lib/chromium-browser/chrome

    ////////////////////////////////////////////////////////////////////////////////////////////////////////


    When I type:

    Code:
    sudo apparmor_status
    these 2 profiles are shown as enforce:
    Code:
    snap.chromium.chromedriver
    snap.chromium.chromium
    When I type:

    Code:
    sudo aa-complain /var/lib/snapd/apparmor/profiles/snap.chromium.chromium
    I get this message:

    Code:
    Profile for /var/lib/snapd/apparmor/profiles/snap.chromium.chromium not found, skipping
    I want to remove the Chromium apparmor profiles from [enforce] because I'm pretty sure it's interfering with u2f (my USB device is usable in it's desktop app, but not in Chromium). I'm using the default Chromium version that gets installed in Ubuntu 20.04 (installed using Synaptic).
    Last edited by ajgreeny; August 19th, 2020 at 08:17 PM. Reason: Huge font normalised

  2. #2
    Join Date
    May 2013
    Location
    Galiza
    Beans
    2,626
    Distro
    Ubuntu

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    I'm not sure it has anything to do with apparmor. It may have something to do with snap limitations (app confinement). Chromium is actually a snap, installed by the .deb file in the repositories.

    Please wait for other posts.

  3. #3
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,535
    Distro
    Ubuntu

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    uf2 devices is a plug/slot in chromium which can be set in The Chromium's home page Permissions tab in Software.
    (or check it with the snap connections command)
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  4. #4
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,338
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    # See the available options for a snap package
    $ snap connections <application-name>

    Looks like chromium has
    Code:
    u2f-devices               chromium:u2f-devices               :u2f-devices
    as connections. There are a bunch.

    Code:
    snap connect chromium:u2f-devices
    should allow the u2f connection. I didn't test it.

    You can run chromium from the snap, but without the snap constraints. Just point directly at the application and run it.
    /snap/chromium/current/usr/lib/chromium-browser/chrome &
    May want to use constraints that you control, like firejail, however.

  5. #5
    Join Date
    Aug 2020
    Beans
    12

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    Quote Originally Posted by deadflowr View Post
    uf2 devices is a plug/slot in chromium which can be set in The Chromium's home page Permissions tab in Software.
    (or check it with the snap connections command)
    Quote Originally Posted by TheFu View Post
    # See the available options for a snap package
    $ snap connections <application-name>

    Looks like chromium has
    Code:
    u2f-devices               chromium:u2f-devices               :u2f-devices
    as connections. There are a bunch.

    Code:
    snap connect chromium:u2f-devices
    should allow the u2f connection. I didn't test it.
    Thank you for your reply. I typed [snap connect chromium:u2f-devices] into my terminal but unfortunately it didn't let me use my usb device (ledger nano s) with chromium

    I was however able to get it working in Firefox by completely disabling apparmor [sudo systemctl stop apparmor > sudo systemctl disable apparmor]


    Quote Originally Posted by TheFu View Post
    You can run chromium from the snap, but without the snap constraints. Just point directly at the application and run it.
    /snap/chromium/current/usr/lib/chromium-browser/chrome &
    Sorry what do you mean by this? what would be the exact command to type into the terminal to do this?

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    21,338
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    Quote Originally Posted by fluffy20470-50233 View Post
    Sorry what do you mean by this? what would be the exact command to type into the terminal to do this?
    Code:
    $  /snap/chromium/current/usr/lib/chromium-browser/chrome &
    Leave off the beginning "$" - that just shows that a normal userid is being used.

  7. #7
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    11,535
    Distro
    Ubuntu

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    It might just be that the snap doesn't have support for this particular device.
    What you might do is try asking about the device's support and how to help get it fixed over in this thread:
    https://discourse.ubuntu.com/t/call-...ansition/11179
    Here's a similar issue (different device): https://bugs.launchpad.net/ubuntu/+s...r/+bug/1851211
    You'll most likely be asked to file a bug so see: https://help.ubuntu.com/community/ReportingBugs
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  8. #8
    Join Date
    Aug 2020
    Beans
    12

    Re: How to disable apparmor for Chromium snap? (Ubuntu 20.04)

    Quote Originally Posted by TheFu View Post
    Code:
    $  /snap/chromium/current/usr/lib/chromium-browser/chrome &
    Leave off the beginning "$" - that just shows that a normal userid is being used.
    Thank you. This allowed me to use my usb device (Ledger Nano S) with Chromium.

    Quote Originally Posted by deadflowr View Post
    It might just be that the snap doesn't have support for this particular device.
    What you might do is try asking about the device's support and how to help get it fixed over in this thread:
    https://discourse.ubuntu.com/t/call-...ansition/11179
    Here's a similar issue (different device): https://bugs.launchpad.net/ubuntu/+s...r/+bug/1851211
    You'll most likely be asked to file a bug so see: https://help.ubuntu.com/community/ReportingBugs

    Thank you. I got it working with Chromium thanks to TheFu's command, and I also got it working with Firefox after disabling apparmor completely (using: sudo systemctl stop apparmor > sudo systemctl disable apparmor).

    I prefer Firefox so I'm going to try to get it working in Firefox without completely disabling apparmor.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •