$EDITOR environment variable won't set





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















Whenever I attempt to set the EDITOR environment variable, a subsequent check reveals no value has been set.



I was attempting to edit the crontab:



sudo crontab -e -u mycooluser


which returns:



no crontab for mycooluser - using an empty one
Error opening terminal: unknown.
crontab: "/usr/bin/sensible-editor" exited with status 1


I then found this post:
Setup a cronjob from commandline which suggested I change the editor used.



So I tried (including variations):



export EDITOR="/bin/nano"
export EDITOR="usr/bin/nano"
export EDITOR=nano


and when I execute (per this link How do I find and set my $EDITOR environment variable?):



echo $EDITOR


OR



printenv | grep EDITOR


I get nothing, a quick printenv check also confirms that no EDITOR variable exists in the list. To be clear, by 'nothing' I mean that on the echo $EDITOR it prints a blank line and for printenv | grep EDITOR nothing is printed.



Any idea why the variable isn't being set or why I can't seem to change it?



System:
Ubuntu 18.04.1, Using Terminal in Webmin










share|improve this question







New contributor




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





















  • You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

    – Jeff Schaller
    2 days ago











  • Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

    – Josh Whitlow
    2 days ago













  • What happens if you try EDITOR="/bin/nano" crontab -e?

    – Panki
    2 days ago











  • It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

    – Josh Whitlow
    2 days ago


















0















Whenever I attempt to set the EDITOR environment variable, a subsequent check reveals no value has been set.



I was attempting to edit the crontab:



sudo crontab -e -u mycooluser


which returns:



no crontab for mycooluser - using an empty one
Error opening terminal: unknown.
crontab: "/usr/bin/sensible-editor" exited with status 1


I then found this post:
Setup a cronjob from commandline which suggested I change the editor used.



So I tried (including variations):



export EDITOR="/bin/nano"
export EDITOR="usr/bin/nano"
export EDITOR=nano


and when I execute (per this link How do I find and set my $EDITOR environment variable?):



echo $EDITOR


OR



printenv | grep EDITOR


I get nothing, a quick printenv check also confirms that no EDITOR variable exists in the list. To be clear, by 'nothing' I mean that on the echo $EDITOR it prints a blank line and for printenv | grep EDITOR nothing is printed.



Any idea why the variable isn't being set or why I can't seem to change it?



System:
Ubuntu 18.04.1, Using Terminal in Webmin










share|improve this question







New contributor




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





















  • You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

    – Jeff Schaller
    2 days ago











  • Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

    – Josh Whitlow
    2 days ago













  • What happens if you try EDITOR="/bin/nano" crontab -e?

    – Panki
    2 days ago











  • It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

    – Josh Whitlow
    2 days ago














0












0








0








Whenever I attempt to set the EDITOR environment variable, a subsequent check reveals no value has been set.



I was attempting to edit the crontab:



sudo crontab -e -u mycooluser


which returns:



no crontab for mycooluser - using an empty one
Error opening terminal: unknown.
crontab: "/usr/bin/sensible-editor" exited with status 1


I then found this post:
Setup a cronjob from commandline which suggested I change the editor used.



So I tried (including variations):



export EDITOR="/bin/nano"
export EDITOR="usr/bin/nano"
export EDITOR=nano


and when I execute (per this link How do I find and set my $EDITOR environment variable?):



echo $EDITOR


OR



printenv | grep EDITOR


I get nothing, a quick printenv check also confirms that no EDITOR variable exists in the list. To be clear, by 'nothing' I mean that on the echo $EDITOR it prints a blank line and for printenv | grep EDITOR nothing is printed.



Any idea why the variable isn't being set or why I can't seem to change it?



System:
Ubuntu 18.04.1, Using Terminal in Webmin










share|improve this question







New contributor




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












Whenever I attempt to set the EDITOR environment variable, a subsequent check reveals no value has been set.



I was attempting to edit the crontab:



sudo crontab -e -u mycooluser


which returns:



no crontab for mycooluser - using an empty one
Error opening terminal: unknown.
crontab: "/usr/bin/sensible-editor" exited with status 1


I then found this post:
Setup a cronjob from commandline which suggested I change the editor used.



So I tried (including variations):



export EDITOR="/bin/nano"
export EDITOR="usr/bin/nano"
export EDITOR=nano


and when I execute (per this link How do I find and set my $EDITOR environment variable?):



echo $EDITOR


OR



printenv | grep EDITOR


I get nothing, a quick printenv check also confirms that no EDITOR variable exists in the list. To be clear, by 'nothing' I mean that on the echo $EDITOR it prints a blank line and for printenv | grep EDITOR nothing is printed.



Any idea why the variable isn't being set or why I can't seem to change it?



System:
Ubuntu 18.04.1, Using Terminal in Webmin







ubuntu terminal environment-variables webmin






share|improve this question







New contributor




Josh Whitlow 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 question







New contributor




Josh Whitlow 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 question




share|improve this question






New contributor




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









asked 2 days ago









Josh WhitlowJosh Whitlow

1064




1064




New contributor




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





New contributor





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






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













  • You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

    – Jeff Schaller
    2 days ago











  • Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

    – Josh Whitlow
    2 days ago













  • What happens if you try EDITOR="/bin/nano" crontab -e?

    – Panki
    2 days ago











  • It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

    – Josh Whitlow
    2 days ago



















  • You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

    – Jeff Schaller
    2 days ago











  • Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

    – Josh Whitlow
    2 days ago













  • What happens if you try EDITOR="/bin/nano" crontab -e?

    – Panki
    2 days ago











  • It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

    – Josh Whitlow
    2 days ago

















You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

– Jeff Schaller
2 days ago





You do not get a message like EDITOR: readonly variable when attempting to set the value, correct?

– Jeff Schaller
2 days ago













Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

– Josh Whitlow
2 days ago







Correct, I do not, when I set the value, it acts as though it was executed with no other messages displayed.

– Josh Whitlow
2 days ago















What happens if you try EDITOR="/bin/nano" crontab -e?

– Panki
2 days ago





What happens if you try EDITOR="/bin/nano" crontab -e?

– Panki
2 days ago













It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

– Josh Whitlow
2 days ago





It returns the following: Error opening terminal: unknown. crontab: "/bin/nano" exited with status 1

– Josh Whitlow
2 days ago










1 Answer
1






active

oldest

votes


















6














You are using the so-called "popup shell". This is not a terminal. Nor is it in fact really a shell.



It's a piece of user interface fakery inside a WWW browser that executes shell commands separately from one another as individual transactions. There's no actual continually running shell to hold an environment variable. It is merely presented that way by the user interface in the WWW browser. The shell commands are run in a nonce process environment where no TERM environment variable has been set, and in a session with no controlling terminal. And even if it were set, there's no terminal emulator to handle the terminal I/O that full-screen programs like text editors use. Indeed, there is only provision for relaying output of the program back to the local machine; no input is sent in the other direction.



nano, pico, and emacs will complain about being unable to determine the terminal type and open the terminal. VIM and NeoVIM fall back to assumptions that simply do not hold in this case, and give the appearance of simply hanging. Not even line-mode editors like ex and ed will work as user input is simply not sent to the remote machine. (One possibly could drive ex non-interactively with its -c option.) Similarly, one cannot change passwords with the passwd command.



This has been a misunderstanding of the "popup shell" since at least 2016.



Further reading




  • "JedMeister" (2018-03-04). Interactive Terminal. Bug #1037. authentic-theme bugs.

  • Michael Hurt (2018-11-13). Error opening terminal: unknown. Bug #5214. Webmin bugs.

  • "7starsone" (2016-12-08). File Manager: Command line. Bug #566. authentic-theme bugs.






share|improve this answer


























  • I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

    – Josh Whitlow
    2 days ago











  • I think I heard you say that this was an opportunity for ed!

    – Jeff Schaller
    2 days ago












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',
autoActivateHeartbeat: false,
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
});


}
});






Josh Whitlow is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511949%2feditor-environment-variable-wont-set%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









6














You are using the so-called "popup shell". This is not a terminal. Nor is it in fact really a shell.



It's a piece of user interface fakery inside a WWW browser that executes shell commands separately from one another as individual transactions. There's no actual continually running shell to hold an environment variable. It is merely presented that way by the user interface in the WWW browser. The shell commands are run in a nonce process environment where no TERM environment variable has been set, and in a session with no controlling terminal. And even if it were set, there's no terminal emulator to handle the terminal I/O that full-screen programs like text editors use. Indeed, there is only provision for relaying output of the program back to the local machine; no input is sent in the other direction.



nano, pico, and emacs will complain about being unable to determine the terminal type and open the terminal. VIM and NeoVIM fall back to assumptions that simply do not hold in this case, and give the appearance of simply hanging. Not even line-mode editors like ex and ed will work as user input is simply not sent to the remote machine. (One possibly could drive ex non-interactively with its -c option.) Similarly, one cannot change passwords with the passwd command.



This has been a misunderstanding of the "popup shell" since at least 2016.



Further reading




  • "JedMeister" (2018-03-04). Interactive Terminal. Bug #1037. authentic-theme bugs.

  • Michael Hurt (2018-11-13). Error opening terminal: unknown. Bug #5214. Webmin bugs.

  • "7starsone" (2016-12-08). File Manager: Command line. Bug #566. authentic-theme bugs.






share|improve this answer


























  • I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

    – Josh Whitlow
    2 days ago











  • I think I heard you say that this was an opportunity for ed!

    – Jeff Schaller
    2 days ago
















6














You are using the so-called "popup shell". This is not a terminal. Nor is it in fact really a shell.



It's a piece of user interface fakery inside a WWW browser that executes shell commands separately from one another as individual transactions. There's no actual continually running shell to hold an environment variable. It is merely presented that way by the user interface in the WWW browser. The shell commands are run in a nonce process environment where no TERM environment variable has been set, and in a session with no controlling terminal. And even if it were set, there's no terminal emulator to handle the terminal I/O that full-screen programs like text editors use. Indeed, there is only provision for relaying output of the program back to the local machine; no input is sent in the other direction.



nano, pico, and emacs will complain about being unable to determine the terminal type and open the terminal. VIM and NeoVIM fall back to assumptions that simply do not hold in this case, and give the appearance of simply hanging. Not even line-mode editors like ex and ed will work as user input is simply not sent to the remote machine. (One possibly could drive ex non-interactively with its -c option.) Similarly, one cannot change passwords with the passwd command.



This has been a misunderstanding of the "popup shell" since at least 2016.



Further reading




  • "JedMeister" (2018-03-04). Interactive Terminal. Bug #1037. authentic-theme bugs.

  • Michael Hurt (2018-11-13). Error opening terminal: unknown. Bug #5214. Webmin bugs.

  • "7starsone" (2016-12-08). File Manager: Command line. Bug #566. authentic-theme bugs.






share|improve this answer


























  • I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

    – Josh Whitlow
    2 days ago











  • I think I heard you say that this was an opportunity for ed!

    – Jeff Schaller
    2 days ago














6












6








6







You are using the so-called "popup shell". This is not a terminal. Nor is it in fact really a shell.



It's a piece of user interface fakery inside a WWW browser that executes shell commands separately from one another as individual transactions. There's no actual continually running shell to hold an environment variable. It is merely presented that way by the user interface in the WWW browser. The shell commands are run in a nonce process environment where no TERM environment variable has been set, and in a session with no controlling terminal. And even if it were set, there's no terminal emulator to handle the terminal I/O that full-screen programs like text editors use. Indeed, there is only provision for relaying output of the program back to the local machine; no input is sent in the other direction.



nano, pico, and emacs will complain about being unable to determine the terminal type and open the terminal. VIM and NeoVIM fall back to assumptions that simply do not hold in this case, and give the appearance of simply hanging. Not even line-mode editors like ex and ed will work as user input is simply not sent to the remote machine. (One possibly could drive ex non-interactively with its -c option.) Similarly, one cannot change passwords with the passwd command.



This has been a misunderstanding of the "popup shell" since at least 2016.



Further reading




  • "JedMeister" (2018-03-04). Interactive Terminal. Bug #1037. authentic-theme bugs.

  • Michael Hurt (2018-11-13). Error opening terminal: unknown. Bug #5214. Webmin bugs.

  • "7starsone" (2016-12-08). File Manager: Command line. Bug #566. authentic-theme bugs.






share|improve this answer















You are using the so-called "popup shell". This is not a terminal. Nor is it in fact really a shell.



It's a piece of user interface fakery inside a WWW browser that executes shell commands separately from one another as individual transactions. There's no actual continually running shell to hold an environment variable. It is merely presented that way by the user interface in the WWW browser. The shell commands are run in a nonce process environment where no TERM environment variable has been set, and in a session with no controlling terminal. And even if it were set, there's no terminal emulator to handle the terminal I/O that full-screen programs like text editors use. Indeed, there is only provision for relaying output of the program back to the local machine; no input is sent in the other direction.



nano, pico, and emacs will complain about being unable to determine the terminal type and open the terminal. VIM and NeoVIM fall back to assumptions that simply do not hold in this case, and give the appearance of simply hanging. Not even line-mode editors like ex and ed will work as user input is simply not sent to the remote machine. (One possibly could drive ex non-interactively with its -c option.) Similarly, one cannot change passwords with the passwd command.



This has been a misunderstanding of the "popup shell" since at least 2016.



Further reading




  • "JedMeister" (2018-03-04). Interactive Terminal. Bug #1037. authentic-theme bugs.

  • Michael Hurt (2018-11-13). Error opening terminal: unknown. Bug #5214. Webmin bugs.

  • "7starsone" (2016-12-08). File Manager: Command line. Bug #566. authentic-theme bugs.







share|improve this answer














share|improve this answer



share|improve this answer








edited 2 days ago

























answered 2 days ago









JdeBPJdeBP

38.1k478185




38.1k478185













  • I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

    – Josh Whitlow
    2 days ago











  • I think I heard you say that this was an opportunity for ed!

    – Jeff Schaller
    2 days ago



















  • I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

    – Josh Whitlow
    2 days ago











  • I think I heard you say that this was an opportunity for ed!

    – Jeff Schaller
    2 days ago

















I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

– Josh Whitlow
2 days ago





I decided to SSH into the server and then run the crontab commands and it worked just fine, thanks for the info I had no idea! Even the history command doesn't show a single thing I've typed into the "popup shell".

– Josh Whitlow
2 days ago













I think I heard you say that this was an opportunity for ed!

– Jeff Schaller
2 days ago





I think I heard you say that this was an opportunity for ed!

– Jeff Schaller
2 days ago










Josh Whitlow is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Josh Whitlow is a new contributor. Be nice, and check out our Code of Conduct.













Josh Whitlow is a new contributor. Be nice, and check out our Code of Conduct.












Josh Whitlow is a new contributor. Be nice, and check out our Code of Conduct.
















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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f511949%2feditor-environment-variable-wont-set%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

數位音樂下載

When can things happen in Etherscan, such as the picture below?

格利澤436b