@@ -26,7 +26,11 @@ def save_selection(self):
26
26
name = self .name .get_text ()
27
27
up = self .password .get_text ()
28
28
shell = self .sh
29
- hf = '/home/%s' % self .user .get_text ()
29
+ try :
30
+ open ('/Users' )
31
+ hf = '/Users/%s' % self .user .get_text ()
32
+ except :
33
+ hf = '/home/%s' % self .user .get_text ()
30
34
hst = self .host .get_text ()
31
35
ul = [uname , name , up , shell , hf ]
32
36
@@ -86,7 +90,13 @@ def __init__(self, button3):
86
90
self .repassword .connect ("changed" , self .password_verification , button3 )
87
91
self .label5 = Gtk .Label ("Shell" )
88
92
shell = Gtk .ComboBoxText ()
89
- self .sh = '/usr/local/bin/fish'
93
+ try :
94
+ open ('/Users' )
95
+ self .sh = '/usr/local/bin/zsh'
96
+ shell_default = 7
97
+ except :
98
+ self .sh = '/usr/local/bin/fish'
99
+ shell_default = 3
90
100
shell .append_text ('sh' )
91
101
shell .append_text ('csh' )
92
102
shell .append_text ('tcsh' )
@@ -95,7 +105,7 @@ def __init__(self, button3):
95
105
shell .append_text ('rbash' )
96
106
shell .append_text ('ksh' )
97
107
shell .append_text ('zsh' )
98
- shell .set_active (3 )
108
+ shell .set_active (shell_default )
99
109
shell .connect ("changed" , self .on_shell )
100
110
label = Gtk .Label ('<b>Set Hostname</b>' )
101
111
label .set_use_markup (True )
0 commit comments