~ubuntu-branches/debian/sid/ltsp/sid

« back to all changes in this revision

Viewing changes to client/screen-session.d/XS00-xorg-conf-functions

  • Committer: Bazaar Package Importer
  • Author(s): Vagrant Cascadian
  • Date: 2009-03-08 15:15:08 UTC
  • mfrom: (34.2.22 upstream) (35.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20090308151508-egxj8cuh2ts3rmd5
Tags: 5.1.64-1
* new upstream version:
  - localapps:
    + use unix sockets for pulseaudio sound connections
    + use default printer settings 
  - improvements to sound volume code that works with arbitrary audio
    channels
  - xorg configuration: fix code that sets VideoRam 

* ltsp-server-standalone:
  - depend on ldm-server

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
write_screen() {
 
2
    num=${1:-0}
 
3
    #eval screen_hacks=\$screen_hacks_$num
 
4
    [ -z "$screen_hacks" ] && [ -z "$monitor_hacks" ] && [ -z "$display_hacks" ] && return
 
5
    echo "Section \"Screen\""
 
6
    echo "    Identifier \"Screen${num}\""
 
7
    if [ -n "$monitor_hacks" ]; then
 
8
        # force the monitor definition if revelent monitor settings are
 
9
        # desired, otherwise X.org may just use built-in defaults for monitor
 
10
        # settings
 
11
        echo "    Monitor \"Monitor${num}\""
 
12
    fi
 
13
 
 
14
    write_display || true
 
15
 
 
16
    for i in ${screen_hacks}; do
 
17
        ${i} || true
 
18
    done
 
19
 
 
20
    echo "EndSection"
 
21
}
 
22
 
 
23
write_monitor() {
 
24
    num=${1:-0}
 
25
    #eval monitor_hacks=\$monitor_hacks_$num
 
26
    [ -z "$monitor_hacks" ] && return
 
27
    echo "Section \"Monitor\""
 
28
    echo "    Identifier \"Monitor${num}\""
 
29
 
 
30
    for i in ${monitor_hacks}; do
 
31
        ${i} || true
 
32
    done
 
33
 
 
34
    echo "EndSection"
 
35
}
 
36
 
 
37
write_device() {
 
38
    num=${1:-0}
 
39
    #eval device_hacks=\$device_hacks_$num
 
40
    [ -z "$device_hacks" ] && return
 
41
    echo "Section \"Device\""
 
42
    echo "    Identifier \"Device${num}\""
 
43
 
 
44
    for i in ${device_hacks}; do
 
45
        ${i} || true
 
46
    done
 
47
 
 
48
    echo "EndSection"
 
49
}
 
50
 
 
51
write_module() {
 
52
    [ -z "$module_hacks" ] && return
 
53
    echo "Section \"Module\""
 
54
 
 
55
    for i in ${module_hacks}; do
 
56
        ${i} || true
 
57
    done
 
58
 
 
59
    echo "EndSection"
 
60
}
 
61
 
 
62
write_display() {
 
63
    [ -z "$display_hacks" ] && return
 
64
    echo '    SubSection "Display"'
 
65
    for x in $display_hacks ; do
 
66
        ${x} || true
 
67
    done
 
68
    echo '    EndSubSection'
 
69
}
 
70
 
 
71
write_xorg_conf(){
 
72
    # For now, we will only do one screen, monitor, and device
 
73
    # under the assumption that multiple-head issues should
 
74
    # be handled exclusively by xrandr
 
75
    write_screen 0
 
76
    write_monitor 0
 
77
    write_device 0
 
78
    write_module
 
79
}