Feature Request for Linux

The place to discuss the Linux/Ubuntu edition
Post Reply
MyWereld
Posts: 34
Joined: Tue Feb 15, 2011 7:42 pm

Feature Request for Linux

Post by MyWereld »

I would like to know if it would be possible to add a feature to the application?

Could you implement a feature that once the application start for the first time it will check for and create all the necessary user directories?
I can't remember how the Ubuntu installation handles this and if it is created by default with install, but it would be much easier to port to other distros if the application handled this by itself.

The reason being, I got a talking to for trying to use a script to create the needed directories automatically, they say it ain't ethical to meddle with a users home directory.

Honestly I cannot see the difference if the script creates the directories or if the software does, it is all the same to me...

It is not a huge deal, I now just have to put a warning at the end of installation telling users to do this on their own, but it would be a "nice" feature.

Tim
Site Admin
Posts: 1454
Joined: Sun Dec 07, 2008 1:14 pm

Re: Feature Request for Linux

Post by Tim »

The Bible Analyzer application does create the user folders. It creates a User/Documents/BibleAnalyzer folder if it doesn't exist and places the configuration and layout files there. If the user makes custom modules they go there also.

I have not found a way to use a .deb file to place anything in the User folder. A .deb is merely an archive and cannot determine the User folder, however the app can. You only have to copy files to the /usr/share folder (and the /etc folder if you want a menu entry)

There is no difference between an application writing to the user folder or a script if both require permission. Some "purists" just like to argue.

Try running Bible Analyzer on your distro without running any installation script. Just try to run the analyzer4.py file in the bibleanalyzer folder and see what happens. It should create the User folders
Tim Morton
Developer, Bible Analyzer

But to him that worketh not, but believeth on him that justifieth the ungodly, his faith is counted for righteousness. (Rom 4:5 AV)

MyWereld
Posts: 34
Joined: Tue Feb 15, 2011 7:42 pm

Re: Feature Request for Linux

Post by MyWereld »

Code: Select all

************ Starting Bible Analyzer *************
Traceback (most recent call last):
  File "/usr/share/bibleanalyzer/analyzer4.py", line 7, in <module>
    import utility
  File "/usr/share/bibleanalyzer/utility.py", line 21, in <module>
    os.mkdir(homeUserDir)
OSError: [Errno 2] No such file or directory: '/home/testing/Documents/BibleAnalyzer'

Press Enter to close terminal
Bible Analyzer is expecting to find the Documents folder ( /home[user]/Documents ) before creating the BibleAnalyzer folder.
On the more advanced distros like Slackware, Gentoo, Arch and a couple of others you are presented with an empty home directory, unlike Ubuntu that populates this with Documents, Public, Videos, etc.

So if the user did not create the Documents folder himself by chance, Bible Analyzer will exit with the above error.

I'm not sure how Mandriva and SuSE handles this, but if you could just ask the program to create both the dirs, Documents AND BibleAnalyzer should the former not be found.

Enjoy your day, and may you experience the Lord's blessing on your life for devoting so much time to this project.
;)

Post Reply