LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Terminal opens in Documents (https://www.linuxquestions.org/questions/slackware-14/terminal-opens-in-documents-860708/)

repo 02-04-2011 09:45 AM

Terminal opens in Documents
 
I'm using slackware current, when I open a terminal, it opens in Documents.
Code:

repo@cannabis Documents]$
Can this be changed, so it opens in the root from my home directory?


Thanks

ewsmith 02-04-2011 04:09 PM

does it do that with the root? or only that user?

show us your ~/.bashrc ~/.bash_profile ~/.profile if your have them.

repo 02-04-2011 04:17 PM

For every user, when I open a terminal.
Seems to me it started after the latest update from current.
Quote:

repo@cannabis Documents]$ cat ~/.bashrc
PS1="\[\u@\h \W]$ "
repo@cannabis Documents]$
Kind regards

ewsmith 02-04-2011 04:20 PM

sounds like a /etc/profile problem.
whats that look like?

repo 02-04-2011 04:26 PM

Here you go:

Code:

export MINICOM="-c on"
export MANPATH=/usr/local/man:/usr/man
export HOSTNAME="`cat /etc/HOSTNAME`"
export LESSOPEN="|lesspipe.sh %s"
export LESS="-M"

if [ ! -r "$HOME/.inputrc" ]; then
  export INPUTRC=/etc/inputrc
fi

PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"

if [ "`id -u`" = "0" ]; then
  echo $PATH | grep /usr/local/sbin 1> /dev/null 2> /dev/null
  if [ ! $? = 0 ]; then
    PATH=/usr/local/sbin:/usr/sbin:/sbin:$PATH
  fi
fi

if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then
 TERM=linux
fi

if [ "$SHELL" = "/bin/ksh" ]; then
  VISUAL=emacs
fi

if [ "$SHELL" = "/bin/pdksh" ]; then
 PS1='! $ '
elif [ "$SHELL" = "/bin/ksh" ]; then
 PS1='! ${PWD/#$HOME/~}$ '
elif [ "$SHELL" = "/bin/zsh" ]; then
 PS1='%n@%m:%~%# '
elif [ "$SHELL" = "/bin/ash" ]; then
 PS1='$ '
else
 PS1='\u@\h:\w\$ '
fi
PS2='> '
export PATH DISPLAY LESS TERM PS1 PS2

umask 022

if [ -x /usr/bin/biff ]; then
 biff y 2> /dev/null
fi

for profile_script in /etc/profile.d/*.sh ; do
  if [ -x $profile_script ]; then
    . $profile_script
  fi
done
unset profile_script

if [ ! "`id -u`" = "0" ]; then
 PATH="$PATH:."
fi


ewsmith 02-04-2011 04:51 PM

i don't know what is changing it. i though you would have a cd statement in one of the startup scripts. you can add one to /etc/profile or ~/.bashrc fix it until what causes it is discovered. i am very curious about what else could cause it.

knudfl 02-05-2011 12:34 AM

I don't remember any problems in "-current" with this issue.
But it appears often in other Linux OS.
Could it be, that you have the hidden file /home/repo/.local/user-dirs.dirs ?
I think it will ( sometimes ? ) override the other settings.
Code:

XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Documents/Downloads"
XDG_TEMPLATES_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Documents/Music"
XDG_PICTURES_DIR="$HOME/"
XDG_VIDEOS_DIR="$HOME/"


EDDY1 02-05-2011 12:45 AM

1 Attachment(s)
Is it possible that you did something like this screenshot?

EDDY1 02-05-2011 12:54 AM

1 Attachment(s)
I think that it has to be problem with title, because when I cd to Documents it looks like this.

repo 02-05-2011 01:14 AM

Thank you all for answering

@EDDY1, there is no title set in the terminal
@knudfl, the file at my system is
Quote:

/home/repo/.config/user-dirs.dirs
I renamed the file, but no go
I used the workaround from ewsmith, adding a cd command to .bashrc, which solved the problem,
but still curious if there isn't another way to do this.

Kind regards

qweasd 02-05-2011 01:18 AM

Are you using KDE?

repo 02-05-2011 01:24 AM

Quote:

Originally Posted by qweasd (Post 4248909)
Are you using KDE?

Yes

qweasd 02-05-2011 01:31 AM

In System Settings, About Me, Paths, see what is your Documents path. If it's ~/Documents, try making it your home. Careful, it may offer to move files.

Smokey_justme 02-05-2011 01:40 AM

There's a number of possibilities (and a huge number of files) for something like this to happen.

First of all can you tell me what are you using for your teminal. Are you using "konsole", "xterm", "xconsole" or do you mean an actual terminal (by pressing CTRL + ALT +F[1-6] keys from the KDE desktop)?

repo 02-05-2011 01:45 AM

Quote:

In System Settings, About Me, Paths, see what is your Documents path. If it's ~/Documents, try making it your home. Careful, it may offer to move files.
If I change it to
Quote:

/home/repo
The terminal opens in
Quote:

/home/repo/
However, seems to me this could break other things.
The problem doesn't appear in xfce.

Kind regards


All times are GMT -5. The time now is 07:23 PM.