未加星标

Rescue your Linux with Elinks text browser

字体大小 | |
[系统(linux) 所属分类 系统(linux) | 发布者 店小二03 | 时间 2018 | 作者 红领巾 ] 0人收藏点击收藏

Updated: December 10, 2018

I contemplated long and hard what title to use for this article, because the topic is somewhat convoluted. So let me explain. Say you have a linux box that suddenly refused to boot into the desktop environment. For instance, you may have just installed graphics drivers, but they are not loading, and you don't get any graphical interface. Only a text shell. The old runlevel 3 stuff.

At this point, rescuing the system will usually require three things: skill, access to the Web, and some extra files, like updated drivers, new kernel, whatever. The first one comes with you, but the two other two, well, for most people, going about the Web is not doable without a browser, which means UI. Except, not really. You can use a text browser, and in this article, I'll show you how to use Elinks to search the Web, grab packages and drivers, and fix your box. After me.

Elinks at a glance

There are lots of text-based Web browsers - lynx, links, elinks, w3m, etc. What they allow you to do is access the Web through a terminal window. This means limited functionality, little to no javascript, and no images on their own. But you do have the ability to search, read and download things. The one text browser that seems to offer the most comprehensive set of features is Elinks , despite its age. The two most important capabilities are some scripting and a full menu, through which you can save bookmarks, check your history, download links, and more. And so it shall be our text browser of choice for this guide.

Cruising, one character at a time

The Elinks browsers is available in pretty much all and any distro repo. Install it, then open a terminal of your choice - it can also be a virtual console, which is what you will have when the graphical interface is down. But wait, you may think, what about the Internet? Well, that's an obvious one. Runlevel 3 should give you full networking, and often you will have connectivity even if there's no UI. And if you have no network, then this guide won't really work. Now, once the browser launches, navigate to a page of choice. If you don't know what you need, a search engine can be a good starting point.


Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser

The file menu can be accessed (and hidden) by hitting the Esc key. You really have a wealth of options. Elinks even simulates separate tabs and windows, you can open stuff in the background, and most importantly, you can also save bookmarks. This is hugely important, because it can save a lot of time for future maintenance.


Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser
Real-life example

All right, so what happened was - I was testingFedora 28 KDE, and I tried to install Nvidia drivers through the repo, the process that worked well in the previous incarnation of the distro. However, this time, it did not work, and I was left without a desktop. But I did have network. So in essence, I wanted to go to the Nvidia site, manually download the legacy 340.xx driver, and install it, thus fixing the issue. This tutorial shows what it would look like (minus the colors and the fancy Konsole window itself, of course).

It wasn't trivial or easy finding the right stuff - some of the "download" links didn't lead me to the right page, but eventually I managed to get there. There's no recipe - every site will behave differently and perhaps serve different content, depending on the browser user agent string. Moreover, some websites also redirect to regional sites, which might not be ideal. You will need to poke around a little. You can use the arrow keys to navigate. Elinks is really neat and friendly.


Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser

I also made sure to save the right bookmark, of course.


Rescue your Linux with Elinks text browser
Rescue your Linux with Elinks text browser

And we're done! I mean, the first part. The actual troubleshooting is the difficult bit, but at least you will not be stuck trying to get the needed tools and packages, or furiously keep rebooting into a live session to get what you need.


Rescue your Linux with Elinks text browser
Conclusion

In day to day life, you don't need to bother with text-based browsers, but they can be a lifesaver when it comes to system rescue, especially if there's no graphical environment available, but you do have some network connectivity. Elinks fits the bill perfectly. It's convenient, it works better than most other browsers of this nature, and it allowed me to grab the drivers and proceed with the system rescue.

You always have the option of using live CD - unless the disk is encrypted - and if you're using imaging software, or have multiple kernels installed, and/or know your way around the command line, you might be able to get to a desktop and continue the system repair from there. If you don't do any of that, then having a text browser, even just to ask some questions in a forum here or a search engine there, will be of huge help. In the worst case, it's worth experimenting, and it's a fun, unique and arcane way of getting the job done. Take care.

Cheers.

本文系统(linux)相关术语:linux系统 鸟哥的linux私房菜 linux命令大全 linux操作系统

代码区博客精选文章
分页:12
转载请注明
本文标题:Rescue your Linux with Elinks text browser
本站链接:https://www.codesec.net/view/621271.html


1.凡CodeSecTeam转载的文章,均出自其它媒体或其他官网介绍,目的在于传递更多的信息,并不代表本站赞同其观点和其真实性负责;
2.转载的文章仅代表原创作者观点,与本站无关。其原创性以及文中陈述文字和内容未经本站证实,本站对该文以及其中全部或者部分内容、文字的真实性、完整性、及时性,不作出任何保证或承若;
3.如本站转载稿涉及版权等问题,请作者及时联系本站,我们会及时处理。
登录后可拥有收藏文章、关注作者等权限...
技术大类 技术大类 | 系统(linux) | 评论(0) | 阅读(40)