I installed the VMware on my PC.
Let’s call a browser running on my PC a user!
I made the noVNC directory, including noVNC.html, on VMware and installed the Tigervncserver on VMware.
First, I run the below command at the VMware console:
$ cd ~/Downloads/work/Browser-In-The-NoVNC/
$ chmod +x ~/.vnc/xstartup
$ tigervncserver :1 -geometry 1920x1080
$ sudo ./utils/novnc_proxy --vnc 0.0.0.0:5901 --listen 81- xstartup
#!/bin/sh
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
export DISPLAY=:1
xrandr --output VNC-0 --mode 1920x1080 --rate 60
dbus-launch --exit-with-session gnome-session &
#openbox-session &
# Path to the configuration file
CONFIG_FILE="/home/ubuntu/Downloads/work/Browser-In-The-Browser/automation/browser_config.txt"
if [ -f "$CONFIG_FILE" ]; then
BROWSER_TYPE=$(grep 'BROWSER_TYPE' "$CONFIG_FILE" | cut -d '=' -f2)
THEME_MODE=$(grep 'THEME_MODE' "$CONFIG_FILE" | cut -d '=' -f2)
if [ "$BROWSER_TYPE" = "chrome" ]; then
if [ "$THEME_MODE" = "dark" ]; then
google-chrome --force-dark-mode --app=http://sider.ai --kiosk &
else
google-chrome --app=http://sider.ai --kiosk &
fi
sleep 2
wmctrl -r "Google Chrome" -b add,maximized_vert,maximized_horz
elif [ "$BROWSER_TYPE" = "firefox" ]; then
firefox --kiosk http://sider.ai &
sleep 2
wmctrl -r "Mozilla Firefox" -b add,maximized_vert,maximized_horz
else
echo "Unsupported browser type"
fi
else
echo "Browser configuration file not found"
fiFrom this, the Tigervncserver was run and made the browser showing the
HTTP://sider.ai page as the kiosk mode.
The noVNC.html has the CANVAS, and the browser page Tigervncserver run is placed on this CANVAS.
Now, if the user connects to the noVNC server using the link, the user can see the CANVAS on their own browser page.
In conclusion, the
sider.ai page is displayed in the user browser, not the default noVNC.html page.
I completed it here.
Let’s call the browser that displays VMware’s
HTTP://sider.ai page Tigervncserver browser!
Now, when the user performs a click event in the browser, a new browser is spawned instead of the Tigervncserver browser, and the result of the click event is displayed there.
And then, this page is placed on the CANVAS.
The questions I want to know are:There are actually two browsers in VMware.
1. In which browser does the click event actually occur? The user's browser, the noVNC.html browser, or the Tigervncserver browser?
2. How do I ensure all the event processing is done in the Tigervncserver browser launched in kiosk mode?