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

Failed to get D-Bus connection: Operation not permitted #88

Closed
pluveto opened this issue Jun 13, 2019 · 2 comments
Closed

Failed to get D-Bus connection: Operation not permitted #88

pluveto opened this issue Jun 13, 2019 · 2 comments

Comments

@pluveto
Copy link

pluveto commented Jun 13, 2019

By LxRunOffline.exe run -n centos-7 I connected to my centos.
And I wanted to do so by ssh. But when calling systemctl xxx, I got Failed to get D-Bus connection: Operation not permitted.
I googled it, and it's said that this is because the design of docker. If user does want to use systemctl , he must provide param --privileged=true for the docker launch command. But by using LxRunOffline, I'm not able to access docker directly. What should I do?

@DDoSolitary
Copy link
Owner

LxRunOffline has nothing to do with docker, it's just a management interface for Windows 10's WSL functionality. Currently WSL doesn't support systemd: microsoft/WSL#994

@bimimicah
Copy link

You can work around the issues with systemctl by replacing it with this script by @gdraheim:
https://github.com/gdraheim/docker-systemctl-replacement/blob/master/files/docker/systemctl.py

just do the following (assumes /usr/bin/systemctl):

mv /usr/bin/systemctl /usr/bin/systemctl.old
curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl
chmod +x /usr/bin/systemctl

@DDoSolitary is right, this doesn't have anything to do with docker, but with this workaround you might get sshd working, who knows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants