No, do not do that. This gives access to the display to anyone who can connect to it. The proper way is to give the user access to file whose path is in $XAUTHORITY.
- 1 Post
- 105 Comments
Capital letters in user names. 🤮
Debian has torbrowser-launcher you might wanna take a look at that.
As for the issue, this could be because the user lacks credentials to connect to the display.
Firstly, and most importantly, executing
grub-installrequires super-user privileges. Rather than adding it toPATHyou should instead run the command throughsudo. A regular user typically does not need any ofsbindirectories in theirPATH.As for the command itself, there are three things wrong with it:
PATHshould only include directories whereas you tried to add to it a path to an executable. So rather than/usr/sbin/grub-install/grub-installyou should just add/usr/sbin.- White space is significant, so the space before colon would make your command not work anyway.
- Rather than appending to
PATHyou’ve overwritten the variable. Instead you needPATH="$PATH:/usr/sbin/:/usr/local/sbin"(notice$PATH:at the beginning of the assignment).
Also,
exportis unnecessary sincePATHis already an environment variable. (That’s also bashism but that’s likely an irrelevant issue).
What gave you that idea? Besides, even without understanding what the code does exactly, I can tell that the
get_screen_timefunction has no adversarial effects.
Honestly I don’t understand what this is showing. I guess it’s how long the lid was open?
Speaking of bash prompt: https://mina86.com/2015/bash-right-prompt/
What’s the point of linking LWN article rather than directly the official announcement?
mina86to
Emacs@lemmy.ml•What's the difference between Emacs's native package distribution method and a cockney guy describing his participation in a torture fetish with his female colleage?English
5·1 month agoIt’s been years since editors started getting their packages. I would guess Emacs was late to the game actually. If you’re only ever used notepad, the manager is there to install additional features such as syntax support for new languages, refactoring tools, navigation commands and more.
mina86to
Linux@lemmy.ml•Email client that imports labels as tags instead of folders on Linux (and Android)English
5·1 month agoMaybe those would help (although using those would require changing how you do emails and it’s not a solution for Android):
- offlineimap in case you need something to fetch your IMAP emails.
- gmailieer is a tool which uses Gmail API to fetch emails.
- notmuch is a tool which indexes your email. You can assign whatever labels you want and rather than folders it uses tags.
- For notmuch you then need a front-end which can display the emails. I use Emacs for that. And since notmuch uses tags, you can then create whatever ‘folders’ by making saved searches.
mina86to
Technology@lemmy.ml•Cutting-edge research shows language is not the same as intelligence. The entire AI bubble is built on ignoring it.English
21·2 months agoMaybe. Or maybe you lack basic critical thinking to be able to put the article in context. But since you’ve initiated the ad hominem part of the discussion, I don’t think there’s any point continuing this discussion, so we’ll never know.
mina86to
Technology@lemmy.ml•Cutting-edge research shows language is not the same as intelligence. The entire AI bubble is built on ignoring it.English
11·2 months agoEven the article admits that AI researchers are aware that LLMs are not sufficient. So the title is absolutely false. The article uses research which has very little to do with the subject to springboard into an opinion piece which itself observes that actually the premiss of the opinion is incorrect.
mina86to
Technology@lemmy.ml•Cutting-edge research shows language is not the same as intelligence. The entire AI bubble is built on ignoring it.English
31·2 months agoThe title is false. The cited paper deals with connection between language and intelligence however a) it does not comment on current AI bubble and b) current AI research does not assume language is the same as intelligence. It’s an example of scientists saying something and journalists extrapolating from that to get a story out of it. Reminds me of On Human (and) Nature.
mina86to
Linux@lemmy.ml•Is the FOSS world in danger of a corporate takeover, thanks to pushover licenses?English
181·2 months agouutils developers aren’t earning any more than coreutils developers. This is an orthogonal discussion.
mina86to
Rust@programming.dev•Is it possible to cause undefined behaviour with static mut inside a function?English
12·2 months agoI’m essentially trying to find the most performant way to get a simple read/write buffer.
Stack is hot so it’s probably better to put things there than to have static array which is out of memory cache and whose address is out of TLB.
To answer your question, yes, this is undefined behaviour if the function is called from multiple threads. It’s also undefined behaviour if, by accident, you take second reference to the array.
It’s unlikely that you really need to do anything fancy. I/O is usually orders of magnitude slower than dealing with memory buffers. Unless you profile your code and find the bottleneck, I’d advice against static mutable buffer.
PS. On related note, a shameless plug: Rust’s worst feature.
mina86to
Linux@lemmy.ml•The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C ExtensionsEnglish
1·2 months agoYes, but I was talking about field name, not struct tag. And up to C99 my comment was correct.
mina86to
Linux@lemmy.ml•The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C Extensions
1·2 months agoYou appear to be correct.
mina86to
Linux@lemmy.ml•The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C ExtensionsEnglish
13·2 months agoTag is what goes after the
structkeyword to allow referring to the struct type. Structs don’t have to have a tag. Name is what field are called. Adapting Obin’s example:struct foo { int baz; }; struct bar { struct foo qux; }; struct bar data; data.qux.baz = 0;fooandbarare tags forstruct fooandstruct bartypes respectively;bazandquxare field names; anddatais a variable name.
mina86to
Linux@lemmy.ml•The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C ExtensionsEnglish
8·2 months agoMinor correction: Unnamed structs and unions (so your second example) are not part of C. They are GNU extensions.
mina86to
Linux@lemmy.ml•The Linux Kernel Looks To "Bite The Bullet" In Enabling Microsoft C ExtensionsEnglish
47·2 months agoThis is hardly newsworthy. If the extensions were called ‘Jabberwocky C Extennsions’ no one would have cared. The extension allows for tagged unnamed structs inside of a struct, e.g.:
struct inner { /* ... */ }; struct outer { int value; struct inner; };
mina86to
Technology@lemmy.ml•Apple calls for changes to anti-monopoly laws and says it may stop shipping to the EUEnglish
141·4 months agoThis is actually a privacy problem.
Only so far as using any kind of product you haven’t built yourself from scratch is a privacy problem. I.e. it’s Apple imposing vendor lock-in.
This has more to do with content moderation than prudishness.
You’ve defeated this yourself pointing that no one goes after Dell. Again, this has to do with Apple imposing vendor lock-in.
You can just copy the file and set
XAUTHORITYas necessary. Just make sure only the desired user can read it.