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'm new to Linux, and I'm interested in learning the bowels of Linux. I want to learn how the contents of system files are structured like, /usr/share/applications/defaults.list.

I want to open .html files with sublimetext instead of chrome. So I opened defaults.list with gedit and looked for lines with "html". I found things like:

text/html=sublime.desktop
application/xhtml_xml=google-chrome.desktop
application/xhtml+xml=firefox.desktop
text/xml=firefox.desktop;google-chrome.desktop

Now, I could guess what it all means, but I want to read what, for example, the following means:

What do the item before and after the / mean (e.g. text/html)?
What does "text" refer to, and what does "html" refer to? In the previous case,
it is easy to see html just refers to the extension .html, but what
about in the case of "xhtml+xml"? What does the "+" here do? Why not break
it into 2 lines? Finally, what does the semi-colon mean in
firefox.desktop;google-chrome.desktop?

As I said, my question is on two levels.

What do these mean in this particular case?

In general, where can I find the documentation for how system files are structured? Let's say I also want to understand how /etc/network/interfaces works - where would I get an authoritative documentation of this file, other than random googling and reading from forums?

share|improve this question

closed as not constructive by Uri Herrera, qbi, Ringtail, Jorge Castro, Eliah Kagan Jan 18 '13 at 23:59

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

    
3  
It is better to post separate questions instead of combining your questions into one. That way, it helps the people answering your question and also others hunting for at least one of your questions. Thanks! –  user25656 Jan 18 '13 at 18:06
    
Did you look at standards.freedesktop.org/desktop-entry-spec/latest ? It has a lot of useful information. –  user25656 Jan 18 '13 at 18:09
    
I would recommend closing this question and posting two separate questions. –  coteyr Jan 18 '13 at 18:20

1 Answer 1

Things like text/html are mime types used to specify how programs should interpret the file. These parts of your question are really more about web programming. For good introductions to these issues, see the free tutorials at W3C schools

For example, you will learn there that xhtml+xml forms a single mime type rather than listing two kinds of files. Text vs application refers to the content type. Again, this is to tell the program that opens it what to do. Both of these types have a text (i.e., not binary) file type.

As for how the setup of configuration files works in Ubuntu, the best thing to do is in fact to browse/search websites (in addition to AskUbuntu) such as:

Ubuntu Official Documentation

Ubuntu Community Pages

Gnome Documentation

There's a lot of moving parts in Ubuntu and Linux: the kernel, the window manager, the desktop manager, the package manager, and so on. Default settings and configuration files can get tricky and interact or override each other and the other's config files in unexpected ways.

For daily use, try to set defaults and system behaviour first through applications if you can rather than editing config files directly.

For learning how it all works at the deeper level, add to your list of websites things like:

Ubuntu App Developer

Gnome Developer Center

And of course, if you can afford it, there's no shortage of good books on system administration out there.

One thing that I learned early on is that you can really blow up your system when you experiment with these things. If you have the disk space, make a second install of Ubuntu for experimenting or run a second copy in VirtualBox or VMWare Player.

share|improve this answer

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