Search Results

Search found 316 results on 13 pages for 'bashrc'.

Page 3/13 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • dmenu doesn't set environment variable as per my .bash_profile when running Emacs

    - by proofit404
    I have following ~/.bash_profile [[ -f ~/.bashrc ]] && . ~/.bashrc and ~/.bashrc ### Check for shell interactivity. if [[ $- != *i* ]] ; then return fi ### Nyan-cat prompt. PS1="\`if [ \$? = 0 ]; then echo \[\e[35m\]^_^\[\e[0m\]; else echo \[\e[31m\]O_O\[\e[0m\]; fi\` \$ " ### PATH export PATH=$PATH:$HOME/bin So when I run emacs from terminal all OK. When I start it with dmenu (getenv "PATH") and exec-path variable doesn't contain ~/bin directory. When I do it in xfce with xfrun4 command with same bash configuration all seams to work too. What is the problem with dmenu?

    Read the article

  • How can I uniqely record every new command I use, and possibly timestamp it?

    - by Nirmik
    I've been on Linux for more than 6 months now but never went too much into the CLI (command-line interface or terminal or shell) Now as I ask questions here, get answers, or help from other sites, I learn new commands... How can I can store every new command in a text file? Only new/*unique* commands, not repetitions of the same command. Here's an example: In the terminal, I enter the commands like this- ubuntu@ubuntu:~$ *command1* ubuntu@ubuntu:~$ *command2* ubuntu@ubuntu:~$ *command3* ubuntu@ubuntu:~$ *command4* ubuntu@ubuntu:~$ *command1* Now, these commands should get saved in a text file say commandrec like this- *command1* *command2* *command3* *command4* NOTE:The last command in the terminal which was again command1 is not recorded/saved again in the text file. And the next time I open the terminal, and enter a new command command 5, it should get appended to the list in commandrec (but if the command was used earlier on some other date, it should still be ignored. For example, command 1 entered again along with command 5 on a new day/time but command1 not recorded as already used) The commandrec file looking something like this- 31/05/12 12:00:00 *command1* *command2* *command3* *command4* 01/06/12 13:00:00 *command 5* (the time and date thing would be great if possible, but okay even if that isn't there) This way, I can have a record of all commands used by me to date. How can this be done?

    Read the article

  • How do I teach bash in Ubuntu some curse words?

    - by NitinAb
    When bash encounters an unknown command(word?) it does this : The program 'hello' can be found in the following packages: * hello * hello-debhelper Try: sudo apt-get install <selected package> what I would like to know is how this is done so I can edit it or add something before it to cross check the unknown word from a home grown dictionary which would have phrase:reply pairs that can then be sent to output. I am guilty of not looking enough for it around .. but the few bash guides I tried digging up didn't have anything on this. Maybe I am looking at the wrong places .. any pointers? And yes I am doing this so every time I type wtf when a program fails , I want something nice thrown back at me...

    Read the article

  • How to get shared bashed history among different tabs

    - by Luca Cerone
    I used the answer in http://unix.stackexchange.com/a/1292/41729 to enable real-time shared history among separate bash terminals. As explained in the answer above, this is achieved by adding: # avoid duplicates.. export HISTCONTROL=ignoredups:erasedups # append history entries.. shopt -s histappend # After each command, save and reload history export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" This works fine if the bash shells are separate (e.g. opening different bash terminals using CTRL+ALT+T. However it doesn't work if I use tabs (from an open terminal `CTRL+SHIFT+T) rather than new windows. Why this difference in behaviour? How can I share the bash history also among various tabs?

    Read the article

  • adding executable file to path and launching from terminal directly

    - by ubunnttuu
    i just downloaded sublime text for my ubuntu, and its working fine. i have the executable file in my ~/sublime folder. now i would like to invoke this app from the terminal by just typing sublime. i suppose that is possible, pls let me know how. also, since this application did not need any configure/make/install (i just had to extract it and then use the exec file to run the app), i cannot add this to my gnome launcher fav apps panel. how can i put the app shortcut there, so that when i do a top-left and then type sublime, the results will show the applicaion and then i can click on it and invoke the app from there? thanks!

    Read the article

  • How to save terminal history manually?

    - by wim
    It's my understanding that the history file is updated when the terminal exits. But sometimes my computer crashes out, and the terminal doesn't exit cleanly, and then I lose those commands from my history which is annoying. How can I make it flush immediately, so that the entries still go there even if my computer has a meltdown? At the moment I'm using this workaround, but I feel there should be a better way. I'm using gnome-terminal on Ubuntu 12.10.

    Read the article

  • Is there a way to mirror directory changes in Terminator?

    - by Kasisnu
    I'm on Ubuntu 12.04 and am using Terminator as my primary terminal. I like it because it lets me keep a python interpreter and bash terminal open at the same time, in the same view. What is annoying is that I end up moving between directories A LOT, and then I have to do it twice. Is there a way to set up a terminator configuration to do that? To have terminator mirror directory changes. I'm guessing I'm not the only one that finds that frustrating!

    Read the article

  • crontab environment

    - by Adamski
    I have written various scripts to launch Java server applications, which are typically run for 24 hours before being shut down (by invoking the same script with a different parameter). The script relies on environment variables defined in a file: ~/<user>.env, which I source from .bashrc. This works fine when invoking the script from the command line but if I want to add the script as a crontab entry I run into the problem where .bashrc isn't read. My question: What is the best practice approach for solving this problem? I realise I could define a crontab entry such as: * * * * 1-5 /usr/bin/bash -c '. /home/myuser/myuser.env && /home/myuser/scripts/myscript.sh' ... but this seems plain ugly. Alternatively I could source myuser.env at the beginning of every script, but this would become a nightmare to maintain. Any help appreciated.

    Read the article

  • Cygwin command not found bad characters found in .bashrc 357\273\277

    - by mytwocents
    Hello, I'm new to Cygwin, I just installed it and attempted to set some simple environment variables. However, when I open the command shell, I get the error "#357\273\277 command not found" I found an article that discusses what the problem is and how to "discover" the hidden bad character: http://mblog.lib.umich.edu/DataDiscussions/archives/2010/01/index.html but I don't know how to resolve the issue by removing the character (which I validated was a problem in my .bashrc file using the od command). I attempted to change the preferences view in Notepad++ to UTF-8 and ANSI to no avail, but the file was not altered at all. Any help would be appreciated...

    Read the article

  • /etc/inputrc does not seem to be recognized as user on Ubuntu 8.04.2 LTS

    - by Brian Hogg
    On a new installation of Ubuntu 8.04.2 LTS, logging in as a standard user does not maintain the keybindings (whether through sudo su - or direct from ssh). As the root user everything is fine and /root/.inputrc does not exist (only /etc/inputrc) which has its default settings. In addition setting a ~/.bashrc and ~/.profile to the same as the root user (and chown'ing to user:user) has no effect. Am I missing something here?

    Read the article

  • "Reset" colors of terminal after ssh exit/logout

    - by dgo.a
    When I ssh into a remote server, I like the colors of the terminal to change. I use setterm on my remote ~/.bashrc file to get this done. However, when I exit, the terminal colors are not reset to the local ones. I solved the problem, but I am not sure if it is the best solution. This is what I could come up with. On the ~/.bash_logout on the remote server, I put: echo -e "\033[0m" /usr/bin/clear Just out of curiousity: Does anyone know of a better way? (I got the echo -e "\033[0m" line from http://edoceo.com/liber/linux-bash-shell)

    Read the article

  • Is there a "pattern" or a group that defines *rc files in *nix environments?

    - by Somebody still uses you MS-DOS
    I'm starting to use command line a little more, and I see there are a lot of ways to configure some config files in my $HOME. This is good, since you can customize it the way you really like. Unfortunately, for begginners, having too many options is a little confusing. For example, I created .bash_alias for some alias I'm using. I didn't even know this option existed, I'm used to simply edit .bashrc. Do exist a pattern, a "good practice", envisioning flexibility and modularity in terms of rc files structure? Do exist a standardization group for this, or every body just creates it's own configuration setup?

    Read the article

  • Is there a "pattern" or a group that defines *rcs files in *nix environments?

    - by Somebody still uses you MS-DOS
    I'm starting to use command line a little more, and I see there are a lot of ways to configure some config files in my $HOME. This is good, since you can customize it the way you really like. Unfortunately, for begginners, having too many options is a little confusing. For example, I created .bash_alias for some alias I'm using. I didn't even know this option existed, I'm used to simply edit .bashrc. Do exist a pattern, a "good practice", envisioning flexibility and modularity in terms of rc files structure? Do exist a standardization group for this, or every body just creates it's own configuration setup?

    Read the article

  • How to use cyg-wrapper to fork a new tab in win32 gvim

    - by Peter Nore
    I would like to set up an alias in my cygwin .bashrc that translates pathnames unix-to-dos and passes them to windows gvim in a new tab of an existing instance. I am trying to use Luc Hermitte's cyg-wrapper script for running native win32 applications from Cygwin as per this vim tip. Luc's example of how to use his script is: alias vi= 'cyg-wrapper.sh "C:/Progra~1/Edition/vim/vim63/gvim.exe" --binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr' I do not understand this example because most of these vim parameters (-c,--cmd,--servername,--remote-send,--remote-expr, etc) require more information, and I have not found any example of how to supply the additional information to cyg-wrapper.sh. For example, calling C:/Progra~1/Edition/vim/vim63/gvim.exe --servername=GVIM --remote-tab-silent file1 & will open file1 in a new tab of existing (or non existing) instance GVIM, but calling gvim --servername accomplishes nothing on its own. Unfortunately, though, the corresponding cyg-wrapper phrase does not work: cyg-wrapper.sh "C:/Progra~1/Edition/vim/vim63/gvim.exe" --binary-opt=--servername=GVIM,--remote-tab-silent --fork=2 file1 If ran twice, this actually opens up two instances of gvim; it is as if the servername 'GVIM' is being stripped and ignored. How do you supply a servername to gvim --servername or a .vimrc to gvim -u using cyg-wrapper.sh? Furthermore, why is it that programs must be passed to cyg-wrapper.sh in the relatively obscure "mixed form?" For example, if I try cyg-wrapper.sh "/cygdrive/c/path/to/GVimPortable.exe" --binary-opt=--servername=GVIM,--remote-tab-silent --fork=2 I get "Invalid switch - "/cygdrive"." See also: getting-gvim-to-automatically-translate-a-cygwin-path alias-to-open-gvim-cream-version-from-cygwin-shell

    Read the article

  • Bash PWD Shortening

    - by dlibby00
    I'm looking for a bash function that will shorten long path names to keep my PS1 variable from getting excessively long. Something along the lines of: /this/is/the/path/to/a/really/long/directory/i/would/like/shortened might end up as: /t../i../t../p../to/a/r../l../d../i/w../like/shortened something that the took the path and a maximum acceptable number of characters to shorten to would be perfect for my .bashrc file.

    Read the article

  • Linux: programatically setting a permanent environment variable

    - by Richard
    Hello All, I am writing a little install script for some software. All it does is unpack a target tar, and then i want to permanently set some environment variables - principally the location of the unpacked libs and updating $PATH. Do I need to programmatically edit the .bashrc file, adding the appropriate entries to the end for example, or is there another way? What's standard practice? Thanks

    Read the article

  • Adding git branch to bash prompt on snow leopard

    - by crayment
    I am using this: $(__git_ps1 '(%s)') It works however it does not update when I change directories or checkout a new branch. I also have this alias: alias reload='. ~/.bash_profile' Sample run: user@machine:~/dev/rails$cd git_folder/ user@machine:~/dev/rails/git_folder$reload user@machine:~/dev/rails/git_folder(test)$git checkout master Switched to branch 'master' user@machine:~/dev/rails/git_folder(test)$reload user@machine:~/dev/rails/git_folder(master)$ As you can see it is being set correctly but only if I reload bash_profile. I have wasted way to much time on this. I am using bash on snow leopard. Please help!

    Read the article

  • BASH function not escaping control characters

    - by ehime
    Hey guys I have a function that I'm using to find stuff, but unfortunately anytime I pass it a control character ($intVal or testing : etc) it chokes. I was wondering what the fix was? I can understand that using $ or % or : etc in grep without escaping causes this issue, but since I'm passing it in by reference I'm not sure how to escape it... Anyway, here's the code. function ffind() { if [ $1 ] ; then find -type f | grep -ir '$1' * | grep -v '.svn' else echo "'$1' is not a valid resource" fi } Example(s): $ ffind $intVal '' is not a valid resource $ ffind "testing :" bash: [: testing: unary operator expected 'testing :' is not a valid resource

    Read the article

  • launchctl - use rvm instead of system Ruby in executed scripts?

    - by Stefan Kendall
    I have a launchctl job I define as such: <key>ProgramArguments</key> <array> <string>/bin/sh</string> <string>-c</string> <string>~/projects/script.sh</string> </array> When I run script.sh manually, the script works fine, as it uses the currently configured rvm version of ruby. When I run this through launchctl, the system version of Ruby is used, which breaks the script. How can I get this script to run with the right version of ruby available?

    Read the article

  • Changing path to basedir of mysql

    - by shantanuo
    When-ever I need to start mysql from command line, I need to cd to the base directory and then use mysql command as shown below: # cd /home/ec2-user/percona-5.5.30-tokudb-7.0.1-fedora-x86_64/ # ./bin/mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 mysql> How do I start mysql simply by typing "mysql" at command prompt? I tried to export the path but it did not work. export path=$PATH:/home/ec2-user/percona-5.5.30-tokudb-7.0.1-fedora-x86_64/bin/

    Read the article

  • How to programatically set a permanent environment variable in Linux?

    - by Richard
    I am writing a little install script for some software. All it does is unpack a target tar, and then i want to permanently set some environment variables - principally the location of the unpacked libs and updating $PATH. Do I need to programmatically edit the .bashrc file, adding the appropriate entries to the end for example, or is there another way? What's standard practice? Edit: The package includes a number of run scripts (20+) that all use these named environment variables, so I need to set them somehow (the variable names have been chosen such that a collision is extremely unlikely)

    Read the article

  • umask seems to vary by user

    - by paullb
    I've got a development Ubuntu system for which I have several users: myself (with full sudo) and about 5 other users. (I've set up the system so everything in this respect is still at its default setting) I'm trying to set the system up so that multiple people can collaborate in a single directory by using grouing and I want the default permissions to be 664. However when some users edit files the permissions were 644. After a lot of investigating most users have a umask (checked at the prompt) of 0002 and when they create files they are 664 (as expected) but there are 2 (myself and one other) who have 0022 umask (so the files that come out are 644 and nobody else can write to them). I've looked everywhere but can't figure out why a couple users wind up with a different umask e.g. there is nothing the .bash_profile or anything like that) Any ideas for the source of the discrepancy? /etc/bashrc if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then umask 002 else umask 022 fi /etc/profile if [ $UID -gt 199 ] && [ "`id -gn`" = "`id -un`" ]; then umask 002 else umask 022 fi EDIT: My (bad) ~/.bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export LANG=en_US.utf8 Other user (good) .bashrc # .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >