1

I have an Ubuntu 14.04 connected via HDMI to a TV. After the computer comes back from suspend the mirrored desktop on the TV display sometimes doesn't show the mouse cursor.

The only way I found to solve this is by going to Settings->Display and turn off/on the Mirror check box.

How can I solve this issue without the need to go to Setting every time?

Thanks.

2 Answers 2

1
+50

This seems to be a very common problem with Ubuntu 14.

Upon looking around, I have something that might help.

First off, is the command

gsettings set org.gnome.settings-daemon.plugins.cursor active false

This seems to be the command that will restore the cursor, however, it is quite long and difficult to memorize. Now lets make a "short-cut"!

Bash: Linux's Swiss Army Knife

So lets make a quick bash script that will get you running quickly this problem arises. Type gsettings set org.gnome.settings-daemon.plugins.cursor active false in a new file in your "Home" folder. name the file something like c.sh or another name that is easy to remember.

Now we just have to set the executable bit for it. Open a terminal, (I am assuming the file isc.sh and is in your "Home" folder) and type chmod +x c.sh This will allow the system to run the file.

Now next time this happens just use the keybard short-cut, Alt+F2 to open an execute window, and type ~/c.sh This will hopefully be a quick easy fix for this problem.

Note, however, there seem to be many things that cause this problem, so this answer may or may not work for you. Let me know if this works.

Hope this Helps!

2
  • Or add #!/bin/bash above that gsettings commnd, so you can just save the file as c and run ./c and maybe copy it to somewhere in your path so you can just do c. Another option is to make an alias by adding alias c="gsettings set to org.gnome.settings-daemon.plugins.cursor active false" to your .bashrc`™
    – wb9688
    Dec 15, 2015 at 15:11
  • I thought this works, but it doesn't. It seems the command has zero effect.
    – thedp
    Dec 16, 2015 at 21:08
1

You need to alter the gconf setting which alters this behavior, e.g. from a command line (ctrl+alt+t): gsettings set org.gnome.settings-daemon.plugins.cursor active false The cool thing is if you can do it from the command line, you can automate it with scripts or other tools!

One option is to make a Ubuntu desktop shortcut which you can then simply double-click when you want it to "go".Create a new file on your desktop mousy.desktop. Edit this file to include the contents shown here: [Desktop Entry] Name=mousy Comment=restore my mouse Icon=utilities-terminal Exec=gsettings set org.gnome.settings-daemon.plugins.cursor active false Terminal=false Type=Application

And add execute permissions (chmod +x mousy) and the icon displayed should change appearance and you can now double-click it to run the command you added via editing the file.

To confirm this worked, enter the following in a terminal: gsettings get org.gnome.settings-daemon.plugins.cursor active and the terminal should print "false" (or whatever value the command in your file says).

10
  • doesn't work. The command has zero effect. Maybe something should be called to use this new setting?
    – thedp
    Dec 16, 2015 at 21:10
  • Hmmm... let me look into it some more. It was difficult to find a setting relating to the "mirror check box" you described. gsettings ought to be one way to do it, though.
    – tniles
    Dec 16, 2015 at 21:50
  • Have you tried using dconf-editor to browse for the available settings? sudo apt-get install dconf-tools
    – tniles
    Dec 16, 2015 at 22:03
  • Maybe also look for new content in /var/log/messages or another syslog to help find some clues to why the mirror has effect.
    – tniles
    Dec 16, 2015 at 22:07
  • Try it with gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup clone... this was the closest other setting in dconf-editor I could find, with the description: "Whether to turn off specific monitors after boot".
    – tniles
    Dec 16, 2015 at 22:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .