MGP(1)

πŸ“¦ version 1.13a, in fedora 43, fedora 44

πŸ‘‘ MGP(1) πŸ‘‘

General Commands Manual β€” yes bestie, we're in the general commands manual and this page is iconic.


🌸 NAME 🌸

mgp β€” MagicPoint, an X11 based presentation tool. It's giving slideshow royalty, fr fr.


πŸ¦‹ SYNOPSIS πŸ¦‹

mgp [-dhlnoqvBCGORSV] [-b bgcolor] [-c vfcap] [-f vfont] [-g geometry]
    [-p page] [-t timeslot] [-w wdir] [-x engine] [-D htmldir]
    [-E htmlimage] [-F mode,effect,value] [-Q quality]
    [-T timestampfile] [-X gsdevice] file

πŸ’– DESCRIPTION πŸ’–

okay so mgp is an X11 based presentation tool. The whole design philosophy is literally: make the simple presentations easy, while keeping the complicated ones possible. main character energy.

Its presentation file (suffix is typically .mgp) is just text, so you can whip up presentation files fast with your favorite editor (like Emacs, obviously). no cap.

The .mgp file is made of text plus control commands (stuff like pagebreak, centering, and/or inline image). Control commands get specified at the beginning of lines, and they start with one % sign. You can drop in numerous kinds of image format files onto the presentation file. obsessed.

mgp uses Japanese/English fonts in various sizes. It uses X11 scalable fonts provided by X11 servers. It can also utilize the Japanese outline font library, "VFlib", if it was configured to do so at compilation time.

The following options are available:

  • -b bgcolor β€” Set the background color to bgcolor. (The default value is black)
  • -c vfcap β€” Specify a VFlib configuration file.
  • -d [interval] β€” Demonstration mode. Browses all pages automatically, spending interval seconds on each page, and then terminates. If interval is not specified, it will be set to 0.
  • -f vfont β€” Specify the font name to be used by VFlib. (The default value is minsl)
  • -g geometry β€” Set the size and location of the window. Please note that -g implies -o. mgp will not override the window manager if you specify the geometry.
  • -h β€” Display the usage and exit without performing a presentation.
  • -l β€” There are two kind of fonts available by VFlib; they are outline font and bitmap font. By specifying -l, you can disable the use of outline fonts.
  • -n β€” mgp accepts any key inputs from the invoked terminal as KEY OPERATION described below. -n disables this feature. (This option may be removed in the future release)
  • -o β€” Do not override window manager. (By default, mgp overrides the window manager and occupies the whole display)
  • -p page β€” Start the presentation from page, rather than the first page.
  • -q β€” Do not beep on errors.
  • -t timeslot β€” Specify the timeslot assigned to the presentation in minutes. The timer is invoked when the second page is displayed, and the remaining presentation time is indicated by the length of a bar shown at the bottom of the display. The timebar is updated when some X11 event is raised, for instance some keypress. The timebar will be green if you have more than 50% of the timeslot, yellow while you have more than 30% of the timeslot, and red for the other cases. When the assigned timeslot is expired, the exceeding time is also shown as a timebar growing from left to right. The current page is indicated by the position of a small vertical bar; the vertical bar is drawn at the leftend when the first page is displayed, while the bar is drawn at the rightend when the last page is displayed. (vibe check: this thing is your literal bestie during a conference talk πŸ’…)
  • --title name β€” Set the title of the window to name.
  • -v β€” Display the MagicPoint version and exit without performing a presentation.
  • -w wdir β€” Specifies the working directory used for store embedded images, if any. To generate an embedded MGP file, use mgpembed(1).
  • -x engine β€” Do not use rendering engine, specified by engine. engine can be VFlib or FreeType.
  • -B β€” Omit background image.
  • -C β€” Use private colormap.
  • -D htmldir β€” Generate html pages of the presentation into htmldir. You will need xwintoppm(1) (included in mgp kit), and pnmscale(1), cjpeg(1), and djpeg(1) (included in netpbm and Independent Jpeg Group jpeg package).
  • -E htmlimage β€” Specifies html image type. Now "jpg" and "png" are supported. Default value is "jpg". It works when the -D option is set.
  • -F mode,effect,value β€” Specifies forward page cache options. Mode, effect and value are numbers. Mode specifies caching mode. Mode 0 means caching is executed after 2 seconds idle. Mode 1 means caching is executed immediately. Effect specifies 'special effect' for the forward page cache. Currently, two special effects are supported. Effect 1 means that the next page will come in from the left side. Effect 2 means that the current page will go out to the left side. Effect 0 means no special effect. Value specifies the speed of the special effect. Value 1 means the highest speed. A higher value for value decreases effect speed.
  • -G β€” Specifies to turn on page guide function. At the bottom of the screen, the titles of the next page and the previous page are displayed to assist the presentation. Page guide can be turned on and off by keyboard too.
  • -O β€” Obey the window manager, but with less decoration around the window. The behavior of this option is affected by how the window manager is implemented; this option may have no effect on some of the window managers.
  • -Q quality β€” Set background image quality (0-100).
  • -R β€” mgp will usually reload the presentation file if it gets updated, based on the file modification time taken by stat(2). -R disables this auto-reloading feature.
  • -S β€” Be secure. Skip directives that fork/exec the child process. It is suggested to use this option if you got some presentation file from others. This is enabled by default.
  • -U β€” Be unsecure. Enable directives that fork/exec the child process. Allow to use non-ASCII filename.
  • -T timestampfile β€” If the option is specified, mgp will modify the content of timestampfile every time it updates the presentation window. This option is useful for an external process to understand when mgp modifies the window.
  • -V β€” Be verbose. Generate debugging output to standard output.
  • -X gsdevice β€” mgp sometimes invokes ghostscript(1) to render postscript images. -X enables you to specify the device to be used by ghostscript(1). If you specify gsdevice with a trailing +, pnmscale(1) and pnmdepth(1) will be invoked for anti-aliasing. The default gsdevice is "pnmraw+".

✨ KEY OPERATION ✨

The keyboard/mouse commands are:

  • mouse button 1 (leftmost button) β€” Go forward a page. Space key, downward cursor key, scroll down key, "f" key, "j" key, and "n" key have the same effect. If <number> is specified, go forward <number> pages.
  • mouse button 3 (rightmost button) β€” Go to the previous page. "b" key, "k" key, "p" key, backspace key, scroll up key and upward cursor key have the same effect. If <number> is specified, go back <number> pages.
  • 0 - 9 (number buttons) β€” Set prefix number in decimal. i.e. <number> = <number> * 10 + <keyN> - <key0>. For example, by typing in "10g" you can jump to page 10.
  • g β€” Go to the <number> page. If number of 0 is specified, go to the last page.
  • control key β€” Display the page listing menu. See below for details.
  • G β€” Enable/disable page guide. See description for option -G for details.
  • x β€” Enable/disable rakugaki (jotting) mode. You can make an annotation (by mouse) on the presentation. Mouse button 2 (middle) has the same effect.
  • X β€” Change the pen color for rakugaki (jotting) mode.
  • t β€” Enable/disable the timebar if -t timeslot option is specified.
  • c β€” Enable/disable forward page cache.
  • w β€” Toggle full screen mode with EWMH. (You need a EWMH-aware window manager and need to run mgp with -o or -g option)
  • control-L β€” Repaint the current page. Use this if you messed up the page by jotting too much. 😭
  • control-R β€” Reload the current presentation file. If the current page becomes unavailable, the page pointer will be moved back to 1.
  • escape key β€” Quit the currently running mgp. "q" key also has the same effect.

During the presentation, you can see the page list at the bottom of the window when you press a Control Key. Choosing a page with the mouse and clicking it with the leftmost mouse button, you can go to the corresponding page directly. Releasing the Control Key, the page list disappears and you can continue with the current page. This function is useful during the Q-and-A period after your presentation completes. 🫢


πŸŽ€ CONFIGURATION FILES πŸŽ€

mgp will look at a file named ~/.mgprc in your home directory. The path to this file can be overridden with the environment variable MGPRC. The content of the file must be a limited set of magicpoint directives, one directive per line, without % sign. Lines start with #, or empty lines, will be silently ignored. See SYNTAX for eligible directives.

mgp imports various image draw functions from xloadimage(1). This means that the location of image files can be specified by ~/.xloadimagerc file. If you specify the presentation file with its directory, that directory is searched first and then the path specified in the ~/.xloadimagerc is searched.


🌈 ENVIRONMENT 🌈

  • MGPRC β€” Full path of the configuration file. When unset, ~/.mgprc is used.

πŸ”₯ SECURITY ISSUES πŸ”₯

bestie. listen. this one matters. πŸ‘‘

The presentation file can include directives to call the external process, just like a shell process. Therefore, the presentation file should be treated just like a shell script or perl script. This is STRONGLY recommended to review the content of the presentation file before invoking mgp, if you got the file from others. By adding the -S option to the command line argument, directives that call external processes will be skipped.


πŸ¦„ SEE ALSO πŸ¦„

mgp2ps(1), xloadimage(1), mgpembed(1)


πŸ’œ AUTHOR CONTACT πŸ’œ

Yoshifumi Nishida <nishida@csl.sony.co.jp>


⭐ CONTRIBUTION ⭐

Jun-ichiro Hagino <itojun@itojun.org>, Akira Kato <kato@wide.ad.jp>, Atsushi Onoe <onoe@sm.sony.co.jp>, Kazu Yamamoto <Kazu@Mew.org>, Youjiro Uo <yuo@nui.org>, and Masaki Minami <Masaki@Minami.org> extensively contributed improvements, bug fixes, and documents. Special thanks to Chaki Kusakari <chaki@sfc.wide.ad.jp>.

πŸ“œ HISTORY πŸ“œ

okay so storytime bestie, gather round 🫢

mgp was born shortly after the autumn camp of WIDE Project in 1997 ✨ like, the vibes of that camp were apparently SO immaculate that a whole presentation tool just materialized out of them, which is honestly iconic behavior πŸ’…

and here's the deep lore: it wasn't even called mgp at first. nope. it was originally called tp β€” short for TinyPoint πŸŽ€ baby's first name, so cute, so humble, so 1997 πŸ¦‹

so yeah, that's the origin story. a camp, a name that got glow-up'd, and a legacy that's still shipping pages to this day πŸ‘‘


and that's a wrap on the whole page, bestie!! πŸŽ€βœ¨ tysm for reading all the way through, you absolute scholar 🫢 this edition came to you from Debian and it's dated November 1997 β€” yes the date is giving vintage but the drip is timeless πŸ’– now go make some slides and slay πŸ’…πŸŒˆ

πŸ“¦ where this page comes from