Page 1 of 1

elinks browser

Posted: Thu Apr 14, 2022 7:33 am
by user1111

I use hashbang as one of my ssh servers (mutt for mail, weechat for irc and calcurse (calendar/diary))

ssh'ing into hashbang and running elinks (browser) ... looks like ...

xscreenshot-20220414T073941.png
xscreenshot-20220414T073941.png (239.12 KiB) Viewed 3440 times
xscreenshot-20220414T074253.png
xscreenshot-20220414T074253.png (359.9 KiB) Viewed 3440 times

Add the -C ssh switch and the data flow through the ssh tunnel is compressed, such that browsing is compressed text only type data flows. Has the added benefit that your location is hidden, web sites see your location as where the hashbang servers are located (I used to log into US servers, but they're now in Germany).

One of my boot choices is for just the bulk standard Linux kernel and busybox, with my own initramfs (initrd) that includes mc for file manager/text editor, screen for terminal multiplexing, lynx browser (similar to elinks but elinks looks better visually IMO), full OpenSSH, squashfs tools (mksquashfs/unsquashfs), syncterm (good for connecting to BBS's) ...etc. Which in xz compressed vmlinuz/initrd form weighs in at less than 20MB filesize (I tend to use lz4 compression for the kernel which is a larger 12MB filesize, and leave 35MB of initramfs as-is, non compressed, so combined 47MB).

Using that somewhat curses style desktop and I burn through around 1MB/minute of mobile phone data allowance (that I hotspot so my laptop has internet access whilst out and about). GUI desktop (Fatdog/Chrome ..etc.) burns around 10x as much.

I have been using the 12-quid/month regular goodybag from giffgaff, free calls, 20GB/month data, but I may switch over to the 10-quid/month golden goodybag that's 15GB/month, the difference between regular and golden being regular is pay and use whenever whereas golden auto-rolls each month. So at least in these times of high/rising inflation at least one thing will have declined -16% in price :) (albeit with 25% less data allowance but where most months I don't get close to reaching/exceeding the limits anyway).

A even better deflation for me this month is the discovery that mum, who lives just down the road, in having a dementia diagnosis can now get Council tax exemption (housing tax), so a band F saving of around 2500-quid/year (well actually more like a 2000/year saving as she was getting a 25% single person occupancy discount). So as I pay both hers/ours, a reduction from 4500/year that would otherwise have been paid down to 2500/year :)


Re: elinks

Posted: Sat Apr 23, 2022 9:26 pm
by April
rufwoof wrote: Thu Apr 14, 2022 7:33 am

A even better deflation for me this month is the discovery that mum, who lives just down the road, in having a dementia diagnosis can now get Council tax exemption (housing tax), so a band F saving of around 2500-quid/year (well actually more like a 2000/year saving as she was getting a 25% single person occupancy discount). So as I pay both hers/ours, a reduction from 4500/year that would otherwise have been paid down to 2500/year :)

Shit thats a lot of Council tax.
I forget how that works .
Does she own the land and building or does she rent from the Council?

4,500 pounds is about $8,000 AUD a year or $5800 USD

I own some land here and the Council Rates are about $4000 AUD a year


Re: elinks

Posted: Sat Apr 23, 2022 10:07 pm
by user1111
April wrote: Sat Apr 23, 2022 9:26 pm
rufwoof wrote: Thu Apr 14, 2022 7:33 am

A even better deflation for me this month is the discovery that mum, who lives just down the road, in having a dementia diagnosis can now get Council tax exemption (housing tax), so a band F saving of around 2500-quid/year (well actually more like a 2000/year saving as she was getting a 25% single person occupancy discount). So as I pay both hers/ours, a reduction from 4500/year that would otherwise have been paid down to 2500/year :)

Shit thats a lot of Council tax.
I forget how that works .
Does she own the land and building or does she rent from the Council?

4,500 pounds is about $8,000 AUD a year or $5800 USD

I own some land here and the Council Rates are about $4000 AUD a year

House and land (more a plot) are owned. Not much land space, a detached bungalow perhaps the width of a couple of 'regular' town terraced houses.


Re: elinks

Posted: Sat Apr 23, 2022 10:13 pm
by April

Ridiculous


Re: elinks browser

Posted: Sun Apr 24, 2022 5:50 pm
by user1111

It's easy to avoid using Google, but at the price of less funtionality.

How many are prepared to use the likes of elinks/lynx, maillists, cli ...etc. ? Most are seemingly prepared to pay the cost of themselves (loss of privacy/being tracked every which way etc.) for what they see as the benefits of whatever google product/service.


Re: elinks browser

Posted: Sun Apr 24, 2022 5:58 pm
by geo_c
rufwoof wrote: Thu Apr 14, 2022 7:33 am

I use hashbang as one of my ssh servers (mutt for mail, weechat for irc and calcurse (calendar/diary))

After getting some experience with Lynx, I started reading up on elinks, and you've convinced me to run that one also. I have also used calcurse in the past, and for awhile I was exporting ics files so I could read them on my ungoogled Lineage OS phone. But I found some incompatibility, and I'd like to be able to have the calendar on the phone and count on the data transferring solidly. So I use Rainlendar2, which is pretty nice, but I would like to use the text based option, and I've thought about going back to it.


Re: elinks browser

Posted: Sun Apr 24, 2022 6:17 pm
by user1111

Don't do either alone (cli or gui), do both. Ctrl-Alt-F2 for instance and work on setting up a environment you like. mc with lynx style navigation for file manager and text editor, ssh with a reasonable font such as ter-32b for bbs's and hashbang ...etc.

For me, ageing eyes makes using a phone somewhat difficult/slow. Not much fun. When out and about I, or rather web sites/google, can burn through 100MB/minute of your phones monthly data allowance when using chrome/gui. With cli that same 100MB can last for a couple of hours or more whilst providing different enjoyable/pleasant activities. irc, BBS's (chats/games/reading posts etc.). Perhaps whilst also playing locally stored music files via the ctrl-alt-F4 (or whatever) gui session (miss monique is one I have quite a few local copies of, hour long or so each). Next thing you know 8pm has turned to 11pm whilst your Mobile Data usage tends to have been very little. With gui surfing the same few hours can have eaten through GB's of data.


Re: elinks browser

Posted: Sun Apr 24, 2022 6:56 pm
by geo_c

@rufwoof

In my typical fashion, I just now noticed that fossapup has an ssh gui for logging into a server. So I guess what I would need to do next to try ssh out is create an account at hashbang.


Re: elinks browser

Posted: Sun Apr 24, 2022 7:41 pm
by user1111
rufwoof wrote: Sun Apr 24, 2022 6:17 pm

mc with lynx style navigation

To clarify, that's in mc using F9 (Options) Panel Options, Navigation section and toggle the Lynx Like Motion option ... which means that left and right arrows step you back or into folders/directories. I tend to set the theme to gotar as my preferred choice. Options, Appearance.

If you edit /etc/mc/mc.menu that changes the default mc menu that you see when you press F2. A single character followed by a description on one line, followed by the commands invoked when that menu option is invoked

Code: Select all

r    reboot
     /sbin/reboot
1   Mount sda1
    mount /dev/sda1 /mnt/sda1

... type syntax.

You can create different menu files in different folders, so a tree of menus is possible via a tree of folders with different mc menus in each.

UP/down arrow to a file (tab steps between left and right panes) and alt-tab injects that highlighted filename into the command line. For instance type cat and press alt-enter will pull in the current selected filename.

INS (insert) to select multiple files, such as copying selected files from one folder (left pane) to anther folder (right pane).

I'm familiar with vi (editor), but mc editor is quite nice. I tend to follow OpenBSD code style, set to full 8 character tabs (no fake half tabs) as the first indent, 4 spaces deeper than that to the next indent level (two tabs to the third level ...etc.). 80 characters max width so \ line continuation used to break lines longer than 80. I also like to right align comments, so they all end at the 80th character width, somewhat keeps code and comments neatly separated but that broadly merge quite nicely. mc editor is good for such formatting purposes. The syntax highlighting of mc is also nice.

I like tab being shown in blue as that also highlights extra spaces at the end of lines that ideally should be tidied out.

ex.png
ex.png (281.08 KiB) Viewed 3278 times

Re: elinks browser

Posted: Sun Apr 24, 2022 10:40 pm
by geo_c

@rufwoof thanks for all this guidance. At the risk of sounding like a complete dullard, let me confirm that you are talking about midnight commander when you say mc.

I'm also a little confused about where to go in order to set up an ssh hashbang log in. I went to hashbang.org's github page at: https://github.com/hashbang/signup-ssh but I don't know what to do there. I'm not in a critical hurry to get the remote shell going, but I am definitely on track to do. So far I installed Lynx and elinks on Fossapup. Elinks is nice with the drop down menus and all, but I may like the more basic Lynx a little better. It doesn't ask you to confirm editing text fields and things of that nature. I'll have to use them both for awhile to really know. So my thought today was to install midnight commander on Fossapup also. But I can see it makes sense not to install any of these things if they can all be used in their latest versions remotely.

I should inform you that I categorize myself as a confidently experienced newbie when it comes to linux shell operation. My dad worked for IBM from 1964-1978 or so, and I grew up with dos. In fact my dad built a SWTP 6800 from a kit, and that was the first computer I ever used, which had no disk drives whatsoever. It booted up in BASIC. Then of course I used early PC's, MSDOS, and the original windows throughout the '90s. But nonetheless, I became a musician and learned the coding of music while never losing my appreciation for computing code. But I did waste a couple decades by not using command line, that is until I discovered Puppylinux after trying Ubuntu, which at the time Ubuntu seemed to me more of a glorified windows wannabe. In other words, it had lots of bloat. Also it had to be a full install, which was quite the pain, and after windows 7, it was not compatible (easily) with a dual windows boot. That matters not a bit to me anymore, as I promptly reformat the hard drive of any windows I computer I acquire and install puppy on it.

All that to say. You're a 150 steps ahead of me. But I love forums because they create a reference manual. So as I catch up I can come back to your posts and take advantage of all the insight you're passing along. :thumbup:


Re: elinks browser

Posted: Sun Apr 24, 2022 10:49 pm
by geo_c

@rufwoof

I installed mc, and I like it already. ctrl-o pops in and out of the shell. Nice.


Re: elinks browser

Posted: Mon Apr 25, 2022 12:51 am
by geo_c

Lynx Browser looks nice with Midnight Commander, especially with my custom Neo Console GTK theme.
Image


Re: elinks browser

Posted: Mon Apr 25, 2022 1:03 am
by geo_c

Of course elinks lays the web page out a little more true to the graphic intention, at least in how the fields and links are arranged on the page. I suppose there is a way to configure the color scheme, but I haven't seen the documentation for it.

The post above was made from Lynx, and this one is being made from elinks, so I'm finally figuring out how to cut and paste in the shell.
Image


Re: elinks browser

Posted: Mon Apr 25, 2022 5:41 am
by geo_c

Well it's all just getting too cool. I installed the nano text editor, very smart layout. MC makes running applications from the command line super efficient. I love it. If I keep going in this direction I may get to the point of being able to get some work done without ever starting xorg. I'll still need to run the heavy weight gui's for a lot of things of course, but once I fire up calcurse and mutt then I can do anything from the terminal that doesn't require intensive graphics.

Now the thing I'm really curious about is how do you make those elaborate character based graphics? I'm pretty sure there's a name for that kind of art, but I don't know what it's called.


Re: elinks browser

Posted: Mon Apr 25, 2022 7:14 am
by user1111
geo_c wrote: Sun Apr 24, 2022 10:40 pm

you are talking about midnight commander when you say mc.

yes

I'm also a little confused about where to go in order to set up an ssh hashbang

Visit the front page and right click ... view page source :)

For panes and consistent copying/pasting ... tmux. The default control key is ctrl-b, however if you have tmux running locally and are also using tmux on hashbang then that conflicts so you have to set one or the other to a different control key in tmux configuration

Once you're in tmux

Pane vertical split = ctrl-b %, horizontal split = ctrl-b "
ctrl-b arrow keys to flip between panes
ctrl-b z to zoom toggle a pane

You can enter copy mode (where you can also scroll back/foward) using ctrl-b [
Within copy mode arrow keys to the start of text and press SPACE
arrow to end of text and press ENTER to end selection
Navigate to where you want to paste, maybe ctrl-b arrow to another pane (or window) and
ctrl-b ] ... to paste the text. Sounds daunting but for easier remembering think of it as a [ ] type key combination choice with space and enter for highlighting.

Nice for consistency as otherwise different programs often have different methods of copying/selecting/pastng text.

Personally I'm not a fan of using panes and zoom toggles - and instead prefer different programs in different windows, ctrl-b c to create another window, ctrl-b n to step to the next window or ctrl-b 2 ... numeric step to a window.

On hashbang config files are stored under ~/.dotfiles, so tmux config files is in ~/.dotfiles/tmux/.tmux.conf

I've set the ctrl-b default control key to be a backtick instead on hashbang, so it doesn't conflict with ctrl-b in a local machine tmux session (launch tmux locally, and in one window connect to hashbang and its tmux session). To change the ctrl-b control key in .tmux.conf ...

unbind C-b
set-option -g prefix `
bind ` send-prefix

so I can for instance ` d ... to send the same as ctrl-b d ... to detach from tmux before exit'ing hashbang. With that configuration when coding and wanting to enter a execute quote (backtick) I have to press it twice to actually get a backtick into the code/text (a relatively minor inconvenience).


Re: elinks browser

Posted: Mon Apr 25, 2022 7:40 am
by user1111

Another nice feature with tmux is that if two or more log into the same userid/server that is running tmux then you each see the exact same desktop and any of you can type/control things. Team-working/collaboration.

Having a always on server that you can attach to from one location/device, detach whilst leaving it running, and later attach to from another location/device is also nice. With weechat for instance (irc) you can access that and page-up to scan back through all former messages.


Re: elinks browser

Posted: Mon Apr 25, 2022 2:59 pm
by geo_c
rufwoof wrote: Mon Apr 25, 2022 7:14 am

Visit the front page and right click ... view page source :)

Okay! Now I'm completely lost. I signed into Github, went to https://github.com/hashbang/signup-ssh and viewed the source, so now I'm looking at the source html code and don't know what to do next.

How do I go from looking at the source code of a webpage in Librewolf to accessing a shell server in the terminal?


Re: elinks browser

Posted: Mon Apr 25, 2022 4:41 pm
by user1111

There's a shell script in the html web page source, copy that out from the #!/bin/sh (line 85) downward and paste it into a script (executable) file and run that, after having created your ~/.ssh folder if that doesn't already exist. When you create a ~.ssh folder it must have the right permissions otherwise ssh will fail

chmod 700 ~/.ssh

Maybe best if you have a empty ~/.ssh folder first and let it create the id_rsa and id_rsa.pub within that for you, unless you already do a lot of ssh'ing around. I don't bother with password protecting my ssh keys so when asked for a password to set against that I just use the empty password option

Something like pick a userid to use, and a server of which there is now only one (de1.hashbang.sh) - so option 1, and for the rest of questions just answer n (no).

First connect and you'll be asked to verify the signature is ok - enter Yes and that will add it to your ~/.ssh known hosts file.


Re: elinks browser

Posted: Fri May 13, 2022 12:36 pm
by geo_c
rufwoof wrote: Thu Apr 14, 2022 7:33 am

I use hashbang as one of my ssh servers (mutt for mail, weechat for irc and calcurse (calendar/diary))

I did my first compile from source with calcurse 4.8.0 and started using it. I had used it briefly a couple of years ago. It's a really great calendar, quick to enter and edit appointments, including recurring appointments. Once the prompt sequence became familiar I could enter the whole appointment without ever looking at the monitor.

So at this point I can handle just about every daily task in the terminal, except for mail.

I looked at mutt, and so far that seems pretty complicated to get running, as the instructions I viewed require installations of a couple other utilities, which I tried unsuccessfully. I don't remember what they were at the moment. That being said, sylpheed is what I normally use, and I built a portable for it, it is very key-stroke friendly, the mouse is not necessary to use it at all.

Image


Re: elinks browser

Posted: Sat May 14, 2022 10:13 pm
by geo_c

I'm starting to find my way around elinks finally, editing the options and colors. Entering text and copy & paste still a bit of pain though. I'll get it eventually.
[img]https://i.postimg.cc/vBr5vFFJ/Screenshot-5.jpg[img]


Re: elinks--Not finding /tmp files

Posted: Sun May 15, 2022 11:53 pm
by geo_c

I'm having a pretty good experience with elinks, except when I try to to view images and documents. The associated application (Viewnior and epdf for instance) aren't able to locate the file /tmp/[filename] and indeed they aren't there. I don't see anywhere in options to specify the temp directory in the elinks options. I have set every option available except a few I am clueless about such as URI options.

Does anyone have a suggestion? I'm curious as to whether it has to do with the fact that the fossapup /tmp directory is symlink'd to /initrd/mnt/tmp.


Re: elinks browser

Posted: Thu May 19, 2022 5:47 pm
by Pikaxhu

Hi

I had the same problem on bionic. Here my two cents using archlinux wiki:

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.

My autosaved feh setup, as follows:

## document.uri_passing
# Rules for passing URIs to external commands. When one rule is defined the
# link and tab menu will have a menu item that makes it possible to pass the
# the link, frame or tab URI to an external command. If several rules are
# defined the link and tab menu will have a submenu of items for each rule.
#
# Note, this is mostly useful for launching graphical viewers, since there is
# no support for releasing the terminal while the command runs. The action
# and submenus are also available by binding keys to the
# frame-external-command, the link-external-command, and the
# tab-external-command actions.

## document.uri_passing.feh <str>
# A rule for passing URI to an external command. The format is:
# %c in the string means the current URL
# %% in the string means '%'
# Do _not_ put single- or double-quotes around %c.
set document.uri_passing.feh = "feh %c"

After: menu
setup
options
URI passing Add
feh %c
save

You can right click image link, and x will pass it to feh.

Hope this helps.

Pikaxhu


Re: elinks browser

Posted: Thu May 19, 2022 6:12 pm
by geo_c
Pikaxhu wrote: Thu May 19, 2022 5:47 pm

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.
Pikaxhu

Thanks, that's exactly what I was looking and the only place I didn't try!


Re: elinks browser

Posted: Thu May 19, 2022 7:22 pm
by geo_c
Pikaxhu wrote: Thu May 19, 2022 5:47 pm

After: menu
setup
options
URI passing Add
feh %c
save

You can right click image link, and x will pass it to feh.

Pikaxhu

Well, I followed the procedure and the resulting line in elinks.conf is:

set.document.uri_passing.view = "viewnior %c"

Now viewnior doesn't notify that it "can't find the file in /tmp" BUT it doesn't display or apparently load the image, so I'm not getting the URI passed correctly.


Re: elinks browser

Posted: Thu May 19, 2022 7:47 pm
by geo_c

So it seems to work with local images, in other words I have bookmarked my data directory and when I browse it and right click on a jpg, I get a menu (because I added a pdf command also) and that opens the image in the defaultimageviewer. I had changed the command to:

set.document.uri_passing.eview = "defaultimageviewer %c"

Perhaps the problem is that images on web pages, such as many on the pup forum are actually links to URL's?

Not sure, but the command works, at least locally. So I'll keep playing with it.

I have the elinks.conf opened in minimum profit from midnight commander, and as I change options from the elinks interface, it reloads and I see the change, or I change it manually after viewing the config line.

side note: I also finally figured out to set the config file save to 'rewrite the file from scratch' which helps a lot.


Re: elinks browser

Posted: Thu May 19, 2022 10:46 pm
by Pikaxhu

Viewnior does not work on elinks, because it inserts "root" as per :

“/root/'/tmp/elinkFile.jpg'”

if you manage to see error displayed, despite elinkFile.jpg exists on /tmp

Pikaxhu

geo_c wrote: Thu May 19, 2022 7:22 pm
Pikaxhu wrote: Thu May 19, 2022 5:47 pm

After: menu
setup
options
URI passing Add
feh %c
save

You can right click image link, and x will pass it to feh.

Pikaxhu

Well, I followed the procedure and the resulting line in elinks.conf is:

set.document.uri_passing.view = "viewnior %c"

Now viewnior doesn't notify that it "can't find the file in /tmp" BUT it doesn't display or apparently load the image, so I'm not getting the URI passed correctly.


Re: elinks browser

Posted: Sat May 21, 2022 1:07 pm
by geo_c
Pikaxhu wrote: Thu May 19, 2022 10:46 pm

Viewnior does not work on elinks, because it inserts "root" as per :

“/root/'/tmp/elinkFile.jpg'”

if you manage to see error displayed, despite elinkFile.jpg exists on /tmp

Pikaxhu

Yes, I did notice that, and so I tried to substitue xfimage instead of default-viewer, which opened but did not display the image, just like vienior did when I substituted it for defaultimageviewer. So I'm still baffled by it.


Re: elinks browser

Posted: Sat May 21, 2022 1:07 pm
by geo_c
geo_c wrote: Sat May 21, 2022 1:07 pm
Pikaxhu wrote: Thu May 19, 2022 10:46 pm

Viewnior does not work on elinks, because it inserts "root" as per :

“/root/'/tmp/elinkFile.jpg'”

if you manage to see error displayed, despite elinkFile.jpg exists on /tmp

Pikaxhu

Yes, I did notice that, and so I tried to substitue xfimage instead of default-viewer or viewnior, which opened but did not display the image, just like vienior did when I substituted it for defaultimageviewer. So I'm still baffled by it.