197 displayVar := displayDevice displayName. |
197 displayVar := displayDevice displayName. |
198 displayVar notNil ifTrue:[ |
198 displayVar notNil ifTrue:[ |
199 "/ figure out the hostname of the display, |
199 "/ figure out the hostname of the display, |
200 "/ to read d_<hostname>.rc |
200 "/ to read d_<hostname>.rc |
201 |
201 |
202 ((displayVar startsWith:':0') |
202 ((displayVar startsWith:':') |
203 or:[(displayVar startsWith:'unix:') |
203 or:[(displayVar startsWith:'unix:') |
204 or:[displayVar startsWith:'shm:']]) ifTrue:[ |
204 or:[displayVar startsWith:'shm:']]) ifTrue:[ |
205 "running on a local display" |
205 "running on a local display" |
206 display := OperatingSystem getHostName. |
206 display := OperatingSystem getHostName. |
207 ] ifFalse:[ |
207 ] ifFalse:[ |
208 (displayVar endsWith:':0') ifTrue:[ |
208 [(displayVar size > 1) and:[displayVar last isDigit]] whileTrue:[ |
209 display := displayVar copyTo:(displayVar size - 2) |
209 displayVar := displayVar copyWithoutLast:1. |
210 ] ifFalse:[ |
210 ]. |
211 (displayVar endsWith:':0.0') ifTrue:[ |
211 ((displayVar size > 1) and:[displayVar last == $.]) ifTrue:[ |
212 display := displayVar copyTo:(displayVar size - 4) |
212 displayVar := displayVar copyWithoutLast:1. |
213 ] |
213 [(displayVar size > 1) and:[displayVar last isDigit]] whileTrue:[ |
|
214 displayVar := displayVar copyWithoutLast:1. |
|
215 ]. |
|
216 ]. |
|
217 ((displayVar size > 1) and:[displayVar last == $:]) ifTrue:[ |
|
218 display := displayVar copyWithoutLast:1 |
214 ] |
219 ] |
215 ]. |
220 ]. |
216 ]. |
221 ]. |
217 ]. |
222 ]. |
218 |
223 |
327 ]. |
336 ]. |
328 ]. |
337 ]. |
329 |
338 |
330 displayType isNil ifTrue:[ |
339 displayType isNil ifTrue:[ |
331 " |
340 " |
332 final fallback: use type of machine if smalltalk is running on a local |
341 final fallback: use local hosts name, if display is the local one; |
333 connection. |
342 otherwise, use the type of display |
|
343 |
334 the used name is one of: |
344 the used name is one of: |
335 d_next.rc |
345 d_hostName.rc |
336 d_iris.rc |
346 for local display; |
337 etc. |
347 or: |
338 " |
348 d_X11.rc |
339 "use type of machine smalltalk is running on as default ..." |
349 d_WIN32.rc |
340 |
350 for remote display. |
|
351 " |
341 display = OperatingSystem getHostName ifTrue:[ |
352 display = OperatingSystem getHostName ifTrue:[ |
342 displayType := OperatingSystem getSystemType. |
353 displayType := OperatingSystem getSystemType. |
|
354 ] ifFalse:[ |
|
355 displayType := displayDevice platformName. |
343 ] |
356 ] |
344 ]. |
357 ]. |
345 |
358 |
346 "now, if the above mess found something, we have it in displayType; |
359 "now, if the above mess found something, we have it in displayType; |
347 fileIn d_<displayType>.rc. |
360 fileIn d_<displayType>.rc. |