How can I open a VIM process with one user (using su) and then access with another user?

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I want to open a VIM instance with one user account (using su), then login as another user and access the same session with that user.



Example User1:
su - user2 -c vim somefile.txt



Then I want to login as User2 and then access that VIM process created by that first user. I know it's possible but I'm not sure how to do it.







share|improve this question






















  • So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
    – Time4Tea
    Jan 31 at 14:17






  • 2




    tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
    – quixotic
    Jan 31 at 15:34














up vote
1
down vote

favorite












I want to open a VIM instance with one user account (using su), then login as another user and access the same session with that user.



Example User1:
su - user2 -c vim somefile.txt



Then I want to login as User2 and then access that VIM process created by that first user. I know it's possible but I'm not sure how to do it.







share|improve this question






















  • So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
    – Time4Tea
    Jan 31 at 14:17






  • 2




    tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
    – quixotic
    Jan 31 at 15:34












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I want to open a VIM instance with one user account (using su), then login as another user and access the same session with that user.



Example User1:
su - user2 -c vim somefile.txt



Then I want to login as User2 and then access that VIM process created by that first user. I know it's possible but I'm not sure how to do it.







share|improve this question














I want to open a VIM instance with one user account (using su), then login as another user and access the same session with that user.



Example User1:
su - user2 -c vim somefile.txt



Then I want to login as User2 and then access that VIM process created by that first user. I know it's possible but I'm not sure how to do it.









share|improve this question













share|improve this question




share|improve this question








edited Jan 31 at 15:24









Time4Tea

866119




866119










asked Jan 31 at 13:23









Coder1975

61




61











  • So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
    – Time4Tea
    Jan 31 at 14:17






  • 2




    tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
    – quixotic
    Jan 31 at 15:34
















  • So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
    – Time4Tea
    Jan 31 at 14:17






  • 2




    tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
    – quixotic
    Jan 31 at 15:34















So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
– Time4Tea
Jan 31 at 14:17




So, you want to open an interactive process (VIM) with one user, and then access with another user? Question: why does the first user have to use su, but not the second one?
– Time4Tea
Jan 31 at 14:17




2




2




tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
– quixotic
Jan 31 at 15:34




tmux or screen are your best bets. alternately, disown or reptyr or other tricks might be used. see serverfault.com/questions/24425/… or unix.stackexchange.com/questions/4034/… or a myriad of similar questions. the only difference here is running the initial process as a different user; personally i'd use su with tmux.
– quixotic
Jan 31 at 15:34















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);








 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420950%2fhow-can-i-open-a-vim-process-with-one-user-using-su-and-then-access-with-anoth%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420950%2fhow-can-i-open-a-vim-process-with-one-user-using-su-and-then-access-with-anoth%23new-answer', 'question_page');

);

Post as a guest













































































1 zxybFiU7dPT,fXndACZ,XB,SqSetd
g5L,7ndAD,hQVx7GNJk7Tgin0SD4wNF 6q6HSn3qRwC0yZ7 W,Zm8MBqlN1JGR GzFvX nSc71bB9qR4Kaz sspn,MD,i513o7pa Tm

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS