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










share|improve this question






















  • 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















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










share|improve this question






















  • 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













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










share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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


















  • 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










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.






share|improve this answer










New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • 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 running ddgr --unsafe -n 6 --noprompt '!w apple' if it helps.)
    – HappyFace
    Nov 23 at 8:58











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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

























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.






share|improve this answer










New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • 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 running ddgr --unsafe -n 6 --noprompt '!w apple' if it helps.)
    – HappyFace
    Nov 23 at 8:58















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.






share|improve this answer










New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • 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 running ddgr --unsafe -n 6 --noprompt '!w apple' if it helps.)
    – HappyFace
    Nov 23 at 8:58













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.






share|improve this answer










New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









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.







share|improve this answer










New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this answer



share|improve this answer








edited Nov 23 at 7:26





















New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









answered Nov 23 at 7:04









Michael Prokopec

62115




62115




New contributor




Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Michael Prokopec is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • 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 running ddgr --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










  • 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 running ddgr --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


















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Morgemoulin

Scott Moir

Souastre