[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Lynx-dev] changing lynx default homepage from the comand line?
From: |
Tim Chase |
Subject: |
Re: [Lynx-dev] changing lynx default homepage from the comand line? |
Date: |
Sun, 17 Nov 2019 07:50:44 -0600 |
There are system-level config files which you should be able to read
but not modify. There are also user-level config files which you are
expected to be able to read and modify to make your life easier.
Yes, you can manually specify a config file every time on the command
line, or specify the start-URL on the command-line every time, or
establish environment variables every time you log in, or define a
function/alias everytime you log in.
But the purpose of creating local/user-level config files is for your
own conveneince. So that when you type "lynx" (or "ly" or whatever
short-hand abbreviation you want), it does exactly what *you* want
(within the software's limitations) every time.
As David mentions, if your Shellworld account allows you to modify
system-level config files, that would impact everybody on the system
and be a big security issue. But I suspect that the administrator
left permissions as their defaults and so you can't change the
site-wide settings as a mere user. But you can copy the lynx.cfg
file -- either from your system /etc/lynx.cfg or
/usr/local/etc/lynx.cfg or downloading a copy from the internet -- to
your home directory, modify it to your satisfaction, and then instruct
lynx to use that config file instead. For your purposes, you might
even be able to just use "echo" to put the one line in a file without
any text editor:
$ echo 'STARTFILE:https://example.com' >> ~/.lynx.cfg
if you want to start at example.com
You then modify your *local* (not system-wide) shell configuration
file to create the command you use to override that config file:
$ echo 'lynx() { command lynx -cfg ~/.lynx.cfg "$@" ; }' >> ~/.bashrc
or whatever your local shell-configuration file is depending on your
shell. Again, would be helpful to know the output of
$ basename $SHELL
to know which shell you're in.
Once you've configured these two things, invoking lynx should give
you the settings you want every time without needing to re-type them.
The local/user-level configuration files are there specifically to
make each user's life easier, without impacting other users on the
same system.
I'm still hoping I could get a Shellworld account so I can test some
of these things to give you a more targeted reply, but I've not heard
back from the admin on any of the occasions I've tried emailing them.
-tim
On 2019-11-16 22:39, Karen Lewellen wrote:
> because this is not my service I wish to tamper with config files
> as little as possible.
> If there is not a command line only method to accomplish this task,
> much like the -useragent one, then never mind.
> thanks for all the ideas but again I am not interested in
> altering lynx.cfg in any fashion.
> Karen
>
>
> On Fri, 15 Nov 2019, Tim Chase wrote:
>
> > Karen,
> >
> > You can combine Thorsten's advice to use "-cfg=FILENAME" with my
> > previous shell-alias suggestion, which is what I've done in the
> > past to specify a local config file. With that in place, you can
> > set your default home-page in your local lynx config file (say,
> > ~/.lynx.cfg)
> >
> > echo "STARTFILE:https://example.com" >> ~/.lynx.cfg
> >
> > and then have your function/alias specify the config file:
> >
> > lynx() { command lynx -cfg=$HOME/.lynx.cfg "$@" ; }
> >
> > I happen to like the TEXTFIELDS_NEED_ACTIVATION:TRUE set in my
> > .cfg file too, so this is how I get that behavior every time.
> >
> > -tim
> >
> >
> > On 2019-11-15 22:56, Thorsten Glaser wrote:
> >> Karen Lewellen dixit:
> >>
> >>> I am seeking a command line method to override the site listed
> >>> as the homepage for lynx regularly, i. e. the page that appears
> >>> if i just entre lynx.
> >>
> >> Then don’t enter just lynx ;-)
> >>
> >> Otherwise, you can override the homepage in the lynx.cfg file.
> >> Since you’re on a shellserver you cannot do that system-wide,
> >> but you can copy the system-wide one into your home directory
> >> and use the -cfg=FILENAME option to point to the changed file.
> >>
> >>> The idea is to change this default homepage, not just simply
> >>> visit a new site once.
> >>
> >> But the “homepage” is only shown if you don’t tell it a site
> >> to visit when starting.
> >>
> >> It’s probably easiest to make an alias, something like this:
> >>
> >> echo "alias 'ly=lynx http://the.new.start.site'" >>~/.bashrc
> >>
> >> Then typing ly will start lynx with the other start page.
> >> Easier than doing the config dance, unless you need that anyway.
> >>
> >> bye,
> >> //mirabilos
> >> --
> >> FWIW, I'm quite impressed with mksh interactively. I thought it
> >> was much *much* more bare bones. But it turns out it beats the
> >> living hell out of ksh93 in that respect. I'd even consider it
> >> for my daily use if I hadn't wasted half my life on my zsh
> >> setup. :-) -- Frank Terbeck in #!/bin/mksh
> >>
> >> _______________________________________________
> >> Lynx-dev mailing list
> >> address@hidden
> >> https://lists.nongnu.org/mailman/listinfo/lynx-dev
> >
> >
> >
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, (continued)
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Bela Lubkin, 2019/11/16
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/16
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Bela Lubkin, 2019/11/19
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Jude DaShiell, 2019/11/16
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/16
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Tim Chase, 2019/11/15
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/16
- Re: [Lynx-dev] changing lynx default homepage from the comand line?,
Tim Chase <=
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Tim Chase, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Tim Chase, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, David Woolley, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Chime Hart, 2019/11/17
- [Lynx-dev] A note on shellworld., Karen Lewellen, 2019/11/17
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Alejandro Lieber, 2019/11/18
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Karen Lewellen, 2019/11/18
- Re: [Lynx-dev] changing lynx default homepage from the comand line?, Jude DaShiell, 2019/11/19