Merge branch 'experimental' into bf2
[uzbl-mobile] / docs / FAQ
1 FAQ
2 ---
3
4 ### I just installed uzbl but it doesn't do much.  What now?
5 Uzbl includes very limited default settings (statusbar settings, but no keybinds, history/download handlers etc.)
6 Look at /usr/share/uzbl/docs/config.h to see the default settings.
7 Have a look in /usr/share/uzbl/examples/configs to see what you can do.
8
9 If you save a config as $XDG\_CONFIG\_HOME/uzbl/config it will be loaded automatically.
10 Running with the `--verbose` flag on a command line can also be interesting.
11 To get you started, try this:
12 `XDG_DATA_HOME=/usr/share/uzbl/examples/data XDG_CONFIG_HOME=/usr/share/uzbl/examples/config uzbl`
13 It will temporarily override your $XDG\_CONFIG\_HOME and $XDG\_DATA\_HOME
14 variables so you can try the sample stuff directly in /usr/share/uzbl/examples.
15 If you like what you can do, you can copy the sample stuff into your ~ and edit to your liking.
16
17 ### Why don't you just use a reasonable config by default?
18 We actually did some attempts to make uzbl "usable by default" but in the
19 end we had to conclude it cannot be done because of the following reasons:
20
21  * We don't want to store anything "automagically" in the users home.
22    Some people prefer different file/directory layouts, most of just want to
23    control the files in $HOME themselves.
24  * We considered the option of having a global '/etc/uzbl' which user
25    specific ones could override but that would overcomplicate things.
26  * We adhere to the [FHS](http://www.pathname.com/fhs/) (`man hier`), so
27    `uzbl -c /usr/share/...` is not an option.
28
29 So even though we would like to make uzbl more usable by default, we think
30 there is no sensible way to do it.  Maybe downstream packagers could provide
31 a note that users could copy the examples from /usr/share/uzbl/examples into
32 their homes, because really, that's all that is needed if you want it to
33 just "work" without controlling how yourself. (unless you have no
34 xdg variables set, in which case you should be smart enough to edit the sample
35 config yourself).
36
37 ### Where is the location bar? How do I change the URL ?
38 Uzbl has no location bar.  All changes to the uri (editing of current uri, typing new uri, loading of uri from bookmarks/history/...) happens *outside* of uzbl.
39 Have a look at the sample scripts in /usr/share/uzbl/examples.  Most of our examples use dmenu which is a nifty little tool to pick an item from a list of items (very
40 useful with history/bookmarks) with a limited set of keystrokes.  see man dmenu.
41 You can also use it to make edits to a uri (press tab to load it into the
42 search field) or type a url from scratch, though dmenu
43 is not the most suitable editor. We're looking into a better way to make edits.
44 Tools such as Zenity are also quite suited for this.
45 And you can always make keybinds to load the current uri in the command field, paste/load urls from
46 clipboard etc.
47
48 ### Where are the widgets (forward, back,.. button etc)
49 Uzbl's layout only contains what you really need to see.  we only have a statusbar, which even can also be disabled.  There are no buttons, but we do
50 have lots of keybinding possibilities.
51
52 ### No tabs? Why do you need a new window for each page?
53 We stick to "one page per uzbl instance" because that's a simple, clean and flexible method.  We believe "multiple instances management" is something that must
54 be handled outside of uzbl by a separate/different program.  Here are some solutions:
55
56  * Many window managers can (and should) handle this by default.  Xmonads tabbed layout, Wmii's stacked layout, fluxbox or kwin tabs and so on.
57  * Uzbl supports acting as a GtkPlug to plug into GtkSockets (Xembed) so you can embed uzbl instances in other Gtk applications.
58    This allows several implementatinos, a popular one is [uzbl_tabbed.py](http://www.uzbl.org/wiki/uzbl_tabbed)
59  * If you want highest customizablity, you need the 3rd option:
60    You can also write a custom script.  The only thing you need to do is focus/maximize the instance you want,
61    keep the others out of sight and use tools like dmenu and wmctrl to switch instances.
62    This allows you to use application-specific properties (such as uzbl tag, name etc).
63    For more information about this approach, see docs/multiple-instances-management.
64    (If you want to work on such script, let us know and we might include it along with the other sample scripts)
65
66 ### What?  No support for bookmarks/history/downloads/cookies/... ? Your project sucks!
67 We do not support *management* of those things, because we believe a browser should only do browsing.  We are firm believers in the unix philosophy.
68 You have to look at the bigger picture.  In fact, we do support all these things.  Take bookmarks as an example:
69
70  * we support keybinding and spawning external programs, so you can bind a key to spawn any script you want
71  * Your script receives properties such as the current url, window title etc.
72  * You can then call a tool such as zenity to prompt for any more information you may want to specify (tags,...)
73  * You have the freedom to store the bookmarks in whichever format you want. (plaintext, sqlite, any database, on a remote system, in version control, ...)
74  * To load a bookmark, you trigger another script which invokes a tool such as dmenu to let you pick a bookmark.  Your script can send the command to load the url to uzbl very easily by using the socket or fifo interface.
75  * To manage your bookmarks, you can use whatever you want, depending on how you store them (simple text editor, database interface, ... )
76
77 These ideas are something we want to consistently apply throughout the entire application.  (Even more, throughout our entire desktop environment)
78 In fact, we actually ship various sample scripts and some sample configs that make it easy for you to implement your workflow.
79
80 ### Okay, what can I actually do?  What commands are there?  How do I get more information?
81   * Commands and other features are documented in README.  Read it.
82   * You should also peek into the sampleconfigs to see how commands are used in practice.
83
84 ### Why can't I type anything in forms?  How does the keybinding work?
85 You are in command mode, not in insert mode.
86
87 * command mode: you can trigger actions inside uzbl with minimum amount of keypresses (eg 'b' to go back, 'ZZ' to quit etc)  (see config examples), but not to type actual text into forms, because all your keypresses are interpreted.
88 * insert mode: after going into insert mode (by default this is the 'i' binding from inside command mode), your keypresses are not interpreted but passed on, so you can enter text into forms.  Press Esc to go out of insert mode.
89
90 The above method is called "modal" as inspired on VI.  If you don't like
91 this you can easily change this:
92
93 * enable always\_insert\_mode in your config.  You will always be in insert mode.
94 * configure a modkey.  Since your keypresses are not interpreted anymore to trigger actions, you need a modkey to do things (eg alt+'b' to go back instead of just 'b' from command mode)
95
96 This method is how many applications work.
97
98 Both have their pro's and cons.  We don't want to force anyone in using
99 either, so by tuning the modkey and always\_insert\_mode settings you can pick
100 whichever method you like, or both at the same time (command mode, insert mode, and the modkey to perform actions while in insert mode)
101
102 ### Why do you depend on gtk?
103 Uzbl itself doesn't use much gtk stuff (only the statusbar) so we could do without gtk.  But Webkit needs a widget toolkit to create widgets (think javascript popups, html forms etc).
104 Officially, it also supports QT and wxwigdets.  There are also some unofficial patchsets floating on the interwebs for the EFL and FLTK toolkits.  One could argue we don't need no popups or fancy form widgets and you could have a point, but
105 we prefer being reasonably assured that things work as they are supposed to rather then using some obscure patchset which may be incomplete, broken and/or badly designed, or wasting time ourselves in what is not our core objective.
106 Note that we do *not* depend on any Gnome libraries such as gconf.  _That_ would be something worth complaining about :)
107
108 ### Do you support flash? javascript? Ajax?  Recent html/css/.. standards?
109 Yes, Webkit takes care of all of that.  Not that we like all of these, but you can use them if you want.
110
111 ### What's the difference between the socket file and the fifo?
112 They both have advantages and disadvantages:
113
114  * fifo's are _very_ easy to work with. You can write just plaintext commands into them, but they are unidirectional (you can only communicate in one direction)
115  * Sockets are bidirectional but more complex.  You cannot just write a plaintext string into them.  In shellscripts you can use uzblctrl or netcat to work with sockets, when programming you need to use library functions.
116
117 So, when writing scripts, using fifo's is usually the fastest method (because you do not need to fork another process), so fifo is preferred unless you need a response.
118
119 ### What the hell is this 'XDG' stuff??
120 You'll notice our example scripts and configs use variables such as `$XDG_CONFIG_HOME` and `$XDG_DATA_HOME`.
121 Most of us really like the [xdg basedir spec](http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)
122 so our example material folows it.  Basically it helps you keeping a clean `$HOME` and it separates config, data and cache.
123 If these variables are not defined on your system, it could be that you need to install an xdg package.
124 If you don't like this, no one is stopping you from changing the scripts and configs to point to a single `$HOME/.uzbl` directory or whatever you want.
125
126
127 ### Does the world really need another browser?
128 We did try a lot of browsers, and we do not suffer [NIH](http://en.wikipedia.org/wiki/Not_Invented_Here).
129 We believe that the approach taken by way too many browsers is wrong.  We do not want browsers that try to do everything,
130 instead we prefer a system where different applications work together, which gives plenty of advantages.
131 We also like open source.  We take a lot of things from other projects and we also try to contribute to other projects.
132
133 ### What? You call all of this user-friendly?
134 Yes.  If you don't agree, don't use it :)