[opensuse] Having requests for linux-browser forwarded to another machine (simple solution)...
Thought I'd share a minor success -- getting links clicked in apps on my linux-box to open on my local-windows desktop. Note, when I say 'local', its about my desktop being < 1 meter away and my linux server being about 8 meters away, in another room, so 'local' is relative. Thought I'd also share the steps to arrange this, simple as they are at least they can be documented. First, I added an app to the applications directory at /usr/share/applications/palemoon.desktop (attached) I based it off the entry for firefox with few modifications. In my home directory, my "~/bin" is in my PATH. There I added a "palemoon" script. It's a 1-line bash script that uses 'rsh' to login from linux to my desktop (WinBox): -------- #!/bin/bash rsh -n -l 'MyDomain\lwalsh' WinBox runapp palemoon "$@" -------- Since my linux & windows box's have a direct connect cable that isn't exposed to the internet, I use 'rsh' to start the "runapp" script on the windows machine. Equivalently, (unrelated to making this work, but an alternate way to run something remotely w/ssh) I have another script that runs from linux and checks something on Windows. I use linux to poll windows, as it's more reliable and it sends me email when it fails. The best you get w/windows is a message in a binary log when it fails -- not very good for alerting me of an abnormal condition. It is the equivalent format as the rsh runner: -------- #!/bin/bash ssh -n -T 'MyDomain\lwalsh'@WinBox bin/script "$@" -------- Of note: in both cases, the scripts wait for the remote to finish -- unnoticeable for the ssh-run script except that it records execution errors into the cron-output that is emailed to me on failure. In the rsh case, since it is running a browser -- if it is the 1st instance, it really waits until that instance has exited, while instances sent w/the browser already running return immediately. I can change the 1st wait in various places if I want (probably will in 'runapp'). Runapp is my "dispatcher" -- I could have called palemoon directly, but this way, 'runapp' can contain the path or read the windows registry for the path. Runapp allows me to put future improvements/changes in 1 place that is app-independent, I could even have runapp launch a windows handler based on the arg-type (email for a mailto: link, browser for URL, music player for a music file...etc). Right now, runapp just looks up the app and I have it's path encoded in the script. It's also attached. Thats pretty much it. 3 files (one of which is the 1-line forwarder listed above). For simple use, probably don't need much more than this, but could extend it to wherever I want it to go. Any questions, please ask... Thanks for the help in finding the change-point(s). BTW -- Any linux app that is already running needs to be restarted to read new info in the "applications" directory. That had me worried for a bit until I restarted... Cheers! -linda [Desktop Entry] Categories=Network;WebBrowser;Remote; Encoding=UTF-8 Name=PaleMoon GenericName=Web Browser Comment=Web Browser TryExec=palemoon Exec=palemoon %u Icon=palemoon Terminal=false StartupNotify=true MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;application/x-xpinstall;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp; Type=Application #!/bin/bash shopt -s expand_aliases alias my=declare sub=function map='my -A' array='my -a' int='my -i' my -l app="$1" ## lowercase appname shift map app_reg=([palemoon]="/c/prog64/Pale Moon/palemoon.exe") if [[ ${app_reg[$app]} ]]; then my app_path=${app_reg[$app]} "$app_path" "$@" fi
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday, 2017-06-20 at 14:07 -0700, L A Walsh wrote:
Thought I'd share a minor success -- getting links clicked in apps on my linux-box to open on my local-windows desktop. Note, when I say 'local', its about my desktop being < 1 meter away and my linux server being about 8 meters away, in another room, so 'local' is relative. Thought I'd also share the steps to arrange this, simple as they are at least they can be documented.
Noted :-) Just an idea, in case you don't know about it already. In Windows you can use, instead of putty, MobaXterm. It allows you to start graphical X programs. - -- Cheers, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAllKcVIACgkQtTMYHG2NR9WjGACfQPX6RqZZTp/QY7jvMiDX2EwN BtAAn0+AXhEvUJ3jFHqsow3myhjEKm00 =O0FS -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Carlos E. R.
-
L A Walsh