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
229 Reload page without using any cached data
231 .It Cm Backspace, M-Left
234 .It Cm S-BackSpace, M-Right
241 Previous line on page
249 .It Cm Space, C-f, PageDown
251 .Pq Cm scrollpagedown
263 .Pq Cm scrollfarright
283 Toggle Java Script enabled for FQDN
289 Toggle cookie enabled for FQDN
294 supports tabbed browsing.
295 That is, web pages may be opened in separate tabs,
296 allowing the user to quickly move from one page to another,
298 These commands then are used to create, destroy, and move between tabs.
300 .Bl -tag -width "C-plus, C-equalXXX" -offset indent -compact
302 Open new tab with the clicked link
304 Create new tab with focus in URL entry
313 Go to the previous tab
321 .Pq Cm tabnext [1..0]
323 Shrink font size by one point
325 .It Cm C-plus, C-equal
326 Grow font size by one point
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.
384 Display CA certificates.
385 .It Cm cert , cert show
386 Download and display certificates of domain on tab.
388 Save certificate into a local store.
389 The next time the site is visited it is compared against the store.
390 If the certificate matches,
391 the address bar will be blue;
392 if it doesn't the bar will be red.
396 command is used to manipulate the cookie whitelist.
397 Used by itself it expands to
398 .Cm cookie show all .
400 Show cookie jar contents.
401 .It Cm cookie save, cookie save fqdn
402 Save the current fully qualified domain name (FQDN)
403 to the persistent whitelist.
405 the www.peereboom.us domain would result in saving .www.peereboom.us.
406 .It Cm cookie save domain
407 Save the top level domain name to the persistent whitelist.
409 the www.peereboom.us domain would result in saving .peereboom.us.
411 This action enables cookies if it is currently disabled for this entry.
412 .It Cm cookie show all
413 Show all persistent and session entries in the cookie whitelist.
414 .It Cm cookie show persistent
415 Show all persistent entries in the cookie whitelist.
416 .It Cm cookie show session
417 Show all session entries in the cookie whitelist.
418 .It Cm cookie toggle domain
419 Toggle cookie support for the current top level domain.
420 .It Cm cookie toggle, cookie toggle fqdn
421 Toggle cookie support for the current FQDN.
423 Show download manager.
427 Add the current page to favorites.
428 .It Cm fullscreen , f
429 Toggle hiding tabs and url entry toolbar.
430 .It Cm h , hist , history
439 command is used to manipulate the Java Script whitelist.
440 Used by itself it expands to
442 .It Cm js save, save fqdn
443 Saves the FQDN to the persistent whitelist.
445 the www.peereboom.us domain would result in saving .www.peereboom.us.
446 .It Cm js save domain
447 Saves the top level domain name to the persistent whitelist.
449 the www.peereboom.us domain would result in saving .peereboom.us.
451 This action enables Java Script if it is currently disabled for this entry.
453 Shows all persistent and session entries in the JS whitelist.
454 .It Cm js show persistent
455 Shows all persistent entries in the JS whitelist.
456 .It Cm js show session
457 Shows all session entries in the JS whitelist.
458 .It Cm js toggle, js toggle fqdn
459 Toggle Java Script execution for the current FQDN.
460 .It Cm js toggle domain
461 Toggle Java Script execution for the current top level domain.
462 .It Cm open , op , o URL
466 .It Cm qa , qall , quitall
470 Close current tab and quit
472 if it is the last tab.
476 and reload all current tabs.
477 .It Cm session , Cm session show
478 Display the current session name.
479 By default the session name is main_session.
480 To create a new session use the
483 A session is defined as the lifetime of the browser application.
484 .It Cm session delete <session_name>
485 Delete session session_name from persistent storage.
486 If session_name is the current session then the session will revert to
488 .It Cm session open <session_name>
489 Open session_name and close all currently open tabs.
490 Going forward this session is named session_name.
491 .It Cm session save <session_name>
492 Save current tabs to session_name session.
493 This will close the current session and going forward this session is named
496 Show blocked cookie statistics.
497 These statistics vary based on settings and are not persistent.
498 .It Cm statushide , statush
500 .It Cm statusshow , statuss
502 .It Cm tabclose , tabc
504 .It Cm tabhide , tabh
506 .It Cm tabnew , tabedit , tabe URL
507 Create new tab and optionally open provided URL.
508 .It Cm tabnext , tabn
510 .It Cm tabprevious , tabp
511 Go to the previous tab.
512 .It Cm tabshow , tabs
514 .It Cm toplevel , toplevel toggle
515 Toggle the top level domain name cookie and JS session whitelist.
516 This is to enable/disable short lived full site functionality without
517 permanently adding the top level domain to the persistent whitelist.
518 .It Cm urlhide , urlh
519 Hide url entry and tool bar.
520 .It Cm urlshow , urls
521 Show url entry and tool bar.
523 Save open tabs to current session.
524 The tabs will be restored next time
526 the session is opened.
527 See the session command for additional details.
529 Save open tabs and quit.
530 The tabs will be restored next time
532 the session is opened.
533 See the session command for additional details.
536 The about screens are internally generated web pages by
538 for user interaction.
539 These are entered in the address bar and the format is
541 where screen is the desired screen to display.
542 For example about:favorites.
543 Any about screen can be used as the home page as specified by
545 in the configuration file.
547 .Bl -tag -width "downloadsXXX" -offset indent -compact
549 show the about screen
553 show the cookie whitelist screen
555 show the cookiejar screen
557 show the downloads screen
559 show the favorites screen
561 show the help web page
563 show the history screen
565 show the Java Script whitelist screen
567 show the settings screen
569 show the statistics screen
572 This section descibes advanced usage settings.
573 Most users should use
577 and skip over this section.
580 has a number of whitelists to control blocking cookies and Java Script
581 execution for FQDNs or domains.
582 When properly enabled these whitelists require either the FQDN or top level
583 domain to exist in the whitelists in order to allow cookies to be stored or
584 Java Script to execute.
585 Both Java Script and cookies have two whitelists associated with them.
586 The whitelists are called session and persistent.
587 Items in the session whitelists are only allowed for the lifetime of the
590 Items in the persistent whitelists are stored on disk and are restored
593 Setting up the whitelists is a little tricky due to intricacies of WebKit.
594 In fact the semantics are different for cookies and Java Script.
596 Cookie whitelist requires the following configuration to be set:
598 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
599 .It Cm cookies_enabled
600 This is a WebKit setting and must be set to
603 in order to be able to use a
605 .It Cm enable_cookie_whitelist
606 This needs to be set to
608 to enable the cookie whitelist functionality.
610 These entries in the configuration file are the actual domains names in the
614 Java Script whitelist requires the following configuration to be set:
616 .Bl -tag -width "enable_js_whitelistXXX" -offset indent -compact
617 .It Cm enable_scripts
618 This is a WebKit setting and must be set to
621 in order to be able to use a
622 Java Script whitelist.
623 .It Cm enable_js_whitelist
624 This needs to be set to
626 to enable the Java Script whitelist functionality.
628 These entries in the configuration file are the actual domains names in the
629 Java Script whitelist.
634 section for additional configuration file entries and details
635 that alter runtime behavior.
637 .Bl -tag -width "/etc/xxxterm.confXXX" -compact
638 .It Pa ~/.xxxterm.conf
640 user specific settings.
647 tries to open the user specific file,
648 .Pa ~/.xxxterm.conf .
649 If that file is unavailable,
650 it then uses built-in defaults.
652 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
655 .Dl http_proxy = http://127.0.0.1:8080
657 Enabling or disabling an option is done by using 1 or 0 respectively.
659 The file supports the following keywords:
661 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
663 Defines an alias for a given URL, so that the URL is loaded when the alias is
664 entered in the address bar.
665 If the aliased URL includes a %s format specifier, then any argument given after
666 the alias on the address bar is substituted.
667 For example, if g,http://www.google.com/search?q=%s is defined as an alias,
668 then the URL http://www.google.com/search?q=foo is loaded when navigating to
670 .It Cm allow_volatile_cookies
671 If set cookies are stored in the session cache but will be discarded once
674 Unfortunately enabling this does allow for some limited tracking on the web.
676 When set a new tab is appended after the current tab instead of being appended
681 browser has 3 default operating modes:
689 mode the browser allows all cookies and Java Script as any other browser
691 This means that all cookies are saved to persistent storage and that all
694 On the other hand, using the
696 mode enables whitelists.
697 This requires the user to add all the required
702 If a domain does not appear in the whitelists
704 disallows cookies and Java Script execution.
708 mode the browse works just like
710 mode however the toolbar only has the backward, forward and home button.
712 This setting must be the first entry in
714 because it sets advanced settings that can be overridden later in the file.
715 See the default config file for more details.
717 This field delineates the cookie policy.
718 Possible values are: no3rdparty, reject 3rd party cookies.
719 accept, accept all cookies.
720 reject, reject all cookies.
722 This is a cookie whitelist item.
723 Use multiple times to add multiple entries.
724 Valid entries are for example *.moo.com and the equivalent .moo.com.
725 A fully qualified host is also valid and is for example www.moo.com.
726 .It Cm cookies_enabled
728 .It Cm ctrl_click_focus
729 Give focus in newly created tab instead of opening it in the background.
730 .It Cm default_font_size
731 Set the default browsing font size.
732 .It Cm default_zoom_level
733 Set the default browsing zoom level.
735 Locations where files are downloaded to.
736 This directory must exist and
738 validates that during startup.
739 .It Cm enable_cookie_whitelist
740 When enabled all cookies must be in the whitelist or they are rejected.
741 .It Cm enable_js_whitelist
742 When enabled all domains must be in the js whitelist in order to run Java Script.
746 .It Cm enable_plugins
748 .It Cm enable_scripts
751 When enabled the first instance of
753 will create a socket in the
756 Using the -n url option on subsequent
758 invocations will cause the specified URL to be loaded in a new tab.
759 Only a user with identical UID and GID can use this option.
760 .It Cm enable_spell_checking
761 Enables spell checking. Preferred languages can be set using
762 .Cm spell_check_languages
765 Enables a backward, forward, and stop button to the toolbar.
768 is set it'll enable an entry box for searches.
772 will try to guess if the string you entered, in the URI entry widget or
773 the command widget, is term you want to search for using search_string
775 If the string does not contain a dot nor a slash, is not a
776 path to a local file and does not resolves to an IP then it is assumed
779 Homepage in URL format.
781 Proxy server in URL format.
785 if it is specified as an environment variable.
786 It must be noted that one MUST use an IP address and not a FQDN.
788 If one desires to use a socks proxy then an intermediary tool must be used.
789 It has been reported that tsocks works with
792 Permits icon sizes to be changed if
795 Size 1 is small; 2 is normal; 3 through 6 are progressively larger.
797 This is a Java Script whitelist item.
800 for semantics and more details.
801 .It Cm max_connections
802 The maximum number of connections that
805 .It Cm max_host_connections
806 The maximum number of connections that
808 can open at once to a given host.
810 Sets an action for a specific or default MIME type.
811 For example, to download and view a pdf using kpdf set
812 .Pa mime_type = application/pdf,kpdf .
813 To set a default value use *, for example,
814 .Pa mime_type = video/*,mplayer .
815 Note that the action is only passed the URL and not all applications are
816 capable of dealing with a URL and therefore one might have to create a wrapper
817 script to download the content first. Alternatively one can add the
819 in front of the MIME type to indicate "download first".
821 .Pa mime_type = @application/pdf,xpdf .
824 is use the file will be downloaded to the
826 before the MIME handler is called.
827 .It Cm read_only_cookies
828 Mark cookies file read-only and discard all cookies once the session is
830 .It Cm refresh_interval
831 Refresh interval while in the download manager.
834 Directory that contains various
836 resources such as icons.
837 This is OS-specific and should be handled by the porter.
838 .It Cm save_global_history
839 If set the global history will be saved to
840 .Pa ~/.xxxterm/history
842 and restored at startup.
845 section above for how the global history is accessed.
846 Global history is not saved to disk by default.
847 .It Cm save_rejected_cookies
848 Saves rejected cookies in cookie format in {work_dir}/rejected.txt.
849 All cookies are saved and unlike a cookie jar they are never replaced.
850 Make sure there is enough disk space to enable this feature.
852 Default search engine string.
856 .It Cm session_autosave
857 Enable session auto-saving when changing state (e.g. adding or removing a tab).
858 The session name is what is currently in use and is described in the
863 .It Cm session_timeout
864 This value is the time that is added in seconds to a session cookie.
866 Enable or disable showing tabs.
868 Enable or disable showing the url and toolbar.
869 .It Cm show_statusbar
870 Enable or disable showing the status bar.
871 .It Cm single_instance
874 will be permitted to run.
875 If there is a URL specified it will be opened in a new tab in the already
879 .It Cm spell_check_languages
880 The languages to be used for spell checking, separated by commas. For example, en_US.
882 If set to a valid PEM file
883 all server certificates will be validated against it.
884 The URL bar will be colored green when the certificate is trusted
885 and yellow when untrusted.
889 is not set then the URL bar will color all HTTPS connections red.
890 .It Cm ssl_strict_certs
891 If this value is set connections to untrusted sites will be aborted.
892 This value is only used if
896 Set to override the default
900 Set the default height of the browser window.
902 Set the default width of the browser window.
904 Set the work directory where all
906 scratch files are stored.
912 was inspired by vimprobable2 and the bloat in other
919 .An Marco Peereboom Aq marco@peereboom.us ,
920 .An Stevan Andjelkovic Aq stevan@student.chalmers.se ,
921 .An Edd Barrett Aq vext01@gmail.com ,
923 .An Todd T. Fries Aq todd@fries.net .
926 .Cm save_global_history
929 is supposed to, in addition to restoring the global history, color the
930 visited links accordingly; however due to bug #51747 in WebKit this does