是否有某种特定的方法可以授予 LibreOffice(在我的情况下特别是 calc)对我的主目录的写入权限,或者这是否完全违背了使用 snap 的初衷?
我打开的每份文件都写着:
The lock file could not be created for exclusive access by LibreOfficem, due to missing permission to create a lock file on that file location or lack of free disk space.
编辑:
Wed May 02 10:40 AM ~: df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.8G 0 7.8G 0% /dev
tmpfs 1.6G 2.2M 1.6G 1% /run
/dev/mapper/ubuntu--vg-root 467G 43G 400G 10% /
tmpfs 7.9G 284M 7.6G 4% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/loop0 141M 141M 0 100% /snap/gnome-3-26-1604/59
/dev/loop2 3.8M 3.8M 0 100% /snap/gnome-system-monitor/39
/dev/loop1 13M 13M 0 100% /snap/gnome-characters/69
/dev/loop5 87M 87M 0 100% /snap/core/4486
/dev/loop3 94M 94M 0 100% /snap/slack/6
/dev/loop4 141M 141M 0 100% /snap/gnome-3-26-1604/62
/dev/loop6 135M 135M 0 100% /snap/discord/60
/dev/loop7 136M 136M 0 100% /snap/gimp/30
/dev/loop8 145M 145M 0 100% /snap/gimp/33
/dev/loop9 584M 584M 0 100% /snap/intellij-idea-ultimate/42
/dev/loop10 194M 194M 0 100% /snap/goland/13
/dev/loop11 34M 34M 0 100% /snap/sublime-text/7
/dev/nvme0n1p2 705M 86M 568M 14% /boot
/dev/loop12 3.4M 3.4M 0 100% /snap/gnome-system-monitor/36
/dev/loop13 240M 240M 0 100% /snap/pycharm-community/60
/dev/nvme0n1p1 511M 4.7M 507M 1% /boot/efi
/dev/loop14 126M 126M 0 100% /snap/discord/52
/dev/loop15 21M 21M 0 100% /snap/gnome-logs/25
/dev/loop16 22M 22M 0 100% /snap/gnome-logs/31
/dev/loop17 458M 458M 0 100% /snap/libreoffice/59
/dev/loop18 1.7M 1.7M 0 100% /snap/gnome-calculator/154
/dev/loop19 2.4M 2.4M 0 100% /snap/gnome-calculator/167
/dev/loop20 163M 163M 0 100% /snap/spotify/13
/dev/loop21 13M 13M 0 100% /snap/gnome-characters/86
tmpfs 1.6G 16K 1.6G 1% /run/user/120
tmpfs 1.6G 92K 1.6G 1% /run/user/1000
以下是系统日志的片段:
May 2 11:30:24 legion kernel: [11375.932122] audit: type=1400 audit(1525285824.016:135461): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=6007 comm="Discord" requested_mask="trace" denied_mask="trace" peer="unconfined"
May 2 11:30:24 legion guake.desktop[3757]: Showing the terminal
May 2 11:30:28 legion dbus-daemon[2080]: apparmor="DENIED" operation="dbus_method_call" bus="session" path="/org/libreoffice" interface="org.freedesktop.DBus.Properties" member="GetAll" name=":1.13" mask="receive" pid=15688 label="snap.libreoffice.calc" peer_pid=2219 peer_label="unconfined"
May 2 11:30:34 legion kernel: [11385.935299] kauditd_printk_skb: 150 callbacks suppressed
May 2 11:30:34 legion kernel: [11385.935302] audit: type=1400 audit(1525285834.016:135612): apparmor="DENIED" operation="ptrace" profile="snap.discord.discord" pid=6007 comm="Discord" requested_mask="trace" denied_mask="trace" peer="unconfined"
以下是 home.d 的内容:
Wed May 02 11:33 AM home.d: la
total 8.0K
-rw-r--r-- 1 root root 634 Apr 17 13:15 site.local
-rw-r--r-- 1 root root 337 Apr 26 11:23 ubuntu
/etc/apparmor.d/tunables/home.d
site.local的内容:
Wed May 02 11:33 AM home.d: cat site.local
# ------------------------------------------------------------------
#
# Copyright (C) 2010 Canonical Ltd.
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License published by the Free Software Foundation.
#
# ------------------------------------------------------------------
# The following is a space-separated list of where additional user home
# directories are stored, each must have a trailing '/'. Directories added
# here are appended to @{HOMEDIRS}. See tunables/home for details. Eg:
#@{HOMEDIRS}+=/srv/nfs/home/ /mnt/home/
ubuntu 的内容
Wed May 02 11:33 AM home.d: cat ubuntu
# This file is auto-generated. It is recommended you update it using:
# $ sudo dpkg-reconfigure apparmor
#
# The following is a space-separated list of where additional user home
# directories are stored, each must have a trailing '/'. Directories added
# here are appended to @{HOMEDIRS}. See tunables/home for details.
#@{HOMEDIRS}+=
答案1
进入 Ubuntu 软件商店并搜索 Libre Office。它应该显示已安装,并有 3 个选项:1.启动、2.删除和 3.权限。从权限按钮检查权限是如何设置的。
答案2
安装包libreoffice-gtk3为我解决了这个问题。
sudo aptitude install libreoffice-gtk3