fix unamerican keyboards from Raphael Graf <r@undefined.ch>
[xxxterm.git] / xxxterm.1
bloba4cf46afd269640df2fce7c6dd569e55ead87cb9
1 .\"     $xxxterm$
2 .\"
3 .\" Copyright (c) 2010, 2011 Marco Peereboom <marco@peereboom.us>
4 .\" Copyright (c) 2011 Jason McIntyre <jmc@kerhand.co.uk>
5 .\"
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.
9 .\"
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.
17 .\"
18 .Dd $Mdocdate$
19 .Dt XXXTERM 1
20 .Os
21 .Sh NAME
22 .Nm xxxterm
23 .Nd lightweight web browser
24 .Sh SYNOPSIS
25 .Nm xxxterm
26 .Bk -words
27 .Op Fl nSTtV
28 .Op Fl f Ar file
29 .Op Fl s Ar session_name
30 .Op Ar url ...
31 .Ek
32 .Sh DESCRIPTION
33 .Nm
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
37 configuration.
38 It was written by hackers for hackers
39 and it strives to be small, compact, and fast.
40 .Pp
41 .Nm
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
45 .Xr vi 1
46 text editor,
47 giving web browsing a similar feel to navigating a text document.
48 The
49 .Sx KEY BINDINGS
50 section below documents the various defaults and possible customizations.
51 .Pp
52 The options are as follows:
53 .Bl -tag -width Ds
54 .It Fl f Ar file
55 Specify an alternative configuration file.
56 .It Fl S
57 Disable the toolbar.
58 .It Fl s Ar session_name
59 Open session that was saved with ":session save" command.
60 .It Fl T
61 Disable visualization of tabs.
62 .It Fl t
63 Disable tabs.
64 .It Fl n
65 Open a new tab in a running
66 .Nm
67 for each specified URL.
68 This option requires
69 .Cm enable_socket
70 to be enabled.
71 .It Fl V
72 Display version and exit.
73 .El
74 .Sh FAST STARTUP
75 The following notation is used throughout this page:
76 .Pp
77 .Bl -tag -width Ds -offset indent -compact
78 .It Cm C
79 Control
80 .It Cm M
81 Meta (sometimes marked Alt)
82 .It Cm M1
83 Mouse button 1
84 .It Cm S
85 Shift
86 .El
87 .Pp
88 To browse to a specific address,
89 either use the mouse to click on the address bar
90 or press
91 .Cm F6
92 to shift the keyboard focus to the address bar.
93 The address is then entered manually.
94 .Pp
95 The mouse can be used to navigate the page in the traditional manner,
96 or the keyboard can be used instead.
97 For example,
98 .Cm PageUp
99 and
100 .Cm PageDown
101 will scroll up and down the page.
103 To follow a link,
104 either click on it or use the
105 .Cm f
106 key and have
108 assign numbers to each link on the page;
109 entering that number on the keyboard will prompt
111 to follow the link.
112 .Sh KEY BINDINGS
114 provides many actions accessed via key or mouse bindings.
115 Note that WebKit & GTK+ have their own set of key bindings
116 that are not overruled and therefore are available as-is.
117 .Ss Search Commands
118 These commands are used to search for text strings within a web page.
120 .Bl -tag -width Ds -offset indent -compact
121 .It Cm /
122 Start a search
123 .It Cm \&?
124 Start a backwards search
125 .It Cm n
126 Next item matching search
127 .It Cm N
128 Previous item matching search
130 .Ss Focus Commands
131 These commands are used to shift the focus of
133 from one area to another.
135 .Bl -tag -width Ds -offset indent -compact
136 .It Cm F6
137 Focus on address bar
138 .It Cm F7
139 Focus on search entry
141 .Ss Command Aliases
142 These commands allow the user to map specific actions to specific keys.
143 It can be useful when the
144 .Fl S
145 option is used.
147 .Bl -tag -width Ds -offset indent -compact
148 .It Cm F9
149 Alias for ":open"
150 .It Cm F10
151 Alias for ":open current-uri"
152 .It Cm F11
153 Alias for ":tabnew"
154 .It Cm F12
155 Alias for ":tabnew current-uri"
157 .Ss Navigation Commands
158 These commands allow the user to navigate web pages and,
159 to some extent,
160 control the browser.
162 .Bl -tag -width "Space, C-f, PageDownXXX" -offset indent -compact
163 .It Cm F5, C-r, C-l
164 Reload page
165 .It Cm C-R
166 Reload page without using any cached data
167 .It Cm Backspace, M-Left
168 Previous page
169 .It Cm S-BackSpace, M-Right
170 Forward page
171 .It Cm j, Down
172 Next line on page
173 .It Cm k, Up
174 Previous line on page
175 .It Cm G, End
176 Bottom of page
177 .It Cm gg, Home
178 Top of page
179 .It Cm Space, C-f, PageDown
180 Page down
181 .It Cm C-b, PageUp
182 Page up
183 .It Cm l, Right
184 Page right
185 .It Cm h, Left
186 Page left
187 .It Cm $
188 Page far right
189 .It Cm 0
190 Page far left
191 .It Cm M-f
192 Favorites
193 .It Cm M-j
194 Cookie jar
195 .It Cm M-d
196 Download manager
197 .It Cm C-p
198 Print page
199 .It Cm M-h
200 Global history
201 .It Cm C-j
202 Toggle Java Script enabled for FQDN.
203 .It Cm C-s
204 Toggle source view
205 .It Cm M-c
206 Toggle cookie enabled for FQDN.
208 .Ss Tab Manipulation
210 supports tabbed browsing.
211 That is, web pages may be opened in separate tabs,
212 allowing the user to quickly move from one page to another,
213 and back.
214 These commands then are used to create, destroy, and move between tabs.
216 .Bl -tag -width "C-plus, C-equalXXX" -offset indent -compact
217 .It Cm C-M1
218 Open new tab with the clicked link
219 .It Cm C-t
220 Create new tab with focus in URL entry
221 .It Cm C-w
222 Destroy current tab
223 .It Cm U
224 Undo close tab
225 .It Cm C-Left
226 Go to the previous tab
227 .It Cm C-Right
228 Go to the next tab
229 .It Cm C-[1..0]
230 Jump to page
231 .Ar N
232 .It Cm C-minus
233 Shrink font size by one point
234 .It Cm C-plus, C-equal
235 Grow font size by one point
237 .Ss Yanking and pasting
238 These commands copy and paste text to and from the clipboard.
240 .Bl -tag -width Ds -offset indent -compact
241 .It Cm p
242 Paste the contents of the clipboard into the address bar
243 .It Cm P
244 Paste the contents of the clipboard into a new tab
245 .It Cm y
246 Yank the current URL into the clipboard
248 .Ss Hyperlink Following
249 This allows the user to follow hyperlinks
250 without using a mouse.
251 Enter the corresponding number to follow the link.
252 Alternatively one can type the name of the link and when there are no more
253 possibilities
255 will follow the link.
257 .Bl -tag -width Ds -offset indent -compact
258 .It Cm f
259 Highlight all links and prefix them with a number.
261 .Ss Exiting
262 Commands to exit the browser.
264 .Bl -tag -width Ds -offset indent -compact
265 .It Cm C-q
266 Quit
268 .Sh COMMAND MODE
269 Command mode works in a similar fashion to the
270 .Xr vi 1
271 editor;
272 it is entered by typing a colon and exited by typing Esc.
273 The commands and their descriptions are listed below.
274 .Bl -tag -width Ds -offset indent
275 .It Cm about , version
276 Show the "About" page.
277 .It Cm ca
278 Display CA certificates.
279 .It Cm cert , cert show
280 Download and display certificates of domain on tab.
281 .It Cm cert save
282 Save certificate into a local store.
283 The next time the site is visited it is compared against the store.
284 If the certificate matches,
285 the address bar will be blue;
286 if it doesn't the bar will be red.
287 .It Cm cookie
289 .Cm cookie
290 command is used to manipulate the cookie whitelist.
291 Used by itself it expands to
292 .Cm cookie show all .
293 .It Cm cookies
294 Show cookie jar contents.
295 .It Cm cookie save, cookie save fqdn
296 Save the current fully qualified domain name (FQDN)
297 to the persistent whitelist.
298 For example,
299 the www.peereboom.us domain would result in saving .www.peereboom.us.
300 .It Cm cookie save domain
301 Save the top level domain name to the persistent whitelist.
302 For example,
303 the www.peereboom.us domain would result in saving .peereboom.us.
305 This action enables cookies if it is currently disabled for this entry.
306 .It Cm cookie show all
307 Show all persistent and session entries in the cookie whitelist.
308 .It Cm cookie show persistent
309 Show all persistent entries in the cookie whitelist.
310 .It Cm cookie show session
311 Show all session entries in the cookie whitelist.
312 .It Cm cookie toggle domain
313 Toggle cookie support for the current top level domain.
314 .It Cm cookie toggle, cookie toggle fqdn
315 Toggle Java Script execution for the current FQDN.
316 .It Cm dl
317 Show download manager.
318 .It Cm fav
319 Show favorites.
320 .It Cm favadd
321 Add the current page to favorites.
322 .It Cm fullscreen , f
323 Toggle hiding tabs and url entry toolbar.
324 .It Cm h , hist , history
325 Show global history.
326 .It Cm help
327 Show help page.
328 .It Cm home
329 Go to home URL.
330 .It Cm js
332 .Cm js
333 command is used to manipulate the Java Script whitelist.
334 Used by itself it expands to
335 .Cm js show all .
336 .It Cm js save, save fqdn
337 Saves the FQDN to the persistent whitelist.
338 For example,
339 the www.peereboom.us domain would result in saving .www.peereboom.us.
340 .It Cm js save domain
341 Saves the top level domain name to the persistent whitelist.
342 For example,
343 the www.peereboom.us domain would result in saving .peereboom.us.
345 This action enables Java Script if it is currently disabled for this entry.
346 .It Cm js show all
347 Shows all persistent and session entries in the JS whitelist.
348 .It Cm js show persistent
349 Shows all persistent entries in the JS whitelist.
350 .It Cm js show session
351 Shows all session entries in the JS whitelist.
352 .It Cm js toggle, js toggle fqdn
353 Toggle Java Script execution for the current FQDN.
354 .It Cm js toggle domain
355 Toggle Java Script execution for the current top level domain.
356 .It Cm open , op , o URL
357 Open URL.
358 .It Cm print
359 Print page.
360 .It Cm qa , qa! , q!
361 Quit
362 .Nm .
363 .It Cm quit , q
364 Close current tab and quit
366 if it is the last tab.
367 .It Cm restart
368 Restart
370 and reload all current tabs.
371 .It Cm session , Cm session show
372 Display the current session name.
373 By default the session name is main_session.
374 To create a new session use the
375 .Cm session save
376 command.
377 A session is defined as the lifetime of the browser application.
378 .It Cm session delete <session_name>
379 Delete session session_name from persistent storage.
380 If session_name is the current session then the session will revert to
381 main_session.
382 .It Cm session open <session_name>
383 Open session_name and close all currently open tabs.
384 Going forward this session is named session_name.
385 .It Cm session save <session_name>
386 Save current tabs to session_name session.
387 This will close the current session and going forward this session is named
388 session_name.
389 .It Cm stats
390 Show blocked cookie statistics.
391 These statistics vary based on settings and are not persistent.
392 .It Cm statushide , statush
393 Hide status bar.
394 .It Cm statusshow , statuss
395 Show status bar.
396 .It Cm tabclose , tabc
397 Close current tab.
398 .It Cm tabhide , tabh
399 Hide tabs.
400 .It Cm tabnew , tabedit , tabe URL
401 Create new tab and optionally open provided URL.
402 .It Cm tabnext , tabn
403 Go to the next tab.
404 .It Cm tabprevious , tabp
405 Go to the previous tab.
406 .It Cm tabshow , tabs
407 Show tabs.
408 .It Cm urlhide , urlh
409 Hide url entry and tool bar.
410 .It Cm urlshow , urls
411 Show url entry and tool bar.
412 .It Cm w
413 Save open tabs to current session.
414 The tabs will be restored next time
416 the session is opened.
417 See the session command for additional details.
418 .It Cm wq , wq!
419 Save open tabs and quit.
420 The tabs will be restored next time
422 the session is opened.
423 See the session command for additional details.
425 .Sh WHITELISTS
427 has a number of whitelists to control blocking cookies and Java Script
428 execution for FQDNs or domains.
429 When properly enabled these whitelists require either the FQDN or top level
430 domain to exist in the whitelists in order to allow cookies to be stored or
431 Java Script to execute.
432 Both Java Script and cookies have two whitelists associated with them.
433 The whitelists are called session and persistent.
434 Items in the session whitelists are only allowed for the lifetime of the
436 instance.
437 Items in the persistent whitelists are stored on disk and are restored
438 upon restarting.
440 Setting up the whitelists is a little tricky due to intricacies of WebKit.
441 In fact the semantics are different for cookies and Java Script.
443 Cookie whitelist requires the following configuration to be set:
444 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
445 .It Cm cookies_enabled
446 This is a WebKit setting and must be set to
447 .Pa 1 (ENABLED)
448 in order to be able to use a
449 cookie whitelist.
450 .It Cm enable_cookie_whitelist
451 This needs to be set to
452 .Pa 1
453 to enable the cookie whitelist functionality.
454 .It Cm cookie_wl
455 These entries in the configuration file are the actual domains names in the
456 cookie whitelist.
459 Java Script whitelist requires the following configuration to be set:
460 .Bl -tag -width "enable_js_whitelistXXX" -offset indent -compact
461 .It Cm enable_scripts
462 This is a WebKit setting and must be set to
463 .Pa 0 (DISABLED)
464 in order to be able to use a
465 Java Script whitelist.
466 .It Cm enable_js_whitelist
467 This needs to be set to
468 .Pa 1
469 to enable the Java Script whitelist functionality.
470 .It Cm js_wl
471 These entries in the configuration file are the actual domains names in the
472 Java Script whitelist.
475 See the
476 .Pa FILES
477 section for additional configuration file entries and details
478 that alter runtime behavior.
480 .Sh FILES
481 .Bl -tag -width "/etc/xxxterm.confXXX" -compact
482 .It Pa ~/.xxxterm.conf
484 user specific settings.
485 .It Pa ~/.xxxterm
487 scratch directory.
491 tries to open the user specific file,
492 .Pa ~/.xxxterm.conf .
493 If that file is unavailable,
494 it then uses built-in defaults.
496 The format of the file is \*(Ltkeyword\*(Gt = \*(Ltsetting\*(Gt.
497 For example:
499 .Dl http_proxy = http://127.0.0.1:8080
501 Enabling or disabling an option is done by using 1 or 0 respectively.
503 The file supports the following keywords:
505 .Bl -tag -width "enable_cookie_whitelistXXX" -offset indent -compact
506 .It Cm alias
507 Defines an alias for a given URL, so that the URL is loaded when the alias is
508 entered in the address bar.
509 If the aliased URL includes a %s format specifier, then any argument given after
510 the alias on the address bar is substituted.
511 For example, if g,http://www.google.com/search?q=%s is defined as an alias,
512 then the URL http://www.google.com/search?q=foo is loaded when navigating to
513 "g foo".
514 .It Cm allow_volatile_cookies
515 If set cookies are stored in the session cache but will be discarded once
517 exits.
518 Unfortunately enabling this does allow for some limited tracking on the web.
519 .It Cm append_next
520 When set a new tab is appended after the current tab instead of being appended
521 as the last tab.
522 .It Cm browser_mode
525 browser has 2 default operating modes:
526 .Pa normal
527 (the default) or
528 .Pa whitelist.
529 In the
530 .Pa normal
531 mode the browser allows all cookies and Java Script as any other browser
532 would.
533 This means that all cookies are saved to persistent storage and that all
534 Java Script runs.
536 On the other hand, using the
537 .Pa whitelist
538 mode enables whitelists.
539 This requires the user to add all the required
540 .Pa cookie_wl
542 .Pa js_wl
543 items.
544 If a domain does not appear in the whitelists
546 disallows cookies and Java Script execution.
548 This setting must be the first entry in
549 .Pa ~/.xxxterm.conf
550 because it sets advanced settings that can be overridden later in the file.
551 See the default config file for more details.
552 .It Cm cookie_policy
553 This field delineates the cookie policy.
554 Possible values are: no3rdparty, reject 3rd party cookies.
555 accept, accept all cookies.
556 reject, reject all cookies.
557 .It Cm cookie_wl
558 This is a cookie whitelist item.
559 Use multiple times to add multiple entries.
560 Valid entries are for example *.moo.com and the equivalent .moo.com.
561 A fully qualified host is also valid and is for example www.moo.com.
562 .It Cm cookies_enabled
563 Enable cookies.
564 .It Cm ctrl_click_focus
565 Give focus in newly created tab instead of opening it in the background.
566 .It Cm default_font_size
567 Set the default browsing font size.
568 .It Cm download_dir
569 Locations where files are downloaded to.
570 This directory must exist and
572 validates that during startup.
573 .It Cm enable_cookie_whitelist
574 When enabled all cookies must be in the whitelist or they are rejected.
575 .It Cm enable_js_whitelist
576 When enabled all domains must be in the js whitelist in order to run Java Script.
577 NOTE: Make sure
578 .Cm enable_scripts
579 is set to 0.
580 .It Cm enable_plugins
581 Enable plugins.
582 .It Cm enable_scripts
583 Enable scripts.
584 .It Cm enable_socket
585 When enabled the first instance of
587 will create a socket in the
588 .Pa ~/.xxxterm
589 directory.
590 Using the -n url option on subsequent
592 invocations will cause the specified URL to be loaded in a new tab.
593 Only a user with identical UID and GID can use this option.
594 .It Cm fancy_bar
595 Enables a backward, forward, and stop button to the toolbar.
596 Additionally if
597 .Cm search_string
598 is set it'll enable an entry box for searches.
599 .It Cm guess_search
600 When enabled
602 will try to guess if the string you entered, in the URI entry widget or
603 the command widget, is term you want to search for using search_string
604 (see above). If the string does not contain a dot nor a slash, is not a
605 path to a local file and does not resolves to an IP then it is assumed
606 to be a search term.
607 .It Cm home
608 Homepage in URL format.
609 .It Cm http_proxy
610 Proxy server in URL format.
612 overrides
613 .Cm http_proxy
614 if it is specified as an environment variable.
615 It must be noted that one MUST use an IP address and not a FQDN.
617 If one desires to use a socks proxy then an intermediary tool must be used.
618 It has been reported that tsocks works with
619 .Nm .
620 .It Cm icon_size
621 Permits icon sizes to be changed if
622 .Cm fancy_bar
623 is enabled.
624 Size 1 is small; 2 is normal; 3 through 6 are progressively larger.
625 .It Cm js_wl
626 This is a Java Script whitelist item.
628 .Cm cookie_wl
629 for semantics and more details.
630 .It Cm mime_type
631 Sets an action for a specific or default MIME type.
632 For example, to download and view a pdf using kpdf set mime_type =
633 application/pdf,kpdf.
634 To set a default value use *, for example mime_type = video/*,mplayer.
635 Note that the action is only passed the URL and not all applications are
636 capable of downloading content and therefore one might have to create a wrapper
637 script to download the content first.
638 .It Cm read_only_cookies
639 Mark cookies file read-only and discard all cookies once the session is
640 terminated.
641 .It Cm refresh_interval
642 Refresh interval while in the download manager.
643 The default is 10.
644 .It Cm resource_dir
645 Directory that contains various
647 resources such as icons.
648 This is OS-specific and should be handled by the porter.
649 .It Cm save_global_history
650 If set the global history will be saved to
651 .Pa ~/.xxxterm/history
652 when quitting
653 and restored at startup.
654 See the
655 .Sx KEY BINDINGS
656 section above for how the global history is accessed.
657 Global history is not saved to disk by default.
658 .It Cm save_rejected_cookies
659 Saves rejected cookies in cookie format in {work_dir}/rejected.txt.
660 All cookies are saved and unlike a cookie jar they are never replaced.
661 Make sure there is enough disk space to enable this feature.
662 .It Cm search_string
663 Default search engine string.
664 See the
665 .Pa xxxterm.conf
666 file for details.
667 .It Cm session_autosave
668 Enable session auto-saving when changing state (e.g. adding or removing a tab).
669 The session name is what is currently in use and is described in the
670 .Cm session save
672 .Cm session open
673 commands.
674 .It Cm session_timeout
675 This value is the time that is added in seconds to a session cookie.
676 .It Cm show_tabs
677 Enable or disable showing tabs.
678 .It Cm show_url
679 Enable or disable showing the url and toolbar.
680 .It Cm show_statusbar
681 Enable or disable showing the status bar.
682 .It Cm single_instance
683 If set only one
685 will be permitted to run.
686 If there is a URL specified it will be opened in a new tab in the already
687 running
689 session.
690 .It Cm ssl_ca_file
691 If set to a valid PEM file
692 all server certificates will be validated against it.
693 The URL bar will be colored green when the certificate is trusted
694 and yellow when untrusted.
697 .Cm ssl_ca_file
698 is not set then the URL bar will color all HTTPS connections red.
699 .It Cm ssl_strict_certs
700 If this value is set connections to untrusted sites will be aborted.
701 This value is only used if
702 .Cm ssl_ca_file
703 is set.
704 .It Cm user_agent
705 Set to override the default
707 user-agent string.
708 .It Cm window_height
709 Set the default height of the browser window.
710 .It Cm window_width
711 Set the default width of the browser window.
713 .Sh HISTORY
715 was inspired by vimprobable2 and the bloat in other
717 web browsers.
718 .Sh AUTHORS
719 .An -nosplit
721 was written by
722 .An Marco Peereboom Aq marco@peereboom.us ,
723 .An Stevan Andjelkovic Aq stevan@student.chalmers.se ,
724 .An Edd Barrett Aq vext01@gmail.com ,
726 .An Todd T. Fries Aq todd@fries.net .
727 .Sh BUGS
728 When
729 .Cm save_global_history
730 is enabled
732 is supposed to, in addition to restoring the global history, color the
733 visited links accordingly; however due to bug #51747 in WebKit this does
734 not happen.