有没有办法使用emacsclient(用户)打开文件,但是有root权限?
发布时间:2020-12-13 18:37:03 所属栏目:Linux 来源:网络整理
导读:我总是运行emacs作为守护进程,但是当我想要做一些相似的事情 sudo emacsclient /etc/make.conf 我不能这样做,因为root正在使用另一个emacs,而我真的不想运行2个守护进程,或者等待一些emacs加载简单文件. 我需要一些解决方案emacsclientsudo /etc/make.conf :
我总是运行emacs作为守护进程,但是当我想要做一些相似的事情
sudo emacsclient /etc/make.conf 我不能这样做,因为root正在使用另一个emacs,而我真的不想运行2个守护进程,或者等待一些emacs加载简单文件. 我需要一些解决方案emacsclientsudo /etc/make.conf :)来编辑用户emacs客户端的系统文件. 解决方法
添加到?/ .profile:
alias E="SUDO_EDITOR="emacsclient" sudo -e" 然后 E /etc/hosts 你应该可以使用sudoedit而不是sudo -e,但是我找不到前者在我的Mac (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – 如何将结果文件从一个grep传递传递给另一个grep传
- linux – 用于Docker机器的Golang Mac OSX版本
- linux-kernel – uboot- MMC没有SDcard
- linux – Ubuntu HTTP延迟陷入奇怪的分位数
- c – 线程,信号和儿童处理:多么世界……多么美好的世界
- linux – 为普通用户(非root用户)提供初始化和关闭自动运行
- 华为7.0系统手机最完美激活Xposed框架的教程
- linux – spin_lock和spin_unlock会损害单CPU机器上SMP内核
- linux – “编译器线程支持未打开.”
- linux – Crystalspace vs. Irrlicht vs. …?