タグ

関連タグで絞り込む (1)

タグの絞り込みを解除

Emacsとsudoに関するgoingerのブックマーク (3)

  • Re-open read-only files as root automagically

    I have my emacs running as server and two small wrapper scripts ec and et which connect to it with emacsclient (either creating a new frame or opening a terminal frame). Because I want to do all my system administration (editing files in /etc/) with emacs and don’t want to start another emacs instance as root, I use TRAMP to switch to superuser mode automagically if the opened file is read-only. H

    Re-open read-only files as root automagically
  • Emacs で sudo を介して開く

    カテゴリー » ソフトウェア » Emacs March 25, 2008 Emacs で sudo を介して開く  書き込みにroot権限が必要なファイルを編集したい時、いちいち su(sudo) しなくてもEmacsならtrampを利用して/sudo:root@localhost:/etc/httpd/conf/httpd.conf or /sudo::/etc/httpd/conf/httpd.conf (省略系)でいけることを、Emacsでリモートサーバ上のファイルをrootで編集する を見て知った今日この頃。よく使うと思うので「sudo → /sudo::/」のabbrev登録しておく。 さらには ssh で別マシンにログインする事も可能ssh で host に user で接続して /path/to を開く /ssh:user@host:/path/to user でログインし

  • Emacs から sudo 経由でファイルを編集する方法 | Carpe Diem

    昨日の社内 LT で、とあるエンジニアから「sudo するときは vi を使いますよね?だから、最近 vi でいい気がしてきた」という痛い発言が出ました。 Emacs を愛用している人として、とても悔しいと思って試してみました。 Emacs から sudo 経由でファイルを編集するときは、tramp を使います。以下、tramp のインストールと設定手順です。 以下、作業手順 家サイトより、tramp 2.1.9 をダウンロードする 展開してから、./configure –with-contrib && make && make clean する tram-2.19 ディレクトリ全体を、ロードパスの通った場所におく Emacs を起動してから、M-x tramp-version をして tramp のバージョンを確認する ここに書いてあるとおり、C-x C-f /sudo::ファイル名

  • 1