Tuesday, August 1, 2017

How to install xclock on raspberry pi

Sometimes we need x session to raspberry pi and for that we need to have X apps installed on raspberry pi.

I am getting the error that xclock is not installed

pi1@rasp:~/temp$ xclock
-bash: xclock: command not found
pi1@rasp:~/temp$

So I tried installing the xclock and received the message that I should install x11-apps

pi1@rasp:~/temp$ sudo apt-get install xclock
Reading package lists... Done
Building dependency tree      
Reading state information... Done
Package xclock is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  x11-apps
E: Package 'xclock' has no installation candidate
pi1@rasp:~/temp$ 


Well that is the solution, so I went on installing x11-aps


pi1@rasp:~/temp$ sudo apt-get install x11-apps
Reading package lists... Done
Building dependency tree    
.
.
.
Processing triggers for libc-bin (2.19-18+deb8u10) ...
Processing triggers for systemd (215-17+deb8u7) ...
pi1@rasp:~/temp$ 


After the installation I just made sure that my DISPLAY variable is set to correct value and xauth is set as well.

pi1@rasp:~/temp$ echo $DISPLAY
localhost:10.0
pi1@rasp:~/temp$
pi1@rasp:~/temp$
pi1@rasp:~/temp$ xauth list | grep -i '10.'
raspberrypi/unix:10  MIT-MAGIC-COOKIE-1  527dd72ade8c37eed6066df0ea8d33bf
pi1@rasp:~/temp$ 


I am also running xming with default settings on client, after running the xclock on terminal I got

pi1@rasp:~/temp$ xclock
Warning: Missing charsets in String to FontSet conversion







No comments: