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 1,858 times
0
-
What version of Ubuntu are you using? Are you actually running X, or another system like Wayland or Mir? – wjandrea May 11 '18 at 18:47
-
my ubuntu version is ubuntu 16.04.What is the X? – shen xu May 12 '18 at 13:52
-
https://en.wikipedia.org/wiki/X_Window_System – wjandrea May 12 '18 at 18:24
-
How to install X_Window_System in ubuntu 16.04? – shen xu May 13 '18 at 12:50
-
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:39
-
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:40
-
I'm happy you got xdotool working at least! Please post that as an answer. (You can answer your own question.) As for the coordinates issue, please [ask a new question](https://askubuntu.com/questions/ask). – wjandrea May 14 '18 at 00:37
-
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". – shen xu May 14 '18 at 05:01
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
- 6,982
- 2
- 25
- 51
-
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