Difference between revisions of "Adding new computing apps"

From LinuxMCE
Jump to: navigation, search
Line 62: Line 62:
 
==Using the WM_CLASS string in the template==
 
==Using the WM_CLASS string in the template==
 
..... to be written .....
 
..... to be written .....
 +
 +
[[Category: Tutorials]]

Revision as of 03:10, 6 September 2007

In the "computing" screen, one can add new applications.

To add a new application, a template must be used, and the window class for that application must be known. Window class is a property of every X11 application.

The WM_CLASS property (of type STRING without control characters) contains two consecutive null-terminated strings. These specify the Instance and Class names to be used by both the client and the window manager for looking up resources for the application or as identifying information.

On a LinuxMCE computer

Go to computing screen.

Press admin => firefox should appear

Press Ctrl-Alt-F2 => you are at a login prompt

Log in

run the command

   export DISPLAY=:0

now you can launch GUI applications from this console

   launch your application

Press Ctrl-Alt-F7 and wait until your application appears

Press Ctrl-Alt-F3 and log in again

type these commands (without $)

   export DISPLAY=:0
   xprop | grep WM_CLASS

Press Ctrl-Alt-F7 => the cursor changed his shape to "+"

   Click somewhere in your application

=> the cursor changes back to "normal" cursor

Press Ctrl-Alt-F3 and look into your console: a line like this should appear

   WM_CLASS(STRING) = "class_instance", "class_Name"
   class_instance.class_Name is the string that will be used in the template for your application
   Remember this string, and pay attention to lowercase and uppercase characters

You can close your application an your consoles now

On another computer

Launch a terminal

Launch your application

Type in your terminal:

   xprop | grep WM_CLASS

=> the cursor changed his shape to "+"

   Click somewhere in your application

=> the cursor changes back to "normal" cursor

Look in your terminal: a line like this should appear

   WM_CLASS(STRING) = "class_instance", "class_Name"
   class_instance.class_Name is the string that will be used in the template for your application
   Remember this string, and pay attention to lowercase and uppercase characters

You can close your application an your terminal now

Using the WM_CLASS string in the template

..... to be written .....