Can't connect to VNC
Does localhosting your vnc work with mobile data or a public guest wifi? And if not how do I set the vnc up on the internet?
87 Replies
Yes it does work
Weird because I get a error all the time when i try to connect to localhost:5901
"The port on which the computer is listening could not be contacted."
And when i try my ip I just get timed out
Try using the port 1
And keep in mind you need to start the server first
So just :1 ? Or like :001
Just 1
Okay so localhost:1
Imma try it
This error again also I tried it on mobile data (4G)
Btw I am trying to run the vnc on the same phone as I am running the termux on
Yes
I tried using the ip that the command hostname -I gives me but that also gives the error "The port on which the computer is listening could not be contacted."
Did you start the vnc server
Yes
Try stopping it then starting it again
Doesn't work
Not sure how to help you then
I am (trying to) use Ubuntu btw
You could try debian
Sometimes distros are prone to corruption
For no reason
Okay imma try that
Should I choose xfce4 as desktop environment?
Imma try xfce4
I installed debian and xfce4 and it still doesn't work
Imma try installing the ssh
I am still getting the "The port on which the computer is listening could not be contacted." Error on realvnc
And bvnc free says failed to connect to localhost
That means the server is not running
But it is?
Termux says
"New 'remote-desktop' desktop is localhost:1 Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/localhost:1.log"
So it should be running right?
Or do I need the ssh also running?
I am trying to do vnc over ssh but the ssh never asked me to set a user or password
How do I use ssh -l ?
No clue
I don't know how to use ssh
The vnc port is 1
Omfg I think I am getting close
It says failed to connect to ssh but after that it says establishing handshake for a second
Wait sshd failed
by localhosting you mean connecting remotely over your local network? If that's the case then run
Example: Connect from PC to vnc server hosted on phone
He don't know how to connect
Idk what he's doing wrong
Sounds like he wants to run a remote connection into his phone ... failed with vnc so attempted with ssh, which I never heard of ssh running GUI stuff before so idk about that one ... Should be good to go with vncserver -localhost no though.
I will try that command
I am getting the message
"vncserver: The USER environment variable is not set."
Imma reinstall debian
I am getting a error when installing nvm i got it installing again
If you want something that might actually work better (depending on your device) then you can give my setup a try ... I can send a start script for connecting remotely over your local wifi network so you can connect from your PC.
https://github.com/phoenixbyrd/Termux_XFCE
How do I know that that isn't a virus?
You don't
look at the code, it's line by line installation of packages in termux and debian proot.
How do you know Andronix isn't a virus? Did you look through their scripts?
Did you manually go through file by file in the pre-setup filesystems installed to ensure nothing malicious was added?
Really odd question to ask if your answer is no ...
If you're concerned about such things, then I would recommend you don't run random scripts you find online, period.
That includes scripts you're directed to run from apps installed on the playstore.
Actually true tho
Imma give it a try
I know ... not trying to be a jerk about it though. The script just automatically sets things up from official termux repositories and proot-distro repositories. Only changes I make on my end are to the theming and some personaly utilities I wrote for ease of use with certain tasks like adding apps installed in proot to the xfce menu or for running proot installed apps from termux terminal without having to enter proot first.
Andronix though, they pre setup everything in their own rootfs download so who knows what's in it unless you manually audit yourself.
Your script does look more promising soo far
It's less command line and more... idk how to describe it lol
How long does the install take on average?
idk, never officially timed it ... maybe ten minutes or so?
Oh okay
installs roughly 4.5GB of stuff since it's a desktop environment
Cause I am totally not installing it in the midnight lol
but it's only 8:25pm!
Hope I have enough space lol
02:26 here in the Netherlands
I would hope so too ... installing more stuff in it will eat up more storage than it already is using, just like on any normal computer or Android itself. Installing things uses storage, so make sure you have plenty.
My phone has 256GB and I feel like it's not enough for all the things I want to install and do.
only have 143GB free
My phone has 64Gb 😳
Atleast my phone is getting less cluttered with apps I never use now
as long as you have 20GB free to install a few extra fun stuff you should be ok
Atleast you're encouraging me to delete all apps I never use lol
Bruh why does tiktok have almost a gb of data without the app itself?
idk, don't use tiktok
Actually it's 3.82 nvm lol
I used the "start" command and it gave me a error
Termux:X11 application is not found.You should choose latest successful workflow here: https://github.com/termux/termux-x11/actions/workflows/debug_build.ymlAfter this you should download "termux-x11-arm64-v8a-debug" or "termux-x11-universal-debug" artifact and install apk contained in this zip file. xfce4-session: Cannot open display: . Type 'xfce4-session --help' for usage.
GitHub
Workflow runs · termux/termux-x11
Termux X11 add-on application. Still in early development. - Workflow runs · termux/termux-x11
Looks like you didn't install the termux-x11 apk when prompted ... it's in your downloads folder in your phone
use your phone's file manager to find it and install it
no need to download again
Ooh it is in the downloads
And the other ladb app is needed too right?
yea, intentionally didn't remove it because people weren't installing it when prompted to install it
ladb is only needed if you have issue with signal -9 issue killing termux
but it can also be resolved directly in termux too
I am getting a black screen (besides the x-cursor) now
damnit ... was afraid that would happen when you said 64GB ... had a feeling the phone might not be able to run this properly. What phone are you using?
Oppo A52 64GB
certain devices don't seem to like this setup, especially exynos
Weird
Is there any reason for it not working?
But does putting the termux app on external storage help?
Could be low ram issue ... I'm really not sure to be honest. Lower tier phones seem to have the most issue with running this. All the script does though is runs all the install commands automatically instead of doing it manually.
Termux can't run on external storage.
Haven't been able to figure out if there's a way to make it work on lower tier phones
Oh yeah i see a lot of apps open right now so that could be eating ram
Well, I gotta go to bed now since I gotta get up early for work tomorrow. Can try and trouble shoot after work. In the mean time, this is the script for connecting remotely from your pc ... idk if that would give you a display output or not though, but can tinker around and try things out.
I get home tomorrow at 4pm EST
just move that script into your termux home directory ... if your file manager doesn't see it then use FX File Manager to connect to termux storage
you could also try editing the start script in ../usr/bin and adding more time to the sleep commands ... seemed to have helped one person at least.
Just don't have the time to devote right this moment to trying to figure it out so these are the quickest attempts I can think of right now.
I'll message tomorrow
I got to this somehow
well that's something at least ... you remember what you did to get that?
I reinstalled it again and just waited a few seconds before moving the cursor I think
What... Now with colors???
colors? ... type start, does desktop load?
Nope
Same as this^
ok, exit termux completely and then force close it to make sure it's fully stopped. I'm gonna paste a command in a moment to run
This should start the termux-x11 server, then open termux-x11 app and then run only the thunar file manager
bash: syntax error near unexpected token `;'
OK, just run each one on it's own
maybe do thunar command second though
and am start one last
The & symbols don't need to be in the command right?
I'd leave them
"[1] 18373" after running first command
ok, run the other two
[2] 18486
jarn î‚° termux î‚° ~ î‚° thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY
(thunar:18486): Gtk-WARNING **: 00:50:47.721: cannot open display:
change thunar to mousepad .... I know that one runs fine without xfce desktop runnning
at least did for me
thunar should work too though
How do I change it to mousepad?
instead of running thunar & run mousepad &
So i ran "thunar & run mousepad &" and got
"[2] 20465
[3] 20466
jarn î‚° termux î‚° ~ î‚° No command run found, did you mean:
Command zrun in package moreutils
Command runc in package runc from the root-repo repository
Command sun in package sun
thunar: Failed to initialize Xfconf: Cannot autolaunch D-Bus without X11 $DISPLAY
(thunar:20465): Gtk-WARNING **: 00:55:03.078: cannot open display:"
no ... that's it, only that
Oh okay
"[2]- Exit 1 thunar
[3]+ Exit 127 run mousepad
[2] 20685
jarn î‚° termux î‚° ~ î‚°
(mousepad:20685): Gtk-WARNING **: 00:56:47.593: cannot open display:"
oh crap right, one sec
crap I did it wrong again
[2]+ Exit 127 DISPLAY :1 mousepad
[2] 20901
open termux-11 app
Black screen
crap
I'm really not sure what's wrong as we're now doing the most simplest basic thing to run something in termux-x11 ...
I've ran mousepad just by itself on my device with those commands and it ran fine on my fold 3, but that's a far more powerful phone so idk if maybe it's a phone issue?
Maybe it could be that Samsung is better supported by termux than oppo?
I'm not sure really. Could ask in the termux discord server, maybe someone there can explain why it's not starting the desktop for your device. I'm not really sure why termux-x11 and xfce desktop work on some devices but struggles on lower end phones.
May be because of compability issues