Search code examples
cygwinremote-accesslauncher

cygwin: How to make a Windows Menu launcher for a remote application


I have made a application launcher for Thunderbird (called mythunderbird) on a remote machine using the .XWinrc file.

menu apps {
        xterm   exec    "xterm"
        "Emacs" exec    "emacs"
        notepad exec    notepad
        xload   exec    "xload -display %display%"  # Comment
        mythunderbird exec "ssh -X mckserver.mckserver.apollo3.com thunderbird"
}

This starts beautifully with a multiple of keystrokes (right click XWin > (pint to Applicatoins) > click mythunderbird.

Can someone tell me how I can add such a menu to a desktop short cut? Putting a short cut to run "xterm" then logging in to the remote server and starting Thunderbird is easy, but a lot of steps and clicks.

What I really need to do is know what to change in this default short cut for starting xterm:

C:\cygwin\bin\run.exe -p /usr/X11R6/bin xterm -display 127.0.0.1:0.0 -ls

What I like about the functionality of the XWinrc application is that it has a clean execution of Thunderbird without the residue of an extra terminal left running. If I start it outside XWinrc, I have Thunderbird running, but also an extra xterm running.


Solution

  • The way I got it to work was to make a script in cygwin in my home directory (/home/dave/mythunderbird) which does the ssh call.

    In the windows shortcut, set the target C:\cygwin\bin\run.exe bash -le /home/dave/mythunderbird

    run.exe stops the command window being displayed and bash -le runs the script in bash from a login shell