It understands \n
if I recall correctly. You can also write regular bash, use templating tools, etc. Just use the nativeBuildInputs
parameter if you need a binary that isn't provided by stdenv.
Another alternative approach would be to add a duplicate desktop file, but to write it declaratively using Home Manager:
# in home.nix
home.file.".local/share/applications/firefox.desktop".source =
pkgs.runCommand "firefox-desktop" { } ''
cp "${pkgs.firefox}/share/applications/firefox.desktop" "$out"
substituteInPlace "$out" \
--replace-fail "Terminal=false" "Terminal=true"
'';
# - or -
home.file.".local/share/applications/firefox.desktop".text = ''
[Desktop Entry]
Name=Firefox
Icon=firefox
Exec=firefox --name firefox %U
'';
It would be possible to DIY this with user activation scripts, but I don't really see a value in doing that over the symlinkJoin
.
Since the desktop files come directly from a package you'll need to change the package you're installing. This works best if you use the postPatch
phase of symlinkJoin
:
pkgs.symlinkJoin {
inherit (pkgs.firefox) pname version;
paths = [ pkgs.firefox ];
postPatch = ''
# String replacement example - will run the app in a terminal
substituteInPlace "$out/share/applications/firefox.desktop" \
--replace-fail "Terminal=false" "Terminal=true"
'';
}
The reason for using symlinkJoin
here is that it creates a package with the same outputs as the original Firefox, but with this bash script having run. You can use this like any other package:
let
firefox' = <...>
in
{
environment.systemPackages = [ firefox' ];
# - or -
programs.firefox.package = firefox';
}
Note that symlinkJoin
has special handling for postPatch
, but ignores all other stdenv phases, so you need to do everything in one bash script. You can use all the parameters for runCommand
though, such as buildInputs
and nativeBuildInputs
- e.g. for compiling sass in a wrapper derivation.
In some cases it's useful to also inherit meta
or passthru
because it's used in some nixpkgs/nixos sanity checks, but it's usually not required.
Another approach would be to use overrideAttrs
, which will also work but will cause Nix to rebuild the package from scratch. This might be fine or even desired in some cases, but you probably don't want to do that in this case.
Many people who don't know what they're talking about in this thread. No, used memory does not include cached memory. You can confirm this trivially by running free -m
and adding up the numbers (used + cached + free = total). Used memory can not be reclaimed until the process holding it frees it or dies. Not all cached memory can be reclaimed either, which is why the kernel reports an estimate of available memory. That's the number that really matters, because aside from some edges cases that's the number that determines whether you're out of memory or not.
Anyway the fact that you can't run Linux with 16GB is weird and indicates that some software you are using has a RAM leak (a Firefox extension perhaps?). Firefox will use memory if it's there but it's designed to cope with low memory as well, it just unloads tabs quicker so you have to reload often. There are also extensions that make tab unloading more aggressive, maybe that would help - especially if there's memory pressure from other processes too.
Insightful article. I have to confess I never realized the accessibility situation was this bad.
I also want to highlight this excerpt from the comments:
Making things accessible isn't hard technically. But it requires coordination and people to care about it enough to work on it at the expense of other features. If [I] developed an application on a team and said I had 'one security guy that works on that stuff as long as it doesn't interfere with the rest of our work' I'd be dragged over the coals and have my project forked by the public.
But with accessibility? There's really no sense of priority or urgency despite it being broken for years and not putting much effort in to fixing it.
It's prettier than a TTY and you can pick whether you want a Wayland or an X11 session without having to know the correct startup commands. You can pick between different desktops too. And a Display Manager can offer on-screen keyboard and touchscreen support while a TTY can't (at least GDM does, I'm not sure about SDDM off the top of my head).
Aside from that whatever command you are using in the TTY to launch Plasma might or might not be the same commands SDDM uses, which might or might not lead to issues in setting up the environment. If your environment is fine and you don't care about having to use a physical keyboard then of course you can remove it. It's not exactly load bearing.
Try launching Steam from the terminal so you have a chance at seeing an actual error message, at least for the crashing games.
It might be the kernel as the other comment says since the 9070 is pretty new. If it works without issues on something like Fedora or OpenSUSE TW then that was probably the issue.
I am very sorry to remind everyone about the existence of Visual Basic, but it has:
- VbCrLf
- VbNewLine
- ControlChars.CrLf
- ControlChars.NewLine
- Environment.NewLine
- Chr(13) & Chr(10)
And I know what you're asking: Yes, of course all of them have subtly different behavior, and some of them only work in VB.NET and not in classic VB or VBA.
The only thing you can rely on is that "\r\n" doesn't work.
The GDPR conversation is hilarious. Sure they're a US based company, but after 5 years of operation I would've expected them to have consulted a lawyer about this at some point. Forgetting (assuming it's not "forgetting") about the required documentation is not the worst thing in the world morally but it doesn't exactly make them look competent either.
To be fair this also happened to Eagle Dynamics, developer of DCS, the other "realistic" flight sim that players take far too seriously. Except there it was a Dev that got arrested in Georgia and extradited to the US...
While unfortunate, not shipping these standard Google apps is not really an option for any Android manufacturer due to Google requirements. Including them is required if you want to use anything from the GSM, which includes things like the Play Store and everything it touches. You can technically ship a different Android distribution like Lineage or /e/, but that's not really what most people will be expecting of an "Android" phone and will narrow the viable target demographic even more than the value proposition already does.
The mentioned performance governor runs the CPU permanently at maximum frequency, which is obviously bad on battery powered devices and on devices with lacking thermal headroom. I think it might cause problems in virtualized environments as well but I'm not sure about that.