Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
[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):
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:

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...


[Desktop Entry]
GenericName=Web Browser
Comment=Web Browser
Exec=palemoon %u


shopt -s expand_aliases
alias my=declare sub=function map='my -A' array='my -a' int='my -i'

my -l app="$1" ## lowercase appname
map app_reg=([palemoon]="/c/prog64/Pale Moon/palemoon.exe")

if [[ ${app_reg[$app]} ]]; then
my app_path=${app_reg[$app]}
"$app_path" "$@"
< Previous Next >
This Thread
Follow Ups