我有一台带有扩展坞的笔记本电脑,上面连接了一个大显示器。当笔记本电脑对接时,我将显示器用作主显示器,将笔记本电脑屏幕用作辅助显示器。
当我取消停靠时,笔记本电脑屏幕成为我的主要显示器,所有窗口都移到它上面。当我将笔记本电脑对接时,显示器会自动再次成为主显示器,但所有窗口都保留在笔记本电脑屏幕上。我必须将每一个拖到显示器上并调整其大小。
我怎样才能让我的窗口自动恢复它们在我取消停靠之前的位置和大小(假设它们仍然打开)? 我能找到的只是关于在登录时恢复程序的答案。这不是我要找的。
我在 Arch Linux 上使用 Gnome 3。
我之前的问题产生了添加加密交换文件的命令:
# One-time setup:
fallocate -l 4G /root/swapfile.crypt
chmod 600 /root/swapfile.crypt
# On every boot:
loop=$(losetup -f)
losetup ${loop} /root/swapfile.crypt
cryptsetup open --type plain --key-file /dev/urandom ${loop} swapfile
mkswap /dev/mapper/swapfile
swapon /dev/mapper/swapfile
Run Code Online (Sandbox Code Playgroud)
但是Arch Linux使用systemd,我无法弄清楚如何最好地让 systemd 自动激活我的交换文件。 systemd.swap建议我应该有一个dev-mapper-swapfile.swap看起来像这样的单元:
[Unit]
Description=Encrypted Swap File
[Swap]
What=/dev/mapper/swapfile
Run Code Online (Sandbox Code Playgroud)
那将执行swapon命令。但我不确定如何执行准备/dev/mapper/swapfile. 我认为dev-mapper-swapfile.swap应该声明对某个其他单元的依赖,但我不确定该单元应该是什么样子。
我刚刚在 Arch Linux 上从旧的 MySQL 客户端升级到mariadb-clients-10.0.21-3。升级后,在使用Emacs的sql-mysql功能时不再看到提示了。
似乎mysql正在缓冲提示,因为它显示在输出的第一行:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 19662
Server version: 4.1.11-standard-log
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. …Run Code Online (Sandbox Code Playgroud) 我想知道Unix Power Tools书第三版今天是否仍然适用?我想订购它,但恐怕它只包含过时的材料。
如果有,最近有没有类似的书?
我在我的系统上使用 Emacs 23。我从一位同事(他有不同的 Linux 发行版)那里收到了一个要添加到/usr/share/emacs/site-lisp/目录中的文件。
在我努力做到这一点时,我注意到另一个名称类似的目录: /usr/share/emacs23/site-lisp/. 查看它们的内容时,我注意到它们并不相同。
这在所有发行版上的所有 Emacs 配置中都很常见吗?什么时候我应该添加一个而不是另一个有不同的目的吗?哪一个?我怎么知道?
简而言之,这两个目录有什么区别?
我安装了以下 cron 选项卡:
crontab -l
# m h dom mon dow command
*/10 * * * * "echo" >> /tmp/cron.log
Run Code Online (Sandbox Code Playgroud)
服务器在机架空间,它是一个云服务器:
Linux myserver #8 SMP Mon Sep 20 15:54:33 UTC 2010 x86_64 GNU/Linux
Ubuntu 10.04 LTS
Run Code Online (Sandbox Code Playgroud)
当我使用将这个条目添加到 crontabcrontab -e时,我在保存它时收到以下消息:
crontab: installing new crontab
Run Code Online (Sandbox Code Playgroud)
但它没有被执行,缺少什么?