Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

30 votes
4 answers
101276 views
Arch Linux pacman error: failed retrieving file
I just installed Arch Linux today. I am trying to install elinks using pacman -S elinks And I get a long, long list of: error: failed retrieving file 'elinks-0.13-17-i686.pkg.tar.xz' from some.mirror : Could not resolve host: some.mirror The same happens if I try to install any other software. The o...
I just installed Arch Linux today. I am trying to install elinks using pacman -S elinks And I get a long, long list of: error: failed retrieving file 'elinks-0.13-17-i686.pkg.tar.xz' from some.mirror : Could not resolve host: some.mirror The same happens if I try to install any other software. The only thing I could think of based on what I read is a connection problem, but I'm on the same connection that I used to install the OS, and that was just a few minutes ago.
The Ledge (543 rep)
Nov 27, 2016, 01:55 AM • Last activity: Jul 18, 2023, 08:01 PM
4 votes
2 answers
1497 views
Force lynx or elinks to interpret spaces and line breaks
Consider the following commands, and their results : $ echo " a b c "|lynx -dump -stdin a b c $ echo " a b c "|elinks -dump a b c Neither prints the correct number of lines : `elinks` skips the first white space, and both skip blank lines and trailing lines with white space only. Is there...
Consider the following commands, and their results : $ echo "

a
b
c


"|lynx -dump -stdin a b c $ echo "

a
b
c


"|elinks -dump a b c Neither prints the correct number of lines : elinks skips the first white space, and both skip blank lines and trailing lines with white space only. Is there a way to force lynx or elinks to interpret all spaces and line breaks ? I didn't see anything obvious in their manpage. (I mean, beside using a temporary character to be suppressed by sed or tr or whatever after the display.)
Skippy le Grand Gourou (3453 rep)
Nov 29, 2014, 10:57 AM • Last activity: Nov 28, 2021, 03:55 AM
1 votes
0 answers
235 views
Display pdftohtml output using elinks -remote option?
The following command works great to view pdf content from the command line: `pdftohtml -i -stdout file.pdf |elinks`. As should be clear, what's happening is that file.pdf is being converted to html and then piped to the text-mode browser `elinks` for display. What I'm hoping to do though, is a slig...
The following command works great to view pdf content from the command line: pdftohtml -i -stdout file.pdf |elinks. As should be clear, what's happening is that file.pdf is being converted to html and then piped to the text-mode browser elinks for display. What I'm hoping to do though, is a slight variation on this. I want to use elinks' -remote switch to cause the output from the pdftohtml command to be sent to a new tab in an already-running instance of elinks. The way this works, using as an example a URL instead of the output of a command, is as follows: starting elinks in one terminal, then running a command like elinks -remote www.google.com in another terminal, will result in a new tab being opened in the running elinks instance displaying the google search page. I've so far been unable to get a command like this to work on the output of the pdftohtml command. The most straightforward way to do this might seem to be pdftohtml -i -stdout file.pdf |elinks -remote. But based on my experimentation thus far this is not working because the -remote switch evidently needs a URL or a file name to be supplied ("Cannot parse option -remote: Parameter expected"). So my question is whether there is some way to "feed" the output of the pdftohtml to elinks -remote on the fly, as it were? Input will be appreciated. **Things tried so far** I thought maybe a named pipe could help here, but that option is not working. Although something like pdftohtml -i file.pdf my-pipe && elinks succeeds, when I add the -remote switch, it fails. The kludge I've so far gotten to approximate what I'm aiming for is
-i file.pdf /tmp/pdf.html && elinks -remote /tmp/pdf.html && elinks -remote "reload()"
That creates a transitional file(s) in the /tmp directory that proves acceptable to the -remote switch. Reloading the page is required so that any other transitional open page/file the browser might have previously cached is not displayed. It's not really a good resolution because when I try to reload any other tab that might previously have been opened to the transitional page/file, the most recent copy of that page/file will be loaded, not the one that had been previously opened. **Resolution?** Compounding with further kludges, here's a commentated bash script (which I am calling pdf2elinks) I cobbled together, using my modest powers as an internet searcher and my expertise as an elite copy/paster, that addresses the issue of transitional html files produced by pdftohtml being overwritten by subsequent files and thus lost before adequate review. As will be apparent, I decided that assigning numerals rather than names to the converted transitional html files would provide an automated way of assigning unique names. As may also be clear, if one's system is not set up to automatically clear contents of the /tmp directory on reboot, the directory to which the transitional html files are being written will need to be emptied (say, by using a cron script) periodically.
#!/bin/bash
# use: pdf2elinks [filename]
# read the name of the pdf supplied to this script into a variable
pdfname=$1
# test whether the target directory is empty and, if it is, convert the supplied pdf under the name 1.html
if [ ! "$(ls -A /tmp/pdfs2html)" ]; then
pdftohtml -i $pdfname /tmp/pdfs2html/1.html && elinks -remote /tmp/pdfs2html/1.html
else
# if the directory is not empty, find the highest numbered file in /tmp/pdfs2html
number=ls /tmp/pdfs2html/ | sed 's/\([0-9]\+\).*/\1/g' | sort -n | tail -1
# increment by one the highest numbered file found
numberplus=echo "$number +1" | bc
pdftohtml -i $pdfname /tmp/pdfs2html/$numberplus.html && elinks -remote /tmp/pdfs2html/$numberplus.html
fi
In closing, the inspiration for this project of attempting to use elinks as a pager, comes from this page: http://www.pocketnix.org/posts/Life%20on%20the%20command%20line%3A%20Day%20To%20Day%20Console . Like that author, I am often interacting with one of my computers via the command line in an ssh session in which I am running tmux. One of the tabs will always have elinks running in it and it will function as a window where I can open e-mail attachments such as pdf's, read man pages, or just open web pages. A path to the script above has been added to my .mailcap entry for handling pdf's and seems to be performing its function well. I welcome comments, suggestions, improvements, and/or corrections. I function under no illusion that I've found the most optimal solution to the issue I'm trying to address or even that I've understood well what issues are really at stake.
MJiller (391 rep)
Mar 6, 2021, 04:21 AM • Last activity: Mar 8, 2021, 01:47 PM
3 votes
1 answers
698 views
Downloading file using command line tool in Linux VM which requires sign-in
**Environment**: Linux VM which I have access only through command line console. **Goal**: I need to download the file: https://download.nlm.nih.gov/umls/kss/2020AA/umls-2020AA-full.zip Unlike typical download using `wget`, this redirects to a sign-in page. **What I have tried till now**: Tried usin...
**Environment**: Linux VM which I have access only through command line console. **Goal**: I need to download the file: https://download.nlm.nih.gov/umls/kss/2020AA/umls-2020AA-full.zip Unlike typical download using wget, this redirects to a sign-in page. **What I have tried till now**: Tried using the text based browsers: w3m , elinks . Until recent changes in the sign-in page, it used to work. **What had changed in the sign-in page?** Earlier the sign-in page used to take username and password. But recently they have introduced option to sign-in via Google, Microsoft etc. **Problem** The sign-in page looks like this in my local m/c: enter image description here But when browsing using text based browsers in the VM, it only shows a blank page. Is there any solution to this issue? N.B. - The link to above zip file is mentioned in https://www.nlm.nih.gov/research/umls/licensedcontent/umlsarchives04.html#2020AA - As it is a huge file, I don't have the option to download in my local system and then upload it to the VM. - Had originally asked the question in StackOverflow, but was suggested to raise the question in this forum (so I deleted the original post).
Kaushik Acharya (133 rep)
Nov 17, 2020, 07:10 AM • Last activity: Feb 8, 2021, 06:21 PM
1 votes
1 answers
431 views
Host not found trying to restrict access to yahoo.com in elinks using squid
I added this in squid.conf acl blocked_sites dstdomains .yahoo.com http_access deny blocked_sites and this in elinks.conf set protocol.http.proxy.host = "proxy.localhost:3128" set protocol.http.proxy.passwd = "" set protocol.http.proxy.user = "" And i get HOST NOT FOUND
I added this in squid.conf acl blocked_sites dstdomains .yahoo.com http_access deny blocked_sites and this in elinks.conf set protocol.http.proxy.host = "proxy.localhost:3128" set protocol.http.proxy.passwd = "" set protocol.http.proxy.user = "" And i get HOST NOT FOUND
Alex (21 rep)
Dec 20, 2012, 12:20 PM • Last activity: Nov 17, 2018, 08:57 PM
1 votes
1 answers
671 views
elinks -dump not finishing on long url
So I have been working on a little script to alert me when an artist releases a new album using amazon and elinks. Problem is that for some reason elinks will stop half way through the -dump command and not finish. Hopefully someone can see what I am missing. An example of the command I am using is:...
So I have been working on a little script to alert me when an artist releases a new album using amazon and elinks. Problem is that for some reason elinks will stop half way through the -dump command and not finish. Hopefully someone can see what I am missing. An example of the command I am using is: elinks -dump https://www.amazon.com/s/ref=sr_nr_p_lbr_music_artists__0?fst=as%3Aoff&rh=i%3Aaps%2Ck%3Athe+prodigy%2Cp_lbr_music_artists_browse-bin%3AThe+Prodigy&keywords=the+prodigy\&ie=UTF8&qid=1466468403&rnid=3458810011 > artist.cache For reference I plan on sending this through a loop that will go through a file and search all the artist on the list like so (note the $artist) https://www.amazon.com/s/ref=sr_nr_p_lbr_music_artists__0?fst=as%3Aoff&rh=i%3Aaps%2Ck%3A$artist%2Cp_lbr_music_artists_browse-bin%3A$artist&keywords=$artist&ie=UTF8&qid=1466468403&rnid=3458810011 Then its just going to use grep and date to post the matching line and artist/album to a text file. So if anyone sees what I am doing wrong I will appricate the help, or if you have an easier idea of how to do get the text from the webpage to a file please let me know as well. Thanks,
NeonLines (13 rep)
Jun 21, 2016, 12:35 AM • Last activity: Jun 21, 2016, 05:23 AM
2 votes
1 answers
282 views
How to prevent ELinks from staying in scrollback buffer?
After quitting `elinks`, the browser page history is lingering in my scrollback buffer, and therefore not returning to whatever was buffered on screen when I launched `elinks`. Inside a GNU screen with `altscreen` enabled, this does _not_ happen. But in any normal terminal session elinks stays in th...
After quitting elinks, the browser page history is lingering in my scrollback buffer, and therefore not returning to whatever was buffered on screen when I launched elinks. Inside a GNU screen with altscreen enabled, this does _not_ happen. But in any normal terminal session elinks stays in the buffer. I note that other terminal programs like Vim and lynx _do not_ stay in the scrollback buffer, and instead return the buffer to its state at the time they were launched. I am not finding a configuration option in ELinks to ensure it switches to the alternate terminal, however. $TERM=xterm-256color Is there a configuration option to prevent ELinks sticking around in the scrollback buffer? ### Update: On a little further investigation, the scrollback problem occurs only in iTerm2 and Terminal.app on OSX. In an XTerm, ELinks does not modify the scrollback buffer.
Michael (786 rep)
Sep 7, 2012, 01:57 PM • Last activity: Mar 25, 2016, 11:43 PM
0 votes
1 answers
684 views
How does Elinks render HTML?
I like the [`elinks` browser](http://elinks.or.cz/) and I would like to know how does it render the HTML into text, using ANSI styles. I suppose there is a library behind `elinks` to handle the rendering, or there should be. Is it possible to use that library in another project (e.g. to create a bri...
I like the [elinks browser](http://elinks.or.cz/) and I would like to know how does it render the HTML into text, using ANSI styles. I suppose there is a library behind elinks to handle the rendering, or there should be. Is it possible to use that library in another project (e.g. to create a bridge to NodeJS)? I would like to know where to start. :-)
Ionică Bizău (3481 rep)
Jul 6, 2015, 05:47 AM • Last activity: Oct 20, 2015, 02:50 AM
3 votes
1 answers
804 views
Alt-< and Alt-> (and possibly some other keys) not working in elinks
I am running elinks (0.12pre5) in an xterm window in Openbox on a Debian netinstall (7.8) with fairly minimal changes/additional software installation. I have changed a few elinks options, but none that seem like they should be relevant to this issue. In particular, I have not changed any of the key...
I am running elinks (0.12pre5) in an xterm window in Openbox on a Debian netinstall (7.8) with fairly minimal changes/additional software installation. I have changed a few elinks options, but none that seem like they should be relevant to this issue. In particular, I have not changed any of the keybindings. I have installed the terminus-fonts package, on the off chance that that's relevant. According to man elinkskeys, Alt+ and Alt+> should jump to the first or last line of the current buffer when editing a text box, or move a tab to the left or right otherwise. For me, they do neither of these things. When editing a text box, Alt+ (i.e. Alt+Shift+,) generates the character ¼ (the composed version of 1/4) and Alt+> (i.e. Alt+Shift+.) generates the character ¾ (the composed version of 3/4). I also tried omitting the Shift; Alt+, gives ¬ and Alt+. gives ®. When not editing a text box, none of these keystrokes seems to do anything. On a possibly related note, the man page indicates that, when editing a text box, Ctrl+A and Home "go to the start of the page/line" and Ctrl+E and End "go to the end of the page/line." In fact, all four keystrokes go to the start/end of a line as expected, but do not move the cursor between lines, even when struck repeatedly or held down. Thus, I don't seem to have any way of moving vertically more than one line at a time within a text box. Tab and Shift+Tab also appear to do nothing when editing (I don't expect Alt+Tab to do anything, since that's presumably being preempted by Openbox — which I want it to be!). I am not sure whether this is a consequence of my turning taborder off, which I did because it interacts badly with numbered links on certain pages.
Chris Henry (305 rep)
Apr 6, 2015, 11:01 PM • Last activity: Apr 7, 2015, 12:26 AM
6 votes
1 answers
729 views
StackExchange with Elinks
I use Elinks to browse while I am connected remotely. I am unable to login to stackexchange using my OpenID. I enter the correct URL, and upon submission, I get the "No OpenID endpoint found." text. I am certain that I am entering the correct URL. Has anybody else had any success logging in via elin...
I use Elinks to browse while I am connected remotely. I am unable to login to stackexchange using my OpenID. I enter the correct URL, and upon submission, I get the "No OpenID endpoint found." text. I am certain that I am entering the correct URL. Has anybody else had any success logging in via elinks? Any help will be appreciated.
0nyx (115 rep)
Jun 14, 2012, 04:21 AM • Last activity: Jul 2, 2012, 02:20 AM
Showing page 1 of 10 total questions