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:Pengy: |
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.
|
"su -l" is your friend.
|
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.
|
for making xconfig in 2.6.0 you need qt libraries, gtk libs for gconfig and curses for menuconfig :)
|
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 |
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 |
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. |
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. |
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:Pengy: 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 |
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 |
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 |
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 |
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.. |
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 Cheers Amos |
All times are GMT -5. The time now is 08:33 AM. |