22
22
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23
23
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25
from __future__ import absolute_import, print_function, unicode_literals
27
28
def __init__(self):
36
37
def backup_xorg_conf(self):
37
38
# xorg_conf_backup="/etc/X11/xorg.conf-backup-${timestamp}"
38
39
# cp /etc/X11/xorg.conf ${xorg_conf_backup}
39
print "Your config could not be backed up."
40
print("Your config could not be backed up.")
42
43
def default_config(self):
46
47
# rm /etc/X11/xorg.conf
47
48
#print "Failure restoring configuration to default."
48
49
#print "Your config has not been changed."
49
print "Your configuration has been restored to default and"
50
print "your old configuration backed up. Please restart."
50
print("Your configuration has been restored to default and")
51
print("your old configuration backed up. Please restart.")
53
54
def run_xorgconf(self):
69
70
def verify_xorgconf(self):
70
71
# Run Alberto's xorg.conf checker (once it's available in main)
71
print "Sorry, this option is not implemented yet"
72
print("Sorry, this option is not implemented yet")
74
75
def edit_config(self):
118
119
def menu(self, level):
121
print "1. Run in low-graphics mode for just one session"
122
print "2. Reconfigure graphics"
123
print "3. Troubleshoot the error"
124
print "4. Exit to console login"
122
print("1. Run in low-graphics mode for just one session")
123
print("2. Reconfigure graphics")
124
print("3. Troubleshoot the error")
125
print("4. Exit to console login")
126
127
elif level == "1":
129
130
elif level == "2":
130
print "Reconfiguration:"
131
print "How would you like to reconfigure your display?"
132
print "2a. Use default (generic) configuration"
133
print "2b. Create new configuration for this hardware"
134
print "2c. Use your backed-up configuration"
131
print("Reconfiguration:")
132
print("How would you like to reconfigure your display?")
133
print("2a. Use default (generic) configuration")
134
print("2b. Create new configuration for this hardware")
135
print("2c. Use your backed-up configuration")
136
137
elif level == "3":
137
print "Troubleshooting:"
138
print "What information would you like to review?"
139
print "3a. Review the xserver log file"
140
print "3b. Review the startup errors"
141
print "3c. Edit configuration file"
142
print "3d. Archive configuration and logs"
138
print("Troubleshooting:")
139
print("What information would you like to review?")
140
print("3a. Review the xserver log file")
141
print("3b. Review the startup errors")
142
print("3c. Edit configuration file")
143
print("3d. Archive configuration and logs")
145
print "xdiagnose walks you through troubleshooting a few common X errors."
147
print " * Screen blanks when lid is closed, and never comes back"
148
print " * 3D performance is horrible"
149
print " * Maximum resolution is lower than what screen can actually perform"
146
print("xdiagnose walks you through troubleshooting a few common X errors.")
148
print(" * Screen blanks when lid is closed, and never comes back")
149
print(" * 3D performance is horrible")
150
print(" * Maximum resolution is lower than what screen can actually perform")
151
152
def lid_close_blank(self):
152
153
# Examine kernel logs to see if there was any evidence of it