Furious activity is no substitute for understanding.
H. H. WILLIAMS
Author: abhijit
different ways to run program as root
I discovered that there are many different ways to run a program as root.
The most well known way is to use the sudo
command
$> sudo run_as_root_program.sh
This, of course, prompts for the password which you need to then enter.
But what if we need to run the program itself from another program so that the password prompt doesn’t appear?
I came across this requirement recently and it took quite a few iterations before I got it right.
Continue readingremove favicon request error in Chrome
Chrome has this weird habit of requesting for a favicon to show on the tab. For developing applications locally this is a major pain.
There is a way to overcome this, however.
To avoid this, we can add a very small snippet in the in the head of index.html file.
<link rel="icon" href="data:image/gif;base64,R0lGODlhEAAQAAAAACwAAAAAAQABAAACASgAOw==">
setting up Wallabag with SQLite on Ubuntu
After I got Shaarli setup, I realized that a lot of bookmarks I had imported had broken links and I had no idea what those links were and what they contained.
This caused me a bit of grief, until I came across this software called Wallabag.
Wallabag promised to save pages to my server after cleaning up scripts and unnecessary junk from the html pages.
And the best part was I could choose from Shaarli which pages to save for posterity in Wallabag!
Continue readingsetting up Shaarli on Ubuntu
Browser bookmarks has been an essential part of browsing for me. But once multiple browsers started appearing, I found that I couldn’t share my bookmarks across browsers.
And then delicio.us appeared. And they even had a free tier! That was such a lifesaver. But like all good things it came to an end and I had to choose something different. I exported all my bookmarks to Diigo and had been using it for ages.
But from the time I got more comfortable with the server side of things, I wanted get off Diigo as well. I didn’t want to face the same problem again in the future.
I came across Shaarli some years ago and always wanted to install it on my own server. Shaarli seemed to always get recommended as an easy-to-install software.
Continue readingsetting up Syncthing on Ubuntu – Part 2
Syncthing by default runs on localhost on port 8384
I wasn’t too keen to run syncthing publicly directly, so I created an nginx reverse proxy for it.
The other reason being I wanted to put a basic authentication to access the syncthing main page so nginx seemed perfect for this job.
Continue readingsetting up Syncthing on Ubuntu – Part 1
Syncthing is an application to sync files across devices. Supports Windows and Linux. Also has an Android App. Since my server is Linux and I work across Windows desktops, this seemed ideal to use.
Setting up syncthing wasn’t too difficult. Lots of tutorials abound. The basic commands involve installing using apt-get.
Continue readingsetting up Fossil on Ubuntu – Part 3
Once fossil is set up, I wanted it to start automatically on system reboot, so that I needn’t worry about it in the future.
After trying many different ways of doing this and failing, I ended up with a configuration which included a shell script and supervisor to start it.
Continue readingThose who know, do
ARISTOTLE
setting up Fossil on Ubuntu – Part 2
Setting up Nginx with fossil is also not too much of a problem.
Essentially, nginx has to be redirected to the /repos path to be able to work with fossil server command correctly.
Continue reading