3 .\" Copyright (c) 2010, 2011 Marco Peereboom <marco@peereboom.us>
4 .\" Copyright (c) 2011 Jason McIntyre <jmc@openbsd.org>
6 .\" Permission to use, copy, modify, and distribute this software for any
7 .\" purpose with or without fee is hereby granted, provided that the above
8 .\" copyright notice and this permission notice appear in all copies.
10 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 .Nd lightweight web browser
29 .Op Fl s Ar session_name
34 is a minimalistic web browser that tries to stay out of the way so that
35 valuable screen real estate can be used for much more important stuff.
36 It has sane defaults and does not require one to learn a language to do any
38 It was written by hackers for hackers
39 and it strives to be small, compact, and fast.
42 is very simple in its use.
43 Most actions are initiated via key or mouse bindings.
44 Key bindings are based on those of the
47 giving web browsing a similar feel to navigating a text document.
50 section below documents the various defaults and possible customizations.
52 The options are as follows:
55 Specify an alternative configuration file.
57 Open a new tab in a running
59 for each specified URL.
64 Execute arbitrary command (see the
66 section below) in a running
68 instance. This option requires
70 to be enabled. Example run: xxxterm -e "tabnew openbsd.org"; xxxterm -e
71 tabclose; xxxterm -e wq.
74 .It Fl s Ar session_name
75 Open session that was saved with ":session save" command.
77 Disable visualization of tabs.
81 Display version and exit.
84 The following notation is used throughout this page:
86 .Bl -tag -width Ds -offset indent -compact
92 Meta 1 (sometimes marked Alt)
98 Meta 4 (sometimes marked Windows)
105 To browse to a specific address,
106 either use the mouse to click on the address bar
109 to shift the keyboard focus to the address bar.
110 The address is then entered manually.
112 The mouse can be used to navigate the page in the traditional manner,
113 or the keyboard can be used instead.
118 will scroll up and down the page.
121 either click on it or use the
125 assign numbers to each link on the page;
126 entering that number on the keyboard will prompt
131 provides many actions accessed via key or mouse bindings.
132 Most can be reprogrammed using a
134 entry in the configuration file.
135 Each keyboard shortcut requires exactly one entry in the configuration file.
136 A shortcut can have multiple entries in the configuration file.
137 The format of the keybinding entry is as follows:
139 .D1 keybinding = action,(!)keystroke(s)
141 For example, "keybinding = tabnew,C-t" where
147 GTK has some default keybindings for manipulating text inside input
148 fields, such as the URI or search entry widget, for example
150 deletes a word. To override these defaults prefix your key with an
151 exclamation mark, like this: "keybinding = tabclose,!C-w".
154 key word is special and is meant to reset the key binding list to the GTK+
156 This keyword should be the first
158 entry in the configuration file.
160 Shift should be used sparingly since it gets in the way of non-USA keyboards.
161 See the accompanying configuration file for examples.
163 The various bindings are documented below.
164 The relevant keybinding action is given afterwards, in parentheses.
166 These commands are used to search for text strings within a web page.
168 .Bl -tag -width Ds -offset indent -compact
173 Start a backwards search
176 Next item matching search
179 Previous item matching search
183 These commands are used to shift the focus of
185 from one area to another.
187 .Bl -tag -width Ds -offset indent -compact
192 Focus on search entry
196 These commands allow the user to map specific actions to specific keys.
197 It can be useful when the
201 .Bl -tag -width Ds -offset indent -compact
205 Alias for ":toplevel toggle"
210 Alias for ":open current-uri"
211 .Pq Cm promptopencurrent
216 Alias for ":tabnew current-uri"
217 .Pq Cm prompttabnewcurrent
219 .Ss Navigation Commands
220 These commands allow the user to navigate web pages and,
224 .Bl -tag -width "Space, C-f, PageDownXXX" -offset indent -compact
228 .It Cm Backspace, M-Left
231 .It Cm S-BackSpace, M-Right
238 Previous line on page
246 .It Cm Space, C-f, PageDown
248 .Pq Cm scrollpagedown
260 .Pq Cm scrollfarright
280 Toggle Java Script enabled for FQDN
286 Toggle cookie enabled for FQDN
291 supports tabbed browsing.
292 That is, web pages may be opened in separate tabs,
293 allowing the user to quickly move from one page to another,
295 These commands then are used to create, destroy, and move between tabs.
297 .Bl -tag -width "C-plus, C-equalXXX" -offset indent -compact
299 Open new tab with the clicked link
301 Create new tab with focus in URL entry
310 Go to the previous tab
318 .Pq Cm tabnext [1..9]
322 .It Cm C-plus, C-equal
326 Set zoom level to 100%
329 .Ss Yanking and pasting
330 These commands copy and paste text to and from the clipboard.
332 .Bl -tag -width Ds -offset indent -compact
334 Paste the contents of the clipboard into the address bar
337 Paste the contents of the clipboard into a new tab
340 Yank the current URL into the clipboard
343 .Ss Hyperlink Following
344 This allows the user to follow hyperlinks
345 without using a mouse.
346 Enter the corresponding number to follow the link.
347 Alternatively one can type the name of the link and when there are no more
350 will follow the link.
352 .Bl -tag -width Ds -offset indent -compact
354 Highlight all links and prefix them with a number.
358 Commands to exit the browser.
360 .Bl -tag -width Ds -offset indent -compact
365 .Ss Low-Contrast Color Scheme
366 This command toggles the page's style between the default CSS and a
367 low-contrast color scheme with light grey text on a dark grey background.
369 .Bl -tag -width Ds -offset indent -compact
371 Toggle the current tab's style.
375 Command mode works in a similar fashion to the
378 it is entered by typing a colon and exited by typing Esc.
379 The commands and their descriptions are listed below.
380 .Bl -tag -width Ds -offset indent
381 .It Cm about , version
382 Show the "About" page.
383 .It Cm buffers , ls , tabs
384 Displays the currently open tabs and lets the user switch tab by typing
385 the tab number or using the mouse.
387 Display CA certificates.
388 .It Cm cert , cert show
389 Download and display certificates of domain on tab.
391 Save certificate into a local store.
392 The next time the site is visited it is compared against the store.
393 If the certificate matches,
394 the address bar will be blue;
395 if it doesn't the bar will be red.
399 command is used to manipulate the cookie whitelist.
400 Used by itself it expands to
401 .Cm cookie show all .
403 Show cookie jar contents.
404 .It Cm cookie save, cookie save fqdn
405 Save the current fully qualified domain name (FQDN)
406 to the persistent whitelist.
408 the www.peereboom.us domain would result in saving .www.peereboom.us.
409 .It Cm cookie save domain
410 Save the top level domain name to the persistent whitelist.
412 the www.peereboom.us domain would result in saving .peereboom.us.
414 This action enables cookies if it is currently disabled for this entry.
415 .It Cm cookie show all
416 Show all persistent and session entries in the cookie whitelist.
417 .It Cm cookie show persistent
418 Show all persistent entries in the cookie whitelist.
419 .It Cm cookie show session
420 Show all session entries in the cookie whitelist.
421 .It Cm cookie toggle domain
422 Toggle cookie support for the current top level domain.
423 .It Cm cookie toggle, cookie toggle fqdn
424 Toggle cookie support for the current FQDN.
426 Show download manager.
427 .It Cm encoding <encoding>
430 is set the tab's encoding will be set to
439 will display the current tab encoding.
443 Add the current page to favorites.
444 .It Cm fullscreen , f
445 Toggle hiding tabs and url entry toolbar.
446 .It Cm h , hist , history
455 command is used to manipulate the Java Script whitelist.
456 Used by itself it expands to
458 .It Cm js save, save fqdn
459 Saves the FQDN to the persistent whitelist.
461 the www.peereboom.us domain would result in saving .www.peereboom.us.
462 .It Cm js save domain
463 Saves the top level domain name to the persistent whitelist.
465 the www.peereboom.us domain would result in saving .peereboom.us.
467 This action enables Java Script if it is currently disabled for this entry.
469 Shows all persistent and session entries in the JS whitelist.
470 .It Cm js show persistent
471 Shows all persistent entries in the JS whitelist.
472 .It Cm js show session
473 Shows all session entries in the JS whitelist.
474 .It Cm js toggle, js toggle fqdn
475 Toggle Java Script execution for the current FQDN.
476 .It Cm js toggle domain
477 Toggle Java Script execution for the current top level domain.
478 .It Cm open , op , o URL
482 .It Cm qa , qall , quitall
486 Close current tab and quit
488 if it is the last tab.
492 and reload all current tabs.
493 .It Cm run_script [path_to_script]
494 Runs the script path_to_script with the current uri as the argument.
495 If path_to_script is not provided, the value of default_script is used
497 .It Cm session , Cm session show
498 Display the current session name.
499 By default the session name is main_session.
500 To create a new session use the
503 A session is defined as the lifetime of the browser application.
504 .It Cm session delete <session_name>
505 Delete session session_name from persistent storage.
506 If session_name is the current session then the session will revert to
508 .It Cm session open <session_name>
509 Open session_name and close all currently open tabs.
510 Going forward this session is named session_name.
511 .It Cm session save <session_name>
512 Save current tabs to session_name session.
513 This will close the current session and going forward this session is named
516 The set command is used to inspect, clear or change runtime options.
517 There are 3 methods to use
519 When used by itself as
521 the command displays all options as currently set.
524 .Cm :set option=value .
526 .Cm :set http_proxy=http://127.0.0.1:8080 .
531 .Cm :set http_proxy= .
533 Note, not all options can be set at runtime.
535 Show blocked cookie statistics.
536 These statistics vary based on settings and are not persistent.
537 .It Cm statustoggle , statust
539 .It Cm tabclose , tabc
543 .It Cm tabnew , tabedit , tabe URL
544 Create new tab and optionally open provided URL.
545 .It Cm tabnext , tabn
547 .It Cm tabprevious , tabp
548 Go to the previous tab.
551 .It Cm toplevel , toplevel toggle
552 Toggle the top level domain name cookie and JS session whitelist.
553 This is to enable/disable short lived full site functionality without
554 permanently adding the top level domain to the persistent whitelist.
555 .It Cm urlhide , urlh
556 Hide url entry and tool bar.
557 .It Cm urlshow , urls
558 Show url entry and tool bar.
560 Save open tabs to current session.
561 The tabs will be restored next time the session is opened.
562 See the session command for additional details.
564 Save open tabs and quit.
565 The tabs will be restored next time
567 the session is opened.
568 See the session command for additional details.
571 In addition to shortcuts and commands
573 provides buffer commands. Buffer commands are short, multi character
574 vi-like commands, often requiring an argument. Partial buffer commands
576 displayed in the buffer command statusbar element (see
577 .Cm statusbar_elems ) .
578 Pressing Esc or switching to another tab cancels a partially entered
579 buffer command. In the following list
581 denotes the argument a buffer command accepts. Buffer commands are
582 defined as extended regular experssions.
583 Note that if a character is used as a shortcut it will not be interpreted
584 as the beginning of a buffer command. This is the case with
587 .Bl -tag -width "['][a-zA-Z0-9]XXX" -offset indent -compact
589 go to the top of the page
591 go to the bottom of the page
601 is missing, 1 is assumed. Going a
602 level up means going to a uri obtained from the current one by removing
603 the last slash ('/') character and everything that follows it
605 open the home page in the current tab
607 set a mark denoted by
609 at the current page position. These marks behave like those in vi or
611 .It Cm ['][a-zA-Z0-9]
612 go to the position where mark
616 set the current uri as quickmark
619 open the uri marked as quickmark
623 open the uri marked as quickmark
640 set zoom level to 100%
647 Quickmarks are like bookmarks, except they are refered to by a single
648 character (a letter or a digit), instead of a longer name. See the
653 buffer commands for usage. Quickmarks are stored in
654 .Pa ~/.xxxterm/quickmarks
655 and are saved automatically after each
659 The about screens are internally generated web pages by
661 for user interaction.
662 These are entered in the address bar and the format is
664 where screen is the desired screen to display.
665 For example about:favorites.
666 Any about screen can be used as the home page as specified by
668 in the configuration file.
670 .Bl -tag -width "downloadsXXX" -offset indent -compact
672 show the about screen
676 show the cookie whitelist screen
678 show the cookiejar screen
680 show the downloads screen
682 show the favorites screen
684 show the help web page
686 show the history screen
688 show the Java Script whitelist screen
690 show the settings screen
692 show the statistics screen
695 This section describes advanced usage settings.
696 Most users should use
700 and skip over this section.
703 has a number of whitelists to control blocking cookies and Java Script
704 execution for FQDNs or domains.
705 When properly enabled these whitelists require either the FQDN or top level
706 domain to exist in the whitelists in order to allow cookies to be stored or
707 Java Script to execute.
708 Both Java Script and cookies have two whitelists associated with them.
709 The whitelists are called session and persistent.
710 Items in the session whitelists are only allowed for the lifetime of the
713 Items in the persistent whitelists are stored on disk and are restored
716 Setting up the whitelists is a little tricky due to intricacies of WebKit.
717 In fact the semantics are different for cookies and Java Script.
719 Cookie whitelist requires the following configuration to be set:
721 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
722 .It Cm cookies_enabled
723 This is a WebKit setting and must be set to
726 in order to be able to use a
728 .It Cm enable_cookie_whitelist
729 This needs to be set to
731 to enable the cookie whitelist functionality.
733 These entries in the configuration file are the actual domains names in the
737 Java Script whitelist requires the following configuration to be set:
739 .Bl -tag -width "enable_js_whitelistXXX" -offset indent -compact
740 .It Cm enable_scripts
741 This is a WebKit setting and must be set to
744 in order to be able to use a
745 Java Script whitelist.
746 .It Cm enable_js_whitelist
747 This needs to be set to
749 to enable the Java Script whitelist functionality.
751 These entries in the configuration file are the actual domains names in the
752 Java Script whitelist.
757 section for additional configuration file entries and details
758 that alter runtime behavior.
760 .Bl -tag -width "/etc/xxxterm.confXXX" -compact
761 .It Pa ~/.xxxterm.conf
763 user specific settings.
770 tries to open the user specific file,
771 .Pa ~/.xxxterm.conf .
772 If that file is unavailable,
773 it then uses built-in defaults.
775 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
778 .Dl http_proxy = http://127.0.0.1:8080
780 Enabling or disabling an option is done by using 1 or 0 respectively.
782 The file supports the following keywords:
784 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
786 Defines an alias for a given URL, so that the URL is loaded when the alias is
787 entered in the address bar.
788 If the aliased URL includes a %s format specifier, then any argument given after
789 the alias on the address bar is substituted.
790 For example, if g,http://www.google.com/search?q=%s is defined as an alias,
791 then the URL http://www.google.com/search?q=foo is loaded when navigating to
793 .It Cm allow_volatile_cookies
794 If set cookies are stored in the session cache but will be discarded once
797 Unfortunately enabling this does allow for some limited tracking on the web.
799 When set a new tab is appended after the current tab instead of being appended
804 browser has 3 default operating modes:
812 mode the browser allows all cookies and Java Script as any other browser
814 This means that all cookies are saved to persistent storage and that all
817 On the other hand, using the
819 mode enables whitelists.
820 This requires the user to add all the required
825 If a domain does not appear in the whitelists
827 disallows cookies and Java Script execution.
831 mode the browse works just like
833 mode however the toolbar only has the backward, forward and home button.
835 This setting must be the first entry in
837 because it sets advanced settings that can be overridden later in the file.
838 See the default config file for more details.
840 Set the command prompt font.
842 .Pa cmd_font = monospace normal 9 .
844 This field delineates the cookie policy.
845 Possible values are: no3rdparty, reject 3rd party cookies.
846 accept, accept all cookies.
847 reject, reject all cookies.
849 This is a cookie whitelist item.
850 Use multiple times to add multiple entries.
851 Valid entries are for example *.moo.com and the equivalent .moo.com.
852 A fully qualified host is also valid and is for example www.moo.com.
853 .It Cm cookies_enabled
855 .It Cm ctrl_click_focus
856 Give focus in newly created tab instead of opening it in the background.
857 .It Cm default_script
858 Path to the script used as the default value for the run_script
860 .It Cm default_zoom_level
861 Set the default browsing zoom level.
863 Locations where files are downloaded to.
864 This directory must exist and
866 validates that during startup.
867 .It Cm enable_cookie_whitelist
868 When enabled all cookies must be in the whitelist or they are rejected.
869 Additionally whitelisted cookies also enable HTML5 local storage for the
871 .It Cm enable_js_whitelist
872 When enabled all domains must be in the js whitelist in order to run Java
877 .It Cm enable_plugins
879 .It Cm enable_scripts
882 When enabled the first instance of
884 will create a socket in the
887 Using the -n url option on subsequent
889 invocations will cause the specified URL to be loaded in a new tab.
890 Only a user with identical UID and GID can use this option.
891 .It Cm enable_localstorage
892 Enable html5 Local Storage.
893 .It Cm enable_spell_checking
894 Enables spell checking. Preferred languages can be set using
895 .Cm spell_check_languages
898 Set the default encoding.
900 .Pa encoding = ISO-8859-1 .
902 Enables a backward, forward, and stop button to the toolbar.
905 is set it'll enable an entry box for searches.
909 will try to guess if the string you entered, in the URI entry widget or
910 the command widget, is term you want to search for using search_string
912 If the string does not contain a dot nor a slash, is not a
913 path to a local file and does not resolves to an IP then it is assumed
915 .It Cm history_autosave
918 will save all command and search history.
921 the saved command and search history will be restored.
923 Homepage in URL format.
925 Proxy server in URL format.
929 if it is specified as an environment variable.
930 It must be noted that on older webkit versions one MUST use an IP address and
932 This works as expected with webkit 1.4.2.
934 If one desires to use a socks proxy then an intermediary tool must be used.
935 It has been reported that tsocks works with
938 Permits icon sizes to be changed if
941 Size 1 is small; 2 is normal; 3 through 6 are progressively larger.
943 This is a Java Script whitelist item.
946 for semantics and more details.
947 .It Cm max_connections
948 The maximum number of connections that
951 .It Cm max_host_connections
952 The maximum number of connections that
954 can open at once to a given host.
956 Sets an action for a specific or default MIME type.
957 For example, to download and view a pdf using kpdf set
958 .Pa mime_type = application/pdf,kpdf .
959 To set a default value use *, for example,
960 .Pa mime_type = video/*,mplayer .
961 Note that the action is only passed the URL and not all applications are
962 capable of dealing with a URL and therefore one might have to create a wrapper
963 script to download the content first. Alternatively one can add the
965 in front of the MIME type to indicate "download first".
967 .Pa mime_type = @application/pdf,xpdf .
970 is use the file will be downloaded to the
972 before the MIME handler is called.
974 Set the font used to display error messages.
976 .Pa oops_font = monospace normal 9 .
977 .It Cm read_only_cookies
978 Mark cookies file read-only and discard all cookies once the session is
980 .It Cm refresh_interval
981 Refresh interval while in the download manager.
984 Directory that contains various
986 resources such as icons.
987 This is OS-specific and should be handled by the porter.
988 .It Cm save_global_history
989 If set the global history will be saved to
990 .Pa ~/.xxxterm/history
992 and restored at startup.
995 section above for how the global history is accessed.
996 Global history is not saved to disk by default.
997 .It Cm save_rejected_cookies
998 Saves rejected cookies in cookie format in {work_dir}/rejected.txt.
999 All cookies are saved and unlike a cookie jar they are never replaced.
1000 Make sure there is enough disk space to enable this feature.
1001 .It Cm search_string
1002 Default search engine string.
1006 .It Cm session_autosave
1007 Enable session auto-saving when changing state (e.g. adding or removing a tab).
1008 The session name is what is currently in use and is described in the
1013 .It Cm session_timeout
1014 This value is the time that is added in seconds to a session cookie.
1016 Enable or disable showing tabs.
1018 Enable or disable showing the url and toolbar.
1019 .It Cm show_statusbar
1020 Enable or disable showing the status bar.
1021 .It Cm single_instance
1024 will be permitted to run.
1025 If there is a URL specified it will be opened in a new tab in the already
1029 .It Cm spell_check_languages
1030 The languages to be used for spell checking, separated by commas. For example,
1033 If set to a valid PEM file
1034 all server certificates will be validated against it.
1035 The URL bar will be colored green (or blue when saved ) when the certificate is
1036 trusted and yellow when untrusted.
1040 is not set then the URL bar will color all HTTPS connections red.
1042 WebKit only supports a single PEM file.
1043 Many OS' or distributions have many PEM files.
1044 One can simply concatenate all separate files into one large one.
1046 .Cm for i in `ls`; do cat $i >> cert.pem; done
1047 and use the resulting cert.pem file as the input to
1049 It is advisable to periodically recreate the cert.pem file.
1050 .It Cm ssl_strict_certs
1051 If this value is set connections to untrusted sites will be aborted.
1052 This value is only used if
1055 .It Cm statusbar_elems
1056 Define the components of the status bar. The possible components are:
1057 .Bd -literal -offset indent
1059 P - page progress percent
1063 The default is "BP".
1064 These components show nothing if there is nothing worth showing, like
1066 .It Cm statusbar_font
1067 Set the status bar font.
1069 .Pa statusbar_font = monospace normal 9 .
1071 Set the tab style to either
1073 - the default gtk notebook tabs, or
1076 You can switch the tab style with the
1080 Set the compact tab bar font.
1082 .Pa tabbar_font = monospace normal 9 .
1084 This is the regular expression that is used to match what constitutes a valid
1088 Set to override the default
1091 .It Cm window_height
1092 Set the default height of the browser window.
1094 Set the default width of the browser window.
1096 Set the work directory where all
1098 scratch files are stored.
1101 .It Cm xterm_workaround
1104 will look additionally at CUT_BUFFER0 if PRIMARY clipboard is empty.
1105 Additionally when the PRIMARY clipboard is cleared it will copy CUT_BUFFER0
1106 into the PRIMARY clipboard.
1111 was inspired by vimprobable2 and the bloat in other
1118 .An Marco Peereboom Aq marco@peereboom.us ,
1119 .An Stevan Andjelkovic Aq stevan@student.chalmers.se ,
1120 .An Edd Barrett Aq vext01@gmail.com ,
1121 .An Todd T. Fries Aq todd@fries.net ,
1122 .An Raphael Graf Aq r@undefined.ch ,
1124 .An Michal Mazurek Aq akfaew@jasminek.net .
1127 .Cm save_global_history
1130 is supposed to, in addition to restoring the global history, color the
1131 visited links accordingly; however due to bug #51747 in WebKit this does