Small Howto for Netrik internet browser
Forum: DSL Tips and Tricks
Topic: Small Howto for Netrik internet browser
started by: spock
Posted by spock on Jan. 18 2007,16:04On the forum I found a few posts of people who didn't know how to use this program or complained because there is no documentation, and as the manpage is not very clear I found it might be good to write a small howto.
If you use Firefox you can of course start Netrik in a terminal with :
but this doesn't look very good. The best I found was to create a /home/dsl/.netrik folder with a custom bookmarks.html in it. If you have a lot of bookmarks you can also create one .html file for each category, and then link to those in the main bookmarks.html. The format of those files should be very simple : names of the links to be displayed and links themselves, with some introductory text (My bookmarks...) Maybe some colors. With Nvu you can do this very quickly.
To search on Google with Netrik I put this link on top of my bookmarks file : < http://wap.google.com. > When you're on the wap page if you use the cursor key and hit enter on the search bar you will be prompted for a keyword to search for, after entering that just hit enter on Google Search ! (Netrik generally displays much less rubbish on WAP pages)
These 3 lines are probably the most important you might need in your configuration file, /home/dsl/.netrikrc :
--bright-background (if you have a transparent terminal, or at least you need this in mrxvt)
--bw (if you don't want colors in the text)
To conclude this is the official documentation :
< http://www.penguin-soft.com/penguin/man/1/netrik.print >
< http://www.penguin-soft.com/penguin/man/5/netrikrc.html >
I believe every little tool in DSL can prove to be useful if you're willing to learn how to use it. Anyway for me Netrik is a very handy little text browser, and unlike dillo it displays special characters (French, German,...)
Posted by jaygeedsl on Feb. 06 2008,23:01I've followed the Netrik How To and have setup the recommended folders/files but am having a problem in getting Netrik to recognise the .netrikrc configuration file when entering "netrik .netrikrc" at the command line.
Instead of invoking the configuration the terminal simply displays the file content.
But If I enter "netrik /home/dsl/.netrik/bookmarks.html" the program launches and displays the links in the bookmarks.html file ready for browsing.
Has anything changed since the How To was posted which would account for this?
Posted by lucky13 on Feb. 06 2008,23:15
The rc file is a default configuration, you need not manually invoke it. If you don't offer a flag option for an alternate rc file (which I don't know if netrik even allows), you're telling netrik to open that particular file. So netrik is doing precisely what you're telling it ("open this particular file"), even though that's apparently not what you want it to do.
Posted by jaygeedsl on Feb. 06 2008,23:38
According to the Netrik documentation a file entry in the .netrikrc config file causes the URL(s) therein to be displayed ready to browse.
My config file contains:
The file bookmarks.html contains:
<p><a href="http://news.bbc.co.uk/">BBC News</a></p>
<p><a href="http://news.bbc.co.uk/sport/">BBC Sport</a></p>
<p><a href="http://www.bbc.co.uk/weather/ukweather/">BBC Weather</a></p>
<p><a href="http://wap.ft.com/">Financial Times</a></p>
<p><a href="http://www.yell.com/">Yellow Pages</a></p>
IMHO netrik doesn't seem to be doing what it says on the tin.
Posted by jaygeedsl on Feb. 07 2008,00:43Got an effective but inelegant solution that turns netrik into a pseudo news feed as follows.
1. commented out the file reference in file "home/dsl/.netrikrc"
2. deleted folder "/home/dsl/.netrik" and bookmarks.html file therein
3. created the following file "home/dsl/news.html":
<p><a href="http://news.bbc.co.uk/text_only.stm">BBC News via Netrik</a></p>
3. Launch program with "netrik news.html"
Goes like a rocket.
Posted by lucky13 on Feb. 07 2008,01:45
Which version of DSL are you using? If you're using 4+, you can set this up in a shell wrapper so it opens netrik in aterm to whatever page(s) you want. As far as it not working as advertised, you might want to take a look again at your netrikrc. I haven't tried this myself, but I'm willing to bet you two doughnuts that fixing the link by leaving the "file://///////" part out MIGHT make it work right.
SAMPLE SHELL WRAPPER
Then chmod +x, set an icon using the dfmtext tool. Click, voila. If you're not using 4+, you can add menu entries, add buttons in emelfm, make a quick gui launcher for websites with murgalua, etc.
Posted by curaga on Feb. 07 2008,06:55I have found Netrik is an OK text browser. Many keybindings are similar to Lynx, which I use more often.
The only thing that I don't like in it, is it's inability to download files. When you follow a file link, it just displays it, aka garbage with binaries
Posted by jaygeedsl on Feb. 07 2008,11:10Hi lucky13
Tried removing "file:///" but it didn't work. Hold the doughnuts though as I'm dieting.
I'm using 4.2.4. Setting up a shell wrapper and an icon sounds a good idea but at this stage of my LLC (Linux learning curve) I need more detailed how-to level instructions. For instance entering "!/bin/bash" in a terminal is a no-no so the next line can't be entered . Probably best to wait for my Linux primer to arrive from Amazon.
Posted by lucky13 on Feb. 07 2008,16:43
It worked perfectly fine for me when I did it.
I don't know which book you've ordered, but the DSL Book was written pre-DSL 4.
More pedantic shell wrapper how to...
1. Open dfm to /opt/bin (you can do this anywhere, but it's a good idea to put these kinds of things in one place; my preference is some place in PATH so it can be executed on the fly).
2. Right click and select the to option to create a new file. Give it a name and hit enter.
3. You may have to hit refresh when you right click to see the new icon for the empty file you just created. When you can see it, double click and it should open in your default editor (which is most likely beaver).
4. Enter the text with an appropriate HTML document for netrik to open.
5. Save and exit.
6. In dfm, right click over the icon and select options. There is a list of permissions near the bottom of the window that will open. You want to click the box for user (optionally also group) to execute. Hit save and then exit.
7. Now you can use that icon to open netrik with whichever HTML document you want. You can make links to it on your desktop, you can do whatever you need with it.
8. You can change the icon to suit your own desires with either the same options dialog or with the dfmtext editor in your menu.
Let me know if you need any clarification with any of these steps.
Posted by jpeters on Feb. 07 2008,19:05
hmm....I tried it and it's pretty bad (at least the default version loaded with "netrik <site>" gets a lot of "can't read data" errors (or something to that effect) when you click on links. Works well for their own site, "netrik < http://netrik.sourceforge.net//?intro.html" > though, if only web developers used that format.
Posted by jaygeedsl on Feb. 07 2008,20:38lucky13
I've ordered "Introduction to Linux (2nd ed)" by Machtelt Garrels.
Many thanks for the comprehensive shell wrapper how to but I've fallen at the first fence. What is dfm?
Hope you won't take this the wrong way but what's pedantic to you is, unfortunately, opaque in places to me. In the circs I'll put this exercise on the back burner until I've gleaned more about things DSL.
Posted by lucky13 on Feb. 07 2008,21:18
I know everyone's at a different place on the learning curve. dfm is the desktop icon manager and file manager in DSL 4+. When you click on the ~/ (home) icon, you're opening a dfm window. When you click on the system icon, you can work yourself to /opt/bin and make your shell wrapper there per the instructions.
Posted by mikshaw on Feb. 08 2008,00:20The best use I've found for netrik is for viewing man pages. Since DSL doesn't have a local man application, it's rather difficult to just click on a man file and read it.
I installed man2html (approx 45k) and associated man pages with this command:
That's midnight commander syntax, but I think it works basically the same for emelfm (as long as you include aterm -e), and can be modified for use in dfm
Posted by jaygeedsl on Feb. 08 2008,08:45lucky13,Feb. 07 2008,16:43
<quote> 1. Open dfm to /opt/bin... (...when you click on the ~/ (home) icon, you're opening a dfm window. When you click on the system icon, you can work yourself to /opt/bin and make your shell wrapper there per the instructions.)</quote>
Making progress. Major snag is stage 1 above. Can't see any reference to the system icon. All I get here is a Mail folder and a bunch of files from - I think - /home/dsl.
Stage 2 OK
Stage 3. Ok (the icon is binary.xpm)
Stage 4: by "text" do you mean either of the Code Sample items in the following?
SAMPLE SHELL WRAPPER
aterm -T nameofsite -e netrik /path/to/link
aterm -T nameofsite -e netrik URI
If so is "nameofsite" a literal e.g. "BBC_News"?
Puzzled by "/path/to/link"
Stages 5 and 6 OK
Posted by ^thehatsrule^ on Feb. 08 2008,16:061. Use the / (root) icon (or manually run something like `dfm /` if its not there)
Either... they're basically the same.
-T just changes the terminal emulator's title.
/path/to/link is just a local reference, whereas URI is some remote address.
Note: please use the quote tags properly... it makes your post hard to read. You can click the iB Code Buttons if you can't remember which tags this board uses. Plus you can edit and preview your post.
Posted by jaygeedsl on Feb. 08 2008,18:19
Point taken about the quote tags - I've been using the HTML values "< >" in error.
Will try your response to 1.
Re 4 - thanks for the explanation.
Posted by jaygeedsl on Feb. 08 2008,22:51Entering "dfm /" in a terminal allowed me to access folder /opt/bin to setup the file which when clicked in emelfm displayed my chosen web page in Netrik. At last!
However. On rebooting the file has disappeared from folder /opt/bin/ so my intended next step of setting up a desktop icon has been thwarted.
Posted by ^thehatsrule^ on Feb. 09 2008,02:55You'll have to backup/restore that file (or use a persistent opt etc.) Please read the starting documentation when you first boot DSL (then follow up in the wiki, etc.).
Posted by jaygeedsl on Feb. 09 2008,18:22
Right. I thought that having "backup" ticked on the DSL Exit Options when closing down/rebooting automatically made everything persistent. Anyway I added the line "opt/bin/my_script_name" to .filetool.lst, did a Backup/Restore as an each way bet, and then exited via DSL Exit Options with "backup" ticked. And it worked.
To finish what seems like a mini odyssey I'm now pursuing the setting up of a desktop icon in the "X and Fluxbox" forum.
The help that's been given by everyone is much appreciated.