Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vscode does not start a separate instance when different --user-data-dir is passed #42514

Closed
ymolists opened this issue Jan 30, 2018 · 13 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux verified Verification succeeded workbench-os-integration Native OS integration issues
Milestone

Comments

@ymolists
Copy link

ymolists commented Jan 30, 2018

  • VSCode Version: code-insider-1.20.0-1517305900
  • OS Version: Ubuntu 17.10

Steps to Reproduce:

  1. run in one terminal ./code-insiders --verbose --user-data-dir /tmp/vscode/000
  2. run in another terminal ./code-insiders --verbose --user-data-dir /tmp/vscode/001

Nothing happens. And the logs on term 1 console shows that vscode tried to use the same instance

Does this issue occur when all extensions are disabled?: NA

This comment explains what was the original intent

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Jan 30, 2018
@weinand weinand assigned bpasero and unassigned Tyriar Jan 30, 2018
@Tyriar
Copy link
Member

Tyriar commented Jan 30, 2018

--user-data-dir will only work for the first instance of vscode by design.

@Tyriar Tyriar closed this as completed Jan 30, 2018
@Tyriar Tyriar added the *as-designed Described behavior is as designed label Jan 30, 2018
@ymolists
Copy link
Author

why on earth close the ticket ? there is a functionality that is 1) documented somewhere else to be what i am expecting and 2) is a clear need. Please don't just close the ticket and push it on someone else plate here :(

@Tyriar
Copy link
Member

Tyriar commented Jan 30, 2018

@ymolists I closed it as you're suggesting a feature/change which we will not implement. --user-data-dir was created to enable running as root and portable installs. It was not made to allow running of multiple main processes.

@ymolists
Copy link
Author

ymolists commented Jan 30, 2018

@Tyriar there is an option in gihub to actually reword the title. Is that all it takes to reopen this because i can definitely do that instead of creating a new ticket ?

@Tyriar
Copy link
Member

Tyriar commented Jan 30, 2018

@ymolists it is a much larger change than you likely envision to support launching multiple main processes and we generally discourage the user of --user-data-dir unless you absolutely need it. We are trying to keep the amount of issues down to those that are actively being considered as it's difficult to manage several thousand with our small team.

@ymolists
Copy link
Author

Duly noted. I am assuming this already came up and was closed as a no op because of the Hefty amount of engineering required. In the future it would help if you just say that this is a no-fix please take a look at this issue why we decided to not fix this. It helps people like me with absolutely no context or the experience you have :) I am assuming this was already debated elsewhere !

@bpasero
Copy link
Member

bpasero commented Jan 31, 2018

@ymolists @Tyriar on macOS I can open 2 instances of VS Code using --user-data-dir multiple times with no problems and I would be surprised if there was any code that would prevent to use this argument more than once?

@bpasero bpasero added info-needed Issue requires more information from poster and removed *as-designed Described behavior is as designed terminal Integrated terminal issues labels Jan 31, 2018
@bpasero bpasero reopened this Jan 31, 2018
@weinand
Copy link
Contributor

weinand commented Feb 1, 2018

I've verified that the following works on macOS and Windows but does not work on linux (ubuntu 16.04 LTE):

sardinia:~ weinand$ code --user-data-dir ./tmp/A
sardinia:~ weinand$ code --user-data-dir ./tmp/B

On linux the second command activates the first window. So there seems to be a bug.

In addition, I don't think that use of --user-data-dir is discouraged.
Using --user-data-dir is a convenient way to run multiple completely isolated instances of VS Code.

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Feb 1, 2018
@bpasero bpasero removed the info-needed Issue requires more information from poster label Feb 1, 2018
@bpasero
Copy link
Member

bpasero commented Feb 1, 2018

@Tyriar @joaomoreno do we prevent this on Linux for some reason?

@joaomoreno
Copy link
Member

Not that I am aware of... It should work.

@joaomoreno
Copy link
Member

joaomoreno commented Feb 1, 2018

This might be related to XDG_RUNTIME_DIR.

@weinand is that variable set in your system?

@joaomoreno
Copy link
Member

If confirmed, I suggest to do it similarly to Windows: hash the userDataPath and use that for the sockets paths.

@bpasero bpasero added this to the February 2018 milestone Feb 1, 2018
@weinand
Copy link
Contributor

weinand commented Feb 1, 2018

@joaomoreno yes, both Ubuntu 16.04 and 17.10 have a variable XDG_RUNTIME_DIR defined. This seems to be the default since I didn't change my environment in any way.

@joaomoreno joaomoreno added linux Issues with VS Code on Linux workbench-os-integration Native OS integration issues labels Feb 1, 2018
@bpasero bpasero added the verified Verification succeeded label Mar 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug linux Issues with VS Code on Linux verified Verification succeeded workbench-os-integration Native OS integration issues
Projects
None yet
Development

No branches or pull requests

5 participants