Skip to main content

Posts

Showing posts with the label ubuntu

Script to Create Secure Django Site Deployment Environment

My first production level shell script is out. Yes, after two decades spent in the depths of code, I have finally published a shell script that is worthy of being called 'code'. It's something that started as a few lines hack to update a Linux box with a series of packages that needed to be installed to deploy a Django web app that eventually grew to 300+ lines of madness (I can't find anything else to describe shell scripting language) that I have used to create consistent configuration across a few servers. Without much ado, here it is: https://github.com/harikvpy/deploy-django.git .

Script to Create Secure Django Site Deployment Environment

My first production level shell script is out. Yes, after two decades spent in the depths of code, I have finally published a shell script that is worthy of being called 'code'. It's something that started as a few lines hack to update a Linux box with a series of packages that needed to be installed to deploy a Django web app that eventually grew to 300+ lines of madness (I can't find anything else to describe shell scripting language) that I have since used to create consistent configuration across a few servers and apps. Without much ado, here it is: https://github.com/harikvpy/deploy-django.git .

Enable/Disable Synaptics Touchpad on Ubuntu

A day working from home brought out another problem the new Thinkpad. I did not have a spare mouse lying around and had to fall back to the flawed Touchpad/Trackpoint mechanism on the new T440. My original idea was to disable Touchpad completely through the x.org conf files and rely on the Trackpoint. But it turns out that while Trackpoint navigation works fine, clicking only works for the left-click. For some strange reason I couldn't get right-click to work on the Touchpad upper button area.

Linux Command Output Redirection Rules

Here's another thing that I learned today -- command output redirection syntax. > redirects the program's output to the specified file which is specified afterwards. If > is preceded by ampersand, shell redirects all outputs (error and normal) to the file right of > . If you don't specify ampersand, then only normal output is redirected. In other words: command &> file # redirect error and standard output to file command > file # redirect standard output to file command 2> file # redirect error output to file This is how things work on Ubuntu and bash. Other shells could very well be different.

VirtualBox - Sharing a host folder on Ubuntu guest

I have been using VirtualBox to run Ubuntu Server on my Windows PC over the last couple of weeks. The more time I spend with it, the more I find the need to get myself acclimatized with the good old command line method to interact with your OS. Though I'm a pretty fast learner and have spent quite a bit of time on Linux and its variants in the past, the sheer number of commands that one has to learn to manage the large array of interfaces in present-day OS is astounding. For example, I wanted to share a folder from my Windows host to the Ubuntu guest. How do I go about doing it? How do I mount a USB stick on guest OS? Luckily, answers to most of these questions are only a few clicks away with the help of Google. However, since I expect to carry out some of these tasks quite often in the future, I'm going to try and record things that I discover and re-learn in various blog posts, so as to act as a reference for myself. This post talks about how to go about accessing a Host...