از ArchWiki پارسی
نسخهٔ تاریخ ‏۱۱ اوت ۲۰۱۶، ساعت ۱۸:۰۰ توسط Quorra (بحث | مشارکت‌ها) (مرورگر تحت خط فرمان ELinks)
(تفاوت) → نسخهٔ قدیمی‌تر | نمایش نسخهٔ فعلی (تفاوت) | نسخهٔ جدیدتر ← (تفاوت)
پرش به ناوبری پرش به جستجو

de:Elinks fa:ELinks fr:ELinks ja:ELinks ELinks یک بروزر پیشرفته و به خوبی ساخته شده و با امکانات بسیار تحت حالت متنی است. ELinks قادر به رندر فریم ها و جداول بوده و بسیار قابل شخصی سازی است. قدرت گسترش پذیری بالایی داشته به طوری که قدرت هم خوانی با lua و یا اسکریپت Guile را داراست. قابلیت پشتیبانی از CSS و تب را داراست.


بسته elinks package را نصب کنید.


به کمک دستور زیر آن را اجرا کنید:

$ elinks

اگر میخواهید مستقیم وب سایت خاصی را باز کنید:

$ elinks foo.bar.org


جابجایی در یک مرورگر مبتنی بر متن بسیار شبیه به مرورگر های گرافیکی معمول می‌باشد. وقتی مرور گر را اجرا نمودید میتوانید با استفاده از g شروع به نوشتن و جستجو کنید و با کمک کلید های جهتی به جابجایی خط به خط صفحه بپردازید و با کمک اسپیس به جابجایی صفحه به صفحه و یا به کمک j, k لینک به لینک جابجا شوید.

{{Tip|جهت نگه داشتن سشن اصلی ترمینال، elinks میتواند در w:Virtual console مجزایی اجرا گردد(تغییر با کمک ‎Alt+arrow‎) و یا در w:Terminal multiplexer همچون tmux اجرا گردد.


ELinks provides to two menus, accessable through ELinks, to customize options and keybinds respectivly.

It is recommened to use these tools as opposed to hand-editing the config files (which are placed in ~/.elinks) It is both much easier and safer this way.

By default, access to the option manager is through the o key and access to the keybind-manager is through the k key.

Tips and tricks

Defining URL-handlers

ELinks is capable of using external programs for various tasks,

Defining URL-handlers through the option menu can be a little confusing at first, but once you get it, its fine.

To do this, go into the option manager and navigate to MIME. All the submenus have Info pages to help you.

This is one of the few cases where it might be easier just to edit the conf file.

For example, to get ELinks to automatically launch your image-viewer when you click on a jpeg file, you can add the following to your ~/.elinks/elinks.conf file,

set mime.extension.jpg="image/jpeg"
set mime.extension.jpeg="image/jpeg"
set mime.extension.png="image/png"
set mime.extension.gif="image/gif"
set mime.extension.bmp="image/bmp"

set mime.handler.image_viewer.unix.ask = 1
set mime.handler.image_viewer.unix-xwin.ask = 0
set mime.handler.image_viewer.unix.block = 1
set mime.handler.image_viewer.unix-xwin.block = 0 
set mime.handler.image_viewer.unix.program = "ADDYOURTERMINALPICTUREVIEWERHERE %"
set mime.handler.image_viewer.unix-xwin.program = "ADDYOURXPICTUREVIEWERHERE %"

set mime.type.image.jpg = "image_viewer"
set mime.type.image.jpeg = "image_viewer"
set mime.type.image.png = "image_viewer"
set mime.type.image.gif = "image_viewer"
set mime.type.image.bmp = "image_viewer"

Tor usage

ELinks does not support SOCKS directly. Alternatives are to either invoke ELinks through ‎torify elinks‎, or install the privoxy package for forwarding to Tor's SOCKS proxy, first by adding the following line to your ‎/etc/privoxy/config‎:

forward-socks5 / localhost:9050 .

Restart ‎privoxy.service‎, then enter the following lines to your ‎~/.elinks/elinks.conf‎:

set protocol.http.proxy.host = ""
set protocol.https.proxy.host = ""
توجه: The above assumes that Tor is using port 9050 and that privoxy is listening on port 8118

Passing URL's to external commands

You can define commands which ELinks will pass the the current URL to.

To do this, go into the options menu, navigate under Document, then to URI-passing. Then press A to add a new command name. Then navigate to the new command name and press E to edit. Type in the name of command, enter and save.

Assuming the command "tab-external-command" is mapped to KEY, whenever you press KEY, a menu containing your commands will appear. Select the one you want, and ELinks passes the current URL to that command

توجه: Elinks allows you to define your own mappings for navigating this menu

Saving link to the X clipboard

echo -n %c | xclip -i 

Passing YouTube-links through external player

For strictly YouTube-links, mpv has built-in support. Just use the following,

mpv %c 

For a more general approach that can handle many 'tube' sites, you will need youtube-dl. Then add the following command,

youtube-dl -o - %c | mplayer -


ELinks froze and I can't start it without it freezing again

By default, every time you start ELinks you are connecting to an existing instance. Thus, if that instance freezes, all current and future instances will freeze as well.

You can prevent ELinks from connecting to an existing instance by starting it like so:

$ elinks -no-connect

If this happens a lot, you might consider making this your default startup by making an alias in your shell:

alias elinks="elinks -no-connect"

See also