I installed xdotool
in Ubuntu. But it says segmentation fault (core dumped)
when I inputted command xdotool getmouselocation
. How to solve it?
Asked
Active
Viewed 2,007 times
2 Answers
0
You might be using not real display. To correct this, do:
export DISPLAY=:0
xdotool getmouselocation
If it did not work, this link might be useful.

Olimjon
- 7,292
-
I had correct this: export DISPLAY=:0
xdotool getmouselocation. But it says "Error:Can't open display:(null) Failed creating new xdo instance" now. – shen xu May 12 '18 at 13:57 -
-
I had try to use "export DISPLAY=:1",But it says "segmentation fault (core dumped)" now. – shen xu May 13 '18 at 12:15
-
I had install X Window System use the command as follows:
apt-get install xserver-xorg
apt-get install x-window-system-core
dpkg-reconfigure xserver-xorg
apt-get install gnome-core
apt-get install gdm xscreensaver
apt-get install ttf-arphic*
startx
And input command "export DISPLAY=:0".Than xdotool can work now.
– shen xu May 13 '18 at 23:41 -
But it has another question.Please look at the link "https://www.youtube.com/watch?v=25OTHjiVHZg".The value is x:512 y:384 of the screen coordinates,But the coordinates value is x:512 y:384 still when i change the location of mouse pointer in screen.Why the coordinates value do not change?I want get the screen coordinates current value of mouse pointer. – shen xu May 13 '18 at 23:41
0
I had to install X Window System using the commands as follows:
# apt-get install xserver-xorg
# apt-get install x-window-system-core
# dpkg-reconfigure xserver-xorg
# apt-get install gnome-core
# apt-get install gdm xscreensaver
# apt-get install ttf-arphic*
# startx
And input command export DISPLAY=:0
. xdotool
works now.
-
Please look at the new question link https://askubuntu.com/questions/1035940/i-use-xdotool-can-not-get-the-screen-coordinates-value-of-current-mouse-pointer%22 – shen xu May 15 '18 at 12:51
apt-get install xserver-xorg
apt-get install x-window-system-core
dpkg-reconfigure xserver-xorg
apt-get install gnome-core
apt-get install gdm xscreensaver
apt-get install ttf-arphic*
startx
.And input command "export DISPLAY=:0".Than xdotool can work now.
– shen xu May 13 '18 at 23:39