Arthur Besse
cultural reviewer and dabbler in stylistic premonitions
- 12 Posts
- 113 Comments
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Just wanted to show off the lowest end hardware I ever ran Linux onEnglish5·23 days agoI’m planning on revitalizing and bringing this old Itautec to the 21st century
I think it was born in the 21st century? From this it looks like the first Celeron M was in 2004, and the first at that clockspeed was 2005.
Also, 2GB of RAM is plenty for many purposes - that’s more than any Raspberry Pi before the Pi 4 had!
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Cross-platform video player GrayJay now available as FlatpakEnglish93·1 month agoalso “you may not remove or obscure any functionality in the software related to payment to the Licensor in any copy you distribute to others.” 🤡
FUTO’s license meets neither the free software definition nor the open source definition.
Arthur Besse@lemmy.mlto Programmer Humor@programming.dev•[comiCSS] Visited LinkEnglish511·2 months ago
Arthur Besse@lemmy.mlto linuxmemes@lemmy.world•😳 tfw you find out your literal window runs linuxEnglish9·2 months agoit’s among the many OSes you can run in an emulator in your web browser at https://copy.sh/v86/
sometimes a footprint represents humanity
sometimes, but in GNOME’s case i think it is not intended to be a human foot but rather the foot of a mythological creature (a gnome). note that it has a squashed aspect ratio compared to a human foot, and also has only four toes.
apparently it’s also problematic in some cultures: https://wiki.gnome.org/Engagement/FootAndCulturalIssue
I started to python one and half week ago. So I’m still beginner.
Nice work! Here are a few notes:
The
WeatherApp
object has a mix of attributes with long-term (egself.LOCATIONS
) and short-term (egself.city
) relevance. Instance attributes introduced in places other than__init__
, which makes it non-trivial for a reader to quickly understand what the object contains. And, actually,self.{city,lat,lon}
are all only used from theadd_city
method so they could/should be local variables instead of instance attributes (just remove theself.
from them).There seem to maybe be some bugs around when things are lowercase and when not; for example checking
if self.city.lower() in self.LOCATIONS
but then when writing there the non-lowerself.ctiy
is used as the key toself.LOCATIONS
.The code under
if rep == "1"
andelif rep == "2"
is mostly duplicated, and there is noelse
branch to cover ifrep
is something other than 1 or 2.It looks like the config only persists favorites so far (and not non-favorite cities which the user can add) which isn’t obvious from the user interface.
Passing both
location
andlocations
intoWeatherAPI
so that it can look uplocations[location]
is unnecessary; it would be clearer to pass in the dict for the specific location. It would also be possible to avoid the need forLOWLOCATIONS
by adding a non-lowercasename
key to the per-location dictionaries that just havelat
andlon
right now, and then keepingLOCATIONS
keyed by the lowercase names.HTH! happy hacking :)
Arthur Besse@lemmy.mlto linuxmemes@lemmy.world•I never had problems with permission again after I know the real power of sudoEnglish32·2 months agoWhy memorize a different command? I assume sudoedit just looks up the system’s EDITOR environment variable and uses that. Is there any other benefit?
I don’t use it, but,
sudoedit
is a little more complicated than that.details
from
man sudo
:When invoked as sudoedit, the -e option (described below), is implied.
-e, --edit Edit one or more files instead of running a command. In lieu of a path name, the string "sudoedit" is used when consulting the security policy. If the user is authorized by the policy, the following steps are taken: 1. Temporary copies are made of the files to be edited with the owner set to the invoking user. 2. The editor specified by the policy is run to edit the tem‐ porary files. The sudoers policy uses the SUDO_EDITOR, VISUAL and EDITOR environment variables (in that order). If none of SUDO_EDITOR, VISUAL or EDITOR are set, the first program listed in the editor sudoers(5) option is used. 3. If they have been modified, the temporary files are copied back to their original location and the temporary versions are removed. To help prevent the editing of unauthorized files, the follow‐ ing restrictions are enforced unless explicitly allowed by the security policy: • Symbolic links may not be edited (version 1.8.15 and higher). • Symbolic links along the path to be edited are not followed when the parent directory is writable by the invoking user unless that user is root (version 1.8.16 and higher). • Files located in a directory that is writable by the invok‐ ing user may not be edited unless that user is root (ver‐ sion 1.8.16 and higher). Users are never allowed to edit device special files. If the specified file does not exist, it will be created. Un‐ like most commands run by sudo, the editor is run with the in‐ voking user's environment unmodified. If the temporary file becomes empty after editing, the user will be prompted before it is installed. If, for some reason, sudo is unable to update a file with its edited version, the user will receive a warning and the edited copy will remain in a temporary file.
tldr: it makes a copy of the file-to-be-edited in a temp directory, owned by you, and then runs your
$EDITOR
as your normal user (so, with your normal editor config)note that sudo also includes a similar command which is specifically for editing
/etc/sudoers
, calledvisudo
🤪
encryption would prevent the modem from seeing it when someone sends it, but such a short string will inevitably appear once in a while in ciphertext too. so, it would actually make it disconnect at random times instead :)
(edit: actually at seven bytes i guess it would only occur once in every 72PB on average…)
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Tuxedo OS (Ubuntu-based) with KDE/Wayland - waking from Sleep freezes the computer. Help?English3·3 months agoyou could edit your post title
Have you tried https://mike-fabian.github.io/ibus-typing-booster/ ?
I have not, but I think it does what you’re looking for.
The demo video emphasizes its use as an emoji picker but it was originally created for typing Indic languages.
At first i thought, wow, cool they’re still developing that? Doing a release or two a year, i see.
I used to use it long ago, and was pretty happy with it.
But looking closer now, what is going on with security there?! Sorry to be the bearer of probably bad news, but... 😬
The only three CVEs in their changelog are from 2007, 2010, and 2014, and none are specific to claws.
Does that mean they haven’t had any exploitable bugs? That seems extremely unlikely for a program written in C with the complexity that being an email client requires.
All of the recent changelog entries which sound like possibly-security-relevant bugs have seven-digit numbers prefixed with “CID”, whereas the other bugs have four-digit bug numbers corresponding to entries in their bugzilla.
After a few minutes of searching, I have failed to figure out what “CID” means, or indeed to find any reference to these numbers outside of claws commit messages and release announcements. In any case, from the types of bugs which have these numbers instead of bugzilla entries, it seems to be the designation they are using for security bugs.
The effect of failing to register CVEs and issue security advisories is that downstream distributors of claws (such as the Linux distributions which the project’s website recommends installing it from) do not patch these issues.
For instance, claws is included in Debian stable and three currently-supported LTS releases of Ubuntu - which are places where users could be receiving security updates if the project registered CVEs, but are not since they don’t.
Even if you get claws from a rolling release distro, or build the latest release yourself, it looks like you’d still be lagging substantially on likely-security-relevant updates: there have actually been numerous commits containing CID numbers in the month since the last release.
If the claws developers happen to read this: thanks for writing free software, but: please update your FAQ to explain these CID numbers, and start issuing security advisories and/or registering CVEs when appropriate so that your distributors will ship security updates to your users!
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•What's with the move to MIT over AGPL for utilities?English12·4 months agofyi: GNU coreutils are licensed GPL, not AGPL.
there is so much other confusion in this thread, i can’t even 🤦
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•What's with the move to MIT over AGPL for utilities?English32·4 months agoApple makes the source code to all their core utilities available
Apple makes the source code for many open source things they distribute available, but often only long after they have shipped binaries. And many parts of their OS which they developed in-house which could also be called “core utilities” are not open source at all.
Every Linux distro uses CUPS for printing. Apple wrote that and gave it away as free software.
Apple did not write cups.
It was was created by Michael R. Sweet in 1997, and was GPL-licensed and used on Linux distros before Mac OS X existed. Apple didn’t want to be bound by the GPL so they purchased a different license for it in 2002.
Later, in 2007 they bought the source code and hired msweet to continue its development, and at some point the license of the FOSS version was changed to “GNU General Public License (“GPL”) and GNU Library General Public License (“LGPL”), Version 2, with an exception for Apple operating systems.”
for example, on a linux distro, we could modify the desktop environment and make it waaaaay lighter by getting rid of jpg or png icons and just using pure svg on it.
this has largely happened; if you’re on a dpkg-based distro try running this command:
dpkg -S svg | grep svg$ | sort
…and you’ll see that your distro includes thousands of SVG files :)
explanation of that pipeline:
dpkg -S svg
- this searches for files installed by the package manager which contain “svg” in their pathgrep svg$
- this filters the output to only show paths which end with svg; that is, the actual svg files. the argument to grep is a regular expression, wheremeans “end of line”. you can invert the match (to see the paths
dpkg -S svg
found which only contain “svg” in the middle of the path) by writinggrep -v svg$
instead.- the
sort
command does what it says on the tin, and makes the output easier to read
you can run
man dpkg
,man grep
, andman sort
to read more about each of these commands.
No, SVG files are not HTML.
Please change this post title (currently “today i learned: svg files are literally just html code”), to avoid spreading this incorrect factoid!I suggest you change it to “today i learned: svg files are just text in an html-like language” or something like that.edit: thanks OPXML and HTML have many similarities, because they both are descendants of SGML. But, as others have noted in this thread, HTML is also not XML. (Except for when it’s XHTML…)
Like HTML, SVG also can use CSS, and, in some environments (eg, in browsers, but not in Inkscape) also JavaScript. But, the styles you can specify with CSS in SVG are quite different than those you can specify with CSS in HTML.
Lastly, you can embed SVG in HTML and it will work in (modern) browsers. You cannot embed HTML in SVG, however.
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Linux Terminal: CTRL+D is like pressing ENTEREnglish2·4 months agoA ctrl-d does nothing on a non-empty line.
ctrl-d actually is flushing the buffer regardless of if the line is empty or not.
See my other comment for how you can observe it.
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Linux Terminal: CTRL+D is like pressing ENTEREnglish9·4 months agoNote: for readers who aren’t aware, the notation
^X
means hold down the ctrl key and type x (without shift).ctrl-a though ctrl-z will send ASCII characters 1 through 26, which are called control characters (because they’re for controling things, and also because you can type them by holding down the control key).
^D is the EOF character.
$ stty -a | grep eof intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; $ man stty |grep -A1 eof |head -n2 eof CHAR CHAR will send an end of file (terminate the input)
Nope, Chuck Testa: there is no EOF character. Or, one could also say there is an EOF character, but which character it is can be configured on a per-tty basis, and by default it is configured to be
^D
- which (since “D” is the fourth letter of the alphabet) is ASCII character 4, which (as you can see inman ascii
) is called EOT or “end of transmission”.What that
stty
output means is that^D
is the character specified to triggereof
. That means this character is intercepted (by the kernel’s tty driver) and, instead of sending the character to the process reading standard input, the tty “will send an end of file (terminate the input)”.By default
eof
is^D
(EOT), a control character, but it can be set to any character.For instance: run
stty eof x
and now, in that terminal, “x” (by itself, without the control key) will be the EOF character and will behave exactly as^D
did before. (The rest of this comment assumes you are still in a normal default terminal where you have not done that.)But “send an end of file” does not mean sending EOT or any other character to the reading process: as the blog post explains, it actually (counterintuitively) means flushing the buffer - meaning, causing the
read
syscall to return with whatever is in the buffer currently.It is confusing that this functionality is called
eof
, and thestty
man page description of it is even more so, given that it (really!) does actually flush the contents of the buffer toread
- even if the line buffer is not empty, in which case it is not actually indicating end-of-file!You can confirm this is happening by running
cat
and typing a few characters and then hitting^D
, and then typing more, and hitting^D
again. (Each time you flush the buffer,cat
will immediately echo the latest characters that had been buffered, even though you have not hit enter yet.)Or, you can pipe
cat
intopv
and see that^D
also causespv
to receive the buffer contents prior to hitting enter.I guess unix calls this
eof
because this function is most often used to flush an empty buffer, which is how you “send an end of file” to the reader.The empty-
read
-means-EOF semantics are documented, among other places, in the man page for theread()
syscall (man read
):RETURN VALUE On success, the number of bytes read is returned (zero indicates end of file), and the file position is advanced by this number.
If you want to send an actual
^D
(EOT) character through to the process reading standard input, you can escape it using the confusingly-namedlnext
function, which by default is bound to the^V
control character (aka SYN, “synchronous idle”, ASCII character 22):$ man stty|grep lnext -A1 * lnext CHAR CHAR will enter the next character quoted $ stty -a|grep lnext werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
Try it: you can type
echo "
and then ctrl-V and ctrl-D and then"|xxd
(and then enter) and you will see that this is sending ascii character 4.You can also send it with
echo -e '\x04'
. Note that the EOT character does not terminate bash:$ echo -e '\x04\necho see?'|xxd 00000000: 040a 6563 686f 2073 6565 3f0a ..echo see?. $ echo -e '\x04\necho see?'|bash bash: line 1: $'\004': command not found see?
As you can see, it instead interprets it as a command.
(Control characters are perfectly cromulent filenames btw...)
$ echo -e '#!/bin/bash\necho lmao' > ~/.local/bin/$(echo -en '\x04') $ chmod +x ~/.local/bin/$(echo -en '\x04') $ echo -e '\x04\necho see?'|bash lmao see?
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•root (or sudo) access delay instead of passwordEnglish251·4 months agosure. first, configure sudo to be passwordless, or perhaps just to stay unlocked for longer (it’s easy to find instructions for how to do that).
then, put this in your
~/.bashrc
:alias sudo='echo -n "are you sure? "; for i in $(seq 5); do echo -n "$((6 - $i)) "; sleep 1; done && echo && /usr/bin/sudo '
Now “sudo” will give you a 5 second countdown (during which you can hit ctrl-c if you change your mind) before running whatever command you ask it to.
Arthur Besse@lemmy.mlMto Linux@lemmy.ml•Mysterious installation of ClamAv on my popos systemEnglish4·4 months agoto answer this question: if you’re on a dpkg-based system, check
/var/log/dpkg.log
(or/var/log/dpkg.log.2.gz
to get logs from January, if your system rotates them once a month).
you can still use OpenRC instead if you want, and sxmo will continue to do so by default.
you can read here about why they added systemd.