understanding the "export DISPLAY=:0" command
#1
Question 
Often in case there are multiple graphics cards in the system and only one of the cards is detected, executing the "export DISPLAY=:0" command helps. In case of bash, export is the shell built-in which exports the variable DISPLAY:

Code:
root@debian64:~# echo $DISPLAY
:0
root@debian64:~#

As I understand, DISPLAY variable is used by X. However, what does this :0 mean? I mean how does this change the behavior of the X server?
#2
The DISPLAY variable is not used by X itself; it is used by X11 applications. It tells X11 applications which screen they should run on. The format of the DISPLAY variable is hostname:display. For local displays, the hostname is often omitted.

The reason this variable is needed is because you can have multiple X servers running locally, or you may wish to use a remote display. So if the DISPLAY variable is not set, your X11 apps have no idea where you want them to run.

If you look at the arguments X is currently running with, you will see which display it is running on. The X server is almost always running on display :0

Code:
root@ike:~# sed 's/\x00/\ /g' /proc/$(pidof X)/cmdline
/usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none

If you have another X server running, like with vncserver or something, then you will see one X server on :0, another on :1, etc.

Hope that helps.
#3
Further, within a display, the ".X" suffix will specify a specific screen/device.

So, DISPLAY=:0 usually means "The GPUs in the system."

DISPLAY=:0.0 means "The first configured screen/GPU" - I think it's actually screen, but with one screen configured per card, it's the same.

DISPLAY=:0.1 means "The second configured screen/GPU."

That can be used to address specific cards.

However, none of it *should* be relevant to compute. It's because AMD hacked up a truly odd way to address their cards.