AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-426176

SebMa's questions

Martin Hope
SebMa
Asked: 2025-02-22 01:28:42 +0800 CST

如何使用 openssh 代理 systemd 用户“ssh-agent.service”?

  • 6

我尝试在 Ubuntu 24.04 上使用 openssh ssh 代理 systemd 用户服务。

从 Ubuntu 16.10 开始,openssh-client软件包包含一个ssh-agent.service用户服务文件:

$ lsb_release -sr
No LSB modules are available.
24.04
$ dpkg -S user/ssh-agent.service
openssh-client: /usr/lib/systemd/user/ssh-agent.service
$ systemctl --user cat ssh-agent.service
# /usr/lib/systemd/user/ssh-agent.service
[Unit]
Description=OpenSSH Agent
Documentation=man:ssh-agent(1)
Before=graphical-session-pre.target
ConditionPathExists=/etc/X11/Xsession.options
Wants=dbus.socket
After=dbus.socket

[Service]
# If you need to pass extra arguments to ssh-agent, you can use "systemctl
# --user edit ssh-agent.service" to add a drop-in unit with contents along
# these lines:
#   [Service]
#   ExecStart=
#   ExecStart=/usr/lib/openssh/agent-launch start -- -t 1200
ExecStart=/usr/lib/openssh/agent-launch start
ExecStopPost=/usr/lib/openssh/agent-launch stop
$

因此我尝试启动它但它没有活动:

$ systemctl --user start ssh-agent.service
$ systemctl --user is-active ssh-agent.service
inactive
$

经过一些研究,我设置了SSH_AUTH_SOCK变量:

$ ssh myUbuntu-24-04-Server
$ export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/openssh_agent
$ systemctl --user stop ssh-agent.service
$ systemctl --user start ssh-agent.service
$ ls $SSH_AUTH_SOCK
ls: cannot access '/run/user/1000/openssh_agent': No such file or directory
$ systemctl --user is-active ssh-agent.service
inactive
$ systemctl --user status ssh-agent.service
○ ssh-agent.service - OpenSSH Agent
     Loaded: loaded (/usr/lib/systemd/user/ssh-agent.service; static)
     Active: inactive (dead)
       Docs: man:ssh-agent(1)

Feb 21 17:41:56 myUbuntu-24-04-Server systemd[118809]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:08:15 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:10:31 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:11:24 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:18:49 myUbuntu-24-04-Server systemd[119442]: Started ssh-agent.service - OpenSSH Agent.
$

但是,此服务在以前的 Ubuntu LTS(22.04)上启动正常:

$ ssh myUbuntu-22-04-Server
$ lsb_release -sr
22.04
$ export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/openssh_agent
$ systemctl --user start ssh-agent.service
$ systemctl --user status ssh-agent.service
● ssh-agent.service - OpenSSH Agent
     Loaded: loaded (/usr/lib/systemd/user/ssh-agent.service; static)
     Active: active (running) since Fri 2025-02-21 18:40:55 CET; 4min 17s ago
       Docs: man:ssh-agent(1)
   Main PID: 23068 (ssh-agent)
      Tasks: 1 (limit: 19005)
     Memory: 1.1M
        CPU: 6ms
     CGroup: /user.slice/user-1000.slice/[email protected]/app.slice/ssh-agent.service
             └─23068 ssh-agent -D -a /run/user/1000/openssh_agent

Feb 21 18:40:55 myUbuntu-22-04-Server systemd[22133]: Started OpenSSH Agent.
Feb 21 18:40:55 myUbuntu-22-04-Server agent-launch[23070]: dbus-update-activation-environment: setting SSH_AUTH_SOCK=/run/user/1000/openssh_agent
Feb 21 18:40:55 myUbuntu-22-04-Server agent-launch[23070]: dbus-update-activation-environment: setting SSH_AGENT_LAUNCHER=openssh
Feb 21 18:40:55 myUbuntu-22-04-Server agent-launch[23068]: SSH_AUTH_SOCK=/run/user/1000/openssh_agent; export SSH_AUTH_SOCK;
Feb 21 18:40:55 myUbuntu-22-04-Server agent-launch[23068]: echo Agent pid 23068;
$ ssh-add -l
The agent has no identities.
$

EDIT0:我的错,SSH_AUTH_SOCK没有必要手动设置变量。

我在 Ubuntu 22.04 上重新测试了,无需手动设置变量就可以正常工作 SSH_AUTH_SOCK。

但在 Ubuntu 24.04 上,我得到的结果如下:

$ ssh -X myUser@myUbuntu-24-04-Server
myUser@myUbuntu-24-04-Server:~$ echo $XDG_RUNTIME_DIR
/run/user/1000
myUser@myUbuntu-24-04-Server:~$ echo $SSH_AUTH_SOCK

myUser@myUbuntu-24-04-Server:~$ grep use-ssh-agent /etc/X11/Xsession.options
use-ssh-agent
myUser@myUbuntu-24-04-Server:~$ unset SSH_AUTH_SOCK
myUser@myUbuntu-24-04-Server:~$ systemctl --user start ssh-agent.service
myUser@myUbuntu-24-04-Server:~$ systemctl --user status ssh-agent.service
○ ssh-agent.service - OpenSSH Agent
     Loaded: loaded (/usr/lib/systemd/user/ssh-agent.service; static)
     Active: inactive (dead)
       Docs: man:ssh-agent(1)

Feb 21 17:41:56 myUbuntu-24-04-Server systemd[118809]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:08:15 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:10:31 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:11:24 myUbuntu-24-04-Server systemd[119096]: Started ssh-agent.service - OpenSSH Agent.
Feb 21 18:18:49 myUbuntu-24-04-Server systemd[119442]: Started ssh-agent.service - OpenSSH Agent.
Feb 24 17:54:39 myUbuntu-24-04-Server systemd[151016]: Started ssh-agent.service - OpenSSH Agent.
Feb 24 17:56:01 myUbuntu-24-04-Server systemd[151016]: Started ssh-agent.service - OpenSSH Agent.
Feb 24 18:15:38 myUbuntu-24-04-Server systemd[151355]: Started ssh-agent.service - OpenSSH Agent.
Feb 24 18:17:06 myUbuntu-24-04-Server systemd[151355]: Started ssh-agent.service - OpenSSH Agent.
myUser@myUbuntu-24-04-Server:~$ systemctl --user is-active ssh-agent.service
inactive
myUser@myUbuntu-24-04-Server:~$ ssh-add -l
Could not open a connection to your authentication agent. 
myUser@myUbuntu-24-04-Server:~$ 

你能帮助我吗 ?

24.04
  • 1 个回答
  • 114 Views
Martin Hope
SebMa
Asked: 2024-11-21 01:11:00 +0800 CST

如何安装特定的 LaTeX 软件包版本而不干扰已从 texlive-latex-* DEB 软件包安装的其他 LaTeX 软件包

  • 6

ptex-jtex包含 LaTeX 包的 DEB 包已从multicol.sty多元宇宙中删除:ptex-jtex。

EDIT0:我已经安装了texlive-latex-extra或texlive-latex-base包。

以下是我所做过的和所做的:

$ dpkg -l | grep texlive-
ii  texlive-base                          2023.20240207-1                         all          TeX Live: Essential programs and files
ii  texlive-binaries                      2023.20230311.66589-9build3             amd64        Binaries for TeX Live
ii  texlive-fonts-recommended             2023.20240207-1                         all          TeX Live: Recommended fonts
ii  texlive-latex-base                    2023.20240207-1                         all          TeX Live: LaTeX fundamental packages
ii  texlive-latex-extra                   2023.20240207-1                         all          TeX Live: LaTeX additional packages
ii  texlive-latex-recommended             2023.20240207-1                         all          TeX Live: LaTeX recommended packages
ii  texlive-pictures                      2023.20240207-1                         all          TeX Live: Graphics, pictures, diagrams
ii  texlive-plain-generic                 2023.20240207-1                         all          TeX Live: Plain (La)TeX packages
$
$ tlmgr init-usertree
$ tlmgr update --list
(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)

tlmgr: Local TeX Live (2023) is older than remote repository (2024).
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.
$ tlmgr info multicol
(running on Debian, switching to user mode!)
(see /usr/share/doc/texlive-base/README.tlmgr-on-Debian.md)

tlmgr: Local TeX Live (2023) is older than remote repository (2024).
Cross release updates are only supported with
  update-tlmgr-latest(.sh/.exe) --update
See https://tug.org/texlive/upgrade.html for details.
$

如何安装特定版本的LaTeX 包而不更新/破坏已从DEB 包multicol.sty安装的其他 LaTeX 包?texlive-latex-*

24.04
  • 1 个回答
  • 47 Views
Martin Hope
SebMa
Asked: 2022-07-06 01:08:54 +0800 CST

Ubuntu LTS 22.04 服务器最小安装上缺少联机帮助页

  • 1

我已经安装了 22.04 LTS Ubuntu Server 作为最小安装并安装了以下软件包:

vim man-db manpages dialog bash-completion screen

现在当我运行时man ls,ubuntu 要求我运行unminimize命令,尽管 man 包已经安装:

$ dpkg -l | egrep "man-db|manpages"
ii  isc-dhcp-common                       4.4.1-2.3ubuntu2.1                      amd64        common manpages relevant to all of the isc-dhcp packages
ii  man-db                                2.10.2-1                                amd64        tools for reading manual pages
ii  manpages                              5.10-1ubuntu1                           all          Manual pages about using a GNU/Linux system

目录/usr/share/man/man1为空:

$ ls /usr/share/man/man1
$ man -w ls
This system has been minimized by removing packages and content that are
not required on a system that users do not log into.

To restore this content, including manpages, you can run the 'unminimize'
command. You will still need to ensure the 'man-db' package is installed.

和mandb输出:

$ sudo mandb
Purging old database entries in /usr/share/man...
Processing manual pages under /usr/share/man...
Purging old database entries in /usr/share/man/id...
Processing manual pages under /usr/share/man/id...
...
Processing manual pages under /usr/local/man...
mandb: can't update index cache /var/cache/man/oldlocal/8087: No such file or directory
0 man subdirectories contained newer manual pages.
0 manual pages were added.
0 stray cats were added.
0 old database entries were purged.
$

最奇怪的是:

$ ls $(dpkg -L coreutils | grep man1/ls.1)
ls: cannot access '/usr/share/man/man1/ls.1.gz': No such file or directory

发现这个:

$ dpkg -S bin/man
man-db: /usr/bin/manpath
local diversion from: /usr/bin/man
local diversion to: /usr/bin/man.REAL
man-db: /usr/bin/man
local diversion from: /usr/bin/man
local diversion to: /usr/bin/man.REAL
man-db: /usr/bin/mandb
man-db: /usr/bin/man-recode
$ head $(which man)
#!/bin/sh
echo "This system has been minimized by removing packages and content that are"
echo "not required on a system that users do not log into."
echo ""
echo "To restore this content, including manpages, you can run the 'unminimize'"
echo "command. You will still need to ensure the 'man-db' package is installed."
$ man.REAL -w ls
No manual entry for ls

如何在不最小化 Ubuntu 的情况下解决这个问题?

server
  • 1 个回答
  • 267 Views
Martin Hope
SebMa
Asked: 2022-02-15 04:56:18 +0800 CST

我需要在Ubuntu Focal上sddm配置的[General]部分添加Numlock=on,sddm.conf在哪里?

  • 0

我需要在 sddm 配置部分添加Numlock=on,[General]但我找不到它:

$ man sddm.conf | grep -1 sddm.conf
NAME
       sddm.conf - sddm display manager configuration

--

       /usr/lib/sddm/sddm.conf.d
              System configuration directory

       /etc/sddm.conf.d
              Local configuration directory

       /etc/sddm.conf
              Local configuration file for compatibility
$ ls /usr/lib/sddm/sddm.conf.d/ /etc/sddm.conf.d/ /etc/sddm.conf
ls: cannot access '/usr/lib/sddm/sddm.conf.d/': No such file or directory
ls: cannot access '/etc/sddm.conf.d/': No such file or directory
ls: cannot access '/etc/sddm.conf': No such file or directory

在哪里sddm.conf?

20.04
  • 1 个回答
  • 111 Views
Martin Hope
SebMa
Asked: 2021-12-14 08:52:56 +0800 CST

通过 Dalvik VM 或 Android Runtime 在 Ubuntu Touch 上安装和运行 Android 应用程序?

  • 0

我在旧的 Jolla1 手机上使用了 Linux SailFish OS,我记得我可以通过Alien Dalvik VM安装和运行 Android 应用程序。

到目前为止,有一个名为AppSupport for Linux Platforms的公司,我引用它(来自https://jolla.com/appsupport):

gives any embedded Linux-compatible platform capability to run Android apps

是否可以在另一个组件上安装 Dalvik VM 或 Android 运行时,使我们能够在 Ubuntu Touch 上运行 Android 应用程序?

ubuntu-touch
  • 2 个回答
  • 964 Views
Martin Hope
SebMa
Asked: 2021-11-07 02:19:27 +0800 CST

Kubuntu 中新标准用户的默认组是什么?

  • 1

我想知道默认情况下哪些组是简单(非管理员)用户的成员。

然后我将像这样编写用户组成员船脚本:

for group in $simpleUserGroups
do
    groups $userName | grep -q $group || $sudo adduser $userName $group
done

所以我去了 KUbuntu 20.04.3 LTS 的 GUI,kcmshell5 user_manager在填写字段(名称、密码等)后管理用户(),当我点击Apply什么也没发生(系统应该打开一个弹出窗口提示管理员密码):请参阅启动板错误 #1883357。

当我检查用户是否已创建时,我得到:

$ id testUser
id: ‘testUser’: no such user

EDIT0:您可以通过执行以下操作每次重现此错误:

$ ssh -X remote-PC
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-89-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

68 updates can be applied immediately.
To see these additional updates run: apt list --upgradable

Web console: https://seb-x-y-z:9090/ or https://192.168.x.Y:9090/

Last login: Sun Nov  7 16:10:48 2021 from 127.0.0.1


.cache -> /tmp/sebastien/.cache/

dim. 07 nov. 2021 16:12:19 CET

$ kcmshell5 user_manager
Warning: QT_DEVICE_PIXEL_RATIO is deprecated. Instead use:
   QT_AUTO_SCREEN_SCALE_FACTOR to enable platform plugin controlled per-screen factors.
   QT_SCREEN_SCALE_FACTORS to set per-screen factors.
   QT_SCALE_FACTOR to set the application global scale factor.
Couldn't load plugin: "The shared library was not found."
qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 1938, resource id: 32072962, major code: 40 (TranslateCoords), minor code: 0

然后单击“应用”,您会注意到没有弹出 sudo 密码窗口。

默认情况下,非管理员用户在 KUbuntu 上属于哪些组?

20.04
  • 1 个回答
  • 404 Views
Martin Hope
SebMa
Asked: 2021-10-27 14:54:06 +0800 CST

当 snapd 不可用时,如何在我的 /var/lib/snapd 文件系统上正确释放空间?

  • 5

我正在使用 Ubuntu 20.04 LTS。

我的 snapd 服务不可用:

$ systemctl status snapd.service
● snapd.service - Snap Daemon
     Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
     Active: deactivating (stop-sigterm) (Result: timeout)
TriggeredBy: ● snapd.socket
   Main PID: 29952 (snapd)
      Tasks: 10 (limit: 8186)
     Memory: 12.8M
     CGroup: /system.slice/snapd.service
             └─29952 /usr/lib/snapd/snapd

Oct 27 00:47:07 seb-C70D-B-311 systemd[1]: Starting Snap Daemon...
Oct 27 00:47:07 seb-C70D-B-311 snapd[29952]: AppArmor status: apparmor is enabled and all features are available
Oct 27 00:47:07 seb-C70D-B-311 snapd[29952]: AppArmor status: apparmor is enabled and all features are available
Oct 27 00:48:37 seb-C70D-B-311 systemd[1]: snapd.service: start operation timed out. Terminating.
$ time snap version
snap    2.52.1
snapd   unavailable
series  -

real    0m25.075s
user    0m0.036s
sys 0m0.060s

我的/var/lib/snapd文件系统已满:

$ df -PTh /var/lib/snapd
Filesystem                                                            Type  Size  Used Avail Use% Mounted on
/dev/mapper/VG_Samsung_SSD_860_EVO_1TB__S3Z9NB0K4019-LV_var_lib_snapd ext4  4.9G  4.9G     0 100% /var/lib/snapd
$ ls -lh /var/lib/snapd/snaps
total 4.0G
-rw------- 1 root root  68K Sep 10 23:08 acrordrdc_53.snap
-rw------- 1 root root  68K Sep 20 13:03 acrordrdc_62.snap
-rw------- 2 root root 4.0K Sep 26 12:44 bare_5.snap
-rw------- 1 root root 146M Oct 10 21:58 chromium_1781.snap
-rw------- 2 root root 145M Oct 23 12:29 chromium_1801.snap
-rw------- 1 root root  56M Jun 23 18:57 core18_2074.snap
-rw------- 1 root root  56M Aug 15 17:45 core18_2128.snap
-rw------- 1 root root  62M Jul 24 10:15 core20_1081.snap
-rw------- 1 root root  62M Oct  8 22:05 core20_1169.snap
-rw------- 1 root root 100M Oct 15 11:18 core_11798.snap
-rw------- 1 root root 100M Oct 21 12:26 core_11993.snap
-rw------- 2 root root 163M Dec 19  2020 gnome-3-28-1804_145.snap
-rw------- 1 root root 165M Jul  8 16:18 gnome-3-28-1804_161.snap
-rw------- 1 root root 219M Jan  9  2021 gnome-3-34-1804_66.snap
-rw------- 1 root root 219M Jun 14 14:23 gnome-3-34-1804_72.snap
-rw------- 1 root root  66M Apr 22  2021 gtk-common-themes_1515.snap
-rw------- 1 root root  66M Sep 26 12:44 gtk-common-themes_1519.snap
-rw------- 2 root root 140K Aug 23  2020 gtk2-common-themes_13.snap
drwxr-xr-x 2 root root 4.0K Jul 10  2020 partial/
-rw------- 1 root root  33M Oct 13 20:06 snapd_13270.snap
-rw------- 1 root root  33M Oct 20 21:14 snapd_13640.snap
-rw------- 1 root root 136M Aug 23 00:17 whatsapp-for-linux_26.snap
-rw------- 1 root root 112M Oct 18 15:58 whatsapp-for-linux_27.snap
-rw------- 2 root root 304M Feb  6  2021 wine-platform-5-stable_16.snap
-rw------- 1 root root 304M Sep 26 12:44 wine-platform-5-stable_18.snap
-rw------- 2 root root 323M Sep 20 13:03 wine-platform-6-stable_8.snap
-rw------- 1 root root 347M Oct  8 22:05 wine-platform-runtime_250.snap
-rw------- 1 root root 347M Oct 15 11:19 wine-platform-runtime_251.snap
-rw------- 1 root root 347M Oct 23 12:29 wine-platform-runtime_252.snap
-rw------- 1 root root 164M Oct 26 22:50 wine-platform-runtime_252.snap.partial

/var/lib/snapd当 snapd 不可用时,如何正确释放文件系统上的空间?

EDIT0:无法snapd成功启动服务,可能是因为我的/var/lib/snapd文件系统已满。

20.04
  • 2 个回答
  • 7022 Views
Martin Hope
SebMa
Asked: 2021-03-21 10:38:44 +0800 CST

无法卸载 /tmp。fuser 和 lsof 都没有显示锁定该 LV

  • 0

我需要减少我的 /tmp LV,所以我输入了这个命令:

$ sudo lvreduce -r -L -2G /dev/myVG/tmp
Do you want to unmount "/tmp" ? [Y|n] y
umount: /tmp: target is busy.
fsadm: Cannot proceed with mounted filesystem "/tmp".
  /sbin/fsadm failed: 1
  Filesystem resize failed.

所以我进行了调查,fuser但lsof他们什么也没显示:

$ sudo fuser -vm /tmp
                     USER        PID ACCESS COMMAND
/tmp:                root     kernel mount /tmp
$ sudo lsof /tmp
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse file system /run/user/1001/doc
      Output information may be incomplete.
$ sudo lsof +f -- /tmp
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
      Output information may be incomplete.
lsof: WARNING: can't stat() fuse file system /run/user/1001/doc
      Output information may be incomplete.
$ 

EDIT0:在安装 Ubuntu 20.04 之前,我手动创建了 /tmp (以及其他分区):

$ mount | grep -w /tmp
/dev/mapper/myVG-tmp on /tmp type ext4 (rw,relatime)

EDIT1:我也在 Ubuntu 恢复模式下尝试了相同的命令,但既fuser没有也lsof无法向我显示锁定 /tmp 文件系统的进程。

lsof 手册很难理解。有谁知道是否有另一个 lsof 选项可以显示更多最终会锁定该文件系统的进程?

20.04
  • 1 个回答
  • 613 Views
Martin Hope
SebMa
Asked: 2020-10-11 05:43:38 +0800 CST

无法 grep apt-cache 显示输出

  • 6

我有一个软件包列表,我想知道哪些软件包在 ubuntu 存储库中不可用。

我输入了这个命令,但它什么也没返回:

$ apt-cache show vim TotO perl 2>&1 | grep "Unable to locate package"
$

它出现在 Ubuntu 16.04 LTS 和 18.04 LTS 中。

你能帮我吗 ?

16.04 18.04 apt-cache
  • 1 个回答
  • 322 Views
Martin Hope
SebMa
Asked: 2020-09-04 05:36:55 +0800 CST

aptitude search 无法显示已安装软件包的来源、来源或体系结构

  • 1

我正在尝试列出除 main/restricted/universe/multiverse 之外的其他来源的所有包(及其各自的存储库)。

首先,我输入了该命令来列出这些包:

$ aptitude search -F '%p' '!?origin(Ubuntu) ( ?architecture(amd64) | ?architecture(all) ) ?installed' | head
albert                                                                          
brave-browser                                                                   
brave-keyring                                                                   
browsh                                                                          
cdda2wav                                                                        
cdrecord                                                                        
dockmanager                                                                     
e2fsprogs-l10n                                                                  
ffmbc                                                                           
firefox-esr                                                                     

但是,如果我在参数中添加'%e'或'%E'或,则立即返回...什么都没有:'%O'-Faptitude

$ aptitude search -F '%p %O' '!?origin(Ubuntu) ( ?architecture(amd64) | ?architecture(all) ) ?installed' | head
$

这是一个 aptitude bug 吗?

aptitude 16.04
  • 1 个回答
  • 99 Views
Martin Hope
SebMa
Asked: 2020-06-18 10:01:44 +0800 CST

Firefox 使用 SMPlayer 打开配置文件目录

  • 3

每次我转到about:support并单击“打开目录”时,Firefox 都会使用 SMPlayer 打开它,然后 mpv/mplayer 会抱怨:

  Playing: /home/sebastien/.mozilla/firefox-esr/empty6/persdict.dat
Failed to recognize file format.
Exiting... (Errors when loading file)

所以我在about:preferences#applications中搜索了“smplayer”,但找不到。

我还在about:config中搜索了“smplayer”,但也找不到。

最后我在 XDG mimes 类型定义中进行了搜索:

$ xdg-mime query filetype ~/.mozilla/firefox-esr/empty6/persdict.dat
text/plain
$ xdg-mime query default text/plain
kate.desktop
$ xdg-mime query filetype ~/
inode/directory
$ xdg-mime query default inode/directory
dolphin.desktop

编辑 0:添加一些xdg-open命令:

$ xdg-open ~/.mozilla/firefox-esr/empty6/persdict.dat
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
$ pgrep -af /persdict.dat
32659 /usr/bin/kate -b /home/sebastien/.mozilla/firefox-esr/empty6/persdict.dat
$ xdg-open Documents
Fontconfig warning: ignoring C.UTF-8: not a valid language tag
$ pgrep -af /Documents
8437 /usr/bin/dolphin --icon system-file-manager -caption Dolphin /home/sebastien/Documents

编辑1:inode/directory=进入~/.local/share/applications/mimeapps.list:

$ grep inode/directory= ~/.local/share/applications/mimeapps.list
inode/directory=dolphin.desktop;smplayer.desktop;kde4-dolphin.desktop;vlc.desktop;caja-2.desktop;kde4-kfmclient_dir.desktop;kde4-gwenview.desktop;easytag.desktop;nemo.desktop;audacious-qt.desktop;Thunar-folder-handler.desktop;qmmp_cue.desktop;audacious.desktop;kde4-k4dirstat.desktop;pcmanfm.desktop;qmmp_dir.desktop;qmmp_enqueue.desktop;
inode/directory=dolphin.desktop

编辑 2: Firefox 找不到 Dolphin 应用程序启动器,因为它位于以下kde4子文件夹中/usr/share/applications/:

$ locate /dolphin.desktop
/usr/share/applications/kde4/dolphin.desktop

解释:Firefox 找不到dolphin.desktopin /usr/share/applications/,因此它使用文件中的inode/directorymimetype的下一个条目是:~/.local/share/applications/mimeapps.listsmplayer.desktop

$ grep inode/directory= ~/.local/share/applications/mimeapps.list
inode/directory=dolphin.desktop;smplayer.desktop;kde4-dolphin.desktop;vlc.desktop;caja-2.desktop;kde4-kfmclient_dir.desktop;kde4-gwenview.desktop;easytag.desktop;nemo.desktop;audacious-qt.desktop;Thunar-folder-handler.desktop;qmmp_cue.desktop;audacious.desktop;kde4-k4dirstat.desktop;pcmanfm.desktop;qmmp_dir.desktop;qmmp_enqueue.desktop;
inode/directory=dolphin.desktop

解决方案:感谢ashvatthama的anwser:要解决此问题,您可以键入以下命令:

xdg-mime default kde4-dolphin.desktop inode/directory

现在它工作正常:

$ pgrep -af /empty6
29083 dolphin --icon system-file-manager -caption Dolphin /home/sebastien/.mozilla/firefox-esr/empty6

我已经看到这个错误多年了,我很想解决它。

你能帮助我吗 ?

firefox mime-type smplayer
  • 1 个回答
  • 219 Views
Martin Hope
SebMa
Asked: 2020-05-27 13:35:52 +0800 CST

如何从 ubuntu 版本下载源包并为以前的 ubuntu 版本重建它

  • 1

Ubuntu Xenial 官方 Ubuntu 存储库python3-pychromecast中不存在源包。

我想下载Ubuntu Bionic python3-pychromecast源包并在 Ubuntu Xenial 上重建它:

$ sudo apt-get build-dep python3-pychromecast/bionic-universe
Reading package lists... Done
E: Unable to find a source package for python3-pychromecast/bionic-universe
$ apt-get source --compile python3-pychromecast/bionic-universe
Reading package lists... Done
E: Unable to find a source package for python3-pychromecast

EDIT0:下载并提取源包:

$ wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1-1.dsc http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1-1.debian.tar.xz 
--2020-05-27 11:50:58--  http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1-1.dsc
Resolving archive.ubuntu.com (archive.ubuntu.com)... 2001:67c:1360:8001::23, 2001:67c:1360:8001::24, 2001:67c:1562::15, ...
Connecting to archive.ubuntu.com (archive.ubuntu.com)|2001:67c:1360:8001::23|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2205 (2,2K)
Saving to: ‘pychromecast_0.8.1-1.dsc’

pychromecast_0.8.1-1.dsc      100%[=================================================>]   2,15K  --.-KB/s    in 0,001s  

2020-05-27 11:50:58 (3,24 MB/s) - ‘pychromecast_0.8.1-1.dsc’ saved [2205/2205]

--2020-05-27 11:50:58--  http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1.orig.tar.gz
Reusing existing connection to [archive.ubuntu.com]:80.
HTTP request sent, awaiting response... 200 OK
Length: 37130 (36K) [application/x-gzip]
Saving to: ‘pychromecast_0.8.1.orig.tar.gz’

pychromecast_0.8.1.orig.tar.g 100%[=================================================>]  36,26K  --.-KB/s    in 0,03s   

2020-05-27 11:50:58 (1,37 MB/s) - ‘pychromecast_0.8.1.orig.tar.gz’ saved [37130/37130]

--2020-05-27 11:50:58--  http://archive.ubuntu.com/ubuntu/pool/universe/p/pychromecast/pychromecast_0.8.1-1.debian.tar.xz
Reusing existing connection to [archive.ubuntu.com]:80.
HTTP request sent, awaiting response... 200 OK
Length: 3208 (3,1K) [application/x-xz]
Saving to: ‘pychromecast_0.8.1-1.debian.tar.xz’

pychromecast_0.8.1-1.debian.t 100%[=================================================>]   3,13K  --.-KB/s    in 0s      

2020-05-27 11:50:58 (50,8 MB/s) - ‘pychromecast_0.8.1-1.debian.tar.xz’ saved [3208/3208]

FINISHED --2020-05-27 11:50:58--
Total wall clock time: 0,2s
Downloaded: 3 files, 42K in 0,03s (1,53 MB/s)
$ dpkg-source -x pychromecast_0.8.1-1.dsc 
dpkg-source: info: extracting pychromecast in pychromecast-0.8.1
dpkg-source: info: unpacking pychromecast_0.8.1.orig.tar.gz
dpkg-source: info: unpacking pychromecast_0.8.1-1.debian.tar.xz

EDIT1:尝试构建:

$ debuild -i -us -uc -b
 dpkg-buildpackage -rfakeroot -D -us -uc -i -b
dpkg-buildpackage: source package pychromecast
dpkg-buildpackage: source version 0.8.1-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Ruben Undheim <[email protected]>
 dpkg-source -i --before-build pychromecast-0.8.1
dpkg-buildpackage: host architecture i386
dpkg-checkbuilddeps: error: Unmet build dependencies: python3-protobuf
dpkg-buildpackage: warning: build dependencies/conflicts unsatisfied; aborting
dpkg-buildpackage: warning: (Use -d flag to override.)
debuild: fatal error at line 1376:
dpkg-buildpackage -rfakeroot -D -us -uc -i -b failed
$ dpkg-checkbuilddeps
dpkg-checkbuilddeps: error: Unmet build dependencies: python3-protobuf
$ grep python3-protobuf debian/control 
               python3-protobuf,
Depends: ${python3:Depends}, ${misc:Depends}, python3-zeroconf, python3-protobuf (>= 3)

你能帮助我吗 ?

apt source
  • 1 个回答
  • 555 Views
Martin Hope
SebMa
Asked: 2020-02-28 02:36:11 +0800 CST

蓝牙服务无法正常重启:需要分两步完成

  • 2

蓝牙服务无法正常重启:

$ sudo service bluetooth restart;service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since jeu. 2020-02-27 11:18:05 CET; 398ms ago
     Docs: man:bluetoothd(8)
 Main PID: 18310 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─18310 /usr/lib/bluetooth/bluetoothd

févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: gatt-time-server: Input/output error (5)
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Not enough free handles to register service
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Not enough free handles to register service
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Sap driver initialization failed.
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: sap-server: Operation not permitted (1)
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSource
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSink
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink
févr. 27 11:18:05 sebastien-B206 bluetoothd[18310]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)

它需要分两步完成(参见最后一行status):

$ sudo service bluetooth stop;sudo service bluetooth start;service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since jeu. 2020-02-27 11:20:12 CET; 2s ago
     Docs: man:bluetoothd(8)
 Main PID: 18390 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─18390 /usr/lib/bluetooth/bluetoothd

févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Not enough free handles to register service
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Not enough free handles to register service
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Sap driver initialization failed.
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: sap-server: Operation not permitted (1)
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSource
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSink
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink
févr. 27 11:20:12 sebastien-B206 bluetoothd[18390]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)
févr. 27 11:20:15 sebastien-B206 systemd[1]: Started Bluetooth service.

我尝试在( )部分添加RestartSec=5参数,但它不起作用:[Service]/lib/systemd/system/bluetooth.serviceman systemd.service

$ sudo systemctl edit --full bluetooth
$ systemctl cat bluetooth | grep RestartSec
RestartSec=5
$ sudo systemctl daemon-reload
$ sudo service bluetooth restart;service bluetooth status
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since jeu. 2020-02-27 11:30:28 CET; 524ms ago
     Docs: man:bluetoothd(8)
 Main PID: 18830 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─18830 /usr/lib/bluetooth/bluetoothd

févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: gatt-time-server: Input/output error (5)
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Not enough free handles to register service
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Not enough free handles to register service
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Sap driver initialization failed.
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: sap-server: Operation not permitted (1)
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSource
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Endpoint registered: sender=:1.55 path=/MediaEndpoint/A2DPSink
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSource
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: Endpoint registered: sender=:1.43 path=/MediaEndpoint/A2DPSink
févr. 27 11:30:28 sebastien-B206 bluetoothd[18830]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)

这是我的bluetooth.service配置:

$ systemctl cat bluetooth
# /lib/systemd/system/bluetooth.service
[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/lib/bluetooth/bluetoothd
NotifyAccess=main
#WatchdogSec=10
#Restart=on-failure
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
LimitNPROC=1
RestartSec=5

[Install]
WantedBy=bluetooth.target,suspend.target
Alias=dbus-org.bluez.service

EDIT0:刚刚重新启动:

$ sudo systemctl restart bluetooth
$ systemctl status -n 20 bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/etc/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since jeu. 2020-02-27 17:23:24 CET; 2min 42s ago
     Docs: man:bluetoothd(8)
 Main PID: 5050 (bluetoothd)
   Status: "Running"
   CGroup: /system.slice/bluetooth.service
           └─5050 /usr/lib/bluetooth/bluetoothd

févr. 27 17:23:24 sebastien-B206 systemd[1]: Started Bluetooth service.
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Starting SDP server
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Bluetooth management interface 1.10 initialized
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Failed to obtain handles for "Service Changed" characteristic
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Error adding Link Loss service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Current Time Service could not be registered
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: gatt-time-server: Input/output error (5)
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Not enough free handles to register service
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Sap driver initialization failed.
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: sap-server: Operation not permitted (1)
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Endpoint registered: sender=:1.65 path=/MediaEndpoint/A2DPSource
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Endpoint registered: sender=:1.65 path=/MediaEndpoint/A2DPSink
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Endpoint registered: sender=:1.42 path=/MediaEndpoint/A2DPSource
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: Endpoint registered: sender=:1.42 path=/MediaEndpoint/A2DPSink
févr. 27 17:23:25 sebastien-B206 bluetoothd[5050]: RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)

EDIT1:rfkill list输出:

$ rfkill list
0: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
1: phy0: Wireless LAN
    Soft blocked: no
    Hard blocked: no

EDIT2:试过这个,但它没有解决RFCOMM server failed for Headset Voice gateway: rfcomm_bind: Address already in use (98)pb。

结论:我从@6666 提出的解决方案--noplugin=sap中将选项添加到ExecStart=命令行,它解决了我的重启 pb。仍然有其他错误,但每次蓝牙服务重启后蓝牙工作正常,所以谁在乎它们:-)

bluetooth systemd 16.04
  • 1 个回答
  • 4029 Views
Martin Hope
SebMa
Asked: 2019-03-28 05:19:51 +0800 CST

无法正确重建 /etc/apt/trusted.gpg 密钥环:gpg:[不知道]:无效数据包 (ctb=01)

  • 1

我无法正确重建 /etc/apt/trusted.gpg 密钥环:

$ sudo rm /etc/apt/trusted.gpg
rm: remove regular file ‘/etc/apt/trusted.gpg’? y
$ sudo apt-key update 2>&1 | egrep "gpg:.*(invalid|failed)"
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_get_keyblock failed: eof
$ apt-key list >/dev/null
gpg: [don't know]: invalid packet (ctb=01)
gpg: keydb_search_next failed: invalid packet

编辑 1:我找到了这个 pb。与 中的钥匙圈有关/etc/apt/trusted.gpg.d/,因此我使用以下方法重新创建了它们add-apt-repository:

$ sudo mv /etc/apt/trusted.gpg.d /etc/apt/trusted.gpg.d.BACKUP
$ sudo mkdir /etc/apt/trusted.gpg.d
$ time awk -F / '/^deb .*ppa.launchpad.net/{print "sudo add-apt-repository -y ppa:"$4"/"$5}' /etc/apt/sources.list.d/*.list | sh -x
+ sudo add-apt-repository -y ppa:aims/sagemath
gpg: keyring `/tmp/tmpv9cab2oz/secring.gpg' created
gpg: keyring `/tmp/tmpv9cab2oz/pubring.gpg' created
gpg: requesting key BE796FF2 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpv9cab2oz/trustdb.gpg: trustdb created
gpg: key BE796FF2: public key "Launchpad PPA for AIMS" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
+ sudo add-apt-repository -y ppa:apandada1/brightness-controller
gpg: keyring `/tmp/tmp74ndc3fv/secring.gpg' created
gpg: keyring `/tmp/tmp74ndc3fv/pubring.gpg' created
gpg: requesting key A7803E3B from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp74ndc3fv/trustdb.gpg: trustdb created
gpg: key A7803E3B: public key "Launchpad PPA for Archisman Panigrahi" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
...
gpg: /tmp/tmp49wcgvjj/trustdb.gpg: trustdb created
gpg: key EEAD66BD: public key "Launchpad PPA for Xu Zhen" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

real    6m20.794s
user    5m49.528s
sys 0m17.888s
$ apt-key list >/dev/null
gpg: keyblock resource `/etc/apt/trusted.gpg.d/notepadqq-team-notepadqq.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/nowrep-qupzilla.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/octave-stable.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/openlp-core-release.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/otto-kesselgulasch-gimp.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pinta-maintainers-pinta-stable.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pmjdebruijn-gnoduino-release.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/privoox-privoox.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/pypy-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/rvm-smplayer.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/sbates-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/smathot-cogscinl.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/ufleisch-kid3.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/unit193-inxi.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/wseverin-ppa.gpg': resource limit
gpg: keyblock resource `/etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg': resource limit

经过一番挖掘,我发现 GnuPG v1(Ubuntu Trust APT 数据包的依赖项)不能处理超过 40 个密钥环,也就是说,它不能处理超过 39 个密钥环/etc/apt/trusted.gpg.d/(根据这个:https://askubuntu .com/a/508337/426176和那个:https ://www.mail-archive.com/[email protected]/msg23302.html )

编辑 2:我删除了 10 个重复的键/etc/apt/trusted.gpg.d/:

$ sudo fdupes -rnASd /etc/apt/trusted.gpg.d
[1] /etc/apt/trusted.gpg.d/guardianproject-fdroidserver.gpg  
[2] /etc/apt/trusted.gpg.d/guardianproject-ppa.gpg

Set 1 of 6, preserve files [1 - 2, all] (916 bytes each): 2

   [-] /etc/apt/trusted.gpg.d/guardianproject-fdroidserver.gpg
   [+] /etc/apt/trusted.gpg.d/guardianproject-ppa.gpg

[1] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-3.gpg
[2] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-4.gpg
[3] /etc/apt/trusted.gpg.d/jonathonf-texlive.gpg
[4] /etc/apt/trusted.gpg.d/jonathonf-vim.gpg
[5] /etc/apt/trusted.gpg.d/jonathonf-vlc.gpg

Set 2 of 6, preserve files [1 - 5, all] (1135 bytes each): 2

   [-] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-3.gpg
   [+] /etc/apt/trusted.gpg.d/jonathonf-ffmpeg-4.gpg
   [-] /etc/apt/trusted.gpg.d/jonathonf-texlive.gpg
   [-] /etc/apt/trusted.gpg.d/jonathonf-vim.gpg
   [-] /etc/apt/trusted.gpg.d/jonathonf-vlc.gpg

[1] /etc/apt/trusted.gpg.d/noobslab-apps.gpg
[2] /etc/apt/trusted.gpg.d/noobslab-mint.gpg
[3] /etc/apt/trusted.gpg.d/noobslab-themes.gpg

Set 3 of 6, preserve files [1 - 3, all] (943 bytes each): 2

   [-] /etc/apt/trusted.gpg.d/noobslab-apps.gpg
   [+] /etc/apt/trusted.gpg.d/noobslab-mint.gpg
   [-] /etc/apt/trusted.gpg.d/noobslab-themes.gpg

[1] /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
[2] /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg

Set 4 of 6, preserve files [1 - 2, all] (6570 bytes each): 1

   [+] /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
   [-] /etc/apt/trusted.gpg.d/webupd8team-y-ppa-manager.gpg

[1] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg
[2] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg

Set 5 of 6, preserve files [1 - 2, all] (1313 bytes each): 2

   [-] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-ppa.gpg
   [+] /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg

[1] /etc/apt/trusted.gpg.d/mc3man-mpv-tests.gpg
[2] /etc/apt/trusted.gpg.d/mc3man-trusty-media.gpg

Set 6 of 6, preserve files [1 - 2, all] (527 bytes each): 2

   [-] /etc/apt/trusted.gpg.d/mc3man-mpv-tests.gpg
   [+] /etc/apt/trusted.gpg.d/mc3man-trusty-media.gpg

将我所有的 gpg 启动板 ppa 密钥添加到同一个/etc/apt/trusted.gpg密钥环中是唯一的解决方案吗,它似乎没有那么有序?

编辑 3:现在我有 16 个额外的(被拒绝的)钥匙/etc/apt/trusted.gpg.d/,所以我要把它们移到/etc/apt/trusted.gpg钥匙圈:

$ apt-key list 2>&1 >/dev/null | awk -F"[\`']" '/resource limit/{print "sudo apt-key add "$2" 2>/dev/null ; sudo \\rm -vf "$2}' | sh -x
+ sudo apt-key add /etc/apt/trusted.gpg.d/pypy-ppa.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/pypy-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/pypy-ppa.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/rvm-smplayer.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/rvm-smplayer.gpg
removed ‘/etc/apt/trusted.gpg.d/rvm-smplayer.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/sbates-ppa.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/sbates-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/sbates-ppa.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg
removed ‘/etc/apt/trusted.gpg.d/skunk-pepper-flash.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/smathot-cogscinl.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/smathot-cogscinl.gpg
removed ‘/etc/apt/trusted.gpg.d/smathot-cogscinl.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg
removed ‘/etc/apt/trusted.gpg.d/stebbins-handbrake-releases.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg
removed ‘/etc/apt/trusted.gpg.d/stefanobalocco-multimedia.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/team-xbmc-ppa.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg
removed ‘/etc/apt/trusted.gpg.d/timchen119-bluez5-trusty.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg
removed ‘/etc/apt/trusted.gpg.d/ubuntu-mate-dev-trusty-mate.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg
removed ‘/etc/apt/trusted.gpg.d/ubuntu-toolchain-r-test.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/ufleisch-kid3.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/ufleisch-kid3.gpg
removed ‘/etc/apt/trusted.gpg.d/ufleisch-kid3.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/unit193-inxi.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/unit193-inxi.gpg
removed ‘/etc/apt/trusted.gpg.d/unit193-inxi.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg
removed ‘/etc/apt/trusted.gpg.d/webupd8team-tor-browser.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/wseverin-ppa.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/wseverin-ppa.gpg
removed ‘/etc/apt/trusted.gpg.d/wseverin-ppa.gpg’
+ sudo apt-key add /etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg
+ sudo rm -vf /etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg
removed ‘/etc/apt/trusted.gpg.d/xuzhen666-gnome-mpv.gpg’
$ apt-key list >/dev/null
$

问题已解决。

keyrings gnupg
  • 1 个回答
  • 2444 Views
Martin Hope
SebMa
Asked: 2018-03-30 04:48:49 +0800 CST

bluez5:无法连接到 Ubuntu 17.10 上的配对蓝牙设备

  • 19

我在 Ubuntu 17.10 上使用 bluez v5.46,但无法连接到配对的蓝牙设备。

这是bluetoothctl命令的输出:

$ bluetoothctl 
[NEW] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
Agent registered
[bluetooth]# scan on
Discovery started
[CHG] Controller 6C:0B:84:27:43:66 Discovering: yes
[NEW] Device FC:58:FA:A1:C2:70 OE-P51
[bluetooth]# pair FC:58:FA:A1:C2:70 
Attempting to pair with FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[CHG] Device FC:58:FA:A1:C2:70 Paired: yes
Pairing successful
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: no
[CHG] Device FC:58:FA:A1:C2:70 Connected: no
[CHG] Controller 6C:0B:84:27:43:66 Discoverable: no
[bluetooth]# connect FC:58:FA:A1:C2:70 
Attempting to connect to FC:58:FA:A1:C2:70
Failed to connect: org.bluez.Error.Failed

这是更多信息:

$ journalctl -u bluetooth | tail
Mar 29 12:06:01 tensorFlowPHY systemd[1]: Started Bluetooth service.
Mar 29 12:06:01 tensorFlowPHY bluetoothd[1136]: Starting SDP server
Mar 29 12:06:01 tensorFlowPHY bluetoothd[1136]: Bluetooth management interface 1.14 initialized
Mar 29 14:36:12 tensorFlowPHY bluetoothd[1136]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available
Mar 29 14:36:59 tensorFlowPHY bluetoothd[1136]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available

并systemctl说:

$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2018-03-30 16:30:15 CEST; 21s ago
     Docs: man:bluetoothd(8)
 Main PID: 1492 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   Memory: 1.5M
      CPU: 42ms
   CGroup: /system.slice/bluetooth.service
           └─1492 /usr/lib/bluetooth/bluetoothd

Mar 30 16:30:15 tensorFlowPHY systemd[1]: Starting Bluetooth service...
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Bluetooth daemon 5.46
Mar 30 16:30:15 tensorFlowPHY systemd[1]: Started Bluetooth service.
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Starting SDP server
Mar 30 16:30:15 tensorFlowPHY bluetoothd[1492]: Bluetooth management interface 1.14 initialized
Mar 30 16:30:20 tensorFlowPHY bluetoothd[1492]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available
Mar 30 16:30:31 tensorFlowPHY bluetoothd[1492]: a2dp-sink profile connect failed for FC:58:FA:A1:C2:70: Protocol not available

编辑 1:我安装了一个缺少的 Ubuntu 软件包:pulseaudio-module-bluetooth并使​​用以下命令重新启动了 pulseaudio:pulseaudio -k

现在连接试验后蓝牙日志的输出是:

Mar 30 16:36:59 tensorFlowPHY bluetoothd[1492]: Unable to get connect data for Headset Voice gateway: getpeername: Transport endpoint is not connected (107)
Mar 30 16:37:00 tensorFlowPHY bluetoothd[1492]: connect error: Connection refused (111)
Mar 30 16:37:02 tensorFlowPHY bluetoothd[1492]: connect error: Connection refused (111)

知道为什么吗?

编辑 2:我刚刚按照有人要求重新启动了 Ubuntu。仍然有相同的铅。

编辑 3:我已经加载了两个模块/etc/pulse/default.pa:

$ egrep "(policy|discover)" /etc/pulse/default.pa
.ifexists module-bluetooth-policy.so
load-module module-bluetooth-policy
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover

但是我在硬盘上找不到那些,我需要安装其他东西吗?

编辑 4:我的错误,我使用了locate命令。在 a 之后sudo updatedb,该locate命令现在能够找到这两个文件。

编辑 5:这是pactl输出:

$ pactl list modules | grep "Name:"
    Name: module-device-restore
    Name: module-stream-restore
    Name: module-card-restore
    Name: module-augment-properties
    Name: module-switch-on-port-available
    Name: module-udev-detect
    Name: module-alsa-card
    Name: module-alsa-card
    Name: module-bluetooth-policy
    Name: module-bluetooth-discover
    Name: module-bluez5-discover
    Name: module-native-protocol-unix
    Name: module-default-device-restore
    Name: module-rescue-streams
    Name: module-always-sink
    Name: module-intended-roles
    Name: module-suspend-on-idle
    Name: module-console-kit
    Name: module-systemd-login
    Name: module-position-event-sounds
    Name: module-role-cork
    Name: module-filter-heuristics
    Name: module-filter-apply
    Name: module-switch-on-connect
    Name: module-x11-publish
    Name: module-x11-cork-request
    Name: module-x11-xsmp

和dpkg -l输出:

$ dpkg -l | grep blue
ii  bluefish                                  2.2.9-1                                                    amd64        advanced Gtk+ text editor for web and software development
ii  bluefish-data                             2.2.9-1                                                    all          advanced Gtk+ text editor (data)
ii  bluefish-plugins                          2.2.9-1                                                    amd64        advanced Gtk+ text editor (plugins)
ii  blueman                                   2.0.4-1ubuntu3                                             amd64        Graphical bluetooth manager
ii  bluez                                     5.46-0ubuntu3                                              amd64        Bluetooth tools and daemons
ii  bluez-cups                                5.46-0ubuntu3                                              amd64        Bluetooth printer driver for CUPS
ii  bluez-obexd                               5.46-0ubuntu3                                              amd64        bluez obex daemon
ii  bluez-tools                               0.2.0~20140808-5build1                                     amd64        Set of tools to manage Bluetooth devices for linux
ii  gnome-bluetooth                           3.26.1-1                                                   amd64        GNOME Bluetooth tools
ii  indicator-bluetooth                       0.0.6+17.10.20170605-0ubuntu3                              amd64        System bluetooth indicator.
ii  libbluetooth3:amd64                       5.46-0ubuntu3                                              amd64        Library to use the BlueZ Linux Bluetooth stack
ii  libgnome-bluetooth13:amd64                3.26.1-1                                                   amd64        GNOME Bluetooth tools - support library
ii  pulseaudio-module-bluetooth               1:10.0-2ubuntu3.1                                          amd64        Bluetooth module for PulseAudio sound server

这是加载的蓝牙脉冲音频模块:

$ pactl list modules short | grep module-bluetooth
9   module-bluetooth-policy     
10  module-bluetooth-discover

编辑 6:您的解决方案有效!所以总结一下:

$ bluetoothctl
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 6C:0B:84:27:43:66 Powered: yes
[bluetooth]# remove FC:58:FA:A1:C2:70
[DEL] Device FC:58:FA:A1:C2:70 OE-P51
Device has been removed
[bluetooth]# exit
Agent unregistered
[DEL] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
$ sudo service bluetooth restart

最后:

$ bluetoothctl
[NEW] Controller 6C:0B:84:27:43:66 tensorFlowPHY [default]
Agent registered
[bluetooth]# power on
Changing power on succeeded
[CHG] Controller 6C:0B:84:27:43:66 Powered: yes
[bluetooth]# scan on
Discovery started
[CHG] Controller 6C:0B:84:27:43:66 Discovering: yes
[NEW] Device FC:58:FA:A1:C2:70 OE-P51
[bluetooth]# pair FC:58:FA:A1:C2:70 
Attempting to pair with FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[CHG] Device FC:58:FA:A1:C2:70 Paired: yes
Pairing successful
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: no
[CHG] Device FC:58:FA:A1:C2:70 Connected: no
[bluetooth]# connect FC:58:FA:A1:C2:70 
Attempting to connect to FC:58:FA:A1:C2:70
[CHG] Device FC:58:FA:A1:C2:70 Connected: yes
Connection successful
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 00001108-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[CHG] Device FC:58:FA:A1:C2:70 ServicesResolved: yes
[OE-P51]#
pulseaudio bluetooth bluez
  • 3 个回答
  • 37473 Views
Martin Hope
SebMa
Asked: 2018-03-24 10:44:23 +0800 CST

USB pendrive:复制大约需要 3 分钟,但卸载需要很长时间:10 到 12 分钟

  • 14

我正在使用 Ubuntu 17.10。

我将 USB 笔式驱动器格式化为 NTFS 以准备 Windows7 USB 安装程序。

我在这个笔式驱动器上设置了可引导标志并将文件复制到其中。

编辑 1: USB 笔式驱动器由 udev 自动安装。

umount /dev/sdb1需要 10 到 12 分钟才能完成。

以下是安装选项:

$ mount | grep sdb
/dev/sdb1 on /media/mansfeld/Win7_USB_Installer type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

编辑 2:cp操作根本不是即时的,将文件复制到 USB 笔式驱动器需要 3 分钟。

编辑 3:sync操作(在 之后cp立即完成)需要 12 分钟才能完成!但那umount将是瞬间的。

对于 FAT32,(在挂载期间同步也被禁用),我注意到相同的行为。

任何想法为什么卸载 NTFS USB pendrive 需要这么长时间?

usb ntfs fat32 unmount
  • 2 个回答
  • 8028 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve