Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Troubleshooting cfg-update..
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Mon Oct 13, 2003 7:04 pm    Post subject: Reply with quote

I emerged xxdiff + its dep, and then followed your directions precisely, chmod 755 and all. When I try to run cfg-update, as you instructed, I get a "command not found."

Where have I gone wrong- I'd really like to try this!

Just went back to check again one more time, as user, and root, and here's what I got:

wrc@mymachine wrc $ cfg-update
/usr/local/bin/cfg-update: line 3: =: command not found
/usr/local/bin/cfg-update: line 10: =: command not found
/usr/local/bin/cfg-update: line 17: =: command not found
/usr/local/bin/cfg-update: line 21: sub: command not found
/usr/local/bin/cfg-update: line 22:  : command not found
/usr/local/bin/cfg-update: line 23:  : command not found
/usr/local/bin/cfg-update: line 24:  : command not found
/usr/local/bin/cfg-update: line 25:  : command not found
/usr/local/bin/cfg-update: line 26:  : command not found
/usr/local/bin/cfg-update: line 27:  : command not found
/usr/local/bin/cfg-update: line 28:  : command not found
/usr/local/bin/cfg-update: line 29:  : command not found
/usr/local/bin/cfg-update: line 30:  : command not found
/usr/local/bin/cfg-update: line 31:  : command not found
/usr/local/bin/cfg-update: line 32:  : command not found
/usr/local/bin/cfg-update: line 33:  : command not found
/usr/local/bin/cfg-update: line 34:  : command not found
/usr/local/bin/cfg-update: line 35:  : command not found
/usr/local/bin/cfg-update: line 36:  : command not found
/usr/local/bin/cfg-update: line 37:  : command not found
/usr/local/bin/cfg-update: line 38:  : command not found
/usr/local/bin/cfg-update: line 39: syntax error near unexpected token `}'
/usr/local/bin/cfg-update: line 39: ` } '

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # cfg-update
bash: cfg-update: command not found
root@mymachine wrc #

I copy/pasted the file as posted in the forum- could there be an error?


Thanks,
wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Mon Oct 13, 2003 8:26 pm    Post subject: Reply with quote

OK- made some progress. I had saved the file in kwrite, and it was just a text file. When I saved it in kedit, it became a perl file, so I replaced it in /usr/local/bin.

I then had to use the command as root "perl cfg-update" instead of just "cfg-update" to get it to output the options -c and -p. Haven't had a chance to try it, but will on my next opportunity.Am I correct in thinking you have to have some ._cfg???? files to have the gui appear?

I think it's set up OK now, but I'm still not really sure. At least it appears that some functionality is there- but still no gui appears. I'd still like to know what to expect with the gui- could someone post a screenshot- that would be great?

Thanks,
wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Tue Oct 14, 2003 12:45 am    Post subject: Reply with quote

******************************************************************************

NOTE TO ALL CFG-UPDATE USERS:

After 5 years I'm finally looking for someone capable of fully adopting cfg-update as I do not have the time to properly support it anymore. I will fix all remaining bugs in week 31 and write some documentation to enable someone else to continue developing it further...
By the way, all those years I have wondered how many people are actually using cfg-update. I still have no clue!

I would really, really, really appreciate it if all you guys out there would just send a shout to xentric@zeelandnet.nl with your name or nickname and your location, just for the fun of it and to get an idea what the minimal size of the userbase is.

Drop me an e-mail on the same address if you're interested in adopting cfg-update.

Regards,

Stephan van Boven


For more details see: app-portage/cfgupdate - installation instructions

[11-JUL-2008]
******************************************************************************








wrc1944 wrote:
I think it's set up OK now, but I'm still not really sure. At least it appears that some functionality is there- but still no gui appears. I'd still like to know what to expect with the gui- could someone post a screenshot- that would be great?


Good, at the moment I can't make a screenshot for you as I'm in the
middle of moving my Gentoo system from my old laptop to my new
one. Just make two textfiles to test things out:

/etc/test
Code:
line1
line2
line3

/etc/._cfg0000_test
Code:
line1
line1a
line1b
line2c
line3
line4

Now run cfg-update -i and try if you can merge the files and "save as left"
to replace the old config file (/etc/test)
_________________
When all else fails, read the manual...
Registered Linux User #340626


Last edited by xentric on Fri Jul 11, 2008 7:33 pm; edited 2 times in total
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 4:35 am    Post subject: Reply with quote

Thanks xentric,

I did as you instructed, and here is the output. I guess I still don't get it. Where is the GUI? All I get is command line options. Do I need to edit the script somehow?

wrc1944

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # cfg-update -i
bash: cfg-update: command not found
root@mymachine wrc # perl cfg-update -i

(1/2)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?]

n

(2/2)
Merge files: /etc/test~ <=> /etc/._cfg0000_test~ ? [y|n|q|?] n

root@mymachine wrc #
root@mymachine wrc # perl cfg-update -l
/etc/._cfg0000_test
/etc/._cfg0000_test~
root@mymachine wrc # perl cfg-update -p
/etc
/var/qmail/control
/usr/share/config
/usr/kde/2/share/config
/usr/kde/3/share/config
/usr/X11R6/lib/X11/xkb
/usr/kde/3.1/share/config
/usr/share/config
root@mymachine wrc # perl cfg-update -c

Current configuration is: editor(xxdiff) mode(none) backups(on)

Available editors: diff diff3 pdiff sdiff xxdiff sgmldiff
New default editor (press enter to skip) :
-----------------------------------------------------
Here's try 2, saying yes: Seems to be an x server problem- any ideas- I'm lost at this point? I do now have a test.new file that is the new version, so it must be working, but without the gui.

root@mymachine wrc # perl cfg-update -i

(1/2)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test ? [y|b|n|q|?] y

(2/2)
Merge files: /etc/test~ <=> /etc/._cfg0000_test~ ? [y|n|q|?] y
Backup file: /etc/test~ -> /etc/test~.old
Backup file: /etc/._cfg0000_test~ -> /etc/test~.new
Open editor: xxdiff /etc/test~ /etc/._cfg0000_test~
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test~ ? [y|b|n|q|?] n

root@mymachine wrc #
root@mymachine wrc #
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Tue Oct 14, 2003 10:56 am    Post subject: Reply with quote

wrc1944 wrote:
Thanks xentric,

I did as you instructed, and here is the output. I guess I still don't get it. Where is the GUI? All I get is command line options. Do I need to edit the script somehow?

wrc1944

Code:
root@mymachine wrc # perl cfg-update -i

(1/2)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test ? [y|b|n|q|?] y

(2/2)
Merge files: /etc/test~ <=> /etc/._cfg0000_test~ ? [y|n|q|?] y
Backup file: /etc/test~ -> /etc/test~.old
Backup file: /etc/._cfg0000_test~ -> /etc/test~.new
Open editor: xxdiff /etc/test~ /etc/._cfg0000_test~
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test~ ? [y|b|n|q|?] n


Wow, I didn't know it was this hard to get my script running :roll:
After it prints "Open editor: ..." it should pop-up xxdiff in your X window!
Are you running the script from within a terminal window in either
KDE, Gnome, or another window manager? You can't run it from a virtual
terminal... You need to be in the GUI already! Does that fix the problem?

Btw, I have uploaded the script to an ftp server (see install section above)
you might want to download and save it again to avoid cut&paste errors.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 1:26 pm    Post subject: Reply with quote

I'm in the full-blown kde 3.1.3 desktop, and open a shell konsole as usual, su to root and have to type "perl cfg-update [option]" to get anything but a "command not found." Typing only cfg-update outputs "command not found." It appears to work at cli level, but no gui comes up, no matter what I do.

I'm still getting the can't connect to x server problem.

I'll replace my copy/paste version with the download- just did it, aand it is slightly smaller- maybe that's it.

OK- compared the two cfg-update versions manually- the only difference is the mode in the new one is now "-i" instead of "none." However, the downloaded one is 8.971kb, and the c/p one is 9,406. Strangely, they appear identical line by line in regular konqueror windows- no extra lines or text I can see. I'll try again, from scratch, and post back.

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 1:34 pm    Post subject: Reply with quote

OK- recreated the test files in /etc, and replaced the cfg-update file with the downloaded one. Same result- see below. If I understand correctly, this should be giving me the gui at this point?

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # cfg-update
bash: cfg-update: command not found
root@mymachine wrc # perl cfg-update

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] n

root@mymachine wrc #
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 2:25 pm    Post subject: Reply with quote

Here's the output with answering "y."

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # perl cfg-update

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n

root@mymachine wrc #
-------------------------------------------------------------
Seems I still have the x server problem. Should I try another editor?

Or perhaps some kind of linkage? I'm a little over my head here. I've got some .xsession errors in /home/wrc (after deleting all previous ones, and then trying cfg-update again)- should I post those too? I'm starting to think it's a kde problem, although kde works fine in all cases so far.

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Tue Oct 14, 2003 7:59 pm    Post subject: Reply with quote

Try typing 'xhost +localhost' in one of your xterms. Looks like you're trying to open xxdiff from a remote shell or something.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 10:06 pm    Post subject: Reply with quote

meowsqueak,
I must not understand the syntax, or where and when yo mean to type this- typing xhost +localhost gives command not found, as user or as root.

Please give a complete example of what you mean.

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Tue Oct 14, 2003 10:11 pm    Post subject: Reply with quote

meowsqueak wrote:
Try typing 'xhost +localhost' in one of your xterms. Looks like you're trying to open xxdiff from a remote shell or something.

This could solve your problems with the "connection to 0.0 refused" error.
Please report back if typing "xhost +localhost" fixed it!
IIRC I remember having to type this once too when I tried one of the
2.6 kernels. But when I run "xhost -localhost" I can still use my script...
Weird stuff :?

The difference between the scripts is my fault, uploaded the file I'm using
which has the -i mode on. This changes the program so you don't have to
type "cfg-update -i" but just "cfg-update". With the "none" mode it will
show the usage (help) screen when you run "cfg-update".
I have changed it back to "none" for the downloadable version because
I think it's best for new users to get the helpscreen by default.

But please keep trying to get it to work... Your replies could help other
users with the same problem. I hope we can quickly sort out the problem!

Added a screenshot so you can see what you get when it works...


Last edited by xentric on Wed Oct 22, 2003 1:44 pm; edited 1 time in total
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Tue Oct 14, 2003 11:30 pm    Post subject: Reply with quote

Great screenshot! I'm looking forward to getting it to work. However, as I said, typing xhost +localhost does nothing. It's obvious I'm not getting x to open. Other progs work fine, and open in x windows from a command line, like gkrellm, kmplayer, etc, so I can't understand this.

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # xhost +localhost
bash: xhost: command not found
root@mymachine wrc #

What am I doing wrong?

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Tue Oct 14, 2003 11:41 pm    Post subject: Reply with quote

You are becoming 'root' but the environment does not have DISPLAY set. So, first:

Code:
$ su
# export DISPLAY=localhost:0.0
# perl cfg-update -i


You might find it easier to use 'sudo'. Emerge the sudo package and use 'visudo' as root to add the wheel group (uncomment the line that refers to wheel). Add yourself to the wheel group in /etc/group and logout. When you log back in, you should be able to just do this from an xterm (as normal user) without any mucking around with xhost or DISPLAY:

Code:
$ sudo perl cfg-update -i
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Oct 15, 2003 12:24 am    Post subject: Reply with quote

Is anyone else having problems with this script? Similar problems?
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Wed Oct 15, 2003 12:46 am    Post subject: Reply with quote

Here's the output:

wrc@mymachine wrc $ su
Password:

root@mymachine wrc # export DISPLAY=localhost:0,0
root@mymachine wrc # perl cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
xxdiff: cannot connect to X server localhost:0,0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n

root@mymachine wrc #

I'm already in the wheel group. This is from /etc/group:

kmem::9:
wheel::10:root,rob,wrc
floppy::11:root,wrc

I assume I don't need to do the sudo thing, since I'm already set up that way??? Correct?

wrc1944
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Wed Oct 15, 2003 12:55 am    Post subject: Reply with quote

Only if /etc/sudoers is correct and the wheel group is uncommented (and therefore allowed to use sudo). Use 'visudo' ONLY to edit this file.
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Oct 15, 2003 2:06 am    Post subject: Reply with quote

wrc1944 wrote:

root@mymachine wrc # export DISPLAY=localhost:0,0

You typed a comma (,) instead of a dot (.)
export DISPLAY=localhost:0.0

or try
export DISPLAY=:0
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Wed Oct 15, 2003 3:08 am    Post subject: Reply with quote

Sorry about the typo. Tried again, both ways, still get same results.Any idea on what the No protocol specified means? In kde info-x-server, it says the name of the display is indeed :0.0, so that seems correct.

wrc@mymachine wrc $ su
Password:
root@mymachine wrc # export DISPLAY=localhost:0.0
root@mymachine wrc # perl cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to "localhost:0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server localhost:0.0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n

root@mymachine wrc #
-------------------------------------------------------
root@mymachine wrc # export DISPLAY=:0
root@mymachine wrc # perl cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n

root@mymachine wrc #
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Wed Oct 15, 2003 7:22 am    Post subject: Reply with quote

Did you try 'xhost +localhost' with this?
Back to top
View user's profile Send private message
xentric
Guru
Guru


Joined: 16 Mar 2003
Posts: 410
Location: Netherlands

PostPosted: Wed Oct 15, 2003 10:33 am    Post subject: Reply with quote

meowsqueak wrote:
Did you try 'xhost +localhost' with this?

And if the command "xhost +localhost" gives you "no command found"
try it with the full path (in KDE console):
"/usr/X11R6/bin/xhost +localhost"
Back to top
View user's profile Send private message
lazarusrat
Guru
Guru


Joined: 17 Jul 2002
Posts: 305
Location: Lafayette, IN

PostPosted: Wed Oct 15, 2003 1:54 pm    Post subject: Reply with quote

wrc1944,
A lot of this is speculation since I don't have gentoo in front of me right now, but I'm guessing /usr/local/bin and /usr/X11R6/bin aren't in your path for root which is why you can't just type cfg-update or xhost.

It may be in the path for a "regular" root login, but "su" puts you into a slightly different environment than logging in as root on a terminal and/or running a root xterm. Try using "su -" instead of just "su" (that's just a space and a hyphen) and see if that lets you type just the command. If not, you should be able to type /usr/local/bin/cfg-update and get it to run.

You more than likely have at least one of the two files /root/.bashrc and /root/.profile. If you only have one, you can make a symlink to that file for the other one. This will also make su do all the things a normal login does. And if that still doesn't put those directories in your path, you can add a line at the end:
Code:
export PATH=$PATH:/usr/local/bin:/usr/X11R6/bin
though that's not necessarily the most secure idea in the world.

I think taking care of the path problem might automatically fix the rest. When you run the command "/usr/local/bin/cfg-update" directly, the environment gets passed along to it. But if you run "perl cfg-update", I don't think that passes the environment variables along, which is why the script can't find anything it needs. At least, that's my theory.
_________________
obpiper: pipe menu generator for openbox
obtheme: pipe menu to switch openbox themes


Last edited by lazarusrat on Wed Oct 15, 2003 6:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Wed Oct 15, 2003 6:19 pm    Post subject: Reply with quote

Here's the output from my latest tries. This is really getting frustrating. Where am I going wrong here? One would think this would be easy to get working, but not being an expert, it's apparently beyond my understanding. (BTW, I have no .bashrc or .profile files in /root, but do have an /etc/profile, and a /home/wrc/.bashrc)

------------------------------------------------------------------------------
wrc@mymachine wrc $ su
Password:
root@mymachine wrc # /usr/X11R6/bin/xhost +localhost
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

/usr/X11R6/bin/xhost: unable to open display ":0.0"
root@mymachine wrc #
-----------------------------------------------------------------------------
root@mymachine wrc # /usr/local/bin/cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n
--------------------------------------------------------------------------------------------

root@mymachine wrc # su -
mymachine root # perl cfg-update -i
Can't open perl script "cfg-update": No such file or directory
mymachine root # cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server :0.0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n
-----------------------------------------------------------------------------------------------------
mymachine root # /usr/X11R6/bin/xhost +localhost
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

/usr/X11R6/bin/xhost: unable to open display ":0.0"
---------------------------------------------------------------------------------------------
mymachine root # export DISPLAY=localhost:0.0
mymachine root # cfg-update -i

(1/1)
Merge files: /etc/test <=> /etc/._cfg0000_test ? [y|n|q|?] y
Backup file: /etc/test -> /etc/test.old
Backup file: /etc/._cfg0000_test -> /etc/test.new
Open editor: xxdiff /etc/test /etc/._cfg0000_test
Xlib: connection to "localhost:0.0" refused by server
Xlib: No protocol specified

xxdiff: cannot connect to X server localhost:0.0
Delete file: /etc/._cfg0000_test ? [y|n|q|?] n
------------------------------------------------------------------------------

mymachine root # export DISPLAY=localhost:0.0
mymachine root # /usr/X11R6/bin/xhost +localhost
Xlib: connection to "localhost:0.0" refused by server
Xlib: No protocol specified

/usr/X11R6/bin/xhost: unable to open display "localhost:0.0"
-----------------------------------------------------------------------------------------
mymachine root # export PATH=PATH:/usr/local/bin:/usr/X11R6/bin
mymachine root # perl cfg-update -i
-bash: perl: command not found
-----------------------------------------------------------------------------------------
mymachine root # cfg-update -i
Can't exec "id": No such file or directory at /usr/local/bin/cfg-update line 210.
Use of uninitialized value in scalar chomp at /usr/local/bin/cfg-update line 211.
sh: line 1: cat: command not found
sh: line 1: grep: command not found
sh: line 1: env: command not found
sh: line 1: grep: command not found
Use of uninitialized value in numeric ne (!=) at /usr/local/bin/cfg-update line 78.
---------------------------------------------------------------------------------------------
mymachine root # /usr/local/bin/cfg-update -i
Can't exec "id": No such file or directory at /usr/local/bin/cfg-update line 210.
Use of uninitialized value in scalar chomp at /usr/local/bin/cfg-update line 211.
sh: line 1: cat: command not found
sh: line 1: grep: command not found
sh: line 1: env: command not found
sh: line 1: grep: command not found
Use of uninitialized value in numeric ne (!=) at /usr/local/bin/cfg-update line 78.

mymachine root #
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
lazarusrat
Guru
Guru


Joined: 17 Jul 2002
Posts: 305
Location: Lafayette, IN

PostPosted: Wed Oct 15, 2003 6:41 pm    Post subject: Reply with quote

Hm.
:oops: I left the $ out of this in my original post (edited now):
Code:
export PATH=$PATH:/usr/local/bin:/usr/X11R6/bin

But that's not necessary when you "su -" (since it found the command).
Do you have localhost set up as your hostname and/or defined in /etc/hosts?
_________________
obpiper: pipe menu generator for openbox
obtheme: pipe menu to switch openbox themes
Back to top
View user's profile Send private message
meowsqueak
Veteran
Veteran


Joined: 26 Aug 2003
Posts: 1549
Location: New Zealand

PostPosted: Wed Oct 15, 2003 7:03 pm    Post subject: Reply with quote

PLEASE, use 'sudo'!!!

These problems are all part of the fact that the root environment isn't set up to access your X server properly. If you use 'sudo', then your current X environment will be used, which *will* work.
Back to top
View user's profile Send private message
wrc1944
Advocate
Advocate


Joined: 15 Aug 2002
Posts: 2761
Location: Gainesville, Florida

PostPosted: Wed Oct 15, 2003 10:58 pm    Post subject: Reply with quote

I appreciate all the time you guys are spending trying to help me! I tried sudo, read the man sudo pages, but still can't understand what this has to do with the x-server not being invoked with cfg-update. I thought if I'm root, that would be it, and I could run anything. (I just came from Mandrake). Anyway, an example of how to use sudo in this particular case would be helpful. As user, when I type sudo, all I get is the options for usage.

Here's my /etc/hosts file- is there something wrong with it? I installed with dialup, with the live cd and knoppix cd, if that's relevant.

Thanks much,
wrc1944
----------------------------------------------------------------
# /etc/hosts: This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server. Just add the names, addresses
# and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

127.0.0.1 localhost
# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
--------------------------------------------------------
MY SUDOERS FILE:

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# User privilege specification
root ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
%wheel ALL=(ALL) ALL

# Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL

# Samples
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now

When I edited sudoers as instructed, but visudo brought up nano, not vi, so I used that. Can that be a problem? Isn't a file editor a just file editor?
_________________
Main box- Gigabyte GIGABYTE GA-990FXA-UD3 AM3+ rev.-4.0
Amd FX 8320, 3.5 GHz, 16GB GSkill DDR3 1866mhz
Samsung SATA 1000GB, Radeon HD 6570 2GB DDR3
Gentoo ~x86, ~amd64, glibc-2.19, gcc-4.9.0, kernel 3.15.5-gentoo (USE=experimental "native")
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Goto page 1, 2, 3, 4, 5, 6, 7, 8  Next
Page 1 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum