AA
Andronix App•15mo ago
321Jarn

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
raycert07
raycert07•15mo ago
Yes it does work
321Jarn
321JarnOP•15mo ago
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
raycert07
raycert07•15mo ago
Try using the port 1 And keep in mind you need to start the server first
321Jarn
321JarnOP•15mo ago
So just :1 ? Or like :001
raycert07
raycert07•15mo ago
Just 1
321Jarn
321JarnOP•15mo ago
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
raycert07
raycert07•15mo ago
Yes
321Jarn
321JarnOP•15mo ago
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."
raycert07
raycert07•15mo ago
Did you start the vnc server
321Jarn
321JarnOP•15mo ago
Yes
raycert07
raycert07•15mo ago
Try stopping it then starting it again
321Jarn
321JarnOP•15mo ago
Doesn't work
raycert07
raycert07•15mo ago
Not sure how to help you then
321Jarn
321JarnOP•15mo ago
I am (trying to) use Ubuntu btw
raycert07
raycert07•15mo ago
You could try debian Sometimes distros are prone to corruption For no reason
321Jarn
321JarnOP•15mo ago
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
raycert07
raycert07•15mo ago
That means the server is not running
321Jarn
321JarnOP•15mo ago
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?
321Jarn
321JarnOP•15mo ago
I am trying to do vnc over ssh but the ssh never asked me to set a user or password
No description
No description
No description
321Jarn
321JarnOP•15mo ago
How do I use ssh -l ?
raycert07
raycert07•15mo ago
No clue I don't know how to use ssh The vnc port is 1
321Jarn
321JarnOP•15mo ago
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
phoenixbyrd
phoenixbyrd•15mo ago
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
vncserver -localhost no
vncserver -localhost no
raycert07
raycert07•15mo ago
He don't know how to connect Idk what he's doing wrong
phoenixbyrd
phoenixbyrd•15mo ago
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.
321Jarn
321JarnOP•15mo ago
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
phoenixbyrd
phoenixbyrd•15mo ago
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
321Jarn
321JarnOP•15mo ago
How do I know that that isn't a virus?
raycert07
raycert07•15mo ago
You don't
phoenixbyrd
phoenixbyrd•15mo ago
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.
321Jarn
321JarnOP•15mo ago
Actually true tho Imma give it a try
phoenixbyrd
phoenixbyrd•15mo ago
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.
321Jarn
321JarnOP•15mo ago
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?
phoenixbyrd
phoenixbyrd•15mo ago
idk, never officially timed it ... maybe ten minutes or so?
321Jarn
321JarnOP•15mo ago
Oh okay
phoenixbyrd
phoenixbyrd•15mo ago
installs roughly 4.5GB of stuff since it's a desktop environment
321Jarn
321JarnOP•15mo ago
Cause I am totally not installing it in the midnight lol
phoenixbyrd
phoenixbyrd•15mo ago
but it's only 8:25pm!
321Jarn
321JarnOP•15mo ago
Hope I have enough space lol 02:26 here in the Netherlands
phoenixbyrd
phoenixbyrd•15mo ago
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.
phoenixbyrd
phoenixbyrd•15mo ago
only have 143GB free
No description
321Jarn
321JarnOP•15mo ago
My phone has 64Gb 😳 Atleast my phone is getting less cluttered with apps I never use now
phoenixbyrd
phoenixbyrd•15mo ago
as long as you have 20GB free to install a few extra fun stuff you should be ok
321Jarn
321JarnOP•15mo ago
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?
phoenixbyrd
phoenixbyrd•15mo ago
idk, don't use tiktok
321Jarn
321JarnOP•15mo ago
Actually it's 3.82 nvm lol I used the "start" command and it gave me a error
321Jarn
321JarnOP•15mo ago
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
phoenixbyrd
phoenixbyrd•15mo ago
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
321Jarn
321JarnOP•15mo ago
Ooh it is in the downloads And the other ladb app is needed too right?
phoenixbyrd
phoenixbyrd•15mo ago
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
321Jarn
321JarnOP•15mo ago
I am getting a black screen (besides the x-cursor) now
phoenixbyrd
phoenixbyrd•15mo ago
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?
321Jarn
321JarnOP•15mo ago
Oppo A52 64GB
phoenixbyrd
phoenixbyrd•15mo ago
certain devices don't seem to like this setup, especially exynos
321Jarn
321JarnOP•15mo ago
Weird Is there any reason for it not working? But does putting the termux app on external storage help?
phoenixbyrd
phoenixbyrd•15mo ago
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
321Jarn
321JarnOP•15mo ago
Oh yeah i see a lot of apps open right now so that could be eating ram
phoenixbyrd
phoenixbyrd•15mo ago
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
phoenixbyrd
phoenixbyrd•15mo ago
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
321Jarn
321JarnOP•15mo ago
I got to this somehow
No description
phoenixbyrd
phoenixbyrd•15mo ago
well that's something at least ... you remember what you did to get that?
321Jarn
321JarnOP•15mo ago
I reinstalled it again and just waited a few seconds before moving the cursor I think
321Jarn
321JarnOP•15mo ago
What... Now with colors???
No description
phoenixbyrd
phoenixbyrd•15mo ago
colors? ... type start, does desktop load?
321Jarn
321JarnOP•15mo ago
Nope Same as this^
phoenixbyrd
phoenixbyrd•15mo ago
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
termux-x11 :1.0 & ; am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity ; thunar &
termux-x11 :1.0 & ; am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity ; thunar &
This should start the termux-x11 server, then open termux-x11 app and then run only the thunar file manager
321Jarn
321JarnOP•15mo ago
bash: syntax error near unexpected token `;'
phoenixbyrd
phoenixbyrd•15mo ago
termux-x11 :1.0 &
termux-x11 :1.0 &
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity
am start --user 0 -n com.termux.x11/com.termux.x11.MainActivity
thunar &
thunar &
OK, just run each one on it's own maybe do thunar command second though and am start one last
321Jarn
321JarnOP•15mo ago
The & symbols don't need to be in the command right?
phoenixbyrd
phoenixbyrd•15mo ago
I'd leave them
321Jarn
321JarnOP•15mo ago
"[1] 18373" after running first command
phoenixbyrd
phoenixbyrd•15mo ago
ok, run the other two
321Jarn
321JarnOP•15mo ago
[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:
phoenixbyrd
phoenixbyrd•15mo ago
change thunar to mousepad .... I know that one runs fine without xfce desktop runnning at least did for me thunar should work too though
321Jarn
321JarnOP•15mo ago
How do I change it to mousepad?
phoenixbyrd
phoenixbyrd•15mo ago
instead of running thunar & run mousepad &
321Jarn
321JarnOP•15mo ago
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:"
phoenixbyrd
phoenixbyrd•15mo ago
no ...
mousepad &
mousepad &
that's it, only that
321Jarn
321JarnOP•15mo ago
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:"
phoenixbyrd
phoenixbyrd•15mo ago
oh crap right, one sec
DISPLAY :1 mousepad &
DISPLAY :1 mousepad &
crap I did it wrong again
DISPLAY=:1 mousepad &
DISPLAY=:1 mousepad &
321Jarn
321JarnOP•15mo ago
[2]+ Exit 127 DISPLAY :1 mousepad [2] 20901
phoenixbyrd
phoenixbyrd•15mo ago
open termux-11 app
321Jarn
321JarnOP•15mo ago
Black screen
phoenixbyrd
phoenixbyrd•15mo ago
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?
321Jarn
321JarnOP•15mo ago
Maybe it could be that Samsung is better supported by termux than oppo?
phoenixbyrd
phoenixbyrd•15mo ago
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.
frxles
frxles•15mo ago
May be because of compability issues
Want results from more Discord servers?
Add your server