Thursday, May 9, 2024
4
rated 0 times [  4] [ 0]  / answers: 1 / hits: 1598  / 2 Years ago, wed, february 9, 2022, 5:47:36

Since Ubuntu one is no longer it appears that Sync between computers no longer works. Is there a new method to do this? I'd like to sync the apps from one machine to another.


More From » software-center

 Answers
2

I'm adding this as a new answer now that I have a better understanding of what the full requirements are.




  • Install SpiderOak, Copy, DropBox or some other file syncing software on all machines.

  • Set the software up on the source computer to sync a directory that here we'll refer to as '~/SyncDir'

  • Schedule a cron job to regularly (daily?) run the following: sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/SyncDir/packageList

  • On the target computer, use the following script to watch for changes in the package list as it gets synced:



    while true; do
    change=$(inotifywait -e close_write,moved_to,create .)
    change=${change#./ * }
    if [ "$change" = "packageList" ]; then sudo aptitude update && cat ~/SyncDir/packageList | xargs sudo aptitude install -y; fi
    done



That should do it. You could theoretically run both parts on all machines so that they would see each others changes as well but there might be some tweaks required to stop it from continually updating. you also may need to move the "sudo aptitude update && cat pkglist | xargs sudo aptitude install -y" section into a shell script rather that running it directly inside the 'watch' script.


[#25630] Thursday, February 10, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionverflow

Total Points: 500
Total Questions: 115
Total Answers: 120

Location: Northern Ireland
Member since Mon, Nov 14, 2022
2 Years ago
;