sabamdarif / gnome-in-termux

Install Gnome Desktop Environment In Termux using Proot-Distro
87 stars 10 forks source link

Running with VNC #19

Open HAKANKOKCU opened 1 week ago

HAKANKOKCU commented 1 week ago

I could get vnc working and you said "If it doesn't work, then don't ask me because it didn’t work for me either" at the readme, so I wanted to share this so it could be helpful for other people too (there wasn't discussions here so I had to put it here)

  1. enter your distro (for debian its just debian)
  2. install tigervnc just like at the readme
  3. then sudo nano /bin/vncstart
  4. copy this into the file:
    #!/usr/bin/env bash
    sudo service dbus start
    vncserver -geometry 2580x1080 #Add your screen size
    sleep infinity #so it doesnt auto-exit
  5. type vncserver -localhost -xstartup /bin/vncstart (make -localhost no if you want to connect from other devices)
  6. after the vnc starts, type export XDG_CURRENT_DESKTOP="GNOME" && env DISPLAY=:1 gnome-shell --x11 (replace :1 with the id the vncserver gave)

It sometimes does work but sometimes doesn't (probably realted to a extension I installed), but this is the best I could do for non-root(normal user) environment. It probably also works with root.