Shortcut without windows console
For this to work you need to have Windows scripting ( wscript.exe ) installed
Getting Rid of the Annoying Windows Console Window[]
When you startcoLinux in acmd.exe window or from a batch file, you have a command prompt window as well as the co Linux console itself. If you want just thecoLinux console, make a file calledinvisible.vbs:
for i = 0 to WScript.Arguments.Count - 1 args = args & WScript.Arguments(i) & " "next[[CreateObject]]("Wscript.Shell").Run args, 0, FalseThis version supports multiple arguments, so you can make shortcuts to whole command lines you want to run in an invisible command line window.
To make thecoLinux shortcut, for"Start in:" use"C:\Program Files\[[coLinux]]", for theTarget: useC:\invisible.vbs colinux-daemon -c default.colinux.xml or whatever command line you wish. For a pretty icon, you can point to thecolinux-daemon.exe binary.
If you want neither the windows nor thecoLinux console, simply add the-d option to yourcolinux-daemon command line. Be sure your setup works first :)
Getting Rid of the Annoying Windows Console Window for linux app shortcuts[]
The same script can be used to create Windows shortcuts to linux applications which are then launched as though they were native windows apps. First install and configure ssh on your colinux system. Then get a ssh client for Windows, e.g. plink.exe fromhttp://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.
Now create batch files to run individual linux apps similar to this onegnome-terminal.bat ( based on the basic network setup used inGettingStarted and assuming that you have setup an X server like Xming inXCoLinux ) :
PATHTO:\plink.exe -batch -ssh user@192.168.0.40 "DISPLAY=192.168.0.1:0 gnome-terminal"
or if you set DISPLAY within colinux already or use another X solution like vnc :
PATHTO:\plink.exe -batch -ssh user@192.168.0.40 "gnome-terminal"
For this to work the respictive user must be able to log in without a password ( see /etc/ssh/sshd_config ) or you will have to add further details to pass a valid password via plink automatically. Make sure that the linux app is launched when you run this batch file. But you will notice that besides the linux app a windows console window is opened and stays open as long as the linux app keeps running. So next create a shortcut which uses the invisble.vbs script mentioned above asTarget :
wscript.exe "PATHTO:\invisible.vbs" "PATHTO:\gnome-terminal.bat"
Now you can put this shortcut into your Windows startmenu and launch linux apps like any ordinary windows app. You may want to give the launcher the look of the respictive linux icon. Use the gimp either Windows or (Co)linux version, load the application icon ( probably png ) and save the icon as Windows .ico file. Use that as icon for the shortcut. Due to the amount of files it probably is best to put all the files into a special linux launcher folder. A sample folder would look like this :
invisble.vbs
gnome-terminal.bat
gnome-terminal.ico
gnome-terminal [ shortcut, can be linked into start menu ]
... other batch files ...
--
<Caelum>
<Devport> wiki.colinux.org@devport.codepilot.net
MassTranslated on Sun Apr 23 17:36:48 UTC 2006