跨瀏覽器跨終端的開發,linux 終端 瀏覽器_如何使用W3M從Linux終端瀏覽

 2023-10-21 阅读 33 评论 0

摘要:linux 終端 瀏覽器W3M is a terminal web browser for Linux. It’s got a few tricks up its sleeve, including support for images, tabs, tables, frames and other features not usually included with terminal web browsers. W3M是Linux的終端Web瀏覽器。 它有很多技巧
linux 終端 瀏覽器

linux 終端 瀏覽器

W3M is a terminal web browser for Linux. It’s got a few tricks up its sleeve, including support for images, tabs, tables, frames and other features not usually included with terminal web browsers.

W3M是Linux的終端Web瀏覽器。 它有很多技巧,包括對圖像,選項卡,表格,框架和其他終端Web瀏覽器通常不包含的功能的支持。

If you’ve used Linux for a while, you probably remember using a terminal browser to Google up a solution for your hardware when the X server refused to load. Modern X servers have advanced far beyond this, but W3M and other terminal browsers can still be useful.

如果您使用Linux已有一段時間,您可能還記得當X服務器拒絕加載時,使用終端瀏覽器來為您的硬件提供Google解決方案。 現代的X服務器已經遠遠超越了它,但是W3M和其他終端瀏覽器仍然可以使用。

安裝W3M (Installing W3M)

W3M isn’t included by default on most Linux distributions. You’ll want to install the main w3m package and the w3m-img package if you want inline image support. Use the following command on Ubuntu:

大多數Linux發行版默認都不包括W3M。 如果需要內嵌圖像支持,則需要安裝主w3m軟件包和w3m-img軟件包。 在Ubuntu上使用以下命令:

sudo apt-get install w3m w3m-img

須藤apt-get install w3m w3m-img

基本瀏覽 (Basic Browsing)

W3M has quite a few command-line options, but none are mandatory. The only thing you need to specify is a web page address. Want to bring up Google? Just use the w3m google.com?command.

W3M有很多命令行選項,但是沒有一個是必需的。 您唯一需要指定的是網頁地址。 想啟動Google嗎? 只需使用w3m google.com命令即可。

You can use the arrow keys to move the cursor around or click at a desired location to move the cursor there. If you want to type in a text box, select the text box with your cursor and press Enter before typing your text. W3M treats your keystrokes as commands if you just start typing.

您可以使用箭頭鍵來移動光標,或單擊所需的位置以將光標移動到那里。 如果要輸入文本框,請用光標選擇文本框,然后在輸入文本之前按Enter鍵。 如果您只是開始鍵入,W3M會將您的擊鍵視為命令。

Load a hyperlink by selecting it with your cursor and pressing Enter. You don’t have to select hyperlinks manually — press the Tab key to position your cursor over the next hyperlink on the page.

通過使用光標選擇超鏈接并按Enter來加載超鏈接。 您不必手動選擇超鏈接,只需按Tab鍵即可將光標置于頁面上的下一個超鏈接上。

Shift-B will take you back a page. If you want to load a different URL, press Shift-U and you’ll get an URL prompt. Press Shift-H to view the help page if you want to see a more complete list of keyboard shortcuts.

Shift-B將帶您返回一頁。 如果要加載其他URL,請按Shift-U ,然后會出現URL提示。 如果要查看更完整的鍵盤快捷鍵列表,請按Shift-H鍵查看幫助頁面。

終端中的圖像 (Images in the Terminal)

W3M supports images, so where are they? Well, terminals like GNOME Terminal and KDE’s Konsole can’t display W3M’s images. Other terminals, such as Xterm, can. W3M will also display images if you’re running it in a framebuffer console, so you don’t need an X server running to take advantage of this feature.

W3M支持圖像,所以它們在哪里? 好吧,GNOME Terminal和KDE的Konsole之類的終端無法顯示W3M的圖像。 其他終端,例如Xterm,也可以。 如果在幀緩沖控制臺中運行W3M,它還將顯示圖像,因此您不需要運行X服務器即可利用此功能。

Another feature that doesn’t work in GNOME Terminal or Konsole is W3M’s right-click menu.

W3M的右鍵單擊菜單在GNOME Terminal或Konsole中不起作用的另一個功能。

瀏覽器標簽 (Browser Tabs)

How did we ever live without tabs? They’re an essential feature for desktop web browsers. W3M includes tabs, too. Just press Shift-T to open a new tab.

我們如何過著沒有標簽的生活? 它們是桌面Web瀏覽器的基本功能。 W3M也包含選項卡。 只需按Shift-T即可打開一個新標簽。

You can switch between tabs by clicking them, but we’re trying to be terminal ninjas here. Use the { and } keys to switch between tabs without touching your mouse (that’s Shift-[ and Shift-]).

您可以通過單擊選項卡在它們之間切換,但是我們試圖在這里成為終端忍者。 使用{}鍵在選項卡之間切換,而無需觸摸鼠標(即Shift- [Shift-] )。

終端機中的Gmail (Gmail in the Terminal)

W3M isn’t stuck in the past, like Lynx (another web browser for the terminal) is. It can render tables, frames and even has support for Gmail’s basic HTML interface.

W3M并沒有像Lynx(終端的另一個Web瀏覽器)那樣停留在過去。 它可以呈現表格,框架,甚至支持Gmail的基本HTML界面。

You’d probably feel more comfortable accessing Gmail with an IMAP client from your terminal, but hey — it works.

您可能會覺得從終端使用IMAP客戶端訪問Gmail更自在,但是,嘿,它可以工作。

更多文件 (More Documentation)

In addition to pressing Shift-H to view W3M’s help page, you can view the full manual on W3M’s website. The manual lists all of W3M’s command-line switches and key bindings.

除了按Shift-H來查看W3M的幫助頁面外,您還可以在W3M的網站上查看完整的手冊 。 該手冊列出了W3M的所有命令行開關和按鍵綁定。



W3M still doesn’t compare with desktop browsers — notably, it doesn’t support JavaScript. There’s an experimental w3m-js extension you can compile and install yourself, but I wouldn’t rely too much on that. Then again, do you really want JavaScript in a terminal browser?

W3M仍然無法與桌面瀏覽器相提并論-值得注意的是,它不支持JavaScript。 有一個實驗性的w3m-js擴展,您可以編譯并自行安裝,但我不會太依賴它。 再說一次,您真的要在終端瀏覽器中使用JavaScript嗎?

翻譯自: https://www.howtogeek.com/103574/how-to-browse-from-the-linux-terminal-with-w3m/

linux 終端 瀏覽器

版权声明:本站所有资料均为网友推荐收集整理而来,仅供学习和研究交流使用。

原文链接:https://808629.com/162544.html

发表评论:

本站为非赢利网站,部分文章来源或改编自互联网及其他公众平台,主要目的在于分享信息,版权归原作者所有,内容仅供读者参考,如有侵权请联系我们删除!

Copyright © 2022 86后生记录生活 Inc. 保留所有权利。

底部版权信息