11.04折腾的一些杂项
关于集显和独显的切换
https://blog.51cto.com/u_16213664/9993283
https://blog.csdn.net/qq_41983842/article/details/129131044
Ubuntu conda cmd
有时候我们希望命令行启动的python是自定义的,而不是base或者root的,linux设置如下
在linux下,通过修改/.bashrc或/.bash_profile,最后面添加
1 | export PATH="~/anaconda/envs/your_env_name/bin:$PATH" # your_env_name是你自定义的环境名 |
还有的时候,你希望命令行默认激活你想要的环境,linux设置如下
修改~/.bashrc,添加
1 | conda activate your_env_name # "your_env_name"就是你的环境名 |
还有的时候,你安装的anaconda环境默认启动base环境,想要关闭,linux设置如下
1 | conda config --set auto_activate_base false # 设置非自动启动 |
原文链接: https://blog.csdn.net/weixin_40548136/article/details/106331324
ubuntu PPT to pdf
You can also use the command line of libreoffice for your purpose. This example converts all ppt-files in the current directory to pdf’s:
1 | libreoffice --headless --invisible --convert-to pdf *.ppt |
–headless
Starts in “headless mode”, which allows using the application without a user interface.
This special mode can be used when the application is controlled by external clients via the API…
It implies --invisible and strictly ignores any GUI environment.
and
–invisible
Starts in invisible mode.
Neither the start-up logo nor the initial program window will be visible. LO can be controlled and documents and dialogs can be opened via the API.
When started with this parameter, it can only be quit using the taskmanager (Windows) or the kill command (UNIX based systems).
Get more information on command line options with:
1 | man libreoffice |
(Note: You have to close all running instances of LibreOffice before the command line works.)
打开pdf的命令:
1 | evince [filename] & |
如果不在当前文件夹则需要使用cd命令或者把路径加上,例如当前的目录下有一个hello.pdf文件,那么我们可以使用以下命令打开它:
1 | evince test.pdf & |
打开或编辑.doc .odt等文本文档命令:
1 | libreoffice filename & |
例如:
1 | libreoffice test.odt & |
打‘&’的目的是让文件在后台运行,命令行终端还能用。
如果忘了打&可以 Ctrl+z,然后打bg回车
文件名中含空格要打成’\ ’
原文链接:https://blog.csdn.net/www_helloworld_com/article/details/84786581
Ubuntu 下修改键盘映射
习惯了把 Ctrl
键 和 Caps Lock
键交换,在 Linux 下如果也要修改这个映射的话。可以直接修改 /usr/share/X11/xkb/keycodes/evdev
这个键盘映射文件。
修改之前,记得备份。
打开 /usr/share/X11/xkb/keycodes/evdev
文件,找到 <CAPS> = 66;
和 <LCTL>=37;
这两行(你系统上的文件的值可能不一样)。
然后把这两个值对换,变成 <CAPS> = 37;
和 <LCTL>=66;
。然后注销重新登录就生效了。
fsfFfF
https://wgzhao.github.io/notes/tips/change-keyboard-layout-in-ubuntu/
此外还可以用 Ubuntu 自带的软件进行更改。按下Super
键(也就是Win
键),输入Tweaks
,一个开关图标的软件就会跳出来(中文名叫优化
)。打开它,在左边栏选择键盘和鼠标
,在键盘
里最后其他布局选项
。在Alt/Win键行为
或Ctrl键位置
里自行修改。
但是我自己使用优化
进行更改有时候会失效,比如在挂起之后。更改keycodes暂时没有遇到失效的情况
https://www.cnblogs.com/liuzhch1/p/16047019.htm
最终选用的方案是自带软件更改的方案. 虽然这种方案没有办法完成之类的操作, 而且下意识的删除操作还是会成功, 但是比较方便, 也不会出什么问题.