Questions tagged [environment]
94 questions
47
votes
2 answers
Is there a difference between "." and "source" in bash, after all?
I was looking for the difference between the "." and "source" builtin commands and a few sources (e.g., in this discussion, and the bash manpage) suggest that these are just the same.
However, following a problem with environment variables, I…
ysap
- 7,191
32
votes
5 answers
Stop/start battery charging through software?
If a laptop is powered on and connected to AC power, is there a way to issue a command that tells it not to charge the battery?
EDITED:
Perhaps charging of the battery may be stopped if there were a way to fool the system into thinking the battery…
Sepero
- 4,627
18
votes
2 answers
Why use env in shebang?
What is the purpose of using #!/usr/bin/env shebang compared to #!/bin/bash, #!/bin/sh or #!/usr/bin/python?
Tuminoid
- 3,932
10
votes
1 answer
how to include an environment variable in the launcher?
I was trying to make some scripts dynamic by including the environment variable $LOGNAME and even $HOME. but it don't seem to work when placed in a launcher.
I am trying to make code a bit more dynamic
/home/simon/Desktop/firefox_test.bash
I tried…
chip
- 2,971
8
votes
4 answers
I set an environment variable in /etc/environment, but it's not in printenv using bash.exe with Windows cmd. Why?
I'm using WSL and I'm quite new on Linux. I have set an environment variable in /etc/environment called TESTVAR. This variable is required for some projects and it's working just fine when I'm running Bash directly.
But if I'm running a Linux…
0x1337
- 81
8
votes
2 answers
Setting LOG=1 in /etc/environment
I asked a question earlier about viewing the history of notify-osd using the indicator-notifications app.
The answer was that I needed to add LOG=1 in my /etc/environment file.
That sounded suspicious and I didn't do it because:
It's in the global…
Parto
- 15,647
7
votes
2 answers
How to free up some disk space on my Linux machine?
I'm still new to the Linux world, My disk size is 493 G
And when I use the command du -hs * /opt/conda, The total size I use is less than 95g
But when I use the df -h command:
Disk Size is 493 G
Used 404 G
Available 89 G
So, (493 - 95) = 398 G…
6
votes
2 answers
Why doesn't JSLint/JSHint work in Ubuntu?
I installed as described here and other places, but after using npm to install jslint, jshint, neither will work. Running "jslint", I only get:
/usr/bin/env: node: No such file or directory
Is there something wrong with the Ubuntu 13.10 repo, or do…
NoBugs
- 1,440
6
votes
2 answers
Difference between /etc/security/pam_env.conf and /etc/environment + making sudo read pam_env.conf
I struggle to see the difference between pam_env.conf and /etc/environment. To me they both do the same thing, with a difference syntax. The manpages were no help. So what is the difference?
Additionally, I'd like to find a way to add paths to the…
Norswap
- 232
6
votes
2 answers
Can I set different passwords for different desktop environments?
I have installed GNOME, Unity and Cairo Dock desktop environments. I wanted to set different passwords for each. Is this possible by any means? Thank you.
kernel_panic
- 12,102
5
votes
1 answer
Location to place systemd service EnvironmentFile when creating debian package
I am currently rewriting upstart jobs to use systemd and I wanted to know:
where is the "default" place to an EnvironmentFile?
It could potentially go in /etc/environment
It could be with all the other service files in /etc/systemd/service,…
Wimateeka
- 255
5
votes
1 answer
How green are Ubuntu and Canonical?
im a student of Environmental Engineering, currently searching for a Bachelor Thesis Theme.
I am curious, if there any internal information about Ubuntu related to CO2/Energy saving compared to other Operating Systems.
and what Canonical does for…
user73317
- 53
5
votes
1 answer
Using files in /etc/environment.d
I am trying to setup a brand new installation of Ubuntu 22.10. I need to make some environment variables globally available. I have read in the Man pages that the correct way to do this is to provide a file in the /etc/environment.d directory with a…
Jonathan
- 1,498
5
votes
1 answer
Is the same '#!/usr/bin/env bash' than #!/bin/bash
Simple question, is the same ? Vim autocomplete me when write bash + tab => #!/usr/bin/env bash but I usually watch #!/bin/bash in every script. So..
josanangel
- 185
4
votes
0 answers
OpenMPI - Update alternatives
I have troubles with openmpi crashing. The installed/repository version is "mpirun (Open MPI) 3.1.3".
Consequently I have locally built a "mpirun (Open MPI) 4.1.0" which does not crash. I would now like to make the freshly installed version (located…
Torben
- 41