LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 02-16-2011, 04:21 PM   #1
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
bash-completion-1.3-noarch-1 causes xorg failure


/etc/bash_completion.d/slapt has a syntax error that causes x to fail to load. I had to move the file to be able to run x.

Here is the offending file:

http://pastebin.com/C2UiRwMn
 
Old 02-17-2011, 01:57 AM   #2
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 356

Rep: Reputation: 91
I don't see any error here, works fine for me. What's the error you get?
 
Old 02-17-2011, 08:01 AM   #3
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 467

Rep: Reputation: Disabled
I've been looking to install bash-completion anyway so I used this as an excuse to do so. The install on both my 32-bit and 64-bit machines when perfectly. I am not experiencing any post installation problems. In fact I wonder why I have waited so long to install it, nice!

The offending file you linked to looks to be a slapt-get script. Are you using slapt-get to install bash-completion?

Since bash-completion is located in Slackware extra I would recommend using slackpkg as the best choice to install this. In fact I would recommend slackpkg be used for all packages that are part of Slackware.

# slackpkg install bash-completion-1.3-noarch-1.txz
 
Old 02-17-2011, 08:17 AM   #4
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 356

Rep: Reputation: 91
No, there is an actual slapt completion file included in the latest package, together with completion support for pkgtool, slackpkg, sbopkg and a few others.
 
Old 02-17-2011, 08:43 AM   #5
chrisretusn
Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware
Posts: 467

Rep: Reputation: Disabled
OOPS. Misread the post. It's a bash-completion script. I don't use slapt so naturally I won't see a problem.

I will admit that I have having a real problem seeing how this would effect X though.

Last edited by chrisretusn; 02-17-2011 at 08:47 AM.
 
Old 02-17-2011, 09:40 AM   #6
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Original Poster
Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Here is the error from .xsession-errors

Code:
/etc/X11/gdm/Xsession: Beginning session setup...
/etc/bash_completion.d/slapt: line 69: `_slapt-get': not a valid identifier
When booting

Code:
Starting up X11 session manager...
/etc/bash_completion.d/slapt: line 69: `_slapt-get': not a valid identifier
/etc/bash_completion.d/slapt: line 69: `_slapt-get': not a valid identifier
about 20 times then 
init: Id "x" respawning too fast: disabled for 5 minutes.
I did install the pkg with slapt-get. I will try to reinstall with slackpkg and see what happens.
 
Old 02-17-2011, 09:49 AM   #7
ppr:kut
Member
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 356

Rep: Reputation: 91
Since you are using gdm, you could try with kdm just to see whether it's a gdm issue or not
 
Old 02-17-2011, 11:08 AM   #8
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,399

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
I'll put here just a small note related to this new version of bash-completion (with 1.2 there's no such problem): if you have also adobe-reader installed, you will experiment that when you try to complete with tab a dir name with the command ls, for example, bash will complete it without the trailing slash and will put a space instead

looking around a little I found this archlinux bug that linked this AUR page.

the file /etc/bash_completion.d/acroread got a conflicting function that you can fix with this sed
Code:
sed -i "s/_filedir/_filedir_acroread/" /etc/bash_completion.d/acroread
(you can also remove the entire _filedir function from the above file )

after that, everything goes back to normal behaviour

Last edited by ponce; 02-17-2011 at 11:12 AM.
 
Old 02-17-2011, 11:28 AM   #9
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Original Poster
Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Quote:
Originally Posted by ppr:kut View Post
Since you are using gdm, you could try with kdm just to see whether it's a gdm issue or not
When I changed the runlevel to 3 in inittab and used startx there was no problem. So you are correct that it is a gdm issue.
 
Old 02-25-2011, 12:20 AM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,912

Rep: Reputation: Disabled
What shell are you using?
What is root's shell?
If you change "#!/bin/sh" in /etc/X11/gdm/Xsession to "#!/bin/bash", does that make the error go away?

Last edited by rworkman; 02-25-2011 at 12:24 AM.
 
Old 02-26-2011, 05:37 PM   #11
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Original Poster
Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Quote:
Originally Posted by rworkman View Post
What shell are you using?
What is root's shell?
If you change "#!/bin/sh" in /etc/X11/gdm/Xsession to "#!/bin/bash", does that make the error go away?
Nope.
Code:
/bin/sh -> bash*
 
Old 02-26-2011, 07:10 PM   #12
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,912

Rep: Reputation: Disabled
Well, there goes that idea. I don't know what's happening there. I'm using gdm on multiple boxes with this stuff installed, and there are no problems here... :/
 
Old 04-19-2011, 01:09 AM   #13
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
(Edit: turns out the below was right but has been fixed upstream.)

Following the link from the completion thread:

Apologies if I'm not following properly, but _slapt-get isn't a valid identifier because of the '-'. For some reason, bash-as-bash ignores it but bash-as-sh is stricter about identifiers being _alphanumeric only.

Code:
:_not-valid() { echo foo; }
sh: `_not-valid': not a valid identifier

:_not_valid() { echo foo; }
andrewthomas: just because sh is a link to bash doesn't mean you couldn't try changing the shebang line. Bash behaves differently depending on how it's called. How it's working for anyone, I don't know, but it shouldn't. (I don't use any *dm or the completion package, so I dunno.) But just using valid identifiers should fix it.

Last edited by slakmagik; 04-19-2011 at 03:23 PM. Reason: noting upstream fix
 
  


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
bash completion platypuus Programming 8 05-18-2010 11:17 PM
Bash auto-completion question PatrickNew Linux - General 3 05-02-2008 11:31 PM
Tab-Completion in bash script Buto Linux - General 1 12-04-2007 06:50 PM
xterm and bash completion athanatos Slackware 12 07-22-2006 12:47 PM
question about bash completion Guest1234 Linux - Software 4 02-25-2006 04:09 PM


All times are GMT -5. The time now is 08:28 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration