Discussion:
Possibly a org-mobile issue with checksums.dat
mobileorg-android+noreply-APn2wQcDVDSTkozuWdX9C6saSzDwuTk-Wk0tPN-/
2013-08-28 19:03:36 UTC
Permalink
I am trying to set up mobileorg over SSH. In order to maintain security I made a fresh low-privilege user on my (amd64 ubuntu) machine to hold the mobileorg files. Here are my env variables:

(setq org-mobile-directory "/home/user/mobileorg")
(setq org-directory "/home/user/mobileorg")
(setq org-mobile-inbox-for-pull "/home/user/mobileorg/inbox.org")

(permissions on this folder are all okay and everything writes properly)

However, if I do org-mobile-push running emacs23 as my regular user, it creates checksums.dat in the regular user home, instead of in the desired folder, and the hashes from the mobileorg directory are not present.

I tried setting this variable as well to no effect:
(setq org-mobile-checksum-files "/home/user/mobileorg/checksums.dat")


I also tried setting up this function I found to fix the directory problem (http://orgmode.org/w/?p=org-mode.git;a=blob_plain;f=lisp/org-mobile.el;hb=HEAD), but my elisp is not good; I couldn't make it work:

(defun org-mobile-write-checksums ()
"Create checksums for all files in `org-mobile-directory'.
The table of checksums is written to the file mobile-checksums."
(let ((sumfile (expand-file-name "checksums.dat" org-mobile-directory))
(files org-mobile-checksum-files)
entry file sum)
(with-temp-file sumfile
(set-buffer-file-coding-system 'undecided-unix nil)
(while (setq entry (pop files))
(setq file (car entry) sum (cdr entry))
(insert (format "%s %s\n" sum file))))))
mobileorg-android on behalf of Charles Philip Chan
2013-08-28 20:27:39 UTC
Permalink
Post by mobileorg-android+noreply-APn2wQcDVDSTkozuWdX9C6saSzDwuTk-Wk0tPN-/
However, if I do org-mobile-push running emacs23 as my regular user,
it creates checksums.dat in the regular user home, instead of in the
desired folder, and the hashes from the mobileorg directory are not
present.
Strange, I am doing the same thing with no problems. However, for
everything to work properly, I have to setup a new group for that
account, put myself in that group also and set the staging directory to
SGID. If that doesn't work for you, try upgrading your org-mode also.

Charles
--
"All language designers are arrogant. Goes with the territory..."
(By Larry Wall)
mobileorg-android+noreply-APn2wQcDVDSTkozuWdX9C6saSzDwuTk-Wk0tPN-/
2013-08-29 10:36:45 UTC
Permalink
Post by mobileorg-android on behalf of Charles Philip Chan
setup a new group for that
account, put myself in that group also and set the staging directory to
SGID.
That was definitely how I set it up, but it didn't seem to have any effect beyond enabling minimal sync to begin with.
Post by mobileorg-android on behalf of Charles Philip Chan
If that doesn't work for you, try upgrading your org-mode also.
Charles
Solved it.

Just in case, I updated org-mode through my package manager, with little change.

I tried starting over with the two files I am trying to sync--one simple .org file with plain text in a few levels, and one lightly tagged TODO list that was modified in mobileorg. Here are my new variables:

(setq org-mobile-directory "/home/user/mobileorg/out/")
(setq org-directory "/home/user/mobileorg/")
(setq org-mobile-inbox-for-pull "/home/user/mobileorg/in/inbox.org")
(setq org-mobile-checksum-files "/home/user/mobileorg/checksums.dat")

If the /mobileorg/ folder has any .org files in it, the checksums.dat file will not be generated. If the mobile-directory and org-directory are identical, the push command will declare the push a success because the files thus prepared are identical.

Just to be sure, is this a 'right' way to do it? I haven't seen any of this mentioned in any guides. I also have a ton of questions about the Agenda view, but that's for another time.
Loading...