LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   terminal errors (https://www.linuxquestions.org/questions/slackware-14/terminal-errors-335299/)

securitybreach 06-19-2005 10:29 PM

terminal errors
 
I have Slackware 10.1 and whenever I start aterm, I get the following at my prompt.
Code:

declare -x CLASSPATH="./:/opt/java/classes"
declare -x COLORFGBG="15;default"
declare -x COLORTERM="rxvt-xpm"
declare -x DESKTOP_SESSION="fluxbox-desk"
declare -x DIR_SEPARATOR="/"
declare -x DISPLAY=":0.0"
declare -x DM_CONTROL="/var/run/xdmctl"
declare -x GDK_USE_XFT="1"
declare -x HOME="/home/secure"
declare -x HOSTNAME="UNIX"
declare -x INPUTRC="/etc/inputrc"
declare -x JAVADIR="/opt/java"
declare -x JAVA_HOME="/opt/java/jre"
declare -x JCLIENT="/opt/java/jre/bin/java -client "
declare -x JCOMP="/opt/java/jre/bin/javac -d . "
declare -x JSERVER="/opt/java/jre/bin/java -server "
declare -x LANG="en_US"
declare -x LC_COLLATE="C"
declare -x LD_LIBRARY_PATH=":/usr/lib/qt/lib"
declare -x LESS="-M"
declare -x LESSOPEN="|lesspipe.sh %s"
declare -x LOGNAME="secure"
declare -x LS_COLORS=""
declare -x LS_OPTIONS=" --color=auto -F -b -T 0"
declare -x MANPATH="/usr/local/man:/usr/man:/usr/X11R6/man:/usr/lib/qt/doc/man"
declare -x MINICOM="-c on"
declare -x OLDPWD
declare -x PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/opt/bin:/usr/local                              /games:/opt/java/bin:/opt/java/jre/bin:/opt/kde/bin:/usr/lib/qt/bin:."
declare -x PATH_SEPARATOR=":"
declare -x PWD="/home/secure"
secure:$

Also, whenever I run a program as su from terminal, I get this error:
[/code]root:# firefox
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key

(firefox-bin:1813): Gtk-WARNING **: cannot open display:[/CODE]

I am not for sure what I did. If anyone knows whats going on, I would appreciate it.
It was working fine and now I get the Xlib error and have to add xhost +localhost
now. How can I fix this? Thanx

cathectic 06-20-2005 02:16 AM

Code:

Also, whenever I run a program as su from terminal
When you say "a program", I assume you mean a program that requires an X server? Under Slackware 10.1 (although it may be related to the X.Org version used), only the user who started the X server can connect to it. To allow anyone else to, you have to muck about with the xhost allow and deny, IIRC (but I never had much luck/incentive in getting it working).

securitybreach 06-20-2005 05:22 PM

Heres my echo $PS2 :
Code:

secure:$ echo $PS1
\[\033[1;36m\]\h:/\w\[\033[0;39m\]\n\u:\$


Heres my .bashrc
Code:

# .bashrc
# sourced by BASH everytime it start
# Set various environment variables

## These should be set by /etc/profile
## But sometime, bash missed them. So here is the push
export
PATH="/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/X11/bin:/usr/local/games:/usr/$
for SH in /etc/profile.d/*.sh; do
  . $SH
done

## Set a default shell prompt:
## A complete one
#PS1="${PS_CYAN}\h:/\w\n${PS_NORMAL}\u:\\$ "
#PS2="> "

## Standard with color
## This is the plain standard prompt
#PS1="${PS_DGREEN}\u${PS_YELLOW}@${PS_DGREEN}\h:\\$ ${PS_NORMAL}"
#PS2="> "

## This is the plain standard prompt
#PS1="\u@\h:\\$ "
#PS2="> "


I couldnt find the .bash_profile though. I created another user and dont the garbage at the top of aterm until I su to root then I get the garbage file again.

I think the localhost problem has to do with the first problem because I didnt get an error before.

egag 06-20-2005 05:43 PM

to allow " user_su-ed_to_root " to use the X-screen,
just type " $xhost + "
( as the user... )

egag

securitybreach 06-26-2005 01:10 PM

It happened after I removed the recently used programs list from showing on the top of the aterm using the directions JohnB316 posted here: http://www.vectorlinux.com/forum/vie...839&highlight=

I have since went through the post and it works fine now. I only messed with the /home/user/.bashrc and not the root .bashrc. :eek:

After I changed the root/.bashrc file to
Code:

## This is the plain standard prompt
PS1="\u@\h:\\$ "
PS2="> "

I was playing around with a couple of files so that may have not been the entire problem
Atleast its fixed though.


I also found the fix for the running as root in Slackware
Code:

root:# firefox
Xlib: connection to ":0.0" refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
(firefox-bin:1813): Gtk-WARNING **: cannot open display:

Originally posted by slackie1000
Quote:

hi there,

something called "xhost +" ...
you need to be allowed to export the display...
before su do the following
Code:

xhost +
and after su...
Code:

export DISPLAY=$HOST:0.0

http://www.linuxquestions.org/questions/history/326868

The problem is I lose the settings upon reboot. Anyone know how this can be autorun preferably in fluxbox?


All times are GMT -5. The time now is 03:08 PM.