The unix file structure developed over decades, and has withstood the test of time pretty well, for a large variety of uses - servers, computer pools, home desktops, and more. But for new users it can be confusing - "What exactly is a /var? What's /usr, I am the user, so do I put my stuff there? And why can't I write into that directory? Linux is so hard!" The answer is, of course, if you don't know about it, you probably don't need to do anything there, or even know it exists. Default Breezy already makes going outside the boundaries of the /home/ directory mostly unnecessary. But some people, even new users, like exploring, and are used from other operating systems to start at the top of the structure. So the next time you set up a Ubuntu install for inexperienced users, consider the following:
1. Open a terminal and execut "ls -1 / | sudo tee /.hidden"
2. Do "sudo chmod a+r .hidden"
3. If you want all standard files hidden, skip to 5. Otherwise. open the file with "sudo gedit /.hidden".
4. Remove every directory you don't want to hide from the file. Here's how mine looks like, as an example:
5. Now, let's create some entries that are easier for new users: select "home" and create a link to link to it (for example, by dragging it and holding <ctrl>+<shift>. Your mouse cursor should show two linked circles when dragging while holding them, if they do you're creating a link). Rename that link to "User Data" or something similar. Do the same with media; rename it to "Drives" or "Media" or what you want. (If the files are already hidden. show them with <ctrl>-<h>.)Code:bin boot opt usr etc sys tmp srv proc root sbin lib lost+found mnt initrd dev debootstrap var cdrom initrd.img initrd.img.old vmlinuz vmlinuz.old home media
6. If you want to have a discoverable way to some or all of the now hidden files, create a folder called "System Data". Create links to all the other files and directories there.
7. You're done!Update an open Nautilus with <ctrl>-<r>, or restart it with "killall nautilus".
I attached a screenshot of how it looks like.
Now, some anticipated FAQs:
Q: Won't this royally screw my system?
A: I see no reson why it should. Everything is still in it's original place, only no longer visible by default. It definitely works fine here and on several other Ubuntu installations.
Q: Are there any negative side effects?
A: Not that I know of. From the command line, everything stays the same. If you encounter any problem, please tell me!
Q: I want to access one of the hidden folders. How do I do that?
A: View -> Show Hidden Files. Or press <ctrl>-h
Q: I don't like this! How can I undo it?
A: Simple, just remove the .hidden file. Delete the links you created in step 5 and 6 if you want, or leave them there. Just make sure you don't accidentally delete the original folders.
Q: Can I have all the files shown automatically if I have a sudo'd nautilus?
A: Certainly. Make sure that the .hidden file is owned by root (should be automatically), then, in the permissions tab, disallow read access for the owner.
Q: Can I do that .hidden stuff in other directories too?
A: Yes. It's a pretty cool feature.
Q: Are there any limitations to this?
A: Yes, the file selector (ie open dialog) will still show all the files. The .hidden file currently only applies to Nautilus.



Adv Reply





Bookmarks