Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Its Been A Wile, bash problems...
Jim
post Jan 8 2005, 03:36 PM
Post #1


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Its been a while since I have asked a question in here, but here is my problem.

I recently decided to set up my gentoo system for graphical log in, I had just been using a text log in. Anyway, got it up and running, works well, except, now when I log in and start a terminal I get a wierd bash, not my normal one. I guess its not really the bash thats wierd, just the format. So I have to manually load my profile, how do I get it to do it automatically.

CODE
bash-2.05b$ source /etc/profile
jim@argento jim $


Also, I can't seem to run any programs in graphical mode as root. I get a bunch of errors. I don't know what the problem is.
CODE
jim@argento jim $ su
Password:
root@argento jim # emacs /etc/rc.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

root@argento jim # source /etc/profile
argento jim # emacs /etc/rc.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

emacs: Cannot connect to X server :0.0.
Check the DISPLAY environment variable or use `-d'.
Also use the `xhost' program to verify that it is set to permit
connections from your machine.

argento jim #


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jan 8 2005, 03:39 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



The easiest thing to do is just put:

source /etc/profile

In your home/username/.bash_profile


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jan 8 2005, 04:06 PM
Post #3


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Where?

CODE
# /etc/skel/.bash_profile:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bash_profile,v 1.10 2002/11/18 19:39:22 azarah Exp $

#This file is sourced by bash when you log in interactively.
[ -f ~/.bashrc ] && . ~/.bashrc


And did you see the second half or did I add that after you posted?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jan 8 2005, 04:58 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



You can put it at the bottom of the file ... after the:

[ -f ~/.bashrc ] && . ~/.bashrc

For your x issue ... do the command (as the user ... before you switch to root):

xhost +

Also ... if you want to run graphical items as root from another users shell, use the command:

su - root

instead of

su

su by itself doesn't change the environment variables, so you are running as root with jim's environment variables. You should limit su to times when you need to do things quickly like change file permissions and then exit back to the original user.

su - root actually logins in as root, and changes the environment variables to those for root ... you will be in root's home directory. This is the way you should normally switch to the root user...


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jan 8 2005, 05:12 PM
Post #5


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Both problems are still there. I can't runt graphically as root, and I get a funky looking bash. What else might be causing the ploblem?


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jan 8 2005, 05:33 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



it could be that your .bash_profile isn't being run at all ... so you aren't getting any environment variables.

I don't know what might cause that though ... are you booting into the graphical mode?

I don't have my Gentoo machine any more (well, I have the machine, but it is now CentOS-4), so this is from memory....but what happens if you remove your display manager from the default runlevel with a :

rc-update del gdm default

(and the same for xdm and kdm)

You should reboot into Character based mode...when you login are your terminals as they should be now?

can you startx as a user and as root?


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jan 8 2005, 06:11 PM
Post #7


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



ya I just did all that, everything works fine if I boot up in run level 3, its when I got to 5 that causes the problems. I don't know. I will screw with it more later tonight.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
Hemant
post Jan 8 2005, 06:12 PM
Post #8


RMS is my Hero
******

Group: Support Specialist
Posts: 782
Joined: 6-October 02
From: Trichy,INDIA
Member No.: 29



I think...for a non-login terminal .bashrc is loaded.Not .bash_profile.But what most of us do is..in the .bashrc we read the content of .bash_prfile.

And yes,hughesjr is correct..you can't just do a su and run graphical programs.I am not able to do that in FC-2.


--------------------
Hemant Kumar
user posted image
hemant@linuxhelp.net
Go to the top of the page
 
+Quote Post
Jim
post Jan 8 2005, 08:50 PM
Post #9


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



I have been doing su and running graphically in my terminals for as long as I can remember. I can go do it right now, I just can't do it when I switch to graphical log in. The problem is steaming from xdm and/or kdm I just don't know how or why.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post
hughesjr
post Jan 8 2005, 11:34 PM
Post #10


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



I'm not sure there is a runlevel 5 in Gentoo by default ... just 1 through 3 i think. (but I'm not positive ... i don't have an install to look at right now).


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
Jim
post Jan 9 2005, 12:42 AM
Post #11


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,280
Joined: 19-November 03
From: University of Minnesota- TC
Member No.: 1,828



Well what ever (six is reboot I know that) the point is, I only have these problems when I boot straight into graphical mode, when I boot to text mode then startx manually it doesn't give me these problems. I don't really want to waste a ton of time on this, I will just keep using text mode, but if I could figure it out that would be good.


--------------------
--Jim Lester
jim@linuxhelp.net

Distro: Gentoo
System: AMD Athlon 3000+ XP 2.166 GHz
NVIDIA nForce2 IGP Chipset
1GB 333 MHz DDR SDRAM
NVIDIA nForce2 Dual Head 64 MB Graphics

Server Distro: CentOS
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd October 2017 - 04:13 PM