Questions tagged [root]

8 questions
9
votes
1 answer

How to disable auto-save in emacs only for files opened as root

I want to use emacs auto-save feature with tramp, but only for file that I don't open using sudo. My current configuration, based on the tramp documentation, looks like this: ;;;;;;;; BAKUCP ;;;;;;;; ;; Backup remote files locally to stop autosave…
radious
  • 231
  • 1
  • 3
6
votes
0 answers

Cannot edit a file as root if ~/.authinfo.gpg file exists

I got ~/.authinfo.gpg to store my multiple email accounts for gnus, but if ~/.authinfo.gpg exists, the tramp won't work. It will always say: Decrypting /home/chz/.authinfo.gpg...done Emacs won't even load the file into Emacs. If I remove that file,…
CodyChan
  • 2,599
  • 1
  • 19
  • 33
5
votes
2 answers

Edit file as root over when already using TRAMP

Right now, I have the following in my init (defun my-edit-file-as-root () "Find file as root" (interactive) (find-alternate-file (concat "/su:root@localhost:" buffer-file-name))) (defun my-edit-file-as-root-maybe () "Find file as root if…
PythonNut
  • 10,243
  • 2
  • 29
  • 75
3
votes
0 answers

How to run process in administrative mode from Emacs?

I've been using powershell.el in MS Windows Emacs, but I sometimes want to be administrative mode so that I can do software installation via chocolatey, etc. Is there any way to call shell command, or call-process, in admin. mode from Emacs?
dualism
  • 304
  • 1
  • 6
2
votes
2 answers

How do I open a non-readable file from inside emacs when I opened emacs as a regular user?

The question pretty much says it all. I opened emacs as a regular user and am trying to edit something in the /etc/ folder (I know this is dangerous etc. etc.) How can I do this?
Startec
  • 1,354
  • 1
  • 13
  • 30
0
votes
1 answer

How to open serial-port with root privileges

When I try to open /dev/ttyUSB0 with serial-term, following permission error shows: Opening serial port: Permission denied, /dev/ttyUSB0 I know I can add my user to a group that has access to /dev/tty*. Probably something like: # sudo usermod -aG…
Garid
  • 545
  • 1
  • 13
0
votes
1 answer

Trying to edit/save file with root privilege fails with "Copying directly failed, see buffer '*tramp/sudo root @HOST*'

I have done this a ton of times in the past 10 months or so that I have been using Emacs (which I have quickly come to love, by the way) and never had a problem. No clue what I changed or how, but now this does not work at all. As far as I know, I…
0
votes
1 answer

How to avoid using auth-sources when editing with sudo?

When I invoke crux-sudo-edit, Emacs hangs forever with the following message: Decrypting /home/$USER/.authinfo.gpg...0% until I press C-g, then it asks: Passphrase for symmetric encryption for /home/$USER/.authinfo.gpg: (When finding a file with…
Daanturo
  • 180
  • 8