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

mcandril's questions

Martin Hope
mcandril
Asked: 2022-12-09 11:17:42 +0800 CST

ThinkBook 14s Yoga Gen2 屏幕旋转

  • 5

我刚刚为我妈妈买了一台 ThinkBook 14s Yoga Gen2 作为圣诞节礼物。我测试的所有东西开箱即用。Plasma 似乎缺少虚拟键盘/我在使用 maliit 时遇到了问题,但是对于 GNOME,除了一件事之外的一切似乎都很好:

屏幕旋转。

它没有被锁定:

~$ gsettings get org.gnome.settings-daemon.peripherals.touchscreen orientation-lock
false

iio-sensor-proxy 确实通过报告正确的方向

gdbus introspect --system --dest net.hadess.SensorProxy --object-path /net/hadess/SensorProxy

所以这不是驱动程序/硬件问题。

但是,屏幕不会旋转。任何想法,任何人?

在最坏的情况下,我将不得不轮询上面的两个命令并自己编写一个脚本(随意在评论中建议一个旋转屏幕的命令:)),但它看起来应该无需编码就可以工作......

lenovo
  • 1 个回答
  • 20 Views
Martin Hope
mcandril
Asked: 2020-08-18 05:26:03 +0800 CST

incron 作业不写入临时目录

  • 1

我有一个非常奇怪的问题,我可能没有正确煮熟,但我尝试了一个最小的例子:

在 20.04 的 20.04 lxd 容器中,我正在尝试运行由 incron 触发的作业。对于我的最小示例,这是我的 incron 行:

/home/scanfiler/test    IN_CLOSE_WRITE  /home/scanfiler/test.sh &>> /tmp/log-scanfiler-test

这是我的测试脚本

#!/bin/bash
logger "Starting"
touch /tmp/test/test-$(date +%s)-1
touch ~/test_out/test-$(date +%s)-1
sleep 20
touch /tmp/test/test-$(date +%s)-2
touch ~/test_out/test-$(date +%s)-2
logger "Done"

我正在写入日志,然后在主文件夹中创建一个文件,在 tmp 文件夹中创建一个文件,然后等待 20 秒(这让我有时间在运行时检查,以防 tmp 以某种方式立即被清除),然后我正在写入更多文件。

这就是发生的事情:

scanfiler ~scanfiler # rm test/testblah && touch test/testblah
scanfiler ~scanfiler # journalctl -xe|tail
Aug 17 14:59:26 scanfiler incrond[2526]: PATH (/home/scanfiler/test) FILE (testblah) EVENT (IN_CLOSE_WRITE)
Aug 17 14:59:26 scanfiler incrond[2526]: (scanfiler) CMD (/home/scanfiler/test.sh &>> /tmp/log-scanfiler-test)
Aug 17 14:59:26 scanfiler scanfiler[1250558]: Starting
scanfiler ~scanfiler # 
scanfiler ~scanfiler # ls /tmp/test 
scanfiler ~scanfiler # ls test_out 
test-1597669166-1
scanfiler ~scanfiler # journalctl -xe|tail
Aug 17 14:59:26 scanfiler incrond[2526]: PATH (/home/scanfiler/test) FILE (testblah) EVENT (IN_CLOSE_WRITE)
Aug 17 14:59:26 scanfiler incrond[2526]: (scanfiler) CMD (/home/scanfiler/test.sh &>> /tmp/log-scanfiler-test)
Aug 17 14:59:26 scanfiler scanfiler[1250558]: Starting
scanfiler ~scanfiler # journalctl -xe|tail
Aug 17 14:59:26 scanfiler incrond[2526]: PATH (/home/scanfiler/test) FILE (testblah) EVENT (IN_CLOSE_WRITE)
Aug 17 14:59:26 scanfiler incrond[2526]: (scanfiler) CMD (/home/scanfiler/test.sh &>> /tmp/log-scanfiler-test)
Aug 17 14:59:26 scanfiler scanfiler[1250558]: Starting
Aug 17 14:59:46 scanfiler scanfiler[1250627]: Done
scanfiler ~scanfiler # ls /tmp/test       
scanfiler ~scanfiler # ls test_out                                
test-1597669166-1  test-1597669186-2
scanfiler ~scanfiler # ls /tmp/log-scanfiler-test
ls: cannot access '/tmp/log-scanfiler-test': No such file or directory

如您所见,即使在运行时,也不会创建 tmp 文件,而主目录中的文件就在那里。最终,甚至应该在 tmp 中的日志文件都不存在。当由同一用户在控制台中运行时,一切正常,因此我的 tmp 权限可能不会以某种方式被破坏。

谁能告诉我这里发生了什么?我的脚本中有更多奇怪的问题(在控制台中运行时运行良好),但也许它们是相关的,所以我想先解决这个问题。

permissions tmp lxc lxd
  • 1 个回答
  • 139 Views
Martin Hope
mcandril
Asked: 2019-06-21 09:23:19 +0800 CST

使用自编译 ZFS 自动挂载加密 fs

  • 0

我目前正在尝试将运行 19.04 的数据转储服务器从 LUKS+btrfs 更改为 ZFS。系统驱动器经过 LUKS 加密,可以通过 SSH 解密。它包含一个用于解密 ZFS 文件系统的密钥文件。我已经完成了一半,但自动挂载不起作用。

  • 我已经设法编译 ZFS 0.8.1 并按照wiki构建了一个 DKMS 包。通过阅读makefile,我还发现我还需要制作deb-utils来获取zpool等。
  • 我创建了一个支持加密的池

    zpool create -o ashift=12 dataint /dev/disk/by-id/mydrive zpool set feature@encryption=enabled dataint

  • 我在其中创建了用密钥文件加密的文件系统

    zfs create \ -o encryption=on \ -o keylocation=file:///root/keys/hdd256.key -o keyformat=raw\ dataint/test

  • 我可以安装这个zfs mount dataint -l

我现在遇到的问题是:

  1. zfs 在启动时未加载。甚至没有内核模块,因此当然也不是池。

  2. 仅当导入池或使用该-l选项挂载文件系统时才会加载加密卷。我想当 1. 解决时,必须以某种方式解决自动加载问题?

我确实有一些 zfs systemd 服务,但它们被屏蔽了。不确定它们是否是我之前删除的 0.7 包管理器安装的遗留物。

encryption mount systemd zfs
  • 2 个回答
  • 1483 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