LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Change default directory for 'open' and 'save' in KWrite? (https://www.linuxquestions.org/questions/linux-software-2/change-default-directory-for-open-and-save-in-kwrite-4175496682/)

qajaq 03-01-2014 07:06 PM

Change default directory for 'open' and 'save' in KWrite?
 
I've done a good deal of searching on-line and haven't found an answer to this, so I'm guessing it's either so blindingly obvious (and I'm blinded) that it doesn't need explaining, or it's so arcane that nobody has asked it yet.

I use KWrite as a scratch-pad fairly often, and when I open or save a file the program initially defaults to my home Documents directory (~/Documents) until I tell it otherwise. That's not the directory I ever use, and although it's not a huge undertaking to move to the desired directory, it would be nice to have the computer do that for me. (Why we invented computers, no? To do stuff for us?)

Is there any way to either (a) set a different default directory, or (b) change the program's behaviour to always open the last-used directory the first time after opening the program?

I'm using KWrite in Kubuntu 12.04.

frankbell 03-01-2014 08:44 PM

Settings-->Configure Editor-->Open/Save-->Advanced-->Prefix.

Entering the desired directory in there seems to work. I tested by entering "~/Documents" (which exists in my system), saved the change, and, upon clicking "Save" on a new document, Kwrite pointed right at ~/Documents. I exited the program, restarted it, and clicked "Open," and the "open" dialog pointed to ~/Documents.

qajaq 03-01-2014 08:59 PM

I may not have been clear: the ~/Documents directory is the built-in default that I want to over-write.

The place you entered "~/Documents" (Settings-->Configure Editor-->Open/Save-->Advanced-->Prefix) is a field that defines the prefix for back-up documents. I went there and added "/datalib/programming" (as I mostly use KWrite as a scratch-pad when writing scripts), closed KWrite then re-opened it, and clicked the "open file" icon. It still points initially to ~/Documents.

What I'm looking for is some way to have it open initially to my "/datalib/programming" directory.

frankbell 03-01-2014 09:45 PM

"Documents" was not my default in Kwrite, but I did only a quick test.

As for "/datalib/programming," did you try the full path (/[path-to]/datalib/programming)?

qajaq 03-01-2014 09:52 PM

Yes, /datalib/programming is the full path.

If ~/Documents isn't the default Open/Save directory on your system, had you earlier set it to something different? Or did your flavor of Linux apply a different default directory?

frankbell 03-02-2014 08:05 PM

I tested on Mageia, and I thought the default was the home directory, but looking at again I think I was just wrong. If I remember, tomorrow I will take a longer look at it.

My apologies for wasting your time.

frankbell 03-03-2014 01:26 PM

I think I found something.

Again, this is on Mageia 4, KDE 4.11.4. The Document Path is an overall KDE setting, not a Kwrite setting:

On the KDE menu, go to Computer-->System Settings-->Account Details-->Paths. That's where you can set the default path for documents, as well as for type of files.

I also managed to get to it under Konqueror on E17 (my normal file manager on that computer), but was unable to recreate how I did it, as it was buried deep under Go-->Applications--etc.

qajaq 03-04-2014 09:09 AM

Bingo! That did it -- Thank you!

frankbell 03-04-2014 08:13 PM

You're welcome. It was fun tracking it down--once I had tracked it down!

qajaq 03-04-2014 08:15 PM

H1! I know what you mean. Troubleshooting is frustrating when I'm doing it, but once I find the fix, the gratification outweighs all that gnashing of teeth.


All times are GMT -5. The time now is 12:27 PM.