How to group application windows launched via 'ssh -X' - gnome

When I launch an application locally via its .desktop file, windows are grouped by Gnome.
When I use an identical file, but using ssh -X in the Exec line, to launch the application on a remote machine using X11 forwarding, the application runs fine, but Gnome doesn't group the application windows at all. This is very annoying.
My two problem applications in this regard are emacs and PyCharm. There is widespread advice to set StartupWMClass in the .desktop file, but this doesn't solve the problem.
Can anyone help, please?

Related

Does psexec open a GUI window on the local host and the remote machine?

I've been using psexec for a while to do admin tasks and its very helpful. The other day I was looking at the online help and discovered the "-i" interactive switch so I started messing around with it and doing some research. This website explains the feature this way:
"For example, the following PsExec command will open the notepad.exe process on the remote computer and display it on the local user’s desktop:
psexec -i \\lon-srv01 notepad"
So at first I couldn't get it to work but then I found a few tips that helped and now I can invoke psexec with the "-i" switch from an administrator cmd prompt on my laptop, and use this syntax to launch an application on my workstation remotely.
Working syntax: PsExec.exe -i 5 -s \\<remotePC> regedit
So in this case, regedit launches on the remote machine but not on my local machine. Is my understanding of the interactive feature incorrect? I'm assuming the GUI should load on my local machine as well so I can do admin tasks. Am I wrong? Is the article I quoted wrong?
I'm seeing "interactive" in the documentation and assuming I can interact with the application GUI locally, similar to how I can interact with a linux application like Gedit remotely using a third party app like MobaXterm.
Can someone set me straight here?
Thanks,

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 .

Opening web browser on linux virtual machine

I have created a virtual linux machine from amazon web services... the terminal that opens up is the gitbash prompt. I'm trying to open any web browser but I couldnt find a command to do so. I have tried xdg-open, start and several other commands that I came across but they wouldnt work. Please assist me!
The text based lynx is usually installed by default. Otherwise if X-windows is installed and configured, the shell command "startx" will start a GUI session.
But gitbash is tiny and is void of most packages to reduce space...

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.

Attach/Detach to a remote instance of Eclipse

When using Eclipse over X-Windows on a remote shell (X port forwarding), is there a way to simply detach my X connection and come back to the process later. For a little more clarity, I'm on a Windows machine and have to reboot. I'd like to keep Eclipse running and come back where I left off. Eclipse is running on my Windows machine through an X-Server connected to a Linux box.
I'm thinking something like tmux could do the trick. However, I do a Ctrl-Z to stop Eclipse and it won't close the Eclipse Window. If I restart the X-Server in Windows, Eclipse fails when I try fg 1. Any other options?
Xpra did everything that I needed, but it was not clear exactly how it worked. I was able to get it working by opening two PuTTY sessions in windows, one server and one client. Also, the Google Code is out-dated. Instead, install from http://xpra.devloop.org.uk/dists/xpra-0.0.7.9.tar.bz2. I'm not sure how it's different, but it worked for me. The README tells how to build the package. It is necessary to apt-get a bunch of other stuff. But, here are the missing pieces on how to get it work as I describe above:
Setup server:
cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra start :10
export DISPLAY=:10
xterm&
Setup client:
cd ~/download/xpra/xpra-0.0.7.9
export PYTHONPATH=$PWD/install/lib/python:$PYTHONPATH
./install/bin/xpra attach :10
Notes:
The Windows xpra installer is not needed for this configuration. I don't know what it's supposed to do.
Be sure to run Xming on Windows.
Be sure to enable X port forwarding on the client PuTTY window.
Launch whatever you want from the xterm window. (ie Eclipse)
You can close the server window once xterm is up.
Hit ctrl-c in the client window to detach from the session.
Do all the client commands again to re-attach..even after restarting PuTTY, the Xming, or Windows itself.
I have zero experience with it, but xpra sounds like exactly what you're looking for.

Resources