LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-19-2005, 10:29 PM   #1
securitybreach
Member
 
Registered: Jan 2005
Location: In front of my computers, USA
Distribution: Archlinux 64
Posts: 100

Rep: Reputation: 16
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
 
Old 06-20-2005, 02:16 AM   #2
cathectic
Member
 
Registered: Sep 2004
Location: UK, Europe
Distribution: Slackware64
Posts: 761

Rep: Reputation: 35
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).
 
Old 06-20-2005, 05:22 PM   #3
securitybreach
Member
 
Registered: Jan 2005
Location: In front of my computers, USA
Distribution: Archlinux 64
Posts: 100

Original Poster
Rep: Reputation: 16
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.

Last edited by securitybreach; 06-20-2005 at 05:24 PM.
 
Old 06-20-2005, 05:43 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

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

egag
 
Old 06-26-2005, 01:10 PM   #5
securitybreach
Member
 
Registered: Jan 2005
Location: In front of my computers, USA
Distribution: Archlinux 64
Posts: 100

Original Poster
Rep: Reputation: 16
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.

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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 02:45 PM
Newb Help (installing, terminal, errors) skorch Linux - Newbie 3 07-12-2005 12:34 PM
using FTP through the terminal, uploading errors fatrandy13 Linux - Software 3 07-06-2004 05:42 PM
gnome-terminal profile errors Dancingsalad Linux - General 0 05-09-2004 12:37 AM
Need help! Prism2 wireless card stops working, floods terminal with errors Electrode Linux - Wireless Networking 6 02-05-2003 10:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration