SVG (Scalable Vector Graphics) is an open standard used to describe two-dimensional vector graphics. It is great for diagrams and shapes, while PNGs are better for photographs. SVG files are a bit like instructions on how to make an image. This means that they can be resized without looking pixelated or blocky.
An excellent tool with which to create SVG images for use in Tux Paint is Inkscape, a high-quality Open Source interactive drawing program available for Windows, macOS, and Linux. There are also other applications that can produce SVGs, both free/open source, and commerical/proprietary.
If you wish to add or change things like Brushes, Starters, Rubber Stamps, and other content used by Tux Paint, you can do so fairly easily by simply adding, changing, or removing files where Tux Paint looks for them.
💡Note: You'll need to re-launch Tux Paint for the changes to take effect.
Tux Paint looks for its various data files in its 'data' directory.
Linux and Unix
Where this directory goes depends on what value was set for "DATA_PREFIX" when Tux Paint was built. See 'Install documentation' for details.
By default, though, the directory is:
/usr/local/share/tuxpaint/
If you installed from a package, it is more likely to be:
/usr/share/tuxpaint/
Windows
Tux Paint looks for a directory called 'data' in the same directory as the executable. This is the directory that the installer used when installing Tux Paint e.g.:
C:\Program Files\TuxPaint\data
macOS
Tux Paint stores its data files inside the "Tux Paint" application icon (which is actually a special kind of folder on macOS & Mac OS X before it). The following steps explain how to get to the folders within it:
Bring up a 'context' menu by holding the [Control] key and clicking the Tux Paint icon the in Finder. (If you have a mouse with more than one button, you can simply right-click the icon.)
Select "Show Contents" from the menu that appears. A new Finder window will appear with a folder inside called "Contents".
Open the "Contents" folder and open the "Resources" folder found inside.
There, you will find various sub-folders, such as "starters", "stamps", "brushes", etc. Adding new content to these folders will make the content available to any user that launches this copy (icon) of Tux Paint.
💡Note: If you install a newer version of Tux Paint and replace or discard the old version, you will lose changes made by following the instructions above, so keep backups of your new content (stamps, brushes, etc.).
Tux Paint also looks for files in a "TuxPaint" folder that you can place in your system's "Application Support" folder (found under "Library" at the root of your filesystem):
/Library/Application Support/TuxPaint/
When you upgrade to a newer version of Tux Paint, the contents of this "TuxPaint" folder will stay the same, and remain accessible by all users of Tux Paint.
Your personal Tux Paint files go into a 'hidden directory' found in your account's home directory: "$(HOME)/.tuxpaint/" (also known as "~/.tuxpaint/").
That is, if your home directory is "/home/tux", then your personal Tux Paint files go in "/home/tux/.tuxpaint/".
Don't forget the period (".") before the "tuxpaint"!
To add your own brushes, stamps, 'starters,' templates, and fonts, create subdirectories under your personal Tux Paint directory named "brushes", "stamps", "starters", "templates", "fonts", respectively.
(For example, if you created a brush named "flower.png", you would put it in "~/.tuxpaint/brushes/" under Linux or Unix.)
The brushes used for drawing with the 'Brush' and 'Lines' tools in Tux Paint are simply PNG image files.
The alpha (transparency) of the PNG image is used to determine the shape of the brush, which means that the shape can be 'anti-aliased' and even partially-transparent!
Greyscale pixels in the brush PNG will be drawn using the currently-selected color in Tux Paint. Color pixels will be tinted.
Aside from a graphical shape, brushes can also be given other attributes. To do this, you need to create a 'data file' for the brush.
A brush's data file is simply a plain ASCII text file containing the options for the brush.
The file has the same name as the PNG image, but a ".dat" extension. (e.g., "brush.png"'s data file is the text file "brush.dat", found in the same directory.)
Brush Spacing
As of Tux Paint version 0.9.16, you can now specify the spacing for brushes (that is, how often they are drawn). By default, the spacing will be the brush's height, divided by 4.
Add a line containing the line "spacing=N" to the brush's data file, where "N" is the spacing you want for the brush. (The lower the number, the more often the brush is drawn.)
Animated Brushes
As of Tux Paint version 0.9.16, you may now create animated brushes. As the brush is used, each frame of the animation is drawn.
Lay each frame out across a wide PNG image. For example, if your brush is 30x30 and you have 5 frames, the image should be 150x30.
Add a line containing the line "frames=N" to the brush's data file, where "N" is the number of frames in the brush.
⚙Note: If you'd rather the frames be flipped through randomly, rather than sequentially, also add a line containing "random" to the brush's data file.
Directional Brushes
As of Tux Paint version 0.9.16, you may now create directional brushes. As the brush is used, different shapes are drawn, depending on the direction the brush is going.
The directional shapes are divided into a 3x3 square in a PNG image. For example, if your brush is 30x30, the image should be 90x90, and each of the direction's shapes placed in a 3x3 grid. The center region is used for no motion. The top right is used for motion that's both up, and to the right. And so on.
Add a line containing the word "directional" to the brush's data file.
Rotating Brushes
As of Tux Paint version 0.9.27, you may now create rotating brushes. As the brush is used, it is rotated 360 degrees, depending on the direction the brush is going.
Add a line containing the word "rotate" to the brush's data file.
Animated Directional or Rotating Brushes
You may mix both animated and either directional or rotating features into one brush. Use both options desired ("frames=N" and "directional" or "rotate"), in separate lines in the brush's ".dat" file.
For directional brushes, lay the brush out so that each 3x3 set of directional shapes are laid out across a wide PNG image. For example, if the brush is 30x30 and there are 5 frames, it would be 450x90. (The leftmost 150x90 pixels of the image represent the 9 direction shapes for the first frame, for example.)
Place the brush image PNGs (and any data text files) in the "brushes" directory.
💡Note: If your new brushes all come out as solid squares or rectangles, it's because you forgot to use alpha transparency! See the 'PNG documentation' in Tux Paint for more information and tips.
All stamp-related files go in the "stamps" directory. It's useful to create subdirectories and sub-subdirectories there to organize the stamps. (For example, you can have a "holidays" folder with "halloween" and "christmas" sub-folders.)
Rubber Stamps in Tux Paint can be made up of a number of separate files. The one file that is required is, of course, the picture itself.
As of Tux Paint version 0.9.17, Stamps may be either PNG bitmap images or SVG vector images. They can be full-color or greyscale. The alpha (transparency) channel of PNGs is used to determine the actual shape of the picture (otherwise you'll stamp a large rectangle on your drawings).
PNGs can be any size, and Tux Paint (by default) provides a set of sizing buttons to let the user scale the stamp up (larger) and down (smaller).
SVGs are vector-based, and will be scaled appropriately for the canvas size being used in Tux Paint.
💡Note: If your new PNG-based stamps all come out as solid squares or rectangles, it's because you forgot to use alpha transparency! See the 'PNG documentation' in Tux Paint for more information and tips.
💡Note: If your new SVG stamps seem to have a lot of whitespace, make sure the SVG 'document' is no larger than the shape(s) within. If they are being clipped, make sure the 'document' is large enough to contain the shape(s). See the 'SVG documentation' in Tux Paint for more information and tips.
⚙Advanced Users: The 'Advanced Stamps How-To' document describes, in detail, how to make PNG images which will scale perfectly when used as stamps in Tux Paint.
Tux Paint will display descriptive text when a stamp is selected. These are placed in plain text files with the same name as the PNG or SVG, but with a ".txt" filename extension. (e.g., "stamp.png"'s description is stored in "stamp.txt" in the same directory.)
The first line of the text file will be used as the US English description of the stamp's image. It must be encoded in UTF-8.
Localization Support
Additional lines can be added to the text file to provide translations of the description, to be displayed when Tux Paint is running in a different locale (like French or Spanish).
The beginning of the line should correspond to the language code of the language in question (e.g., "fr" for French, and "zh_TW" for Traditional Chinese), followed by ".utf8=" and the translated description (Unicode, encoded in UTF-8).
For Tux Paint developers: There are scripts in the "po" directory for converting the text files to PO format (and back) for easy translation to different languages. Therefore you should never add or change translations in the ".txt" files directly.
If no translation is available for the language Tux Paint is currently running in, the US English text is used.
Windows のユーザー
Use NotePad or WordPad to edit/create these files. Be sure to save them as plain-text, and make sure they have a ".txt" extension at the end of the filename.
Tux Paint can play a sound effect when a stamp is selected. For example, the sound of a duck quaking when selecting a duck, or a brief piece of music when a musical instrument is chosen. Files may be in "WAVE (".wav")" or "OGG Vorbis (".ogg")" formats, and are given same name as the PNG or SVG image. (e.g., "stamp.svg"'s sound effect is the sound file "stamp.ogg" in the same directory.)
Localization Support
For sounds for different locales (e.g., if the sound is someone saying a word, and you want translated versions of the word said), also create WAV or OGG files with the locale's label in the filename, in the form: "stamp_LOCALE.EXT"
The sound effect that will be played when the stamp corresponding to the image file "stamp.png" is selected, and when Tux Paint is using the Spanish locale, would be "stamp_es.wav". Under the French locale, it would be "stamp_fr.wav". Under the Brazilian Portuguese locale, "stamp_pt_BR.wav". And so on...
If no localized sound effect can be loaded, Tux Paint will attempt to load the 'default' sound file. (e.g., "stamp.wav")
💡Note: Also consider using descriptive sounds; see 'Stamp Descriptive Sound', below.
Tux Paint can also play a descriptive sound when a stamp is selected. For example, the sound of someone saying the word "duck" when selecting a duck, or the name of a musical instrument when one is chosen. Files may be in "WAVE (".wav")" or "OGG Vorbis (".ogg")" formats, and are given same name as the PNG or SVG image, with "_desc" at the end. (e.g., "stamp.svg"'s descriptive sound is the sound file "stamp_desc.ogg" in the same directory.)
Localization Support
For descriptive sounds for different locales, also create WAV or OGG files with both "_desc" and the locale's label in the filename, in the form: "stamp_desc_LOCALE.EXT"
The descriptive sound that will be played when the stamp corresponding to the image file "stamp.png" is selected, and when Tux Paint is using the Spanish locale, would be "stamp_desc_es.wav". Under the French locale, it would be "stamp_desc_fr.wav". Under the Brazilian Portuguese locale, "stamp_desc_pt_BR.wav". And so on...
If no localized descriptive sound can be loaded, Tux Paint will attempt to load the 'default' sound file. (e.g., "stamp_desc.wav")
Aside from a graphical shape, a textual description, a sound effect, and a descriptive sound, stamps can also be given other attributes. To do this, you need to create a 'data file' for the stamp.
A stamp's data file is simply a plain ASCII text file containing the options for the stamp.
The file has the same name as the PNG or SVG image, but a ".dat" extension. (e.g., "stamp.png"'s data file is the text file "stamp.dat", found in the same directory.)
Colored Stamps
Stamps can be made to be either "colorable" or "tintable."
Colorable
"Colorable" stamps they work much like brushes - you pick the stamp to get the shape, and then pick the color you want it to be. (Symbol stamps, like the mathematical and musical ones, are an example.)
Nothing about the original image is used except the transparency (from "alpha" channel). The color of the stamp comes out solid.
Add a line containing the word "colorable" to the stamp's data file.
Tinted
"Tinted" stamps are similar to "colorable" ones, except the details of the original image are kept. (To put it technically, the original image is used, but its hue is changed, based on the currently-selected color.)
Add a line containing the word "tintable" to the stamp's data file.
Tinting Options:
Depending on the contents of your stamp, you might want to have Tux Paint use one of a number of methods when tinting it. Add one of the following lines to the stamp's data file:
Normal tinter — "tinter=normal" (the default)
This is the normal tinting mode. First, the primary hue of the stamp is determined. (For example, a picture of a flower with a stem will have the petal color seen as the primary hue of the overall image.) Next, the most highly saturated part of the picture is found. With "normal tinter", the range of hue used to do this starts out within ±18° of the pimary hue found in step 1. (If none can be found, it widens the range by 50% and tries again.) Finally, the image is tinted. Anything falling within 50% of the range (e.g., ±27°) is altered to have the hue of the color chosen by the user.
Narrow tinter — "tinter=narrow"
This like the "normal" option described above, but starts a narrower hue range of ±6°. Anything found within 50% of the range (e.g. ±9°) is tinted. If too much of your stamp is being tinted, try this option.
'Any hue' tinter — "tinter=anyhue"
This remaps all hues in the stamp. It works similarly to the "anyhue" and "narrow" options described above, but the hue range is ±180°.
Vector tinter — "tinter=vector"
This maps 'black through white' to 'black through destination'.
Unalterable Stamps
By default, a stamp can be flipped upside down, shown as a mirror image, or both. This is done using the control buttons below the stamp selector, at the lower right side of the screen in Tux Paint.
Sometimes, it doesn't make sense for a stamp to be flippable or mirrored; for example, stamps of letters or numbers. Sometimes stamps are symmetrical, so letting the user flip or mirror them isn't useful.
To prevent a stamp from being flipped vertically, add the option "noflip" to the stamp's data file.
To prevent a stamp from being mirrored horizontally, add the option "nomirror" to the stamp's data file.
スタンプの初期サイズ
By default, Tux Paint assumes that your stamp is sized appropriately for unscaled display on a 608x472 canvas. This was the original Tux Paint canvas size, provided by a 640x480 screen. Tux Paint will then adjust the stamp according to the current canvas size and, if enabled, the user's stamp size controls.
If your stamp would be too big or too small, you can specify a scale factor. If your stamp would be 2.5 times as wide (or tall) as it should be, add one of the following options, which represent the same adjustment, to the stamp's data file. (An equals sign, "=", may be included after the word "scale".)
"scale 40%"
"scale 5/2"
"scale 2.5"
"scale 2:5"
Windows のユーザー
Use NotePad or WordPad to edit/create these files. Be sure to save them as plain-text, and make sure they have a ".txt" extension at the end of the filename.
In some cases, you may wish to provide a pre-drawn version of a stamp's mirror-image, flipped image, or even both. For example, imagine a picture of a fire truck with the words "Fire Department" written across the side. You probably do not want that text to appear backwards when the image is flipped!
To create a mirrored version of a stamp that you want Tux Paint to use, rather than mirroring one on its own, simply create a second ".png" or ".svg" graphics file with the same name, except with "_mirror" before the filename extension.
For example, for the stamp "stamp.png" you would create another file named "stamp_mirror.png", which will be used when the stamp is mirrored (rather than using a backwards version of "stamp.png").
As of Tux Paint 0.9.18, you may similarly provide a pre-flipped image with "_flip" in the name, and/or an image that is both mirrored and flipped, by naming it "_mirror_flip".
💡Note: If the user flips and mirrors an image, and a pre-drawn "_mirror_flip" doesn't exist, but either "_flip" or "_mirror" does, it will be used, and mirrored or flipped, respectively.
The fonts used by Tux Paint are TrueType Fonts (TTF).
Simply place them in the "fonts" directory. Tux Paint will load the font and provide four different sizes in the 'Letters' selector when using the 'Text' and 'Label' tools.
'Starter' images appear in the 'New' dialog, along with solid color background choices.
When you use a 'starter' image, make modifications, and save it, the original 'starter' image is not overwritten. Additionally, as you edit your new picture, the contents of the original 'starter' can affect it.
The most basic kind of 'starter' is similar to a picture in a coloring book. It's an outline of a shape which you can then color in and add details to. In Tux Paint, as you draw, type text, or stamp stamps, the outline remains 'above' what you draw. You can erase the parts of the drawing you made, but you can't erase the outline.
To create this kind of 'starter' image, simply create an outlined black and white picture in a paint program, and save it as a raster PNG file, or vector SVG. If saving as a PNG, you may optionally render the image as black-and-transparent, rather than black-and-white, but (as of Tux Paint 0.9.21) this is not required.
Along with the 'coloring-book' style overlay, you can also provide a separate background image as part of a 'starter' picture. The overlay acts the same: it can't be drawn over, erased, or affected by 'Magic' tools. However, the background can be!
When the 'Eraser' tool is used on a picture based on this kind of 'starter' image, rather than turning the canvas to a solid color, such as white, it returns that part of the canvas to the original background picture from the 'starter' image.
By creating both an overlay and a background, you can create a 'starter' which simulates depth. Imagine a background that shows the ocean, and an overlay that's a picture of a reef. You can then draw (or stamp) fish in the picture. They'll appear in the ocean, but never 'in front of' the reef.
To create this kind of 'starter' picture, simply create an overlay (with transparency) and save it as a PNG. Then create another image (without transparency), and save it with the same filename, but with "-back" (short for 'background') appended to the name. (e.g., "starter-back.png" would be the background ocean picture that corresponds to the overlay, or foreground.)
For best results, 'starter' images should be at least the same size as Tux Paint's drawing canvas. (See the "Loading Other Pictures into Tux Paint" section of Tux Paint's main documentation (README) for details on sizing.) If they are not, they will be stretched or scaled. This is done without affecting the shape ("aspect ratio"); however some smudging may be applied to the edges.
Place them in the "starters" directory. When the 'New' dialog is accessed in Tux Paint, the 'starter' images will appear in the screen that appears, after the various solid color choices.
💡Note: 'Starters' are 'attached' to saved pictures, via a small text file that has the same name as the saved file, but with ".dat" as the extension. This allows it to continue to affect the drawing even after Tux Paint has been quit, or another picture is loaded or a new image is created. (In other words, if you base a drawing on a 'starter' image, it will always be affected by it.)
'Template' images also appear in the 'New' dialog, along with solid color background choices and 'Starters'. (Note: Tux Paint prior to version 0.9.22 did not have the 'Template' feature.)
Unlike pictures drawn in Tux Paint by users and then opened later, opening a 'template' creates a new drawing. When you save, the 'template' image is not overwritten. Unlike 'starters', there is no immutable 'layer' above the canvas. You may draw over any part of it.
When the 'Eraser' tool is used on a picture based on this kind of 'template' image, rather than turning the canvas to a solid color, such as white, it returns that part of the canvas to the original background picture from the 'template' image.
'Templates' are simply image files (in PNG, JPEG, SVG, or KPX (KidPix) format). No preparation or conversion should be required.
For best results, 'template' images should be at least the same size as Tux Paint's drawing canvas. (See the "Loading Other Pictures into Tux Paint" section of Tux Paint's main documentation (README) for details on sizing.) If they are not, they will be stretched or scaled. This is done without affecting the shape ("aspect ratio"); however some smudging may be applied to the edges.
Place them in the "templates" directory. When the 'New' dialog is accessed in Tux Paint, the 'template' images will appear in the screen that appears, after the various solid color choices.
💡Note: 'Templates' are 'attached' to saved pictures, via a small text file that has the same name as the saved file, but with ".dat" as the extension. This allows it to continue to affect the drawing even after Tux Paint has been quit, or another picture is loaded or a new image is created. (In other words, if you base a drawing on a 'template' image, it will always be affected by it.)
Tux Paint supports numerous languages, thanks to use of the "gettext" localization library. (See "Options documentation" for how to change locales in Tux Paint.)
To translate Tux Paint to a new language, copy the translation template file, "tuxpaint.pot" (found in Tux Paint's source code, in the folder "src/po/"). Rename the copy as a ".po" file, with an appropriate name for the locale you're translating to (e.g., "es.po" for Spanish; or "pt_BR.po" for Brazilian Portuguese, versus "pt.po" or "pt_PT.po" for Portuguese spoken in Portugal.)
Open the newly-created ".po" file — you can edit in a plain text edtior, such as Emacs, Pico or VI on Linux, or NotePad on Windows. The original English text used in Tux Paint is listed in lines starting with "msgid". Enter your translations of each of these pieces of text in the empty "msgstr" lines directly below the corresponding "msgid" lines. (Note: Do not remove the quotes.)
Example:
msgid "Smudge"
msgstr "Manchar"
msgid "Click and drag to draw large bricks."
msgstr "Haz clic y arrastra para dibujar ladrillos grandes."
Various tools exist to manage gettext translation catalogs, so you don't have to edit them by hand in a text editor. Here are a few:
💡Note: It is best to always work off of the latest Tux Paint text catalog template ("tuxpaint.pot"), since new text is added, and old text is occasionally changed. The text catalog for the upcoming, unreleased version of Tux Paint can be found in Tux Paint's Git repository (see: https://tuxpaint.org/download/source/git/), and on the Tux Paint website at https://tuxpaint.org/help/po/.
To edit an existing translation, download the latest ".po" file for that language, and edit it as described above.
Alternatively, if you have an account with SourceForge.net, you can request to be added to the "tuxpaint" project and receive write-access to the Git source code repository so that you may commit your changes directly.
💡Note: Support for new locales requires making additions to Tux Paint's source code ("/src/i18n.h" and "/src/i18n.c"), and requires updates to the Makefile, to ensure the ".po" files are compiled into ".mo" files, and available for use at runtime.
Tux Paint's 'Text' and 'Label' tools can provide alternative input methods for some languages. For example, when Tux Paint is running with a Japanese locale, the right [Alt] key can be pressed to cycle between Latin, Romanized Hiragana and Romanized Katakana modes. This allows native characters and words to be entered into the 'Text' and 'Label' tools by typing one or more keys on a keyboard with Latin characters (e.g., a US QWERTY keyboard).
To create an input method for a new locale, create a text file with a name based on the locale (e.g., "ja" for Japanese), with ".im" as the extension (e.g., "ja.im").
The ".im" file can have multiple character mapping sections for different character mapping modes. For example, on a Japanese typing system, typing [K][A] in Hiragana mode generates a different Unicode character ("か") than typing [K][A] in Katakana mode ("カ").
List the character mappings in this file, one per line. Each line should contain (separated by whitespace):
the Unicode value of the character, in hexadecimal (more than one character can be listed, separated by a colon (':'), this allowing some sequences to map to words)
the keycode sequence (the ASCII characters that must be entered to generate the Unicode character)
a flag (or "-" if none)
Start additional character mapping sections with a line containign the word "section".
Example:
# Hiragana
304B ka -
304C ga -
304D ki -
304E gi -
304D:3083 kya -
3063:305F tta -
# Katakana
section
30AB ka -
30AC ga -
30AD ki -
30AE gi -
⚙Note: Blank lines within the ".im" file will be ignored, as will any text following a "#" (pound/hash) character — it can be used to denote comments, as seen in the example above.
💡Note: Meanings of the flags are locale-specific, and are processed by the language-specific source code in "src/im.c". For example, "b" is used in Korean to handle Batchim, which may carry over to the next character.
💡Note: Support for new input methods requires making additions to Tux Paint's source code ("/src/im.c"), and requires updates to the Makefile, to ensure the ".im" files are available for use at runtime.
As of version 0.9.22, Tux Paint's 'Text' and 'Label' tools can present an on-screen keyboard that allows the pointer (via a mouse, eye-tracking systems, etc.) to be used to input characters. Files that describe the layout and available keys are stored in Tux Paint "osk" directory. Each keyboard layout is defined by a number of files (some of which may be shared by different layouts).
We'll use the QWERTY keyboard as an example:
Layout overview file ("qwerty.layout")
This is a text file that specifies the other files used to describe the layout and key mappings.
⚙Note: Blank lines within the ".layout" file will be ignored, as will any text following a "#" (pound/hash) character — it can be used to denote comments, as seen in the example above.
The "keyboardlist" line describes which layouts to switch to, when the user clicks the left and right buttons on the keyboard. (See below.)
Keyboard layout file ("qwerty.h_layout")
This describes how big the keyboard is (as a "width × height" grid), and lists each key with its numeric keycode (see the "keymap" file, below), the width it should be drawn at (typically "1.0", to take one space on the keyboard, but in the example below, notice the "TAB" and "SPACE" keys are much wider), the character or text to display on the key, depending on which modifier keys have been pressed (one each for: no modifiers, [Shift], [AltGr], and [Shift] + [AltGr]), and finally whether or not the key is affected by the [CapsLock] key (use "1") or [AltGr] (alternate graphics) key (use "2"), or not at all (use "0").
KEY 23 1.5 TAB TAB TAB TAB 0
KEY 24 1.0 q Q ä Ä 1
KEY 25 1.0 w W å Å 1
KEY 26 1.0 e E é É 1
KEY 27 1.0 r R ® ® 1
...
NEWLINE
# Arrow to left will change to the previous keyboard
KEY 2 1.0 <- <- <- <- 0
KEY 133 2.0 Cmp Cmp Cmp Cmp 0
# The ALT or ALTGR keys are used in im to switch the input mode
KEY 64 2.0 Alt Alt Alt Alt 0
# Space
KEY 65 7.0 SPACE SPACE SPACE SPACE 0
KEY 108 2.0 AltGr AltGr AltGr AltGr 0
# Arrow to right will change to the next keyboard
KEY 1 1.0 -> -> -> -> 0
Notice here that alphabetic keys ([Q], [W], etc.) will be affected by [CapsLock], while numeric keys ([1], [2], etc.), [Space], and so on, will not.
Keycodes up to "8" are reserved for internal use. The ones currently used are described below.
0 —
empty button
1 —
next layout (per the layout file's "keyboardlist" setting)
2 —
previous layout (per the layout file's "keyboardlist" setting)
Keymap file ("us-intl-altgr-dead-keys.keymap")
This file defines which numeric keycodes (seen in the keyboard layout files, such as "qwerty.h_layout" described above) should be mapped to which actual characters that an application such as Tux Paint expects to receive when keys (e.g., on a real keyboard) are pressed.
If you're using an operating system such as Linux, which runs X-Window and has the "xmodmap" command-line tool available, you can run it with the ("print keymap expressions" option, "-pke", to generate a keymap file.
keycode 9 = Escape NoSymbol Escape Escape
keycode 10 = 1 exclam exclamdown onesuperior 1 exclam 1
exclam NoSymbol onesuperior
keycode 11 = 2 at twosuperior dead_doubleacute 2 at 2
at onehalf twosuperior
keycode 12 = 3 numbersign periodcentered threesuperior
dead_macron periodcentered
...
keycode 52 = z Z ae AE Arabic_hamzaonyeh asciitilde
guillemotright NoSymbol Greek_zeta Greek_ZETA U037D
U03FF
keycode 53 = x X x X Arabic_hamza Arabic_sukun
guillemotleft NoSymbol Greek_chi Greek_CHI rightarrow
leftarrow
keycode 54 = c C copyright cent Arabic_hamzaonwaw
braceright Greek_psi Greek_PSI copyright
keycode 55 = v V v V Arabic_ra braceleft Greek_omega
Greek_OMEGA U03D6
keycode 56 = b B b B UFEFB UFEF5 Greek_beta Greek_BETA
U03D0
keycode 57 = n N ntilde Ntilde Arabic_alefmaksura
Arabic_maddaonalef Greek_nu Greek_NU U0374 U0375
keycode 58 = m M mu mu Arabic_tehmarbuta apostrophe
Greek_mu Greek_MU U03FB U03FA
keycode 59 = comma less ccedilla Ccedilla Arabic_waw
comma comma less guillemotleft
keycode 60 = period greater dead_abovedot dead_caron
Arabic_zain period period greater guillemotright
periodcentered
keycode 61 = slash question questiondown dead_hook
Arabic_zah Arabic_question_mark slash question
keycode 62 = Shift_R NoSymbol Shift_R Shift_R
...
Composemap file ("en_US.UTF-8_Compose")
This file describes single characters that can be composed by multiple inputs. For example, "[Compose]" followed by "[A]" and "[E]" can be used to create the "æ" character.
This file (which is a C programming language header file) is also from the X Window System. It defines the Unicode values of each keycap (e.g., "XK_equal" corresponds to "U+003D", for the character "=" ("EQUALS SIGN").
💡Note: This file is not compiled into Tux Paint, but is read and parsed at runtime.
It is unlikely that any modification will be required of this file.
Tux Paint requires the Simple DirectMedia Layer Library (libSDL), an Open Source multimedia programming library available under the GNU Lesser General Public License (LGPL).
Along with libSDL, Tux Paint depends on a number of other SDL 'helper' libraries: SDL_Image (for graphics files), SDL_gfx (for some graphical functions, like rotation), SDL_TTF and (optionally) SDL_Pango (for True Type Font support) and, optionally, SDL_Mixer (for sound effects).
Linux/Unix
The SDL libraries are available as source-code, or as RPM or Debian packages for various distributions of Linux. They can be downloaded from:
They are also typically available along with your Linux distribution (e.g. on an installation media, or available via package maintainance software like Debian's "apt").
💡Note: When installing libraries from packages, be sure to ALSO install the development versions of the packages. (For example, install both "SDL-1.2.4.rpm" and "SDL-1.2.4-devel.rpm".)
Tux Paint also takes advantage of a number of other free, LGPL'd libraries. Under Linux, just like SDL, they should either already be installed, or are readily available for installation as part of your Linux distribution.
libPNG
Tux Paint uses PNG (Portable Network Graphics) format for its data files. SDL_image will require libPNG be installed.
Tux Paint uses your system's locale settings along with the "gettext" library to support various languages (e.g., Spanish). You'll need the gettext library installed.
As of Tux Paint 0.9.17, Tux Paint can determine your system's default paper size (e.g., A4 or Letter), or can be told to use a particular paper size, thanks to "libpaper".
As of Tux Paint 0.9.17, Tux Paint can load SVG (Scalable Vector Graphics) images as stamps. Two sets of libraries are supported, and SVG support can be completely disabled (via "make SVG_LIB:=")
NetPBM Tools (optional) No longer used, by default
📜 Under Linux and Unix, earlier versions of Tux Paint used the NetPBM tools to assist with printing. (A PNG is generated by Tux Paint, and converted into a PostScript using the 'pngtopnm' and 'pnmtops' NetPBM command-line tools.)
Tux Paint is released under the GNU General Public License (GPL) (see "COPYING.txt" for details), and therefore the 'source code' to the program is available freely.
As of February 2005 (starting with Tux Paint 0.9.15), the "Makefile" includes support for building on a Windows system using MinGW/MSYS (https://sourceforge.net/projects/msys2/).
Many tools and libraries are required to build Tux Paint. The package management system "pacman" helps you install them automatically solving complicated dependencies.
Open the MSYS2 shell from the "Start Menu" -> "MSYS2 64bit" -> "MSYS2 MSYS" and execute following command (press [Enter] or [Return] to accept the defaults for all questions):
pacman -Syu
This will update core system and the window will close automatically. Repeat the steps above one more time to finish the remaining update process.
Within the MSYS2 shell, run the following command to install basic development tools:
pacman -S make automake-wrapper autoconf-wrapper libtool git zip patch gperf
"ntldd" is a small tool which examine windows executable files to list Dynamic Link Library (.dll) files they depends on. Tux Paint's packaging process for binary distribution uses it to find required .dll files.
64bit (x86_64) dependency libraries for Tux Paint and Tux Paint Config
You can install tools and libraries required for compiling Tux Paint and Tux Paint Config on MSYS2/MINGW using "pacman" except for SDL_mixer, SDL_Pango and libunibreak.
FLTK is a cross-platform GUI toolkit used by "Tux Paint Config". You can skip installing it if you are only building "Tux Paint".
$ tar zxvf SDL_Pango-0.1.2.tar.gz
$ cd SDL_Pango-0.1.2/
$ patch -p0 < ../SDL_Pango-configure-extra-api.patch
$ ./configure --prefix=/mingw64 && make && make install
libunibreak
libunibreak is required for compiling Tux Paint Config. You can skip installing it if you are only building "Tux Paint".
You can fetch the source code from the git repositry and compile it as follows.
$ git clone https://github.com/adah1972/libunibreak libunibreak
$ cd libunibreak
$ ./augogen.sh --prefix=/mingw64 && make && make install
Within the MSYS2 shell, run the following command to install 32bit compiler and basic development tools:
pacman -S mingw-w64-i686-{gcc,pkgconf,ntldd-git}
"ntldd" is a small tool which examine windows executable files to list Dynamic Link Library (.dll) files they depends on. Tux Paint's packaging process for binary distribution uses it to find required .dll files.
32bit (i686) dependency libraries for Tux Paint and Tux Paint Config
You can install tools and libraries required for compiling Tux Paint and Tux Paint Config on MSYS2/MINGW using "pacman" except for SDL_mixer, SDL_Pango and libunibreak.
FLTK is a cross-platform GUI toolkit used by "Tux Paint Config". You can skip installing it if you are only building "Tux Paint".
$ tar zxvf SDL_Pango-0.1.2.tar.gz
$ cd SDL_Pango-0.1.2/
$ patch -p0 < ../SDL_Pango-configure-extra-api.patch
$ ./configure --prefix=/mingw32 && make && make install
libunibreak
libunibreak is required for compiling Tux Paint Config. You can skip installing it if you are only building "Tux Paint".
You can fetch the source code from the git repositry and compile it as follows.
$ git clone https://github.com/adah1972/libunibreak libunibreak
$ cd libunibreak
$ ./augogen.sh --prefix=/mingw32 && make && make install
ImageMagick is a compilation of command line tools to create, edit, compose, or convert bitmap images supporting quite a large number of image formats. Tux Paint uses two functions ("convert" and "composite") in it to generate thumbnails for startar images and templates during the build process.
Using official binary release available from "Windows Binary Release" is recommended, due to the commands installed with "pacman" on MinGW/MSYS not working as expected!
Do not forget to enable "Install legacy utilities (e.g. convert)" while installing it, because Tux Paint's build process uses them.
Add the path to the directory in which ImageMagick is installed at the top of your "PATH" environment variable. For example:
You can make this permanent by adding the above to your the BASH shell configuration file, "~/.bash_profile".
Tux Paint
You can compile 64bit binaries using MSYS2 64bit shell, and 32bit binaries using MSYS2 32bit shell, respectively.
Select "MSYS2 64bit" -> "MSYS2 MinGW 64-bit" from the "Start Menu" to open the 64bit shell.
Select "MSYS2 64bit" -> "MSYS2 MinGW 32-bit" from the "Start Menu" to open the 32bit shell.
Compile Tux Paint with the following command:
$ make bdist-win32
💡Note: At this point, you will want to build "Tux Paint Config." for Windows, so it can be included along with "Tux Paint", if you're making an official (or test) release. The build process will look for it in a directory named "tuxpaint-config" (with no version number, e.g., "tuxpaint-config-X.Y.Z"). See "Tux Paint Config."'s INSTALL.txt documentation for details.
All the files needed for starting Tux Paint (and Tux Paint Config.) are collected in the directory for binary distribution "bdist" directory under "win32". You can start them by double-clicking their executable (.exe) files in the "bdist" directory.
Building the Tux Paint Windows Installer
Inno Setup is used to build executable installer for Tux Paint. Therefore you have to install it in the first place.
Inno Setup officially supports translations for only about 20 languages. However, one of the great points of Tux Paint is it supports so many languages. Therefore, the set up script "tuxpaint.iss" to build the installer is written to use much more translations including unofficial one which are available on "Inno Setup Translations". You have to download translation files (.isl) required and put them in "Languages" directory under the directory in which Inno Setup is installed.
Before building an installer, edit the "tuxpaint.iss" file and enable one of the lines starting with "#define BuildTarget=", depending on the architecture of the installer you want to create.
Then, you can easily build an executable installer by right-clicking on the "tuxpaint.iss" icon in the "win32" directory and selecting "Compile" on the list. It will run for a while, and eventually you will find a "tuxpaint-X.Y.Z-windows-<arch>-installer.exe" file in the same directory.
Running the Tux Paint Windows Installer
Double-click the Tux Paint installer executable (.EXE file) and follow the instructions.
First, you will be asked to read the license. (It is the GNU General Public License (GPL), which is also available as "COPYING.txt".)
You will then be asked whether you want to install shortcuts to Tux Paint in your Windows Start Menu and on your Windows Desktop. (Both options are set by default.)
Then you will be asked where you wish to install Tux Paint. The default should be suitable, as long as there is space available. Otherwise, pick a different location.
At this point, you can click 'Install' to install Tux Paint!
Changing the Settings Using the Shortcut
To change program settings, right-click on the TuxPaint shortcut and select 'Properties' (at the bottom).
Make sure the 'Shortcut' tab is selected in the window that appears, and examine the 'Target:' field. You should see something like this:
"C:\Program Files\TuxPaint\TuxPaint.exe"
You can now add command-line options which will be enabled when you double-click the icon.
For example, to make the game run in fullscreen mode, with simple shapes (no rotation option) and in French, add the options (after 'TuxPaint.exe'), like so:
"C:\Program Files\TuxPaint\TuxPaint.exe" -f -s --lang french
(See the main documentation for a full list of available command-line options.)
If you make a mistake or it all disappears use [Control] + [Z] to undo or just hit the [Esc] key and the box will close with no changes made (unless you pushed the "Apply" button!).
When you have finished, click "OK."
If Something Goes Wrong
If, when you double-click on the shortcut to run Tux Paint, nothing happens, it is probably because some of these command-line options are wrong. Open an Explorer like before, and look for a file called "stderr.txt" in the TuxPaint folder.
It will contain a description of what was wrong. Usually it will just be due to incorrect character-case (capital 'Z' instead of lowercase 'z') or a missing (or extra) '-' (dash).
💡Note: Tux Paint does not use autoconf/automake, so there is no "./configure" script to run. Compiling should be straight-forward though, assuming everything Tux Paint needs is installed.
To compile the program from source, simply run the following command from a shell prompt (e.g., "$"):
$ make
Disabling SVG support (and hence Cairo, libSVG, and svg-cairo dependencies):
To disable SVG support (e.g., if your system is not currently supported by the Cairo library or other SVG-related dependencies), you can run "make" with "SVG_LIB= SVG_CFLAGS= NOSVGFLAG=NOSVG" added:
$ make SVG_LIB= SVG_CFLAGS=
Disabling Pango support (and hence Pango, Cairo, etc. dependencies):
📜 Prior to version 0.9.18, Tux Paint used the libSDL_ttf library for rendering text using TrueType Fonts. Since 0.9.18, libSDL_Pango is used, as it has much greater support for internationalization. However, if you wish to disable the use of SDL_Pango, you may do so running "make" with "SDL_PANGO_LIB=" added:
$ make SDL_PANGO_LIB=
Disabling Sound at Compile-time
If you don't have a sound card, or would prefer to build the program with no sound support (and therefore without a the SDL_mixer dependency), you can run "make" with "SDL_MIXER_LIB=" added:
$ make SDL_MIXER_LIB=
Other options
Various other options (e.g., installation paths) may be overridden; see them in "Makefile" for further details.
If you get errors
If you receive any errors during compile-time, make sure you have the appropriate libraries installed (see above). If using packaged versions of the libraries (e.g., RPMs under RedHat or DEBs under Debian), be sure to get the corresponding "-dev" or "-devel" packages as well, otherwise you won't be able to compile Tux Paint (and other programs) from source!
Installng
Assuming no fatal errors occured, you can now install the program so that it can be run by users on the system. By default, this must be done by the "root" user ('superuser'). Switch to "root" by typing the command:
$ su
Enter "root"'s password at the prompt. You should now be "root" (with a prompt like "#"). To install the program and its data files, type:
# make install
Finally, you can switch back to your regular user by exiting superuser mode:
# exit
Alternatively, you may be able to simply use the "sudo" command (e.g., on Ubuntu Linux):
$ sudo make install
💡Note: By default, "tuxpaint", the executable program, is placed in "/usr/local/bin/". The data files (images, sounds, etc.) are placed in "/usr/local/share/tuxpaint/".
Changing Where Things Go
You can change where things will go by setting "Makefile"variables on the command line. "DESTDIR" is used to place output in a staging area for package creation. "PREFIX" is the basis of where all other files go, and is, by default, set to "/usr/local".
Other variables are:
BIN_PREFIX
Where the "tuxpaint" binary will be installed. (Set to "$(PREFIX)/bin" by default - e.g., "/usr/local/bin")
DATA_PREFIX
Where the data files (sound, graphics, brushes, stamps, fonts) will go, and where Tux Paint will look for them when it's run. (Set to "$(PREFIX)/share/tuxpaint")
DOC_PREFIX
Where the documentation text files (the "docs" directory) will go. (Set to "$(PREFIX)/share/doc/tuxpaint")
MAN_PREFIX
Where the manual page for Tux Paint will go. (Set to "$(PREFIX)/share/man")
Where the icons and launchers (for GNOME and KDE) will go.
LOCALE_PREFIX
Where the translation files for Tux Paint will go, and where Tux Paint will look for them. (Set to "$(PREFIX)/share/locale/") (Final location of a translation file will be under the locale's directory (e.g., "es" for Spanish), within the "LC_MESSAGES" subdirectory.)
💡Note: This list is out of date. See "Makefile" and "Makefile-i18n" for a complete list.
Tux Paint 0.9.22 and earlier required building Tux Paint from the Xcode IDE. Starting with 0.9.23, however, Tux Paint for macOS is built as though it were a Linux application.
Prerequisites
Although Tux Paint is built without the Xcode IDE, Xcode itself is still required to build Tux Paint. Download it from the App Store, and launch it once to accept its license agreements. You may also need to install the Xcode command line tools using the command:
xcode-select --install
Building Tux Paint also requires various libraries. We install them from MacPorts where possible, source code otherwise. Install MacPorts to the default /opt/local path according to the instructions found on their website: https://www.macports.org/
ImageMagick
cairo
fribidi
lbzip2
libimagequant*
libpaper
libpng
librsvg
libsdl
libsdl_image
libsdl_mixer
libsdl_pango
libsdl_ttf
libsdl_gfx
pkgconfig
zlib
... but you should install any package that is required by the latest version of Tux Paint.
* Not available from MacPorts as of this writing, see below.
libimagequant
libimagequant is not available from MacPorts as of this writing. It can be installed from the source code as follows. It should be installed to /opt/local (same as MacPorts) for the library to be included in TuxPaint.dmg.
$ sudo port install rust cargo
$ git clone https://github.com/ImageOptim/libimagequant.git
$ cd libimagequant/imagequant-sys
$ cargo build --release # Must use cargo from MacPorts
$ sudo make PREFIX=/opt/local install
WARNING: Having any UNIX-like toolset installed on your Mac besides MacPorts and Xcode, such as Fink or Brew, will prevent your app bundle from being portable. Be sure Fink and Brew are not accessible from your build environment.
How to Build
Simply, run:
% make
% make install
... to create the TuxPaint.app application bundle that can be run in-place or copied to /Applications. To create the DMG file for distribution, use 'make TuxPaint.dmg'.
Additional steps may be required when building for the Apple Silicon. See "Building for Apple Silicon" below.
Known Issues
A macOS binary built on a specific version of macOS only runs on that version of macOS or later. To ensure Tux Paint can run on the oldest version of macOS possible, build it on the oldest version of macOS available. As of this writing we know Tux Paint cannot be built to run on macOS 10.7 or earlier.
See "Old Versions of macOS" below for best-effort instructions on how to obtain, install, and build Tux Paint on an old version of macOS.
Alternatively, Tux Paint and all of its library dependencies may be compiled with appropriate options to be runnable on older versions of macOS. These options are already set on Tux Paint, so only its dependencies (from MacPorts) need to be recompiled. See "Recompiling MacPorts" below for the instructions.
macOS for Intel CPU does allow dual booting of multiple versions of the OS, but it's safer and easier to install the old macOS onto a flash drive. Wherever you're installing it, the target drive's partitioniong scheme and partition type must match what the old macOS expects, so use the Disk Utility to partition and format the flash drive accordingly.
Dual booting multiple versions of macOS for Apple Silicon has been so far unsuccessful. Instead of installing an older version of macOS for Apple Silicon to build Tux Paint to run on the old version of macOS for Apple Silicon, use the instructions found in the "Recompiling MacPorts" section to build Tux Paint to run on older versions of macOS for Apple Silicon.
As of this writing, the oldest version of macOS available on Apple's support site is Yosemite 10.10, which expects "GPT (GUID Partition Table)" partitioning scheme instead of the older MBR scheme, and "Mac OS Extended (Journaled)" as the partition type instead of the newer APFS partition type.
Upon launching the installer, if you get a popup about macOS being too old or new to be installed, a bootable installer can be created using the instructions found here: https://support.apple.com/en-mide/HT201372
Once the old macOS is installed, you may find the Xcode on the App Store is too new to run on the version of the old macOS. Old versions of Xcode can be downloaded from Apple's Developer site in an area accessible with free registration: https://developer.apple.com/download/more/
And because Xcode is being installed manually, you can skip the step to install the Xcode command line tools (do not run "xcode-select --install") but otherwise build Tux Paint using the same steps described in the earlier part of this document.
Recompiling MacPorts
To recompile MacPorts to be usable on older versions of macOS, set the following options in /opt/local/etc/macports/macports.conf:
Then reinstall all MacPorts packages needed by Tux Paint. Also rebuild libimagequant using the updated Cargo package from MacPorts.
As of this writing, all libraries Tux Paint requires from MacPorts can be recompiled in this manner to run on macOS 10.10 Yosemite and later on Intel CPUs, and macOS 11.0 Big Sur and later on Apple Silicon. Unfortunately, although MacPorts has the option to enable the building of universal libraries, several libraries Tux Paint require cannot be built as universal libraries so they can only be built to run natively on the hardware on which they were built. See "Building a Universal Binary" below for instructions on how to build Tux Paint as a Universal Binary.
Building for Apple Silicon
macOS for Applie Silicon requires all native Apple Silicon applications be signed, even if it is signed "ad-hoc" (anonymously). Because of this, compilers that produce native Apple Silicon applications sign all produced binaries and libraries as a part of the compilation process.* However, the Tux Paint compilation process modifies the libraries to be modular (using install_name_tool) so they can be added into the application bundle, which has the unfortunate side effect of breaking the signature. This can be addressed by signing the application bundle ad-hoc (example below) or using your own Apple Developer Identity if you have one. The DMG file, if needed, must be created after signing the App Bundle so the DMG file is created with signed App Bundle:
If you get an error that the application bundle is already signed, remove it before signing::
$ codesign --remove-signature TuxPaint.app
If you plan to combine the Apple Silicon bundle with the Intel CPU bundle to produce the Universal bundle, the code signing must be done after they are combined. See "Building a Universal Binary" below.
Building a Universal Binary
To build Tux Paint as a Universal Binary, compile Tux Paint for the Intel CPU and the Apple Silicon separately first. Then rename the app bundle for the Intel CPU to TuxPaint-x86_64.app, and the bundle for the Apple Silicon to TuxPaint-arm64.app, copy the app bundle from the Intel machine to the Apple Silicon machine, then use the provided build-universal.sh script to combine the two application bundles as below. The produced bundle must be signed (see "Building for Apple Silicon" above for more details). The DMG file, if required, must be built after the signing:
$ macos/build-universal.sh
$ codesign -s - TuxPaint.app
$ make TuxPaint.dmg
⚙ Debugging output — to "STDOUT" on Linux and Unix, to a "stdout.txt" file on Windows, and to the file "/tmp/tuxpaint.log" on macOS — can be enabled by setting "DEBUG" (and, if verbose logging is wanted, "VERBOSE") #defines in "src/debug.h" and (re)compiling Tux Paint.
If you installed the Start Menu shortcuts (the default), then go to the TuxPaint folder and select "Uninstall". A box will be displayed that will confirm that you are about to uninstall Tux Paint and, if you are certain that you want to permanently remove Tux Paint, click on the 'Uninstall' button.
When it has finished, click on the close button.
Using the Control Panel
It is also possible to use the entry "TuxPaint (remove only)" in the Control Panel Add/Remove programs section.
Delete "TuxPaint.app" from the "Applications" folder. Data files, including the configuration files, stamps, and saved pictures, may be found in "Library/Application Support/TuxPaint" (all users) and "/Users/USERNAME/Library/Application Support/TuxPaint" (individual users).
Within the Tux Paint source directory (where you compiled Tux Paint), you can use the "make uninstall" target to uninstall Tux Paint. By default, this must be done by the "root" user ('superuser'), but if you installed Tux Paint somewhere else (e.g., using a "PREFIX=..." setting to "make" and "make install"), you may not, and will want to provide those same settings here. (See the installation instructions above for further information.)
The TrueType Font you're using might have the wrong encoding. If it's 'custom' encoded, for example, you can try running it through FontForge (http://fontforge.sourceforge.net/) to convert it to an ISO-8859 format. (Email us if you need help with special fonts.)
The Rubber Stamp tool is greyed out!
This means that Tux Paint either couldn't find any stamp images, or was asked not to load them.
If you installed Tux Paint, but did not install the separate, optional "Stamps" collection, quit Tux Paint and install it now. It should be available from the same place you got the main Tux Paint program. (Note: As of version 0.9.14, Tux Paint comes with a small collection of example stamps.)
If you don't want to install the default collection of stamps, you can just create your own. See the "Extending Tux Paint" documentation for more on creating PNG and SVG image files, TXT text description files, Ogg Vorbis, MP3 or WAV sound files, and DAT text data files that make up stamps.
Finally, if you installed stamps, and think they should be loading, check to see that the "nostamps" option isn't being set. (Either via a "--nostamps" option to Tux Paint's command line, or "nostamps=yes" in the configuration file.)
Either change/remove the "nostamps" option, or you can override it with "--stamps" on the command line or either "nostamps=no" or "stamps=yes" in a configuration file.
The "Fill" Tool Looks Bad
Tux Paint is probably comparing exact pixel colors when filling. This is faster, but looks worse. Run the command "tuxpaint --verbose-version" from a command line, and you should see, amongst the other output: "Low Quality Flood Fill enabled".
To change this, you must rebuild Tux Paint from source. Be sure to remove or comment out any line that says:
#define LOW_QUALITY_FLOOD_FILL
in the "tuxpaint.c" file in the "src" directory.
Stamp outlines are always rectangles
Tux Paint was built with low-quality (but faster) stamp outlines.
To change this, you must rebuild Tux Paint from source. Be sure to remove or comment out any line that says:
Tux Paint was probably compiled with the faster, lower quality thumbnail code enabled. Run the command: "tuxpaint --verbose-version" from a command line. If, amongst the other output, you see the text: "Low Quality Thumbnails enabled", then this is what's happening.
To change this, you must rebuild Tux Paint from source. Be sure to remove or comment out any line that says:
#define LOW_QUALITY_THUMBNAILS
in the "tuxpaint.c" file in the "src" directory.
Pictures in the 'Open' dialog look bad
"Low Quality Thumbnails" is probably enabled. See: "Stamp thumbnails in the Stamp Selector look bad", above.
The color picker buttons are ugly squares, not pretty buttons!
Tux Paint was probably compiled with the nice looking color selector buttons disabled. Run the command: "tuxpaint --verbose-version" from a command line. If, amongst the other output, you see the text: "Low Quality Color Selector enabled", then this is what's happening.
To change this, you must rebuild Tux Paint from source. Be sure to remove or comment out any line that says:
#define LOW_QUALITY_COLOR_SELECTOR
in the "tuxpaint.c" file in the "src" directory.
All of the text is in uppercase!
The "uppercase" option is on.
Either change/remove the "uppercase" option, or you can override it with "--mixedcase" on the command line or either "uppercase=no" or "mixedcase=yes" in a configuration file.
Tux Paint is in a different language
Make sure your locale setting is correct. See "Tux Paint won't switch to my language", below.
Tux Paint won't switch to my language
Linux and Unix users: Make sure the locale is available
Make sure the locale you want is available. Check your "/etc/locale.gen" file. See the "Options Documentation" for the locales Tux Paint uses (especially when using the "--lang" option).
Note: Debian and derivative (e.g., Ubuntu) users can simply run "dpkg-reconfigure locales" if the locales are managed by "dpkg".
If you're using the "--lang" command-line option
Try using the "--locale" command-line option, or your operating system's locale settings (e.g., the "$LANG" environment variable), and please e-mail us regarding your trouble.
If you're using the "--locale" command-line option
If this doesn't work, please e-mail us regarding your trouble.
If you're trying to use your Operating System's locale
If this doesn't work, please e-mail us regarding your trouble.
Make sure you have the necessary font
Some translations require their own font. Chinese and Korean, for example, need Chinese and Korean TrueType Fonts installed and placed in the proper location, respectively.
The appropriate fonts for such locales can be downloaded from the Tux Paint website:
Tux Paint won't print, gives an error, or prints garbage (Unix/Linux)
Tux Paint prints by creating a PostScript rendition of the picture and sending it to an external command. By default, this command is the "lpr" printing tool.
If that program is not available (for example, you're using CUPS, the Common Unix Printing System, and do not have "cups-lpr" installed), you will need to specify an appropriate command using the "printcommand" option in Tux Paint's configuration file. (See the "Options Documentation".)
Note: Versions of Tux Paint prior to 0.9.15 used a different default command for printing, "pngtopnm | pnmtops | lpr", as Tux Paint output PNG format, rather than PostScript.
If you had changed your "printcommand" option prior to Tux Paint 0.9.15, you will need to go back and alter it to accept PostScript.
I get the message "You can't print yet!" when I go to print
The "print delay" option is on. You can only print once every X seconds.
If you're running Tux Paint from a command-line, make sure you're not giving it a "--printdelay=..." option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--printdelay=..." is listed as a command-line argument.
If a "--printdelay=..." option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "printdelay=...".
Either remove that line, set the delay value to 0 (no delay), or decrease the delay to a value you prefer. (See the "Options Documentation".)
Or, you can simply run Tux Paint with the command-line argument: "--printdelay=0", which will override the configuration file's setting, and allow unlimited printing. (You won't have to wait between prints.)
I simply can't print! The button is greyed out!
The "no print" option is on.
If you're running Tux Paint from a command-line, make sure you're not giving it a "--noprint" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--noprint" is listed as a command-line argument.
If a "--noprint" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "noprint=yes".
Either remove that line, or simply run Tux Paint with the command-line argument: "--print", which will override the configuration file's setting.
Or use Tux Paint Config. and make sure "Allow Printing" (under "印刷") is checked.
Unless you asked Tux Paint to save into a specific location (using the "savedir" option), Tux Paint saves into a standard location on your local drive:
Windows Vista, Windows 8, Windows 10, Windows 11
In the user's "AppData" folder: e.g., C:\Users\Username\AppData\Roaming\TuxPaint\saved
macOS
In the user's "Application Support" folder: e.g., /Users/Username/Library/Applicaton Support/TuxPaint/saved/
Linux / Unix
In the user's home directory ("$HOME"), under a ".tuxpaint" subfolder: e.g., /home/username/.tuxpaint/saved/
The images are stored as PNG bitmaps, which most modern programs should be able to load (image editors, word processors, web browsers, etc.)
Tux Paint always saves over my old picture
The "save over" option is enabled. (This disables the prompt that would appear when you click 'Save.')
If you're running Tux Paint from a command-line, make sure you're not giving it a "--saveover" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--saveover" is listed as a command-line argument.
If a "--saveover" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "saveover=yes".
Either remove that line, or simply run Tux Paint with the command-line argument: "--saveoverask", which will override the configuration file's setting.
Or use Tux Paint Config. and make sure "Ask Before Overwriting" (under "保存") is checked.
Also, see "Tux Paint always saves a new picture!", below.
Tux Paint always saves a new picture!
The "never save over" option is enabled. (This disables the prompt that would appear when you click 'Save.')
If you're running Tux Paint from a command-line, make sure you're not giving it a "--saveovernew" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--saveovernew" is listed as a command-line argument.
If a "--saveovernew" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "saveover=new".
Either remove that line, or simply run Tux Paint with the command-line argument: "--saveoverask", which will override the configuration file's setting.
Or use Tux Paint Config. and make sure "Ask Before Overwriting" (under "保存") is checked.
Also, see "Tux Paint always saves over my old picture!", above.
Is the volume turned up in your Operating System's "mixer?"
Are you certain you're using a computer with a sound card?
Are any other programs running that use sound? (They may be 'blocking' Tux Paint from accessing your sound device)
(Unix/Linux) Are you using a sound system, such as aRts, ESD or GStreamer? If so, try setting the "SDL_AUDIODRIVER" environment variable before running Tux Paint (e.g., "export SDL_AUDIODRIVER=arts"). Or, run Tux Paint through the system's rerouter (e.g., run "artsdsp tuxpaint" or "esddsp tuxpaint", instead of simply "tuxpaint").
Is sound disabled in Tux Paint?
If sound seems to work otherwise (and you're sure no other program is "blocking" the sound device), then Tux Paint may be running with a "no sound" option.
If you're running Tux Paint from a command-line, make sure you're not giving it a "--nosound" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--nosound" is listed as a command-line argument.
If a "--nosound" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "nosound=yes".
Either remove that line, or simply run Tux Paint with the command-line argument: "--sound", which will override the configuration file's setting.
Or, you can simply run Tux Paint with the command-line argument: "Enable Sound Effects", which will override the configuration file's setting, and allow unlimited printing. (You won't have to wait between prints.)
Were sounds temporarily disabled?
Even if sounds are enabled in Tux Paint, it is possible to disable and re-enable them temporarily using the [Alt] + [S] key sequence. Try pressing those keys to see if sounds begin working again.
Was Tux Paint built without sound support?
Tux Paint may have been compiled with sound support disabled. To test whether sound support was enabled when Tux Paint was compiled, run Tux Paint from a command line, like so:
tuxpaint --verbose-version
If, amongst the other information, you see "Sound disabled", then the version of Tux Paint you're running has sound disabled. Recompile Tux Paint, and be sure NOT to build the "nosound" target. (i.e., don't run "make nosound") Be sure the SDL_mixer library and its development headers are available!
Tux Paint makes too much noise! Can I turn them off?
Yes, there are a number of ways to disable sounds in Tux Paint:
Press [Alt] + [S] while in Tux Paint to temporarily disable sounds. (Press that key sequence again to re-enable sounds.)
Run Tux Paint with the "no sound" option:
Run "tuxpaint --nosound" from the command line or shortcut or desktop icon.
Edit Tux Paint's configuration file (see "Options Documentation" for details) and add a line containing "nosound=yes".
Or use Tux Paint Config. and make sure "Enable Sound Effects" (under "Video & Sound") is not checked.
Alternatively, recompile Tux Paint with sound support disabled. (See above, and the 'Install' documentation.
The stereo panning of sound effects is bothersome; can sound effects be monophonic?
Run Tux Paint with the "no stereo" option:
Run "tuxpaint --nostereo" from the command line or shortcut or desktop icon.
Edit Tux Paint's configuration file (see "Options Documentation" for details) and add a line containing "nostereo=yes".
Or use Tux Paint Config. and make sure "Enable Stereo Effects" (under "Video & Sound") is not checked.
The sound effects sound strange
This could have to do with how SDL and SDL_mixer were initialized. (The buffer size chosen.)
Please e-mail us with details about your computer system. (Operating system and version, sound card, which version of Tux Paint you're running (run "tuxpaint --version" to verify), and so on.)
When I run Tux Paint full-screen and [Alt] + [Tab] out, the window turns black!
This is apparently a bug in the SDL library. Sorry.
When I run Tux Paint full-screen, it has large borders around it
Linux users - Your X-Window server is probably not set with the ability to switch to the desired resolution: 800×600. (or whatever resolution you have Tux Paint set to run at.) (This is typically done manually under the X-Window server by pressing [Control] + [Alt] + [Keypad Plus (+)] and [Control] + [Alt] + [Keypad Minus (-)].)
For this to work, your monitor must support that resolution, and you need to have it listed in your X server configuration.
Check the "Display" subsection of the "Screen" section of your XFree86 or X.org configuration file (typically "/etc/X11/XF86Config-4" or "/etc/X11/XF86Config", depending on the version of XFree86 you're using; 3.x or 4.x, respectively, or "/etc/X11/xorg.conf" for X.org).
Add "800x600" (or whatever resolution(s) you want) to the appropriate "Modes" line. (e.g., in the "Display" subsection that contains 24-bit color depth ("Depth 24"), which is what Tux Paint tries to use.)
Modes "1280x1024" "1024x768" "800x600" "640x480"
Note that some Linux distributions have tools that can make these changes for you. Debian users can run the command "dpkg-reconfigure xserver-xfree86" as root, for example.
Tux Paint keeps running in Full Screen mode - I want it windowed!
The "fullscreen" option is set.
If you're running Tux Paint from a command-line, make sure you're not giving it a "--fullscreen" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--fullscreen" is listed as a command-line argument.
If a "--fullscreen" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "fullscreen=yes".
Either remove that line, or simply run Tux Paint with the command-line argument: "--windowed", which will override the configuration file's setting.
Or use Tux Paint Config. and make sure "Fullscreen" (under "Video & Sound") is not checked.
If Tux Paint aborts with the message: "You're already running a copy of Tux Paint!", this means it has been launched in the last 30 seconds. (On Unix/Linux, this message would appear in a terminal console if you ran Tux Paint from a command-line. On Windows, this message would appear in a file named "stdout.txt" in the same folder where TuxPaint.exe resides (e.g., in "C:\Program Files\TuxPaint").
A lockfile ("~/.tuxpaint/lockfile.dat" on Linux and Unix, "userdata\lockfile.dat" on Windows) is used to make sure Tux Paint isn't run too many times at once (e.g., due to a child impatiently clicking its icon more than once).
Even if the lockfile exists, it contains the 'time' Tux Paint was last run. If it's been more than 30 seconds, Tux Paint should run fine, and simply update the lockfile with the current time.
If multiple users are sharing the directory where this file is stored (e.g., on a shared network drive), then you'll need to disable this feature.
To disable the lockfile, add the "--nolockfile" argument to Tux Paint's command-line, or "nolockfile=yes" to the configuration file.
I can't quit Tux Paint
The "no quit" option is set. This disables the "Quit" button in Tux Paint's toolbar (greying it out), and prevents Tux Paint from being exited via the [Escape] key.
If Tux Paint is not in fullscreen mode, simply click the window close button on Tux Paint's title bar. (i.e., the "ⓧ" at the upper right.)
If Tux Paint is in fullscreen mode, you will need to use the [Shift] + [Control] + [Escape] sequence on the keyboard to quit Tux Paint.
(Note: with or without "no quit" set, you can always use the [Alt] + [F4] combination on your keyboard to quit Tux Paint.)
I don't want "no quit" mode enabled!
If you're running Tux Paint from a command-line, make sure you're not giving it a "--noquit" option.
If you're running Tux Paint by double-clicking an icon, check the properties of the icon to see if "--noquit" is listed as a command-line argument.
If a "--noquit" option isn't being sent on the command line, check Tux Paint's configuration file for a line reading: "noquit=yes".
Either remove that line, or simply run Tux Paint with the command-line argument: "--quit", which will override the configuration file's setting.
Or use Tux Paint Config. and make sure "Disable Quit Button and [Escape] Key" (under "単純化") is not checked.
Tux Paint keeps writing weird messages to the screen / to a text file
A few messages are normal, but if Tux Paint is being extremely verbose (like listing the name of every rubber-stamp image it finds while loading them), then it was probably compiled with debugging output turned on.
To change this, you must rebuild Tux Paint from source. Be sure to remove or comment out any line that says:
#define DEBUG
in the "tuxpaint.c" file in the "src" directory.
Tux Paint is using options I didn't specify!
By default, Tux Paint first looks at configuration files for options.
Unix and Linux
Under Unix and Linux, it first examines the system-wide configuration file, located here:
/etc/tuxpaint/tuxpaint.conf
It then examines the user's personal configuration file:
~/.tuxpaintrc
Finally, any options sent as command-line arguments are used.
Windows
Under Windows, Tux Paint first examines the configuration file:
tuxpaint.cfg
Finally, any options sent as command-line arguments are used.
This means that if anything is set in a configuration file that you don't want set, you'll need to either change the config. file (if you can), or override the option on the command-line.
For example, on Linux and Unix, if "/etc/tuxpaint/tuxpaint.conf" includes this option to disable sound...
nosound=yes
...then you can reenable sound by either adding this option to your own ".tuxpaintrc" file:
sound=yes
...or by using this command-line argument:
--sound
Linux and Unix users can also disable the system-wide configuration file by including the following command-line argument:
--nosysconfig
Tux Paint will then only look at "~/.tuxpaintrc" and command-line arguments to determine what options should be set.
Tux Paint responds to the following signals (which can be sent to the program's process via `kill` or `killall`, for example).
SIGTERM
(also, [Control] + [C] from a terminal running `tuxpaint`)
Tux Paint responds as if the "Quit" button were pressed, or the desktop environment was told to close Tux Paint (e.g., by clicking a window close button, or pressing [Alt] + [F4] on most systems).
From the main interface, Tux Paint will prompt whether or not you wish to quit, and (unless overridden by the auto-save option, e.g. "--autosave") if you'd like to save the current drawing (if unsaved), and if so, and it's a modified version of an existing drawing (unless overridden by the options to save over old images, or always save new images; e.g. "--saveover" and "--saveovernew", respectively), whether or not to overwrite the existing drawing, or save to a new file.
例: killall tuxpaint
💡Note: From other parts of the interface, the signal is currently interpreted as a request to go back (e.g., from the "New" dialog back to the main interface), as if a "Back" button in Tux Paint were clicked, or the [Esc] was key pressed.
SIGUSR1 & SIGUSR2
Tux Paint responds by setting its auto-save option (as if it had been launched with "--autosave"), as well as either the option to always save new images (as if launched with "--saveovernew") in the case of receiving a SIGUSR1 signal, or to always save over the existing image (as if launched with "--saveover") in the case of receiving SIGUSR2. Then Tux Paint sends itself a SIGTERM signal, in an attempt to quit. (See above.)
So, from the main interface, Tux Paint should quit almost immediately, with no questions asked.
例: killall -s SIGUSR1 tuxpaint
💡Note: From other parts of the interface, unfortunately, Tux Paint will go back one level in the interface. Therefore, at this time, it may be necessary to send this signal to Tux Paint a few times, for it to quit completely.
Tux Paint understands a number of environment variables, either directly, or indirectly by the libraries that it utilizes.
Storage-related environment variables
HOME
Specifies the user's "home directory", which is used to locate numerous other files or directories. In some cases, it is utilized as part of a fall-back location, when other environment variables (elsewhere in this documentation) are not set. Sometimes, the location to use can be overridden by options provided on the command-line or via Tux Paint's configuration file. See the "OPTIONS" documentation for details.
A few examples of where "$HOME" is used include:
The location of Tux Paint's configuration file
The basis of where Tux Paint saves and loads users' drawings
The location of a user's private collection of data files — stamps, brushes, etc. — (versus those available system wide)
XDG_CONFIG_HOME
On Linux and other platforms where the X Desktop Group standards are used, the location of the user's configuration files. Specifically, where to find "user-dirs.dirs", where the "XDG_PICTURES_DIR" might be defined. It is used for exporting drawings and animated GIFs. Generally it's set to something like "$HOME/Pictures/". If not specified, Tux Paint checks in the directory "$HOME/.config/". If the configuration cannot be found, Tux Paint simply exports drawings and GIFs to "$HOME".
XDG_DATA_HOME
On Linux and other platforms where the X Desktop Group standards are used, the location of the user's data directories. Specifically, where to find the "Trash" directory. It is used when deleting images from Tux Paint's "Open" dialog. If not set, the location "$HOME/.local/share/Trash/" is used, if available. If not, images are simply deleted, rather than moved anywhere.
TEMP
Specifies the location where temporary files may be created. Only used by Tux Paint on Microsoft Windows OSes. Uses "userdata" if not set.
Language-related environment variables
LANG
LANGUAGE
LC_ALL
LC_MESSAGES
Specify the language Tux Paint should utilize in its user interface. Overridde by the "--lang" and "--locale" command-line options or their configuration file counterparts. The "LANGUAGE" environment variable is used, if set. If not, "LC_ALL" is used as a fallback. Then "LC_MESSAGES", and finally "LANG".
Display-related environment variables
The following are a few of the environment variables supported by Simple DirectMedia Layer (libSD) — which Tux Paint utilizes for displaying graphics, playing sounds, and receiving mouse, keyboard, and joystick input — and which may be useful to users of Tux Paint.
SDL_VIDEO_ALLOW_SCREENSAVER
Specifies whether Tux Paint should allow a screensaver to run. Can be set to '1' (true) by Tux Paint itself by issuing the command-line option "--allowscreensaver" or its configuration file counterpart.
SDL_VIDEO_WINDOW_POS
Requests where to position Tux Paint's window. Normally set to "center" by Tux Paint itself, unless the environment variable is already set (e.g., to "nopref", meaning "no preference").
PNG is the Portable Network Graphic format. It is an open standard, not burdened by patents (like GIFs). It is a highly compressed format (though not "lossy" like JPEGs - lossiness allows files to be much smaller, but introduces 'mistakes' in the image when saved), and supports 24-bit color (16.7 million colors) as well as a full "alpha channel" - that is, each pixel can have a varying degree of transparency.
These features (openness, losslessness, compression, transparency/alpha) make it the best choice for Tux Paint. (Tux Paint's support for the PNG format comes from the Open Source SDL_Image library, which in turn gets it from the libPNG library.)
Support for many colors allows photo-quality "rubber stamp" images to be used in Tux Paint, and alpha transparency allows for high-quality brushes.
How To Make PNGs
The following is a very brief list of ways to create PNGs or convert existing images into PNGs.
GIMP & Krita
Excellent tools with which to create PNG images for use in Tux Paint are GIMP and Krita, both high-quality Open Source interactive drawing and photo editing programs.
It is likely that one or both are already installed on your system. If not, they should be readily available from your Linux distribution's software repository. If not, or to learn more, visit http://www.gimp.org/ and http://www.krita.org/, respectively.
Command-line Tools
NetPBM
The Portable Bitmap tools (collectively known as "NetPBM") is a collection of Open Source command-line tools which convert to and from various formats, including GIF, TIFF, BMP, PNG, and many more.
It is possible that it's already installed on your system. If not, they it be readily available from your Linux distribution's software repository. If not, or to learn more, visit http://netpbm.sourceforge.net/.
cjpeg/djpeg
The "cjpeg" and "djpeg" command-line programs convert between the NetPBM Portable Any Map (PNM) format and JPEGs.
It is possible that it's already installed on your system. If not, they it be readily available from your Linux distribution's software repository. If not, or to learn more, visit https://jpegclub.org/.