Results 1 to 6 of 6

Thread: start developing apps for ubuntu

  1. #1
    Join Date
    Oct 2008
    Beans
    4

    Thumbs down start developing apps for ubuntu

    Hi there,

    I want to develop apps for Ubuntu but I'm a little bit confused about the best practices doing it.

    1- where to store configuration: is there any folders used by convention to store configuration data, do we have something like registry in Windows?

    2- storing related data: do you recommend using database for that, e.g sqlite, or just store the data in files.

    3- storing temporary data, or any default paths I should know to develop good Ubuntu app,such as /usr/bin and so.

    thanks for helping me out.

  2. #2
    Join Date
    Nov 2009
    Location
    Gainesville, VA
    Beans
    459
    Distro
    Ubuntu Studio 12.04 Precise Pangolin

    Re: start developing apps for ubuntu

    Hi there,

    I would start here:

    http://www.debian.org/doc/manuals/de...kg_basics.html

    Point being, when you begin, you need to learn how to build .deb files (this is specific to Ubuntu and all other Debian based Linux distros...as opposed to .rpm)

    Give this a read and if you have questions after you've played around with it a bit, there are very knowledgeable folks in the Development section of these forums.

    Good Luck!

  3. #3
    Join Date
    Dec 2011
    Beans
    86

    Re: start developing apps for ubuntu

    I'm no expert, but to answer Q1, the folder used to store config data is
    Code:
    ~/.appname
    (~ is users /home/user/ dir, the "." is important as it makes it a hidden folder)

    This means that config data is a) can be different per user, b) each app has it's own folder for config.

    To view these folders in Nautilus, open your home folder and hit Ctrl+H (show hidden). You'll see all your apps config there.

  4. #4
    Join Date
    May 2008
    Location
    UK
    Beans
    1,451
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: start developing apps for ubuntu

    @aoken1 - when it comes to storing data - choose what ever is sensible. If you only ever store a few items - then flat files are fine. If you are storing something larger - then maybe an sql engine would be right.

    There are no hard and fast rules.
    Tony - Happy to try to help.
    Unless otherwise stated - all code posted by me is untested. Remember to Mark the Thread as Solved.
    Ubuntu user number # 24044 Projects : TimeWarp - on the fly Backups

  5. #5
    Join Date
    Oct 2008
    Beans
    4

    Re: start developing apps for ubuntu

    thanks for your help

    I wanted to develop a podcast client.
    I thought its good to store the episodes in Music directory,
    and the podcast : name,url and last fetch in a flat file- for all of the podcasts - in a hidden folder in home dir.

    is it OK?

  6. #6
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: start developing apps for ubuntu

    1. http://standards.freedesktop.org/bas...ec-latest.html - basically, configuration goes in $XDG_CONFIG_HOME/[program]/, or ~/.config/[program] if $XDG_CONFIG_HOME is empty.

    2. That depends entirely on what sort of data you are storing, what you want to do with it, and how much of it there is.

    3. http://en.wikipedia.org/wiki/Filesys...archy_Standard
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •