PCDM

From PC-BSD Wiki
Revision as of 04:08, 11 June 2013 by Drulavigne (Talk | contribs)

Jump to: navigation, search

(Sorry for the inconvenience)

Contents

The PC-BSD Display Manager (PCDM) is a new, BSD-licensed graphical login utility. In PC-BSD® 9.2, it will replace the GDM login utility. It will be added to a future rolling release to allow testing before the release of PC-BSD® 9.2.

Features

PCDM provides the following features:

  • provides PAM session/authentication using the login PAM module
  • supports remote login with XDMCP (needs additional testing)
  • provides an easy-to-use desktop environment selector
  • provides language and locale selectors during login
  • includes a keyboard layout selector
  • includes a virtual Keyboard (using xvkbd)
  • can be used to shutdown or restart the computer

Getting PCDM

If you would like to help test PCDM before it is available in a rolling release, you can build it on your current 9.x PC-BSD® system using the following instructions.

First, go to System Manager -> System Packages and make sure that Development -> Development-Qt and Development-VCS are installed. You will also need to install system source using System Manager -> Tasks.

Next, open a command prompt, become the superuser, and cd to a directory suitable for downloading the PCDM source. Execute the following commands to download and build the PCDM source:

svn co svn://svn.pcbsd.org/pcbsd/current/src-qt4/
cd src-qt4/libpcbsd
qmake-qt4 *.pro
make
make install
cd ../PCDM
qmake-qt4 *.pro
make
make install

Once the installation is complete, instruct the system to use PCDM instead of GDM. Add these lines in /etc/rc.conf:

gdm_enable="NO"
pcdm_enable="YES"

Save the edits then reboot the system to access the PCDM login prompt.

Display Overview

(post screenshot) Currently its in rather rough shape but functional. When it is nearer to finalized, there will be screenshots.

Customization/Modification

PCDM themes can be saved to and loaded from /usr/local/share/PCDM/themes/<my-theme>.

PCDM Configuration

(Configuration file can be found at: /usr/local/share/PCDM/pcdm.conf)

Appearance

THEME_FILE=/path/to/theme/file.theme (default: /usr/local/share/PCDM/themes/default/default.theme)

This variable points to the theme file to be used for setting up the PCDM display

SPLASHSCREEN_FILE=/path/to/splashscreen/file.png (default: /usr/local/share/PCDM/themes/default/splashscreen.png)

This variable lets you set up the image file to use for the static splash screen while PCDM is loading

Base Directories

DE_STARTUP_DIR=/path/to/DE_files (default: /usr/local/share/xsessions)

Directory to look for *.desktop entries that can startup a desktop environment

DE_STARTUP_IMAGE_DIR=/path/to/image/directory (default: /usr/local/share/pixmaps)

Directory in which to look for DE image files (if absolute path not given in the *.desktop file)

AutoLogin

ENABLE_AUTO_LOGIN=[TRUE/FALSE] (default: FALSE)

Automatically login as a particular user the first time the system starts up
Is NOT used if XDMCP remote logins are enabled

AUTO_LOGIN_USER=username

Username of the user to be logged in automatically

AUTO_LOGIN_DESKTOP=myDE.desktop

*.desktop file for the desktop to be started (absolute path or relative to DE_STARTUP_DIR)

XDMCP Support

ALLOW_REMOTE_LOGIN=[TRUE/FALSE] (default: FALSE)

Initialize the X Server to allow for remote login using the XDMCP protocol
(WARNING: This type of remote connection is inherently insecure. Use with extreme caution!)

Additional Settings

ENABLE_VIEW_PASSWORD_BUTTON=[TRUE/FALSE] (default: TRUE)

Set the interface to allow the user to see the currently typed password if the view password button is held down

Modifying a Theme

(Sample Theme File can be found at /usr/local/share/PCDM/themes/default/default.theme)

A PCDM Theme file sets up all of the image files and sizes, layout all the items on the screen, and set up the appearance or color schemes used by all the items. All the paths to other files may be given as absolute paths (/usr/local/share/PCDM/themes/mytheme/myfile.png), paths relative to IMAGE_DIR (myfile.png becomes IMAGE_DIR/myfile.png), or paths relative to the theme file directory (./myfile.png looks in the same directory as the theme file)

Images and Window Items

IMAGE_DIR=/path/to/image/directory (default: same directory as the theme file)

This option set the default location for all the image files used in this theme, and should always be set at the beginning of the theme file.
Item Descriptions

BACKGROUND: This controls the main window background image

HEADER: (window item) A simple, non-interactive image to be shown alongside the other items

USER: (login item) Default image to be used for the current user (may be customized per-user by creating/changing the file ".loginIcon.png" in the users home directory).

PASSWORD: (login item) Image to use for the password entry field of the login item

LOGIN: (window item) Item that manages the user/password login process. Also doubles as the image to use for the button that starts the login process.

DESKTOP: (window item) Item that displays the available desktop environments and allows the user to select one.

NEXTDE: (desktop item) Image to use for the button the chooses the next desktop environment (generally either an up or right facing arrow, depending on orientation).

PREVIOUSDE: (desktop item) Image to use for the button the chooses the next desktop environment (generally either a down or left facing arrow, depending on orientation).

TOOLBAR: (special window item) A toolbar that contains buttons to other, less-used, features of PCDM.

SYSTEM: (toolbar item) Button that allows for system restart/shutdown operations.

LOCALE: (toolbar item) Button that opens a dialog for changing the system localization (language translations).

KEYBOARD: (toolbar item) Button that opens a dialog for changing the system keyboard layout.

VKEYBOARD: (toolbar item) Button that opens a virtual keyboard display

Item Options

(Replace <ITEM> with the appropriate item name) 1) <ITEM>_IMAGE=myitem.png

This assigns the given image file with the particular item
(Valid Items: BACKGROUND, HEADER, USER, PASSWORD, LOGIN, DESKTOP, SYSTEM, LOCALE, KEYBOARD, VKEYBOARD, NEXTDE, PREVIOUSDE )

2) <ITEM>_IMAGE_SIZE=<width>x<height> (example: 64x64)

This sets the image to display at the size specified (in pixels)
(Valid Items: HEADER, USER, PASSWORD, LOGIN, DESKTOP, TOOLBAR )

3) <ITEM>_DISABLE=[TRUE/FALSE] (default: FALSE)

This removes the item from the PCDM interface
(Valid Items: BACKGROUND, HEADER )
Special Item Options

DESKTOP_ORIENTATION=[horizontal/vertical] (default: horizontal)

Set the desktop selection widget to either be horizontal or vertical.

TOOLBAR_LOCATION=[bottom/top/left/right] (default: bottom)

The edge of the screen on which to place the toolbar.

TOOLBAR_STYLE=[icononly/textonly/textbesideicon/textundericon] (default: icononly)

The image/text combination for all the toolbar items.

Window Layout Configuration

The window items can be placed anywhere that you would like in the theme. This is possible by assigning grid coordinates to each item in the [row,column] format. Grid points start at 0, with increasing numbers, and grid point [0,0] is the top left corner. Items may also span multiple grid points by using a "-" between the start and ending values. The maximum size of the grid is dependent upon the largest grid point number that you utilize. Rows and columns are not evenly spaced, but instead are dynamically resized to fit their contents. It is also possible to add spacers, invisible items that cause their column or row to be expanded in size, provided a method of adding blank space for attractive item layouts.

<ITEM>_LOCATION=[row,column]

Grip point location for the item (example: [0,0-2] means the item will occupy the grip points in the top row, and the three leftmost columns)
(Valid Items: HEADER, LOGIN, DESKTOP )

ADDSPACER=<orientation>::[row,column] (<orientation> should be either "vertical" or "horizontal")

Add a spacer item at the designated row/column grip point with the proper orientation. A horizontal spacer expands the current column, while a vertical spacer will expand the current row.

Advanced Configuration

PCDM can also be completely styled by using a Qt StyleSheet. You can write this stylesheet in the theme file simply by using a couple keywords for PCDM to know when the stylesheet starts and stops. Stylesheets are quite powerful, and can be used to give a customized appearance to the entire interface. You can find a reference on how to write a stylesheet here: http://doc.qt.nokia.com/4.7/stylesheet-reference.html

APP_STYLESHEET_START

This line lets PCDM know that the lines following this are to be used as a Qt StyleSheet for the interface.

APP_STYLESHEET_STOP

This line lets PCDM know that the custom stylesheet is finished.
StyleSheet Example

"QToolBar{ background-color: rgba(253,253,253,100); }"

This sets the background color for the toolbar to a slightly transparent grey.
Important Widgets for stylesheet modification

QToolbar (TOOLBAR)

QToolButton (almost all buttons in PCDM)

QListWidget & QComboBox (user selection boxes)

QLineEdit (Password entry box)

QGroupBox (LOGIN widget background and frame)

QGraphicsView (DESKTOP selection window)

QPushButton (DESKTOP selector buttons)

QLabel (HEADER)

Other languages:German 25% • ‎English 100%