Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to avoid remembering common port names: e.g. for my CUPS it's http://localhost:631/.

I know that there're service names (named aliases for ports) in '/etc/services':

$ cat /etc/services | grep ipp
ipp             631/tcp     # Internet Printing Protocol
ipp             631/udp

And this works just fine:

$ lynx http://localhost:ipp/

However, accessng http://localhost:ipp/ does not work in Firefox, Opera, Konqueror.

Any ideas?

share|improve this question
Use the port number... – EmmEff Sep 22 '09 at 14:05
You seem to know nothing about laziness ;) Anyway, if there's such a feature - it should work! :) – kolypto Sep 22 '09 at 14:14
The GUI tends to be segregated from the CLI apps (and configurations). For example, you might setup a SOCKS tunnel in the GUI, but no command line apps know about it. – Nerdling Sep 22 '09 at 14:47
No, that's not the case. Browsers should just use getportbyname() for [a-z]* ports – kolypto Sep 22 '09 at 15:23
up vote 4 down vote accepted

Be glad that the browser authors are sticking to the RFC (1738). Chaos ensues when software makers don't follow RFCs, as those documents set the pace for standards on the Internet.

Using the port number instead of a service name is cross platform, as not all systems have consistent contents for /etc/services, or an equivalent.

Specifically in this case, section 3.1 of the RFC states:

3.1. Common Internet Scheme Syntax

While the syntax for the rest of the URL may vary depending on the
particular scheme selected, URL schemes that involve the direct use
of an IP-based protocol to a specified host on the Internet use a common syntax for the scheme-specific data:



    The port number to connect to. Most schemes designate
    protocols that have a default port number. Another port number
    may optionally be supplied, in decimal, separated from the
    host by a colon. If the port is omitted, the colon is as well.
share|improve this answer
You're absolutely right. The only thing that confused me that lynx was able to handle the URL correctly. Thanks anyway :) – kolypto Sep 22 '09 at 18:45

File a bug. Wait, someone did and it was rejected because it contradicts RFC 1738. So I guess you'll have to convince Mozilla (or Opera or KDE) to change their mind.

share|improve this answer
Or write an updated RFC and convince the 'net to accept it and THEN convince the browser teams to update their software. :-) – Doug Harris Sep 22 '09 at 17:46
Or, if you use Firefox (or, well, anything other than Opera) write your own extension. – grawity Sep 23 '09 at 16:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .