Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I sometimes browse erotic media files, and I have some of them stored in my hard drive. All said content is saved in one specific folder.

Is there a way I can block this folder from Gnome and/or Unity search?

I've heard 'use a separate user', but that won't work, as the files will still be in my hdd, plus; I often browse said files and work at the same time (kinda... lol).

So, in short, I want to block (blacklist) a certain folder from Dash.

Its bad enough that I don't like gnome3 or the unity interface, I want to like gnome3, but this little thing is really a big deal to me.

Hope I can get some help here.

EDIT: I seem to have successfully blacklisted the folder I wanted to blacklist, and somehow managed to delete the (previous to blacklisting) "recently used" files.

I've entered so much crap into terminal, and installed so much stuff that I actually don't know what the trick was. So, I plan on:

  • Formatting my machine (as I always do when a new version is out)
  • Reinstall Ubuntu 11.10 i386 (I own a 64bit machine, and 4gb of ram, but in my experience, software, like wine, has trouble working on 64bits, so, I'll keep working with 3.8GB instead of 4 for now).
  • Install the Gnome3 environment.
  • Find out exactly what it is that is needed to be done.
  • Update this very question with a full, appropriate answer.

Thanks to the next linked (related) Q&A's, that in some way helped me out; and I haven't got a clue which one was the ultimate answer for Ubuntu Unity/Gnome3 11.10 (as some of this were answered for 11.04, in which, I used ubuntu classic login):

share|improve this question
1  
Have you tried this and it doesn't work? askubuntu.com/questions/29559/… –  Jorge Castro Oct 18 '11 at 3:27
3  
I sometimes browse erotic media files <-- Appreciate the honesty –  Manish Sinha Oct 18 '11 at 4:42
    
@JorgeCastro Yeah, ive tried that. Plus, thats not my issue. I mean, the problem aint the "recently accessed files" (id also rather lose that function all around too), but if i do a search for "hardware" (lets say I wanna check out my hardware sensors), as I type, "hard", I can see the app i wanna launch, and you can take a guess at what else I am shown, LOL. I actually made my question because that solution didnt work. Plus, I dont have the "blacklist" plugin... dunno where to get it either. –  Paolo Sanchez Oct 18 '11 at 18:26
    
Ok if you try something then you need to put that you tried it in the question, otherwise we have nothing to go on! –  Jorge Castro Oct 18 '11 at 18:29
    
Sorry bro. Tried it. I googled everything; and that blacklisting thing looks promising... Id kinda like to try it out, but couldnt find out how to download (or where) the plugin. Plus, now, if I go to prefs in activity journal, nothing is displayed anymore. Is the fact that I log in to Gnome instead of Unity relevant? –  Paolo Sanchez Oct 18 '11 at 18:30

5 Answers 5

up vote 2 down vote accepted

OK, so; I formatted my HDD again, just to start from scratch again. Here's the whole story:

After successfully installing Ubuntu 11.10 i386 on my Lenovo T400 ThinkPad;

  1. Install dependencies (needed for Google Chrome and Gnome Shell)

    sudo apt-get -f install
    
  2. Install Gnome Shell

    sudo apt-get install gnome-shell
    
  3. Install Gnome Tweak Tool

    sudo apt-get install gnome-tweak-tool
    

    Once installed, it should show up as "Advanced Settings" in the menu.

  4. Optional Install Gnome Contacts

    Note: not included in Ubuntu, but somehow shows some contacts in DASH as search results; but won't open anything when clicked, unless you install this.

    sudo apt-get install gnome-contacts
    
  5. Optional Install Gnome Sushi (a MacOS X'-ish spacebar file previewer)

    sudo apt-get install gnome-sushi
    

Here's the important part, as of now, if I dare search "hard"... I'll get a mixed bag from hardware apps to other kind of hard stuff I wouldn't want to be shown in there.

So, let's install Activity Log Manager:

  • Install Activity Log Manager

    sudo add-apt-repository ppa:zeitgeist/ppa
    sudo apt-get update
    sudo apt-get install activity-log-manager
    

After this, I added "the folder" to the "pseudo-blacklist", and no luck. That's because this would only block it out of the Activity Log. Not Dash, and not search.

This one is nothing but the GUI for Zeitgeist.

At this point; nothing has happened. Dash still shows whatever I'd browsed before, and whatever I browse now, will show.

  • Remove the "recently used" file, and turn it into a folder (right?)

    rm ~/.local/share/recently-used.xbel
    mkdir ~/.local/share/recently-used.xbel
    

After this last step; Dash won't shoe your previously browsed files, and, won't show your new browes files, plus, activity log manager won't be tracking whatever you set it to. No more "Recently opened" section in Dash, and now the beautiful Activity Journal will actually be useful!

Done! This actually worked for me, at least has until now (just a couple of hours), hopefully, it'll stay that way. If it stops working, I suppose I'll let you know.

Apparently, Sean Houlihane was right, thanks man.

share|improve this answer
    
Instead of making /.local/share/recently-used.xbel unuseable, you can use the blacklist manager ssokolow.com/gtk-recent-scrubber –  Bazon Aug 4 '12 at 8:56

There DOES need to be an easy method of doing PRECISELY this.

I review 'questionable' content, as part of my job (information security).

I see NO need for a graphic sneak-peak for all RECENT image files, or even ALL recent files.

THIS should actually be a opt-in application, with ONLY this folders (and sub-folders) indexed and presented. This should also provide multiple contexts. eg. development, home/private, business.

If we are still allowing to organize their folders and files, then we need to be able to control how these files are accessed or remembered.

I adapted a solution from the other posted question:

How can I keep recent files from appearing in Unity?

share|improve this answer

I'm fairly sure that installing ActivityLogManager and persuading it not to index specific files (you may have to delete the existing index) will stop any files showing up in the search. Seems to work for me, but I don't remember the precise detail of what I did. Check that activity log has no entries, check ActivityLogManager is not keeping track, and see if the problem is still there.

share|improve this answer
    
Yeah, that is what most likely worked. But still, I'm kinda skeptic about it, so, as I said on my recent edit; I'll start from the beginning this weekend and I'll post the complete solution. As I've seen a couple people with the same (and/or similar) problem. –  Paolo Sanchez Oct 18 '11 at 19:23

I think the most prudent action to take would be to follow the steps listed below.

  1. Rename the directory to something non-erotic
  2. Change the permissions on the folder so only root can actually read the files. This is done with the following command:

    sudo chmod -r /path/to/folder
    

That way the files inside won't be even readable by the indexer. However, it would be useful to find out how to flush the current index cache.

Needless to say, to access the files you will need to run whatever application you use to open them with root priviledges (i.e. with sudo appname /path/to/file), which should be considered as a plus.

Not that I have done this, I don't see a need in downloading such sort of content.

share|improve this answer

Why don't you keep your private files in a hidden folder? You make a hidden folder by giving it a name that starts with a period (.) For example: .mystuff

You can see these folders by pressing ctrl+H, or by going to View > Show hidden files in the Nautilus menu. (I guess those are the words in English)

Gnome shouldn't display the content in those folders.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.