Fandom

coLinux

Shortcut without windows console

237pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

For this to work you need to have Windows scripting ( wscript.exe ) installed

Getting Rid of the Annoying Windows Console Window Edit

When you start coLinux in a cmd.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 the coLinux console, make a file called invisible.vbs:

for i = 0 to WScript.Arguments.Count - 1
        args = args & WScript.Arguments(i) & " "
next
[[CreateObject]]("Wscript.Shell").Run args, 0, False

This 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 the coLinux shortcut, for "Start in:" use "C:\Program Files\[[coLinux]]", for the Target: use C:\invisible.vbs colinux-daemon -c default.colinux.xml or whatever command line you wish. For a pretty icon, you can point to the colinux-daemon.exe binary.

If you want neither the windows nor the coLinux console, simply add the -d option to your colinux-daemon command line. Be sure your setup works first :)

Getting Rid of the Annoying Windows Console Window for linux app shortcuts Edit

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 from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html.

Now create batch files to run individual linux apps similar to this one gnome-terminal.bat ( based on the basic network setup used in GettingStarted and assuming that you have setup an X server like Xming in XCoLinux ) :

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 as Target :

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

Also on Fandom

Random Wiki