Commit b566fd0e authored by Minkush's avatar Minkush

add thunderbird config script

parent 2b56363b
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os.path
import psutil
# Ending Thunderbird process
PROCNAME = 'thunderbird'
for proc in psutil.process_iter():
if proc.name() == PROCNAME:
proc.kill()
# Editing Thunderbird's config
def edit_config(username):
save_path = '/home/%s/.thunderbird/p3qbuiz9.default' % username
name_of_file = 'user.js'
completeName = os.path.join(save_path, name_of_file)
file1 = open(completeName, 'w')
toFile = \
'''user_pref("mail.attach_vcard", true);
user_pref("mail.biff.play_sound", false);
user_pref("mail.biff.show_alert", false);
user_pref("mail.collect_email_address_outgoing", true);
user_pref("mail.default_html_action", 0);
user_pref("mail.html_compose", false);
user_pref("mailnews.reply_header_type", 2);
user_pref("mailnews.reply_on_top", 1);
user_pref("mailnews.reply_with_extra_lines", 1);'''
file1.write(toFile)
file1.close()
if __name__ == '__main__':
print 'Program to close Thunderbird application and edit its configuration settings\n'
username = input("Enter your PC's user name: ")
edit_config(username)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment