Knowledge: andLinux Launcher

From andLinux

(Difference between revisions)
Jump to: navigation, search
(started to explane the Launcher... But i really don't known how it works :()
Current revision (10:34, 23 May 2009) (edit) (undo)
(IP / port change howto)
 
(4 intermediate revisions not shown.)
Line 1: Line 1:
-
How andLinux work...
+
Depending on how you choose to configure the system during the installation process, the andLinux system will either run <tt>xfce-panel</tt> to provide an X-based start menu, or it will run a custom perl daemon program to listen to ''launcher'' requests from Windows.
-
== Launcher ==
+
A set of executables is installed in your <tt>''C:\Program Files\andLinux''</tt><tt>'''\Launcher'''</tt> Windows directory. These programs include applications, like <tt>and'''Karbon'''.exe</tt> and <tt>and'''KWord'''.exe</tt>, as well as a special utility program called <tt>andCmd.exe.</tt> These launchers are run when you click their icons in the andLinux menu (installed in the system tray, if you permit it); they can also be run directly from Windows Explorer, added to the Start menu (create a shortcut), etc.
-
How the Launcher works.
+
-
There exist a few launcher for starting linux applications from windows. Theses launcher are small '''.exe''' files found in '''.\andLinux\Launcher\'''
+
=== Protocol ===
-
The Launcher program opens a connection via Ethernet to the small perl script in the VM. This perl script starts the Linux program. It can be found in '''/usr/local/sbin/launcher.pl'''
+
These launcher programs communicate with the andLinux VM via a socket. By default, the launchers know that the andLinux VM will be listening at IP address 192.168.11.150, on port 2081. When the andLinux system boots up, a perl script is run that listens for input on this socket. That perl script is located at <tt>/usr/local/sbin/launcher.pl,</tt> and its config file is located at <tt>/etc/andlinux/launcher-conf.pl</tt> (since Beta 2).
-
The default host is 192.168.11.150 and default port is 81.
+
To change the IP address or port, you need to enter your desired values in the Windows registry as
-
'''/etc/winterm''' contains the link to '''/usr/local/sbin/launcher.pl''' or to '''/usr/bin/xfce-panel'''
+
<tt>\\HKEY_LOCAL_MACHINE\SOFTWARE\andLinux\Launcher\IP</tt>
 +
<tt>\\HKEY_LOCAL_MACHINE\SOFTWARE\andLinux\Launcher\Port</tt>
 +
 
 +
where IP is a string (type REG_SZ) and Port is a number (type REG_DWORD). Pay attention that numbers are encoded hexadecimal by default. When changing the port (e.g. to 1234), you'll need to add this line to the top of the launcher config file:
 +
 
 +
<tt>$localPort = 1234;</tt>
 +
 
 +
The launcher programs send a small packet of data to the perl script, containing a line like <tt>'''cmd='''some-linux-app'''&file='''some-file.</tt> The perl script decodes this and runs the appropriate command, with the file (or whatever) as command-line arguments.
 +
 +
=== Default User ===
 +
 
 +
The andLinux launcher daemon runs as root by default. In order to change this user, see [[Howto: change default user]]. It is doable, but somewhat involved -- you will need about 15 minutes.

Current revision

Depending on how you choose to configure the system during the installation process, the andLinux system will either run xfce-panel to provide an X-based start menu, or it will run a custom perl daemon program to listen to launcher requests from Windows.

A set of executables is installed in your C:\Program Files\andLinux\Launcher Windows directory. These programs include applications, like andKarbon.exe and andKWord.exe, as well as a special utility program called andCmd.exe. These launchers are run when you click their icons in the andLinux menu (installed in the system tray, if you permit it); they can also be run directly from Windows Explorer, added to the Start menu (create a shortcut), etc.

Protocol

These launcher programs communicate with the andLinux VM via a socket. By default, the launchers know that the andLinux VM will be listening at IP address 192.168.11.150, on port 2081. When the andLinux system boots up, a perl script is run that listens for input on this socket. That perl script is located at /usr/local/sbin/launcher.pl, and its config file is located at /etc/andlinux/launcher-conf.pl (since Beta 2).

To change the IP address or port, you need to enter your desired values in the Windows registry as

\\HKEY_LOCAL_MACHINE\SOFTWARE\andLinux\Launcher\IP
\\HKEY_LOCAL_MACHINE\SOFTWARE\andLinux\Launcher\Port

where IP is a string (type REG_SZ) and Port is a number (type REG_DWORD). Pay attention that numbers are encoded hexadecimal by default. When changing the port (e.g. to 1234), you'll need to add this line to the top of the launcher config file:

$localPort = 1234;

The launcher programs send a small packet of data to the perl script, containing a line like cmd=some-linux-app&file=some-file. The perl script decodes this and runs the appropriate command, with the file (or whatever) as command-line arguments.

Default User

The andLinux launcher daemon runs as root by default. In order to change this user, see Howto: change default user. It is doable, but somewhat involved -- you will need about 15 minutes.

Seen a page that contains spam or objectionable material? Please report the link and/or login of the author to david @ andLinux . org (remove spaces)