bugGNU Octave - Bugs: bug #56721, pkg list command gives errors


bug #56721: pkg list command gives errors

Submitted by:  Nadir Latif <nadirlc>
Submitted on:  Tue 06 Aug 2019 12:23:34 PM UTC  
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Missed Error or Warning
Status:  None Assigned to:  None
Originator Name:  Nadir Latif Open/Closed:  Closed
Release:  5.1.0 Operating System:  GNU/Linux

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Thu 24 Oct 2019 12:27:26 AM UTC, comment #4: 

Nadir - if this is still a problem for you, please report it at https://github.com/octave-snap/octave-snap/issues

Mike Miller <mtmiller>
Project Administrator
Wed 07 Aug 2019 04:55:44 PM UTC, comment #3: 

If you want something that just works much better, please use the Flatpak version of Octave. The Snap package is only a few weeks old, is still in beta, and has many known issues.

Mike Miller <mtmiller>
Project Administrator
Wed 07 Aug 2019 01:30:25 PM UTC, comment #2: 

The snap packaging on Ubuntu is not good. After installation, the Octave icon is not created. I had to manually create the icon file. I had to create the file: ~/local/share/applications/octave.desktop with the contents:

[Desktop Entry]
Name=GNU Octave
Exec=env LC_ALL=C.UTF-8 snap run octave --force-gui

Also the AppArmor rules for Octave are incomplete and do not permit the pkg command. I had to manually edit the rules file in order to get the pkg command to work

Nadir Latif <nadirlc>
Tue 06 Aug 2019 06:17:01 PM UTC, comment #1: 

I can't reproduce this with the Octave snap on Debian, possibly because the AppArmor enforcement is different between Debian and Ubuntu.

Please feel free to suggest ways to improve the snap packaging, but editing an AppArmor rules file isn't one of those as far as I know.

This is not an Octave bug. Up to the other Octave maintainers if we want to consider snap bugs off or on topic here.

Mike Miller <mtmiller>
Project Administrator
Tue 06 Aug 2019 12:23:34 PM UTC, original submission:  

When running the command: pkg list -forge, it gives a network error. I checked the syslog file and it showed several warning messages from AppArmor.

I got the same error on Ubuntu 19.04 after installing Octave from a snap package. The problem was that Apparmor was blocking requests to network resources. The problem was corrected by editing the Octave Apparmor profile file. The following steps fixed the problem:

1. Add following rules to the file: /var/lib/snapd/apparmor/profiles/snap.octave.octave. The rules should be added to the bottom of the file, just before the closing parenthesis
Add following rules:
owner @{HOME}/.bash_logout r,
owner @{HOME}/.xinputrc r,
owner @{HOME}/.pam_environment r,
owner @{HOME}/.bashrc r,
owner @{HOME}/.bash_history r,
owner @{HOME}/.profile r,
owner @{HOME}/.cache/mesa_shader_cache/index rw,
owner @{HOME}/.sudo_as_admin_successful r,

/usr/share/ca-certificates/mozilla/* r,
/etc/ssl/certs/ r,
/run/systemd/resolve/stub-resolv.conf r,
/etc/hosts r,
/etc/host.conf r,
/etc/ssl/certs/ca-certificates.crt r,
network inet stream,
network inet6 dgram,
network inet dgram,

2. Reload the Octave Apparmor profile using the command: sudo apparmor_parser -r /var/lib/snapd/apparmor/profiles/snap.octave.octave

3. Restart Octave

4. Run the command pkg list -forge

Nadir Latif <nadirlc>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by nadirlc (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-06 mtmiller Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.5