Changeset 6981


Ignore:
Timestamp:
Mar 8, 2018, 1:28:22 PM (21 months ago)
Author:
alviboi
Message:
 
Location:
lliurex-mate-welcome/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-mate-welcome/trunk/fuentes/lliurex-mate-welcome

    r4100 r6981  
    14011401        self.welcome_version = 'Unknown'
    14021402        self.rpi_resize_pending = False
     1403        self.start_from_menu = False
    14031404
    14041405        # Get current architecture of system.
     
    26592660        self.jump_to = None
    26602661        self.font_dpi_override = None
     2662        self.start_from_menu = False
    26612663
    26622664        for arg in sys.argv:
     
    27512753              print('[Debug] Opening page: ' + self.jump_to + '.html')
    27522754
     2755          if arg.startswith('--force'):
     2756              print('[Debug] Start from menu')
     2757              self.start_from_menu = True
     2758
    27532759          if arg.startswith('--font-dpi='):
    27542760              try:
     
    27832789            systemstate.codename = self.simulate_codename
    27842790
     2791    def check_start_menu(self):
     2792        if not self.start_from_menu == False:
     2793            systemstate.start_from_menu = self.start_from_menu
     2794       
     2795
    27852796
    27862797if __name__ == "__main__":
    27872798
    2788     # Process any parameters passed to the program.
     2799    user = os.environ.get('USER')
     2800    groups = os.getgroups()
     2801    # Process any parameters passed to the program.       
    27892802    arg = Arguments()
    27902803
     
    28012814    arg.override_flavour()
    28022815    arg.override_codename()
    2803 
     2816    arg.check_start_menu()
    28042817    print('[Welcome] Application Started.')
    28052818    print('[SystemState] Lliurex Session: ' + systemstate.session_type)
    28062819    print('[SystemState] Lliurex Flavour: ' + systemstate.session_flavour)
    2807     app.run()
     2820    if 10004 in groups or user == 'netadmin' and systemstate.start_from_menu == False:
     2821            print('[Init] Netadmin or member of students')
     2822            exit()
     2823    else:       
     2824        app.run()
  • lliurex-mate-welcome/trunk/fuentes/lliurex-mate-welcome.desktop

    r5243 r6981  
    1515Comment[ca_ES]=Pantalla de benvinguda a LliureX 16
    1616Comment[ca_ES@valencia]=Pantalla de benvinguda a LliureX 16
    17 Exec=lliurex-mate-welcome
     17Exec=sh -c "lliurex-mate-welcome --force"
    1818Icon=lliurex-welcome
    1919OnlyShowIn=MATE;
Note: See TracChangeset for help on using the changeset viewer.