0

My ~/.profile file has the following code

source ~/.bashrc

When I run the following command, uxterm firefox

running command

I do not see any log of the lines of the file ~/.bashrc on the corresponding uxterm window that gets open. I therefore understand the lines of this file are not run whenever I issue the command uxterm firefox.

Nonetheless when I just run the command uxterm, I do see the mentioned log as you can see on the corresponding attached screenshot

log after running just uxterm.

What should I do to get the lines of ~/.bashrc run whenever I issue any program with uxterm+name of the program ?

Thanks

1 Answers1

0

You probably need to use the -ls option to make it a login shell, as ~/.profile and ~/.bash_profile are only read by login shells.

grifferz
  • 1,006
  • I have just tried this command: uxterm -e -ls firefox Even though this command launches a new terminal and runs the lines of the ~/.bashrc according to the log I see, firefox does not get launched. – goahead97 Feb 05 '21 at 08:49
  • That is a separate problem not related to your question here, which was "What should I do to get the lines of ~/.bashrc run [in uxterm]" – grifferz Feb 05 '21 at 17:05
  • Do you mean that I should ony try uxterm -ls firefox? I also tried this and this launched a new uxterm windows and launched Firefox at the same time. Nonetheless ~/.bashrc lines did not get run because I do not see the corresponding log lines on ~/.bashrc. – goahead97 Feb 07 '21 at 08:15
  • If I only run uxterm -ls, then I see the ~/.bashrc lines on the new uxterm window. Nonetheless if I add firefox after uxterm -ls, then, even though firefox gets launched, no log is posted to the uxterm window. I guess that means ~/.bashrc lines do not get run. Do you know how to fix this? – goahead97 Feb 07 '21 at 08:24
  • I have also tried uxterm -e '/bin/bash; firefox' Even though this command launches a new uxterm window and it seems the lines of ~/.bashrc get run according the log posted to this new uxterm window, Firefox does not get launched in this case. – goahead97 Feb 07 '21 at 08:47