|
|
Subscribe / Log in / New account

The new Firefox command-line interface

The folks at Mozilla have concluded that what the Firefox browser really needs is a command-line interface. "The 'pagemod' command lets you quickly make some bulk changes to the page. If you’re looking at a page and there’s something flashing at you, you can nuke it using the 'pagemod remove element' command."

to post comments

The new Firefox command-line interface

Posted Aug 30, 2012 22:37 UTC (Thu) by przemoc (guest, #67594) [Link] (1 responses)

Nifty!

I would really like to see something similar in Chrome.

If Firefox can keep the speed in improving UX, stability (looks they're overcame most random crashes from 4-9 times), responsiveness, memory usage, and even out-of-the-box toolset, then I suspect they will soon start seeing old users that left around 3.6 -> 4 transition (usually switching to snappier Chrome/Chromium).

I'm mostly used to Chrome by now (IIRC started using it around version 3), but somehow I still miss full-fledged add-ons, that allowed me to truly customize and enhance Firefox.

I mean enhance w/o some hackish workarounds that are needed in Chrome's extensions. Even ability to add global keyboard shortcuts [1] is still not present in Chrome. The thing is that you have to use content scripts much more often than they should be needed. It is bad if you have dozens tabs on daily basis with dozen extensions, and even worse if these extensions use some JS frameworks just to use some simple feature...

[1] http://code.google.com/p/chromium/issues/detail?id=27702

The new Firefox command-line interface

Posted Aug 30, 2012 23:02 UTC (Thu) by dlang (guest, #313) [Link]

hwh, I recently dumped chrome on my work computer because after a day with about a dozen tabs open it was taking 3.6G of ram, while firefox with closer to 200 tabs open is taking about 1.5G (and not noticably more when I opened the dozen or so tabs from chrome to it)

The new Firefox command-line interface

Posted Aug 31, 2012 1:50 UTC (Fri) by leoc (guest, #39773) [Link] (1 responses)

Yeah the command line is good, but I prefer the kick ass way of making "bulk changes" to a web site.

The new Firefox command-line interface

Posted Aug 31, 2012 18:31 UTC (Fri) by tx (guest, #81224) [Link]

Well thanks for destroying any semblance of productivity for me.

Oh... for web developers

Posted Aug 31, 2012 3:51 UTC (Fri) by epa (subscriber, #39769) [Link] (3 responses)

I was hoping for a CLI interface to Firefox to print HTML pages as PDF among other things.

Oh... for web developers

Posted Aug 31, 2012 8:01 UTC (Fri) by ggiunta (guest, #30983) [Link]

+1. Command-line options for invoking firefox are absolutely lacking.

Oh... for web developers

Posted Aug 31, 2012 8:30 UTC (Fri) by robert_s (subscriber, #42402) [Link] (1 responses)

I presume you know about PhantomJS (webkit) don't you?

http://phantomjs.org/

Command-line rendering of HTML to PDF

Posted Sep 1, 2012 5:12 UTC (Sat) by pjm (guest, #2080) [Link]

The last time that I wanted an image of exactly how Gecko renders a web page (as distinct from any other rendering engine), I ran Firefox inside a virtual X session (xnest or xvnc or the like), with a very large virtual screen size to fit in the whole document. That approach only gave me a bitmap.

Since then, the cairo library (which Firefox uses) has added a debugging facility that might be useful for reproducing text as text; though I haven't tried it. It might also help to know that Inkscape can import and export PDF (including from the command line); this allows mechanical editing using sed/perl/python on SVG, which I find easier than editing PDF with command-line tools directly.

For people who don't need specifically Gecko's rendering, people posted information about a few options for rendering PDF from HTML in response to a different LWN article a couple of months ago.

Why drop ubiquity ?

Posted Aug 31, 2012 7:39 UTC (Fri) by Aissen (subscriber, #59976) [Link] (5 responses)

Yet the Ubiquity extension was deemed not important two years ago:
http://jonoscript.wordpress.com/2010/01/19/whats-up-with-...

I know this is a bit different, but why should only web developers profit from cli advantages ? How about power users ?

Why drop ubiquity ?

Posted Aug 31, 2012 9:35 UTC (Fri) by drago01 (subscriber, #50715) [Link] (4 responses)

> How about power users ?

There is no such thing.


Why drop ubiquity ?

Posted Aug 31, 2012 13:51 UTC (Fri) by Company (guest, #57006) [Link] (1 responses)

GNOME developer?

Why drop ubiquity ?

Posted Aug 31, 2012 14:24 UTC (Fri) by dark (guest, #8483) [Link]

> GNOME developer?

There is no such thing.

Why drop ubiquity ?

Posted Aug 31, 2012 22:09 UTC (Fri) by jengelh (guest, #33263) [Link] (1 responses)

Don't power users have vimperator already?

vimperator envy?

Posted Sep 2, 2012 4:24 UTC (Sun) by sitaram (guest, #5959) [Link]

I was thinking the same. I've been using vimperator for a few years now and have equivalent commands for a lot of these, plus the ability to ":map" keyboard shortcuts.

The new Firefox command-line interface

Posted Aug 31, 2012 15:29 UTC (Fri) by bokr (guest, #58369) [Link] (1 responses)

On the video, the detaching operation created a detached window to continue typing in and controlling stuff. This suggests to me that they are using some interprocess communication between firefox (or hopefully firefox modules) and the controlling window.

I haven't gone googling on this yet, so it wouldn't surprise me if the following was already in motion.

But it would be very cool to use dbus for this on linux, and enable any program or script to communicate with a running firefox, to give read/write access to all the firefox goodies and states.

This would e.g. enable me to hack together a bash script to ask firefox what url it is currently displaying, and what the <title> string is, and to format this into a citation footnote and append it to a file -- all triggered by a shortcut key. If I want to edit the footnote file automatically after the addition, I can just make it an option passed to the bash script, and invoke it that way manually instead of by shortcut. (I use this example as I already do this with a combination of bash and xclip running firefox in KDE with a clickable custom citation icon in the systray. I keep adding stuff like wrapping text or utf8-lat1 conversion etc., even wget-ing to make a cache copy and adding a local file:// url reference to it, as an option).

Not to belabor it, but the point is to make the firefox goodies available to other programs and scripts, not just create firefox-internal or plugin enhancements. Python would get an alternative to Tkinter for a lot of GUI and graphics stuff.

I wonder if the firefox commands include a !-like shell invocation escape like vim's : command context.

The video showed, IIRC, a command to make a screenshot .png of a specific web page element. One can imagine one-off scripts to do all kinds of useful stuff. But written in any convenient script or even compiled language -- python, bash, c, perl, whatever can talk to dbus.

With dbus control over firefox appearance and widgets, one could write a cool substitute for the dialog command, with firefox sitting minimized and being made to pop up the dialogs.

Well, maybe all the components will become controllable via dbus or successor once Wayland becomes a common graphics base?

Actually, I think every program ought to be accessible as a whatever-it-does server, for client scripts or programs and not just by piping to stdin and capturing stdout (gotta love that unix way though).

The new Firefox command-line interface

Posted Aug 31, 2012 16:01 UTC (Fri) by Company (guest, #57006) [Link]

Because all application developers are keen on providing an API for all the script kiddies...

Also, this already exists of sorts in all GTK apps by default, it's called AT-SPI, see http://en.wikipedia.org/wiki/Assistive_Technology_Service...


Copyright © 2012, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds