- 0 Posts
- 44 Comments
it will help developers
Until they break it.
ship extensions faster
Which they need to adress the regular breakages.
and with fewer bugs by using standard JavaScript modules and IDE support
If I wanted to suffer web technologies, I’d develop content targeting web browsers, not a DE. JavaScript does a lot of things, being conducive to bug free code is not one of them.
I really admire the pain tolerance and endurance of devs developing and maintaining extensions for gnome. At what point does it become acceptable for them to drop that garbage DE? Rhetoric question: always has been.
Heed the warning ;-)
Jk. It’s not black magic. Just do as AlpacaChariot said. You might want to read up on it a bit https://www.shell-tips.com/bash/environment-variables/
It’s certainly no bad habit to handle spaces in scripts preemptively, and obviously they do occur in the wild. Quotes from ls output do not get piped to other commands. I had to look that up myself right now, because it has been quite a while since it mattered to me.
$ touch 'file with spaces in name' $ ls 'file with spaces in name' $ ls | cat file with spaces in name $
Looking through some scripts I wrote back in the day, I seem to like to use
ls -1
in scripts. I guess that reduces ambiguity on what the separator is.
The backslash escapes the space because it would otherwise denote a seperator to the next argument of the command.
ls a b c
means invoke ls with the three arguments a,b, and c.ls 'a b c'
orls a\ b\ c
means invoke ls with one argument “a b c”. That behavior is universal for pretty much all unix/linux shells (ie bash).
I’d wager a guess, that all file/folder paths that are surrounded by quotes contain at least one space!? And you’re talking about the output of ls? It’s rather unlikely, that installing any software has changed that behavior. It’s just a display feature, to denote that “two” parts separated by a space are actually one.
_cnt0to Linux@lemmy.ml•PSA: When people ask you "What distro should I use?", try pointing them here9•2YI just did the questionnaire for shits and giggles, not expecting much. The top two suggestions were fedora and debian. I’m actually running fedora and debian on different machines. I wonder how much of a fluke that is, or if it really is that good. Anybody else, who’s already happy with their distribution(s), tried it?
My mother always made chicken soup when I was sick with a cold/flu. I always felt worse afterwards and she would be upset when I told her because “that’s so unkind to say”, like it was a criticism of her cooking. It took me so many years to figure out that I am slightly allergic to celery which I was only fed when I was already sick …
If you want to add tea (sometimes I add black tea), just let it steep for the normal duration after cooking the rest and before adding the orange juice and honey. For the best result/taste you should grind the spices right before cooking. (Pre-)ground spices work to; you might use a little bit more of them. A word of warning on the pepper: use very little at first. Cooked it the water it is a lot hotter/more stinging than you might expect.
_cnt0to Linux@lemmy.ml•Still trying to figure out this Lemmy ordeal. lots of overlapping and not enough specific groups, so I feel this should belong here4•2YType A to C (almost) only describe the physical dimensions of the sockets/connectors. There is a (non-standard) color coding for A sockets that let’s you see at one glance which USB version is supported (look for “Usual USB color-coding” here: https://en.wikipedia.org/wiki/USB_hardware). Color coding is rare on laptops, though. The best kind of cable is one that can be plugged in without force on both ends (/s). If you want to use a docking station, more important is, what protocols are supported on which port of your laptop. What you want/need is DisplayPort over USB-C (DP Alt Mode) or Thunderbolt. There is no easy command to check if you have it, and the most common advice to look for certain emblems next to the socket isn’t really reliable. A quick google search suggests, that your machine can speak DisplayPort 2.0 and Thunderbolt 4. You should look into the technical specifications of your machine to be sure.
edit: mixed you up with OP, but, meh, unaltered reply:
Where the fuck is the actual executable and its configs?
which ...
with … being the name of the executable. Whyever it matters to you in which exact path an executale is …God help you when you uninstall and clean things up if you use compiled packages instead of ones from your repository.
make uninstall
orxargs rm < install_manifest.txt
will usually do the trick. If neither is an option, observe the output ofmake -n install
and undo the installation manually.Judging from your post and comments, you’d be much better off with a distro other than arch and using packages from a distros repository plus maybe flatpak or snap.
This has to be my number one gripe about Linux. How every package just spews binaries and libraries and config files all over the place.
99.9% of the times those places are pretty well defined and easy to look up. You seem to lack some basic knowledge about linux/unix conventions and make false assumptions about how things should be and then come to judgemental conclusions when they aren’t.
I actually have an older HP envy x360 (AMD chipset). Works like a charm with linux (everything out of the box). The touchscreen is fully functional, but I don’t really use it. I don’t dig that at all 😅
One thing that bothers me is that it is impissible to update the BIOS firmware without at least a Windows VM.
For the kind of workload you’re describing, 16GB of RAM was on the low end like 5 years ago. Your number one priority should be getting more RAM. For what you’re doing vmware is at least better than HyperV, and depending on what people are doing with their machines there can be pros and cons favoring Windows, linux, OSX, … in your case Windows is factually the worst choice. When working as a developer with linux native technologies, use linux. If you insist on your kids playing with your work machine (interesting choice), and they “need” Windows, then dual boot. Other than that I’d second another users advice to go with fedora (easy to use, up to date, no bullshit). But do yourself a favor, go bare metal, and get more RAM.
Sure, things usually put env in /usr/bin, but there’s no guarantee for that.
There is even less guarantee for it to be anywhere else.
Hardcoding /usr/bin/env is probably your best bet
Because it is the convention.
That’s why #!env is probably your best bet
It definitely isn’t. That might work in your user space instance of bash in the desktop, but will likely fail in a script invoked during boot, and is guaranteed to fail on several non-gnu/non-linux systems.
#!/usr/bin/env
is the agreed convention and there is no probably or but about that. If that does not work on a system it is a bug (looking at you BusyBox containers 🤨).
Up until now, I’ve only been commenting on other peoples comments to nitpick. I think it is time to give you a comprehensive answer on my own:
You didn’t mention, what distribution you are using. Either way, you should use your distributions package manager to install zsh. Wherever that places the zsh binary is fine; you should not change that! If you want to know where the zsh binary is located, you can issue the command
which zsh
. That zsh should somehow be dangerous as a root shell because it is not POSIX compliant is nonsense. You can use whatever you like as a shell for root. If you don’t want to change the login shell for root, you can just start every shell from any shell by executing it’s binary (i.e. in bash typezsh
, or the other way around). If you want to know what shells on your system are considered viable login shells by your system, you can issue the commandcat /etc/shells
; in your case it should list/usr/bin/zsh
. If you want to change the login shell for a user, as that user runchsh -s ...
where … is the fully qualified path of a valid login shell; to be sure to not make typos or use an alternate path, you can combine that withwhich
, and for example to use zsh use the commandchsh -s $(which zsh)
. If you are the sole user of your system, I’d strongly recommend using seperate configurations for zsh for your normal user and root.So now when I drop into a root shell I don’t get […]
Issuing
su -
orsudo -i
or logging in as root in a full screen TTY (ctrl+alt+F*) will spawn a new shell (the login shell configured for root). If you are unsure, what shell you’re currently in, you can find that out, by issuing the commandreadlink /proc/$$/exe
. Ifreadlink
is not available on your system, you can useps -fp $$
; be aware though, that that will show you the command the shell was started with, not necessarily the path of the shell executable.If you want to write scripts you should always specify the shell it should be executed by with a shebang. For maximum portability/compatibility (do you like to distro hop? want to share it with a friend/the internet?) you should use
env
in the shebang. For you, if you want to script with zsh, that simply means always having#!/usr/bin/env zsh
as the first line of scripts.
While this is true for most linux distributions, it’s not true for all and there are other POSIX compliant OSs which are not linux at all:
/ # grep -i pretty /etc/*-release /etc/os-release:PRETTY_NAME="Alpine Linux v3.18" / # ls -ld /bin drwxr-xr-x 2 root root 862 Aug 7 13:09 /bin / #
As you can see, /bin is not a symlink there.
I understand the motivation of using the user environment in the root context. It’s still a bad idea. The assumption is, that it is easier to compromise a non-privileged desktop user than the root account. Imagine some exploit breaking out of a sandbox and doing some minor modifications to your $HOME: either aliasing
ls
to a script somewhere in your home by changing your profile or some shell rc file, or prepending your $PATH environment variable with a folder burried somewhere in your home directory where a scriptls
is placed:#!/usr/bin/env sh if (( $EUID == 0 )); then # do something evil here fi \ls "$@"
Now, as an attacker you just wait for some admin on a shared system to come along and use
sudo -s
.
On your system. Check out the table halfway down where env is located on different systems: https://www.cyberciti.biz/tips/finding-bash-perl-python-portably-using-env.html
#!/usr/bin/env zsh
is better for portability/compatibility. You can set the root shell as whatever you want (including zsh). Leaking the user context withsudo -s
is generally a bad idea. Unless you actually share a system with multiple users, I’d advise to set a root password and usesu -
in favor ofsudo -i
orsudo -s
. Two (proper) passwords are more secure than one.edit: typo
I’ll add my +1 for FreeCAD. It can export to stl (you mentioned that in another comment). Though, if it is a good fit for your father’s needs is highly dependent on the kind of designs he’s trying to achieve. FreeCAD is good for “geometric” designs, not so good for “organic” shapes. As any tool, it comes with a learning curve.
Depends on settings and the amount of availlable RAM. Install fedora KDE spin on three systems, one with 4GB, one with 8 and one with say 16GBs of RAM. You should see, that the vanilla install of KDE uses different amounts of RAM on each system. KDE uses caching of all kinds of stuff to make the overall experience smoother. The amount and aggressivenes of the caching depends on distribution defaults. And KDE using, say, 8GB of RAM when idling isn’t bad. RAM is only useful, when it is used. When memory pressure increases (applications are actively using lots of RAM), KDE will automatically reduce cache sizes to free the RAM up again.
The entire notion of the system using as little RAM as possible is really weird and usually (imho) shows that people who say that don’t understand how the RAM is used. I want my system to make good use of my RAM, and as much of that as is reasonable.