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

VNC into CI #8369

Open
dmt0 opened this issue Sep 27, 2023 · 2 comments
Open

VNC into CI #8369

dmt0 opened this issue Sep 27, 2023 · 2 comments
Assignees

Comments

@dmt0
Copy link

dmt0 commented Sep 27, 2023

Missing Information

Give a brief overview of the information you were looking for.

Here's an instruction that used to work great a couple of years ago:
https://circleci.com/docs/browser-testing/#x11-forwarding-over-ssh
But doesn't seem to work now. I suspect (please tell me if I'm wrong) that a change in CircleCI made it impossible to execute this. I run into issues starting X, as it can't open a TTY terminal.

Already Looked

N/A

Potential Locations

Perhaps some further explanation is needed.

@rosieyohannan
Copy link
Contributor

Thanks for reporting this @dmt0! I will investigate and get back to you :-D

@dmt0
Copy link
Author

dmt0 commented Sep 29, 2023

Here are instructions that actually worked for me (courtesy of GPT4):

  1. SSH into the VM
  2. Install VNC server: sudo apt-get update && sudo apt-get install -y x11vnc.
  3. Create a password for VNC server: x11vnc -storepasswd your-password /tmp/vncpasswd.
  4. Start the VNC server: x11vnc -forever -usepw -rfbport 5900 -create - you need to type the password you created in the previous step
  5. Start SSH tunnel on your local machine: ssh -L 5900:localhost:5900 -p PORT circleci@IP_ADDRESS, where port and IP are the ones from the VM.
  6. Install a VNC clent on your local machne, for Windows you can use TightVNC.
  7. Open VNC client and connect to localhost:5900, type in the password from step 3. It is normal to see a black screen if no services or windows are open.
  8. To verify that everything is working, create another SSH session to VM, install xterm sudo apt-get install -y xterm, and run a terminal DISPLAY=:20 xterm & where 20 is display number that you can find in output from step 4. The terminal should pop up in your VNC client black window!

My image is based on (rather dated) circleci/python:3.8-browsers

@rosieyohannan rosieyohannan self-assigned this Nov 8, 2023
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

2 participants