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

how to use VNC without docker #199

Open
lyj0309 opened this issue Aug 29, 2023 · 6 comments
Open

how to use VNC without docker #199

lyj0309 opened this issue Aug 29, 2023 · 6 comments
Labels
question Further information is requested

Comments

@lyj0309
Copy link

lyj0309 commented Aug 29, 2023

Hi , i'm running this in a linux server, there is a node runtime so i don't want use docker, but when i try to login, there is a captcha , so i want to use browser to run it, but there is a error

SHOW=1 node epic-games
2023-08-29 10:23:27.505 started checking epic-games
node:internal/process/esm_loader:97
    internalBinding('errors').triggerUncaughtException(
                              ^

browserType.launchPersistentContext: 
╔════════════════════════════════════════════════════════════════════════════════════════════════╗
║ Looks like you launched a headed browser without having a XServer running.                     ║
║ Set either 'headless: true' or use 'xvfb-run <your-playwright-app>' before running Playwright. ║
║                                                                                                ║
║ <3 Playwright Team                                                                             ║
╚════════════════════════════════════════════════════════════════════════════════════════════════╝
=========================== logs ===========================
<launching> /root/.cache/ms-playwright/firefox-1378/firefox/firefox -no-remote -wait-for-browser -foreground -profile /root/code/free-games-claimer/data/browser -juggler-pipe --hide-crash-restore-bubble about:blank
<launched> pid=442455
[pid=442455][err] Error: no DISPLAY environment variable specified
[pid=442455] <process did exit: exitCode=1, signal=null>
[pid=442455] starting temporary directories cleanup
============================================================
    at async file:///root/code/free-games-claimer/epic-games.js:24:17

Node.js v18.16.0

so is there any way run this like docker? expose a port like 6080, then i can visit it.

@xamindar
Copy link

Normally you should be able to do that. But at this time the 6080 port access (vnc stuff in container) appears to be broken.

@vogler
Copy link
Owner

vogler commented Sep 7, 2023

@lyj0309 is running it without docker, so you have to take care of an XServer and VNC yourself (see the Playwright message).
You can't run with SHOW=1 if there's no display to show it on.
It'd be easiest for you to run the image.

@vogler vogler added the question Further information is requested label Sep 7, 2023
@vogler vogler changed the title how to run vnc in local how to use VNC without docker Sep 7, 2023
@Targunitoth
Copy link
Contributor

Came here from #183 for testing the tool completely without docker.

This Command did the trick for me:
x11vnc -create -env FD_PROG="/usr/bin/node /opt/free-games-claimer/epic-games.js" -env X11VNC_FINDDISPLAY_ALWAYS_FAILS=1 -env X11VNC_CREATE_GEOM=${1:-1280x720x16} -env SHOW=1 -env WIDTH=1280 -env HEIGHT=720 -env LOGIN_TIMEOUT=10000 -env TIMEOUT=10000 -gone 'killall Xvfb' -bg -nopw

Dependents on sudo apt-get install x11vnc xvfb

Source: https://stackoverflow.com/questions/12050021/how-to-make-xvfb-display-visible

Then connect to it, for example with noVNC: https://github.com/novnc/noVNC

@vogler
Copy link
Owner

vogler commented Dec 18, 2023

Should put that in the wiki.

@Targunitoth Does that give you captchas as well? If no, some details (Debian/Ubuntu, version) would be beneficial for #183.

@Targunitoth
Copy link
Contributor

Sadly yes, still captchas:
grafik
I can only log in via steam.

It's an oracle VM:
# uname -a
Linux ubuntu-server 5.15.0-1048-oracle #54-Ubuntu SMP Wed Nov 8 15:12:17 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux``
# cat /etc/issue
`Ubuntu 22.04.3 LTS \n \l`

@narjekdjcusbe
Copy link

Came here from #183 for testing the tool completely without docker.

This Command did the trick for me: x11vnc -create -env FD_PROG="/usr/bin/node /opt/free-games-claimer/epic-games.js" -env X11VNC_FINDDISPLAY_ALWAYS_FAILS=1 -env X11VNC_CREATE_GEOM=${1:-1280x720x16} -env SHOW=1 -env WIDTH=1280 -env HEIGHT=720 -env LOGIN_TIMEOUT=10000 -env TIMEOUT=10000 -gone 'killall Xvfb' -bg -nopw

Dependents on sudo apt-get install x11vnc xvfb

Source: https://stackoverflow.com/questions/12050021/how-to-make-xvfb-display-visible

Then connect to it, for example with noVNC: https://github.com/novnc/noVNC

This unfortunately didn't work for me. I was able to connect using tightVNC, however after that the command exited and tightVNC shows nothing but a black, blank screen. Running node epic-games again with that screen open brings the same error as before re: xserver etc.

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

No branches or pull requests

5 participants