Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add steam flatpak support #82

Open
2 tasks done
kingmaj0r opened this issue Aug 24, 2024 · 8 comments
Open
2 tasks done

[Feature] Add steam flatpak support #82

kingmaj0r opened this issue Aug 24, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@kingmaj0r
Copy link

Before Requesting

  • I found no existing issue matching my feature request
  • This request is related to Millennium, and not a request for a specific theme/addon

Describe the feature you'd like!

Could you please add support for Steam Flatpak, as it is currently not supported? I have experience with Linux and would be happy to assist with any Linux-related tasks.

Thank you for considering this request.

Anything else?

No response

@kingmaj0r kingmaj0r added the enhancement New feature or request label Aug 24, 2024
@shdwmtr
Copy link
Owner

shdwmtr commented Aug 24, 2024

I will likely never add millennium to flatpak, or any other unix package manager (and If I do, not in the near future). I already have enough to manage version control for.

@shdwmtr shdwmtr closed this as completed Aug 31, 2024
@NoWayAAWillDelete
Copy link

they're talking about adding support for the flatpak version OF steam not adding millennium to steam

@Okazakee
Copy link

they're talking about adding support for the flatpak version OF steam not adding millennium to steam

exactly

@shdwmtr shdwmtr reopened this Jan 15, 2025
@shdwmtr
Copy link
Owner

shdwmtr commented Jan 15, 2025

Ah, Flatpak support is definitely doable; I must have misunderstood the original question.

@Okazakee
Copy link

Ah, Flatpak support is definitely doable; I must have misunderstood the original question.

No problem, this would also enlarge the support surface as flatpak is distro agnostic! It even fullfills your need to not support every single package distribution repo.

@NoWayAAWillDelete
Copy link

shd any eta on when you can add it? also might I recommend adding a way for someone to specify where their steam is so they can manually make it work

@shdwmtr
Copy link
Owner

shdwmtr commented Jan 18, 2025

No ETA. There is a lot on the todo list above this.

@shdwmtr
Copy link
Owner

shdwmtr commented Jan 19, 2025

Its proven to be a lot more difficult then I'd initially anticipated. The way flatpak sandboxes steam is very much so getting in the way. Its messing with some sort of SSL config / the SSL certificates aren't being read from the host, or its using wrong ones, or something else I have no idea.

If anyone interested in the thread wants to work on it themselves, here's how:

  1. Install Millennium https://docs.steambrew.app/users/installing#linux

  2. Run flatpak override --user --filesystem=$HOME/.millennium:rw This will allow the sandbox to read and write to files in the millennium directory.

  3. Replace /var/lib/flatpak/app/com.valvesoftware.Steam/x86_64/stable/active/files/bin/steam with

    #!/usr/bin/python3
    # -*- coding: utf-8 -*-zz
    import re
    import sys
    from steam_wrapper import main
    
    import os
    millennium_py_bin = os.path.expanduser('~/.millennium/ext/data/cache/bin/python3.11')
    
    # if the binary is not executable, make it executable
    if not os.access(millennium_py_bin, os.X_OK):
        os.chmod(millennium_py_bin, 0o755) # 0o755 is the permission mode for user read/write/execute, group and others read/execute
    
    # Preload Millennium shims into the steam runtime
    env_vars = [
        ('LD_PRELOAD', '~/.millennium/libMillennium.so'),
        ('LD_LIBRARY_PATH', '~/.millennium/')
    ]
    
    for var, path in env_vars:
        expanded_path = os.path.expanduser(path)
    
        if var not in os.environ:
            os.environ[var] = expanded_path
        else:
            os.environ[var] += ':' + expanded_path
    
    if __name__ == '__main__':
        print("Starting Steam...")
        sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
        sys.exit(main())
  4. Run steam flatpak run --branch=stable --arch=x86_64 com.valvesoftware.Steam

  5. Atleast for me, while Millennium is bootstrapping it crashes on an SSL error
    ssl.SSLError: unknown error (_ssl.c:3098)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants