Firefox error no display specified

Firefox error no display specified means that there is no X server(GUI) running on the remote host.

Last Updated on
Staff Asked on October 25, 2017 in Firefox.
Add Comment
1 Solution(s)

Solution 1. Make sure the OS has a Desktop version

Firefox error no display specified appears when your OS has no desktop version to support Firefox. Make sure the OS has a desktop version. Also, run xhost +’ once from a terminal then use the code below.

#add ip / hostname separated by white space
myHost=1.2.3.4
export DISPLAY=:0
# no ping request
COUNT=1

count=$(ping -c $COUNT $myHost | grep ‘received’ | awk -F’,’ ‘{ print $2 }’ | awk ‘{ print $1 }’)
if [ $count -eq 0 ]; then
# 100% failed
echo “Host : $myHost is down (ping failed) at $(date)”
else
firefox $myHost
fi

Staff Answered on September 12, 2018.
Add Comment

Your Solution

By posting your solution, you agree to the privacy policy and terms of service.