Can't get remote desktop to open in x11 window through ssh - linux

I am having trouble getting an x11 window of the desktop of a remote machine.
I am VPN'ed into a local network and I can get into the computer I want through the command line using:
ssh -X computer_name -l login_name
I thought that the -X would cause the remote machine's desktop to pop up in x11, and although x11 launched on my mac, I did not get an x11 window of the machines desktop.
I can get things like emacs to run and pop up in new x11 windows, but I want to get the whole desktop going.
I am running Mac OS 10.7, and the remote machine is running linux.
Any help would be appreciated.

Figured it out.
after the command
ssh -X computer_name -l login_name
I had to start a gnome-session
gnome-session >&/dev/null &
this gave me the linux desktop in an x11 window.

ssh -X (or -Y) only tunnels the connection to your local X server for the applications started on the remote machine from your SSH session. It cannot do anything about the desktop environment that is running on the remote machine's own X server.
You're probably looking for something like VNC, not X11 forwarding.

X-Window allows you to run programs remotely, and have their windows appear locally on your machine. As you stated, you were able to get this working properly. If you want to see the entire linux desktop on your mac, you will want to use a program like VNC.
You will need to run vncserver on your linux machine, then you can use any of a number of VNC clients on your mac to see the entire linux desktop. For example, Chicken of the VNC.

If you want your remote Linux desktop to be displayed on a window on your Mac you should use on your Mac (providing that the VPN is already setup and running, you have access to your Linux server, and XDMCP is configured on it):
$ Xephyr -query <linux-ip-or-name> :1

Related

Is it possible to execute sh files GUI application from linux remote server and view it on local machine?

I have a job that runs denodo platform on remote server. Sh files is a GUI application, and I have to run it to start denodo service. I can't access it in windows, is there a way to solve these problems?
Already running sh files on Putty Windows, but only return null.
If it's a linux GUI application, you should "export display" to view the server screen on your workstation.
Depending of your workstation linux distribution, it might be as easy as :
xhost +<IP_address_of_workstation>
./runMyApp.sh
As your workstation is running windows operating system, you have do further configuration :
https://superuser.com/questions/325630/how-can-i-export-display-from-a-linux-terminal-to-a-windows-pc
https://seanthegeek.net/234/graphical-linux-applications-bash-ubuntu-windows/
If your workstation is connected through SSH you need even more configuration as discussed here : https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely
You can run GUI-Applications of remote linux host in a windows client via ssh (putty) with x-forwarding and an installed x-server (xming)
See this question:
https://superuser.com/questions/299158/how-to-make-putty-do-the-equivalent-of-ssh-x

Is it possible to open X11 application in terminal of a server in linux?

I can launch X11 application through my local machine to X11 enabled server.
e.g. ssh -x from my localmachine(linux desktop) then launch a installed application from the minimal server.
I would like to know if it's possible to access my installed application directly from my minimal server. e.g. ssh -x ?
Thank you.
Not sure if it is useful but better you can use either Xming or Mobaxterm to get an X11 for a linux machine . Ultra VNC/VNC are also some of those kind .

How can I open a x-window application on a remote machine and make that window shown in my local machine

I have a remote server running Linux and I am using macOS. I can connect to that server through ssh command. I noticed that ssh -X is used to enable X11 forwarding. So I tried to connect to that server by running ssh -X name#ip-address command and launched an application on the connection terminal. I expect that window should be shown on my macOS but it didn't. Is there any other configuration I need to set in other to make the X11 forward works?
Macs don't run their GUI in X. You need to install XQuartz first.

How to share Mac screen to Linux docker container?

I want to run odesk time tracker (a Qt4 app) which captures your screen and keystrokes for freelance work logging. But I don't trust it and want to sandbox it.
On Linux, there are ways to run GUI items on docker container and forward X11 to Linux host. Can I do this on mac? The app will run on Linux container and will be displayed on Mac with capturing screen/keystroke.
I think VNC method would display the linux host, not the mac. If linux connects mac, I have to install the software on mac. I don't know if I can do X11 forwarding.
You need to have XQuartz installed on your Mac. You can get it here -
http://xquartz.macosforge.org/landing/
Once you installed it, follow this procedure -
Run X11 application (included with XQuartz)
Open X11 Preferences and make sure "Allow connections..." is checked
Restart X11 application
Open a terminal
ssh to your docker with X11 forwarding: ssh -X YOUR_DOCKER_IP
From now on, any GUI application that you run on your docker will show up on your Mac.

open Teamviewer on a Debian machine via PuTTY on a Windows machine

hope everyone is doing well.
Got an issue I would like to pick the great brains in this forum about.
So, I have many Debian machines I often remote into using Teamviewer and a Windows machine, which works out great; however Teamviewer crashes for what appears to be no apparent reason. When such happens, normally I will PuTTY into the suspect Debian machine from a Windows 7 machine and issue the shutdown -r now command. When the debian computer reboots, so does Teamviewer and the suspect Debian machine is now visible in the "My computers" list on my Windows machine.
My question is this, why cant I just type teamviewer from the command line while PuTTYing into the Debian machine and have Teamviewer reopen on the Debian machine, making it visible in "My computers?" When I execute teamviewer command from PuTTY command line, I see the verbose output of teamviewer opening, but the machine never becomes visible in "My computers."
Now, I know it is possible to start Teamviewer remotely and have it show up back in 'My computers" list. I can do it via NoMachine; I simply connect to the suspect Debian machine and double click on the Teamviewer desktop launcher. However, NoMachine is very heavy and quite frankly, i just don't like it. I also know I can execute teamviewer via command line while sitting in front of the suspect Debian machine. PuTTY would be so much faster.
I have also tried VNC as well as X sessions. In both cases, i can open Teamviewer and it shows up in "My computers," but when I close the VNC of X, Teamviewer also closes and removes itself from "My computers."
Can someone help me figure out a way to restart Teamviewer via PuTTY please? Is there a way to open a desktop launcher via PuTTYs command line? Or is there a way to tell Teamviewer to execute in the suspect Debian machines active desktop session via PuTTYs command line?
Thanks all

Resources