如何获取用户明确安装的软件包列表?
我知道:
pacman -Qe
pacman -Qi
Run Code Online (Sandbox Code Playgroud)
但那些似乎包括我的发行版的默认包(例如 sudo)。我只想列出用户使用例如“pacman -Syu newpackage”安装的软件包
systemctl status mytimer.timer
Run Code Online (Sandbox Code Playgroud)
告诉我它何时处于活动状态以及下一次触发何时到期。如何获取过去计时器触发时间的列表?
我的关机需要很长时间(我使用的是 Debian 8.1),我发现它可以通过在关闭系统之前卸载网络驱动器来修复。显然,在卸载所有驱动器之前,网络已断开连接。
为了自动执行此操作,我尝试创建一个 systemd 服务,但它不起作用,即它似乎没有及时执行卸载并且关闭过程仍然需要很长时间。我的方法受到这些问题的答案以及对 systemd.service 手册页的一些浏览的启发...
[unit]
description=Unmount network drives on shutdown
Before=shutdown.target reboot.target halt.target network.target
[Service]
type=oneshot
RemainAfterExit=true
ExecStart=/bin/true
ExecStop=/bin/sh umount /media/networkdrive1 /media/networkdrive2
[Install]
WantedBy=multi-user.target
Run Code Online (Sandbox Code Playgroud)
编辑
网络驱动器通过以下几行安装在 /etc/fstab 中:
//192.168.1.5/networkdrive1 /media/nw1 cifs _netdev,uid=myuser,credentials=/home/myuser/.credfile
//192.168.1.5/networkdrive2 /media/nw2 cifs _netdev,uid=myuser,credentials=/home/myuser/.credfile
Run Code Online (Sandbox Code Playgroud) 我使用安装了 hwinfo sudo apt-get install hwinfo,系统告诉我:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
hwinfo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/32.8 kB of archives.
After this operation, 90.1 kB of additional disk space will be used.
Selecting previously unselected package hwinfo.
(Reading database ... 192008 files and directories currently installed.)
Preparing to unpack .../hwinfo_21.6-1_amd64.deb ...
Unpacking hwinfo (21.6-1) …Run Code Online (Sandbox Code Playgroud) 我使用本指南在 Asus C201 Chromebook 上安装了 Arch Linux (该笔记本的 debian 和 fedora 指南对我不起作用,导致黑屏)。
这或多或少开箱即用,直到我使用pacman -Syu. 现在触摸板不再正常工作:
行为描述(前往下面的“更新”查看奇迹解决方案)
当我用一根手指时,我可以非常缓慢地移动光标,并用指甲刮擦触摸板。但这实际上只是移动了一点光标。
我还可以按下触摸板,然后移动光标,在这种情况下,光标会移动并突出显示。
到目前为止我尝试过的
/etc/X11/xorg.conf.d/70-synaptics.conf中显示的配置作为示例。synaptics.conf,但这也没有改变行为。xf86-input-synapticssudo dmesg | grep elan显示以下两行:
[ 1.6 ] i2c 4-0015:驱动程序 elan_i2c 请求探测延迟
[408.6]elan_i2c 4-0015:无效的报告ID数据(ff)
概括
根据触摸板的行为,感觉升级对触摸板配置造成了严重破坏。不过配置文件好像没问题。重新安装触摸板驱动似乎没有影响。
我能做什么还有其他想法吗?
/etc/X11/xorg.conf.d/50-synaptics.conf
我卸载并重新安装了 synaptics 驱动程序,这是配置文件:
Section "InputClass"
Identifier "touchpad"
Driver "synaptics"
MatchIsTouchpad "on"
Option "TapButton1" "1"
Option "TapButton2" "3"
Option "TapButton3" "2"
Option "VertEdgeScroll" "on"
Option "VertTwoFingerScroll" "on"
Option "HorizEdgeScroll" …Run Code Online (Sandbox Code Playgroud) 我使用的是最新的 Arch/Antergos Linux。
从休眠状态恢复后,我的触摸板停止工作。我似乎受到了这个错误的影响,我需要sudo rmmod i2c_hid; modprobe i2c_hid在每次恢复后输入以使触摸板恢复工作状态。
我试图通过添加脚本这一进程的自动化fix-touchpad.sh,以/usr/lib/systemd/system-sleep使得它在恢复时从休眠状态运行:
#!/bin/sh
if [ $1 = post ]
then
rmmod i2c_hid
modprobe i2c_hid
fi
Run Code Online (Sandbox Code Playgroud)
该脚本在启动时执行,我在测试echo "something" > log.log之前和之后if以及就在fi. 然而,它并没有让我的触摸板恢复原状。
我还在sh fix-touchpad.sh post恢复后成功测试了脚本,瞧,我的触摸板再次唤醒。
为什么脚本在作为恢复程序的一部分运行时不修复触摸板?
有没有其他方法可以修复我的触摸板?
我已经安装了 vim 并配置了+python3/dyn. 如果我运行,vim --noplugin我可以使用py3. 但是,启用我的插件后,出现以下错误:
E837: This Vim cannot execute :py3 after using :python
E263: Sorry, this command is disabled, the Python library could not be loaded.
Run Code Online (Sandbox Code Playgroud)
我怀疑其中一个插件加载了 python2,因此定义了正在使用的 python 版本(类似于这个 vim-bootstrap 问题)。问题是我不知道是哪个。
如何在我的 vim 版本中使用 python3?
安装插件
以下插件随 Vundle 一起安装:
60 " let Vundle manage Vundle, required
61 Plugin 'gmarik/Vundle.vim'
62 "Bundle 'Valloric/YouCompleteMe'
63 Plugin 'tmhedberg/SimpylFold'
64 Plugin 'vim-scripts/indentpython.vim'
65 Plugin 'scrooloose/syntastic'
66 Plugin 'scrooloose/nerdtree'
67 Plugin 'jistr/vim-nerdtree-tabs'
68 Plugin …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 setfattr,但总是得到 Operation not supported
在我的主目录中,我正在执行以下操作:
touch delete.me
setfattr -n naomi -v washere delete.me
Run Code Online (Sandbox Code Playgroud)
这返回setfattr: delete.me: Operation not supported.
我的主目录是 ext4 并且 delete.me肯定存在。我在 Fedora 25 上。知道为什么这不起作用吗?
arch-linux ×3
systemd ×3
debian ×2
fedora ×2
touchpad ×2
apt ×1
chrome-book ×1
command-line ×1
ext4 ×1
files ×1
hibernate ×1
networking ×1
pacman ×1
python3 ×1
shell-script ×1
shutdown ×1
synaptic ×1
unmounting ×1
vim ×1
xattr ×1