Home

Advertisement

Customize

/etc/favicon.png

Today I spent a good chunk of time going through DBus bugs and pending patches. There are still some major things outstanding - large patches for Mac OS X and Windows integration, Scott's timeout work, but I have a feeling after those we'll be at the point where it really is basically done. Now we're moving on to replacing the init system. Woo.


But, that's not what is exciting about today. Is there anything exciting about today? Well, today is the day that Unix gained /etc/favicon.png. No, I'm not talking about HTTP, I'm talking about a HotSSH patch that I finished on the shuttle ride back:




Note the tabs have icons




The GNOME sysadmins haven't yet put /etc/favicon.png on window.gnome.org, and I stole the freedesktop.org favicon for my local machine to test


Basically when you open a connection, we asynchronously run some Python code on the remote machine to test for the existence of /etc/favicon.png and if it exists, its mtime. If the cached favicon we have is old or nonexistent, we (again asynchronously) retrieve it via scp. All of this reuses OpenSSH's connection sharing so you don't have to reauthenticate for any of this.


A quick Q&A:

  • OMGWTFBBQ! - That's not a question.

  • I'm a system administrator and I have a favicon.ico for our website, how do I set this up? - Run convert /path/to/favicon.ico /etc/favicon.png, copy around to all machines as appropriate, put it in Puppet or whatever.

  • Are favicons associated with hosts or keys? - Good question, right now I attempt to associate them with the host key, but OpenSSH's host key hashing foils that sadly. So probably with the host.

  • Why? - Because it's faster to recognize images than text.


Comments

Fixed

I have repaired this glaring omission on www.gnome.org.

(by the way, running python code on the remote machine? why not just check with sftp?)

Re: Fixed

Or if you're going to execute code, how about "md5sum /etc/favicon.png"? More robust than mtime.

But as Jeff says, you can get file existence and mtimes with plain SFTP.

done!

Best thing we could do with libdbus would be to declare it done and work on something else, if only some nicer bindings.

(Or we could reimplement it! wait)
I have a little hack that I've put into my python based terminal emulator (available on launchpad) that lets me use different types of icons depending on the contents of the titlebar. I love it for being able to see icons when doing alt-tab and in the taskbar.

Ideally, I find .svg works much better than png because it scales better. I humbly suggest that /etc/favicon.svg would be a good idea. :)
Hm SVG, that is an interesting idea. The general problem with scalable formats though is that often it can be very hard to make them look good both at small sizes and larger. One thing that might make sense is support for .icns which is OS X's multiple-resolution format.

PNG seemed like the obvious choice, I didn't actually think about anything else honestly.

Anyways for now this is just an almost easter egg feature of HotSSH, if others start to pick it up we can go all standards on it.

Re: /etc/favicon.png

Haha, sweet. What about ANSI escape codes style sheets?

(Anonymous)

Best idea I've heard in ages...

Love it! This is exactly the kind of new thinking that the Unix world needs, CLI/TUI FTW!

I look forward to trying HotSSH.

And Internet Explorer's legacy lives on

"Favicon" DOT "png"? Why not just "icon"? Why do we need a DOS file name extension?

If this was ever going to become some sort of standard I'd be upset. But it's neat, other than that. I'll patch it for you, if you like. :P

Re: And Internet Explorer's legacy lives on

I agree.

Btw, are you going to add the package to jhbuild?

Re: And Internet Explorer's legacy lives on

I was also going to post about this.

/etc/favicon would be a better choice, then you can link it to whatever you want, it would allow for svg, png or whatever comes next.

(Anonymous)

Very cool

I really like this idea. Hope to see it "stolen" by other SSH clients.
I guess the generalization is /etc/favicon.html
That html file might contain Image or any other valid HTML!

(Anonymous)

why png and not svg?

Advertisement

Customize