LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 12-19-2003, 06:09 PM   #1
amos
Member
 
Registered: Dec 2002
Location: Manchester, UK
Distribution: Debian
Posts: 222

Rep: Reputation: 30
Cannot launch "make xconfig"


I'm using Slackware 9.1 and I've noticed that I can't seem to launch programs that require an X connection from the shell when I'm logged in as root.

Basically I was trying to reconfigure a kernel, and as such I'd SUed and got to:

make xconfig

but I got the following:

make[1]: `scripts/fixdep' is up to date.
scripts/kconfig/qconf arch/i386/Kconfig
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

qconf: cannot connect to X server :0.0
make[1]: *** [xconfig] Error 1
make: *** [xconfig] Error 2


As a normal user there's no problem launching things like kate, but I just can't seem to find where the 'switch' to turn this on, is. I've worked around it by exit-ing from root, and doing:

kdesu make xconfig

but it feels clumsy.

I'm sure its something dead simple, but its bugging me!

Cheers
Amos

Last edited by amos; 12-19-2003 at 06:11 PM.
 
Old 12-20-2003, 07:18 AM   #2
irish_rover
Member
 
Registered: Sep 2002
Location: IN, USA
Distribution: Debian, Endian FW
Posts: 368

Rep: Reputation: 30
Do you su with or with the - ? Like su or su - ? I have noticed that if I don't use the - with su on a Debian system I can run X apps from a terminal.
 
Old 12-20-2003, 07:22 AM   #3
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 235

Rep: Reputation: 55
"su -l" is your friend.
 
Old 12-20-2003, 10:58 AM   #4
powadha
Member
 
Registered: Nov 2003
Distribution: Debian SID
Posts: 649

Rep: Reputation: 31
Strange, I was able to just do a mkae xconfig. 10 recompiles later (yes, it took some time to get 2.6.0 just right) it stoped working. I'm stuk with gconfig or menuconfig.
 
Old 12-20-2003, 11:39 AM   #5
minio
Member
 
Registered: Sep 2003
Location: Czech Republic - Prague
Distribution: Slackware 9.1
Posts: 61

Rep: Reputation: 15
for making xconfig in 2.6.0 you need qt libraries, gtk libs for gconfig and curses for menuconfig
 
Old 12-20-2003, 01:17 PM   #6
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 551

Rep: Reputation: 43
Kernel compile or not, I'd be interested to know how to get an X of kde ap working when I su to root while logged in as a normal user.

I just fiddled around with su - and su -l but got nowhere. The manpage for su doesn't list an "l" option in slack-9.1.

I remember being able to bring up konqueror after su"ing" to root in a shell when running mdk. After switching to slack-8.1 i did figure out how to do it but it was a very long winded command and not worth the bother since I has started using mc.

I've since forgotten the why I couldn't and how I did.

Still it'd be a nice trick to have up my sleeve so I don't have to login to a kde enviro as root to say compile a kernel
 
Old 12-21-2003, 04:09 PM   #7
amos
Member
 
Registered: Dec 2002
Location: Manchester, UK
Distribution: Debian
Posts: 222

Original Poster
Rep: Reputation: 30
I usually use just 'su', I've just tried 'su -' and 'su -l', but neither cure the problem. Although both give me the coloured lists from 'ls' that I get as a normal user, but don't get as 'su'. I know that I can run 'make xconfig' since it works when I kdesu it as a normal user.

I'm 90% sure that I didn't have this problem with Slack 9.0, but I can't remember for certain. I'm pretty sure that its some sort of environment variable or profile file for root, so I'm now going to log back in to my box as root and see whether it works from there.

Cheers
Amos
 
Old 12-21-2003, 10:18 PM   #8
ckamheng
Member
 
Registered: Apr 2003
Location: Malaysia
Distribution: Slackware 10.2
Posts: 74

Rep: Reputation: 15
startx b4 u make xconfig

i think u have to enter X Window either Gnome or KDE in order to use make xconfig.
I would recommend you to compile ur kernel using command line mode rather than GUI mode because in GUI mode u will get hang if ur PC is lauzy as mine one. But in command line mode, u are always safe.

it was just my experience.
Thanks.
 
Old 12-22-2003, 02:05 AM   #9
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackware ARM, Salix and Porteus
Posts: 551

Rep: Reputation: 43
I usually work in the kde shell konsole and usually do what I need to do with mc and mcedit after I su root.

I've only been with slack since 8.1 and have never been able to access an ap requiring an x session as root after opening up an x/kde session as a normal user.
Maybe its possible in a gnome session. I don't know.

I had gotten in the habit of su "ing' into root and using konqueror when I used mdk because it was possible because of the way mdk has been set up. Id venture a guess that it'd not be possible in debian (and maybe gentoo) also.

make xconfig won't work without access to an x session.

There is a work around and I could do it back when I first picked up slack-8.1 after some googling but there was some interesting messages before I finally had konqueror going.

Nowadays I find mc much faster and don't think about it except on the odd occassions like a kernel compile when I log in via kdm as root.
 
Old 12-22-2003, 03:33 AM   #10
amos
Member
 
Registered: Dec 2002
Location: Manchester, UK
Distribution: Debian
Posts: 222

Original Poster
Rep: Reputation: 30
I'm already in an xsession. I'm trying to run 'make xconfig' from a Konsole, under kde. Hence the reason 'kdesu make xconfig' works.

Should I be building my kernels in /usr/src, or should I be doing all the busy work in /home/amos and then put a 'ln -s' in /usr/src pointing to these. At the moment I usually start with a kernel source tree in /usr/src with /usr/src/linux pointing at it. Hence the need to be root when running 'make xconfig'.

Maybe I've been doing it wrong

I am however quite sure that I was able to recompile the kernel under Slack 9.0 using make xconfig, in /usr/src/linux, without having to resort to work arounds.

Cheers
Amos

Last edited by amos; 12-22-2003 at 03:35 AM.
 
Old 12-22-2003, 05:40 AM   #11
invisibastard
LQ Newbie
 
Registered: Aug 2003
Location: detroit
Distribution: Slackware 10
Posts: 14

Rep: Reputation: 0
this works for me

I was having the same problem. The way around it for me was to type "xhost +localhost" as a normal user, then su to root and run make xconfig.

Hope that helps,
Rich
 
Old 12-22-2003, 10:50 AM   #12
kc00l
Member
 
Registered: Oct 2003
Location: France/Italy
Distribution: Slackware Current
Posts: 83

Rep: Reputation: 15
A simple and useful way to solve the problem, if you really want to use X to configure your kernel:

$cd
$tar xvzf linux-2.6.0.tar.bz2
$su -c "ln -s /home/username/linux-2.6.0 /usr/src/linux"
$cd linux-2.6.0
$make xconfig
 
Old 12-22-2003, 11:52 AM   #13
amos
Member
 
Registered: Dec 2002
Location: Manchester, UK
Distribution: Debian
Posts: 222

Original Poster
Rep: Reputation: 30
If I log in to my box as root (at the kdm screen) then my konsole session has coloured responses to 'ls' and 'make xconfig' launchs the qt based configurator.

I'm betting that there is some simple Environmental variable or rc file where this behaviour is defined.

What file does xhost write to?

Cheers
Amos

Last edited by amos; 12-22-2003 at 11:54 AM.
 
Old 12-22-2003, 12:17 PM   #14
Obscure
Member
 
Registered: Apr 2003
Location: Milan
Distribution: Slackware 10 / FreeBSD 5.3
Posts: 175

Rep: Reputation: 32
I got similar error on my slack 9.0 compiling 2.6:

# make xconfig
HOSTCC scripts/fixdep
SHIPPED scripts/kconfig/zconf.tab.h
HOSTCC scripts/kconfig/conf.o
sed < scripts/kconfig/lkc_proto.h > scripts/kconfig/lkc_defs.h 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
HOSTCC scripts/kconfig/kconfig_load.o
HOSTCC scripts/kconfig/mconf.o
In file included from /usr/include/linux/errno.h:4,
from /usr/include/bits/errno.h:25,
from /usr/include/errno.h:36,
from scripts/kconfig/mconf.c:12:
/usr/include/asm/errno.h:4:31: asm-generic/errno.h: No such file or directory
scripts/kconfig/mconf.c: In function `exec_conf':
scripts/kconfig/mconf.c:243: `EINTR' undeclared (first use in this function)
scripts/kconfig/mconf.c:243: (Each undeclared identifier is reported only once
scripts/kconfig/mconf.c:243: for each function it appears in.)
scripts/kconfig/mconf.c:243: `EAGAIN' undeclared (first use in this function)
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [xconfig] Error 2

..Same launching gconfig or menuconfig..
I got qt, gtk and ncurses lib...


What goes wron??
Tnx VM for help..

Last edited by Obscure; 12-22-2003 at 12:20 PM.
 
Old 12-22-2003, 12:43 PM   #15
amos
Member
 
Registered: Dec 2002
Location: Manchester, UK
Distribution: Debian
Posts: 222

Original Poster
Rep: Reputation: 30
I've been playing around and googling and I've managed to find out that alias gives different results depending how you're logged in to the shell. For instance, playing with different logins gave me:
Code:
amos@rohan:~$ alias
alias d='dir'
alias dir='/usr/bin/ls $LS_OPTIONS --format=vertical'
alias ls='/usr/bin/ls $LS_OPTIONS'
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
alias v='vdir'
alias vdir='/usr/bin/ls $LS_OPTIONS --format=long'
amos@rohan:~$ su
Password:
root@rohan:/home/amos# alias
root@rohan:/home/amos# exit
exit
amos@rohan:~$ su -l
Password:

ANOINT:
        To grease a king or other great
        functionary already sufficiently slippery.

root@rohan:/home/amos# alias
alias d='dir'
alias dir='/usr/bin/ls $LS_OPTIONS --format=vertical'
alias ls='/usr/bin/ls $LS_OPTIONS'
alias mc='. /usr/share/mc/bin/mc-wrapper.sh'
alias v='vdir'
alias vdir='/usr/bin/ls $LS_OPTIONS --format=long'
root@rohan:/home/amos#
If I could find where these are set then I could possibly find something more useful.

Cheers
Amos
 
  


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
where should i look for "CONFIG_SERIAL_CORE" in "make xconfig" b0nd Linux - Newbie 5 09-23-2005 06:08 PM
Kernel compiling: any links to explain all the "make xconfig" parameters? vharishankar Linux - General 5 02-21-2005 11:27 AM
"make xconfig" - fonts are Squares! Kujila Linux - Software 2 05-24-2004 04:24 AM
[RedHat] "make xconfig" changes stock .config gbell Linux - Distributions 0 07-07-2003 05:28 PM
Kernel 2.5.61 "make xconfig" error Dteyn Linux - General 3 02-16-2003 05:39 PM


All times are GMT -5. The time now is 08:46 AM.

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