The tag has no usage guidance.

learn more… | top users | synonyms

65
votes
4answers
7k views

Alternative to .bashrc

Is ~/.bashrc the only place where I can specify user specific ENV Variables, aliases, modifications to PATH variable, etc? I ask because it seems that ~/.bashrc would be BASH only...
0
votes
1answer
48 views

How to fix a corrupt .profile file for sudo user

My knowledge on unix is very less. I updated .profile file for sudo user but some path was incorrect in that file. When I am trying to reconnect as a sudo user it does not recognize any commands and ...
1
vote
3answers
3k views

Why doesn't alias work in AIX (Korn shell, .profile)?

I have these files in my home directory: drwxr-xr-x 3 meuser staff 256 Oct 12 13:11 . drwxr-xr-x 102 bin bin 4096 Sep 30 12:28 .. -rw------- 1 meuser staff ...
3
votes
1answer
19 views

Can custom locale spec live under ~/?

I understand that one can put custom locale specs under a system-wide directory (e.g. /usr/share/i18n/locales), but is there a way to configure one's locale to use a spec that lives under ~/? ...
1
vote
1answer
38 views

Where are gnome-terminal profiles stored on a linux distribution?

Of the distributions of Linux I have used (Red Hat, Ubuntu, CentOS, others) which utilize gnome-termial you are able to set different terminal profiles via a drop down menu located in the terminal ...
3
votes
2answers
55 views

Why might one add ~/.profile to ~/.bash_profile?

When installing RVM the one gets the following message: * WARNING: You have '~/.profile' file, you might want to load it, to do that add the following line to '/home/dotancohen/.bash_profile': ...
2
votes
1answer
33 views

Thunderbird / Firefox profile missing or inaccessible

Out of sudden my Thunderbird and Firefox wont run because of this message: Your Thunderbird profile cannot be loaded. It may be missing or inaccessible. Your Firefox profile cannot be loaded. It may ...
1
vote
0answers
27 views

'Chain' shells' profile and runcom files?

While setting zsh up, I found a post stating that to keep a .zshrc as clean and backwards compatible as possible, one can 'chain' the shells' configuration files. If I recall, it consists more or less ...
2
votes
2answers
37 views

several virtual profiles for the same user

Many times there are several "identities" which one user uses: for work, open-source, academia etc., all require different ssh keys, editor configurations, git configs etc. I was wondering if there ...
14
votes
5answers
11k views

Making zsh default shell without root access

I am using my school's computers and would like to use zsh instead of bash. I'd like to make it default, but I cannot run a command such as $ chsh -s $(which zsh) because I don't have admin ...
16
votes
4answers
20k views

Difference between ~/.profile and ~/.bash_profile

What is the difference between ~/.profile and ~/.bash_profile?
2
votes
1answer
88 views

.profile is written in shell script — can I instead make my system understand that I want it to execute a Python script instead?

I get Python. I don't get shell script. I could learn shell script, but I would rather not if I can use Python in its place. A good place for me to start would be the .profile script. Currently, for ...
2
votes
1answer
48 views

Share environment variables with www-data

I have a set of environment variables, which is created with a shell script config called from my ~/.bashrc. Having a new user www-data running a local webserver (with lighttpd), I need it to benefit ...
3
votes
2answers
344 views

what is the command [ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh” doing

I found the following command in the .profile file while installing node through nvm: [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" I want to know what is the the purpose of [] and ...
1
vote
1answer
48 views

SSH login keeps kicking me out

I am on Centos 6.6 and recently updated my server using yum, it updated a bunch of things and everything seemed fine, but I was also trying to update Ruby RVM and Node.js and NPM (Node Package ...
3
votes
1answer
77 views

recreate shell invocation

Does a running shell have a mechanism to recreate its invocation? I sometimes make changes to variables or my profile and have to manually source the startup files to make things run again, for ...
23
votes
4answers
15k views

how can I use bash as my login shell when my sysadmin refuses to let me change it

The unix sysadmin where I'm working is reluctant to give me access to change my login shell from ksh to bash. He has given various excuses, the funniest being that since they write all their scripts ...
6
votes
2answers
636 views

What desktop environment does startx run, and how can I change it?

From many docs, I read that startx is starting LXDE in Raspbian OS. I am a little bit confused. Will always startx run LXDE GUI? Also I have seen example with using startlxde command. How is that ...
9
votes
3answers
8k views

How can I change what's displayed at a login shell?

I'm getting more familiar with tweaking the way things look in a shell via the prompt (.bashrc), but I'm now trying to change the initial stuff displayed when I first log in. On my EC2 instance, this ...
1
vote
1answer
57 views

Is changing background color in unix through .profile is possible?

I am using Unix and accessing it through putty. I have saved IP address, color, font and other attributes in putty. But whenever I am sitting on other PC then I have to again change all this ...
1
vote
2answers
43 views

Force a specific button release

I've looked at this post, but it's not quite what I was looking for. Command for forcing a pointer ungrab (captured mouse release) I want to fake the "Easy-Shift" functionality of my "Roccat XTD" on ...
0
votes
3answers
738 views

Checking if line in file exists

I have a bash script which asks a user for the number of CPU cores and saves it to variable named $cores. Now I want to add this variable to .bashrc, so I ask user how many CPU cores he has and then ...
1
vote
2answers
61 views

unable to login via tty{1-6} as a normal user

I am unable to login via tty{1-6} as a normal user. I can only login as root. When logged in with a normal user, the computer displays the greeting message from /etc/motd and logs me out ...
-1
votes
1answer
65 views

How to work with tabs in new gnome-terminal?

After going Debian 8 (with Kali 2) I can no longer use my pre-defined tabs because apparently some genius decided that gnome-terminal no longer needs that kind of functionality. I really need my tabs ...
2
votes
4answers
241 views

How to hold terminal open (excepting gnome-terminal)?

I find useful the gnome-terminal feature of editing (and creating) profiles with the option of holding the terminal open after the command exists. (I like to use context menu file manager to run ...
1
vote
1answer
95 views

configuring setxkbmap for a single user/debugging xkbmap changes

I'm trying to do something similar to what this user asked, storing my keyboard layout. My first thought was to use .bashrc, but I turned to .bash_profile after realizing that I only need it set once ...
0
votes
4answers
138 views

Unable to add folder to PATH in .profile file

The following is my .profile file: # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see ...
1
vote
0answers
161 views

Two users with the same 'home' folder but different '.profiles'

I would like to have at least two users signing in the same home folder, so them need to have full access to this folder, but with different 'profile' behavior. host-foo: user1 : /home/foo-folder ...
4
votes
3answers
9k views

How to write a shell script that gets executed on login?

I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that ...
3
votes
2answers
13k views

Colorful ssh banner

I would like to colorize my ssh banner. I know I can perform it like so: In /etc/profile I can put: echo -e "\e[1;31m Colorful text" echo -e "\e[0m Reset" But I have some ASCII art in the banner ...
1
vote
1answer
86 views

sh - Using Arguments in .profile functions

I want to use an argument in the function I created in my .profile file. I want to ask for input if no argument is given, otherwise set a variable to $1. When I check $1 to see if it is empty, I ...
1
vote
2answers
151 views

Working with exporting PATH CentOS strange behaviour

I am trying to modify the PATH variable in two different scripts located in /etc/profile.d/ /etc/profile.d/php.sh #!/bin/sh PATH=$PATH:/usr/local/php/bin export PATH /etc/profile.d/mysql.sh ...
1
vote
1answer
40 views

How to correctly set the XDG base dirs gobally and dynamically

I get a lot of config folders in my homefolder. I assume that is, because $XDG_CONFIG_HOME is not set and some software (e.g. fontconfig, umlet) does not follow the standards. $XDG_CONFIG_HOME ...
2
votes
2answers
81 views

Add an application to the command search path in csh

Recently, I have installed an application (gnuplot) under user directory (/home/usr/bin). I want to run the application whenever I type 'gnuplot' in any directory. What could I do? I tried to set the ...
3
votes
4answers
3k views

Execute a program at login

I'm running Arch-Linux ARM on a Raspberry Pi. My project goal is to have a barcode scanner attached to the Pi that forwards the scanned messages to a server in a LAN. To harden the system against ...
1
vote
0answers
31 views

Is it possible to create aliases that affect services starting?

Currently I have a custom service that executes java in multiple places. I want to be able to add an option to any executions of java this service will spawn (I'm specifying the error log location, ...
1
vote
1answer
36 views

Is it possible to have 2 different passwords saved for the same network?

I'm not always at home and sometimes the router needs to be reset completely to receive a new wan ip address because my roommates are not very tech savvy at all. When this happens the password is ...
0
votes
2answers
125 views

bash: xport: command not found

I have used export to change my PATH variable. export not xport, but now every time I open a terminal I get this error: bash: xport: command not found [mirko@localhost ~]$ I tried removing ...
1
vote
1answer
59 views

.bash_logout or .zlogout isn't parsed when autostarting xserver directly after login on console

I made a line: [[ -z $DISPLAY && $XDG_VTNR -le 4 ]] && exec startx (right out of the Arch Wiki) at the end of .xinitrc to start the Xserver right after login on console. Whenever ...
1
vote
1answer
160 views

Terminal title shows sudo, but I want command that's sudo'ed

So I've become pretty adept at the tasks here from editing all the posts to answering questions, so I think it's about time I ask one: Technical Information Distribution: Gentoo Desktop Environment: ...
2
votes
1answer
266 views

grom() keyword in bash throws unexpected '(' token

I'm not entirely sure why I'm getting the error in my .bash_profile syntax error near unexpected token `(' when I use the keyword grom() for my function. I wanted to create a bash function that ...
1
vote
0answers
50 views

How do I setup a floating profile in Linux

I have an external hard drive that is switched between machines. I want my home folder to point to this external hard drive for ordinary usage purposes - documents, downloads, work areas, that sort ...
1
vote
2answers
213 views

Open Firefox twice (with same profile)

There are tons of resources that tell how to run several instances of Firefox in parrallel. I can't find any that tells me how to configure a command (on a command line, start menu item, or panel ...
1
vote
1answer
167 views

Environment Variables not getting set in bash_profile

I have my bash_profile environment setting as follows: if [ `hostname` = "devoraebs01" ]; then echo `hostname -f` . /appl_top/deverp/appl/APPSDEVERP_devoraebs01.env When I log into this host, ...
9
votes
3answers
13k views

How to add a function to .bash_profile/.profile/bashrc in shell?

I have a function which converts epoch time to date. Here is the definition date1(){ date -d @$1 } I'd like to be able to write: $ date1 xxxyyy Where xxxyyy is the parameter I pass into my ...
11
votes
2answers
16k views

Global bash_profile

I realize there are /etc/profile and /etc/bashrc files for setting global environment variables and maybe I'm just misunderstanding their purposes, but... Is there a global bash_profile file? I'm ...
2
votes
1answer
183 views

Using different profiles (.kshrc_xxx) in ksh

In bash you can load a different profile by using the --rcfile option, is there such an option in ksh? Or perhaps a workaround... I know you can invoke the shell without the .kshrc profile using the ...
2
votes
1answer
157 views

Change default user configuration file location

If possible, how can I change the default location the system looks to for files such as: .bashrc .bash_history .bash_profile .cshrc .hushlogin .tcshrc I run Plesk and the default user home ...
2
votes
1answer
119 views

Can .bash_profile be auto sourced after change?

I'm always wondering if there's a way to do this. I don't want to type source after changing my .bash_profile all the time.
0
votes
0answers
27 views

Bash script results in errors like “: command not found”. Using Sublime Text to edit the file in Windows [duplicate]

I had a ~/.bash_profile which I wanted to move to somewhere where it'll be executed for all users, including the root. I was led to /etc/profile which worked great. I appended my script there and it ...