1

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.

  • 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 '18 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 '18 at 15:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.