Hi all,

I am about to do a bit of a distro hop, and I am looking at Fedora and its spins, after years on Debian / POP.

I am not looking forward to setting it all up again, it’s a drag.

I wonder, is there a tool that lets me script installs?

I’ll want to check if application exists, and if so, update, otherwise, install. That kind of thing.

Things like:

  • Telegram
  • Joplin
  • Docker
  • Firefox
  • Ungoogle Chromium
  • Sublime Text
  • VSCodium
  • Keepass
  • Thunderbird
  • DBeaver
  • Gimp
  • Inkscape
  • KDENLive
  • Syncthing
  • Steam
  • VLC
  • Localsend
  • Flameshot
  • Element
  • Cherrytree
  • Calibre
  • Anydesk

I show the list, only to give an idea of what might be involved.

I’m new to Fedora, so not sure how it differs beyond the package manager. But, thought I’d ask.

Does such a tool exist, and is it worth my time? I can practice on a VM before trying on the final install/s.

Thank you

  • merthyr1831@lemmy.ml
    link
    fedilink
    English
    arrow-up
    1
    ·
    23 minutes ago

    Some distros allow this. Nix for example allows you to save config files that describe your entire system (apps, settings, etc) and then load them in one go. Other distros are following suit with their own tailored solutions too (I think Ubuntu might have something? Manjaro?).

  • utopiah@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    5 hours ago

    I did more than 5 installs this weekend (for … reasons) and the “trick” IMHO is …

    Do NOT install things ahead of actually needing them. (of course this assume things take minutes to install and thus you will have connectivity)

    For me it meant Firefox was top of the list, VLC or Steam (thus NVIDIA driver) second, vim as I had to edit crontab, etc.

    Quite a few are important to me but NOT urgent, e.g Cura (for 3D printer) and OpenSCAD (for parametric design) or Blender. So I didn’t event install them yet.

    So IMHO as other suggested docker/docker-compose but only for backend.

    Now… if you really want a reproducible desktop install : NixOS. You declare your setup rather than apt install -y and “hope” it will work out. Honestly I was tempted but as install a fresh Debian takes me 1h and I do it maybe once a year, at most, no need for me (yet).

    • utopiah@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      5 hours ago

      Another “trick” I use is having an ~/Apps directory in which I have AppImage, binaries, etc that I can bring from an old /home to a new one. It’s not ideal, bypassing the package manager, and makes quite a few assumption, first architecture, but in practice, it works.

  • Kuadhual
    link
    fedilink
    arrow-up
    11
    ·
    10 hours ago

    Using ansible will help you on your 2nd, 3rd , nth install.

    But getting ansible to do what you want (plus testing) for the first time would takes 10x longer than manual install.

    I think there’s xkcd about that.

    • exu@feditown.com
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      28 minutes ago

      Just installing applications is pretty easy though.

      ---
      - hosts: localhost
        become: yes
        tasks:
          - name: Install required software
            dnf:
              state: latest
              name:
                - firefox
                - telegram
                - calibre
      

      ansible-playbook install.yml

      Something like that (untested)

    • LeLachs@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      It should be possible. Although probably very complicated. Have a look at https://distrobox.it/. It allows you to tightly integrate containers into your desktop, including accelerated graphics, some devices, your homedir, etc. It can even automatically install desktop shortcuts. (You can disable the integrations of course) Even tho it uses Podman instead of docker, AFAIK it should be 1:1 compatible with docker for your usecase.

  • Leaflet@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    edit-2
    9 hours ago

    I have a bash script I use to script my Silverblue install. Something like this should work.

    # space-separated list of packages to install
    S_RPM_PACKAGES_TO_INSTALL="pkg1 pkg2 pkg3"
    
    # function to install the packages
    dnf_install () {
    	sudo dnf install -y $1
    }
    
    # call to function, passing the list
    dnf_install "$S_RPM_PACKAGES_TO_INSTALL"
    

    I have it set up this way so that I just have a bunch of bash variables describing the stuff I want to install all at the top of the file, but the function definitions and calls lower down since I don’t need to see them.

    It also does other things like removes packages from the system, removes some preinstalled flatpaks, installs flatpaks from Fedora Flatpaks / Flathub / gnome-nightly, and sets up gnome through a list gsettings commands.

    As I use my system, I add new apps to the list I want next time I install and remove apps I don’t use.

    • makingStuffForFun@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      9 hours ago

      I love this, I will update the script I’ve setup to mirror your idea. Nice and clean.

      I wonder if you can help at all? The only app that fails install is Anydesk. I have to do the following:

      # Anydesk
      sudo tee /etc/yum.repos.d/anydesk.repo<<EOF
      [anydesk]
      name=AnyDesk Fedora Linux
      baseurl=http://rpm.anydesk.com/fedora/x86_64/
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=https://keys.anydesk.com/repos/RPM-GPG-KEY
      EOF
      

      sudo dnf install anydesk -y

      But it gives an error, saying :

      [anydesk]
      name=AnyDesk Fedora Linux
      baseurl=http://rpm.anydesk.com/fedora/x86_64/
      gpgcheck=1
      repo_gpgcheck=1
      gpgkey=https://keys.anydesk.com/repos/RPM-GPG-KEY
      AnyDesk Fedora Linux                                                                                                                                                         397  B/s | 488  B     00:01    
      AnyDesk Fedora Linux                                                                                                                                                         1.8 kB/s | 1.7 kB     00:00    
      Importing GPG key 0xCDFFDE29:
       Userid     : "philandro Software GmbH <info@philandro.com>"
       Fingerprint: D563 11E5 FF3B 6F39 D5A1 6ABE 18DF 3741 CDFF DE29
       From       : https://keys.anydesk.com/repos/RPM-GPG-KEY
      AnyDesk Fedora Linux                                                                                                                                                         796  B/s | 1.2 kB     00:01    
      Error: 
       Problem: conflicting requests
        - nothing provides libgtkglext-x11-1_0-0 needed by anydesk-6.3.2-1.x86_64 from anydesk
      (try to add '--skip-broken' to skip uninstallable packages)
      
      

      Is there a special way to add that kind of command to a bash script? All good apart from that though.

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 hours ago

    Docker, docker and docker compose

    Probably would be better to move to full kubernetes but it does have a strong learning curve

  • feddylemmy@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    10 hours ago

    Something like Ansible won’t help you the first time around, but it’ll make the next times easier.

  • qocu [he/him]@hexbear.net
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 hours ago

    I didn’t find any script that would install the apps you wanted, but I did find a script that will help you build your own (it’s pretty easy). You can take inspiration from this one and modify it, so that whenever you reinstall your system, you’ll run your script.

    https://gist.github.com/engineervix/ed53aa410a22620013e04baca437abb3

    Research what commands are used in Fedora to install what application and add them to your script. Then, give your .sh file execute permissions and run it. You can do this in a virtual machine first if you want.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 hours ago

      Not to sound rude but I am fairly surprised to see this from a hexbear user. It seems like a lot of hexbear is just going around and trolling.

      I can’t say I agree with hexbear but I appreciate the normal (and very useful) comment

    • makingStuffForFun@lemmy.mlOP
      link
      fedilink
      arrow-up
      2
      ·
      9 hours ago

      …aaaand DONE and tested. That was amazingly simple, when there’s a framework like that to work, and learn from. Thanks again.

  • lens0021@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    10 hours ago

    Have you tried SaveDesktop? Thought It is limited in the flatpak softwares, but cloud synchronization feature is recently added.

    • subtext@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      10 hours ago

      Or any of the similar tools listed here, based on personal preferences! I currently use Chezmoi, but I like that they help you discover alternatives.

  • Concave1142@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    10 hours ago

    I use an Ansible playbook to do fresh install stuff such as app installs & joining my local Samba AD.

    Another option, that I’ve never tried, would be to put your /home directory on another partition. That only solves the settings though and not your app installation bit.