So when I connect my computer through vnc, the host computer displays the resolution of 640x480. Going to screen resolution, the display is set to "display device on: Mobile PC Display"
the host computer is not plugged into a monitor but that should not even matter, as I am connected using vnc using a tightvnc client.
Any help or advice would be appreciated.
I am on a Ubuntu 20.04 machine and use TightVNC. I start VNC server with geomtry option specifying a screen size slightly smaller than my full screen on client.
$ tightvncserver -geometry 1680x1050 -depth 24
The version of vncserver is given as
$ tightvncserver -version
Xvnc version TighVNC-1.3.10
You need to specify the resolution when you start the tightvnc session on the server
tightvncserver -geometry WIDTHxHEIGHT -depth XX :1
if your problem is "default monitor", you can change the minimum resolution on boot/configure.txt
uncomment :
# uncomment to force a console size. By default it will be display's size minus
# overscan.
framebuffer_width=1280
framebuffer_height=720
Related
I'm having problems displaying a remote desktop in vinagre, I'm using a Mint 20.3 computer to connect to a Debian 11 (xfce desktop) computer on my home network. I can get an ssh connection fine and access the machine by terminal, but I can't get a desktop interface through vinagre.
I start the server on the remote machine with tigervncserver -xstartup /usr/bin/xterm , then make an ssh connection on the local machine using ssh -L 5901:127.0.0.1:5901 remoteusername#ip. Then I use vinagre localhost:1, which brings up a password dialogue, pop in the password then I see a terminal in vinagre connected to the remote machine. Meanwhile, in the local terminal it prints loads of stuff, all prefixed with Gtk-WARNING, here's a sample:
(vinagre:7975): Gtk-WARNING **: 23:55:42.241: Theme parsing error: <data>:2:28: The style property GtkButton:default-border is deprecated and shouldn't be used anymore. It will be removed in a future version
(vinagre:7975): Gtk-WARNING **: 23:55:42.636: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node box owner ViewAutoDrawer)
My xstartup file reads:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
I'm following the tutorial at this link and I'm stuck at step 4:
https://computingforgeeks.com/install-and-configure-tigervnc-vnc-server-on-debian/
I solved this by uninstalling tigervnc on the host and installing tightvnc instead. I then edited xstartup to read:
#!/bin/bash
xrdb $HOME/.Xresources
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
Then, ssh as before from the client:
ssh -L 5901:127.0.0.1:5901 remoteusername#ip
Start the vnc server on the host (with screen res specified):
vncserver -geometry 1280x1024
Finally start vinagre on the client:
vinagre localhost:1
Enter the password then done! Worked for me anyway, please comment if you have any solutions to get tigervnc going, I couldn't get it working properly.
I'm trying to configure an Xming display on my WSL2, and after an amount of troubleshooting attempts, I'm quite clueless.
For details:
System: WSL2 on Windows10Pro
Xming: installed. Some hopefully relevant lines from log:
Xming :0 -multiwindow -clipboard
XdmcpRegisterConnection: newAddress 172.27.16.1
Could not init font path element C:\Program Files (x86)\Xming/fonts/100dpi/, removing from list! (there are a few of these)
winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
Firewall:
What I've tried: (on WSL2 terminal)
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=1
As shown here
export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
As shown ni subsequent link here
export DISPLAY=172.27.16.1 (/:0/:0.0)
as taken from the Xming log.
Results so far: in all cases I get
No protocol specified
Error: Can't open display: 172.27.16.1:0
or alike
Any advice?
Finally, a friend found a solution that worked for me.
In short:
use putty to open a WSL terminal and export DISPLAY variable as WORKSTATION_IP:0.0
in Xlaunch, check the "No Access Control" box.
I've put this as instructions in layman's terms in this short doc
I had success using
export DISPLAY=$(grep -m 1 nameserver /etc/resolv.conf | awk '{print $2}'):0.0
with Xming allowed through the Windows firewall for both private and public networks as you did (note for other users there are a couple of entries in the firewall settings for Xming). I then launched Xming using "Xlaunch" (Start > Xming > Xlaunch), selected Multiple Windows and then checked "No Access Control" on the "Specify Parameter Settings" screen. This last step appears to be the key one I was missing. Launching Xming.exe with the -ac option should achieve the same effect.
Add the IP address in the X0.hosts file (find it in the Xming installation directory). This file defines which hosts it will allow connections from.
Other option is to use the -ac option, however this will disable all access control restrictions...
U can use VcxSrv
xLaunch
use this settings
In my my case, I had to add XLaunch.exe to the Windows Firewall exceptions. I had Xming.exe added to the firewall when I installed it but not Xlaunch.exe.
To test quickly, just turn-off windows firewall then try running any linux gui app. Of course, you gotta do the export Display command first.
I have downloaded and installed Xming on my Windows 7 laptop. I am using a PUTTY session to connect to my linux box and start a X Windows application but the $DISPLAY variable is itself not getting setup properly:
I see the XMING icon on my system tray
X0.hosts file:
localhost
10.24.0.144
Putty->X11->Enable X11 Forwarding [X Display Location - :0.0]
But:
#10.24.0.144's password:
Last login: Sun Sep 20 11:57:37 2015 from 10.21.200.197
# echo $DISPLAY
#
As such I am not able to successfully start the X Windows app from Putty?
Did you check this box in PuTTY? The box below can help tweak your display location, if it needs to be customized.
On the shell try : export DISPLAY="127.0.0.1:10.0" . Test with echo and then try X window application.
To permanently set it up, update the bashrc file.
I am trying to use putty and XMing to run programs from my Fedora 20. I used this configuration before on other machines and I was able to run GUI programs on Linux and display them in my windows 7. But this time I have trouble and get the "cannot connect to X server" error when I try to launch kwrite and kdesvn which are GUI programs in Fedora 20. The connections were good. And the XMing server was running and the X11 forwarding was enabled in putty, like the instruction here.
From my another Fedora 20 machine, I was able to connect to and run GUI programs from the target machine with ssh -X and the same username. So I am thinking the settings of the target machine was right.
Then what else I can try? how to figure out where the problem is?
Ensure that X11 forwarding is enabled in /etc/sshd_config.
X11Forwarding yes
Ensure in your home directory that you have an .Xauthority file. Permissions should be set 0600. If the file does not exist create it.
touch ~/.Xauthority
chmod 0600 ~/.Xauthority
As was previous stated first make sure that X11 forwarding is enabled in PuTTY.
Config > Connection > SSH > X11 > Enable X11 Forwarding. Based on your question it appears you already did this. Make sure you save this config.
I had a problem much like this, what happened to me was that my DISPLAY was being set elsewhere. If you can, try opening a new settion via putty from the same Windows machine using another user and then checking the display and testing your GUI programs
Another thing would be to use your own user but remove any custom work you may have done in your configuration, login fresh, check the DISPLAY and then test X
Did you enable X11 in putty?
It's under SSH | X11 | Enable X11 Forwarding
Then save the putty profile and click on session | save | open
Should work perfectly after you make those changes.
I am using Cygwin X and Debian. I can forward my X session via SSH but what happens is that I seem to loose the display forwarding in the X session once in a while (from Cygwin to Linux). So i am guessing that that is an imnplementation thing with Cygwin because I never loose X11 display in the same ssh session when I use Linux to Linux.
This also happens when a X11 forwarded app tries to fork another process lets say I run Thunderbird and I click on a url inside an email. Naturally Thurderbird will try to start the default web browser but it is not doing it with Cygwin X server and here is the message I get when SSH session gives up the display for various reasons that I am not able to know.
"Error: cannot open display: localhost:10.0"
The other issue is that since the ssh gives up the display variable, I have to restart my ssh session to get it working which also kills other apps that I might be running during the ssh session.
Anyway after struggling with this for a while I am thinking that I want to be able to open my apps on another display without using ssh forwarding. I am using it internally and it is almost a closed lan so I am not worried about the security for now. I just want to be able to run the app on the Linux then see the app on the Pc that is running Cygwin.
I tried basic DISPLAY variable thing like "export DISPLAY=MY_CYGWIN_PC_IP:0.0" (on Linux Pc) but it does not work.
So I am wondering about how I can achieve this. What are the proper settings to achieve what i need?
Your direction was OK. export DISPLAY is what you want. But it is not enough.
On the target, you need to type
xhost +from.where.the.windows.are.coming.com
It gives the X server the permission to allow remote windows from this computer.
Beware, it is not really secure! A possible attacker could not only windows shown by you, but even control your mouse/keyboard. But for simple solutions, or if you can trust the remote machine and the network between you, it may be ok.
If not, there is an advanced authorization, based on preshared keys. It is named xauth. Google for xauth.
The Xorg server has an option to disable the remote windows, and there are distributions, (f.e. ubuntu!) who turn this option by default on. You can test it - if you can telnet to the tcp port 6000, it is allowed.
If you are using ssh -X, don't. Use ssh -Y
Cygwin XWin server randomly loses connection
Basically to work as old times , we need enable xdmcp on display manager and use X11 , Xwayland seems to me that doesn't work either.
sddm doesn't support xdmcp , but gdm does , you need edit /etc/gdm/custom.conf and add
[security]
DisallowTCP=false
[xdmcp]
Enable=true
xhost + ip_of_remote_computer
echo $DISPLAY (the number of the display usually :0 or :1)
after you can verify :
netstat -l | grep xdmcp
udp 0 0 0.0.0.0:xdmcp 0.0.0.0:*
lsof -i :xdmcp
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
gdm 862335 root 12u IPv4 71774686 0t0 UDP *:xdmcp
on remote host :
export DISPLAY="ip_of_server:0" (see if is 0 or other number in echo $DISPLAY on server mention above )
xclock &
References:
http://www.softpanorama.org/Xwindows/Troubleshooting/can_not_open_display.shtml
https://tldp.org/HOWTO/html_single/XDMCP-HOWTO/
https://wiki.archlinux.org/title/XDMCP