user-session-migration(1)

๐Ÿ“ฆ
version 0.5.2 ยท 3 versions
, in ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– user-session-migration ๐Ÿ’–

okay so bestie, welcome to the user-session-migration(1) page โ€” it lives in the Linux User's Manual, and it's lowkey one of those tiny tools that does SO much. grab a boba, we're going in ๐Ÿง‹โœจ


๐ŸŒธ NAME ๐ŸŒธ

user-session-migration โ€” migrate in-session user data. that's the whole vibe ๐Ÿ’…


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

user-session-migration [options]

โœจ DESCRIPTION โœจ

so the user-session-migration program is literally here to migrate in-session user data โ€” like, when a program is evolving its configuration, or when it needs to have files moved and so on. that's her moment. she's generally autostarted at the very beginning of the session, and she comes with caching capabilities built right in. iconic behavior, honestly ๐Ÿ‘‘


the general usage?? it's giving "drop a file and forget it." you ship an executable file in XDG_DATA_DIR/user-session-migration/scripts, and that one gets executed the next time the user logs into the session. she'll execute all the executable files in there in ascii order, one after another. no skipping, no shuffling, just vibes in alphabetical-adjacent order fr fr ๐Ÿฆ‹


now the important part, bestie, listen up:

  • if a script exits with a non-zero exit code, the migration will be retried again at next login and an error will be reported. she's not letting that slide ๐Ÿ˜ญ
  • if a script exits with the special exit-code 77, that's considered an explicit skip, and no error will be reported. 77 is the "nah I'm good" code, periodt ๐Ÿ’…

and even though the program tries to cache some timestamp and keep scripts from being launched twice (they're skipped on subsequent runs), the executables file should be idempotent. like โ€” don't rely on the cache to save you, okay?? write it so running it again is fine. no cap ๐Ÿซถ


๐Ÿ’œ OPTIONS ๐Ÿ’œ

  • --dry-run โ€” this parameter enables you to run the user-session-migration tool without really launching the scripts and without marking them as migrated. it's generally used together with --verbose for debugging purposes. it's the "let's just see what would happen" button, and we love her ๐Ÿ™ˆ
  • --file filename โ€” this parameter, followed by a path or filename, tells sesions-migration to only consider that script file and ignore XDG_DATA_DIR. it also won't log this special file as being migrated. very "this one, specifically, and nothing else" energy ๐ŸŽ€
  • --help โ€” display a quick command help. the classic. when in doubt, ask for help โœจ
  • --verbose โ€” show a LOT of verbose information. it can be used by the user to debug configuration issues; she will tell you everything, and I mean everything ๐Ÿ—ฃ๏ธ๐Ÿ”ฅ

๐Ÿซถ gentle reminder bestie: --dry-run and --verbose are the duo. dry-run alone is fine, but together they're the debug dream team.

and that's the whole page!! tysm for reading, you ate that ๐Ÿ“๐Ÿ’–

this was the user-session-migration(1) page from the Linux User's Manual, dated 28 Aug 2025. mwah, go migrate something cute ๐Ÿ’…๐ŸŒˆ

๐Ÿ“ฆ where this page comes from