[Wylug-help] Slow Internet with Ubuntu 11.04
Smylers
Smylers at stripey.com
Sun Sep 4 09:06:49 UTC 2011
Trevor Noland writes:
> I ... feel I must thank you for your continued interest and thoughtful
> explanations.
Hi Trevor. That's fine.
One request though: when you're replying to the list, please can you
include some quotes providing context as to what it precisely is you're
responding to? Not everybody will remember all of a previous
conversation, or even know which of the many previous mails yours is
following up from.
> I did plug in an ethernet connection. It was recognised straight away,
> and started working immediately,
That's useful. So as a next step I'd try your laptop on somebody else's
wireless network.
> Apropos "command-not found" (and other obscure commands, well, obscure
> to me), not only did the name of the command surprise me (and amuse
> me,) but also the fact that it is tucked away in /usr/lib.
Yes, that was why I described the detective work needed to learn of it
as unreasonable.
It exists to be run automatically by Bash when a command isn't found,
which explains its name (though doesn't excuse it; it should be named
after what it does, not the trigger that invokes it). And I'm guessing
it's in /usr/lib/ because it wasn't design to be run directly by users,
and it's irritating having pointless commands in $PATH. That it actually
turned out to have a use for invoking directly is presumably an
accident.
> Also, I suppose that you have to know what you are looking for in the
> first place. I would possibly have searched for a "browser" (without
> x-www), using synaptec.
That would probably have found you another web browser too.
> The fact that you specified you wanted a browser for the www made me
> wonder if there is any other kind (I now assume there is.)
command-not-found searches for commands. x-www-browser isn't just some
arbitrary search terms, but the name of a command. Try it. On my system
it launches Firefox.
If you have a look you'll see it's a symlink. In particular,
/usr/bin/x-www-browser is a link to /etc/alternatives/x-www-browser,
which in turn is a link to some actual browser, /usr/bin/firefox in my
case.
Why a symlink? Well there are situations in which it's handy to have a
graphical web browser, but it doesn't matter which one. For example
clicking on a link in an e-mail client, or an application directing
users to its own website. So an e-mail client or whatever can simply run
x-www-browser and know that some browser will launch.
And as a user if you install Chromium and uninstall Firefox, you don't
have to tell any other applications that want to launch webpages about
the change; x-www-browser will simply launch Chromium.
Or if you have both installed, you only have to configure in one place
which is your current preferred browser.
OK, so why the double symlink? Having all generic names link into
/etc/alternatives/ and then links from there to actual applications puts
all of the config for 'preferred applications' into one place, making it
easier to manage, and to see what's going on.
Searching for commands with "alternatives" in their name (with apropos
or aptitude search, or Synaptic (but change the search options to
restrict matching on package names, not names and descriptions)) will
show commands for listing alternatives and specifying your preferences.
For most software, searching the Apt repositories with relevant keywords
is a fine technique. It just so happens that for some particular types
of software which fulfil well-defined rôles, the alternatives system
provides a neat way of grouping them. Graphical web browsers happens to
be one of those. Playing around with galternatives or similar can give
you a feel for others.
(Though note some commands with alternatives are not generic commands
such as x-www-browser and editor; they are simply commands which have
multiple forks or rewrites, and you get to choose which version you
install.)
As to the name x-www-browser, why did Debian (for it is Debian who set
up the alternatives system which Ubuntu makes use of) call the generic
command that rather than just browser? Well, there are many other sorts
of browsers other than web browsers. For example, Nautilus is a file
browser. And if you do the Synaptic search you suggested above you'll
see all sorts of browsers, including software for browsing your music
collection, for browsing SQL queries, and even for browsing 'biosignal
storage files' (no, me neither).
> Also specifying an "x" application. Although Linux was (is) a command
> line system, Ubuntu (and other non-server flavours of linux)
Ubuntu works just fine on servers.
> are now just about all GUI, so I wondered if there are any www
> browsers that are not "x"
www-browser exists, again using the alternatives system, to pick between
one of the several text browsers available. Try it. Search the web using
it; read a Wikipedia article. It works. (It's particularly handy on
low-bandwidth connections ... which sort-of brings us back on-topic
again for this thread.) Have a look at which alternatives are available
for it.
> (I suppose there are, but I can't imagine what they do.)
I occasionally still use Lynx when trouble-shooting a website or just
quickly checking that a URL works. My mail client, Mutt, uses Links for
converting HTML-only e-mail messages into a plain text.
> I remember (I'm going back a while now), you used to be able to change
> workspaces (although I don't think we called them that) by
> combinations of keys like Alt-F1, Alt-F2 etc,
You still can. Hold down Ctrl as well: Ctrl+Alt+F1, etc.
Cheers
Smylers
--
Watch fiendish TV quiz 'Only Connect' (some questions by me)
Mondays at 20:30 on BBC4, or iPlayer: http://www.bbc.co.uk/onlyconnect
More information about the Wylug-help
mailing list