Apt-get and flatpak - how to download and install from e.g. github?

install

#1

Dear community,

I already noticed that somehow, apt-get does not seem to work on the Endless system (although, strangely, it is actually installed, but there are error messages which, even when in recovery mode, cannot be eliminated, such as
"not using locking for read only lock file … and chmod won’t change it in recovery mode). The alternative is suggested to be flatpak. But: How exactly do I install things with flatpak (I have read the documentation, but I must admit, as a newbie to Linux, that I could not understand exactly since some things have to be specified which I do not know), especially from github? And how do I get “make” commands and the like, e.g. from g++ etc. (without installing a heavy package like Android or stuff like this)?

Thanks in advance


#2

@Osmium_Dresden


#3

@Osmium_Dresden

You install the application in Endless OS by the program center

https://uploads-community-endlessos-com.s3-us-west-2.amazonaws.com/original/2X/e/e84a4fa5d417a1a3169864798ac4f1386241776d.png


#4

Ok, well, thanks for the info. But, is it still possible to install software which is not in the App Center, e.g. Python distributions?


#5

Yes
From version 3.0 on, Endless OS uses Flatpak, a new app distribution system for Linux


#6

@Osmium_Dresden The core of the OS (/usr, etc) is mounted read-only and managed by ostree, so you cannot install arbitrary packages using dpkg or apt. If a package can be unzipped and run from your home directory without installing, that might work for you.

See https://community.endlessos.com/t/command-for-compiling-c-program-code-in-terminal/1359 and https://community.endlessos.com/t/announcing-flapjack-developer-tools-for-endless-os/5442 if you are interested in using developer tools in Endless.

The other option, if you absolutely have to install a package is to run sudo ostree admin unlock --hotfix (and wait several minutes for the operation to complete). This overlays the ostree with a writeable filesystem to which you can install or modify packages. (With --hotfix, the changes you make are retained after rebooting.) The overlay is removed when the OS is updated, and any changes you have made are removed. This feature is only intended for advanced users who really know what they are doing, and we may not be able to support you if anything goes wrong.

Roddy


#7

Thanks a lot for this info! Indeed, I bought a Linux computer, since I want to use it for work, and many things concerning installation of new packages, e.g. for C++, can be very cumbersome under Windows, if it is possible at all to install (or build) the required package. In addition, I need LaTex for writing texts, and I haven’t found it in the App center, so this might be a good example for a software I need exterior from what is offered (at least at first glance).


#8

"The overlay is removed when the OS is updated, and any changes you have made are removed. "

Does that also mean that, in case I install something with this overlay, this is also removed when the OS is updated? And is there a way to manually remove this overlay again, of course favourably with keeping everything I have installed?

Thanks


#9
  • With sudo ostree admin unlock — the overlay is removed when you reboot the system. I recommend this if you intend to remove the overlay at all.
  • With sudo ostree admin unlock --hotfix — the overlay is only removed when you update the OS.

I’m not 100% sure, but I think that flatpaks that you have installed while the overlay is in place, will remain even after the overlay is removed. The overlay should only affect /usr. If you are talking about keeping stuff that you have installed in /usr, like LaTeX, then there’s no way to keep them when the overlay is removed, since they are installed into the overlay.

For LaTeX specifically, the developer of GNOME LaTeX is working on packaging it for Flatpak, and accepts donations.


#10

Thanks for the answer. I don’t understand, why is it so complicated and does not just work “normally” (or say, no option to make it work like one expects it from “conventional” Linux stuff)? I know that it’s not intended for developers or programmers, but even in Windows one has the opportunity to use, e.g., Cygwin and the like, without being removed after a system update.


#11

Please do not misunderstand me: I do grasp that this Linux distribution is meant for other purposes and I think it’s great that you put effort in it to make it both secure and user friendly. However, I do not see a clear reason why there should not be a (maybe well hidden) option to permanently have write access to /usr (and the like), since, after all, it is my own computer, and since, apparently, it is not a copyright issue or sth. like that, as Endless OS (as far as I have understood) is still available for free.

Or, if there is, I would like to kindly ask for a guide of how to do it, as it is really important for me to be able to do my work.

Thanks in advance :slight_smile:

…or maybe, as an alternative: When using admin unlock from OStree, and using its commands, will the files that I install, if I move them to /etc, stay there when the overlay is removed (after system update)? As far as the documentation

https://ostree.readthedocs.io/en/latest/manual/introduction/

tells, this should be the way to do it (among, e.g., adding another directory)? So, in other words, directories like /etc (or my own created directories) shouldn’t be affected by updates, not even when in overlay mode, or?


#12

Yes, good question. There isn’t a copyright issue. I realize that sometimes it’s necessary to have a writable /usr but as you noted, that’s not the goal of Endless OS.

It is possible to remove OSTree’s managed filesystem entirely and have a conventional Linux system with writable /usr. This is what some of our developers do internally, who need to overwrite the fundamental components of the OS in order to develop them. Usually they do this in a virtual machine. I would not recommend doing this on your real computer, because you will never be able to get updates again, since we only provide updates through OSTree. We can’t maintain an entirely separate update channel that is not managed by OSTree, so that’s the clear reason why we don’t provide it.

/var and /etc are not controlled by OSTree, only /usr, although there are some components of the updater that modify files in /var and /etc. I think (but it’s worth double checking) if you put things in /etc they will not be affected by updates, nor the ostree admin unlock overlay.

Almost anything that you might want to install in /usr, could also be installed in your home directory, into ~/.local/bin, for example. This is what I would recommend.

An alternative, if it was not possible to install things in your home directory, would be to install them into a directory like /opt/usr, then write a script to run ostree admin unlock --hotfix and symlink everything from /opt/usr into /usr. You can then run that script once after every OS update when the overlay is reset, making it relatively painless to recreate the overlay.


#13

Allright, thanks, this helps quite a bit! I’ll try installing things in a different directory, and will let you know if and how it worked for me (or if it doesn’t, and what doesn’t).


#14

Depending on your workflow, you might want to look at using something like GNOME Builder from the App Center. That comes with integrated development tools (via flatpak) and is probably the most adapted development tool for a system like ours. All of the other suggestions in the thread are super-valid though.


#15

Thanks, I haven’t noticed this option yet.


closed #16