/[pkg-src]/trunk/initscripts-alx/patches/initscripts-0.3.4-r10-alx-hwdetect-add-realvnc-and-tigervnc-support.patch |
Annotation of /trunk/initscripts-alx/patches/initscripts-0.3.4-r10-alx-hwdetect-add-realvnc-and-tigervnc-support.patch
Parent Directory | Revision Log
Revision 1207 -
(hide annotations)
(download)
Wed Dec 1 22:01:05 2010 UTC (13 years, 9 months ago) by niro
File size: 1821 byte(s)
Wed Dec 1 22:01:05 2010 UTC (13 years, 9 months ago) by niro
File size: 1821 byte(s)
-fixed a typo in tigervnc detection
1 | niro | 1203 | --- magellan-initscripts-hwdetect-applied/etc/rc.d/init.d/hwdetect 2010-11-26 10:51:35.000000000 +0100 |
2 | +++ magellan-initscripts-alx/etc/rc.d/init.d/hwdetect 2010-11-26 10:49:04.000000000 +0100 | ||
3 | @@ -30,6 +30,8 @@ | ||
4 | local xserver | ||
5 | local xfconfig | ||
6 | local HAS_VNC | ||
7 | + local HAS_REALVNC | ||
8 | + local HAS_TIGERVNC | ||
9 | |||
10 | # xfree or xorg ? | ||
11 | xserver="$(readlink /usr/X11R6/bin/X)" | ||
12 | @@ -49,6 +51,20 @@ | ||
13 | HAS_VNC="no" | ||
14 | fi | ||
15 | |||
16 | + if [ -f /usr/X11R6/lib/modules/extensions/vnc.so ] | ||
17 | + then | ||
18 | + HAS_REALVNC="yes" | ||
19 | + else | ||
20 | + HAS_REALVNC="no" | ||
21 | + fi | ||
22 | + | ||
23 | niro | 1207 | + if [ -f /usr/X11R6/lib/xorg/modules/extensions/libvnc.so ] |
24 | niro | 1203 | + then |
25 | + HAS_TIGERVNC="yes" | ||
26 | + else | ||
27 | + HAS_TIGERVNC="no" | ||
28 | + fi | ||
29 | + | ||
30 | # show which xserver we going to use | ||
31 | echo -en ${COLOREDSTAR}"Using '${xserver}' as x11-server " | ||
32 | |||
33 | @@ -56,6 +72,12 @@ | ||
34 | if [[ ${HAS_VNC} = yes ]] | ||
35 | then | ||
36 | echo "with vnc enabled ..." | ||
37 | + elif [[ ${HAS_REALVNC} = yes ]] | ||
38 | + then | ||
39 | + echo "with realvnc enabled ..." | ||
40 | + elif [[ ${HAS_TIGERVNC} = yes ]] | ||
41 | + then | ||
42 | + echo "with tigervnc enabled ..." | ||
43 | else | ||
44 | echo "..." | ||
45 | fi | ||
46 | @@ -77,6 +99,8 @@ | ||
47 | echo ' Load "dri"' >> ${xfconfig} | ||
48 | |||
49 | [[ ${HAS_VNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} | ||
50 | + [[ ${HAS_REALVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} | ||
51 | + [[ ${HAS_TIGERVNC} = yes ]] && echo ' Load "vnc"' >> ${xfconfig} | ||
52 | |||
53 | echo 'EndSection' >> ${xfconfig} | ||
54 | |||
55 | @@ -334,6 +358,13 @@ | ||
56 | echo ' Modes "1024x768"' >> ${xfconfig} | ||
57 | echo ' ViewPort 0 0' >> ${xfconfig} | ||
58 | echo ' EndSubsection' >> ${xfconfig} | ||
59 | + | ||
60 | + if [[ ${HAS_REALVNC} = yes ]] || [[ ${HAS_TIGERVNC} = yes ]] | ||
61 | + then | ||
62 | + echo ' Option "SecurityTypes" "VncAuth"' >> ${xfconfig} | ||
63 | + echo ' Option "UserPasswdVerifier" "VncAuth"' >> ${xfconfig} | ||
64 | + echo ' Option "PasswordFile" "/root/.vnc/passwd"' >> ${xfconfig} | ||
65 | + fi | ||
66 | echo 'EndSection' >> ${xfconfig} | ||
67 | |||
68 |