Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-10-2014, 09:31 PM
|
#1
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Rep:
|
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?
|
|
|
11-10-2014, 10:10 PM
|
#2
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,949
|
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.
|
|
|
11-10-2014, 11:42 PM
|
#3
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
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.
|
|
|
11-12-2014, 01:58 AM
|
#4
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
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).
|
|
|
11-12-2014, 04:06 AM
|
#5
|
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552
|
Just revert the change you have done in .bashrc ?
Last edited by keefaz; 11-12-2014 at 04:07 AM.
Reason: no reason, really
|
|
|
11-12-2014, 04:24 AM
|
#6
|
LQ Addict
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,171
Rep:
|
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.
|
|
|
11-12-2014, 08:08 AM
|
#7
|
Member
Registered: Nov 2010
Location: Kaunas, Lithuania
Distribution: Slackware
Posts: 234
Rep:
|
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.
|
|
|
11-12-2014, 08:43 AM
|
#8
|
Member
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94
Rep:
|
What does startx do? Do you have anything in .xinitrc that has changed? What happens if you init 4 from root?
|
|
|
11-12-2014, 09:07 AM
|
#9
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,949
|
Member response
Hi,
Quote:
Originally Posted by psionl0
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!
|
|
|
11-12-2014, 03:12 PM
|
#10
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
Quote:
Originally Posted by keefaz
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
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
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?
|
|
|
11-12-2014, 03:40 PM
|
#11
|
Member
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94
Rep:
|
Did anything else change during the same period? Any clues in the messages log?
|
|
|
11-13-2014, 04:53 AM
|
#12
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
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!
|
|
|
11-13-2014, 12:57 PM
|
#13
|
Member
Registered: Oct 2014
Location: Western Pennsylvania
Distribution: Slackware, Crux, Gentoo, FreeBSD
Posts: 94
Rep:
|
Quote:
Originally Posted by psionl0
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.
|
|
|
11-14-2014, 04:54 AM
|
#14
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
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.
|
|
|
11-16-2014, 06:33 PM
|
#15
|
Member
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 10:47 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|