How to share Mac screen to Linux docker container? - linux

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.

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 do I run an desktop executable file on Windows over SSH?

Here's my situation:
I have Machine A - Linux Box, and Machine B - Windows Box using Cygwin and OpenSSH.
Currently, I can ssh between the two machines, and run programs. There is this program that I need to run on the Windows Machine that will Control the Desktop (some mouse clicks and such).
I need to be able to ssh to the Windows Machine from my Linux machine (done already) and run the program. When I do this, the program just hangs up. I can see the program in the System Processes on Windows, however it is doing nothing. When I call the program on Cygwin on the Windows machine, it runs flawlessly.
My question:
Is there a way to run the executable program on the Windows Machine that controls its Desktop environment - run it remotely over SSH?
PS: I have tried on the Windows Machine to go to Services > Cygwin sshd > Log on > Allow Services to interact with desktop. However, when this is checked I can't get the Cygwin sshd service started.

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

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

Resources