Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to start another X session (or get copy of the screen) on the monitor connected do DL-165 USB video card?

312 views
Skip to first unread message

wzab

unread,
Oct 8, 2012, 9:49:14 AM10/8/12
to
Hi,

Unfortunately the VGA output in my laptop got destroyed by damaged VGA
projector in one of lecture rooms .
To be able to make presentations for my students, I have bought the
DL-165 based USB video card.
It works perfectly in Windows, however I'd like to be able to make
presentations from Linux (as they involve use of Linux-specific
software).

I've compiled kernel with udlfb support.
I was able to run the X server from the console but only as root:
#fbset -fb /dev/fb1 1024x768-60
#startx -- -config /etc/X11/xorg-dl.conf
(the contents of the conf file is attached)

What I'd like to achieve is to run the X session as the normal user
(which fails with error:
$startx -- -config /etc/X11/xorg-dl.conf
Fatal server error:
Cannot move old log file "/var/log/Xorg.1.log" to "/var/log/Xorg.
1.log.old"

or when I specify another log file location:

$startx -- -config /etc/X11/xorg-dl.conf -logfile /tmp/X1.log
Fatal server error:
xf86OpenConsole: cannot open /dev/tty0 (No such file or directory)

)

In fact even more preferrable solution would be to have a copy of my
main laptop screen on the DL-165 display (which was obtained via
"duplicate" mode when the VGA output was working yet).

Could someone suggest me some hints?
I don't want to install any closed source binaries.
It seems that the fbdev xserver handles the DL-165 correctly, and the
intel xserver handles my internal card correctly, so probably the only
problem is configuration?
May be it can be done with the Xvnc copying my main screen to the
DL-165?

TIA & Regards,
WZab

/etc/X11/xorg-dl.conf follows:

Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
# Screen 1 "Screen1" RightOf "Screen0"
# Screen 2 "Screen2" RightOf "Screen1"
# Screen 3 "Screen3" RightOf "Screen2"
# Screen 4 "Screen4" RightOf "Screen3"
# Screen 5 "Screen5" RightOf "Screen4"
InputDevice "Touchpad0" "CorePointer"
#InputDevice "Mouse0" "SendCoreEvents"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
FontPath "/usr/share/fonts/X11/cyrillic"
FontPath "/usr/share/fonts/X11/100dpi/:unscaled"
FontPath "/usr/share/fonts/X11/75dpi/:unscaled"
FontPath "/usr/share/fonts/X11/Type1"
FontPath "/usr/share/fonts/X11/100dpi"
FontPath "/usr/share/fonts/X11/75dpi"
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "built-ins"
EndSection

Section "Module"
Load "dri2"
Load "glx"
Load "record"
Load "dri"
Load "extmod"
Load "dbe"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Touchpad0"
Driver "synaptics"
Option "Protocol" "alps"
Option "Device" "/dev/psaux"
Option "SHMConfig" "on"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor1"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor2"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor3"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor4"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection

Section "Monitor"
Identifier "Monitor5"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
EndSection


Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz",
### <percent>: "<f>%"
### [arg]: arg optional
#Option "ShadowFB" # [<bool>]
#Option "Rotate" # <str>
Option "fbdev" "/dev/fb1" # <str>
#Option "debug" # [<bool>]
Identifier "Card1"
Driver "fbdev"
BusID "USB"
EndSection

Section "Screen"
Identifier "Screen0"
Device "Card1"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "Card1"
Monitor "Monitor1"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen2"
Device "Card2"
Monitor "Monitor2"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen3"
Device "Card3"
Monitor "Monitor3"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen4"
Device "Card4"
Monitor "Monitor4"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

Section "Screen"
Identifier "Screen5"
Device "Card5"
Monitor "Monitor5"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection

wzab

unread,
Oct 8, 2012, 9:58:01 AM10/8/12
to
I have achieved some limited success by:
1. Starting the xvncserver in my normal Xsession
2. connecting the Xvncviewer to the server.
xvncviewer -Shared localhost:5901
3. Starting the directvnc in the console (unfortunately only as a
root!):
./directvnc localhost:1 -p my_vnc_password -s --dfb:fbdev=/dev/
fb1,mode=1024x768

Afterwards the image of my VNC served session appeared on the monitor/
projector connected to the DL-165 device.
I was able to use keyboard and mouse in this session (however the
internal display was black).

When I switched again to my Xsession, I was able to control the served
session, and see it on the internal display, but the image sent to the
DL-165 stopped to be updated.
When I switched back to the virtual console where the directvnc was
started, I could see the following messages:

(!) DirectFB/Genefx: Could not lock source!
--> Object is suspended!
(!) DirectFB/Genefx: Could not lock source!
--> Object is suspended!

Regards,
WZab


PS. To be able to start the directvnc, I had to modify it's source and
recompile:

line 40 and next in the main.c:
Instead of:
if (!modmap_read_file(opt.modmapfile)) {
printf("Couldn't parse the keyboard mapping file %s. Exiting
\n",opt.modmapfile);
exit(0);
}
There must be:
if (modmap_read_file(opt.modmapfile)) {
printf("Couldn't parse the keyboard mapping file %s. Exiting
\n",opt.modmapfile);
exit(0);
}


wzab

unread,
Oct 8, 2012, 10:16:43 AM10/8/12
to
I've checked yet another approach. After the xvncserver is started
from my main X session (as in the preovious message), I've started
the second X server in the console (with the xorg-dl.conf config file
attached to the first message), asking it to run the xvncviewer:

#startx /root/dl165-xvnc -- -config /home/wzab/xusb/xorg-dl.conf

where the /root/dl165-xvnc contains simply:

#!/bin/bash
xvncviewer localhost:5901 -passwd ~user/.vnc/passwd -Shared

However, again - the started xvncviewer works only until I switch the
console to access my main X session.

Afterwards, the DL165 generated image stops refreshing, even though
the second X server is still running.

The idea to have presentation in a separate window was quite
interesting (as then I can have the presentation window open together
with my "private" windows not visible to the audience - e.g. with my
notes, comments, background calculations and so on...)

Unfortunately it can't be done until I find how to keep the image in
the second xserver/xvncviewer refreshing...
--
Regards,
WZab

Thomas Richter

unread,
Oct 9, 2012, 3:21:48 AM10/9/12
to
Am 08.10.2012 15:49, schrieb wzab:
> Hi,
>
> Unfortunately the VGA output in my laptop got destroyed by damaged VGA
> projector in one of lecture rooms .
> To be able to make presentations for my students, I have bought the
> DL-165 based USB video card.
> It works perfectly in Windows, however I'd like to be able to make
> presentations from Linux (as they involve use of Linux-specific
> software).
>
> I've compiled kernel with udlfb support.
> I was able to run the X server from the console but only as root:
> #fbset -fb /dev/fb1 1024x768-60
> #startx -- -config /etc/X11/xorg-dl.conf
> (the contents of the conf file is attached)
>
> What I'd like to achieve is to run the X session as the normal user
> (which fails with error:
> $startx -- -config /etc/X11/xorg-dl.conf
> Fatal server error:
> Cannot move old log file "/var/log/Xorg.1.log" to "/var/log/Xorg.
> 1.log.old"
>
> or when I specify another log file location:
>
> $startx -- -config /etc/X11/xorg-dl.conf -logfile /tmp/X1.log
> Fatal server error:
> xf86OpenConsole: cannot open /dev/tty0 (No such file or directory)


Don't start it as regular user, then. Instead, make a small script that
does what you need to do, and add an entry into /etc/sudoers to allow
you to run the script without requesting a password, and write a second
script that runs the first via sudo.

Greetings,
Thomas

Henrik Carlqvist

unread,
Oct 9, 2012, 4:15:47 AM10/9/12
to
On Tue, 09 Oct 2012 09:21:48 +0200, Thomas Richter wrote:
> Don't start it as regular user, then. Instead, make a small script that
> does what you need to do, and add an entry into /etc/sudoers to allow
> you to run the script without requesting a password, and write a second
> script that runs the first via sudo.

Another, perhaps more simple solution, is to set the suid bit of the
binary executable that is called by the startx script. Something like:

chmod u+s /usr/bin/Xorg

regards Henrik
--
The address in the header is only to prevent spam. My real address is:
hc351(at)poolhem.se Examples of addresses which go to spammers:
root@localhost postmaster@localhost

wza...@gmail.com

unread,
Feb 23, 2014, 8:45:34 AM2/23/14
to
Finally I have found a way to start the X-server for presentation, using the DL-165 USB Video adapter.

In my main X-windows session (e.g. KDE) in the console I perform "su" to obtain root permissions, and I run:
# fbset -fb /dev/fb1 1024x768-60
# X -config /home/wzab/displaylink_lecture/wzab-displaylink.conf -sharevts :2

The first command sets the frame buffer asociated with the DL-165 to 60Hz vertical refresh rate, as this is what my projector accepts.

The wzab-displaylink.conf has the following contents:
============= START of file =========
Section "Device"
Identifier "dl1"
#driver "displaylink"
driver "fbdev"
Option "fbdev" "/dev/fb1"
EndSection

Section "InputDevice"
Identifier "Generic Keyboard"
Driver "void"
Option "CoreKeyboard"
EndSection

Section "InputDevice"
Identifier "Configured Mouse"
Driver "void"
Option "CorePointer"
EndSection

Section "Monitor"
Identifier "monitor0"
EndSection

Section "Screen"
Identifier "screen0"
Device "dl1"
Monitor "monitor0"
#DefaultDepth 24
EndSection

Section "ServerLayout"
Identifier "multihead"
Screen "screen0"
InputDevice "Generic Keyboard" "CoreKeyboard"
InputDevice "Configured Mouse" "CorePointer"
Option "AutoAddDevices" "Off"
EndSection
============ END of file ==========

In another console (as the normal user) I ran the following script:
============ START of file ========
#!/bin/sh
export DISPLAY=:2
unset SESSION_MANAGER
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xfce4-session &
x11vnc -localhost -display :2
============ END of file ==========

It starts the Xfce session in the server and starts the VNC server.
The VNC server reports the number of assigned VNC display:

The VNC desktop is: localhost:0
PORT=5900

So finally I can connect to my VNC server (from yet another console):
$ xvncviewer -geometry 1024x768 localhost:0

After that I have my presentation screen in one window, in which I can start my presentation with the PDF viewer or LibreOffice, or I can run programs, which I can show to my students.

At the same time I still have my normal X session, invisible for the audience,
in which I can display my notes or perform background calculations.

Probably the above setup can be done in a more convenient way, without involving three different consoles...
--
Regards,
Wojtek

wza...@gmail.com

unread,
Mar 15, 2015, 2:41:36 PM3/15/15
to
Last time I have faced a situation, where the projector used for presentation had higher resolution than my laptop. It resulted in necessity to scroll presentation screen to access menu or toolbar, which was very inconvenient during a lecture.

After some unsuccessful attempts to force the projector to use one of lower resolutions acceptable for the LCD screen of my laptop, I have found, that I can use the "-scale" option in x11vnc. So the vnc server should be started as follows (for 1024x768 desired resolution):

x11vnc -localhost -scale 1024x768 -display :2

The solution is not perfect, as the desktop image is a little blurred (on the laptop, not on the screen), but I can easily navigate through my presentation and demo applications.

Regards,
Wojtek
0 new messages