How do I put an argument into the BROWSER variable?
up vote
0
down vote
favorite
I like to be able to do export BROWSER="lynx -cfg=~/.lynx.cfg"
. I tried this directly, and I also tried setting an alias alias lynx="lynx -cfg=~/.lynx.cfg"
, but these didn't work. (Meaning that tools that use this variable to launch a browser still ignored my config file or didn't launch the browser at all.)
shell zsh environment-variables alias
add a comment |
up vote
0
down vote
favorite
I like to be able to do export BROWSER="lynx -cfg=~/.lynx.cfg"
. I tried this directly, and I also tried setting an alias alias lynx="lynx -cfg=~/.lynx.cfg"
, but these didn't work. (Meaning that tools that use this variable to launch a browser still ignored my config file or didn't launch the browser at all.)
shell zsh environment-variables alias
Does it work if you rename your configuration file into~/.lynxrc
and don't use an option?
– Kusalananda
Nov 23 at 6:48
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I like to be able to do export BROWSER="lynx -cfg=~/.lynx.cfg"
. I tried this directly, and I also tried setting an alias alias lynx="lynx -cfg=~/.lynx.cfg"
, but these didn't work. (Meaning that tools that use this variable to launch a browser still ignored my config file or didn't launch the browser at all.)
shell zsh environment-variables alias
I like to be able to do export BROWSER="lynx -cfg=~/.lynx.cfg"
. I tried this directly, and I also tried setting an alias alias lynx="lynx -cfg=~/.lynx.cfg"
, but these didn't work. (Meaning that tools that use this variable to launch a browser still ignored my config file or didn't launch the browser at all.)
shell zsh environment-variables alias
shell zsh environment-variables alias
asked Nov 23 at 6:24
HappyFace
27111
27111
Does it work if you rename your configuration file into~/.lynxrc
and don't use an option?
– Kusalananda
Nov 23 at 6:48
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04
add a comment |
Does it work if you rename your configuration file into~/.lynxrc
and don't use an option?
– Kusalananda
Nov 23 at 6:48
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04
Does it work if you rename your configuration file into
~/.lynxrc
and don't use an option?– Kusalananda
Nov 23 at 6:48
Does it work if you rename your configuration file into
~/.lynxrc
and don't use an option?– Kusalananda
Nov 23 at 6:48
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
I don't think you can however you could try:
Must use absolute path.
export BROWSER='/home/username/lynx.sh'
Create new file lynx.sh in home dir.
#!/bin/bash
linx -cfg=/home/username/.lynx.cfg
Make it exicutable.
Then:
Launching Browser should launch lynx.
or
./lynx.sh
And/Or:
Type:
whereis lynx
Use in next step.
Edit bash_aliases:
Must use absolute path to: lynx.cfg
Must use absolute path to: lynx, if not in /usr/bin/
alias=lynx='/path/to/lynx -cfg=/home/username/.lynx.cfg'
Must use ' ' if path contains special charactors.
New contributor
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am runningddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)
– HappyFace
Nov 23 at 8:58
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I don't think you can however you could try:
Must use absolute path.
export BROWSER='/home/username/lynx.sh'
Create new file lynx.sh in home dir.
#!/bin/bash
linx -cfg=/home/username/.lynx.cfg
Make it exicutable.
Then:
Launching Browser should launch lynx.
or
./lynx.sh
And/Or:
Type:
whereis lynx
Use in next step.
Edit bash_aliases:
Must use absolute path to: lynx.cfg
Must use absolute path to: lynx, if not in /usr/bin/
alias=lynx='/path/to/lynx -cfg=/home/username/.lynx.cfg'
Must use ' ' if path contains special charactors.
New contributor
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am runningddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)
– HappyFace
Nov 23 at 8:58
add a comment |
up vote
1
down vote
I don't think you can however you could try:
Must use absolute path.
export BROWSER='/home/username/lynx.sh'
Create new file lynx.sh in home dir.
#!/bin/bash
linx -cfg=/home/username/.lynx.cfg
Make it exicutable.
Then:
Launching Browser should launch lynx.
or
./lynx.sh
And/Or:
Type:
whereis lynx
Use in next step.
Edit bash_aliases:
Must use absolute path to: lynx.cfg
Must use absolute path to: lynx, if not in /usr/bin/
alias=lynx='/path/to/lynx -cfg=/home/username/.lynx.cfg'
Must use ' ' if path contains special charactors.
New contributor
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am runningddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)
– HappyFace
Nov 23 at 8:58
add a comment |
up vote
1
down vote
up vote
1
down vote
I don't think you can however you could try:
Must use absolute path.
export BROWSER='/home/username/lynx.sh'
Create new file lynx.sh in home dir.
#!/bin/bash
linx -cfg=/home/username/.lynx.cfg
Make it exicutable.
Then:
Launching Browser should launch lynx.
or
./lynx.sh
And/Or:
Type:
whereis lynx
Use in next step.
Edit bash_aliases:
Must use absolute path to: lynx.cfg
Must use absolute path to: lynx, if not in /usr/bin/
alias=lynx='/path/to/lynx -cfg=/home/username/.lynx.cfg'
Must use ' ' if path contains special charactors.
New contributor
I don't think you can however you could try:
Must use absolute path.
export BROWSER='/home/username/lynx.sh'
Create new file lynx.sh in home dir.
#!/bin/bash
linx -cfg=/home/username/.lynx.cfg
Make it exicutable.
Then:
Launching Browser should launch lynx.
or
./lynx.sh
And/Or:
Type:
whereis lynx
Use in next step.
Edit bash_aliases:
Must use absolute path to: lynx.cfg
Must use absolute path to: lynx, if not in /usr/bin/
alias=lynx='/path/to/lynx -cfg=/home/username/.lynx.cfg'
Must use ' ' if path contains special charactors.
New contributor
edited Nov 23 at 7:26
New contributor
answered Nov 23 at 7:04
Michael Prokopec
62115
62115
New contributor
New contributor
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am runningddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)
– HappyFace
Nov 23 at 8:58
add a comment |
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am runningddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)
– HappyFace
Nov 23 at 8:58
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
I thought of the first solution and was going to post it but you beat me to it :)) I don’t understand the second solution though? How is this different from a normal alias, which I tried and it didn’t work?
– HappyFace
Nov 23 at 7:06
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
Forgot must use absolute path..
– Michael Prokopec
Nov 23 at 7:16
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The second solution doesn't work on zsh.
– HappyFace
Nov 23 at 8:48
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am running
ddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)– HappyFace
Nov 23 at 8:58
The first solution makes the tool that is using BROWSER hang, though only after adding "$@" to the end of your script. Without this change, the tool just exits after a few seconds. I tried echoing hi in the script, and it was not echoed back to me when I ran the tool. (I am running
ddgr --unsafe -n 6 --noprompt '!w apple'
if it helps.)– HappyFace
Nov 23 at 8:58
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f483602%2fhow-do-i-put-an-argument-into-the-browser-variable%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Does it work if you rename your configuration file into
~/.lynxrc
and don't use an option?– Kusalananda
Nov 23 at 6:48
@Kusalananda No, it doesn't work. It seems to be using another default config file.
– HappyFace
Nov 23 at 9:00
How/where did you set the alias?; How did you try to use it?
– ctrl-alt-delor
Nov 23 at 10:04