Running VisionWorks Samples and Demos

Hello!

I am trying to follow the VisionWorks guide, VisionWorks Toolkit Reference November 01, 2017 | 1.6 Release:

I used:
$ /usr/share/visionworks/sources/install-samples.sh ~/
$ cd ~/VisionWorks--Samples/
$ make -j4 # add dbg=1 to make debug build

so far so good … BUT:

$ export DISPLAY=:9
$ X -ac &

gives error:

nvidia@tegra-ubuntu:~$ export DISPLAY=:9
nvidia@tegra-ubuntu:~$ X -ac &
[1] 2561
nvidia@tegra-ubuntu:~$ (EE)
Fatal server error:
(EE) Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)

[1]+ Exit 1 X -ac
nvidia@tegra-ubuntu:~$ ps aux | grep cat /tmp/.X0-lock
systemd+ 386 0.0 0.0 77304 1924 ? Ssl 15:26 0:00 /lib/systemd/systemd-timesyncd
root 924 10.2 0.5 50479780 44712 tty7 Ss+ 15:26 0:20 /usr/lib/xorg/Xorg -core :0 -seat seat0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch
nvidia 1804 0.0 0.0 5924 3400 ? S 15:26 0:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
nvidia 3361 0.0 0.0 5548 556 pts/16 S+ 15:30 0:00 grep --color=auto 924
nvidia@tegra-ubuntu:~$

… Even though i used a ‘9’ instead of a zero. Using a ‘0’ also gives same error.

Anybody got any ideas?
I visited: FAQErrorMessages , but no obvious solution, to me at least!

Thanks!

It seems like a bug that you would use “:9” and it would complain about “:0”. Most people would have only the first X server, so if “:0” had been hard wired perhaps it was never noticed.

So far as “:0” goes, was the same user who ran this sample also logged in to the GUI at the time of failure? The “:0” just names the first X server, but this will be refused if a different user is logged in (a security thing). If the GUI isn’t logged in at all, then “:0” isn’t valid at all.

If you do log in to the GUI, using the same user as you use for running your program, what do you see from:

echo $DISPLAY

How was the user who ran the command line program logged in to the TX2 (e.g., ssh, direct GUI, so on)?

Thanks for reply.
I opened a terminal and ran:

nvidia@tegra-ubuntu:~$ echo $DISPLAY
:0
nvidia@tegra-ubuntu:~$

There is another user (ubuntu), but i never use this. I only use ‘nvidia’.

How do i log into the GUI? Is it with: sudo service lightdm start ?

Also, Ive seen this:

startx – :1

to start a server with display number 1. If you are sure there is no other server running on your system and above ps command indicates that no server with this PID is running, you should remove the file /tmp/.X0-lock by doing (as ‘root’):

rm -rf /tmp/.X0-lock

If I use above command will it destroy my system?

I ran '$ startx – :0 …

nvidia@tegra-ubuntu:~$ startx – :0

(EE)
Fatal server error:
(EE) Server is already active for display 0
If this server is no longer running, remove /tmp/.X0-lock
and start again.
(EE)
(EE)
Please consult the The X.Org Foundation support
at http://wiki.x.org
for help.
(EE)
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server “:0”
after 7 requests (7 known processed) with 0 events remaining.
Couldn’t get a file descriptor referring to the console
nvidia@tegra-ubuntu:~$

running ‘$ startx – :1’ screen goes blank, comes back on shuts down internet browser and cant launch browser again.

Hi,

Please run VisionWorks directly on the device.

You can find the detail instructions in our document:
➤ VisionWorks API
➤ Samples and Demos
➤ Sample and Demos User Guides
➤ Linux: Building and Running Samples and Demos

[i]-------------------------------------------------
Applies to: ARM devices only. Start the X window manager:

$ export DISPLAY=:0
$ X -ac &
$ blackbox $

Go to the samples directory:

$ cd ~/VisionWorks-<ver>-Samples/sources/bin/[arch]/linux/release

Run each sample of interest by using the name of the sample. For example, to run nvx_demo_feature_tracker, execute:

$ ./nvx_demo_feature_tracker

-------------------------------------------------[/i]

Thanks.

These instructions don’t work. I ended up dragging the file into the terminal and it then produced video images with little dots all over them.