Browse Source

Added KDE3 version of KDE Guidance utilities

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kde-guidance@1102646 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 12 years ago
commit
19ae07d0d4
  1. 280
      COPYING
  2. 334
      ChangeLog
  3. 21
      MANIFEST.in
  4. 15
      Makefile.am
  5. 189
      README
  6. 48
      README.developers
  7. 294
      TODO
  8. 135
      displayconfig-TODO
  9. 11
      displayconfig/40guidance-displayconfig_restore
  10. 340
      displayconfig/ScanPCI.py
  11. 132
      displayconfig/displayconfig-hwprobe.py
  12. 324
      displayconfig/displayconfig-restore.py
  13. 49
      displayconfig/displayconfig.desktop
  14. 1756
      displayconfig/displayconfig.py
  15. 3230
      displayconfig/displayconfigabstraction.py
  16. 741
      displayconfig/displayconfighardwaretab.py
  17. 809
      displayconfig/displayconfigwidgets.py
  18. 1054
      displayconfig/driver-options.txt
  19. 86
      displayconfig/energy.py
  20. BIN
      displayconfig/energystar.png
  21. 47
      displayconfig/execwithcapture.py
  22. 39
      displayconfig/extramodes
  23. 297
      displayconfig/infimport.py
  24. 155
      displayconfig/ktimerdialog.py
  25. 2505
      displayconfig/ldetect-lst/Cards+
  26. 5618
      displayconfig/ldetect-lst/MonitorsDB
  27. 8017
      displayconfig/ldetect-lst/pcitable
  28. BIN
      displayconfig/monitor.png
  29. 113
      displayconfig/servertestdialog.py
  30. 110
      displayconfig/vesamodes
  31. BIN
      displayconfig/videocard.png
  32. 66
      displayconfig/widescreenmodes
  33. 15
      displayconfig/xconfig-test.py
  34. 903
      displayconfig/xorgconfig.py
  35. 555
      doc/en/index.docbook
  36. 49
      grubconfig/grubconfig.desktop
  37. 697
      grubconfig/grubconfig.py
  38. BIN
      kde/displayconfig/pics/16x16/displayconfig.png
  39. BIN
      kde/displayconfig/pics/colors.png
  40. BIN
      kde/displayconfig/pics/display_1280x1024.png
  41. BIN
      kde/displayconfig/pics/dualhead/monitor_1.png
  42. BIN
      kde/displayconfig/pics/dualhead/monitor_2.png
  43. BIN
      kde/displayconfig/pics/energystar.png
  44. BIN
      kde/displayconfig/pics/gammapics/MGam14.gif
  45. BIN
      kde/displayconfig/pics/gammapics/MGam14.png
  46. BIN
      kde/displayconfig/pics/gammapics/MGam16.gif
  47. BIN
      kde/displayconfig/pics/gammapics/MGam16.png
  48. BIN
      kde/displayconfig/pics/gammapics/MGam18.gif
  49. BIN
      kde/displayconfig/pics/gammapics/MGam18.png
  50. BIN
      kde/displayconfig/pics/gammapics/MGam20.gif
  51. BIN
      kde/displayconfig/pics/gammapics/MGam20.png
  52. BIN
      kde/displayconfig/pics/gammapics/MGam22.gif
  53. BIN
      kde/displayconfig/pics/gammapics/MGam22.png
  54. BIN
      kde/displayconfig/pics/gammapics/MGam24.gif
  55. BIN
      kde/displayconfig/pics/gammapics/MGam24.png
  56. BIN
      kde/displayconfig/pics/hi32-display.png
  57. BIN
      kde/displayconfig/pics/hi32-gfxcard.png
  58. BIN
      kde/displayconfig/pics/monitor_resizable/background.png
  59. BIN
      kde/displayconfig/pics/monitor_resizable/background_r90.png
  60. BIN
      kde/displayconfig/pics/monitor_resizable/background_wide.png
  61. BIN
      kde/displayconfig/pics/monitor_resizable/background_wide_r90.png
  62. BIN
      kde/displayconfig/pics/monitor_resizable/monitor.png
  63. BIN
      kde/displayconfig/pics/monitor_resizable/monitor_r90.png
  64. BIN
      kde/displayconfig/pics/monitor_resizable/monitor_wide.png
  65. BIN
      kde/displayconfig/pics/monitor_resizable/monitor_wide_r90.png
  66. BIN
      kde/displayconfig/pics/monitor_resizable/window_4th.png
  67. BIN
      kde/displayconfig/pics/monitor_resizable/window_bottom_left_4th.png
  68. BIN
      kde/displayconfig/pics/monitor_resizable/window_bottom_right_4th.png
  69. BIN
      kde/mountconfig/pics/16x16/disksfilesystems.png
  70. BIN
      kde/mountconfig/pics/exec.png
  71. BIN
      kde/mountconfig/pics/file.png
  72. BIN
      kde/mountconfig/pics/greenled.png
  73. BIN
      kde/mountconfig/pics/greyled.png
  74. BIN
      kde/mountconfig/pics/hi16-blockdevice.png
  75. BIN
      kde/mountconfig/pics/hi16-burner.png
  76. BIN
      kde/mountconfig/pics/hi16-cdrom.png
  77. BIN
      kde/mountconfig/pics/hi16-floppy.png
  78. BIN
      kde/mountconfig/pics/hi16-hdd.png
  79. BIN
      kde/mountconfig/pics/hi16-lock.png
  80. BIN
      kde/mountconfig/pics/hi16-memory.png
  81. BIN
      kde/mountconfig/pics/hi16-network.png
  82. BIN
      kde/mountconfig/pics/hi16-password.png
  83. BIN
      kde/mountconfig/pics/hi16-usbpen.png
  84. BIN
      kde/mountconfig/pics/hi32-samba.png
  85. BIN
      kde/mountconfig/pics/important.png
  86. BIN
      kde/mountconfig/pics/kcmpartitions.png
  87. BIN
      kde/mountconfig/pics/kde1.png
  88. BIN
      kde/mountconfig/pics/kde2.png
  89. BIN
      kde/mountconfig/pics/kde3.png
  90. BIN
      kde/mountconfig/pics/kde4.png
  91. BIN
      kde/mountconfig/pics/kde5.png
  92. BIN
      kde/mountconfig/pics/kde6.png
  93. BIN
      kde/mountconfig/pics/laserwarn.png
  94. BIN
      kde/mountconfig/pics/tux.png
  95. BIN
      kde/mountconfig/pics/user.png
  96. BIN
      kde/powermanager/pics/ac-adapter.png
  97. 982
      kde/powermanager/pics/ac-adapter.svg
  98. BIN
      kde/powermanager/pics/battery-charging-000.png
  99. BIN
      kde/powermanager/pics/battery-charging-010.png
  100. BIN
      kde/powermanager/pics/battery-charging-020.png
  101. BIN
      kde/powermanager/pics/battery-charging-030.png
  102. BIN
      kde/powermanager/pics/battery-charging-040.png
  103. BIN
      kde/powermanager/pics/battery-charging-050.png
  104. BIN
      kde/powermanager/pics/battery-charging-060.png
  105. BIN
      kde/powermanager/pics/battery-charging-070.png
  106. BIN
      kde/powermanager/pics/battery-charging-090.png
  107. BIN
      kde/powermanager/pics/battery-charging-100.png
  108. BIN
      kde/powermanager/pics/battery-discharging-000.png
  109. BIN
      kde/powermanager/pics/battery-discharging-010.png
  110. BIN
      kde/powermanager/pics/battery-discharging-020.png
  111. 662
      kde/powermanager/pics/battery-discharging-020.svg
  112. BIN
      kde/powermanager/pics/battery-discharging-030.png
  113. BIN
      kde/powermanager/pics/battery-discharging-040.png
  114. BIN
      kde/powermanager/pics/battery-discharging-050.png
  115. BIN
      kde/powermanager/pics/battery-discharging-060.png
  116. BIN
      kde/powermanager/pics/battery-discharging-070.png
  117. BIN
      kde/powermanager/pics/battery-discharging-090.png
  118. BIN
      kde/powermanager/pics/battery-discharging-100.png
  119. 1350
      kde/powermanager/pics/battery_charging_0.svg
  120. 3551
      kde/powermanager/pics/battery_charging_1.svg
  121. 2822
      kde/powermanager/pics/battery_charging_2.svg
  122. 2093
      kde/powermanager/pics/battery_charging_3.svg
  123. 1364
      kde/powermanager/pics/battery_charging_4.svg
  124. 2822
      kde/powermanager/pics/battery_charging_5.svg
  125. 3551
      kde/powermanager/pics/battery_charging_6.svg
  126. 1364
      kde/powermanager/pics/battery_charging_7.svg
  127. 2093
      kde/powermanager/pics/battery_charging_8.svg
  128. 1358
      kde/powermanager/pics/battery_charging_9.svg
  129. 1941
      kde/powermanager/pics/battery_discharging_0.svg
  130. 3343
      kde/powermanager/pics/battery_discharging_1.svg
  131. 4713
      kde/powermanager/pics/battery_discharging_2.svg
  132. 4713
      kde/powermanager/pics/battery_discharging_3.svg
  133. 1964
      kde/powermanager/pics/battery_discharging_4.svg
  134. 3334
      kde/powermanager/pics/battery_discharging_5.svg
  135. 4704
      kde/powermanager/pics/battery_discharging_6.svg
  136. 1964
      kde/powermanager/pics/battery_discharging_7.svg
  137. 3334
      kde/powermanager/pics/battery_discharging_8.svg
  138. 4703
      kde/powermanager/pics/battery_discharging_9.svg
  139. BIN
      kde/powermanager/pics/processor.png
  140. 272
      kde/powermanager/pics/processor.svg
  141. BIN
      kde/serviceconfig/pics/16x16/daemons.png
  142. BIN
      kde/serviceconfig/pics/hi32-app-daemons.png
  143. BIN
      kde/serviceconfig/pics/laserwarn.png
  144. BIN
      kde/userconfig/pics/16x16/userconfig.png
  145. BIN
      kde/userconfig/pics/hi16-encrypted.png
  146. BIN
      kde/userconfig/pics/hi32-group.png
  147. BIN
      kde/userconfig/pics/hi32-identity.png
  148. BIN
      kde/userconfig/pics/hi32-password.png
  149. BIN
      kde/userconfig/pics/hi32-user.png
  150. BIN
      kde/wineconfig/pics/16x16/wineconfig.png
  151. 56
      kde/wineconfig/pics/16x16/wineconfig.svg
  152. BIN
      kde/wineconfig/pics/32-wine.png
  153. BIN
      kde/wineconfig/pics/48-wine.png
  154. BIN
      kde/wineconfig/pics/kdewinewizard.png
  155. 516
      modules/ixf86misc.c
  156. 197
      modules/xf86misc.py
  157. 884
      mountconfig/MicroHAL.py
  158. 573
      mountconfig/SMBShareSelectDialog.py
  159. 69
      mountconfig/SimpleCommandRunner.py
  160. 299
      mountconfig/fuser.py
  161. 352
      mountconfig/fuser_ui.ui
  162. 51
      mountconfig/mountconfig.desktop
  163. 3303
      mountconfig/mountconfig.py
  164. 504
      mountconfig/sizeview.py
  165. 1
      package/mandrake/guidance-kcmdisplayconfig
  166. 1
      package/mandrake/guidance-kcmmountconfig
  167. 1
      package/mandrake/guidance-kcmserviceconfig
  168. 1
      package/mandrake/guidance-kcmuserconfig
  169. 79
      package/mandrake/guidance.spec
  170. 49
      powermanager/TODO
  171. 6
      powermanager/g-p-m-restart
  172. 147
      powermanager/gpmhelper.py
  173. 35
      powermanager/guidance-power-manager.desktop
  174. 1134
      powermanager/guidance-power-manager.py
  175. 241
      powermanager/guidance_power_manager_ui.py
  176. 530
      powermanager/guidance_power_manager_ui.ui
  177. 35
      powermanager/hal-test.py
  178. 68
      powermanager/notify.py
  179. 75
      powermanager/notify.ui
  180. 606
      powermanager/powermanage.py
  181. 924
      powermanager/powermanager_ui.ui
  182. 6
      powermanager/recompile-ui-files
  183. 57
      powermanager/tooltip.py
  184. 53
      powermanager/tooltip.ui
  185. BIN
      review_guidance_malaga.pdf
  186. 50
      serviceconfig/serviceconfig.desktop
  187. 1481
      serviceconfig/serviceconfig.py
  188. 2
      setup.cfg
  189. 208
      setup.py
  190. 5
      uninstall_rude.py
  191. 1154
      userconfig/unixauthdb.py
  192. 49
      userconfig/userconfig.desktop
  193. 1753
      userconfig/userconfig.py
  194. 122
      wineconfig/drivedetect.py
  195. 326
      wineconfig/firstrunwizard.py
  196. 156
      wineconfig/kcm_wineconfig.cpp
  197. 57
      wineconfig/wineconfig.desktop
  198. 3552
      wineconfig/wineconfig.py
  199. 543
      wineconfig/wineread.py
  200. 489
      wineconfig/winewrite.py

280
COPYING

@ -0,0 +1,280 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

334
ChangeLog

@ -0,0 +1,334 @@
- Handle "ain't got no cpufreq" more gracefully (Malone bug # 99198)
- Fix typo in mountconfig that lead to a crash (Malone bug # 87861)
- BUG: Fix detection of the nvidia proprietary driver (Malone bug #104860)
- BUG: Displayconfig and displayconfig-restore.py would crash in combination
with later versions Xorg if the xrandr extension was not available.
(Malone bug #91545)
* Wednesday 29 March 2007 Simon Edwards <simon@simonzone.com>
- version 0.8
- Deal with AttributeError in displayconfigabstraction (Malone bug #94108)
- Add menu to choose CPU frequency policy manually
- Handle problems not being able to read the filesystem label gracefully
- Make displayconfig-restore not crash on incorrect modelines (Malone bug # 76393)
- Make displayconfig a little smarter when the preferred resolution can't be found
- Make wineconfig not crash on empty fstab lines
- Fix the fuser frontend in mountconfig to actually work again.
- Handle ZeroDivisionError in displayconfig gracefully (Malone bug #77844)
- Support for LABEL in fstab added to mountconfig, improved support for
UUID.
- Support for changing CPU frequency policy with HAL added to powermanager.
- Suspend after N minutes idle added to powermanager
- Added an option to not lock screen on resume (Malone bug # 64650)
- Handle crash in userconfig due to problems with locale (Malone bug #65739)
- Support for UUIDs in fstab added to mountconfig.
- grubconfig added. (Martin Böhm)
* Tuesday 6 March 2007 Simon Edwards <simon@simonzone.com>
- version 0.7.1
- BUG: Fixed typo in userconfig.py. (thanks to Rocco Stanzione)
- BUG: Fix double hibernate call on lid close. (Malone bug #65885)
- BUG: Change CHARGE_LEVEL_THRESHOLD to 10% (was 50%) to better workaround
acpi issue. when remaining_time is not reported correctly. Also use
threshold for battery low notification warning. (Malone bug #64752,
#67081)
- BUG: Handle error in locale.getpreferredencoding gracefully. (Malone bug
#65739)
- BUG: DPMS settings had not been saved on Apply, do that.
- BUG: Fix crash where cpu frequency scaling is not readable.
- BUG: Fix unicode and localisation handling in targetgamma, do a better job
choosing the right resolutions for example for nvidia twinview and other
unusual resolutions.
- BUG: Powermanager, first read config, then adapt the state of the UI from
those values.
- BUG: Don't crash displayconfig-restore when screenwidth and height are
bogus, use a sensible value of 96 instead. (Malone bug #77844)
- BUG: Make displayconfig-restore not crash on unknown modelines.
- BUG: Make tempfile handling more robust by using Python's tempfile.
- BUG: Check for None groupids in userconfig.
- BUG: Clear password edit after exiting the edit dialog in userconfig.
- BUG: Make AC adapter detection more robust to potential failure of
actions. (Malone bug #77091)
- BUG: permissions on groupfile should've been read, before they can be set.
- BUG: Check for valid groupid when selecting in userconfig.
- BUG: gamma settings were not being restored after logging in.
- BUG: A rounding error was causing problems in displayconfig when filtering
resolutions by the selected monitor.
- BUG: Displayconfig, userconfig and wineconfig didn't handle RTL desktops
correctly. (Diego lastrubni)
- BUG: Displayconfig would sometimes consider some widescreen modes as being
standand aspect ratio.
- BUG: Displayconfig would sometimes fail to set Display virtual size in
xorg.conf.
- BUG: Stopped displayconfig from stacktracing when it encounters a
degenerate gfx card + monitor combination that has no valid resolutions.
* Thursday 12 October 2006 Simon Edwards <simon@simonzone.com>
- version 0.7
- BUG: Don't bail out of laptop-detect is not there (Malone bug #60309)
- BUG: mountconfig.py didn't handle USB disks correctly. (KDE bug #132390)
- BUG: Disable double click opening items in mountconfig if the user is not
root.
- BUG: Don't bail out if the device section is already there (Malone bug #50411)
- BUG: Don't show new_user in the secondary groups (Malone bug #44203)
- BUG: userconfig set wrong uid for new users (Malone bug #56275)
- BUG: serviceconfig.py would sometimes fail on non-English systems.
(Malone bug #43313).
- BUG: userconfig would sometimes fail when writing the shadow password file.
(Malone bug #47090)
- BUG: userconfig would fail if the password warning field in /etc/shadow was
empty. (Malone bug #47317)
- Changed a couple of labels in order to match the new system-settings spec:
https://wiki.kubuntu.org/KubuntuSystemSettingsUsability
- mountconfig now uses CIFS for Windows Shares instead of obsolete smbfs.
(Martin Böhm)
- Displayconfig now hides useless Monitor Orientation and Second Screen group
box options which can never be activated without changing hardware or the
X driver.
- Simplified the color and gamma tab in displayconfig.
- BUG: Better detection for dualhead intel chips in displayconfig.
- Updated the data files for displayconfig from
http://cvs.mandriva.com/cgi-bin/viewvc.cgi/soft/ldetect-lst/trunk/lst/?root=svn
- wineconfig added for configuring Wine. (Yuriy Kozlov)
- powermanager applet added for monitoring laptop power levels (Sebastian
Kügler)
* Saturday 13 May 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.7
- Dutch translation added (Rinse de Vries)
- BUG: Displayconfig would fail if the monitor frequency settings in xorg.conf
contained extra spaces. (Malong bug #38692)
- BUG: Displayconfig would not add the lowest screen resolution available to
the modes list in the xorg.conf's Screen section/Display subsection.
- French translation added from Launchpad Rossetta.
* Friday 28 April 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.6
- BUG: Serviceconfig didn't correctly remove links in runlevel directories.
(Malone bug #39404)
- BUG: In Serviceconfig, toggling the "Start during boot" checkbox using the
context menu would fail. (Malone bug #34252)
- BUG: displayconfig-restore.py was would fail with "global name 'syslog'
undefined". (Malone bug #40683)
- BUG: Displayconfig had trouble picking a driver gfxcard model entry instead
of the detected default (e.g. VESA). (Malone bug #41127)
- BUG: Displayconfig would fail when writing out a xorg.conf that contained
non-ascii characters. (Malone bug #41474)
- Work around for an annoying bug in PyQt/PyKDE that causes the tools to
crash on exit if a dialog window has been used.
- BUG: The file paths used in displayconfig for checking for the proprietary
nvidia driver were wrong or out of date.
* Tuesday 18 April 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.5
- BUG: services that have not been installed via apt would cause long loops
a lot of dpkg queries. Only query dpkg db once.
- BUG: Serviceconfig's Apply button doesn't work. It should actually be Close
(Malone #38582)
- BUG: Changing an user's password can change another password for a different
user (Malone bug #39444)
- BUG: Displayconfig would fail at startup on systems with an nVidia 7800 GTX.
(Malone bug #32915 for Rob Hughes)
- BUG: Serviceconfig would crash if the windows is closed quickly after
serviceconfig appears.
- BUG: userconfig would fail at startup if an entry in /etc/passwd refered to
a group that is not defined in /etc/group. (Malone bug #34311)
- BUG: Userconifg. Manually typing in or editing the list of secondary groups
for a user had no effect. (Malone bug #37212)
- BUG: Displayconfig fails to detect the presence of the proprietary ATI and
nVidia drivers. (The location of some of the driver files had been recently
changed).
- BUG: displayconfig-restore.py would calculated the needed DPI at login using
stale screen information which would sometimes result in the wrong DPI.
- BUG: Numerious small bugs and compatibility problems in mountconfig.
- BUG: When browsing for a SMB share, mountconfig now correctly catches the
authentication information entered by the user into the smaller popup from
kio.
- Displayconfig now assumes that dualhead/clone mode is supported if the
laptop-detect script detects a laptop.
- Displayconfig now uses the clone mode support in the i810 driver.
- Displayconfig now only offers resolutions that both monitors support when
using clone mode.
- Displayconfig now supports clone mode on any setup that also supports
xinerama.
- BUG: Mountconfig failed to take into account that the order of the
user/users, exec/noexc, suid/nosuid etc options in /etc/fstab is significant.
(thanks Christoph Wiesen)
- French translations added to the desktop files. (Anthony Mercatante)
* Sunday 2 April 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.4
- BUG: All of the tools no longer write out config files under ~/.kde when
running as root. This should stop the annoying creation of config files
that can't be overwritten by the normal user.
- Userconfig is now by default not quite as tall. This should help stop
it from appearing too big in systemsettings.
- Displayconfig updated to also recognise late model nVidia chipsets.
- BUG: Displayconfig didn't support Clone mode for the proprietary nVidia
driver.
- BUG: The tools now correctly specify which translation catalogue to use for
translations.
- The screen images in the dualhead widget make better use of available widget
space.
- Displayconfig: The 40guidance-displayconfig_restore script which is used by
the Xsession script during login via KDM/xdm, has now been fixed to not stop
the login in case of failure.
- BUG: Displayconfig was getting confused by unknown graphics cards and
crashing. (Malone bug #32915)
- BUG: Displayconfig still can't handling unicode in xorg.conf. (Malone bug
#34437).
- BUG: Displayconfig is now more forgiving when xorg.conf contains characters
that are illegal with respect to the system character encoding. (Malone bug
#36590).
- BUG: Displayconfig would have trouble detecting hardware on the PCI bus on
big endian architectures. (raphink)
- BUG: Displayconfig did not correctly handle situations where the X RandR
extension is missing.
- BUG: Displayconfig would fail when loading some xorg.conf files containing
multiple graphics card specifications. (Malone bug #37275, patch applied)
- BUG: Userconfig didn't respect the entered UID when creating a account.
(Malone bug #37722).
- Displayconfig: Added 1280x960 modes (60 & 75Hz).
* Friday 17 March 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.3
- BUG: userconfig and unixauthdb didn't respect the ownership of system files
when update /etc/passwd and friends. (Malone bug #26175).
- BUG: userconfig and unixauthdb would fail if /etc/passwd, /etc/groups or
/etc/shadow contained blank lines.
- BUG: displayconfig now does a better job of detecting graphics PCI devices
and handling non-detected graphics cards. Instead of crashing, "generic
VESA" is used when the type of card can't be found. (Malone bug #32915)
- The DPI that displayconfig-restore.py uses at login time can now be
controlled by adding a line to ~/.kde/share/config/displayconfigrc
in the [General] section. Add "dpi=xserver" to use the default DPI
from the X server, or "dpi=100" to use 100 DPI for example.
- BUG: Widescreen modes were missing in displayconfig.
- Displayconfig: Monitors can now be specified as being standard aspect ratio
or widescreen.
- BUG: Using the xresprobe command in displayconfig would crash some people's
machines. The much more safer ddcprobe command is now used.
(Malone bug #33943)
- BUG: A bug is displayconfig stopped monitor model detection. The xresprobe
command didn't actually return the eisa ID of the connected monitor.
ddcprobe does though (see above).
- BUG: Displayconfig. Changes to the monitor model or image format are
shown immediately on the "Size & Orientation" tab, even if the screen is
currently being used.
- BUG: When userconfig asks about whether the home directory should be created
when creating a new account, sometimes the wrong directory name was shown in
the dialog.
- BUG: Powerbook screen mode "1280x854" add to displayconfig. (Malone bug
#34383).
- BUG: Displayconfig would throw an exception if the current display didn't
support DPMS. (Malone bug #34316).
- BUG: Most utilities would fail if they came across UTF-8 or unicode
characters. (Malone bug #34194).
- BUG: Displayconfig wouldn't correctly detect the presence of installed
proprietary drivers. (OculusAquilae)
- BUG: Displayconfig had trouble handling BusID rows in xorg.conf. This would
cause the xorg.conf to be incorrectly read. (Tonio)
- Added some extra methods to ScanPCI.py to aid debugging.
- BUG: Displayconfig would not save the user's display settings when running
in kcontrol or systemsettings. (Malone bug #35257)
* Wednesday 1 March 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.2
- BUG: Small bug in displayconfig that caused it to bug out around the
newCustomMonitor() method.
- BUG: userconfig had space character just before the she-bang which really
caused some trouble the for the shell.
- BUG: Displayconfig: Selecting the "Plug n Play" monitor directly without
clicking on "Detect" meant that only a very small set of resolutions would
be written to xorg.conf.
- BUG: The DPI calculations in displayconfig-restore.py where broken. This
resulted in the wrong DPI being used.
- BUG: Displayconfig: The clone mode option is now correctly disabled for
Matrox cards (mga driver).
- BUG: Displayconfig would bug out if the monitor model in the xorg.conf was
anything other than Plug n Play.
- BUG: Displayconfig would bug out if the DPMS Standby setting was 0 and DPMS
enabled.
- Displayconfig is now shown in kcontrol under settings/hardware instead of
settings/system.
- BUG: Small bug in displayconfig that will causes displayconfig to bug out
when trying to detect the monitor and no EDID info is available.
- BUG: Small cosmetic bug in displayconfig where the some tabs were missing
margins when shown in kcontrol/system settings.
- BUG: displayconfig would bug out when detecting ATI dualhead cards.
(pci_device.text was None).
* Monday 20 February 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.1
- displayconfig-hwprobe.py now saves its scan info in
/var/lib/guidance/guidance-gfxhardware-snapshot.
- "Details..." button added to mountconfig in addition to the context menu for
opening the disk info dialog.
- BUG: serviceconfig: When starting and stopping daemons, the scripts expect a
terminal that understands colours. The command runner dialog doesn't, and
you end up seeing garbage characters. TERM is now set to vt100 when running
commands.
- BUG: displayconfig: Reset button didn't reset all of the parts/fields in the
GUI.
- Detect dualhead Matrox cards.
- displayconfig-restore.py now at login time also chooses and sets a 'sane'
DPI setting used by applications for fonts. More info is in the
displayconfig-restore.py source file.
- BUG: displayconfig-restore.py wasn't restoring the user's display resolution
at login.
- Plug N Play monitors are handled much better and are automatically probed
when neccessary.
* Tuesday 14 February 2006 Simon Edwards <simon@simonzone.com>
- version 0.6.0
- Right mousebutton action for most listviews.
- mountconfig can now handle multi-fs entries.
- i18n() all over the place.
- Dualhead support added to displayconfig.
- displayconfig's hardware database files updated from Mandriva.
- numerous bug fixes.
- displayconfig-hwprobe.py add. This is Ubuntu specific right now, but
what it does is detect hardware changes at boottime and automatically
run "dpkg-reconfigure" to generate a xorg.conf file that will get Xorg
running.
* Tuesday 29 November 2005 Simon Edwards <simon@simonzone.com>
- version 0.5.0
- displayconfig should now work for single head configurations.
- displayconfig has a shiney new preview.
- displayconfig is now usable on low resolution screens.
- DPMS tab cleaned up in displayconfig.
- displayconfig's hardware database files updated from Mandriva.
* Monday 12 September 2005 Simon Edwards <simon@simonzone.com>
- version 0.4.0
- displayconfig has been massively restructured internally.
- numerous bug fixes.
- start of dualhead support in displayconfig.
- When umount fails in mountconfig the option to killing blocking processes
has been added.
- better Debian support in serviceconfig. It now uses apt and dpkg to get
service descriptions.
- ext3 added to mountconfig. :)
- userconfig now respects /etc/useradd.conf
- Now uses PyKDE Extensions for building and installation.
http://www.simonzone.com/software/pykdeextensions/
- DPMS tab added to displayconfig.
* Tuesday 5 April 2005 Simon Edwards <simon@simonzone.com>
- version 0.3.0
- Displayconfig working and also feature complete.
- xf86config C module has been removed and replaced with pure Python.
- Numerous little bugs fixed in the userconfig, mountconfig and serviceconfig.
* Thursday 9 December 2004 Simon Edwards <simon@simonzone.com>
- version 0.2.0
- mountconfig added, beta quality, feature complete.
- displayconfig added, alpha quality, not feature complete.
- userconfig, beta quality, feature complete.
- serviceconfig, beta quality, feature complete.
* Thursday 20 November 2003 Simon Edwards <simon@simonzone.com>
- version 0.1.0
- Initial release.

21
MANIFEST.in

@ -0,0 +1,21 @@
recursive-include kde *.png *.svg
recursive-include doc *.docbook *.png
graft package
prune package/.svn
graft package/mandrake
graft debian
prune package/mandrake/.svn
include README COPYING ChangeLog MANIFEST.in TODO
global-include *.desktop *.py *.pot *.po *.ui
global-exclude *~ .svn
include displayconfig/40guidance-displayconfig_restore
include displayconfig/vesamodes
include displayconfig/extramodes
include displayconfig/widescreenmodes
include displayconfig/ldetect-lst/Cards+
include displayconfig/ldetect-lst/MonitorsDB
include displayconfig/ldetect-lst/pcitable
exclude displayconfig/test.py
exclude displayconfig/xconfig-test.py
exclude displayconfig/popentest.py
exclude displayconfig/guidance_bug_reporter.py

15
Makefile.am

@ -0,0 +1,15 @@
messagesold:
LIST=`find . -name \*.py`; \
if test -n "$$LIST"; then \
xgettext -ki18n -LPython $$LIST -o po/guidance.pot; \
fi
sh /usr/lib/kubuntu-desktop-i18n/findfiles LIST
perl /usr/lib/kubuntu-desktop-i18n/createdesktop.pl --file-list=LIST --base-dir=. > desktop.guidance.tmp
msguniq --to-code=UTF-8 --no-wrap -o desktop.guidance desktop.guidance.tmp 2>/dev/null
python /usr/lib/kubuntu-desktop-i18n/msgsplit desktop.guidance
mv desktop.guidance po/desktop_guidance.pot
rm -f desktop.guidance desktop.guidance.tmp
messages:
true

189
README

@ -0,0 +1,189 @@
!!! Warning: Read this through to the end. These tools can be dangerous. !!!
Guidance 0.8.0
~~~~~~~~~~~~~~
by Simon Edwards <simon@simonzone.com>, Sebastian Kügler <sebas@vizzzion.org>
& Yuriy Kozlov <yuriy.kozlov@gmail.com>, Martin Böhm <martin.bohm@kubuntu.org>
Introduction
------------
Guidance is a collection of system administration tools for Linux/KDE systems
that is designed to be:
* Update to date
* High quality, designed with user friendliness as high priority. (That is
to say that the tools should get the job done quickly, accurately and with
as little effort as possible.)
* Use KDE and "fit in" with KDE.
* Maintainable.
* Free Software
Warning
-------
These tools often require root access and modify important system files in
order to do their job. There is a very real chance that these tools can
destroy your computer and your data. Backup your data! Also especially
backup up /etc/passwd, /etc/shadow and /etc/fstab. If you don't know what
I'm talking about now then you probably shouldn't try using Guidance yet.
You should have some idea how to fix
We accept no responsibility in the event that something goes terribly wrong.
You have been warned.
Status
------
The tools that make up Guidance are in different stages of development and
have only been tested on Mandrake.
* userconfig - User & Group configuration. Supports /etc/passwd and
/etc/shadow right now.
* serviceconfig - System services configuration utility. Feature complete.
Works on Mandrake, Debian, (K)ubuntu Gentoo and maybe Red Hat out of the box.
* mountconfig - Mount point configuration utility. Feature complete and
stable.
* displayconfig - Display and graphics card configuration utility. Feature
complete but it only tested on Kubuntu right now.
* wineconfig - Wine configuration utility.
* grubconfig - Grub boot loader configuration utility. beta quality now.
Requirements
------------
* Linux.
* Python. 2.4 recommended. You probably already have Python installed, and if
not then it will most definately be available for you distribution of choice.
* PyQt / PyKDE. Version 3.7 or higher. PyQt and PyKDE are distributed with
KDE as part of kde-bindings since version 3.3.
For versions of KDE before 3.3 it is possible to install PyQt/PyKDE
directly. The homepage for PyQt and PyKDE is:
http://www.riverbankcomputing.co.uk/pykde/index.php
Packages for most popular distributions are available here:
http://sourceforge.net/project/showfiles.php?group_id=61057
* KDE 3.
* "PyKDE Extensions" is needed for installation. It is available here:
http://www.simonzone.com/software/pykdeextensions/
This is also a runtime requirement!
* libpythonize. If you don't want the tools to appear on the KDE Control
Center of you just don't want to bother with libpythonize, then you can
build Guidance with this command:
python setup.py install build_kcm --no-kcontrol
libpythonize is only needed for the KDE Control Center.
* You also need to have the development files from your X-server installed,
XFree86 or Xorg. Most distributions package these files up in a package
called XFree86-devel, or Xorg-devel, or libxorg-X11-devel or some similar.
* Specifically, the following packages are needed on Kubuntu:
build-essential
python-sip4-dev
libxxf86vm-dev
libxrender-dev
libxrandr-dev
libpythonize0-dev
pyqt-tools
libtool
kde-devel
Installation
------------
As root run:
./setup.py install
This will test for a working installation of PyQt/PyKDE and automatically
install the files using the same installation prefix as KDE. You will need
to have a working Python install before you can even run the setup.py script.
displayconfig-hwprobe installation
----------------------------------
displayconfig-hwprobe.py is a small program that should be run at boottime
before Xorg is started. It scans the PCI bus looking for graphics cards and
compares the list it finds to the previous time it was run. If the two lists
of hardware are different then "dpkg-reconfigure xserver-xorg" is automatically
run in non-interactive mode to generate a new xorg.conf based on the new
hardware.
The philosophy is that it is better to have a system with a raw but working
xorg.conf and X server, than to keep the old configuration and a Xorg that
won't startup. Swapping a graphics card should not "break" the OS.
The setup.py script currently does not install displayconfig-hwprobe.py by
itself. For now this must be done by the packager. displayconfig-hwprobe.py
should be put in /etc/init.d and installed to run at boot time with a command
like this:
update-rc.d displayconfig-hwprobe.py start 18 3 .
displayconfig-hwprobe.py only supports Kubuntu right now. Perhaps in the
future displayconfig-hwprobe will be expanded to detect hardware and generate
an xorg.conf by itself.
More information about displayconfig-hwprobe.py and the files it uses is
inside displayconfig-hwprobe.py. Currently the hardware data is written to
/var/lib/guidance/guidance-gfxhardware-snapshot. IMPORTANT: The directory
/var/lib/guidance/ should be created before using displayconfig-hwprobe.py.
Running
-------
Installation should add a couple of entries to the KDE Control Center in the
System section (displayconfig will show up in Peripherals). It is also possible
to run the commands outside of the KDE Control Center from the shell as root:
* serviceconfig
* userconfig
* mountconfig
* displayconfig
* wineconfig
* grubconfig
Reporting Bugs
--------------
Bug reports and feedback can be sent to simon@simonzone.com . Do make sure
that say which version of Guidance you are using and also what Linux
distribution you are using, and also how you installed SIP, PyQt, PyKDE. Also
if any error messages are printing to the console, email those too. By
running these tools from the command line you can often get useful (to me)
debug information. That kind of information is valuable.
Deinstallation
--------------
As root run:
./setup.py uninstall
Thanks go to
------------
Jim Bublitz
David Boddie
Sebastian Kügler
Theo Houtman
Pete Andrews (gamma correction system)
--
Simon Edwards
<simon@simonzone.com>

48
README.developers

@ -0,0 +1,48 @@
Intro
~~~~~
In this file I want to try to explain some practical things about Guidance
the "project" and some basic (and hopefully not too heavy) policies about how
things work organisationally.
-- 11 Feb 2007, Simon Edwards <simon@simonzone.com>
Developers
~~~~~~~~~~
The list of developers as of 11 Feb 2007:
Simon Edwards <simon@simonzone.com>, SVN username: sedwards, IRC: sime (unregistered)
Sebastian Kügler <sebas@kde.nl>, SVN username: sebas, IRC: sebas
Yuriy Kozlov <yuriy.kozlov@gmail.com>, SVN username: ykozlov, IRC: yuriy
Martin Böhm <martin.bohm@kubuntu.org>, SVN username: martinbohm, IRC: ???
"Lure" on #kubuntu-devel will join this list whether he likes it or not if he keeps
on committing stuff to powermanager. ;-)
Subversion
~~~~~~~~~~
Main development occurs in KDE's subversion repository in
/trunk/kdereview/guidance. Branches of the stable releases can be found
in svn under /kde/branches/guidance/. 0.6 was used in the Kubuntu Dapper, 0.7
was in Edgy.
Python source code
~~~~~~~~~~~~~~~~~~
Use 4 spaces for indentation, for the simple reason that it is very common
and mixing indentation styles is a PITA.
I (Simon) use Qt/KDE style naming conventions for methods. For variable
names I'm a bit inconsistent but it is usually lower case of lower case
with underscores. All I ask is that variable names be descriptive and
understandable.
TIP: When dealing with translated strings, use uncide() and not str(),
otherwise things will break on translated desktops.
Release procedure
~~~~~~~~~~~~~~~~~
[TODO: explain how a release tarball is created.]

294
TODO

@ -0,0 +1,294 @@
TODO
====
BUG: Mountconfig has no "enable/disable" in the context menu.
BUG: Mountconfig: "enable/disable" can sometime be available for normal users.
BUG: mountconfig: The disk details dialog (sizeview.py) doesn't show *unpartioned* free space.
BUG: Live gamma changes didn't seem to work on one of the S3s.
BUG: mountconfig. Authentication details in the SMSShareSelectDialog are sometimes not
correctly used when browsing.
TODO: Some S3 cards need to have the video ram specified, and some later model don't.
It would be good if we could tell the difference and only offer the ram pulldown
when strictly needed.
TODO: Monitor type selection (CRT, lcd etc). needed for clone mode on ATI at least.
TODO: When using the proprietary nVidia driver, choose between the nVidia AGP
and kernel agpgart based on what is best the of the machine's chipset.
TODO: The proprietary ATI drivers have a 'Option "BusType" "PCI"' thing which may
of may not need to be set for PCI based ATI cards.
TODO: 3D accel on the 9250 with open source drivers.
Future TODO
===========
setup.py
~~~~~~~~
.
userconfig
~~~~~~~~~~
.
unixauthdb.py
~~~~~~~~~~~~~
* LDAP (post-1.0) in-progress
* (others?) (post-1.0)
serviceconfig
~~~~~~~~~~~~~
* Change os.system() to the calls Simon uses in some cases.
* Some services are running, but not in /var/run, implement special treatment. :>
* Remove commented line from /etc/shells in userconfig -> Modify -> Shell.
mountconfig
~~~~~~~~~~~
* Add 'proper' GUIs for editing some of the more common FS types.
- NFS.
* AttributeError when mounting Samba volume
* Handle the 'managed' mount entry options. See http://www.die.net/doc/linux/man/man8/fstab-sync.8.html
This is stand on Mandriva 2005.
* Implement "real" HAL backend.
displayconfig
~~~~~~~~~~~~~
* Use HAL for fetching PCI and card info? alongside existing systems (ldetect)?
Extra?
~~~~~~
* Swap/kernel config:
http://kerneltrap.org/node/view/3000
"To tune, simply echo a value from 0 to 100 onto /proc/sys/vm/swappiness."
* Hardware detection info:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=lyit5wc14g.fsf%40leia.mandrakesoft.com&rnum=1&prev=/groups%3Fq%3Ddebian%2520ldetect%2520hardware%2520detection%26hl%3Den%26lr%3D%26ie%3DUTF-8%26sa%3DN%26tab%3Dwg
----------------------------------------------------------------------------
From: Pixel (pixel@mandrakesoft.com)
Subject: Re: Why so many HW detection packages?
Newsgroups: linux.debian.devel
Date: 2002-05-09 17:20:07 PST
On Fre, 26 Apr 2002, Petter Reinholdtsen wrote:
[...]
> The reson is that there are 3 hardware detection system:
> - Mandrake (libdetect, old)
truly libdetect is old and deprecated
(harddrake (was lothar) used to use it)
we (mandrake) are now mostly using ldetect & ldetect-lst
AFAIK here are the various free software hardware databases:
--------------------------------------------------------------------------------
- pci ----------
- pci.ids (in pciutils)
maps vendor+device -> description
and vendor+device+subvendor+subdevice -> description
also has device classes names
- modules.pcimap (in kernel /lib/modules/2.4*/)
maps vendor+device -> module
and vendor+device+subvendor+subdevice -> module
- XFree's xf86PciInfo.h (in XFree's source: xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h)
maps vendor+device -> description
- RedHat's pcitable (in hwdata)
maps vendor+device -> module+description
and a few vendor+device+subvendor+subdevice -> module+description
when needed
module can also be "Card:xxxx" for XFree (using Cards, see below)
- Mandrake's pcitable (in ldetect-lst)
same format as RedHat's (except for a few syntactical changes since mandrake kept old RedHat's format)
module can also be
"Card:xxxx" for XFree (using Cards+, see below)
"Server:xxxx" for XFree3
"ISDN:xxxx" for hisax special parameters
"Bad:xxxx" for warning about unhandled devices (mainly winmodems)
- Mandrake old detect's pci.lst (in detect-lst)
maps vendor+device -> class+module+description
- Progeny's pci.lst (in discover-data)
same format as detect
maps vendor+device -> class+module+description
module can also be
"Server:XFree86(module)" for XFree4
"Server:XF86_xxx" for XFree3
some comments:
- the "class" in pci.lst is not useful when "module" is given since
from the module name, one can have the "class"
- the subvendor+subdevice distinction is sometimes useful
(not very often though)
- hopefully one day modules.pcimap will be the reference :)
(except for XFree of course)
tools using those databases:
- kudzu and anaconda are using pcitable from hwdata
- library ldetect accesses pcitable from ldetect-lst,
this library is used by DrakX and drakxtools.
Mandrake's patched kudzu uses pcitable from ldetect-lst
- discover uses pci.ids from discover-data
- i don't know if tools are using modules.pcimap
- XFree --------------------
- XFree comes with Cards
- Redhat has its own version (in hwdata)
- Mandrake has its own version Cards+ & CardsNames (in ldetect-lst)
(mainly a merge of XF3 Cards and XF4 Cards)
- discover doesn't need it since it's precising the server name
(XF3) or the module name (XF4) (?)
this is usually enough (except if you want to propose the choice,
but who wants XF3 nowadays :)
- usb --------------------
- usbutils's usb.ids
maps vendor+device -> description
also has device classes names and some more stuff
- modules.usbmap (in kernel /lib/modules/2.4*/)
maps vendor+device -> module (?)
- Mandrake's usbtable (in ldetect-lst)
maps vendor+device -> module+description
module can also be
"Mouse:xxxx" for mouse configuration (fed to mousedrake)
"Tablet:wacom" for wacom tablet configuration
"Flag:xxxx" for DrakX package choosing
"Floppy:normal"
- Progeny's usb.lst (in discover-data)
maps vendor+device -> class+module+description
(but current's version only have module=unknown, so what's it
for, why not usb.ids?)
tools using those databases:
- library ldetect accesses usbtable from ldetect-lst
this library is used by DrakX and drakxtools
- i don't know if tools are using modules.usbmap
- scanner --------------------
- ScannerDB (in ldetect-lst)
maps name -> driver+kind(usb,scsi,serial,parallel)+options+various
(i don't know much about it, i don't know if yves made it from
scratch or what. ask yduret@mandrakesoft.com for more)
- isdn --------------------
- isdn.db (in ldetect-lst)
list of internet providers by country
-> phone number + domainname + dns1 (ip) + dns2
- old or small databases ----------
- isa.lst (detect), isatable (ldetect-lst), modules.isapnpmap (kernel)
- pcmcia.lst (detect, discover-data), pcmciatable (ldetect-lst)
- modules.parportmap (kernel but empty?)
- modules.ieee1394map (kernel but empty?)
--------------------------------------------------------------------------------
There may be some errors, or some missing stuff, please correct me!
I've written a tool to keep in sync with as many databases as
possible. see merge2pcitable.pl in
http://www.mandrakelinux.com/cgi-bin/cvsweb.cgi/soft/ldetect-lst/convert/
Maybe some common mailing list could be set up to deal with this?
*but* note that the database is quite kernel dependent.
- our pcitable doesn't handle this nicely
- redhat has "upgradelist" in hwdata to partly handle this
- i know we handle some pbs via /lib/modutils/macros with things like
"if `kernelversion` = 2.4", debian seems to have it in
/etc/modutils/arch
Once again, hopefully one day modules.pcimap and modules.usbmap will
be the reference! :)
[...]
> Mandrake switched from libdetect to kudzu, afaik
> (latest mandrake (8.2) version is using kudzu for HW detection).
well, mandrake has many tools doing more or less the same thing (and
alas, not exactly always the same thing): DrakX (during install),
drakxtools (when called, after install), kudzu (at boot, usually
calling a drakxtools)
----------------------------------------------------------------------------
List of hardware probing tools to use for displayconfig:
--------------------------------------------------------
[1] xvinfo - Print out X-Video extension adaptor information
xvinfo prints out the capabilities of any video adaptors
associated with the display
that are accesible through the X-Video extension.
[2] xresprobe - Prints out resolutions, frequency and displaytype.
Doesn't work in all cases. Works via ddc, I guess.
[3] ddcprobe - Uses VESA BIOS Extension
Detects VGA + OEM, modes (only set up modes?), vid mem (kudzu)
[3] read-edid
get-edid|parse-edid prints out a "good-looking" Monitor Section for
xorg.conf, not reliable (failed on notebook)
[4] ddcxinfo - prints out modelines, hsync and vsync (kudzu)
[5] svgamodes - prints out supported video modes (kudzu)
--
Pixel
programming languages addict http://merd.net/pixel/language-study/
----------------------------------------------------------------------------

135
displayconfig-TODO

@ -0,0 +1,135 @@
* How many cards do we have? autodetection?
* Is our card a dualhead card?
* How many monitors are connected?
* difference between one and two card is different device sections
* twinview has one device, one screen, one serverlayout
* xinerama has two devices, two screens, two monitors
twinview <> xinerama:
all sections double
one or two cards:
different device sections
one or two monitors
?? one or two cards
?? twinview or xinerama (driver? different resolutions?)
class XSetup(Object):
Screens[] getScreens()
bool maySetDualhead()
getUseDualhead()
setUseDualhead(bool)
(xoff,yoff) getDualheadPosition() # offset from screen 1 top left corner.
setDualheadOrientation(xoff,yoff)
bool is3DAccelerated()
GFXCard[] getGFXCards()
class Screen(Object):
maySetResolution()
Resolution[] getAvailableResolutions()
getResolution()
setResolution(Resolution)
maySetRefresh()
int getRefreshRate()
setRefreshRate(int)
maySetRotation()
getRotation()
getAvailableRotations()
setRotation()
bool isAvailableMirrorHorizontal()
getMirrorHorizontal()
setMirrorHorizontal()
bool isAvailableMirrorVertical()
getMirrorVertical()
setMirrorVertical()
class Resolution(Object):
int getWidth()
int getHeight()
int[] getRefreshRates():
* What is the current setup? (Xinerama? Singlehead? Twinview?)
- Warning: Xinerama vs. DRI
* "unlinking" the sliders will yield a warning "Using different
resolutions on the screens will disable 3D hardware acceleration on
the second head", which is a Xinerama deficiency).
Note: Probably only Ati and nvidia do support mergedFB properly, other
drivers might lose xinerama features like placement and maximize
- Drag and drop widget
* The fun part: implementing a Drag and Drop widget where the (resizing)
screens can be dragged into their respective relative position,
"snapping" in the more obvious ones, i.e. plain "left of" and "right
of", "above" and "under" (without offset).
- displayconfig.MonitorPreview:
Singleheadpreview: Monitor keeps size
DualheadPreview: like now, monitor resizes to show relative screen size
Displayconfig; Notes abstractielaag
-------------------------------------
* een XSetup heeft N gfxcards.
* een GfxCard heeft N Monitors
* XSetup is een container voor alle objecten uit de abstractielaag.
* XSetup.addMonitor(monitor,gfxcard) waarbij gfxcard al in XSetup zit en een
referentie naar de kaart vormt waarop monitor is aangesloten.
* Een Adaptor heeft een 1:1 relatie met een monitor, en is 'onderdeel' van
een "Screen" (in de zin van Screen section uit xorg.conf)
* Controls zoals resize en de rotatie / mirroring widgets manipuleren een
Adaptor, die intern de Screen manipuleert
* Singlehead resolutie verandert via xrandr en slaat settings op via
displayconfig-restore.py
* Dualhead resolutie aanpassen pakt intern een passende metamode (bij twinview)
en checkt of alle zinvolle metamodes beschikbaar zijn, anders wordt de user
gewaarschuwd dat dit eerst moet gebeuren.
* Adaptor in dualhead / twinview modus worden dus naar een screen vertaald
metamodes heeft.
* Screen moet dan nog support voor metamodes krijgen.
displayconfig:
===============
* Current resolution doesn't get recognized if current != highest resolution
* new tab display powermanagement, just like the existing tab, we need to be
able to at least replace existing functionality
New Widgets:
-------------
* DualheadPreview
* RadioButtons instead of dropdown for Positioning
* Detect if we're already running on dualhead, (en|dis)able widgets accordingly
* Nvidia MergedFB
- Make preview of dualhead more clear (only xinerama or also mergedFB?)
- Generate list of Metamodes from resolutions available
- write dualhead settings to xorg.conf
* Compare dualhead with different drivers WRT xorg.conf
- generic Xinerama (Matrox, others?)
- dualhead for fglrx, SiS ...
- MergedFB as special case for nvidia (sis?)
* Preview should be rotatable (and|or) resizable (and|or) DualHeadpreview?
* Add missing elements to DualHeadTab
- [ ] Use MergedFB (binds two resolution sliders)
- label with warning "You can only use DRI on one head with different resolutions blahblah"
FIXME: enabling Dualhead should:
- Update resolutions with "metamodes"
- disable Rotation/mirroring stuff
- Add ServerLayout to xorg.conf
- Add second Screen to xorg.conf
- Alternatively (if both resolutions are the same enable MergedFB

11
displayconfig/40guidance-displayconfig_restore

@ -0,0 +1,11 @@
# Set the X server resolution to that selected by the user.
#
# This needs to be done before windows managers or X clients start,
# otherwise the DPI and fonts sizes get all screwed up.
#
# http://www.simonzone.com/software/guidance
#
# This file is sourced by Xsession(5), not executed.
# The "|| true" is to ensure that the Xsession script does not terminate
# and stop the login if something fails in the Python program.
/opt/kde3/bin/displayconfig-restore || true

340
displayconfig/ScanPCI.py

@ -0,0 +1,340 @@
###########################################################################
# ScanPCI.py - #
# ------------------------------ #
# copyright : (C) 2005 by Simon Edwards #
# email : simon@simonzone.com #
# #
###########################################################################
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
###########################################################################
"""Provides information about the devices attached to the PCI bus.
"""
import struct
import csv
import os.path
import sys
###########################################################################
class PCIDevice(object):
def __init__(self,line=None):
self.vendor = None # PCI vendor id
self.device = None
self.subvendor = None # 0xffff if not probe_type'd or no subid
self.subdevice = None # 0xffff if not probe_type'd or no subid
self.pci_class = None # 'None' if not probe_type'd
self.pci_bus = None # pci bus id 8 bits wide
self.pci_device = None # pci device id 5 bits wide
self.pci_function = None# pci function id 3 bits wide
self.module = None
self.text = None
self.already_found = False
if line is not None:
self.loadFromString(line)
def isGfxCard(self):
if self.module is not None and \
(self.module.startswith("Card:") or self.module.startswith("Server:XFree86(")):
return True
return (self.pci_class & PCIBus.PCI_BASE_CLASS_MASK)==PCIBus.PCI_BASE_CLASS_DISPLAY
def getModule(self):
if self.module is not None:
if self.module.startswith("Server:XFree86("):
return self.module[15:-1]
elif self.module.startswith("Card:"):
return self.module[5:]
return self.module
def isModuleXorgDriver(self):
return self.module is not None and \
(self.module.startswith("Server:XFree86(") or self.module.startswith("Card:"))
def __str__(self):
s = "PCI:%i:%i:%i, " % (self.pci_bus,self.pci_device,self.pci_function)
s += "Vendor:%x, Device:%x," % (self.vendor,self.device)
if self.subvendor is not None:
s += " Subvendor:%x," % self.subvendor
if self.subdevice is not None:
s += " Subdevice:%x," % self.subdevice
if self.pci_class is not None:
s += " Class:%x," % self.pci_class
if self.module is not None:
s += " Module:%s," % self.module
if self.text is not None:
s += " Text:%s" % self.text
return s
def loadFromString(self,line):
parts = line.split(",")
for i in range(len(parts)):
bit = parts[i].strip()
if bit.startswith("PCI:"):
pci_code = bit[4:].split(":")
self.pci_bus = int(pci_code[0])
self.pci_device = int(pci_code[1])
self.pci_function = int(pci_code[2])
elif bit.startswith("Vendor:"):
self.vendor = int(bit[7:],16)
elif bit.startswith("Device:"):
self.device = int(bit[7:],16)
elif bit.startswith("Subvendor:"):
self.subvendor = int(bit[10:],16)
elif bit.startswith("Subdevice:"):
self.subdevice = int(bit[10:],16)
elif bit.startswith("Class:"):
self.pci_class = int(bit[6:],16)
elif bit.startswith("Module:"):
self.module = bit[7:]
elif bit.startswith("Text:"):
self.text = " ".join(parts[i:]).strip()[5:]
break
############################################################################
class PCIBus(object):
PCI_CLASS_SERIAL_USB = 0x0c03
PCI_CLASS_SERIAL_FIREWIRE = 0x0c00
PCI_BASE_CLASS_MASK = 0xff00
PCI_BASE_CLASS_DISPLAY = 0x0300
def __init__(self, data_file_dir="."):
self.devices = []
self.data_file_dir = data_file_dir
def detect(self,device_data="/proc/bus/pci/devices"):
# Shamelessly translated from ldetect's pci.c.
fhandle = open(device_data)
for line in fhandle.readlines():
#print "L:",line
entry = PCIDevice()
self.devices.append(entry)
parts = line.split()
devbusfn = int(parts[0],16)
idbits = int(parts[1],16)
entry.vendor = idbits >> 16
entry.device = idbits & 0xffff
entry.pci_bus = devbusfn >> 8
entry.pci_device = (devbusfn & 0xff) >> 3
entry.pci_function = (devbusfn & 0xff) & 0x07
try:
infohandle = open("/proc/bus/pci/%02x/%02x.%d" % (
entry.pci_bus, entry.pci_device, entry.pci_function),"r")
# these files are 256 bytes but we only need first 48 bytes
buf = infohandle.read(48)
(class_prog, entry.pci_class, entry.subvendor, entry.subdevice) = \
struct.unpack("<xxxxxxxxxBHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxHH",buf)
#print "STRUCT: ",struct.unpack("@xxxxxxxxxBHxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxHH",buf)
if (entry.subvendor==0 and entry.subdevice==0) or \
(entry.subvendor==entry.vendor and entry.subdevice==entry.device):
entry.subvendor = 0xffff
entry.subdevice = 0xffff
if entry.pci_class == PCIBus.PCI_CLASS_SERIAL_USB:
# taken from kudzu's pci.c
if class_prog == 0:
entry.module = "usb-uhci"
elif class_prog == 0x10:
entry.module = "usb-ohci"
elif class_prog == 0x20:
entry.module = "ehci-hcd"
if entry.pci_class == PCIBus.PCI_CLASS_SERIAL_FIREWIRE:
# taken from kudzu's pci.c
if class_prog == 0x10:
entry.module = "ohci1394"
infohandle.close()
except IOError:
pass
fhandle.close()
#if False or os.path.exists("/usr/share/ldetect-lst/pcitable"):
#self._resolveDevicesWithLdetect()
#else:
self._resolveDevicesWithHwdata()
#self._resolveDevicesWithDiscover()
def _resolveDevicesWithLdetect(self):
# Scan the PCI database.
#fhandle = open(os.path.join(self.data_file_dir,"pcitable"),"r")
fhandle = open(os.path.join("/opt/kde3/share/apps/guidance/","pcitable"),"r")
# This class is just for skipping comment lines in the database file.
# This whole class is just an iterator wrapper that we put around our file iterator.
class commentskipperiterator(object):
def __init__(self,fhandle):
self.fhandle = iter(fhandle)
def __iter__(self):
return self
def next(self):
line = self.fhandle.next()
while line[0]=="#":
line = self.fhandle.next()
return line
unknowndevices = self.devices[:]
# Process each row of the DB.
for row in csv.reader(commentskipperiterator(fhandle),delimiter='\t'):
if len(row)==4:
(vendor,device,module,text) = row
elif len(row)==6:
(vendor, device, subvendor, subdevice, module, text) = row
subvendor = int(subvendor[2:],16)
subdevice = int(subdevice[2:],16)
else:
continue
vendor = int(vendor[2:],16) # parse hex numbers of the form 0x1abc
device = int(device[2:],16)
i = 0
while i<len(unknowndevices):
pcidevice = unknowndevices[i]
if pcidevice.vendor==vendor and pcidevice.device==device \
and (len(row)==4 \
or (pcidevice.subvendor==subvendor and pcidevice.subdevice==subdevice)):
if module!="unknown":
pcidevice.module = module
pcidevice.text = text
if len(row)==6: # Close match, also matched on subdevice/subvendor ids.
del unknowndevices[i]
else:
i += 1
else:
i += 1
fhandle.close()
def _resolveDevicesWithDiscover(self):
unknown_devices = self.devices[:]
self._resolveDevicesWithDiscoverFile("/usr/share/discover/pci-26.lst",unknown_devices)
self._resolveDevicesWithDiscoverFile("/usr/share/discover/pci.lst",unknown_devices)
def _resolveDevicesWithDiscoverFile(self,filename,unknown_devices):
# Scan the PCI database.
fhandle = open(filename,"r")
# Process each row of the DB.
for line in fhandle:
row = line.replace("\t"," ").split(" ")
if len(row) >= 1 and row[0] != '':
# Skip manufacturer info lines.
continue
vendor = int(row[1][:4],16)
device = int(row[1][4:],16)
module = row[3]
text = ' '.join(row[4:]).strip()
i = 0
while i<len(unknown_devices):
pcidevice = unknown_devices[i]
if pcidevice.vendor==vendor and pcidevice.device==device:
pcidevice.module = module
pcidevice.text = text
del unknown_devices[i]
else:
i += 1
fhandle.close()
def _resolveDevicesWithHwdata(self):
# Scan the PCI database.
fhandle = open("/usr/share/hwdata/pci.ids","r")
# This class is just for skipping comment lines in the database file.
# This whole class is just an iterator wrapper that we put around our file iterator.
class commentskipperiterator(object):
def __init__(self,fhandle):
self.fhandle = iter(fhandle)
def __iter__(self):
return self
def next(self):
line = self.fhandle.next()
while line[0]=="#":
line = self.fhandle.next()
return line
unknowndevices = self.devices[:]
# Process each row of the DB.
for row in fhandle:
stripped_row = row.strip()
if stripped_row=='' or stripped_row[0]=='#':
continue # Comment or blank line, skip it.
if stripped_row[0]=='C':
# Reached the device class data, stop.
break
if row[0]!='\t':
# Vendor line
vendor_parts = stripped_row.split(' ')
vendor = int(vendor_parts[0],16)
continue
if row[1]!='\t':
# Device line
device_parts = stripped_row.split(' ')
device = int(device_parts[0],16)
subvendor = None
subdevice = None
else:
# Subvendor line
subvendor_parts = stripped_row.split(' ')
subvendor = int(subvendor_parts[0],16)
subdevice = int(subvendor_parts[1],16)
i = 0
while i<len(unknowndevices):
pcidevice = unknowndevices[i]
if pcidevice.vendor==vendor and pcidevice.device==device \
and (subvendor is None \
or (pcidevice.subvendor==subvendor and pcidevice.subdevice==subdevice)):
#pcidevice.module = module
if subvendor is None:
pcidevice.text = ' '.join(vendor_parts[1:]) + '|' + ' '.join(device_parts[1:]).strip()
i += 1
else:
pcidevice.text = ' '.join(vendor_parts[1:]) + '|' + ' '.join(device_parts[1:]+subvendor_parts[2:]).strip()
del unknowndevices[i] # Perfect match, finished with this device.
else:
i += 1
fhandle.close()
def __str__(self):
return "\n".join([str(x) for x in self.devices])
def loadFromFile(self,filename):
fhandle = open(filename,'r')
for line in fhandle.readlines():
if line.strip()!="":
entry = PCIDevice(line=line)
self.devices.append(entry)
fhandle.close()
############################################################################
def main():
bus = PCIBus("ldetect-lst/")
if len(sys.argv)>1:
if sys.argv[1]=="--help" or sys.argv[1]=="-h":
print "Usage:\n ScanPCI.py <pci device file name>"
sys.exit(0)
bus.detect(sys.argv[1])
else:
bus.detect()
print bus