Using the Photon microGUI

This chapter includes:

Overview of Photon

The Photon microGUI is Neutrino's graphical user interface, and you can use it as a desktop environment, similar to other GUI desktop environments. This means you can run applications in windows, use the mouse for point-and-click and dragging operations, view directories and files graphically in a tree hierarchy, view multimedia files, and so on. Photon also provides the framework for graphical applications in embedded systems.

Many of the applications and utilities that come with Photon are documented in the Neutrino Utilities Reference. For information about programming Photon applications, see the Photon Programmer's Guide.

Why is it called “Photon”?

Whenever you use your mouse or press a key, you're giving input to a Photon application. And whenever the application displays data in a window, it's providing output. All these interactions are processed as tiny packets of data called events. You can think of all these input and output events traveling between you and Photon applications as photons, particles of light.

Why is it called a “microGUI”?

We call Photon a “microGUI” because of its size and architecture. Photon is a very small GUI. It's designed to fit in embedded systems, but it's also designed to be scaled up. Photon is perfectly at home in high-end, high-performance distributed systems.

Like Neutrino itself, Photon is built around a small microkernel. This modular architecture makes Photon fast, flexible, and inherently capable of network-distributed computing.

Your workspace

When you start Photon for the first time, you're prompted to set up your graphics card and settings.

When Photon starts, you see your workspace, which is an area where you can run applications. The workspace consists of the taskbar, the shelf, and the desktop:


Photon desktop


Photon's workspace, including the taskbar, shelf, and desktop.

The desktop is the main part of the screen. It's where application windows appear. In Photon, the desktop is actually a view, called a virtual console, into a much larger desktop space, which is three desktops wide by three desktops high. You can run applications in different consoles, and switch consoles by using keyboard shortcuts or the World View in the shelf.

If you right-click anywhere on the desktop, you see the Desktop Menu, which lets you easily run frequently used applications, configure Photon, or shut down. You can customize this menu (see below).


Desktop menu


Desktop menu.

The taskbar is the area at the very bottom of the screen. It includes, by default, the Launch button, the date and time, and icons for applications that are currently running.

From the taskbar, you can:

The shelf runs up the right side of your screen, and lets you easily launch frequently used applications and utilities, configure your system, view system resource usage, and switch consoles.

From the shelf, you can:

Right-click anywhere on the taskbar or shelf to configure or exit the shelf application. To run or restart shelf, type shelf & at a command line.

Drag the taskbar or shelf border to make it smaller or larger. If you drag the border to the bottom or right of the screen, the taskbar or shelf is put in autoshow mode, which means it appears only when you move the mouse over the edge of the screen.

Modifying the shelf

You can configure the shelf by right-clicking on the shelf or taskbar and selecting Setup, or by running shelf -c from the command line. The shelf's configuration dialog looks like this:


Shelf configuration dialog


Shelf configuration dialog.


Note: The shelf's default configuration file is /etc/photon/shelf/shelf.cfg. When you configure your shelf, the new settings are saved for your current user ID only, in $HOME/.ph/shelf/shelf.cfg.

The items you can add or modify on the shelf include:

Group
A group of applications or utilities. A group can contain child groups.
Drawer
Like a group, but a drawer expands horizontally out of its parent container rather than vertically in the shelf.
Separator
A space that visually separates two containers. Any space not used in a shelf is occupied by a separator, so you always have at least one separator per shelf. If you try to remove a separator, it's repositioned.
World view
A world view plugin, which lets you see which consoles contain open windows, and lets you set the current console.
CD player
A CD-player plugin.
Volume
A volume-control plugin.

You can choose additional plugins by selecting the Browse button, including:

cdplayer.so
You can play a CD, stop, skip forward, and skip back. The plugin displays the track information in its text box.
clock.so
You can choose the clock's font and its size, whether or not to show the date and the seconds, and the format of the date (AM/PM).

If you select this plugin from the shelf, it opens a User Configuration utility that lets you set and manage the time and date.

launcher.so
A plugin that lets you create on the shelf an item that runs an arbitrary command.
launchmenu.so
A plugin that supports the Launch menu. You can have only one of these in your shelf at any given time. If you try to add a second one into your shelf, it's ignored. If you want to change the location of the Launch menu, you must first remove the original and then add the new one in the new location.

Note that this plugin doesn't work in a drawer; it must be at the top level in a shelf. For information about specifying the contents of the Launch menu, see Modifying the Launch menu,” below.

led.so
A set of three “LEDs” that show which of the Num Lock, Caps Lock, and Scroll Lock keys are on. The light is on when the key is active.
pload.so
A CPU Load Monitor that displays bar graphs that indicate the levels of CPU usage, memory usage, and disk and network activity.
ptrcam.so
A “pointer cam” that magnifies the image directly under the pointer. You can specify the horizontal and vertical radius, in pixels.
taskbar.so
The taskbar that lets you switch between applications simply by selecting their icons. You can change the font, font size, active and inactive colors, and you can decide whether or not to display balloons when you hover over an entry.
volume.so
A slider that controls the volume coming from the sound card. To mute and unmute the volume, select the small speaker icon in this plugin.
worldview.so
A miniature version of your nine virtual consoles. You can decide when to display window frames: always, never, or depending on the size of the world view.

Modifying the Launch menu

The launchmenu.so plugin populates the Launch menu, based on the contents of the $HOME/.ph/launchmenu and /etc/photon/launchmenu directories.


Note: If there are conflicting items, the item found first prevails, so items encountered in your home directory's launchmenu directory take precedence over items encountered in the global one.

Creating items and submenus

Inside $HOME/.ph/launchmenu and /etc/photon/launchmenu, each directory corresponds to a submenu, and each file or symbolic link corresponds to a menu item, with the following exceptions:

For all other files, the plugin creates a menu item. Here's what happens when you select an item:

For all items (except *.tgt files), the launchmenu.so plugin uses the filename as the text to display for that item. You can use any characters in the filename (within the constraints of the underlying filesystem); the plugin assumes that these filenames use UTF-8 encoding.

The ampersand (&) takes on special meaning; the plugin interprets the character that follows as an accelerator key for that item. If you want to display a literal ampersand, specify it as && in the filename.

Target files

The launchmenu.so plugin uses target (*.tgt) files to give you more control than simple files give over launchable targets and how they're represented within the menu. You can use target files to specify one (or more) runnable targets, where each target corresponds to a single menu item. You specify the targets in this form:

[item1_text]
target = action
...
[item2_text]
target = action
...

Target files are organized into one or more sections, where each section specifies a target. The square brackets are part of the syntax; the text in them is the menu item's default text, following the same conventions as discussed above for filenames.

Each target is described by key=value pairs within the section. You must specify the target=action pair; it specifies what to do when the item is invoked. The action can be one of:

If you don't specify the target key, the plugin ignores the section when it's generating menu items.

The optional keys are:

sicon
The full path of a small (maximum 24 × 18 pixels) icon to display for the item. If you don't specify this, the launchmenu.so plugin tries to find an icon using the association mechanism, or from the executable if the item is a PhAB application.
licon
The full path of a large (maximum 48 × 48 pixels) icon to display for the item.
group
This entry lets you logically group items from different target files, for use when ordering the items. For more information, see Controlling the order of items,” below.
order
This entry lets you specify the order of the items, generally in conjunction with the group entry.

As mentioned above, the section name specifies the default text displayed for the item. If you want to provide items in multiple languages, you can specify an entry whose key is a language code as used by the ABLANG environment variable (see the International Language Support chapter of the Photon Programmer's Guide), and whose key is the text in that language. For example:

[Calculator]
target = phcalc
fr_FR = Calculatrice

Controlling the order of items

By default, the launchmenu.so plugin sorts items alphanumerically by the displayed text. However, it also provides a degree of control over item ordering within the target specification. If you're shipping a package that includes a number of items to be included in a menu and you want them to be ordered in a specific manner regardless of their names (for instance, you deem some items to be more important and want to ensure they appear first), you can control this ordering in one of these ways:

Multiple target files
If the targets are spread across multiple target files for any reason, you need to establish a logical grouping to sort the items in. You do this by specifying a group entry in the target. The value for this entry may be any string, although we recommend you follow this convention to avoid potential conflicts:

Company name:Product Family:Name

In most cases, the company name alone should suffice, although you may wish to be more specific, depending on the number of product lines you offer.

After the plugin groups the items logically via the group entry, it sorts the items alphanumerically by the order entry. The order can be any string; you can simply use numbers, or you can choose a more elaborate scheme that will let you insert other items in the future.

Single target file
Items specified in a single file can take advantage of implicit ordering. That is, in absence of a group entry, they automatically inherit a value that's also available to all other targets within the same file. In this case, you need to specify only the order entry, as described above.

Additional menu control

Directories, files, and targets provide all the mechanisms necessary for populating menus with content, and even allow for a degree of control in terms of ordering. You can also use menu format-control files (named .menu) to fine-tune overall menu presentation and visually group related items.

Menu format is specified as a PxConfig-style file (see the Photon Library Reference), with each section specifying some form of control. The types of control are:

Troubleshooting

How can I bind an icon to a submenu? How can I supply alternate text for a submenu item (say, to translate it into a different language)?
The launchmenu.so plugin ignores files whose names begin with a period (.), so the first step is to hide the directory by adding a period to the beginning of its name. Next, create a file with an extension of .tgt (the name doesn't matter, as long as it doesn't begin with a period). In the target field, specify the full path to your new, hidden directory. You can then specify any additional information, such as icons and translations.
Can I use files from elsewhere in the filesystem to build a menu?
Yes, you can. For example, you can put a symbolic link into $HOME/.ph/launchmenu that points elsewhere in the filesystem. Note that because the plugin has to scan the files and build a hierarchy based on the contents, this can take a while to complete, depending on the number of files and subdirectories that the plugin encounters.
I've edited a target file. How do I get the Launch menu to reflect the change?
The launchmenu.so plugin watches only directories for changes, because watching all of the files could take too time. In addition, directories are typically updated as items are installed and uninstalled, so if an entry is added or removed from a directory, the plugin picks it up on-the-fly. If you've changed a file, and you want the change to take effect immediately, you can:
What about packages installed with the old installer? Will they show up?
The launchmenu_notify utility creates a .tgt file that represents legacy and third-party packages.
I've installed a package with the old installer, but I'm not getting a launchmenu item. What should I do?
Try the following:
  1. Run launchmenu_notify -vvv from the command line. This tells you which third-party or legacy items exist, need to be added, and can be removed.
  2. Examine the list of existing items to see if one matches the missing item. If an item doesn't appear in the Launch menu, the target likely doesn't specify a valid file (e.g. the file doesn't exist).

If this doesn't help you solve the problem, please let us know.

I've created my own item, but it doesn't appear in the Launch menu.
The target might not specify a valid, existing file. The launchmenu.so plugin doesn't display items that don't have a target, or that have a target that can't be resolved. Make sure the target is either a full path or an executable that the shell can find (use the which utility to determine this).

Modifying the Desktop menu

The Desktop menu is the one that pops up when you right-click anywhere on the Photon desktop.

You can run phmenu from the command line by typing phmenu &. This utility lets you drag and drop the menu items to the trash or to a new location. When the item is selected, you can modify the label shown in the menu, the hotkey, and the command to run. You can add new items by selecting the item you would like and dropping it into the desired location in the tree.

For more information, see phmenu and pwm in the Utilities Reference.

Starting applications automatically

You can tell Photon to launch applications on startup. To do this, add the name of the application's executable to the $HOME/.ph/phapps configuration file. For example:

ped &
pterm &
helpviewer &

Note: If the file doesn't exist, you need to create it, and make it executable by changing its properties with the File Manager, or by typing chmod +x ~/.ph/phapps.

Configuration tools

Photon provides various configuration tools that let you change your Photon settings. You can run them all from the command line, and some you can start from the shelf or Launch menu.

Appearance: pwmopts, Appearance in the shelf, or Launch-->Configure-->Appearance
Select the background colors, pattern, and image settings, as well as title alignment and window behavior, including whether to:

Select the Background tab to set the desktop color and pattern, or to select an image for the desktop backdrop.

When you change a setting, pwmopts edits the configuration file /usr/photon/config/wm/wm.cfg. The following example shows a typical wm.cfg file:

[wm config]
fore_color = 0xD8D8D8
active_color = 0x5C8BDF
title_color = 0x65
inactive_color = 0xB1C1D9
base_color = 0xBDBDAA
border_active = 0
placement = 4
text_align = 2
auto_raise = 0
keyboard = 0
focus_cursor = 0
click_front = 1
drag = 1

[background]
vert_align = CENTER
horz_align = CENTER
image_op = PROPORTIONAL STRETCH
image = /usr/share/backdrops/1024x768/default.jpg

Note: If wm.cfg is not installed, different colours will be substituted. For example, light green title bar RGB 0x008070 will be used in place of light blue RGB 0x5C8BDF (see above). If wframe_updated.so is not installed, then the title bar will default to the "Photon 1.x look".

To get the default look and feel, ensure that wframe_updated.so and wm.cfg are installed properly on your target system.


Fonts: phfont
Map font substitutions, set options such as anti-aliasing, and configure Asian identification. For more information, see The right fonts in Configuring Your Environment.
Graphics: phgrafx, Display in the shelf, or Launch-->Configure-->Display
Select graphics settings for Photon. When you run phgrafx, you can select from a list of available graphics modes for each video driver supported by your graphics card. The list is generated by a hardware scan Photon performs during installation.
Localization: phlocale, Localization or Time & Date in the shelf, or Launch-->Configure-->Localization
Set your machine's time zone, language, keyboard (see International keyboards in Using the Command Line), time, and date.

Note: Changing the language on your machine affects only the applications that support your choice. Other applications continue to use their default language.

Mouse: input-cfg, Mouse in the shelf, or Launch-->Configure-->Mouse
Set the speed and acceleration of the mouse pointer. You can also swap the buttons (to reduce the strain if you're using the mouse with your left hand) and enable the wheel if the mouse has one.
Network: phlip, Network in the shelf, or Launch-->Configure-->Network
Manage your network and modem settings.
Print manager: prjobs
View, start, or cancel jobs in the print queue.
Remote access: phrelaycfg
Create or delete the /etc/system/config/noditto file, which prevents anyone from using phditto to access your Photon workspace from a remote machine.
Screen saver: savercfg, Screen Saver in the shelf, or Launch-->Configure-->Screen Saver
Configure the Photon screen saver. You can select from a list of screen savers, and set the activation time, a password, and any command-line options that the selected screen saver might have.

Browsing files with the File Manager

Photon comes with a file manager, pfm, that lets you browse directories and files using a graphical interface. To open the Photon File Manager, click File Manager in the Utilities group on the shelf, or type pfm & on the command line.


File Manager


Photon File Manager.

The Photon File manager represents files and folders graphically. Double-click a folder to open it and display its contents; double-click a file to open it in an associated application (if an association exists). The File Manager also supports drag-and-drop operations; for example, you can drag a file to a folder to move it there. You can right-click a file or folder to view a shortcut menu that contains the available commands.

At the top of the File Manager are two text boxes that you can use to navigate and filter directory listings. You can type a path name directly into the Path box to jump to that directory. To view only files of a certain type or that start with a specific character, use the Filter box. For example, enter p* to view only files that start with the letter p, or enter *.ps to view only files that have the .ps suffix.

You can use the Photon File Manager menus to perform many file-management tasks. The toolbar at the top of the File Manager provides shortcuts for some commonly used commands. For more information, see pfm in the Utilities Reference.

You can view a listing of the most common keyboard shortcuts in File Manager by selecting Help-->Quick Reference. You can also view all currently defined bookmarks in a panel by clicking the Bookmarks toolbar shortcut.

Some of these commands are also available from the right-click menu in File Manager.

Getting help with the Helpviewer

You can use the Photon Helpviewer to display our product documentation. The documentation is organized under the $QNX_TARGET/usr/help/product directory.

To open the Helpviewer, click the Help button on the shelf, or select Help from the right-click shortcut menu on the desktop. You can also start the helpviewer by typing helpviewer & on the command line.


Helpviewer


The Photon helpviewer.

In the Topics list, click the arrow next to a topic to view the subtopics it contains, or double-click a topic to make it the top topic in the list. Clicking on a topic displays its content in the topic pane.

You can also browse to topics by clicking on hypertext links within the topic text. Links are indicated by color and underline.

Searching for a topic or keyword

You can search for words in the help files by using the Find feature. The Find panel is located under the Topics list. If it isn't visible, select View-->Topics, or press Ctrl-T. Enter the word(s) in the Find box and click Go!. If you enter multiple terms, helpviewer finds topics that contain all the terms.


Note: You might need to generate a full-text search index on a set of help files if one doesn't exist. To do so, select File-->Generate Index. For large help sets, such as Neutrino's, this operation can take several minutes.

You can refine the search by selecting one or more of these find options:

Match Whole Words
Check this box to match whole words. If unchecked, partial word matches are found. For example, “grep” also matches “egrep”.
Case Sensitive
Check this box to match the case in the search terms.
Search Topic Text
Check this box to search all the text in a topic. If unchecked, only topic headings are searched.
Search All Topics
Check this box to search all the topics in the help set.

The pterm terminal window lets you select (highlight) a portion of text and then invoke the Helpviewer by either:

The Helpviewer starts, then searches the table of contents for any topics that contain the selected text. The first matching topic is automatically displayed.

You can also simply type something in a pterm window and then press Ctrl-Alt-H.


Note: Most QNX documents include a keyword index that can also help you find what you're looking for. In the online docs, click the keyword-index button, which appears at the top and bottom of each file:

Keyword index


Bookmarking a topic to view it again later

If you find a topic that you want to view again later, you can bookmark it. This saves a quick link to that topic in the bookmarks list. To bookmark your current topic, select Bookmarks-->Add Bookmarks.

To view the list, click the Bookmarks toolbar button. Click an item in the list to view the topic. Bookmarks also appear in the Bookmark menu.

You can remove bookmarks by viewing the bookmarked topic, and then selecting Bookmarks-->Remove Bookmark.

Navigating around help files

The Helpviewer provides the following ways to navigate through the documentation:

Task Menu command Shortcut
Go to the topmost help topic (“home” topic) in the help set File-->Home Ctrl-H
Go to the previously viewed topic File-->Back Alt-
Return to the next topic (after using the File-->Back command) File-->Forward Alt-
Move up a level if you've opened a folder File-->Up Ctrl-U
Open the topics pane if it's closed View-->View Topics Ctrl-T
Open the search results panel if it's closed View-->View Search Results Ctrl-S
View where the currently displayed topic is located in the topics list View-->Where?
View a list of previously viewed topics View-->History List Ctrl-Y

The online documentation also includes some navigation buttons at the top and bottom of each file:


Navigation


Navigation buttons in the online docs.

The Contents button moves you “up” in the document:

Viewing more than one topic at once

You can view several topics at once by opening topics in a new topic window. Each open topic window is indicated by a tab above the topic pane.

To open a new topic pane, select File-->New Section, or press Ctrl-N. You can view any open topic by clicking on its tab. To close the current topic, select File-->Close Section, or press Ctrl-D.

Surfing the web

Photon ships with a web browser that you can use to browse local HTML files or to browse the Internet. To start it, click on its button in the Internet group on the Photon shelf.


Note: Neutrino also includes an embedded web server called Slinger that you can use to build Internet access into embedded systems. For more information, see the Setting Up an Embedded Web Server chapter.

Connecting to other systems

Photon supports the following methods for connecting between computers running Photon:

Phditto

The phditto utility lets you connect to a Photon session that's running on another computer. You can connect to an existing Photon session or start a new one. This utility lets you interact with the remote Photon session as though you were working directly on that node. In order to access the remote node using phditto, you must run phrelay on the remote machine.

You can end the phditto session by selecting Close from Phditto's window menu. To view this menu, right-click the phditto label in the Taskbar.

Phindows

Phindows (“Photon in Windows”) is a connectivity tool that lets you use Windows platforms to connect to and interact with graphical Photon applications running on a remote Neutrino computer.

Configuring the Neutrino machine for TCP/IP use

If you're using TCP/IP, make sure the configuration is correct before you use Phindows:

These two entries cause inetd to listen for incoming requests to establish a new Photon session. When a request is detected (from a remote Phindows client in our case), inetd automatically establishes a full TCP/IP connection and launches phrelay on that connection. Phindows is then fully connected to the local machine.

For more information about inetd, see the Utilities Reference.

Starting Phindows

To launch Phindows on your Windows machine, do one of the following:

Phindows displays a Connect dialog where you can specify the type of connection (TCP/IP or direct-connect serial). Various connection options are available, but the defaults usually work well.

If you request a TCP/IP connection, you must also specify the Internet address of the Neutrino computer you're connecting to (e.g. 198.53.31.1). If the remote computer has been configured properly, you should see a Photon login prompt, at which point you're connected and running Photon.

If you request a serial connection, then you must specify the COM port (e.g. COM1 or COM2). If you don't specify a baud rate, Phindows uses the current Windows default settings. With a serial connection, Phindows initially acts as a simple text terminal that lets you type commands directly to the modem (e.g. ATDT1-613-591-0934). Once connected, log in to Neutrino and then issue the command:

/usr/bin/phrelay

This command causes Phindows to drop out of text-terminal mode and begin acting as a Photon graphical terminal. A Photon login screen should appear at this point.

Additional options

You can use Phindows's command-line options to:

For more information, see the Phindows User's Guide.

Hotkeys and shortcuts

You can use many keyboard shortcuts and hotkeys to perform tasks quickly and easily. The following tables show shortcuts for using pterm, editing text fields in Photon applications, managing windows, working with the Photon workspace, and others.

pterm

The Photon terminal emulator is called pterm. It behaves like a character-device driver; see The keyboard at a glance in Using the Command Line.


Note: If you're in typeover mode, and you press Enter, you return to insert mode.

The pterm program also supports the following shortcuts:

If you want to: Press:
Copy selected text to the clipboard. Ctrl-Alt-X or Ctrl-Alt-C
Paste selected text from the clipboard. Ctrl-Alt-V or
Ctrl-right mouse button
Toggle text selection Ctrl-Alt-R
Search help with selected text Ctrl-Alt-H
Set pterm options Ctrl-Alt-O
Scroll through buffered lines Ctrl-Alt-, Ctrl-Alt-, Ctrl-Alt-Page Up, Ctrl-Alt-Page Down, Ctrl-Alt-Home and Ctrl-Alt-End
Increase or decrease font and window size Ctrl-Alt-[ and Ctrl-Alt-]
Increase or decrease font size only Ctrl-Alt-, and Ctrl-Alt-.

Text field

If you want to: Press:
Cut selected text. Ctrl-X or
Ctrl-Alt-X
Copy selected text to the clipboard. Ctrl-C or
Ctrl-Alt-C
Paste selected text from the clipboard. Ctrl-V or
Ctrl-Alt-V or
Ctrl-right mouse button

Window

The window manager, pwm, provides the following shortcuts:

If you want to: Press:
Move the window to the front Alt-F2
Move the window to the back Alt-F3
Close the window Alt-F4 or
double-click the window menu button
Restore the window to previous size if it's been maximized Alt-F5 or
double-click the title bar
Move the window Alt-F7
Resize the window (use the mouse or cursor keys to choose the new size) Alt-F8
Minimize the window Alt-F9
Maximize the window Alt-F10 or
double-click the title bar

Workspace

The window manager, pwm, provides the following shortcuts:

If you want to: Press:
Move the backmost window to the front of the window stack Alt-Esc
Cycle through the windows Alt-Shift-Esc
Cycle forward or backward through the consoles Ctrl-Alt-Enter or Ctrl-Alt-Backspace
Go to console n, where n is a digit from 1 through 9 Ctrl-Alt-n
Display the Desktop Menu Alt-Enter

Photon skips any empty virtual consoles when you cycle through them.

The wmswitch process, which Photon starts automatically, provides these shortcuts:

If you want to: Press:
Cycle through the applications Alt-Tab
Cycle in reverse order though the applications Alt-Shift-Tab

Exiting Photon

If you want to exit Photon, you can press Ctrl-Alt-Shift-Backspace.


Caution: Before entering this command, make sure that no applications or utilities are running on your computer. If there are, files may be left open. Moreover, if you reboot when a critical update is in progress, the filesystem might need maintenance.

If you don't want anyone to be able to use this method to exit Photon, specify the -b option on the input driver for your system. For more information, see the entries for the devi-* input drivers in the Utilities Reference.

Photon environment variables

Environment variables set options and determine the behavior of your system. You can use the command line to set environment variables that configure Photon, but the command depends on the shell that you're using. For ksh and esh, you can use the export command.

Here's a list of environment variable specific to Photon. For a general list of environment variables, see Commonly Used Environment Variables in the Utilities Reference.

ABLANG
A language code (e.g. en_CA for Canadian English) that a multilingual Photon application uses to determine what language to display.

For more information, see International Language Support in the Photon Programmer's Guide; for the currently supported codes, see /usr/photon/appbuilder/languages.def.

ABLPATH
A list of directories where you want a multilingual Photon application to search for translation files.

For more information, see International Language Support in the Photon Programmer's Guide, and ph in the Utilities Reference.

AB_RESOVRD
A path variable that lists directories to search for resource records for applications built with PhAB. See the Photon in Embedded Systems appendix of the Photon Programmer's Guide.
AUTOCONNECT
In order to run /etc/autoconnect, you must set this environment variable to 1. For more information, see /etc/autoconnect in the Utilities Reference.
DISPLAY
The name of the physical display on which to draw.
IVE_HOME
Used by Java VM.
J9PLUGIN_ARGS
Arguments passed to Browser Java plugins.
PHEXIT_DISABLE
Set this environment variable to turn off the Photon Login dialog's Exit button so that users won't be able to exit to text mode. For more information, see phlogin2 and phlogin in the Utilities Reference.
PHFONT
The registered name of the font server (e.g. /dev/phfont).

For more information, see ph in the Utilities Reference.

PHFONT_USE_EXTERNAL
If this environment variable exists, io-graphics runs the font manager as a separate process (see phfont) instead of using phfont.so. You should set this environment variable for systems that have remote clients accessing font services on the host machine (e.g. phindows, phditto).
PHFONTMEM
The size of an area in shared memory to set up between the task and the Photon font server for returning text bitmaps (normally required only by graphics drivers). For more information, see PfAttach() in the Photon Library Reference.
PHFONTOPTS
Options to pass to the Photon font server. For more information, see phfont.
PHGFX
The full command that you want the ph script to use instead of the default commands to start the graphics driver.
PHINPUT
The full command that you want the ph script to use instead of the default commands to start the input driver.
PHINSTANCE
The number of times that Photon has been instantiated. For more information, see phlogin2 and phlogin in the Utilities Reference.
PHOTON
The name of the Photon device (usually /dev/photon). For more information, see ph in the Utilities Reference.
PHOTONOPTS
(Windows-hosted version only) Additional options you want to pass to the Photon server when it starts.
PHOTON_PATH
The name of the root directory containing Photon files (usually /usr/photon). For more information, see ph in the Utilities Reference.
PHWM
The name of the Window Manager to start when you start Photon. For more information, see ph in the Utilities Reference.
PHWMEXIT
If you set this environment variable, Photon disables the confirmation dialog when you exit Photon. For more information, see pwm in the Utilities Reference.
PHWMOPTS
Options you want to pass to the window manager when it starts. For more information, see pwm in the Utilities Reference.
PTERMPAL
The pathname of the palette file for pterm.
PTERMRC
The name of a local configuration file for pterm.
PWMOPTS
(Windows-hosted version only) Options you want to pass to the window manager when it starts. For more information, see pwm in the Utilities Reference.
PWM_PRINTSCRN_APP
The application to start when the Print Scrn key is pressed. The default is snapshot.

Troubleshooting

Here are some problems or questions that you might have concerning Photon:

How do I change the color scheme in Photon?
You can change the color of the title bars within Photon for any given state. To do this, choose Launch-->Configure-->Appearance, then select the Window tab. In this tab, you can choose one of the predefined schemes from the list, or you can set each window state (active and inactive) and the title color independently.
I've set an alias in my .profile, but it isn't set in my Photon terminals.
The shell doesn't export aliases. In Photon, the default pterm isn't started as a login shell and therefore doesn't read your /etc/profile and ~/.profile configuration files.

If you want an alias to be defined in all of your shells (inside or outside a Photon terminal), set the alias in your shell's startup file. For more information, see ksh's startup file in the Configuring Your Environment chapter in this guide.

Alternatively, you can use the -l option to run pterm as a login shell, which causes it to run .profile. If you want to, you can change the Terminal item on the shelf so that it executes pterm -l. To do this, right-click the shelf and choose Setup. Select the Terminal entry and change pterm to pterm -l.

You should also change the Desktop pop-up menu to match; edit $HOME/.ph/wm/wm.menu (or run phmenu) and add the -l option to the pterm entry.

I would like to bypass the login prompt when booting my computer into Photon. Is this possible?
Yes; for more information, see rc.local in the Controlling How Neutrino Starts chapter.
How can I change the language layout of my keyboard?
Choose the Localization item on the shelf. You can choose from several different keyboard configurations; see International keyboards in Using the Command Line.
How can I add files to the Helpviewer (such as help files for programs that I install, or new documents found on the web)? I noticed that the File menu doesn't let you bring up a file requester and look for a help file.
The Helpviewer looks for files with an extension of .toc in the /usr/help/product directory. Take a look at an existing .toc file as well as the Context-Sensitive Help chapter in the Photon Programmer's Guide.

To open an arbitrary file without creating the .toc files, use a web browser instead of the helpviewer.

I tried to create new file associations with pfm, but they didn't work correctly. For example, based on the existing associations, I tried to associate .txt files with ped, but ped doesn't start.
Make sure you have /usr/photon/bin in your PATH environment variable, then do the following:
  1. Start pfm.
  2. Press F11 or select Associations from the Edit menu.
  3. Click Add to add a new file association.
  4. Enter these settings:
    • Pattern: *.txt
    • Open: ped
    • View: ped
    • Edit: ped
  5. Choose Done to close the New Association Type dialog.
  6. Choose Done to close the Associate dialog.
How can I disable the Ctrl-Alt-1, 2, ... keychords that allow console switching in Photon?
Place this line in your /etc/rc.d/rc.local file:
export PHWMOPTS="-S"
  

For more information, see pwm in the Utilities Reference.

If a mouse isn't connected to my computer, how do I shut down Photon?
You can press Ctrl-Alt-Shift-Backspace to shut down Photon. If it doesn't work, the computer may be locked up, in which case, you might have to press the reset button. To avoid using the reset button, run inetd, then telnet into the box and slay the processes that Photon is using.
How do I change the text and background colors of the terminal?
There's a -K option for pterm that lets you select the initial colors.

For example, pterm -K 17 sets the colors to blue text (1) on a light-gray background (7). You can also define the exact RGB values for all the 16 colors that pterm uses by creating a palette file. For more information, see pterm in the Utilities Reference.

When I change the language setting under Localization, nothing changes. Why?
This setting sets the ABLANG environment variable, which some applications use to determine what language they should use. Some applications may not support the language you've selected. Changing the setting typically doesn't affect applications that are running, just new ones.
How can I disable the shelf?
If you just want to close the shelf in your current Photon session, you can shut it down it using shelf -e.

A more permanent approach is to set the PHSHELF_DISABLE environment variable to 1. You can do this in your .profile file, with export PHSHELF_DISABLE=1.

For more information about shelf, see shelf in the Utilities Reference.