Hi Harold, It's been over a year since the last update so it's time to update the script with some minor bugfixes. I've put the new ebuild on my webspace: http://people.zeelandnet.nl/xentric/cfg-update-1.8.0-r4.ebuild Changed the ebuild so sux is a dependency when "kde" or "gnome" useflags are used. Don't know why you changed that in the previous ebuild. The changelog shows all the code changes... I hope you have some time to put it in the Portage tree. Regards, Stephan van Boven (aka xentric) Reproducible: Always
Hi, > Changed the ebuild so sux is a dependency when "kde" or "gnome" useflags are > used. Don't know why you changed that in the previous ebuild. What did I change? sux is a dependency in 1.8.0-r3 too. As far as I can see, the dependency difference between 1.8.0-r3 and your 1.8.0-r4 is only that in 1.8.0-r3, kdiff3 is accepted as an alternative to xxdiff.
You're right, sorry. But does that mean that xxdiff is not a dependency when kdiff3 is already installed? The default settings are configured for xxdiff, and the tutorial recommends this as the default tool, I would like it to always install xxdiff is the "kde" useflag is present. Can you do that in the ebuild? Thanks for your quick reply, Stephan
> You're right, sorry. But does that mean that xxdiff is not a dependency when > kdiff3 is already installed? That is correct. The original ebuild (by you, I believe) depended unconditionally on xxdiff and kdiff3 both, and I got a request to change it to depend on only one of them. > The default settings are configured for xxdiff, and the tutorial recommends > this as the default tool, I would like it to always install xxdiff is the "kde" > useflag is present. Can you do that in the ebuild? Okay, I'll change it, but if enough people complain because they have kde in their flags but don't want xxdiff, then I'd like to change it back. I don't really expect that to happen, though.
I just gave -r4 a try, but it complains about the alias not being found and exits without doing anything, even if I call it as 'cfg-update --on'.
Are you running cfg-update with non-root priviledges? That's one thing I had not thought about... hmmz, need to test this a bit further. I'll test this and change the script where necessary, then I'll post a new version 1.8.0-r5.
> Are you running cfg-update with non-root priviledges? Nope. I've tried running via sudo, and I've tried running it as root directly.
Can you run the same command again but now with -d as extra option (debugging output) and send the output to xentric@zeelandnet.nl so I can check where things go wrong?
Actually... sorry for not being more specific about the error message. The problem is that both inside sudo and after su, it cannot connect to the running X server, so even though no editor is needed, and even though I am running cfg-update from an xterm, cfg-update complains about that. I didn't realise it immediately exited because of it.
Does running "xhost +localhost" as the user who started the X-server fix your problem? Alternatively try sux to become root, it's a pain in the ass to get it to work with regular su and sudo. I have never found an easy fix for this, only sux seems to solve most problems without any tinkering. I ran xhost +localhost once, put the emerge alias in /root/.bashrc and added an extra line in /root/.bashrc that sources /etc/profile to properly set up the root environment. Take a peek in the .bashrc file included in the tarball... it's a preconfigured file that should make it work. If you come up with any ideas to make it easier for root to use the X-server, please tell me :) I just found that cfg-update didn't behave nicely when used by non-root user. I've fixed that in 1.8.0-r5, but I'll wait with posting until I have your response regarding the issue you are having. I have added some extra text explaining what to do when you are in an X-terminal and still get that error-message just like on your box. Can you confirm that running "xhost +localhost" (as the user who started X) fixes your problem?
(In reply to comment #9) > Does running "xhost +localhost" as the user who started the X-server fix your > problem? I already tried that :) It should, and it used to, but now it doesn't. $ xhost +localhost localhost being added to access control list $ su Password: # xhost Xlib: connection to ":0.0" refused by server Xlib: No protocol specified xhost: unable to open display ":0.0" > Alternatively try sux to become root, it's a pain in the ass to get it to work > with regular su and sudo. I got it working with regular sudo. Adding env_keep+=DISPLAY, and making sure HOME remains the user's home instead of root's home (sudo normally doesn't change HOME, so that's easy enough) makes it work. > I have never found an easy fix for this, only sux seems to solve most problems > without any tinkering. > > I ran xhost +localhost once, put the emerge alias in /root/.bashrc and added an > extra line in /root/.bashrc that sources /etc/profile to properly set up the > root environment. > Take a peek in the .bashrc file included in the tarball... it's a preconfigured > file that should make it work. sourcing /etc/profile doesn't make it work either with su. Thanks for the advice though, and just let me know when 1.8.0-r5 is ready; I'll be able to properly test it now. :)
Ok, good to hear that you've got it working... I wonder how many users try cfg-update and struggle with the same problems. Don't see a lot of questions about it in the support thread on the gentoo forums. I've put the new r5 ebuild on my webspace: http://people.zeelandnet.nl/xentric/cfg-update-1.8.0-r5.ebuild Have fun!
Thanks. I only took a quick look, but I didn't see any problems so far, so added. A note though, unlike your ebuild the ebuild in the tree does not install the COPYING file, as per policy <http://devmanual.gentoo.org/ebuild-writing/functions/src_install/index.html>. I hope you don't mind.