Shell identity is who the desktop treats as the current user for display (name, avatar) and filesystem layout (VFS home path). It is not authentication: there is no login flow in core. A future auth module calls setShellIdentity after sign-in; until then everyone is Guest.
Composable: useDesktopShellIdentity in @owdproject/core:
import { useDesktopShellIdentity } from '@owdproject/core/runtime/composables/useDesktopShellIdentity'
| Member | Type | Role |
|---|---|---|
userId | string | Session id (default 'guest') |
displayName | string | Shown in start menu, profile areas, etc. |
avatarUrl | string | null | Optional image URL |
userHome | string | VFS home directory (absolute path) |
isGuest | boolean | true when userId === 'guest' |
setShellIdentity(partial) | function | Merge identity after login |
clearShellIdentity() | function | Reset to Guest defaults |
Type: ShellIdentity (userId, displayName, avatarUrl, userHome).
State is a module-level singleton (one identity per browser tab). Auto-import works when core is installed.
On first use, identity is initialized as Guest:
displayName: 'Guest'userHome: from runtimeConfig.public.desktop.fs.defaultUserHome, or /home/Guest if unsetmodule-fs sets a theme default in its module:
defaultUserHome: '/home/Guest'
Override in desktop.config.ts under the fs namespace (via module augmentation):
export default defineDesktopConfig({
modules: ['@owdproject/module-fs'],
fs: {
defaultUserHome: '/home/Guest',
},
})
const { setShellIdentity, clearShellIdentity } = useDesktopShellIdentity()
// After successful login
setShellIdentity({
userId: 'alice',
displayName: 'Alice',
avatarUrl: 'https://…',
userHome: userHomeFromHandle('@alice.bsky.social'), // optional helper
})
// On logout
clearShellIdentity()
Helpers (same module):
userHomeFromHandle(handle, base?) — e.g. @alice.bsky.social → /home/alice.bsky.socialsanitizeUserHomeSegment(input) — safe path segment for VFS| Consumer | Use |
|---|---|
| Themes | Start menu footer, profile chip, settings (read displayName, avatarUrl) |
module-fs | useFsRecentFiles stores recents under {userHome}/.local/share/… so each user has separate recent files |
| Future auth modules | Call setShellIdentity / clearShellIdentity |
Explorer overwrite/delete dialogs use useDesktopDialogs, not shell identity.
Identity lives in core (runtime/composables/), not in PrimeVue or any theme package. Vuetify/Nuxt UI themes use the same composable.