LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 10-18-2010, 10:58 PM   #1
cre84j
Member
 
Registered: Oct 2010
Posts: 40

Rep: Reputation: 3
.bashrc editing the rc file Eee ubuntu 9.04 easy peasy


Thanks to anyone who can help me I tried to do my own research but need your help on this one.

Using ubuntu 9.4 an edition called easy peasy

am setting it up to use ruby on rails as a test machine for production based system. I am setting up to use 'ruby version manager' at this stage but come to a standstill after everything installed well but for one hitch and that is finding the .bashrc file to edit it.

The only rc file i can find is further down the directory tree than my user account at home/g... in etc and called rc.local (it has no entries and does nothing).
The thing is the file is supposed to be here in the home directory but does not show if i do ls -la it says there are 12 files but only shows lists one called gregory which is my home user account. the app for rvm works from here and is not installed system wide. So there is either a file in there already with those 12 that are there but hidden or there is not one there and i will have to make one myself. Is that right do I need to make it myself. The version manager needs it and there is an apparent edit i need to do to it for the ruby version manager (rvm) to work properly. I did the test in a rvm session to find out if it is working and it failed the test so either the file is not there at all or it needs to be edited according to what i gather from the scattered info i have read throughout the web. below is what i get onscreen when i ask for the list in the home directory and already tried using the sudo command.

gregory@gregory-laptop:/home$ ls -la
total 12
drwxr-xr-x 3 root root 4096 2010-10-11 16:09 .
drwxr-xr-x 23 root root 4096 2010-10-14 10:40 ..
drwxr-xr-x 50 gregory gregory 4096 2010-10-19 03:01 gregory

commanding a read of the file i get this

gregory@gregory-laptop:/home$ read .bashrc

bash: read: `.bashrc': not a valid identifier
gregory@gregory-laptop:/home$

i can't see what those 12 objects are so can't make an informed read of any of those files without knowing what they are called. Does anyone know about this?
 
Old 10-19-2010, 01:57 AM   #2
Jebram
LQ Newbie
 
Registered: May 2007
Location: Berlin, FRG
Distribution: Ubuntu
Posts: 22

Rep: Reputation: 4
The "total 12" you are seeing gives the number of disk blocks used
by entries in the listed directory. To confirm, try "ls -lah".
It looks like you do not have a ".bashrc" file yet. Please confirm
by trying "cat .bashrc" or "less .bashrc" (instead of "read").
To create a ".bashrc" file, use a text editor. (pico, gedit, kate, vim or
emacas - If in doubt, try pico first. It runs in/on a terminal (window)
and tries to be helpful to beginners.)
The "read" command is there for prompting users for /input/, which
is useful for interactive shell scripts - See "man read".
I hope this helps.
 
Old 10-19-2010, 07:21 AM   #3
cre84j
Member
 
Registered: Oct 2010
Posts: 40

Original Poster
Rep: Reputation: 3
thanks Jebram
I had just realised that i was wrongly in the directory or not quite where i should have been to put in the ls -la command so went right into the directory 'cd /home/gregory/
gregory@gregory-laptop:~$ cd /home/gregory
gregory@gregory-laptop:~$ cd /home/gregory/

then tried it again 'ls -la' and the whole list came out onto the bash session in front of me so then tried what you said in your reply here with 'cat .bashrc' because it was there in that list. All in the list without an . before the name are obviously not files but directories. The .bashrc file came onto the screen into the session inside the shell with the offending lines in the script as the tute had said. So now it is a matter of finding out how to edit it and think it may be that all these years in MS windows has blinded me to the fact that an editing tool like vi can be called into a bash session; but don't know for sure it's just a theory right now. My thinking is that any editing has to be done in a text editor when it probably not true and needs to be done by calling an editor app into a session some how. Well if anybody know please tell me as these files are not easy to find searching manually through the directories in a gui window and don't know how to find them anyway because the logic seems to be in using the console through near the top of the user tree rather than the other way because a lot of the files can't be accessed that way anyway.
 
Old 10-19-2010, 10:43 AM   #4
RockDoctor
Senior Member
 
Registered: Nov 2003
Location: Minnesota, US
Distribution: Fedora, Ubuntu, Manjaro
Posts: 1,791

Rep: Reputation: 427Reputation: 427Reputation: 427Reputation: 427Reputation: 427
Haven't used EasyPeasy in a long time, but since it apparently uses a GNOME desktop, you should be able to edit your .bashrc file using gedit.
 
Old 10-19-2010, 11:09 PM   #5
cre84j
Member
 
Registered: Oct 2010
Posts: 40

Original Poster
Rep: Reputation: 3
Rock Doctor
thank for mentioning gedit and had no idea before this that it had so much scope to be utilized for editing shell scripts as well as other files but now know different. After finding the pluggin bundle on the packagemanager list i downloaded them to find them in preferances a whole load of them. Ticked the box for the console app then found it in the veiw list and after checking the box it came up in the panel at the bottom. Thanks again vi is way to criptic unless you are going to use it all the time and get used to all those commands.

so next is to edit the file...
 
Old 10-20-2010, 01:04 AM   #6
cre84j
Member
 
Registered: Oct 2010
Posts: 40

Original Poster
Rep: Reputation: 3
got the edit done on the .bashrc file
in the terminal i put in 'sudo gedit .bashrc'
it put the file right there into the text editing main widow
edited it (well did what they said in the tute on the rvm site)
the trouble is though the test does not fail like when i first tried it it does not show any sort of error or anything showing that it works either though in the tute it says that the result should show 'rvm is a function'
it says that by putting this command in and exicuting it 'rvm | head -n1'
"If this was performed correctly, you should see: rvm is a function"
so i don't know if this has been resolved yet but only that the file is changed now and have successfully changed some code in the .bashrc file.

Well my thoughts are to put the ruby on rails installation to work and see if the rvm app is working and functions correctly to test it. Am hoping it doesn't take too long. there is a major problem learning ruby on rails as a newby because it is made to benefit long term users and in the mean time any tutes are for mostly older versions of the ruby interpreter and so if you have the wrong version installed you end up down some dark lonely dead end street. Then wahoo!! whats that ruby version manager!! wow!!! just what i need!!
Actually i thought it was someone having a joke at first because there was a lot of enthusiasm about rvm but no one told you how and where to get it (try github #rvm and http://rvm.beginrescueend.com/rvm/) Well this really is the answer but need to get it working so anyone with any hints as to how to speed up the process i would appreciate the advice. I joined Github #rvm but the interface is a bit foreign and i am downunder and a little to the side so the times people are on such as the author of the rvm package itself is out of sinc.

Anyone that resolved the change in the .bashrc file? your help would be apreciated. the line that has to be changed is

'[ -z "$PS1" ] && return'

its at the top of the file just after introduction the comments for the file. the return statement is the problem and is there in the ubuntu distro's. I did what they said in the tute changing it to:

if [[ -n "$PS1" ]]; then
# Some code here... e.g.
export HISTCONTROL=ignoreboth
fi
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# This loads RVM into a shell session.

this was copied from the tute itself and that 3rd line is different in ubuntu so left as is it says 'HISTCONTROL=ignoredups:ignorespace'
and not 'export HISTCONTROL=ignoreboth'
so left it as is. I also don't understand what they mean by '# Some code here... eg' written as a comment on the second line of the if statement in front of the 'then ...' method or whatever it is called.

Well just to say i don't know what i am doing here really so if you have any advice, comments, or know-how please leave a reply here for me. thanks again for any contribution its a great help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] 3D programs on EEE PC 901 under Easy Peasy seem to run with unaccelerated video 10110111 Ubuntu 2 09-14-2009 01:39 PM
LXer: Easy Peasy Linux (Ubuntu Eee) 1.5 Released LXer Syndicated Linux News 0 09-08-2009 09:10 PM
setting up an 02 3g modem with a asus eeepc running easy-peasy (ubuntu) jonbvgood Linux - Hardware 2 05-19-2009 06:05 AM
wireless issue easy peasy ubuntu remix jc_anthro Linux - Laptop and Netbook 2 05-03-2009 10:31 PM
editing users.bashrc to add a functions file dnoll17315 Linux - Newbie 1 03-27-2008 06:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration