3 ms·
Are the bang searches supposed to always open a gui browser? Because they seem that way. Search Hacker News for "ddgr" and it opens up (in my case) a tab on f
by theophrastus 8y ago
Are the bang searches supposed to always open a gui browser? Because they seem that way. Search Hacker News for "ddgr" and it opens up (in my case) a tab on firefox:
ddgr \!hn ddgr
- apjana 8y agoThere's no such hard-coding. For me it opens in w3m. Probably you have BROWSER defined to a GUI browser.
- TheGrassyKnoll 8y agoWith bangs, I'm getting a new tab in Firefox as well.
- apjana 8y agoWhat's the output of `echo $BROWSER`?
- theophrastus 8y agoIn my case BROWSER isn't set. And yet ddgr still found my firefox in another workspace and opened a tab on it. I was just wondering if there's a means to force a terminal/text output from something akin to: ddgr \!ety glaucous
- apjana 8y agoThis is inherited from Python's webbrowser module. It would find a GUI browser by default. Please set `BROWSER` to your preferred text-based browser. To force use the GUI browser, use the prompt key `O` or the progrma option `--gb`. As you can see, you can only have it one way (either text or GUI by default) and we kept it the default one.
- dontbenebby 8y agoI haven't messed with text based browsers for a while - do you have a favorite?
- apjana 8y agoI use w3m all the time.
- dontbenebby 8y agoThanks I'm going to play around with it a bit.
- dontbenebby 8y agoHi, maybe there's something wrong with my environment, but I installed Lynx via brew, got the location (which brew|pbcopy) then exported the location to an environment variable (export BROWSER=/usr/local/bin/lynx). But when I select something in ddgr, it says it's opened lynx but the display still just shows a list of 10 results. If I hit q, it drops me back to ddgr, and then a quit again exits the program. I don't want to jump to saying the issue is ddgr but was a little surprised. It's still very useful since a lot of what I do needs images anyways, and it's IMHO silly to try to do GUI browsing in terminal, just thought I'd mention it. Thanks for being so active in the comments! (Trying to be extra positive since I know HN can be a little hypercritical, and the people who loved it aren't necessarily going to drop in and say so beyond an upvote :) )
- apjana 8y agoWorks fine for me. Steps right out of the terminal: 1. sudo apt install lynx 2. export BROWSER=lynx 3. ddgr hello world 4. Press 1 (to open the first result in lynx) The site is opened in lynx as expected.
- dontbenebby 8y agoThanks, that was my issue (I was typing the literal path to lynx not just "lynx")