Skip to content
David Lechner edited this page Jul 6, 2017 · 5 revisions

There can unfortunately be a bit to do to get a program running besides just building it.

Bitmap Fonts

GRX3 uses FontConfig for resolving fonts. Most Linux systems have bitmap fonts disabled by default, so GRX3 will fail to find any fonts.

You can either delete /etc/fonts/conf.d/70-no-bitmap-fonts.conf or you can create a personal config file at ~/.config/font-manager/local.conf. Example:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
    <!-- allow bitmap fonts -->
    <selectfont>
        <acceptfont>
            <pattern>
                <patelt name="scalable"><bool>false</bool></patelt>
            </pattern>
        </acceptfont>
    </selectfont>

    <!-- rename helvetica so bitmap font is not used for it -->
    <match>
        <test qual="any" name="family">
            <string>helvetica</string>
        </test>
        <edit name="family" mode="assign">
            <string>arial</string>
        </edit>
    </match>
</fontconfig>

If you notice any strange font problems in other applications, you should revert these changes.

Environment Variables

For troubleshooting, you can view debug messages:

export G_MESSAGES_DEBUG=all

You can override the video driver settings (driver spec docs):

export GRX_DRIVER="gw 320 gh 240 dp 150"

If you have installed the library somewhere other than the default /usr/local/, you will need to set some environment variables.

export INSTALL_DIR=/path/to/install # adjust this value as needed

export LD_LIBRARY_PATH=$INSTALL_DIR/lib
# if you are using the GObject introspection typelib (e.g. python/gjs)
export GI_TYPELIB_PATH=$INSTALL_DIR/lib/girepository-1.0

During development, when the library is not installed at all, you will need to also specify the plugin directory.

export BUILD_DIR=/path/to/build/dir # adjust this value as needed

export GRX_PLUGIN_PATH=$BUILD_DIR/plugins
export LD_LIBRARY_PATH=$BUILD_DIR/src
export GI_TYPELIB_PATH=$BUILD_DIR/src

Desktop Environment

GRX programs can run in a windowed desktop environment.

The Linux Console

  • These programs normally run from the Linux console (aka virtual terminals).
  • These are the terminals you access using ALT+CTRL+F1, ALT+CTRL+F2, etc.
  • This means they will not work from a remote ssh terminal and they will not work from a local terminal in a window manager.
  • To run programs remotely, use console-runner.

Permissions

  • You must be a member of the video group to write to the framebuffer device (i.e. /dev/fb0).

      sudo chmod -aG video $USER
      newgrp video # or log out and log back in
    
  • You must be root to remotely manipulate the Linux console (e.g. from a remote SSH terminal).