EXALAB/AnLinux-App

[feature request] vnc server stand-alone installation method

jindam-vani opened this issue · 12 comments

  • is it possible to start vnc session without installing desktop environment?
  • if no, provide stand-alone vnc server installation similar to SSH.

note: right now i am using twm on debian bullseye (userland app). twm is enough for me.

first requseted on #401 but the focus of the issue shifted to vnc start issue

twm: https://en.wikipedia.org/wiki/Twm

  • Yes its possible to start vnc without desktop, it will show a blank screen, and if you run a graphical app the gui will run on the vnc server.
  • I make an experimental script just for you, this might be added as a new feature in the future, but no guarantee.
    Command: wget https://github.com/EXALAB/Anlinux-Resources/raw/master/Experimental/vncserver/apt/de-apt-vnc.sh && bash de-apt-vnc.sh

This setup currently include startx in xstartup, if you encountered any issue, please report it here.

@exalab999 thank you for considering my request. i assume
the command should after ./start-debian.sh. i
will report after 18th, november about success or
failure of the script...

@exalab999

installed successfully, but it seems to have an issue.

  • installed debian
  • edited /start-debian.sh
  • enable sdcard access
  • copied sources.list
  • ./start-debian.sh
  • # apt update && apt full-upgrade
  • installed vnc server
    ** error: Would you like to enter a view-only password (y/n)? n xauth: file /root/.Xauthority does not exist New 'remote-desktop' desktop is localhost:1 Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/localhost:1.log
  • i am able to access using multivnc
  • screenshot of vnc session
    vnc
  • webarchive —localhost:1.log

localhost:1.log

  • it seems twm is not installed by default in debian installation.....

@jindam-vani

It was designed to be blank since it only contain vnc server.

If you need it to work with twn, simply install twm using

apt install twm

then stop the vncserver:

vncserver-stop

and restart it:

vncserver-start

This should be able to run twm when vnc started, if this doesn't work, try to edit ~/.vnc/xstartup file and replace startx to the command that start twm.

  • i am able to use twm only after installing xorg: apt install xorg
  • i hope you will remove experimental & add this to "window manager"?

To @jindam-vani and everyone who come here to search how to install TWM, this will not be added as new feature, but a script has been added to install twm on apt based distro:

wget https://github.com/EXALAB/Anlinux-Resources/raw/master/Beta/window_manager/apt/TWM/de-apt-twm.sh && bash de-apt-twm.sh

This script is for apt based distro only, and it will NOT be removed from repo in the future.

@exalab999 i tried to to run above command on fresh installation:

Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:10:36 ERROR 404: Not Found.

--2022-11-19 06:10:36--  https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Beta/windowmanager/apt/TWM/vncserver-start
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:10:37 ERROR 404: Not Found.

--2022-11-19 06:10:37--  https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Beta/windowmanager/apt/TWM/vncserver-stop
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8000::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:10:38 ERROR 404: Not Found.

chmod: cannot access '/root/.vnc/xstartup': No such file or directory
chmod: cannot access '/usr/local/bin/vncserver-start': No such file or directory
chmod: cannot access '/usr/local/bin/vncserver-stop': No such file or directory

You can now start vncserver by running vncserver-start

It will ask you to enter a password when first time starting it.

The VNC Server will be started at 127.0.0.1:5901

You can connect to this address with a VNC Viewer you prefer

Connect to this address will open a window with TWM



Running vncserver-start



To Kill VNC Server just run vncserver-stop



de-apt-twm.sh: line 43: vncserver-start: command not found

@jindam-vani Sorry my bad, fixed it now and should work, it was a typo in the script.

Changed from windowmanager to window_manager

not working:

$ ./start-debian.sh
root@localhost:~# wget https://github.com/EXALAB/Anlinux-Resources/raw/master/Beta/window_manager/apt/TWM/de-apt-twm.sh && bash de-apt-twm.sh
--2022-11-19 06:42:35--  https://github.com/EXALAB/Anlinux-Resources/raw/master/Beta/window_manager/apt/TWM/de-apt-twm.sh
Resolving github.com (github.com)... 20.207.73.82
Connecting to github.com (github.com)|20.207.73.82|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/EXALAB/Anlinux-Resources/master/Beta/window_manager/apt/TWM/de-apt-twm.sh [following]
--2022-11-19 06:42:36--  https://raw.githubusercontent.com/EXALAB/Anlinux-Resources/master/Beta/window_manager/apt/TWM/de-apt-twm.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8000::154, 2606:50c0:8002::154, 2606:50c0:8003::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8000::154|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1330 (1.3K) [text/plain]
Saving to: ‘de-apt-twm.sh.5’

de-apt-twm.s 100%   1.30K  --.-KB/s    in 0s

2022-11-19 06:42:36 (3.38 MB/s) - ‘de-apt-twm.sh.5’ saved [1330/1330]

Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org/debian-security bullseye-security InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://deb.debian.org/debian bullseye-backports InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
tightvncserver is already the newest version (1:1.3.10-3).
twm is already the newest version (1:1.0.10-1).
xorg is already the newest version (1:7.7+22).
dbus-x11 is already the newest version (1.12.24-0+deb11u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
mkdir: cannot create directory ‘/root/.vnc’: File exists
--2022-11-19 06:42:47--  https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Beta/windowmanager/apt/TWM/xstartup
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8000::154, 2606:50c0:8001::154, 2606:50c0:8002::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8000::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:42:48 ERROR 404: Not Found.

--2022-11-19 06:42:48--  https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Beta/windowmanager/apt/TWM/vncserver-start
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8001::154, 2606:50c0:8003::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8001::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:42:49 ERROR 404: Not Found.

--2022-11-19 06:42:49--  https://raw.githubusercontent.com/EXALAB/AnLinux-Resources/master/Beta/windowmanager/apt/TWM/vncserver-stop
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 2606:50c0:8002::154, 2606:50c0:8001::154, 2606:50c0:8000::154, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|2606:50c0:8002::154|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-11-19 06:42:50 ERROR 404: Not Found.

chmod: cannot access '/root/.vnc/xstartup': No such file or directory
chmod: cannot access '/usr/local/bin/vncserver-start': No such file or directory
chmod: cannot access '/usr/local/bin/vncserver-stop': No such file or directory

You can now start vncserver by running vncserver-start

It will ask you to enter a password when first time starting it.

The VNC Server will be started at 127.0.0.1:5901

You can connect to this address with a VNC Viewer you prefer

Connect to this address will open a window with TWM



Running vncserver-start



To Kill VNC Server just run vncserver-stop



de-apt-twm.sh: line 43: vncserver-start: command not found
root@localhost:~#

@jindam-vani Do you noticed that it still show windowmanager in the script? Delete the original script and try again: rm de-apt-*.sh

@exalab999 yep,its workung after deleting de-apt-*.sh....

Glad it works now, and thank you very much for pointing out the error in the scripts 😄