LinuxQuestions.org
Review your favorite Linux distribution.
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 09-13-2010, 12:20 AM   #1
qweasd
Member
 
Registered: May 2010
Posts: 621

Rep: Reputation: Disabled
KDE decided that my home is in ~/Documents


Hi!

I will write ~ for the full path to my home directory, for brevity.

A few days ago my KDE session suddenly decided that my home is in ~/Documents. Unfortunately, I cannot pinpoint the reason. Text console and WindowMaker (via kdm) logins go into ~ as usual, but anything starting in KDE would be in Documents. I tested with Alt-F2 and starting programs via tried-and-true shortcuts. I do not use the folder Documents for anything, and even if I did, I don't understand why it has to be the default starting point for the shell. I went into System Settings, About Me, Paths (thanks Untitled_No4), and replaced Documents path ~/Documents with ~. Now KDE starts in ~. That alone is enough to convince me that it is a bug.

I noticed that konsole starts from ~ regardless of where you run it from, so I think that is how the bug may have crept in. I use xterm, which honestly starts in the current directory.

This post is a copy of the one I made in Ububtu forums overhere, where the same problem is described, but no clear solution or explanation is given. Let me know if you are having the same problem and how you deal with it.
 
Old 09-13-2010, 02:16 AM   #2
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
What KDE version are you running? It may not be too pertinent, but would help to cross-check against known-bugs. Also, have you tried logging in as root? Try booting into a lower runlevel, instead of a graphical login. Some more information would be useful in proceeding further.
 
Old 09-13-2010, 02:26 AM   #3
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

The thing you're talking about, "tilde-expansion", is strictly a function of the shell (e.g. "bash"), and not KDE.

HOWEVER:
It's possible that maybe your KDE environment is modifying your "$HOME" environment variable to "$HOME/Documents".

SUGGESTION:
1. Start KDE
2. Start a terminal session
3. Type "echo $HOME"
4. Type "echo ~"

If my theory is correct, then 3) and 4) should both say something like "/home/myname/Documents". At which point the easiest solution would probably be to "grep" through the KDE initialization files for "HOME" to see which one(s) might be overriding the default definition.

Here's a good link on tilde expansion:
http://linkroller.com/fullpage/ad/13...xpansion/tilde
 
Old 09-13-2010, 02:56 AM   #4
qweasd
Member
 
Registered: May 2010
Posts: 621

Original Poster
Rep: Reputation: Disabled
Thanks guys. I am running KDE 4.4.3 on 13.1 x64. Everything is very vanilla.

Sorry about the tilde confusion. Every time I wrote tilde above I literally meant /home/myname, I was just trying to be brief.

How about this, see if you can actually re-create it. Here is what I can do without even logging out of KDE. I just follow these steps and I get these results.

1. Remove /home/myname/.config/user-dirs.dirs , Alt-F2, type /usr/bin/xterm , Enter. It starts in /home/myname/Documents . echo $HOME says /home/myname .

2. System Settings / About Me / Paths / Documents path is set to /home/myname/Documents (default, I am assuming), change it to /home/myname , Apply, Do not Move. Start xterm just as before, it starts in /home/myname . echo $HOME says /home/myname . A file /home/myname/.config/user-dirs.dirs appears with a single line: XDG_DOCUMENTS_DIR="$HOME" .

3. Back in System Settings / About Me / Paths , hit Defaults (Documents path is set to /home/myname/Documents), Apply. Start xterm just as before, it starts in /home/myname/Documents . echo $HOME says /home/myname . File /home/myname/.config/user-dirs.dirs now says XDG_DOCUMENTS_DIR="$HOME/Documents".

4. Ooooh, here we go. Changing the Documents path to an existing directory makes that the current directory for KDE (programs start there). Changing it to a non-existing that is not Documents makes xterm start in /home/myname . And the best one: changing Documents path to /home/myname/Documents when the directory is missing makes xterm start in /home/myname/Documents , which actually dumps me into a non-existing path.

Note that this is not limited to xterm. I tried other programs, including non-shells such as gimp and a simple "/usr/bin/pwd > /tmp/pwd". It all checks out. This affects the starting location of Alt-F2 and all the existing shortcuts with empty work path.

But, I guess, no one will care, as KDE is already in 4.5.1. Anyway, my preferred work-around is to change the Document path to my actual home. It is because of wonders like these that I keep my actual documents where KDE cannot find them : )

Last edited by qweasd; 09-13-2010 at 03:25 AM. Reason: posted before finishing editing
 
Old 09-13-2010, 03:07 AM   #5
corbis_demon
Member
 
Registered: Jun 2004
Distribution: CLFS
Posts: 523

Rep: Reputation: 38
I thinks it's best if you know for sure this is a KDE problem. See if you can recreate this in another WM. Again, have you tried to log in as root? Also, have you got both /etc/profile and a $HOME/.bash_profile?
 
Old 09-13-2010, 03:30 AM   #6
Aquarius_Girl
Senior Member
 
Registered: Dec 2008
Posts: 4,731
Blog Entries: 29

Rep: Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940Reputation: 940
Quote:
Originally Posted by qweasd View Post
I noticed that konsole starts from ~ regardless of where you run it from, so I think that is how the bug may have crept in.
Konsole 2.3.1

Click on Settings and select Edit Current Profile...

In the first tab named General, see the 3rd text box named Initial directory !
Check what is written there in that text box !

Also there is a check box below it named Start in the same directory as the current tab.
See if that is checked ?

If that text box is blank and the check box is checked, and still the above problem of yours persists, then may God help you
 
  


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
gnome-terminal opens in ~/Documents when used in KDE krimsonking Linux - Software 2 08-17-2009 08:41 AM
Most recently used documents on KDE 3.5.7-1.fc6 Fedora powah Fedora 2 02-06-2009 08:05 AM
separate out documents/data and configuration files Home anillohchab007 Linux - Laptop and Netbook 7 11-03-2008 11:55 PM
How to make My Documents my home directory foxy123 SUSE / openSUSE 6 12-29-2004 02:49 PM
synchronizing My Documents with home - advisable? kenji1903 Linux - Networking 4 08-06-2004 02:19 AM

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

All times are GMT -5. The time now is 06:21 AM.

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