LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 05-03-2013, 08:21 AM   #1
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Rep: Reputation: 36
XFCE4, Wheezy, Open Dialog


I use debian wheezy and xfce4. I want to make it so that whenever I open a file from inside some editor (gedit for example) I'm presented with my home folder in the 'Open' dialog. Currently when I try to open a file and sometimes even when I'm saving a file, I get a dialog that shows me 'Recently Used'. I find this a waste of time since I usually save new files in the home directory and then move them somewhere after I'm done with them. The current setup requires an extra step where I physically change the displayed directory in the dialog to 'Home'.

So, the short version, how can I change the default 'Open' location from 'Recently Used' to 'Home' (so that it always opens by default to 'Home'). Is there even a way??
 
Old 05-04-2013, 03:33 AM   #2
jdkaye
Senior Member
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 4,767

Rep: Reputation: Disabled
I use KDE rather than xfce4. I can't replicate your problem. Whenever I save a file with, say, kate, libreoffice or kwrite I'm always offered the folder in which I opened the file. If I open a file in ~/Documents then it will save any changes to ~/Documents. If I open a file (as root or using sudo) from /etc/apt then it will save changes to /etc/apt unless I explicitly tell it otherwise.
Quote:
So, the short version, how can I change the default 'Open' location from 'Recently Used' to 'Home' (so that it always opens by default to 'Home'). Is there even a way??
On the above named apps "Open" and "(Open) Recent Documents" are distinct menu items in the File menu. I'm quite surprised that XFCE works so differently. On my system "Open" defaults to ~/Documents but I can change that if I wish.
jdk

Last edited by jdkaye; 05-04-2013 at 03:34 AM.
 
Old 05-04-2013, 04:00 AM   #3
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,411

Rep: Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794
I have been googling around and the program which handles opening and saving files seems to be GTKFileChooser. Sadly the only settings for this appear to be in .config/gtk-2.0/gtkfilechooser.ini and there doesn't seem to be anything or any consequence you can change.
Well, there is an XML file under /etc/ too but I took a look at part of the source for gtkfilechooser and there doesn't seem to be a mechanism for passing a folder to open as default.
 
Old 05-04-2013, 06:45 AM   #4
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Original Poster
Rep: Reputation: 36
this is a discussion of the same thing. Thank you 273. There is no good solution though.

http://askubuntu.com/questions/63202...chooser-dialog
 
Old 06-07-2013, 12:14 PM   #5
mrider
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian
Posts: 22

Rep: Reputation: 1
[ rant mode on ]
Gadzooks what an obnoxious choice the Gnome devs have made! No doubt if someone were to ask them why "Recently Used" is the only default possible, they'd answer "Because **** you, that's why". I love XFCE, but I swear, I'm tempted to try a different environment because of this. If any of the XFCE developers are looking at this forum - I'd suggest tweaking the Gnome source such that there's a simple way around this. It's awful!
[ rant mode off ]

I don't have a "solution", but I found a tweak that makes this more livable, at least in Debian Wheezy...

Open ~/.local/share/recently-used.xbel for edit. Tweak the entries so that places you normally will save are part of the "Recently Used" list for the applications you are interested in, and remove EVERYTHING else. For example, my recently-used.xbel looks like this:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<xbel version="1.0"
      xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
      xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
>
  <bookmark href="file:///home/mrider/Documents/" added="2013-06-07T16:47:28Z" modified="2013-06-07T16:47:28Z" visited="2013-06-07T16:47:28Z">
    <info>
      <metadata owner="http://freedesktop.org">
        <mime:mime-type type="text/plain"/>
        <bookmark:applications>
          <bookmark:application name="scite" exec="&apos;scite %u&apos;" modified="2013-06-07T16:47:28Z" count="1"/>
        </bookmark:applications>
      </metadata>
    </info>
  </bookmark>
  <bookmark href="file:///home/mrider/Documents/Source" added="2013-06-07T16:47:28Z" modified="2013-06-07T16:47:28Z" visited="2013-06-07T16:47:28Z">
    <info>
      <metadata owner="http://freedesktop.org">
        <mime:mime-type type="text/plain"/>
        <bookmark:applications>
          <bookmark:application name="scite" exec="&apos;scite %u&apos;" modified="2013-06-07T16:47:28Z" count="1"/>
        </bookmark:applications>
      </metadata>
    </info>
  </bookmark>
</xbel>
That ensures that for me "~/Documents" and "~/Documents/Source" are the only things in "Recently Used". And since those are directories, I can quickly click one and get to the directory I want.

But, unfortunately, that isn't enough for the Gnome folks - oh no. I tried setting the file owner to root and the file permissions to 444, and even that didn't keep it from being written. Apparently the Gnome process which is owned by root writes that file. Which means that the desktop can overwrite the file no matter what you do.

So to finalize it, I wrote a quick Perl script that nukes the file from orbit and puts in what I want, and only what I want. I then put a application starter link on my desktop (so I can run it on demand), and also in my startup group (so it starts clean) that runs my script.



I would LOVE to find a better solution though. Man this is annoying!

[edit] I'm considering adding a cron job that checks the file periodically and nukes it automatically. Haven't done that yet though.

Last edited by mrider; 06-07-2013 at 12:24 PM. Reason: Oops! My edit went to the wrong place. :(
 
1 members found this post helpful.
Old 06-07-2013, 12:24 PM   #6
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,411

Rep: Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794
Thanks for the hint, I'll look at that file.
Might setting the immutable bit work instead of changing the permissions?
 
1 members found this post helpful.
Old 06-07-2013, 12:33 PM   #7
mrider
LQ Newbie
 
Registered: Oct 2006
Distribution: Debian
Posts: 22

Rep: Reputation: 1
I didn't think of that, but on my system at least, all that did was make the list blank but left me in that choice. So for me at least, that isn't an improvement. Although it does appear as if it blocks writes.


[edit] I take that back, that worked perfectly. I had goofed up my file when I was copy/pasting it here such that the two entries didn't work. It wasn't the chattr that caused it at all.

Good suggestion!! Thanks!

Last edited by mrider; 06-07-2013 at 12:43 PM.
 
Old 06-07-2013, 12:50 PM   #8
273
Senior Member
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 3,411

Rep: Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794
Quote:
Originally Posted by mrider View Post
Good suggestion!! Thanks!
You're welcome. Now you've tested it out on your system I may tinker with mine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
open box run dialog mreff555 Linux - Newbie 1 08-26-2012 12:09 PM
[SOLVED] synaptics touchpad and vertical scrolling doesn't work - xfce4, wheezy radiodee1 Debian 7 12-21-2011 03:25 PM
[SOLVED] change the mouse cursor color from black to white on wheezy with XFCE4 cccc Debian 3 10-06-2011 08:36 AM
Customizing GNOME shutdown dialog in Debian (wheezy) vertevero Debian 1 08-31-2011 10:28 AM
Programs in Xfce4 freeze during save file dialog boxes Dswissmiss Linux - Software 0 11-12-2006 04:07 PM


All times are GMT -5. The time now is 12:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration