Meino Christian Cramer wrote:
Hi,

 I often edit some system related files as root while haveing cat-ed related
 (text-) material as user on another terminal.

 Trying to do the following under X and with mrxvt as termulator does not work:

 sux root
 <password>

 vim <a system file>

 (and as user at another termulator-window"):

 cat <a file>
 selecting some text

 (back to the rooted vim: )

 "*p

 Doing both as user works nicely.

Is it possible to Cut(user)'n'Paste(root) somehow? Is this a problem
 of security settiongs, of permission settings or of me myself ? ;)

 Ah! by the way: I am running Gentoo linux (updated on a daily basis)
 and I am using vim via the console (mrxvt termulator) under X.


 Thanks a lot for any help in advance!
 Keep editing!
 mcc


If it doesn't work via the clipboard, try the older (pre-clipboard) method, using an auxiliary file:

        :[range]w {filename}    " write lines (from) (to)

        :[line]r {filename}     " read after (line)
                                " or before line 1 if (line) == 0

User -> root should work with no problem. For root -> user you might need

        :!chmod {filename} a+r

in between, to give everyone read permission.


Best regards,
Tony.

Reply via email to