LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-02-2013, 09:49 PM   #1
jcunit
LQ Newbie
 
Registered: Apr 2013
Distribution: Manjaro
Posts: 2

Rep: Reputation: Disabled
Messed up .bashrc. Please read.


So I installed dwm and I wanted to use xterm, so I installed it. Then I tried to make it automatically change the background color in the bashrc. I added xterm -fg white -bg black. Now, every time I start a terminal it opens up a million terminals until my computer crashes. How can I reset my bashrc or somehow edit it without using the terminal? Thanks.
 
Old 04-02-2013, 09:59 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,396

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
What distro are you running?
 
Old 04-02-2013, 10:01 PM   #3
jcunit
LQ Newbie
 
Registered: Apr 2013
Distribution: Manjaro
Posts: 2

Original Poster
Rep: Reputation: Disabled
Manjaro 0.8.4.
 
Old 04-02-2013, 10:10 PM   #4
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,686

Rep: Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725Reputation: 725
boot from a live CD, mount the hard drive and edit the bashrc file.

Also, you could use scp from another computer to retrieve the file and return the editted file.
 
Old 04-02-2013, 11:11 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,396

Rep: Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017Reputation: 2017
Quote:
Originally Posted by jcunit View Post
Manjaro 0.8.4.
I know nothing about that distro, but if it follows a standard user/root setup (as opposed to Ubuntu's user/sudo setup) then you can just use one of the Ctrl+Alt+F# TTYs at the login screen, log in as root, and modify the .bashrc as necessary.
 
Old 04-02-2013, 11:21 PM   #6
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
Such commands should not be added to your .bashrc or shell initializations file(s). As said above, access your system and edit .bashrc and remove following line from it:
Code:
xterm -fg white -bg black
Then login again and create a new file with any custom name and add this command into that file. After that whenever you need to launch an xterm, your can source that file.
 
Old 04-03-2013, 12:28 AM   #7
turboscrew
Member
 
Registered: Apr 2009
Location: Nokia (town), Finland
Distribution: Sabayon, Debian, Puppy (Racy), Slackware
Posts: 548

Rep: Reputation: 45
Watch out for scripts in .bashrc. Scripts start another bash that - again - executes .bashrc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
.profile/.bashrc not being read ema_ema Linux - Newbie 2 04-05-2010 09:57 PM
bashrc not being read ... entirely h/w Linux - General 6 02-02-2008 02:42 PM
Slack 9.1 won't read /etc/bashrc GATTACA Slackware 18 11-15-2004 10:23 AM
I messed up my /etc/bashrc eJavier Linux - Newbie 4 09-12-2004 11:31 AM
bashrc not read by root, can't open display SerfurJ Slackware 6 12-05-2003 10:54 PM


All times are GMT -5. The time now is 10:10 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration