Login loop issue on Ubuntu

Had an issue with Ubuntu 14.04 version where in login into the system would result in the screen going through various screens and end up back at login page. I had previously had the same issue but was able to resolve it with the help of my friend. This time I thought I’d try to fix this myself and was able to faster than I thought.

Here’s how I resolved it after going through a few solutions :-

So basically lightdm is the display manager which comes by default with 14.04. So when you google for lightdm here’s what you find …

LightDM is an X display manager that aims to be lightweight, fast, extensible and multi-desktop. It uses various front-ends to draw login interfaces, also called Greeters.

Basically this package manages the login interface.To me that’s not a show stopper, in fact all my work starts after login.So I just thought I’d try another display manager. There are different display managers that work with ubuntu, another one being gdm. I just ran the following command to remove lightdm and install gdm.

CNTRL + ALT + F1 launches the terminal window even when user is’nt logged in.

sudo apt-get purge lightdm && sudo apt-get install gdm

This fixed my issue. Now I’m able to login to my machine without a prob. Case closed!

Sending Arguments in Command Line while running RSpec tests

Suppose you want to run your rspec specs on various product environments & at run-time you want to mention where you would like the scripts to run, you can create a command line parameter say ENVIRONMENT and assign it a value like this :-

ENVIRONMENT= “dev” rspec spec/sanity_test_spec.rb

Similarly you can assign it values like prod, preproduction etc.

In your spec files you can retrieve the parameter value like this :-

runtime_param = ENV[‘ENVIRONMENT’]
puts “Evironment value got on runtime is #{runtime_param}”

The keyword ‘ENV’ is a built-in ruby term(I suppose) which handles this functionality.