LinuxQuestions.org
Visit Jeremy's Blog.
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 02-04-2011, 09:45 AM   #1
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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
 
Old 02-04-2011, 04:09 PM   #2
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Rep: Reputation: 7
does it do that with the root? or only that user?

show us your ~/.bashrc ~/.bash_profile ~/.profile if your have them.
 
Old 02-04-2011, 04:17 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Original Poster
Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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
 
Old 02-04-2011, 04:20 PM   #4
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Rep: Reputation: 7
sounds like a /etc/profile problem.
whats that look like?
 
Old 02-04-2011, 04:26 PM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Original Poster
Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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
 
Old 02-04-2011, 04:51 PM   #6
ewsmith
Member
 
Registered: Oct 2010
Location: Weesatche, Texas
Distribution: Slackware
Posts: 72

Rep: Reputation: 7
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.
 
Old 02-05-2011, 12:34 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,517

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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/"
 
1 members found this post helpful.
Old 02-05-2011, 12:45 AM   #8
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Is it possible that you did something like this screenshot?
Attached Thumbnails
Click image for larger version

Name:	Screenshot-19.png
Views:	25
Size:	227.1 KB
ID:	6060  
 
Old 02-05-2011, 12:54 AM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I think that it has to be problem with title, because when I cd to Documents it looks like this.
Attached Thumbnails
Click image for larger version

Name:	Screenshot-20.jpg
Views:	21
Size:	32.3 KB
ID:	6062  
 
Old 02-05-2011, 01:14 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Original Poster
Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
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
 
Old 02-05-2011, 01:18 AM   #11
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
Are you using KDE?
 
Old 02-05-2011, 01:24 AM   #12
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Original Poster
Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Originally Posted by qweasd View Post
Are you using KDE?
Yes
 
Old 02-05-2011, 01:31 AM   #13
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
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.

Last edited by qweasd; 02-05-2011 at 01:32 AM. Reason: typo
 
Old 02-05-2011, 01:40 AM   #14
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
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)?
 
Old 02-05-2011, 01:45 AM   #15
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

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


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
xterm does not open in home folder, instead opens in Documents folder hsiu Linux - Desktop 5 01-16-2011 08:35 AM
gnome-terminal opens in ~/Documents when used in KDE krimsonking Linux - Software 2 08-17-2009 08:41 AM
Terminal opens on start up with PCLOS 09 skinheadwilli Linux - Newbie 1 07-05-2009 08:44 AM
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Terminal opens to ~/Desktop General Linux - Software 1 11-05-2005 05:00 PM

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

All times are GMT -5. The time now is 06:52 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