Tag Archives: ubuntu

Ubuntu Desktop feature: screen zoom

Here’s how to set up a graphics-accelerated zoom feature on your desktop. The intent is a magnifier for the visually impaired, but I find it handy to highlight a small part of the desktop for focus or demonstration.

First, install prerequisites.

sudo apt -y install compizconfig-settings-manager compiz-plugins-default

Next, run ccsm (as your normal, non-root user) from the command line or the Dash.

Under “Accessibility” find “Enhanced Zoom Desktop”. Enable it. In the settings for the plugin, set Super+Button4 as the “Zoom In Button” and Super+Button5 as the “Zoom Out Button”. Done!

To zoom, hold down the “Super” key (Windows key on a PC keyboard, Command key on a Mac keyboard) and scroll in either direction.

screenshot of the compiz config settings manager

how to upgrade MongoDB 2.6 to 3.x on Ubuntu

sudo mv /etc/apt/sources.list.d/mongodb* /tmp/
echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
sudo apt-get update && sudo apt-get install -y mongodb-org

And I also had to do fix my replica set in the MongoDB shell (necessary for Meteor oplog tailing):

var a = {"_id" : "rs0", "version" : 1,"members" : [{"_id" : 1, "host" : "localhost:27017"}]};
rs.reconfig(a, {force:true});

UPDATE 2015-10-01: Alas, one of my coworkers found even all the above wasn’t enough–he had to blow away his old MongoDB install.

sudo mv /var/lib/mongodb /tmp
sudo apt-get purge mongodb-org-server
sudo apt-get install -y mongodb-org-server

We also use one-member replica sets in dev (Meteor uses the oplog), so edit /etc/mongodb.conf and include something like replSet=rs0, then restart mongo (sudo service mongodb restart). Finally, initialize the replica set:

var a = {"_id" : "rs0", "version" : 1,"members" : [{"_id" : 1, "host" : "localhost:27017"}]};
rs.initiate(a);

It appears that collections can be restored by simply copying files like blah.0, blah.1, blah.2 and blah.ns from /tmp/mongodb to /var/lib/mongodb while the MongoDB server is stopped.