Saturday, January 7, 2017

LightDM with multiple monitors

I've come across a small annoyance with LightDM. I'm not sure if this problem exists with others, such as GDM, but it would probably fix that too, if it does. After a time, which can be set by the user, the screen goes black and locks as it should. However, when using more than one monitor, the lock screen can seem to appear at random on any screen. Actually, it's not random. It shows up on the screen where the mouse was when it locked. If you wish that it stayed on the same monitor all the time, then here's the solution. It requires the xdotool to be installed. It may even come with your distribution, but usually isn't installed by default. Next add the simple script below to your path. Add it as an autorun application and your done! Your login screen will always show up on the left most monitor (and so will your mouse).
#!/bin/sh
# TITLE: Move Mouse
# DATE:  03 DEC 2016
#
# DESCRIPTION: This simple script moves the mouse to the to the left side of
#    the screen for the purpose of keeping the login window on
#   the left monitor
#
dbus-monitor --session "type='signal',interface='org.mate.ScreenSaver'" |  \
while read x 
  do 
    case "$x" in  
      *"boolean true"*) xdotool mousemove 100 200
    esac 
done &

How the script works
The script tells dbus to let it know when then screen saver goes active. At that time it executes the xdotool command that moves the mouse to location 100 by 200 pixels. If you wish it to display on another monitor you will have to move the mouse to a value larger than the width of the left most monitor (or two if you have three or more). 'interface' is the dbus name for your action you are monitoring. In this example the mate screensaver. If you have another screensaver running you will have to change it to the appropriate name.

Thursday, May 26, 2016

The new release of Ubuntu 16.04 is out along with it's many derivatives. With it comes new issues. One such issue that is harped about especially by Noah and Chris from the Linux Action Show is the annoying habit of Network Manager to loose it's WiFi connection when returning from sleep (suspend) or hibernate. I'm not sure what the exact issue is but I've come up with a simple workaround.

Systemd allows for actions to happen when a condition is met. So, all we have to do is tell systemd to restart Network Manager when the system comes back up. We can call this nm-sleep.service.



[Unit]
Description=Restore Network after sleep
After=suspend.target
After=hibernate.target
After=hybrid-sleep.target

[Service]
User=root
ExecStart=systemctl restart NetworkManager
StandardOutput=syslog

[Install]
WantedBy=suspend.target
WantedBy=hibernate.target
WantedBy=hybrid-sleep.target

Store the file as 
/etc/systemd/system/nm-sleep.service
  then all you have to do is inform systemd about it with  
sudo systemctl enable nm-sleep 

Every time your system comes back to life the systemd will restart networking as if you booted your computer. This makes sense, especially with a laptop because your connection could easily change between sessions. You might boot your laptop at a coffee shop and then suspend it to go home, plug in your ethernet and it would pop up instantly (or nearly so). The actual fix should probably be in Network Manager itself but this works just fine. I've been using it since I installed a beta back in February and had completely forgot about the problem until my favorite show brought it up.

Sunday, August 17, 2014

Review of Total Recall (2012)

If your looking for Philip K. Dick's short story "We Can Remember It for You Wholesale" you'll be sorely disappointed. On the other hand, if your in for a dystopian adrenaline rush this is your movie. It starts off like the Governator's predecessor of the same name. A factory worker asking a trusted co-worker about a place called Rekall. The co-worker tries to dissuade Mr. Quaid from the idea of going to a place that would mess with your mind,  but Doug persists and goes there anyway.

While the general story line is quite similar to it's 1990 namesake, the world looks much more tired and run down. From the moment the needle goes into Douglas Quaid's are the movie is for the adrenaline junkie. There is lot's of hand to hand and car to car combat. The acting is mediocre to above average.

While it is not the worst movie I've ever seen, I find it more interesting to watch then "The Phantom Menace". That's not saying much, I realize. Okay to be fair, it ranks up there with Zombieland. Enjoyable enough to waste a couple of hours.

One item I found interesting was when Mr. Quaid was entering the customs area there was a woman ahead of him who looked very much like the fake woman used in the 1990 version. Sort of a node, if you will to the one directed by Paul Verhoeven.

With the synthetic police, it becomes Total Recall (1990) meets iRobot.

Saturday, May 3, 2014

The Carpenters - Goodbye To Love

I
After fell in love with my wife I never thought the day would come when this would be the song of my life. I always loved this song since I first heard my aunt playing it. Now that it applies to my life it is bitter sweet to listen to. But life goes on...alone.

Friday, May 2, 2014

Sixteen Years of effort

So it's over. For sixteen years I attempted to keep interested the women I loved and wish to grow old with. She has decided to move on. While the marriage wasn't all wine and roses, I think I grew content. It seems when I become content with something the universe jumps in and says, in a Cockney accent, "Hey there, there'll be none o' that 'round here!". And POOF! Life throws a curve ball. This time I struck out.

And life goes on...

One of those days

Did you ever have one of those days that you knew in the back of your mind was going to happen? Yeah, today is one of those days. I can never understand why people are so mean to each other. The world would be so much nicer if people were open and honest.

Friday, February 7, 2014

Love (Sex) and Marriage

I recently had come across an article in the New York Times written by Lori Gottlieb which related an anecdote of a dinner party where afterwards her boyfriend and her concluded that the hosts, a married couple, would not be having sex that evening. This fact seemed to dismay her since the couple had what she viewed as the perfect marriage.

I am personally dismayed that a writer for the NYT did not receive a proper education. It seems that in our effort to make a more homogeneous world we have stop teaching reality. Nietzsche is disdained because the National Socialist German Workers Party twisted his ideals into a parody of itself. Something we would have been horrified to see by all accounts.

In the same vein, it is a apparent that Oscar Wilde is too crude for our modern, easily offended society. For he said, "Everything in the world is about sex except sex. Sex is about power." This alone would give you all the information you need. In an equal marriage great sex will be nonexistent. Sorry to tell you this, but it's true. Think about this, good sex requires one partner to be in a power position. It really doesn't matter who but one must be master and the other servant. Once you remove that from the equation the only reason for sex is procreation. The more intelligent the couple the more likely they will share in the duties rather than one do all the house work while the other "brings home the bacon".

The evidence for this I have seen portrayed in media of all sorts as well as my own observations. I am reminded of the movie Idiocracy at the beginning of which they show two families a modern educated couple producing one child and a hillbilly looking (redneck) couple who produce grandchildren before the other couples child is out of diapers. This effect stems from a man who uses sex to assert his dominance of a woman who is all to willing to be "protected".