diff --git a/Menu/GameShell/60_CONNECT/__init__.py b/Menu/GameShell/60_CONNECT/__init__.py index 081c455..9593253 100644 --- a/Menu/GameShell/60_CONNECT/__init__.py +++ b/Menu/GameShell/60_CONNECT/__init__.py @@ -1,6 +1,7 @@ # -*- coding: utf-8 -*- import pygame import validators +import commands from UI.constants import Width,Height,ICON_TYPES from UI.simple_name_space import SimpleNamespace @@ -117,6 +118,10 @@ class TinyCloudPage(Page): else: self._IP = "xxx.xxx.xxx.xxx" + hostname = commands.getstatusoutput("hostname")[1] + if hostname == "": + hostname = "clockworkpi" + labels = \ [["forssh","For ssh and scp:",self._ListLabelFontObj,self._TextColor], ["ssh_addr","ssh cpi@%s" % self._IP, self._ListFontObj,self._URLColor], @@ -130,7 +135,7 @@ class TinyCloudPage(Page): ["key_and_pass", "cpi", self._ListFontObj, self._URLColor], ["for_airplay", "Airplay:", self._ListLabelFontObj, self._TextColor], - ["airplay_name","clockworkpi", self._ListFontObj, self._URLColor], + ["airplay_name",hostname, self._ListFontObj, self._URLColor], ["for-usb-eth","USB-Ethernet:", self._ListLabelFontObj, self._TextColor], ["usb-eth-addr","192.168.10.1", self._ListFontObj, self._URLColor]]