Exporting environment variable not working from shell script

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I have ubuntu image in docker, I'm trying to setup nodejs, phantomjs, npm etc..



and for PhantomJS I need to export QT_QPA_PLATFORM variable and set it's value to offscreen.



The problem is that when I run export QT_QPA_PLATFORM=offscreen using shell script, it doesn't work, here's my shell script:



apt-get update
apt-get install nodejs -y
apt-get install phantomjs -y
export QT_QPA_PLATFORM=offscreen


Any ideas?







share|improve this question
















  • 1




    Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
    – LotPings
    Apr 30 at 11:21














up vote
1
down vote

favorite












I have ubuntu image in docker, I'm trying to setup nodejs, phantomjs, npm etc..



and for PhantomJS I need to export QT_QPA_PLATFORM variable and set it's value to offscreen.



The problem is that when I run export QT_QPA_PLATFORM=offscreen using shell script, it doesn't work, here's my shell script:



apt-get update
apt-get install nodejs -y
apt-get install phantomjs -y
export QT_QPA_PLATFORM=offscreen


Any ideas?







share|improve this question
















  • 1




    Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
    – LotPings
    Apr 30 at 11:21












up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have ubuntu image in docker, I'm trying to setup nodejs, phantomjs, npm etc..



and for PhantomJS I need to export QT_QPA_PLATFORM variable and set it's value to offscreen.



The problem is that when I run export QT_QPA_PLATFORM=offscreen using shell script, it doesn't work, here's my shell script:



apt-get update
apt-get install nodejs -y
apt-get install phantomjs -y
export QT_QPA_PLATFORM=offscreen


Any ideas?







share|improve this question












I have ubuntu image in docker, I'm trying to setup nodejs, phantomjs, npm etc..



and for PhantomJS I need to export QT_QPA_PLATFORM variable and set it's value to offscreen.



The problem is that when I run export QT_QPA_PLATFORM=offscreen using shell script, it doesn't work, here's my shell script:



apt-get update
apt-get install nodejs -y
apt-get install phantomjs -y
export QT_QPA_PLATFORM=offscreen


Any ideas?









share|improve this question











share|improve this question




share|improve this question










asked Apr 30 at 10:17









Arkadi

1296




1296







  • 1




    Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
    – LotPings
    Apr 30 at 11:21












  • 1




    Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
    – LotPings
    Apr 30 at 11:21







1




1




Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
– LotPings
Apr 30 at 11:21




Why tag powershell? If phantomjsneeds QT_QPA_PLATFORM=offscreen on install I'd put the export in front.
– LotPings
Apr 30 at 11:21















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1030052%2fexporting-environment-variable-not-working-from-shell-script%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1030052%2fexporting-environment-variable-not-working-from-shell-script%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

GRUB: Fatal! inconsistent data read from (0x84) 0+xxxxxx

Do not install recommended packages of dependencies

What makes Checkinstall packages not suitable for distribution?