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

Any method on creating our own TightVNC server before launching bVNC? #441

Open
Root-voidX opened this issue Dec 3, 2018 · 29 comments
Open

Comments

@Root-voidX
Copy link

Root-voidX commented Dec 3, 2018

So when launching into bVNC there is an LD PRELOAD warning and it causes some gui applications to not work or display empty windows (looking at Octave). I have noticed that it is due to a tightVNC server and a software raster not being loaded when clicking on VNC connection on UserLAnd using bVNC. Before in GNUDebian, tightVNC was setup using a script before hand. I have found out that on my G6 (which has both Gnuroot Debian and UserLAnd), I didn't need to install bVNC as Gnuroot debian had it in terms of Xterm. So when I launched VNC using userland, I had no LD PRELOAD warning. So I am wondering how I can setup tightVNC via UserLAnd without closing or launching a new session? It this is succesful, using gdebi to side load LIBGL1_MESA_SWX11 will allow software raster and this would allow all GUI apps to run

@corbinlc
Copy link
Member

corbinlc commented Dec 4, 2018

I am confused by this. UserLAnd already comes with a VNC server installed as part of it and already does this export LIBGL_ALWAYS_SOFTWARE=1. Can you provide a specific application that does not work as well as what filesystem type you are running it in?
Separately, I would suggest using bVNC directly as opposed to the one that is build into GNURoot Debian, as that one is pretty old now.

@Root-voidX
Copy link
Author

Hi @corbinlc,

I will try to be more specific, I am using two devices here.

Device 1:
Samsung Galaxy S9+ SM845
Android 8.0

Device 2:
LG G6 SM835
Android 7.0

So the issue I am having is when using bVNC for both Debian and Ubuntu filesystem the LD_PRELOAD is not working (it shows a warning that such command does not exist). Also forcing LIBGL1 to always use software render does not work either. Because of this many gui apps do not work. Couple of examples are:

  • glxgears doesnt work (no rgb buffer)
  • blender and paraview doesnt work (rgb buffer and shared exception)
  • octave/scilab arent able to plot even with suppliment packages (windows left empty)

Those are the only packages I tried.

The only reason I bought up Gnuroot debian is because on a limb when i was installing UserLAnd on my G6 (it had Gnuroot Debian) I created a VNC session but i forgot to install bVNC and it defaulted to using Gnuroot Debians VNC and it didnt exhibit the LD_Preload error (so i assume the always use software command also became succesful). So I assumed it had to something to do with Gnuroot Debian tightVNC settings, that is why I asked if there is anyway to customize that for UserLAnd

@corbinlc
Copy link
Member

corbinlc commented Dec 7, 2018

Interesting. @luongthomas I think you still have our S9. When you are back in town, can you drop it off?

@corbinlc
Copy link
Member

@Root-voidX when you said that Octave could not plot, were you using the Octave app from the apps list in UserLAnd, or did you install it manually?
I have the S9 back now and it works well for me using the app. I am aware that certain plotting options do not work, that is why I set the app up to use Octave with gnuplot and have a specific term type set.
I should get all types of plotting working, but just looking for clarification.

@Root-voidX
Copy link
Author

@corbinlc yes I have it installed manually as I have had Debian installed manually as well. What specific settings did you use? Would I need to tinker with bVNC app to get it working right?

@nakele
Copy link

nakele commented Apr 23, 2019

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie

What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC (both the server side and the xorg extension: tigervnc-standalone-server tigervnc-xorg-extension)
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"

PS PS I dont know much about linux nor what im doing...

@Root-voidX
Copy link
Author

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie

What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"

PS PS I dont know much about linux nor what im doing...

Does glxgears work for you? Also how does this differ from just clicking LXDE from the app tab?

@nakele
Copy link

nakele commented Apr 24, 2019

glxinfo and glxgears both work:
Screenshot_20190424-094308_bVNC Free

@nakele
Copy link

nakele commented Apr 24, 2019

@Root-voidX see above, also what do u mean "how this differs from LXDE from the app tab"
Did you mean from here:
Screenshot_20190424-095026_UserLAnd

@nakele
Copy link

nakele commented Apr 24, 2019

Using the lxde desktop application from userland will eventually open the vnc client app folder me and finish the lxde installation. After that I'm required to restart it which I did. Launching blender or glxgears didn't work, error in the console:
15560993444557076640195972888767

@nakele
Copy link

nakele commented Apr 24, 2019

@corbinlc @Root-voidX ok, it looks like the only thing needed is tigervnc-standalone-server with the xorg extension for it (check with this: "apt search tigervnc") and you will see there's the above package and the xorg extension. I couldn't find and I don't know if tightvnc has a xorg extension. For me openGL works only with tigervnc and the xorg extension using SSH

@Root-voidX
Copy link
Author

@nakele Thank you for looking into it I appreciate it. I did something similar using LinuxOnDeX in console mode, i just didn't know the exact command in tightvnc to get software based acceleration for gpu. I guess the geometry line enables software rendering.

@nakele
Copy link

nakele commented Apr 25, 2019

@Root-voidX just a clarification, I think it's just software rendering on the CPU, no GPU acceleration I believe. Also only tigervnc supports openGL. Tight vnc does not. It's 2 different servers.

@bubnikv
Copy link

bubnikv commented May 9, 2019

tigervnc works for me, thanks!
It would be great, if the UserLAnd UI offered one to pick the tigervnc server instead of the tightvnc server to get the OpenGL support by default. Is there any reason why the tightvnc is preferred by the UserLAnd team?

@willfaust
Copy link

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie

What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"

PS PS I dont know much about linux nor what im doing...

That is super cool! I have a question. Does tigerVNC also allow for Vulcan rendering in a UserLand linux enviroment on Android?

@Root-voidX
Copy link
Author

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie

What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"

PS PS I dont know much about linux nor what im doing...

Do you still use UserLAnd? I tried using this method, but i still couldnt get glxgears or blender to work..

@nakele
Copy link

nakele commented Mar 18, 2020

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie
What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"
PS PS I dont know much about linux nor what im doing...

Do you still use UserLAnd? I tried using this method, but i still couldnt get glxgears or blender to work..

I do. I use ubuntu and xfce. Just install tigervnc-standalone-server and the tigervnc-xorg-extension however I'm using userland version 2.4.0 as newer version broke synaptic.
See: #916

@nakele
Copy link

nakele commented Mar 18, 2020

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

@Root-voidX
Copy link
Author

Root-voidX commented Mar 18, 2020

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie
What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"
PS PS I dont know much about linux nor what im doing...

Do you still use UserLAnd? I tried using this method, but i still couldnt get glxgears or blender to work..

I do. I use ubuntu and xfce. Just install tigervnc-standalone-server and the tigervnc-xorg-extension however I'm using userland version 2.4.0 as newer version broke synaptic.
See: #916

Oh okay, i will try to reinstall those packages!

Also can you share what you wrote in you're .vnc/xstartup file

Currently i have this:

`!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
exec /usr/bin/mate-session &`

I guess I could use lxde and use exe startlxde & in the final line.

However with my mate install, when i load into bVNC i get the rgb buffer error for glxgears. Is there anything else i am missing?

@Root-voidX
Copy link
Author

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

So my vncserver crashes regardless of Desktop environment for debian stretch. Have you only tried it with Ubuntu? I may try Ubuntu

@nakele
Copy link

nakele commented Mar 18, 2020

@Root-voidX @corbinlc I've got blender working in both Ubuntu + Mate desktop and Debian + LXDE on a samsung S8 Pie
What I did after apt update and upgrade was:

  1. start either with SSH
  2. Installed LXDE or Mate
  3. Installed nano
  4. Installed synaptic
  5. Installed tigerVNC
  6. configured the .vnc/xstartup file to start either LXDE or Mate with nano
  7. started the vncserver from CLI with "vncserver -depth 24 -geometry 1280x720"
  8. used bVNC to connect to the localhost and whatever port the vncserver told me to connect
  9. once the desktop has loaded I've opened a terminal in order to sudo launch synaptic
  10. once synaptic has opened, looked for blender, marked for installation, installed all it needed
  11. Started blender from the application bar
  12. once done disconnect and go back to the CLI to vncserver -kill :*

PS. Unfortunately starting userland application with vnc rather than ssh prevent me from opening Blender, in the terminal it says like "check that you have a working openGL system"
PS PS I dont know much about linux nor what im doing...

Do you still use UserLAnd? I tried using this method, but i still couldnt get glxgears or blender to work..

I do. I use ubuntu and xfce. Just install tigervnc-standalone-server and the tigervnc-xorg-extension however I'm using userland version 2.4.0 as newer version broke synaptic.
See: #916

Oh okay, i will try to reinstall those packages!

Also can you share what you wrote in you're .vnc/xstartup file

Currently i have this:

`!/bin/sh
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
exec /usr/bin/mate-session &`

I guess I could use lxde and use exe startlxde & in the final line.

However with my mate install, when i load into bVNC i get the rgb buffer error for glxgears. Is there anything else i am missing?

My xstartup says this:
#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls $
#x-window-manager &

Fix to make GNOME work

export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession

@nakele
Copy link

nakele commented Mar 18, 2020

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

So my vncserver crashes regardless of Desktop environment for debian stretch. Have you only tried it with Ubuntu? I may try Ubuntu

I will try debian today and let you know.

@nakele
Copy link

nakele commented Mar 18, 2020

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

So my vncserver crashes regardless of Desktop environment for debian stretch. Have you only tried it with Ubuntu? I may try Ubuntu

So, I tried Debian and the vnc server dies before I can see anything. I tried with xfce.

I never seen this before:
Use of uninitialized value $proto in socket at /usr/bin/vncserver line 357

It seems tigervnc server and debian aren't working together?

@Root-voidX
Copy link
Author

Root-voidX commented Mar 19, 2020

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

So my vncserver crashes regardless of Desktop environment for debian stretch. Have you only tried it with Ubuntu? I may try Ubuntu

So, I tried Debian and the vnc server dies before I can see anything. I tried with xfce.

I never seen this before:
Use of uninitialized value $proto in socket at /usr/bin/vncserver line 357

It seems tigervnc server and debian aren't working together?

Appreciate the assist! And furthur research seems to say that with Debian 9 Stretch tigervnc even has the same issue on x86. So ubuntu is the way to go.

I saw your xstartup file, doesn't it have startxfce4 & at the end? I will try it tonight!

Side note for bVNC are you connecting to 127.0.0.1:1 on port 5901?

@Root-voidX
Copy link
Author

Root-voidX commented Mar 20, 2020

i got it to work, glxgears and blender open too! however synaptic wont work because i am using the latest version (not an issue I apt-get blender anyway). Does your browser work? or is there a workaround for that? @nakele

IMG_20200320_015057

@nakele
Copy link

nakele commented Mar 20, 2020

Just tested on android 10 - Samsung note 9:
Screenshot_20200318-024305_VNC Viewer

So my vncserver crashes regardless of Desktop environment for debian stretch. Have you only tried it with Ubuntu? I may try Ubuntu

So, I tried Debian and the vnc server dies before I can see anything. I tried with xfce.
I never seen this before:
Use of uninitialized value $proto in socket at /usr/bin/vncserver line 357
It seems tigervnc server and debian aren't working together?

Appreciate the assist! And furthur research seems to say that with Debian 9 Stretch tigervnc even has the same issue on x86. So ubuntu is the way to go.

I saw your xstartup file, doesn't it have startxfce4 & at the end? I will try it tonight!

Side note for bVNC are you connecting to 127.0.0.1:1 on port 5901?

Yeah, my startup file doesnt seem to have startxfce4, I think it's because when I installed ubuntu, I did it via VNC rather than SSH. And I believe Userland setup something automatically. Then I switched to SSH after the initial installation

Side note for bVNC, yes im connecting to "localhost" and port "5901"

For the browser what kind of problem do you have? and what browser?

PS. I messed up something with my installation, now it doesnt work, might be the march Samsung software update or just me but I can't get it to work properly again :/

@nakele
Copy link

nakele commented Mar 20, 2020

i got it to work, glxgears and blender open too! however synaptic wont work because i am using the latest version (not an issue I apt-get blender anyway). Does your browser work? or is there a workaround for that? @nakele

IMG_20200320_015057

I found you on Reddit :)

@nakele
Copy link

nakele commented Mar 20, 2020

20200320_154138
@Root-voidX how did u get LLVM installed?

@Root-voidX
Copy link
Author

20200320_154138
@Root-voidX how did u get LLVM installed?

Hey man!

About the browser, well for now the default browser wont launch with error /1. However I will try firefox.

I followed all your steps, beside having to give read and write permission to xstartup with chmod command. The vnc defaulted to llvmpipe

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

5 participants