Suramya's Blog : Welcome to my crazy life…

March 7, 2021

Syncing data between my machines and phones using syncthing

I have talked about how my Backup strategy has evolved over the years. I am quite happy with the setup I explained in my previous post except for one minor point. I still had to manually sync the data from my laptop, Jani’s laptop and my phone to my desktop manually. Once it is there on the desktop the various backup processes make sure that it is backed up and secure. The issue is that I still had to manually sync the data between the devices.

For my laptop, I used Unison to manually check for changes and then sync them over which works great but I had to ensure that the sync happened in the correct direction. For Jani’s laptop I mounted my drive on her computer over ssh using these steps and then running robocopy to copy the files over. This worked intermittently well. For some reason the system would refuse to overwrite changed files randomly with permission denied errors even when the permission was set to 777. The only way to fix was to delete all the files on my computer and then do a fresh sync. This worked, but was not userfriendly and required me to manually kick off a backup which I did infrequently. My phone on the other hand was backed up manually to my computer using sftp. This was very crumbersome and I really disliked having to do it.

I have in the past looked into various technologies that allow multiple devices to sync data with each other. Unfortunately, all of them required an external connection with a copy of the data being stored in the cloud. Since that was a show-stopper for me, I never got around to setting up my systems to automatically sync with each other. Then a few weeks ago, I came across this great article on how to create A Simple, Delay-Tolerant, Offline-Capable Mesh Network with Syncthing (+ optional NNCP). In the article John talked about Syncthing, which allowed him to create a local serverless, peer-to-peer, open source alternative to Dropbox that allowed his machines sync directly with each other without a server. In other words a perfect fit for what I wanted and needed to do. So I spent a little bit of time researching syncthing and then decided to take the plunge and setup my laptop and desktop to sync with each other. Before starting the setup I backed up all my data so that in case something went wrong I still had a backup. Thankfully nothing did, but it is always good to have a backup.

Syncthing’s installation is pretty simple for all major operating systems, except for iPhones which are not supported. In Debian, installation just required the following steps

  • Run the following commands to add the “stable” channel to your APT sources:
  • echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
    curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
  • Once you have added it, run the following command to install syncthing
  • sudo apt-get update
    sudo apt-get install syncthing

    Once the software is installed execute the syncthing binary. On my computer it is installed in /usr/bin/syncthing. Once the software starts, it will start the web interface automatically. There is also a Desktop application, but I prefer the web-ui. Instructions on how to configure the folders and nodes are available at the Getting Started Guide over on the project website so I am not going to repeat them here. Basically, you need to define the nodes and connect them to each other, if the devices are not added on both sites then the folders will not sync.

    The software has a cool feature of discovery, which makes it easy to add devices on a given node. As soon as you connect to the same network they detect each other and give you the option of connecting both. After the devices are connected, you configure the folder you want to sync and select the devices you want it synced with. The best part is as soon as you configure one node, the other nodes will get a message stating that Node 1 is attempting to share a folder with them. Clicking on accept, allows you to configure the folder path etc on the node and that’s it. The system will detect the files which need to get synced over and will copy them quickly. You can configure the sync to be bi-directional or one way. Most of the folders in my setup are set as that, the only exception are Jani’s files which is a one-way sync because I know that I am not going to modify the files on the server.

    Below is what the setup looks on my desktop, as you can see I am syncing data from 3 different computers/phones to it and the sync’s are really fast. I have copied files over to the folder on one computer and within minutes (depending on the size) they were replicated on the other computers/phone.


    My Syncthing setup

    I have the android client running on my phone as well, and it instantly syncs any new photos etc from my phone to the desktop. All I need to do is connect to the same LAN network (can be over wired or wireless) and the devices connect and sync automagically. There is an option to do so even over the WAN using relay server but since I didn’t want that I disabled it in the setup.

    Now all my data is synced to the desktop machine without me having to worry about anything or manually copying files around. Check it out if you want to sync your devices without using an external server.

    – Suramya

March 6, 2021

How Facebook lies in notifications to get you to interact with it

Filed under: My Thoughts — Suramya @ 9:58 PM

As some of you know, I don’t usually check Facebook very often. I recently logged in to FB after a while and while I was browsing, I got a little pop up on the bottom left corner of the screen telling me that someone had shared a photo in a group that I follow 6 mins ago. So I clicked on the pop-up and it took me to the group. There I immediately noticed that the post that Facebook had told me about had actually been made 5 hours ago. I had noticed this in the past in my notifications but never had a pop-up about it before.

This basically shows how much Facebook’s algorithms and UX trick you into engaging more on the site and stay there, by showing a message about a new post 6 mins ago they made me click over to check it out. However, this was posted over 5 hours ago and I might have already seen it. This is not a one time event, looking at my notifications, I see this happening very frequently…


Screen shot of the notification and the actual post. Note the time in each.

Are others seeing this as well? At least with Twitter, I don’t see a message that someone has just tweeted something and then find out that that was sent hours ago. This along with all the other nonsense that Facebook is doing is why I don’t use it very often. I am on it mostly because others are there and they share pics etc from our trips & travels on it. I am planning to do a full download of my entire Facebook account activity so that I have a record of it. I don’t think I will delete my account as of yet, but this is bordering on pushing me into deactivating the account.

– Suramya

February 22, 2021

Should software be “classified” if it is used by government agencies?

Filed under: My Thoughts,Techie Stuff — Suramya @ 10:25 PM

Software should not be classified when used in government agencies except in some very rare exceptional cases. For example, software used to launch nuclear missiles and ensure they hit their targets might be an exception however, these should be an exception rather than the rule in my opinion. The reason I say that is because when a software is classified it means that a limited no of people are using it and that means only a limited no of developers are working on it as any given time. Plus, when something is classified it can not be security tested by external entities without having to sign multiple Non-Disclosure Agreements (NDA’s) and other similar hoops whereas regular software is used and tested by lots of people like corporate’s who test the solution before they implement it in their environment. This gives us multiple groups of people testing the software in various ways making it easier to identify security issues making it more secure.

Secondly, making classified versions of existing software doesn’t seem like a good use of resources to me. Why spend extra money creating a classified ‘Word’ when the commercial version (with some modification) would work perfectly well?

Coming to open source, I don’t think government should be prohibited from using Open Source. There are two ways government’s can be blocked from using opensource software. Firstly, the software license might prohibit government use. If this is the case, then the license no longer meets the requirement to be called open source since the Open Source Definition specifies that Open Source licenses may not discriminate against persons or groups. In-fact there was an attempt back in 2006 by GPU which is a Gnutella client to create a license that disallowed the use of their software by the military. It didn’t go anywhere because of strong opposition by the Open Source Initiative (OSI) to calling the license open source. Second, The government might not allow its use due to internal policy: This is primarily because they are worried about one or all of the following: Security, Cost, or licensing.

There is a misconception that opensource software is less secure than commercial software and even though majority of the servers worldwide run on opensource software (Linux, Apache etc) the detractors still persist. In every large company I have worked with so far, whenever I try promoting opensource software this point invariably comes up and I have to spend time explaining why this is not the case.

Another reason why companies might not allow OSS is because of the license the software might be under. If the software is licensed under the GPL they need to be extra careful when using it within their setup because the GPL is what is known as a viral license. It requires the source code of the entire “derived work” – i.e. the combination of GPL code and proprietary code – to be made available under the terms of the GPL publicly. Due to this most companies do not allow software licensed under the GPL to be used inside them. (Libraries licensed under GPL are fine because they don’t trigger the ‘viral’ clause). However, there are other licenses that do not have this clause and can be safely used.

Ultimately, I feel it is better if they use opensource software rather than pay ridiculous amounts of money as software licensing fees.

February 21, 2021

All Your Base Are Belong To Us: Turns 20

Filed under: Humor,My Life,My Thoughts — Suramya @ 12:05 AM

‘All Your Base Are Belong To Us’ is a phrase that is very familiar to anyone who was active on the internet in 2000’s as this was pretty much the first meme which took the entire net by storm. I remember someone posting a giant version of it in our college dorm windows using A4 paper. Unfortunately I don’t have a pic of it, but there were plenty of other places this popped up over the weeks really confusing a lot of people.

The first version showed up online on February 16, 2001 when a robo-voiced music video went live at Newgrounds.com. The video was a capture from a 90’s video game called Zero Wing with some hilariously bad English translation from the original Japanese. It contained phrases like “How are you gentlemen!!”, “Somebody set up us the bomb” and the infamous “All Your Base Are Belong To Us!”. The video presented the original Sega Genesis graphics, dubbed over with monotone, machine-generated speech reading each phrase. The video is shown below, click on play to view the original video with the awesome soundtrack:


All Your Base Are Belong to Us

The transcript of the video is as follows:

Captain: What happen ?
Mechanic: Somebody set up us the bomb.
Operator: We get signal.
Captain: What !
Operator: Main screen turn on.
Captain: It’s you !!
CATS: How are you gentlemen !!
CATS: All your base are belong to us.
CATS: You are on the way to destruction.
Captain: What you say !!
CATS: You have no chance to survive make your time.
CATS: Ha ha ha ha …
Operator: Captain !!
Captain: Take off every ‘ZIG’!!
Captain: You know what you doing.
Captain: Move ‘ZIG’.
Captain: For great justice.

After the original video from the game it moves on to show the phrase photoshopped into all sorts of images and photos from actual locations where it was inserted really confusing most folks because they had no idea what it meant.

It was extremely silly but great fun. Watching it again has really brought back memories of the great times from college. Here’s to the next 20 years, ’cause remember “All Your Base Are Belong To Us!”

– Suramya

February 20, 2021

Fixing boinc (code=exited, status=108) error

Filed under: Computer Tips,Knowledgebase,Linux/Unix Related — Suramya @ 2:01 AM

Earlier today I noticed that my CPU was not as active as usual and the boinc (World Community Grid) processes were no longer active on my computer. This has happened in the past when the client crashed so I restarted the client using the following command as usual:

/etc/init.d/boinc-client restart

Unfortunately, that didn’t resolve the problem and I thought that it could be because of the recent OS update that I did to my Debian system. In the past there have been rare cases when libraries were updated that some programs act strangely till the computer is rebooted, so I restarted the machine expecting to see the process start up without issues. Sadly, that didn’t happen so I had to debug the problem and I tried all sorts of things to resolve.

First, I tried starting the program manually as the root user and that worked. So I knew it was something to do with the startup script. Then I searched for and removed all the lock files in the boinc and the boinc-client directory. That should have resolved the problem but it didn’t and then I tried running the status command which gave the following output:

root@StarKnight:/var/lib/boinc-client# /etc/init.d/boinc-client status
boinc-client.service – Berkeley Open Infrastructure Network Computing Client
Loaded: loaded (/lib/systemd/system/boinc-client.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-02-20 01:26:50 IST; 9s ago
Docs: man:boinc(1)
Process: 7420 ExecStart=/usr/bin/boinc (code=exited, status=108)
Process: 7455 ExecStopPost=/bin/rm -f lockfile (code=exited, status=0/SUCCESS)
Main PID: 7420 (code=exited, status=108)
CPU: 19ms

Feb 20 01:26:40 StarKnight systemd[1]: Started Berkeley Open Infrastructure Network Computing Client.
Feb 20 01:26:50 StarKnight boinc[7420]: 20-Feb-2021 01:26:50 Another instance of BOINC is running.
Feb 20 01:26:50 StarKnight systemd[1]: boinc-client.service: Main process exited, code=exited, status=108/n/a
Feb 20 01:26:50 StarKnight systemd[1]: boinc-client.service: Failed with result ‘exit-code’.

This meant that the system thought that another instance of the software was running but that wasn’t the case as I verified it using ps. A search for the status=108 code on the internet returned a few results but nothing that resolved my problem. One user who faced this issue resolved it by uninstalling everything and installing back but that wasn’t a step I wanted to take without trying everything else first so I kept researching. Then I saw a post where a user was facing the same issue after they had moved the data directory to another partition and symlinked it to the original location. I had done the same thing a few weeks ago so I moved the directory back to it’s original location but that didn’t resolve anything either.

Then I thought about checking the file ownerships of the directory and they were owned by my user (suramya) and a post on the internet said that they should be owned by root. I checked on my laptop as I have the same setup there and found that the directories were owned by the ‘boinc‘ on the laptop. Then I remembered changing the ownership of all files in one of my drive partitions last night to suramya. What I didn’t realize at that time was that the boinc-client directory was also located on that partition (after I had moved it there to recover space on my root partition).

I immediately changed the ownership of both directories back to boinc:boinc using the following command

chown boinc:boinc /var/lib/boinc* -R

Then I restarted the daemon and that fixed the problem. I then moved the directory back to it’s original location (on the other partition), symlinked it to the original location and the software still worked after I restarted the process.

I am documenting this in case others hit the same issue.

– Suramya

February 7, 2021

Travel in 2021: 3294kms driven as of date

Filed under: My Life,Travel/Trips — Suramya @ 8:25 PM

I complained a lot about not being able to travel in 2020, mostly to my wife who suffered through my complaints heroically. So the universe decided that I would get to travel a lot in 2021 as compensation. Jan 2021 has been a marathon session of driving all over south India, primarily because of Covid as we only wanted to go places within drivable distance from Bangalore as we normally would try to drive directly to the location without having to stop on the way. Plus we also ensured that we were only going to places with very limited crowds and mostly ended up staying in places where we were the only people (apart from the staff).

The first trip of the year was to Dindigul where we had gone for New Years. It was a lot of fun and we enjoyed it quite a bit. The second trip was to Kannur, Kerala (not to be confused with Coonoor, Tamil Nadu), which we did with Jani’s friends from IBM with whom we had been talking about going on a trip for over 4 years (almost 5). The drive to the place was quite nice and we made good time. I had planned on writing a trip summary as I normally do but didn’t get the time as I was swamped with classes and assignments. In any case, Jani has now started writing about all the trips so that reduces the pressure on me :). Her writeup on the trip is available here.

The next trip was to Kotagiri, Tamil Nadu with Anil, Manisha, Suprita , Vinit and the kids. We drove down from Bangalore to Kotagiri but thankfully I wasn’t driving because by this time I had already driven almost 1.8k kms in 2021. Anil, Manisha & Vinit drove for the trip and I got to relax and spend time with the kids for a bit. A big surprise was that I bumped into Gaurang in Ooty, as he had driven down for some work. We both stay in Bangalore but hadn’t seen each other for months because of Covid. So he came over and we spent some time together there and then he drove back with us which gave me a chance to spend some quality time with him during the drive.

Finally the last trip of the month was to visit Jani’s hometown, Colachel in Kanyakumari District for some work (plus spend time with family). It was a 14 hour+ drive from Bangalore and initially I had planned to do it in one shot. However, then we decided to break it up into two with a halt in Dindigul which is almost exactly half-way between the start and finish. This was the first time we were stopping on the way during a trip but in hindsight it was a great idea. It allowed me to take a break and rest as I was also up on night for my classes. If we hadn’t stopped on the way I would have been exhausted by the time we reached and this way I got to rest on the way. The drive down was fantastic, and I really loved the NH44. The road was well maintained and an absolute pleasure to drive. I had to consciously restrict myself from driving too fast and I really enjoyed it. The traffic also was minimal so I could really relax and enjoy the drive.

In all I have driven 3294 kms so far in 2021 and now that I am home I absolutely refuse to drive anywhere else for the month of Feb. We will see how I feel in March, but most probably we won’t be going anywhere till at-least the end of March as we both have exams in March. But based on our past experience, I will not say that we absolutely will not travel anywhere for the next two months.

I am eagerly waiting for the Covid vaccine to be generally available so that we don’t have to worry about Covid when traveling. Looking at the current status I have a feeling that it will be Q3, 2021 by the time we get vaccinated. Hopefully by the end of the year things might be back to normal so here’s hoping for that.

Well this is all for now. Will write more later, now that I am back home and not driving all over south India.

– Suramya

January 11, 2021

Do young people not care about privacy because they grew up sharing personal information?

Filed under: My Thoughts,Techie Stuff — Suramya @ 1:03 PM

I don’t agree with statement, though there are many proponents to abolishing privacy online. Unfortunately, over the years we have been trained to give personal information in order to use services online and this is based on the principle that our data has no value and if we have nothing to hide we should be ok to share data online. This is a fallacy.

Having privacy is essential to us as humans because it gives us a judgment free space where we can be ourselves without worrying about what others might think. This allows us to explore unpopular ideas without worry or fear. Plus it is not just people who have unpopular ideas that need privacy. There is a lot of stuff that I wouldn’t want to share with everyone even if it’s nothing illegal or unpopular such as details about my health or personal finances. Privacy doesn’t mean that we don’t want to share information, it just means that I get to choose who has access to data about me.

In certain scenarios privacy helps protect us physically from stalkers or people who mean us harm, think fanatic fans or people fleeing an abusive relationship. Such people would not want their physical location broadcast to the world. There was a case a few months ago where a fan used a photo published by a star to locate her apartment and assaulted her at her apartment. This was a breach of privacy of the star and caused major distress to her. Now imagine if we could immediately find where anyone in the world is located at a given time, this will allow us to determine so much other data about that person such as their health information (if they are visiting a cardiac doctor every week, there is a high probability they are suffering from a hear problem). A few years ago Uber analyzed data from the rides people were taking using it’s service and used that to figure out who was having an affair with whom based on the rides they took and the location they were dropped. It was quite a scandal when it came out and now imagine someone taking this information and blackmailing people.

With the amount of information that we are giving to websites and companies both voluntarily and involuntarily privacy is becoming harder to maintain but that doesn’t mean that we give up and let companies do whatever they want with our data. If we do that then be prepared to have every aspect of your life dissected and analyzed for profit.

Too many people state that they have nothing to hide and have no problems with having their information public. I challenge them to stay in a house completely made of glass (including the bathrooms) and have a bot that publishes all emails/messages/transcripts from their calls publicly. I can bet there won’t be any takers. as everyone has something they wouldn’t want to be public knowledge.

– Suramya

January 10, 2021

What are the ethical obligations of a Computer professional?

Filed under: My Thoughts — Suramya @ 11:58 PM

This is a question that is getting a lot of attention right now. A lot of people say that Technologists shouldn’t be political or worry about how their tech being used but I believe that it is wrong. This school of thought comes from when historically people working on computers were not impacting any real-world events/consequences. E.g. if a computer crashed or was hacked it might not have a life & death impact. Now with everything connected to each other including devices that effect the physical world that is not the case. So if there is a major flaw in a control system of a car that allows it to be hacked then it can be used to crash a car or stop it in the middle of the road causing a pileup. If there is a vulnerability found in a pace maker then it can be used to kill people.

Due to this all our work needs to take in account all three scenarios. We can’t just create a system that causes extensive harm and claim that it was done because “This is what I was told to do” is not a valid justification for doing something that is used to harm people/communities. Some claim that our job is to help our companies & clients make money and leave the ethics at home but it is not the correct way to look at things.

To take an example, what if I develop hacks that allowed governments to spy on terrorists undetected by monitoring their phones & computers? That seems like a win-win for all correct?I am helping stop terrorists and keeping the world safe. What else do we need? Now what if those same hacks were repurposed by repressive regimes to spy on their dissidents? It shows that everything we do and work on, has consequences some of which are intended & some are not.

In another example, if I figure out a way to remotely identify anyone even when they are masked, then before I release the software I also need to think of how else the software might be used. Will it be used to target protestors or political dissidents? We need to figure out what other uses it might have and then take a call.

Unfortunately there is no clear answer or a checklist that we can follow to make the correct decision. End of the day we need to make a decision and then live with the consequences.

– Suramya

January 9, 2021

Online Afterlives: Chatting with the dead

Filed under: My Thoughts — Suramya @ 2:56 PM

Dealing with death is something that everyone struggles with and with the digital aspects of life becoming more and more prevalent there are many ways folks try to keep the memory of their loved ones accessible. There are options in major social media sites to memorialize an account after the owner passes away, others use personal websites to memorialize their loved ones. With advances in technology there is now a new way to remember your loved ones, using AI and machine learning there are companies that allow you to ‘chat’ with your loved ones even after they have died. Basically these sites train a machine learning model using existing communication, emails, chats, postings etc to give you the impression that you are chatting with a dead person.

In theory this is very interesting and I like the use of technology to ease the sense of loss from a death. However, my concern is that this can quickly become a crutch and for people who are having a hard time letting go, this can make things even more complicated. In the end this is a chat-bot pretending to be a person, although to be fair the bot is explicit in telling people that it is a bot. For example when asked where they were the bot responded: “As a bot I suppose I exist somewhere on a computer server in San Francisco. And also, I suppose, in the minds of people who chat with me.”

Overall I am not sure how I feel about the tech. It is both good and creepy at the same time. Extrapolating into the future we can see that soon it would be possible to create a virtual reality (VR) representation of a person that can interact with people after the original person dies. All you would need is data and enough processing power to create a model of how a person behaves. There was a TV show that I saw a while ago where dead people lived on as online avatars and would still interact with their loved ones but I can’t remember the name but it was an interesting concept.

What do you think?

Source: Popsci.com: Old text messages are letting people chat with the dead

– Suramya

January 8, 2021

Idiot threatens to kill co-worker because his friend request wasn’t accepted

Filed under: My Thoughts — Suramya @ 4:52 PM

A while ago I had posted about the most bizarre reaction I had seen from someone whose friend request I had not responded to quickly (I don’t check FB very often). I am happy to say that it was nothing like the reaction this person from North Dakota, US got. Apparently 29 year old Caleb Burczyk decided that being friends with his ex-coworker was so important that Caleb threatened to kill them if his request wasn’t accepted. To top things off, this moron actually went over to their house and kicked in the front door while getting caught on camera doing so just because he couldn’t take the fact that his friend request was rejected ensuring that he has a felony assault entry in his record.

Caleb Burczyk, 29, pleaded not guilty to felony charges of burglary and terrorizing filed in Williams County District Court Tuesday, Dec. 29. Burczyk’s attorney Jeff Nehring declined to comment on the case.

Police say Burczyk started sending aggressive Facebook messages to his ex-coworker on Dec. 24, according to an affidavit of probable cause. He threatened his ex-coworker’s life and warned him that he was going to “come at” him if he did not accept his Facebook friend request, the affidavit stated.

“Accept my friend request or I’m going to murder you,” Burczyk wrote in a message to his ex-coworker, according to the affidavit.

I can understand being slightly upset when someone doesn’t want to be friends with you but this is extreme and the guy should be in jail as he is not stable and could have caused a lot of harm. These are the kind of entitled morons who need to be taught that the world doesn’t revolve around them and they need to accept that people don’t want to associate with them. I don’t blame the co-worker for not wanting to be friends if this is how he behaved. I am sure he was doing the same thing in real life as well.

Source: PSA: If Someone Doesn’t Accept Your Friend Request, Do Not Threaten To Kill Them And Kick In Their Front Door

– Suramya

Older Posts »

Powered by WordPress