Profile - How to force LastLoaded to Master User?
#1
I've been searching for way to do this.

I have 2 profiles, master user and another normal profile. What I need to do is to be able to always start XBMC with master user profile. XBMC default setting is to always remember the last loaded profile, and load it the next time it starts. I've tried to remove the LastLoaded value in the profiles.xml, to see if that will make XBMC default to the value of 0 (i.e. mater user profile). However, before exiting XBMC always writes the LastLoaded value back to the profiles.xml! below is the content of the profiles.xml file.

Much appreciated if anyone can point me to the right direction!


Code:
<profiles>
    <lastloaded>0</lastloaded>
    <useloginscreen>false</useloginscreen>
    <profile>
        <name>Master User</name>
        <directory pathversion="1">special://masterprofile/</directory>
        <thumbnail pathversion="1"></thumbnail>
        <hasdatabases>true</hasdatabases>
        <canwritedatabases>true</canwritedatabases>
        <hassources>true</hassources>
        <canwritesources>true</canwritesources>
        <lockaddonmanager>false</lockaddonmanager>
        <locksettings>false</locksettings>
        <lockfiles>false</lockfiles>
        <lockmusic>false</lockmusic>
        <lockvideo>false</lockvideo>
        <lockpictures>false</lockpictures>
        <lockprograms>false</lockprograms>
        <lockmode>0</lockmode>
        <lockcode>-</lockcode>
        <lastdate>04/10/2011 - 12:59 PM</lastdate>
    </profile>
    <profile>
        <name>bodhi</name>
        <directory pathversion="1">profiles/bodhi/</directory>
        <thumbnail pathversion="1"></thumbnail>
        <hasdatabases>true</hasdatabases>
        <canwritedatabases>true</canwritedatabases>
        <hassources>true</hassources>
        <canwritesources>true</canwritesources>
        <lockaddonmanager>false</lockaddonmanager>
        <locksettings>false</locksettings>
        <lockfiles>false</lockfiles>
        <lockmusic>false</lockmusic>
        <lockvideo>false</lockvideo>
        <lockpictures>false</lockpictures>
        <lockprograms>false</lockprograms>
        <lockmode>0</lockmode>
        <lockcode>-</lockcode>
        <lastdate>04/10/2011 - 12:58 PM</lastdate>
    </profile>
</profiles>
Reply
#2
bodhi Wrote:I've been searching for way to do this.

I have 2 profiles, master user and another normal profile. What I need to do is to be able to always start XBMC with master user profile. XBMC default setting is to always remember the last loaded profile, and load it the next time it starts. I've tried to remove the LastLoaded value in the profiles.xml, to see if that will make XBMC default to the value of 0 (i.e. mater user profile). However, before exiting XBMC always writes the LastLoaded value back to the profiles.xml! below is the content of the profiles.xml file.

Much appreciated if anyone can point me to the right direction!


Code:
<profiles>
    <lastloaded>0</lastloaded>
    <useloginscreen>false</useloginscreen>
    <profile>
        <name>Master User</name>
        <directory pathversion="1">special://masterprofile/</directory>
        <thumbnail pathversion="1"></thumbnail>
        <hasdatabases>true</hasdatabases>
        <canwritedatabases>true</canwritedatabases>
        <hassources>true</hassources>
        <canwritesources>true</canwritesources>
        <lockaddonmanager>false</lockaddonmanager>
        <locksettings>false</locksettings>
        <lockfiles>false</lockfiles>
        <lockmusic>false</lockmusic>
        <lockvideo>false</lockvideo>
        <lockpictures>false</lockpictures>
        <lockprograms>false</lockprograms>
        <lockmode>0</lockmode>
        <lockcode>-</lockcode>
        <lastdate>04/10/2011 - 12:59 PM</lastdate>
    </profile>
    <profile>
        <name>bodhi</name>
        <directory pathversion="1">profiles/bodhi/</directory>
        <thumbnail pathversion="1"></thumbnail>
        <hasdatabases>true</hasdatabases>
        <canwritedatabases>true</canwritedatabases>
        <hassources>true</hassources>
        <canwritesources>true</canwritesources>
        <lockaddonmanager>false</lockaddonmanager>
        <locksettings>false</locksettings>
        <lockfiles>false</lockfiles>
        <lockmusic>false</lockmusic>
        <lockvideo>false</lockvideo>
        <lockpictures>false</lockpictures>
        <lockprograms>false</lockprograms>
        <lockmode>0</lockmode>
        <lockcode>-</lockcode>
        <lastdate>04/10/2011 - 12:58 PM</lastdate>
    </profile>
</profiles>


Anyone?
Reply
#3
bodhi Wrote:I've tried to remove the LastLoaded value in the profiles.xml, to see if that will make XBMC default to the value of 0 (i.e. mater user profile). However, before exiting XBMC always writes the LastLoaded value back to the profiles.xml!

Well, yes. You'll need to manually modify the profiles.xml after XBMC has closed or before XBMC starts. You could do this with a suitable batch file, though it would be slightly inelegant.

I have a vague memory of a command line option to choose the profile, but a quick look at the Windows source suggests no such option is available. I may be remembering someone requesting the feature.

JR
Reply
#4
jhsrennie Wrote:Well, yes. You'll need to manually modify the profiles.xml after XBMC has closed or before XBMC starts. You could do this with a suitable batch file, though it would be slightly inelegant.

I have a vague memory of a command line option to choose the profile, but a quick look at the Windows source suggests no such option is available. I may be remembering someone requesting the feature.

JR

JR, thanks for your response! it would be a nice feature when we have a few profiles to deal with. I worked around it by adding the profile name to home menu in home.xml, so I would know which profile was the last saved . And use the remote to manually switch it back to master profile if it's not already is. This addition to home.xml allows me to see the profile name every time XBMC starts, or whenever I "escape" back to the home menu.

Code:
        <control type="label">
                <description>profile name</description>
                <posx>200</posx>
                <posy>680</posy>
                <width>500</width>
                <height>28</height>
                <align>left</align>
                <aligny>center</aligny>
                <font>font16_title</font>
                <textcolor>white</textcolor>
                <shadowcolor>black</shadowcolor>
                <label>[b]$INFO[System.ProfileName] profile[/b]</label>
        </control>

light bulb Nod Come to think of your suggestion about the batch file , I could also add a keyboard command to execute the loadprofile(master user) in the remote sequence to start XBMC, too. It's not elegant, but will work. Thanks!
Reply
#5
Found a better way: set the profiles.xml file property to "Read only". So it will never change and always default to "Master User".

The only drawback is to enable changing inside XBMC again, I have to clear this bit in the file property outside XBMC. Actually, it's a good way to "lock" down the profile settings :-)
Reply

Logout Mark Read Team Forum Stats Members Help
Profile - How to force LastLoaded to Master User?0