LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-10-2014, 09:31 PM   #1
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Lost X after editing .bashrc


I wanted to add ~/bin to my PATH and thought that adding export /my/home/directory/bin:$PATH to .bashrc would do the trick.

After editing the file, I logged out then logged back in. Unfortunately the PATH was still the same. So I ran startx to see if the path would change the and that's when the fun began:

The screen went completely blank. I attempted to login to root on another screen but the PC responded so slowly that I could only conclude that the PC must be stuck in some sort of endless loop. The only way out was to turn the PC off.

After turning the PC back on, I logged in as root and found that I could run X as root (root uses TWM). So I undid the changes to .bashrc, logged out then logged back in as my normal user. However, when I attempted to startx, the screen was still black and I could only turn off the PC again.

I tried this a couple more times but X won't run under my own username (I run fluxbox as user). I haven't made any other changes so I am mystified.

Is there a log file that I could examine to find out what's gone wrong or is there another way to find some clues?
 
Old 11-10-2014, 10:10 PM   #2
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,949
Blog Entries: 46

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
Member response

Hi,

Look at: /var/log/Xorg.0.log after you launch startx

EDIT: You should use this format;
Code:
export PATH="$PATH:$HOME/bin"

Last edited by onebuck; 11-10-2014 at 10:14 PM.
 
Old 11-10-2014, 11:42 PM   #3
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Weird. Xorg.0.log was empty after I tried to startx under user but when I rebooted the PC, it is now Xorg0.log.old that is empty and these are the last few lines of Xorg.0.log.
Code:
[   221.156] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:02.0/usb2/2-4/2-4:1.1/input/input5/event5"
[   221.156] (II) XINPUT: Adding extended input device "NOVATEK USB Keyboard" (type: KEYBOARD, id 10)
[   221.156] (**) Option "xkb_rules" "evdev"
[   221.156] (**) Option "xkb_model" "evdev"
[   221.156] (**) Option "xkb_layout" "us"
[   221.156] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
[   221.157] (II) config/udev: Adding input device HDA NVidia Headphone (/dev/input/event2)
[   221.157] (II) No input driver specified, ignoring this device.
[   221.157] (II) This device may have been added with another device file.
 
Old 11-12-2014, 01:58 AM   #4
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Hmmm, it would appear that nobody can offer any clues as to what has gone wrong with my PC.

fsck does not report any problems with my drive so it would not appear to be a hardware fault.

Maybe I should try upgrading to 4.1 and see if the problem still exists. (I'm not too keen on blind experiments like this but I don't know what else to do).
 
Old 11-12-2014, 04:06 AM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Just revert the change you have done in .bashrc ?

Last edited by keefaz; 11-12-2014 at 04:07 AM. Reason: no reason, really
 
Old 11-12-2014, 04:24 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,171

Rep: Reputation: Disabled
I'd just create another regular user using the command adduser, to see what happens when you login in as that user then type startx. At least that will tell you if the issue actually comes from some of the previous user's settings.
 
Old 11-12-2014, 08:08 AM   #7
Totoro-kun
Member
 
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234

Rep: Reputation: 125Reputation: 125
Third option would be renaming your .bashrc file:

Code:
$ cd && mv .bashrc .bashrc-faulty
Then, if xorg starts working, you can work out your .bashrc problems.
 
Old 11-12-2014, 08:43 AM   #8
NathanBarley
Member
 
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94

Rep: Reputation: Disabled
What does startx do? Do you have anything in .xinitrc that has changed? What happens if you init 4 from root?
 
Old 11-12-2014, 09:07 AM   #9
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,949
Blog Entries: 46

Rep: Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182Reputation: 3182
Member response

Hi,
Quote:
Originally Posted by psionl0 View Post
Hmmm, it would appear that nobody can offer any clues as to what has gone wrong with my PC.

fsck does not report any problems with my drive so it would not appear to be a hardware fault.

Maybe I should try upgrading to 4.1 and see if the problem still exists. (I'm not too keen on blind experiments like this but I don't know what else to do).
You did correct the users PATH that was modified in '~.bashrc by you?
I like to provide my users with this;
Code:
sample .bash_profile;   
~$ cat .bash_profile 
#-----------------cut-----------------   
# .bash_profile
#08-30-06 12:21

# Source .bashrc
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
#-----------------cut end--------------

Code:
 cat .bashrc
#-----------------cut-------------------
#.bashrc
#08-30-06 12:20 

# Add bin to path
export PATH="$PATH:$HOME/bin"

# Dynamic resizing
shopt -s checkwinsize
#
#save bash history so as to share

shopt -s histappend
PROMPT_COMMAND='history -a'

# Custom prompt 
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 
#08-29-06 11:40 gws 
if [ `id -un` = root ]; then 
PS1='\[\033[1;31m\]\h:\w\$\[\033[0m\] ' 
else
PS1='\[\033[1;32m\]\h:\w\$\[\033[0m\] ' 
fi 
# 
# Add color 
eval `dircolors -b` 
#Terminus is a very nice Unicode font for the Linux console
#02-02-12 gws
#from dugan's site http://duganchen.ca/writings/slackware/fonts/

#04-30-12 11:41 removed
#
#if [ $TERM = "linux" ]; then
# setfont ter-v16n
#fi

# User defined aliases
alias cls='clear'
alias clls='clear; ls'
alias ll='ls -l'
alias lsa='ls -A'
alias lsg='ls | grep'
alias lsp='ls -1 /var/log/packages/ > package-list'
alias na='nano'
alias web='links -g -download-dir ~/ www.google.com'

#08-29-06 11:50

#To clean up and cover your tracks once you log off
#Depending on your version of BASH, you might have to use
# the other form of this command
 trap "rm -f ~$LOGNAME/.bash_history" 0

#The older KSH-style form
#trap 0 rm -f ~$LOGNAME/.bash_history
#-----------------cut end--------------
I let them modify to suit their needs.
Hope this helps!
Have fun & enjoy!

 
Old 11-12-2014, 03:12 PM   #10
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by keefaz View Post
Just revert the change you have done in .bashrc ?
I did that (see post #1) and even renamed the .bashrc file but in either case it was to no avail.

Quote:
Originally Posted by NathanBarley View Post
What does startx do? Do you have anything in .xinitrc that has changed? What happens if you init 4 from root?
My .xinitrc file is just a soft link to /etc/X11/xinit/xinitrc.fluxbox and it has never been a problem.

When I changed my runlevel from 3 to 4 the PC froze with just the "slim" background showing.

Quote:
Originally Posted by Didier Spaier View Post
I'd just create another regular user using the command adduser, to see what happens when you login in as that user then type startx. At least that will tell you if the issue actually comes from some of the previous user's settings.
I created a guest account but the PC still froze on startx. However, I had copied the .fluxbox directory my home directory to the guest home directory. On the theory that possibly one of the apps that were invoked before "exec fluxbox" was being difficult, I edited the fluxbox startup file and commented out all the apps but that made no difference either.

I then changed the symlink for guest's .xinitrc to /etc/X11/xinit/xinitrc.xfce and initially, xfce started up and ran fine. However, the first logoff took a long time. Subsequently when I logged into guest, the mouse cursor was invisible and when I ran an app, the window titles and buttons were missing. After running an app, the mouse cursor was visible but it was of the TWM variety. It's as if xinit didn't know whether to run xfce or TWM!

Root still works no problem but root's WM is TWM which doesn't have any xap dependencies. I'm beginning to think that maybe the fluxbox package or one of its dependencies somehow got corrupted (or maybe there is a virus).

Would it be worthwhile reinstalling the fluxbox package? How do I find out what its dependencies are?
 
Old 11-12-2014, 03:40 PM   #11
NathanBarley
Member
 
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94

Rep: Reputation: Disabled
Did anything else change during the same period? Any clues in the messages log?
 
Old 11-13-2014, 04:53 AM   #12
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Weider and Weider

Now when I turn on the PC the KMS doesn't kick in and the system doesn't respond to the keyboard. It's a pity that the bootup information scrolls so quickly and then disappears forever. There could be some really useful information there.

The Micro-zzzzzz partition still works fine (by Micro-zzzzzz standards) so at least I still have a PC but that won't help me with the Slackware problem.

It looks like even an upgrade won't do anymore. I think I will have to wipe sda6 completely clean and do a fresh install of Slackware 14.1 and hope that no other partition is affected.

Wish me luck!
 
Old 11-13-2014, 12:57 PM   #13
NathanBarley
Member
 
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94

Rep: Reputation: Disabled
Quote:
Originally Posted by psionl0 View Post
Now when I turn on the PC the KMS doesn't kick in and the system doesn't respond to the keyboard. It's a pity that the bootup information scrolls so quickly and then disappears forever. There could be some really useful information there.

The Micro-zzzzzz partition still works fine (by Micro-zzzzzz standards) so at least I still have a PC but that won't help me with the Slackware problem.

It looks like even an upgrade won't do anymore. I think I will have to wipe sda6 completely clean and do a fresh install of Slackware 14.1 and hope that no other partition is affected.

Wish me luck!
Do you have ssh enabled? You can try connecting remotely after boot - it's a good way of getting diagnostic info if your display or input is hosed.

It does sound like something quite dramatic has fallen over.
 
Old 11-14-2014, 04:54 AM   #14
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
It is done

As indicated above, I completely scrubbed sda6 and installed Slackware 14.1 from scratch. Just to be on the safe side I also recompiled all of my slackbuilds.

So far things seem to be working OK except for one problem which I will raise in another thread.

I am marking this thread as solved. It was obviously a coincidence that I started having problems after editing the .bashrc file. I am usually logged on for days or even weeks at a time and whatever problems happened, only became evident after I logged out and back in again.
 
Old 11-16-2014, 06:33 PM   #15
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722

Original Poster
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Thank Robby for SlackBuilds

Although I have already solved (or rather, bypassed) this problem, there was still one problem left after the Slackware 14.1 installation. For the sake of closure, I thought I should chronicle the problem and how I solved it here.

The problem was that X was unstable. At random intervals the screen would tear up and the system become unresponsive so that I had to switch the PC off. This is probably a kernel problem but there didn't seem to be any alternative kernels in the 14.1 ISO.

Since this PC is really an nvidia machine, I decided that installing the nvidia drivers should be the way to go. That looked like being a massive task until I discovered that SlackBuilds had both the nvidia-kernel and nvidia-driver packages. Then it was pretty straight forward. However, when I ran X again, the aspect ratio was all wrong. Worse, if I edited the xorg.conf file and changed "vesa" to "nvidia", X wouldn't start at all. Ditto if I ran nvidia-xconfig.

An examination of the Xorg.0.log file seemed to suggest that I needed the 304 legacy drivers (SlackBuild had 340 drivers). Fortunately, SlackBuild also had the nvidia 304 legacy packages for both the kernel and the driver. It was then a case of building and upgrading the packages. After running nvidia-xconfig again, I now have a rock solid X again. (The writing on the screen is a little smaller but who cares!)

Case closed.
 
  


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
~/.bashrc ; Editing. User Name. Linux - Newbie 8 01-01-2007 12:52 AM
problem after editing .bashrc ashley75 Linux - General 3 10-20-2004 05:49 PM
Editing .bashrc AceKidCool Linux - Newbie 3 11-27-2003 10:46 PM
~/.bashrc editing TX_metalhead Linux - General 1 07-19-2002 02:29 PM
Editing /etc/bashrc qadir Linux - Software 2 07-06-2002 04:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:47 AM.

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