Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [profile]

The tag has no usage guidance.

0
votes
0answers
8 views

AppArmor prevent program from reading dirs/files I haven't explicitly allowed?

I don't want programs to be able to read my whole home directory. For example, I'd like to have firefox's read ability restricted to: owner @{HOME}/Downloads/ r, owner @{HOME}/Downloads/** rwk, owner ...
2
votes
2answers
100 views

New tmux session only sources .zshrc, and doesn't pick up the $PATH defined in .profile

After reading multiple questions on this topic I still feel lost. I read suggestions that one should set the environment variables including $PATH in .profile instead of specifically in .bashrc or ....
0
votes
0answers
16 views

How do I profile a build using make?

I have a software project in C built using Make. How can I get a detailed profile/breakdown of the build time? Something like a flame graph showing how long each part took to build.
1
vote
1answer
70 views

sudo not executing bashrc as expected

Overall issue is when I log in, my prompt appears correctly formatted as per the /etc/bashrc but when I sudo to another user using bash, the prompt gets fubar'd. Essential formatting in the /etc/...
1
vote
2answers
71 views

Storing all environment variables in one file

What are the caveats of having one single file with environment variables? What I would like to do is to create a file (e.g. ~/.env) which contains all necessary PATH declarations and possibly other ...
-2
votes
2answers
87 views

Why does sourcing a script in .profile not work?

I have an executable script which I want to run every time I log in or open a new interactive shell. I added the path to this executable in .profile and sourced it by adding this line to .profile ...
5
votes
1answer
149 views

/etc/profile, ~/.bashrc and no other profile files are sourced for users, only for root

Since I've upgraded my server from Debian 8 to 9 I have a strange behavior with bash. When I log in via ssh, none of the profile files are loaded, I get the following prompt: Linux myserver 4.9.0-7-...
-1
votes
1answer
72 views

Cannot log in because of corrupted .bash_profile [duplicate]

I have created a new user account. I can't access it because of a .bash_profile error. How can I repair this type of error?
4
votes
1answer
512 views

How to write an automatically sourced shell script to /etc/profile

I heard through the grapevine that files in /etc/profile will be automatically sourced by bash upon login? I tried writing something simple to /etc/profile: echo "echo 'foo'" > /etc/profile/foo....
0
votes
1answer
201 views

KDE konsole command line option --profile not working

I'm running KDE 4.11 on CentOS 7.5.1804 (Core), with konsole package 'konsole-4.10.5-4.el7.x86_64'. Within the konsole application I created a profile named 'pi@eecspi', and from within a running ...
-1
votes
1answer
224 views

Debian 9.4— .profile not read on bash login

The .profile file includes a statement to add the $HOME/bin directory to the PATH (if that bin directory exists). This is not being executed on my bash login. If I manually load the .profile file . ...
3
votes
2answers
1k views

/etc/profile not sourced for users

In the ubuntu server I run, I added customisations in /etc/bash.bashrc and as .sh files in /etc/profile.d, to add some useful aliases and functionalities for my users. All of them run correctly for my ...
1
vote
0answers
423 views

Is it possible to source ~/.profile in the current shell from a script? [duplicate]

Take the following ~/test.sh script as an example: #!/bin/bash sudo -u ${SUDO_USER} cp ~/.profile ~/.profile.bak cat <<EOF >>/home/${SUDO_USER}/.profile export HELLO="Hello ...
0
votes
1answer
173 views

Does a noninteractive login shell execute `~/.profile` or a file whose name is `$BASH_ENV`?

From Bash Manual Invoked as an interactive login shell, or with --login When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first ...
-1
votes
1answer
65 views

Is a shell provided by `ssh username@server` login, and does it execute ~/.profile or ~/.bashrc? [closed]

From bash manual Invoked by remote shell daemon Bash attempts to determine when it is being run with its standard input connected to a network connection, as when executed by the remote ...
0
votes
0answers
11 views

How to add a user with access to desktop?

The sudo adduser allows a new user, but does not seem to configure their profile. How should this be done? Use of the new user login results in a blank default screen and requires power reset to ...
1
vote
1answer
45 views

Is it a good practice to make different configuration files as symlinks to some scripts under the same directory?

I was wondering if it is a good practice to make the following configuration files as symlinks to some scripts under a directory e.g. ~/program_files/configurations/. The scripts /etc/rc.local, /...
2
votes
1answer
882 views

How do you run a command with sudo in `~/.profile`?

Is it a bad practice to run a command which requires sudo in ~/.profile? If really want to do that, how can I make the command run at rebooting Ubuntu? make the command running with sudo and under ...
2
votes
2answers
716 views

How to make custom zsh script executable automatically?

I must be missing something incredibly simple about how to do this, but I have a simple script: extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xvjf $1 ;; *.tar.gz) ...
0
votes
1answer
130 views

When tmux exits (closes pty master), background processes from startup scripts die — why?

I'm having difficulty understanding an answer I received to a question I posed about tmux — specifically, re: what the pseudoterminal does with child processes when it exits. Original Question I ...
3
votes
1answer
60 views

Dynamic .bash_profile login shell

I am trying to find a way to dynamically set bash environment settings depending on the environment I am logging in from. For example: Opening a Terminal session from the xfce GUI, it would load a "...
0
votes
0answers
577 views

should I export PATH in .bash_profile or .bashrc? [duplicate]

Just as the title states. I understand that ~/.bash_profile is for login shells and ~/.bashrc is for non-login shells. From what I understand of this, the options in .bash_profile would be invoked ...
0
votes
0answers
74 views

How to automatically reset ICC color profile after running Firefox

I am running Linux Mint 18.1 Serena on an HP EliteBook 8460p. Whenever I run Firefox (Mozilla Firefox 50.0.2) and then sleep the computer, when I wake it up again I find that the colors are all wonky. ...
1
vote
0answers
55 views

Can I start a Flatpak app in a separate profile?

I normally start and stop Revolt with these Flatpak commands: # start flatpak run org.perezdecastro.Revolt # stop gdbus call --session \ --dest org.perezdecastro.Revolt \ --object-path /org/...
1
vote
0answers
146 views

zsh .zprofile / .zlogin not being sourced on gdm login? [duplicate]

I have noticed that ~/.zprofile and ~/.zlogin are only loaded (in my computer) when I use a login shell, but when I login with gdm, they are not run; ~/.profile is ran instead. Is this normal?
0
votes
0answers
55 views

Restart cron after profile changes

If I change my environment through the addition of a file like: /etc/profile.d/00-aliases do I think need to restart cron for my cron jobs to see these changes?
0
votes
1answer
463 views

Why is my sudo PATH different than my normal user PATH? [duplicate]

I'm having trouble with my PATH. I have a clean instance of an Amazon Linux virtual server and I set this in /etc/profile M3_HOME=/usr/local/maven JAVA_HOME=/usr/java/latest PATH="$PATH:$M3_HOME/bin:...
4
votes
1answer
2k views

KDE Plasma: save display/desktop/taskbar settings in a profile?

I am using default Manjaro (17.0.5) install with KDE Plasma on my laptop. On my work I connect two external displays. Everything works fine but my settings for display configuration and my taksbar get ...
1
vote
1answer
213 views

How to find out which files have defined “alias”es?

When I run the alias command, I see an alias which I don't know where it has been defined (i.e. I cannot find the file which contains definition of this alias). I have checked /etc/profile, ~/.bashrc, ...
2
votes
0answers
33 views

~/.bash_profile not executed upon login, but ~/.profile is [duplicate]

I'm running Ubuntu, with Gnome3 as my desktop manager. While debugging some initialization issues (the usual confusion over bash_profile, bashrc, etc.), I found that given the following files, # ~/....
4
votes
1answer
2k views

What to do when .profile does not exist for editing PATH?

I want to edit my $PATH environment variable. According to several tutorials and other sources (e.g. this Q&A), the most common way is to edit ~/.profile. However, for me, no such file exists. ...
9
votes
4answers
5k views

$HOME/bin dir is not on the $PATH

In my ~/.profile I have a last block which should load my personal bin/ directory like this: # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:...
0
votes
0answers
69 views

Are .bashrc and .zshrc the wrong place for environment variables? [duplicate]

I have updated the question after an answer to a related question : see the later pragraphs. When I startup spacemacs I get the following warning: You appear to be setting environment variables ("...
1
vote
0answers
381 views

Why can't I add this custom Node PATH to /etc/profile.d scripts?

I may have a problem in the include chain for the profiles, or something may be awry in either my system, or my understanding of profile.d (RHEL7). I added a /etc/profile.d .sh script which is for a ...
7
votes
4answers
2k views

Welcome banner stopping scp

Our team decided to add a welcome banner to all our hosts. A team member, instead of adding the message in /etc/motd added the message with echo in ~/.cshrc. This is breaking scp between the hosts. ...
-1
votes
1answer
367 views

Where are the Shell Profile Settings Stored?

I just broke a machine running Linux Mint with KDE 4. Thankfully I managed to back up /home/, so I have all my data. Now I've installed Kubuntu with KDE 5, and I'm trying to configure my Shell ...
2
votes
1answer
3k views

Ubuntu 16.04 Scripts in /etc/profile.d

I am currently trying to setup some bash definitions (functions, variables) that need to be available for all the users that access a workstation. I have created shell scripts with .sh extension in /...
1
vote
1answer
2k views

Why have both .bash_profile and .bashrc? [duplicate]

What is the point of having both .bash_profile and .bashrc, with the former typically sourcing the latter, which in turn sources /etc/bashrc upon login? What would be the downside of putting all that ...
0
votes
1answer
56 views

Would replacing sourced bash functions with executables decrease startup time

A typical bash setup, sourcees additional dotfiles on startup which obviously increases the startup time. Is there an be any benefit of moving the contents of a function to its own executable file? ...
0
votes
1answer
222 views

Different bash profile files are loaded? For local and ssh-remote access to Cygwin

I have installed g++ package on Cygwin. so I see the following output in Cygwin: Input:$ which g++ Output: /cygdrive/c/mingw-w64/x86_64-6.2.0-posix-seh-rt_v5-rev1/mingw64/bin I have also installed ...
8
votes
1answer
7k views

Find out what scripts are being run by bash on startup

After starting a bash terminal, I noticed that the PATH variable contains duplicate entries. My terminal starts a login shell, so ~/.bash_profile is sourced, followed by ~/.profile and ~/.bashrc. Only ...
3
votes
1answer
1k views

How can I restore the Bash prompt?

For work I just did source .profile from other user, but it changed my bash prompt. It used to be [leche@xxx home]$ [leche@xxx home]$ And now it appears like: [leche@xxx] [10:18 AM$] /home $ $ [...
1
vote
0answers
115 views

solaris 11 zone sysconfig profile for ipmp

How to create sysidcfg profile with ipmp? Let's say we have such network config: root@zone1:~# ipadm NAME CLASS/TYPE STATE UNDER ADDR ipmp_bkp ipmp ok ...
1
vote
1answer
1k views

Run script from .profile

I want to put all the environment variables and aliases into a separate file. Here is my ~/.profile /c/webProj/myprofile Here is the /c/webProj/myprofile : PATH=$PATH:./node_modules/.bin alias gs="...
1
vote
2answers
250 views

Have a command in my $PATH, but it is not being recognized when I use sudo [duplicate]

I’m using Ubuntu 14.04. I’m having trouble getting a command picked up in my $PATH using sudo. I have added this to my /root/.profile file # ~/.profile: executed by Bourne-compatible login shells. ...
1
vote
1answer
295 views

Running program in .profile prevents GUI startx

I want to run a python program that polls the keyboard on startup/login to my raspberry pi. Previous attempts included cron jobs (failed due to lack of stdin or stdout). rc.local also failed as it ...
11
votes
2answers
2k views

Set environment variables for gnome on wayland and bash on virtual terminals (or ssh)

Gnome 3.22 uses wayland by default. Gnome on wayland does not read ~/.profile (or ~/.bash_profile or /etc/profile). See https://bugzilla.gnome.org/show_bug.cgi?id=736660. I have my initialization ...
9
votes
1answer
3k views

Where do /root/.bashrc and /root/.profile come from on a Debian system?

Normally when you add a user on a Debian system, the contents of /etc/skel/ are copied into the new user's home directory. But /root/.bashrc does not match /etc/skel/.bashrc and /root/.profile does ...
3
votes
1answer
64 views

What are the meanings of IO-related rates? [closed]

I found in the manual short explanations for the abbreviations. But I have no idea about what their values stand for (how large is good, how large is bad). How do I know if the IO is too busy and ...
0
votes
1answer
838 views

Functions in ~/.bash_profile not found in an interactive shell [duplicate]

I thought that whatever lies in .bash_profile(or .profile) which is sourced in a login-shell, is available in an interactive shell. My goal is to have available a list of functions, either in a login ...