1

emacs doesn't start on a recently installed installation of Kubuntu 24.04.2 LTS. I did an 'apt-get install emacs' and it gave me some 'snap' installation of emacs. You'd think emacs would be a pretty routine thing to use on Linux. First, the error message was:

---ribo@box petaLinux22: emacs plr
cannot create user data directory: /home/ribo/snap/emacs/2504: Not a directory

My /home/ribo directory is a symbolic link to /tie/base/home/ribo, I needed that directory to be on a LVM volume that had more space. The wisdom of the internet says that apparmor doesn't like symbolic links in /home for some reason. (My userid has read access to all directories in the relevant paths. /home/ribo/snap/emacs/2504 is indeed an existing directory.)

/etc/apparmor.d/tunables/home.d/ubuntu now contains:

@{HOMEDIRS}+=/tie/base/home/

Which is supposed to make apparmor accept my alternate home directory and solve the symbolic link issue. Some of this advice is coming from Microsoft Copilot, so they may be trolling me.

I used 'aa-complain' to try tell it to allow 'snap' to work. Now I get this:

---ribo@box petaLinux22: emacs 2025/02/12 17:29:42.457447 tool_linux.go:83: cannot open snapd info file
"/snap/snapd/current/usr/lib/snapd/info": open
/snap/snapd/current/usr/lib/snapd/info: permission denied 2025/02/12
17:29:42.457764 system_key.go:132: cannot determine nfs usage in
generateSystemKey: cannot parse mountinfo: open /proc/self/mountinfo:
permission denied internal error, please report: running "emacs"
failed: timeout waiting for snap system profiles to get updated

/snap/snapd/current/usr/lib/snapd/info exists and is owned by root and has -rw-r--r-- access. /proc/self/mountinfo exists and has access -- these seem reasonable.

This is the Ubuntu release I'm using. Firefox also complains of some other file being not a directory, which seems like a similar issue. I did have emacs and firefox working on the previous Kubuntu LTS release.

---ribo@box petaLinux22: lsb_release -a No LSB modules are available. Distributor ID: 
Ubuntu Description:    Ubuntu 24.04.2 LTS Release:    
24.04 Codename:       noble

I don't understand what apparmor is complaining about. How do I fix this?

Ribo
  • 111

0 Answers0