File Type Rules and Custom Icons for IRIX

thor

New member
Oct 7, 2019
5
8
3
If you run into the error message "Could not find a file typing rule to perform the requested action" when double-clicking a program binary, it means that binary is lacking a file type tag. Without that tag, the IRIX file type ruleset won't know how to launch that binary from X.
167

Check the tag of the binary:
Code:
$ tag xhello
xhello is not tagged
Quick solution: tag your binary as generic application:
Code:
$ tag 0x0 xhello
$ tag xhello
xhello is tagged with Octal: 00  Decimal: 0  Hex: 0x0
168

Notice how the icon of the binary changed. On double-click it will launch.

Explanation: Behold /usr/lib/filetype/system/sgicmds.ftr that holds information on how to open the binary, its icon, etc.
Code:
TYPE GenericWindowedExecutable
    MATCH       tag == 0x00000000;
    LEGEND      :216:Unix command
    SUPERTYPE   Executable
    CMD OPEN    $LEADER $REST
    CMD ALTOPEN launch -c "$LEADER $REST"
    CMD DROP    $TARGET $SELECTED
    ICON        {
        if (opened) {
            include("../iconlib/generic.exec.open.fti");
        } else {
            include("../iconlib/generic.exec.closed.fti");
        }
    include("iconlib/windowExec.fti");
    }
If the tag is 0x0 this rule matches and an appropriate icon from the iconlib is selected.
For more, see man ftr

Example buttonfly:
Code:
$ tag /usr/demos/Demo_Interfaces/Buttonfly/buttonflyAudio 
/usr/demos/Demo_Interfaces/Buttonfly/buttonflyAudio is tagged with Octal: 0110204  Decimal: 36996  Hex: 0x9084
There's a rule for tag 0x9084 in /usr/lib/filetype/system/sgidemos.ftr

Code:
TYPE ButtonflyAudio
    MATCH       tag == 0x9084;
    LEGEND      :uxsgidemo:49:Buttonfly
    SUPERTYPE   Executable
    CMD OPEN    cd /usr/demos; $LEADER
    CMD ALTOPEN $LEADER
    ICON {
        if (opened) {
            include("../iconlib/generic.exec.open.fti");
                 include("iconlib/Buttonfly.music.open.fti");
        } else {
            include("../iconlib/generic.exec.closed.fti");
                 include("iconlib/Buttonfly.music.closed.fti");
        }

    }
Your own rules should go into /usr/lib/filetype/local/

For more see IRIX: system: IRIX: Creating File Typing Rules (FTRs)
 

stormy

Active member
Jun 23, 2019
133
55
28
If you run into the error message "Could not find a file typing rule to perform the requested action" when double-clicking a program binary, it means that binary is lacking a file type tag. Without that tag, the IRIX file type ruleset won't know how to launch that binary from X.
Thank you for this excellent explanation! Really appreciate you going to all the trouble of making screenshots and step-by-step.
 

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu