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-388448

anx's questions

Martin Hope
anx
Asked: 2020-10-27 05:21:12 +0800 CST

为什么 lpstat 不显示我的打印作业?

  • 0

通过cups打印文档后,/var/log/cups/access_log包含以下日志条目(并且打印机确实打印了):

"POST /printers/Brother HTTP/1.1" 200 70947 Print-Job successful-ok

但是,通过lpstat查询时未列出打印作业:

# lpstat -W all -u user
# lpstat -v
device for Brother: ipp://printer.test.:631/ipp/port

为什么lpstat没有显示成功执行的打印作业?

printing 20.04
  • 1 个回答
  • 224 Views
Martin Hope
anx
Asked: 2020-06-07 21:37:45 +0800 CST

为什么 Ubuntu 会将 NXDOMAIN 视为解析为 localhost?

  • 0

每次由于域不存在(例如could not resolve host)而应该收到错误时,我都会收到有关连接到环回地址的错误:

$ curl -4 -v https://nonexist.invalid
Trying 127.0.0.1...

该问题仅在建立无线连接约 2 秒后才开始出现。短时间内,一切都按预期工作。

我正在使用systemd-resolved并且 dns 似乎正在工作:

$ readlink /etc/resolv.conf
../run/systemd/resolve/stub-resolve.conf
$ dig +short A example.com
192.0.2.1
$ dig +short A nonexist.invalid
$ systemd-resolve -t A nonexist.invalid
nonexist.invalid: resolve call failed: No appropriate name servers or networks for name found

如果名称解析看起来不错,为什么程序似乎仍将名称解析为127.0.0.1?

dns localhost systemd-resolved 18.04
  • 1 个回答
  • 221 Views
Martin Hope
anx
Asked: 2019-02-09 23:34:23 +0800 CST

在 qemu (ARM64) 上启动 Ubuntu 时“读取不支持的 AArch64 系统寄存器”

  • 0

我想在qemu中运行 Ubuntu 安装程序。我使用了各自 Ubuntu CD 映像中的内核,并使用 AMD64 架构验证了我的命令行:

$ qemu-system-x86_64 --version
QEMU emulator version 2.5.0 ..
$ isoinfo -R -x "/install/vmlinuz" -i bionic-server-amd64.iso >linux
$ qemu-system-x86_64 -nodefaults -nographic -kernel linux \
   -serial stdio -append "console=ttyS0" \
   -machine pc -cpu qemu64 -m 1G
[    0.0000000] Linux version 4.15.0-44-generic ..

但是,当我为 ARM64 架构(不是我的主机架构)尝试同样的事情时:

$ qemu-system-aarch64 --version
QEMU emulator version 2.5.0 ..
$ isoinfo -R -x "/install/vmlinuz" -i bionic-server-arm64.iso >linux
$ qemu-system-aarch64 -nodefaults -nographic -kernel linux \
   -serial stdio -append "console=ttyAMA0" \
   -machine virt -cpu cortex-a53 -m 1G

我在 100% cpu 使用时得到零输出。我如何确定出了什么问题?

执行-d unimp -D debug.log显示:

read access to unsupported AArch64 system register op0:3 op1:0 crn:0 crm:7 op2:2
virtualization qemu 16.04 arm64
  • 1 个回答
  • 533 Views
Martin Hope
anx
Asked: 2019-01-14 19:33:56 +0800 CST

如何在系统范围内禁用 libreoffice 宏功能?

  • 1

有两个/usr/lib/libreoffice/share/registry/*.xcd设置,每个都应该足够:

org.openoffice.Office.Misc/Security/Scripting/DisableMacroExecution=true
org.openoffice.Office.Misc/Security/Scripting/MacroSecurityLevel=3

应用这些后,加载的文本文档中的宏会导致:

An attempt was made to execute a macro.
For security reasons, macro support is disabled.

但是,宏支持并未禁用。添加一个包含shell "xterm"到当前文档的宏并执行它仍然会显示一个终端窗口。

哪些选项真正禁用宏功能?

有没有办法不安装该功能,而不是尝试禁用它?

security libreoffice
  • 1 个回答
  • 2372 Views
Martin Hope
anx
Asked: 2017-10-02 15:56:10 +0800 CST

为什么light-locker解锁后一直黑屏?

  • 12

在使用 light-locker 锁定我的屏幕后,一台带有新创建用户的 Xubuntu 16.04 完全修补的机器不会让我解锁(无论锁定是手动激活还是通过超时激活)。正确输入密码后屏幕保持黑色(但已通电)

从 tty1 中杀死 light-locker 将随后显示桌面(并因此防止进一步锁定)。

尝试的步骤:

  • 在灯箱设置和电源设置中启用/禁用锁定(无更改)
  • 使用 xscreensaver 而不是 light-locker (works)
  • 测试问题是否与暂停或关闭盖子有关(不是)
    • 但是,暂停后黑屏显示This session is locked: You will be redirected to the unlock dialog automatically in a few seconds消息 - 没有任何重定向发生
  • 清除+重新安装 lightdm、light-locker 和 xubuntu-default-settings
  • 使用loginctl unlock-session没有效果
  • systemctl status lightdm仅显示有关 kwallet pam 模块丢失的(无害的,预期的)消息
  • 检查 dpkg 日志以了解“它工作”和“它不再工作”之间的升级(没有可疑)并启动以前的内核(问题仍然存在)
  • 会话启动的 light-locker 和手动启动的 light-locker 之间的比较行为(没有区别)
  • 将用户添加到组nopasswdlogin组(锁定后立即出现黑屏,不仅在输入密码后)

在弄清楚如何解决这个问题时,哪些额外的步骤可以证明是有用的?

调试日志:

$ export LC_ALL=C; light-locker --debug & ( sleep 5; echo "## Locking now"; light-locker-command --lock; sleep 10; echo "### 10 seconds have passed - entering password now"; sleep 10; echo "### 10 more seconds have passwd - Killing"; killall light-locker; sleep 5; echo "### Killed now" )  
[1] 23463
[gs_debug_init] gs-debug.c:106 (00:08:32):   Debugging enabled
[main] light-locker.c:142 (00:08:32):    initializing light-locker 1.7.0
[main] light-locker.c:144 (00:08:32):    lock after screensaver 10
[main] light-locker.c:145 (00:08:32):    late locking 0
[main] light-locker.c:146 (00:08:32):    lock on suspend 1
[main] light-locker.c:147 (00:08:32):    lock on lid 0
[main] light-locker.c:148 (00:08:32):    idle hint 1
[query_session_id] gs-listener-dbus.c:2088 (00:08:32):   org.freedesktop.login1.NoSessionForPID raised:
 PID 23463 does not belong to any known session


[init_session_id] gs-listener-dbus.c:2180 (00:08:32):    Got session-id: (null)
[query_sd_session_id] gs-listener-dbus.c:2164 (00:08:32):    Couldn't determine our own sd session id: No such process
[init_session_id] gs-listener-dbus.c:2185 (00:08:32):    Got sd-session-id: (null)
[init_seat_path] gs-listener-dbus.c:2262 (00:08:32):     Got seat: /org/freedesktop/DisplayManager/Seat0
[gs_listener_delay_suspend] gs-listener-dbus.c:449 (00:08:32):   Delay suspend
[gs_listener_x11_acquire] gs-listener-x11.c:172 (00:08:32):  ScreenSaver Registered
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:32):    obj_path=/org/freedesktop/DBus interface=org.freedesktop.DBus method=NameAcquired destination=:1.316
## Locking now
[gs_grab_grab_root] gs-grab-x11.c:647 (00:08:37):    Grabbing the root window
[gs_grab_get_keyboard] gs-grab-x11.c:153 (00:08:37):     Grabbing keyboard widget=E3
[gs_grab_get_mouse] gs-grab-x11.c:213 (00:08:37):    Grabbing mouse widget=E3
[gs_manager_create_windows_for_screen] gs-manager.c:548 (00:08:37):  Creating 1 windows for screen 0
[gs_manager_create_window_for_monitor] gs-manager.c:324 (00:08:37):  Creating window for monitor 0 [0,0] (1600x900)
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[gs_manager_timed_switch] gs-manager.c:445 (00:08:37):   Start switch to greeter timer
[gs_window_xevent] gs-window-x11.c:369 (00:08:37):   not raising our windows
[window_map_event_cb] gs-manager.c:233 (00:08:37):   Handling window map_event event
[gs_listener_resume_suspend] gs-listener-dbus.c:513 (00:08:37):  Resume suspend: fd=14
[manager_maybe_grab_window] gs-manager.c:204 (00:08:37):     Moving grab to 0x5595f8d5a290
[gs_grab_move_keyboard] gs-grab-x11.c:450 (00:08:37):    Moving keyboard grab from E3 to 3A0000C
[gs_grab_move_keyboard] gs-grab-x11.c:457 (00:08:37):    *** doing X server grab
[gs_grab_release_keyboard] gs-grab-x11.c:279 (00:08:37):     Ungrabbing keyboard
[gs_grab_get_keyboard] gs-grab-x11.c:153 (00:08:37):     Grabbing keyboard widget=3A0000C
[gs_grab_move_keyboard] gs-grab-x11.c:479 (00:08:37):    *** releasing X server grab
[gs_grab_move_mouse] gs-grab-x11.c:395 (00:08:37):   Moving pointer grab from E3 to 3A0000C
[gs_grab_move_mouse] gs-grab-x11.c:402 (00:08:37):   *** doing X server grab
[gs_grab_release_mouse] gs-grab-x11.c:320 (00:08:37):    Ungrabbing pointer
[gs_grab_get_mouse] gs-grab-x11.c:213 (00:08:37):    Grabbing mouse widget=3A0000C
[gs_grab_move_mouse] gs-grab-x11.c:425 (00:08:37):   *** releasing X server grab
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:37):    obj_path=/org/freedesktop/login1 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:197 (00:08:37):    got geometry for monitor 0: x=0 y=0 w=1600 h=900
[update_geometry] gs-window-x11.c:210 (00:08:37):    using geometry for monitor 0: x=0 y=0 w=1600 h=900
[gs_window_move_resize_window] gs-window-x11.c:243 (00:08:37):   Move and/or resize window on monitor 0: x=0 y=0 w=1600 h=900
[gs_listener_send_lock_session] gs-listener-dbus.c:180 (00:08:38):   Send lock session
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:38):    obj_path=(null) interface=(null) method=(null) destination=:1.316
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c12 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:39):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:39):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:39):  Session switched: 0
[gs_manager_stop_switch] gs-manager.c:456 (00:08:39):    Stop switch to greeter timer
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c12 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/user/_108 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:39):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:39):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:39):  Session switched: 0
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:39):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.login1.Session method=Lock destination=(null)
### 10 seconds have passed - entering password now
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.login1.Session method=Unlock destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c13 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/session/c5 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
[listener_dbus_handle_system_message] gs-listener-dbus.c:1330 (00:08:51):    obj_path=/org/freedesktop/login1/seat/seat0 interface=org.freedesktop.DBus.Properties method=PropertiesChanged destination=(null)
process 23463: arguments to dbus_message_new_method_call() were incorrect, assertion "path != NULL" failed in file ../../dbus/dbus-message.c line 1340.
This is normally a bug in some application using the D-Bus library.
[query_session_active] gs-listener-dbus.c:1124 (00:08:51):   Couldn't allocate the dbus message
[listener_dbus_handle_system_message] gs-listener-dbus.c:1361 (00:08:51):    systemd notified ActiveSession 0
[listener_session_switched_cb] gs-monitor.c:298 (00:08:51):  Session switched: 0
[xroot_filter] gs-listener-x11.c:124 (00:08:52):     ScreenSaver stopped
### 10 more seconds have passwd - Killing
### Killed now

将此与已知良好的系统进行比较会产生:

$ comm -3 <(grep -iv grab good | sed 's/[0-9:]\+/[NN]/g;s/[ \t]\+/ /g' | sort) <(grep -iv grab bad | sed 's/[0-9:]\+/[NN]/g;s/[ \t]\+/ /g' | sort) | head -n2
[init_session_id] gs-listener-dbus.c[NN] ([NN])[NN] Got session-id[NN] (null)
[init_session_id] gs-listener-dbus.c[NN] ([NN])[NN] Got session-id[NN] /org/freedesktop/login[NN]/session/c[NN]

事实上,会话设置似乎很尴尬:

$ loginctl session-status
Could not get properties: No such process
xubuntu
  • 1 个回答
  • 5756 Views
Martin Hope
anx
Asked: 2017-01-08 21:19:13 +0800 CST

如何防止对我的开发机器的 dns 重新绑定攻击?

  • 0

我将我的 Ubuntu 14.04 和 16.04 笔记本用于开发目的,并定期在无法从 Internet 访问的网络地址上运行各种服务器(例如 Web 服务器)。

如果有人将他的域名重新绑定到私有 IP,我如何避免仍然通过我的网络浏览器向世界公开这些服务器?

该攻击在 https://en.wikipedia.org/wiki/DNS_rebinding中有进一步描述

14.04
  • 1 个回答
  • 1041 Views
Martin Hope
anx
Asked: 2016-05-31 22:39:39 +0800 CST

如何调整超过 16TB 限制的 ext4 分区?

  • 27

尝试调整未使用 64 位标志创建的旧 ext4 分区的大小时,如果新大小为或超过 16TiB,resize2fs 1.42 将失败。

$ resize2fs -p /dev/mapper/target-device
resize2fs: New size too large to be expressed in 32 bits

我不想将文件复制到外部介质。我也不想冒数据丢失的风险。如何安全地调整音量?

ext4
  • 3 个回答
  • 26870 Views
Martin Hope
anx
Asked: 2015-03-18 22:59:11 +0800 CST

如果 upstart 在 root 处于只读状态时挂起,如何调试它?

  • 5

我正在尝试在 14.04.2 LTS 上调试一个不成功/挂起的系统启动(upstart)。root 是 luks 容器中的 ext4 文件系统。文件系统处于干净状态。

引导过程在 upstart-socket-bridge 之后停止,(不一定在特定服务之后,例如,当安装 cups-daemon 时,它会在那之后停止)。init -v也不是很有帮助。唯一不仅仅记录各种服务的启动/停止的日志条目是关于 init 之前的 udev。

Begin: Running /scripts/init-bottom ... done.
udev exit failed --rc=2

(编辑)重新挂载 root rw 最初似乎总是导致干净启动,但事实是,它有点不可预测,无论哪种方式,我都失败并成功启动。哇?

观察:一切似乎都很好,系统只是没有重新挂载根可写或继续引导。

问:我如何确定是哪个服务导致启动过程卡住?


更新:通过 getty 产生第二个 shellinitctl list挂断后可以运行,这些是正在运行的作业

mountnfs-bootclean.sh start/running
udev start/running, process 438
upstart-udev-bridge start/running, process 432
plymouth start/running, process 122
resolvconf start/running
ssh start/running, process 767 <-- this one was manually started
mountall start/running, process 337
mountkernfs.sh start/running
mountnfs.sh start/running
bootmisc.sh start/running
upstart-socket-bridge start/running, process 745**
cryptdisks start/running
mountdevsubfs.sh start/running
mtab.sh start/running
network-interface (lo) start/running
network-interface (eth0) start/running
plymouth-ready (startup) start/running, process 315
plymouth-upstart-bridge start/running, process 316
mountall-bootclean.sh start/running
network-interface-security (network-interface/eth0) start/running
network-interface-security (network-interface/lo) start/running

更新 2:

  • 重新安装 upstart 及其所有相关数据包(很痛苦)没有任何效果。
  • 使用第二个控制台,我可以init 5让卡住的系统继续正常启动。
  • 即使我手动重新挂载 root rw(或使用 rw 内核参数),系统现在也卡住了 - 我最初观察到强制 root 可写可以解决这个问题是不正确的

解决方法:

看来是ureadaheads的错。清除它导致 5 个干净的靴子没有任何问题。我将把这个问题(和 100 个额外的代表)留给任何有兴趣或知道原始问题答案的人:如果不是通过随机试验,我怎么能弄清楚这个问题。

boot
  • 1 个回答
  • 2070 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