Search Results

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

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

  • Run command on startup / login (Mac OS X)

    - by Wolfy87
    I was not sure if this was for StackOverflow or here, I settled for here. I was wondering which file I should place this bash command in so it will be run on startup. # Start the MongoDB server /Applications/MongoDB/bin/mongod --dbpath /usr/local/mongo/data --fork --logpath /usr/local/mongo/log I have been scouring the net and think it is between ~/.bashrc, ~/profile, /etc/bashrc, /etc/profile or ~/.bash_profile. Although I have tried these and they seem to run on terminal startup not Mac startup. Am I missing a file here? Thanks for any help you can give.

    Read the article

  • emacs does not open a file from argument and syntax highlight does not work

    - by Jus
    In my latest ubuntu box, When I type for example emacs ~/.bashrc, Emacs will start but not open .bashrc. This is true for any file I pass in. I've used Emacs for several years, and have never experienced this problem before. I added (global-font-lock-mode 1);; to my .emacs file, and Emacs does recognize it, for example. "(C++/; Abbrev)", but it won't do syntax highlighting. If you can solve any of these problems, it will be very appreciated. The following is my machine's configuration: uname -a Linux 2.6.35-28-generic-pae #49-Ubuntu SMP Tue Mar 1 14:58:06 UTC 2011 i686 GNU/Linux ~/.emacs (global-font-lock-mode 1);;

    Read the article

  • Setting JAVA_HOME on Ubuntu 10.x

    - by user20285
    I'm trying to get the Rhodes framework installed so I can develop Android apps. This requires that I install the SUN JDK and add JAVA_HOME and JAVA_HOME/bin to path. I thought I could solve this by editing my bash.bashrc file: JAVA_HOME="/usr/lib/jvm/java-6-sun/jre/bin/java" export JAVA_HOME PATH=$PATH:$JAVA_HOME/bin This still doesn't work, because when I run: rake run:android I get a prompt in the console that says the Java bin was not found in my path. However, running echo $PATH gets me: usernamee@ubuntu:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/username/ruby/gems/bin:/usr/lib/jvm/java-6-sun/jre/bin/java/bin:/home/username/ruby_files/android-sdk-linux_86/tools What are my options here? Edit: If the problem is not the export statement, how can I ensure that the Sun JDK is properly installed and that I am, in fact, pointing to the correct path in bashrc?

    Read the article

  • Most effective way to change Linux command prompt for all users?

    - by incredimike
    I have several machines and the hostnames are really long.. i.e. companyname-ux-staging-web1.companyname.com. So my prompt looks something like [root@mycompany-ux-staging-web1 ~]# I'd like to shorten that up for all users on all machines with the least amount of work. From what I read I have a couple options, but they all have their drawbacks. I could change the hostname, but that would likely affect applications. Not a great choice. I could alter also $PS1 at login for all users by editing all .bashrc for existing users, and edit /etc/skel/.bashrc for potential new users. That's a lot of work across 10 machines. What's my best option or what have I overlooked?

    Read the article

  • Where is OS X's $PATH set?

    - by thepurplepixel
    I have a little $PATH problem: I just reinstalled MacPorts, and my path contains the MacPorts directories as it should at the beginning of $PATH. However, despite me having no such setting in my ~/.bashrc, ~/.bash_profile or ~/.profile, /Library/Frameworks/Python.framework/Versions/2.6/bin is somehow getting appended to the beginning of my $PATH: 0 07:15:11pm ~ $ echo $PATH /Library/Frameworks/Python.framework/Versions/2.6/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin I'd like to remove it as the MacPorts version of Python is newer. This must be appended after all the above-listed files are read, but I can't think of where. There is no mention of this in /etc/profile, /etc/bashrc or /etc/paths. Any assistance would be greatly appreciated. Thanks!

    Read the article

  • How to configure Logitech Marble trackball

    - by user27189
    You can configure it using xinput. I tested this in 11.10 and it works very nicely. This selection is from "Ubuntuwiki" Avoid using Hal for this release because it has known issues. Put the following into terminal, using gedit: Edit $HOME/bin/trackball.sh using this command: gedit $HOME/bin/trackball.sh Then paste this into the file: #!/bin/bash dev="Logitech USB Trackball" we="Evdev Wheel Emulation" xinput set-int-prop "$dev" "$we Button" 8 8 xinput set-int-prop "$dev" "$we" 8 1 # xinput set-int-prop "$dev" "$we" 8 1 # xinput set-int-prop "$dev" "$we Button" 8 9 # xinput set-int-prop "$dev" "$we X Axis" 8 6 7 # xinput set-int-prop "$dev" "$we Y Axis" 8 4 5 # xinput set-int-prop "$dev" "Drag Lock Buttons" 8 8 Make sure trackball.sh begins with #!/bin/bash. Make the script executable by running this: chmod +x $HOME/bin/trackball.sh` Add the following lines to $HOME/.bashrc, using gedit $HOME/.bashrc and put this in the file even if it is empty: xmodmap $HOME/.Xmodmap > /dev/null 2>&1 $HOME/bin/trackball.sh Edit $HOME/.Xmodmap using: gedit $HOME/.Xmodmap pointer = 1 8 3 4 5 6 7 9 Log out and back in and viola!

    Read the article

  • Bash alias and bash function with several arguments

    - by sanemat
    I want to use both bash alias and bash function with several arguments. I emulate svn sub commands. $ svngrep -nr 'Foo' . $ svn grep -nr 'Foo' . My expectation is both act as below: grep --exclude='*.svn-*' --exclude='entries' -nr 'Foo' . But actual, only alias ('svngrep') does well, function ('svn grep') causes invalid option error. How to write my .bashrc? #~/.bashrc alias svngrep="grep --exclude='*.svn-*' --exclude='entries'" svn() { if [[ $1 == grep ]] then local remains=$(echo $@ | sed -e 's/grep//') command "$svngrep $remains" else command svn "$@" fi }

    Read the article

  • perl: Run remote perl script through SSH and query environment variables on remote machine

    - by kakyo
    I'm running a perl script through SSH, in the perl script I query environment variables using $ENV{MY_VAR_NAME} and it works fine when run locally. But through SSH, all environment variables become unset. I also tried to run system("source ~/.bash_profile"); at the beginning of my script to no avail. Any tips? EDIT: Rephrasing my question. I have machine A and B. I ran my perl on machine B, trying to get the environment variables on B and it worked. Then I ssh from A to B running the same script, i.e., using this code ssh user@B perl myscript.pl This time the environment variables on B are all blank. Any tips? UPDATE: I found that running the above script, ~/.bashrc on Machine B was invoked, but after setting environment variables in ~/.bashrc, run the above command again and still I don't see any environment variables. Also, if my perl script contains only echo $ENV{PATH} Then I get /usr/bin:/bin:/usr/sbin:/sbin

    Read the article

  • How do I detect if I'm in a 'full screen' bash shell or GUI terminal window?

    - by Nick T
    I have some code in my .bashrc that sets the terminal window title using the currently running command and it works great in Unity, where the terminal is in a window. However, when I'm logging in with the Ctrl + Alt + F1 terminal (whatever it's called), my prompt gets filled with garbage that is various escape sequences that set the (nonexistent) window title. How can I detect from within a bash script if I'm in one or the other?

    Read the article

  • How to install JavaFx in Ubuntu 12.04?

    - by Ant's
    I download JavaFx from here. I placed it in my home directory(anto) under the name javafx. Then I did something like this : vi ~/.bashrc and added the following lines: javaFx_home=/anto/javafx/rt/lib/jfxrt.jar export PATH=$PATH:$javaFx_home But after providing the classpath, I tried running : groovy MyProgram (which depends on the JavaFx classpath). But that throws me an error. Where I went wrong?

    Read the article

  • How can I permanently save a password-protected SSH key?

    - by pl1nk
    I am using Awesome Window Manager How can I permanently add private keys with password? Inspired by the answer here I have added the private keys in ~/.ssh/config Contents of ~/.ssh/config: IdentityFile 'private key full path' Permissions of ~/.ssh/config: 0700 But it doesn't work for me. If I manually add the key in every session, it works but I'm looking for a more elegant way (not in .bashrc)

    Read the article

  • Unable to install Hadoop in Ubuntu 12.04

    - by Anitha
    I am trying to install hadoop in ubuntu 12.04 version. Following the instructions from michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/. Installed java-6-openjdk from ubuntu software center. I have set java_home in .bashrc.Also set java_home in hadoop conf/ env.sh. While formatting the namenode, getting error: usr/lib/jvm/java-6-openjdk/bin/java no such file or directory.

    Read the article

  • How to install Hadoop?

    - by Anitha
    I am trying to install Hadoop in Ubuntu 12.04 version. Following the instructions from http://michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/, I installed java-6-openjdk from Ubuntu software-center. I have set java_home in .bashrc. Also set java_home in Hadoop conf/env.sh. While formatting the namenode, I am getting the following error: usr/lib/jvm/java-6-openjdk/bin/java no such file or directory. Thank you. But it's a 64bit OS.

    Read the article

  • can't run this shell script

    - by user2413
    So I'm trying to install this script I do copy the folder in ~/Documents/icambridge-get-shit-done-1222b6b change .bashrc (the one in the user directory, is that the right one?) by adding a line PATH=:~/Documents/icambridge-get-shit-done-1222b6b”${PATH}” set the files in icambridge-get-shit-done-1222b6b as execs using sudo chmod +x type sudo ./get-shit-done and i get: /usr/bin/env: php: No such file or directory What is the problem?

    Read the article

  • How to force a clock update using ntp?

    - by ysap
    I am running Ubuntu on an ARM based embedded system that lacks a battery backed RTC. The wake-up time is somewhere during 1970. Thus, I use the NTP service to update the time to the current time. I added the following line to /etc/rc.local file: sudo ntpdate -s time.nist.gov However, after startup, it still takes a couple of minutes until the time is updated, during which period I cannot work effectively with tar and make. How can I force a clock update at any given time? UPDATE 1: The following (thanks to Eric and Stephan) works fine from command line, but fails to update the clock when put in /etc/rc.local: $ date ; sudo service ntp stop ; sudo ntpdate -s time.nist.gov ; sudo service ntp start ; date Thu Jan 1 00:00:58 UTC 1970 * Stopping NTP server ntpd [ OK ] * Starting NTP server [ OK ] Thu Feb 14 18:52:21 UTC 2013 What am I doing wrong? UPDATE 2: I tried following the few suggestions that came in response to the 1st update, but nothing seems to actually do the job as required. Here's what I tried: Replace the server to us.pool.ntp.org Use explicit paths to the programs Remove the ntp service altogether and leave just sudo ntpdate ... in rc.local Remove the sudo from the above command in rc.local Using the above, the machine still starts at 1970. However, when doing this from command line once logged in (via ssh), the clock gets updated as soon as I invoke ntpdate. Last thing I did was to remove that from rc.local and place a call to ntpdate in my .bashrc file. This does update the clock as expected, and I get the true current time once the command prompt is available. However, this means that if the machine is turned on and no user is logged in, then the time never gets updates. I can, of course, reinstall the ntp service so at least the clock is updated within a few minutes from startup, but then we're back at square 1. So, is there a reason why placing the ntpdate command in rc.local does not perform the required task, while doing so in .bashrc works fine?

    Read the article

  • Mixed java version installed

    - by david99world
    I've got the following in /.bashrc export JAVA_HOME=/usr/bin/jdk1.7.0_03/ export PATH=$PATH:/usr/bin/jdk1.7.0_03/bin This is fine, if I do $JAVA_HOME I get the directory above. The problem is if I do java -version I get... OpenJDK Runtime Environment (IcedTea6 1.11.1) (6b24-1.11.1-4ubuntu3) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) How do I make the official jdk version the right one? Sorry I'm extremely new to Ubuntu. Thanks, David

    Read the article

  • Application specific environment variable settings

    - by SuperElectric
    I'm trying to work around a known bug in Ubuntu 9.10, where using the scrollbar in emacs causes text to be highlighted, and the cursor to move. This page here shows that you can fix this by setting an environment variable before launching emacs: $ GDK_NATIVE_WINDOWS=1 emacs So a lazy fix would be to alias "emacs" in my .bashrc: alias emacs="GDK_NATIVE_WINDOWS=1 emacs" This, however, has the drawback of setting this environment variable for all subsequent commands run from that shell. Is there any way to set GDK_NATIVE_WINDOWS=1 for just emacs, whenever I run emacs?

    Read the article

  • Cannot run logwatch due to Date::Manip issue

    - by Quintin Par
    I tried to run logwatch at follows [root@machine cron.daily]# ./0logwatch ERROR: Date::Manip unable to determine TimeZone. Execute the following command in a shell prompt: perldoc Date::Manip The section titled TIMEZONES describes valid TimeZones and where they can be defined. My date is as follows root@machine cron.daily]# date Thu Aug 23 06:25:21 GMT 2012 Now based on details in various forums I tried to fix this by setting /etc/timezone to “+0800” but it didn’t work My /etc/localtime points to /usr/share/zoneinfo/GMT and is managed by puppet How do I go about fixing this? I still want all my machines to be in GMT timezone. EDIT: Sadly, Both the changes are not working: [root@machine cron.daily]# cat /etc/TIMEZONE UTC Quanta’s [root@machine cron.daily]# cat ~/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export TZ=GMT export PATH [root@machine cron.daily]# source ~/.bash_profile [root@machine cron.daily]# ./0logwatch ERROR: Date::Manip unable to determine TimeZone. Execute the following command in a shell prompt: perldoc Date::Manip The section titled TIMEZONES describes valid TimeZones and where they can be defined.

    Read the article

  • copSSH and cygwin - Can't use windows style paths

    - by DrFredEdison
    I setup copSSH on one of my windows servers, and within the copSSH bash shell, I can't seem to use windows-style paths to remove and copy files. If I do try, I get the following: $ /bin/cp -r C:/Domains/_temp/collage_push/* C:/Domains/collage/ cygwin warning: MS-DOS style path detected: C:/Domains/_temp/collage_push/ Preferred POSIX equivalent is: /cygdrive/c/Domains/_temp/collage_push/ CYGWIN environment variable option "nodosfilewarning" turns off this warning. Consult the user's guide for more details about POSIX paths: http://cygwin.com/cygwin-ug-net/using.html#using-pathnames I have created a windows environment variable CYGWIN set to nodosfilewarning. It has no effect. I added export CYGWIN=nodosfilewarning to my .bashrc and doing a echo $CYGWIN in my ssh session confirms it is indeed getting set; yet again, it has no effect finally, I noted that when not doing my own export that CYGWIN contains "nontsec binmode" (no quotes), so I tried: export CYGWIN="nodosfilewarning nontsec binmode" in my .bashrc and still no dice. Older versions of CopSSH didn't have this issue. How can I actually override this error? I have a lot of scripts that already use windows-style paths, and I'd rather not change them if possible.

    Read the article

  • Scripting a permanent CTRL / CAPS swap in Gnome?

    - by Duncan Bayne
    I have a bash script that I use to configure a vanilla Ubuntu (10.10 Maverick Meerkat) installation to be exactly the way I want it. I make extensive use of gconftool-2 to configure the desktop, set up shortcut keys, etc. Now, I'm trying to swap the CTRL and CAPS keys. I have found two ways of doing this: In Gnome, go to System - Preferences - Keyboard - Layout - Options and make the change in there. This works well, but I don't know how to script this; the setting doesn't seem to be stored in the usual place as I can't find it with gconf-editor. Add the line setxkbmap -option "ctrl:swapcaps" to my .bashrc file. That works too, until I suspend the machine & then resume it. At that point the CTRL and CAPS behaviour return to normal, until I cause .bashrc to be run again by opening a new shell. This behaviour has been reported as a bug in RedHat. Could someone please suggest a way of switching those keys that is both permanent, and can be scripted? I'm sure I must be missing something obvious here ...

    Read the article

  • no such file to load -- rubygems (LoadError)

    - by Vineeth
    Hello, I recently installed rails in fedora 12. I'm new to linux as well. Everything works fine on Windows 7. But I'm facing lot of problems in linux. Help please! I've installed all the essentials to my knowledge to get the basic script/server up and running. I have this error from boot.rb popping up when I try script/server. Some of the details I'd like to give here: The directories where rails, ruby and gem are installed, [vineeth@localhost my_app]$ which ruby /usr/local/bin/ruby [vineeth@localhost my_app]$ which rails /usr/bin/rails [vineeth@localhost my_app]$ which gem /usr/bin/gem And when I run the script/server, this is the error. [vineeth@localhost my_app]$ script/server ./script/../config/boot.rb:9:in `require': no such file to load -- rubygems (LoadError) from ./script/../config/boot.rb:9 from script/server:2:in `require' from script/server:2 And the PATH file looks like this [vineeth@localhost my_app]$ cat ~/.bash_profile # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin/ruby:$PATH" I suppose it is something to do with the PATH file. Let me know what I need to change here. If there are other changes I should make, please let me know, Thanks

    Read the article

  • Ubuntu 12.04: apt-get "failed to fetch"; apt is trying to fetch via old static IP

    - by gabe
    Sample error: W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/universe/i18n/Translation-en Unable to connect to 192.168.1.70:8118: Now this was working just fine until I changed the IP this morning. I have the server set to a static IP of 10.0.1.70 and for years it has been 192.168.1.70 - the IP apt-get is trying to use right now. I use privoxy and tor thus the 8118 port. Like I said it all worked until I changed the static IP from 192.168.1.70 to 10.0.1.70. I was forced to do so because of router issues. (Long and involved story, I didn't really want to change the IP because I know something like this would happen.) The setup for TOR/Privoxy requires that has you point Privoxy at TOR via 127.0.0.1:9050. Then point curl, etc to Privoxy via $HOME/.bashrc. Typically you would set the listen to IP for Privoxy to 127.0.0.1 but if you want it accessible to the rest of the LAN you set the IP to the server's LAN IP. Which I did a long time ago and was working fine until this morning. I have changed all instances of 192.168.1.70 to 10.0.1.70 in both /etc/privoxy/config and $HOME/.bashrc. What makes this really strange for me is that curl is working fine. I curl icanhazip.com and voila I get a new IP every 10 minutes or so. I curl CNN.com and I get the short but sweet permanently moved to www.cnn.com message I expect. Firefox works fine. Ping works fine. And I've tested all of this via Remote Desktop over my LAN. So the connection appears to be fine for everything except apt. I've also rebooted hoping that would clear 192.168.1.70 from apt. So the connection to the internet and DNS aren't an issue for these programs. And they are, as far as I can tell, using Privoxy/TOR just fine. The real irony here is that I've tried to open up Privoxy to go to Ubuntu's servers directly without going through TOR to speed up the downloads from Ubuntu (did this months ago). So somewhere that I have not been able to find, apt has stored the IP 192.168.1.70. And 192.168.1.70 is no longer valid. Thanks for the help

    Read the article

  • HISTCONTROL=ignoreboth not working Debian Lenny

    - by Mike
    Can anybody confirm if by setting the the following environmental variables under debian lenny will make previous history entries not to be saved. GNU bash, version 3.2.39(1)-release export HISTCONTROL=ignoreboth export HISTSIZE=500 I have added them to my /etc/bash.bashrc but I keep getting repeated commands. Thanks

    Read the article

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