Skip to content

u/beardedlinuxgeek

In this archive from Jan 2011 to Aug 2021

21
posts
121
comments
3
media
841
score

I use Arch full time for everything and I pretty much only play games which have native Linux support and there are a couple games I'll play on wine.

But now and then you'll want to play the latest killer AAA game like Fallout 4 which doesn't run on Linux and is too resource hungry for a VM. For those games, I have a separate 100GB SSD in my PC which has Windows on it. I don't dual boot, I don't have two OSs on the same drive, I don't have GRUB entries for Windows, nothing. As far as either OS is concerned, it's the only one. But a few times a year when I want to play the latest greatest game, I select the Windows drive from my BIOS boot menu and go to that.

I like it because you don't have to compromise anything or worry about Window influencing your drive. It's basically just like it's own system.

1 points

But that's just for 0.16.15, you need to bundle a PKGBUILD for every version that someone can download.

I just think you're missing the point and purpose of a PKGBUILD. There are like 5 different versions of Firefox in the AUR, should there be a package called firefox-dl that all the other packages require as a dependency?

What is really the argument for using this? Because I don't think the existing PKGBUILDs are too complicated. If we ignore PKGBUILD complexity argument, then what does this actually do? I mean, maybe I'm the one missing the point. But apart from "PKGBUILD complexity" and hardcoded auth details, I don't see the purpose of this. Is there something I'm missing? Because I think the current factorio PKGBUILD is very simple and straightforward, and I bet most Arch users would agree with me. So if you grant me the argument that the current PKGBUILD isn't too complex, then what?


And this is nitpicking, but you should use sha256 and not md5 (I know the experimental AUR package uses md5, but they should also change it)

1 points

I didn't say hardcoding was necessary, I said it was the only thing the script does differently.

could be portable to other distros

Not relevant to Arch or the AUR

used by all factorio* PKGBUILDs

The only relevant ones are factorio and factorio-experimental and those should be separate packages. The current PKGBUILDs work just fine.

I'd like to point you to the number one principal of Arch Linux:

https://wiki.archlinux.org/index.php/Arch_Linux

Simplicity

Arch Linux defines simplicity as without unnecessary additions or modifications.

Requiring the user to install a different package just to download the file doesn't make it simpler or easier for anyone.

lighter PKGBUILD

The current one is not bloated by any means

safety: one package for downloads

  1. That doesn't make it safer

  2. Your script doesn't check the hash of the downloads, so actually the current package is safer.

not a convoluted PKGBUILD that might change

  1. It's not convoluted

  2. That applies to literally all PKGBUILD files in the AUR

Sorry mate, I appreciate the enthusiasm, but there is no reason for factorio-dl to exist.

3 points

There isn't, but you could semi-easily write a bash script to do it.

pacman -Qe will show you all the packages that you explicitly installed and pacman -Ql <name> will show you all the files for that package. You could filter that output to get all the files in /usr/bin/.

Now we need to get the last time that executable was run. If you're running a persistent journal, then you could search journalctl for any log messages involving that executable. Or you can just get the access time from the filesystem (but this depends on if you have mounted the filesystem with atime, noatime, or relatime).

So, for example, I run pacman -Qle | grep "/usr/bin/." and I get the output:

...
virtualbox /usr/bin/virtualbox
vlc /usr/bin/cvlc
vlc /usr/bin/nvlc
vlc /usr/bin/qvlc
vlc /usr/bin/rvlc
vlc /usr/bin/svlc
vlc /usr/bin/vlc
vlc /usr/bin/vlc-wrapper
watchman /usr/bin/watchman
wget /usr/bin/wget
...

I want to know about vlc so I run:

stat /usr/bin/vlc

and I get the output:

  File: /usr/bin/vlc
  Size: 14120     	Blocks: 32         IO Block: 4096   regular file
Device: fe04h/65028d	Inode: 5537249     Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-01-15 16:58:09.000000000 +0100
Modify: 2018-01-12 14:07:51.725243731 +0100
Change: 2018-01-15 16:58:09.307707869 +0100
 Birth: -

Indicating that the last time I used VLC was on January 15th.

Using this information, you could generate a list of the last access times of all the executables that you explicitly installed. You could also run this script daily with cron and log the output. Then at the end of the month, if your logs have 5 different access times for that executable, then you know that you ran it on 5 different days that month.

I don't like atime because it means that every read includes a write. I prefer to use relatime which only updates the access time if the access time is lower than the modified time or if the access time is older than one day. That's a problem if you want to check how often a program is run on an hourly basis, but in the case I suggested whereby you only check on daily basis, then it's perfectly fine.

EDIT:

Just a quick example of how simply this could be done for a single app. You could set cron to run this once a day:

stat --printf 'atime: %x\n' /usr/bin/vlc >> vlclog.txt

Let's say at the end of the month the file vlclog.txt looks like this:

atime: 2018-01-15 16:58:09.000000000 +0100
atime: 2018-01-15 16:58:09.000000000 +0100
atime: 2018-01-17 16:58:09.000000000 +0100
atime: 2018-01-20 16:58:09.000000000 +0100
atime: 2018-01-20 16:58:09.000000000 +0100
atime: 2018-01-20 16:58:09.000000000 +0100
atime: 2018-01-23 16:58:09.000000000 +0100

Then all you have to do is run uniq -c vlclog.txt | wc -l and the output is 4.

Want to store 2 programs in the same log file? Then write a script that does:

stat --printf 'vlc: atime: %x\n' /usr/bin/vlc >> log.txt
stat --printf 'chromium: atime %x\n' /usr/bin/chromium >> log.txt

and at the end of the month run cat log.txt | grep chromium | uniq -c | wc -l.

You get the idea. Combine that with what I wrote at the top about getting all the explicitly installed packages and their files, and then just loop through all of them. This is just a very basic example, but you could make a decent tool using just this information.

1 points

What is wrong with the current package? It automatically downloads and installs the game.

https://aur.archlinux.org/packages/factorio/

It looks like the only thing that your package does differently is that your username and password is hardcoded in a conf file instead of you entering it during installation. If you really want to hardcode your username and password, then you can just edit the PKGBUILD and put it in there.

3 points

Yeah, I installed it on my desktop 10 years ago and it's still running strong. Going to reinstall when I build a new PC soon. But 10 years ago was before systemd, I'm still using compiz, there's a lot of old dead files I don't need anymore and I want full disk encryption.

It'll be nice to start fresh after so long. I got a new laptop a few months ago and put Arch on it, installing is such a breeze. But LVM on LUKS was a bit annoying because you can't do LUKS on LVM if the LVM is across multiple disks.

1 points

Could you post the output you get when you run those commands? It's hard to debug with nothing to go on.

You should be able to connect to the access point the same way you would connect to any unsecured access point. Having to accept the terms in order to access external networks should have nothing to do with you connecting to the AP.

In the meantime, here are some things to check out:

https://wiki.archlinux.org/index.php/Wireless_network_configuration#Failed_to_get_IP_address

https://wiki.archlinux.org/index.php/Wireless_network_configuration#Valid_IP_address_but_cannot_resolve_host

3 points

I have to disagree. I'm also a 5+ year Arch user, and I first thought systemd was unnecessary complexity (and when they introduced package signing with pacman keyring, that was annoying and buggy), but now that I understand systemd, I see how good it actually is.

The whole point of Arch is that everything is simple to understand. Systemd is how things work now, and someday Wayland will become the new default and I'll have to throw away my 15+ years of X11 knowledge. But these kinds of massive changes only happen once a decade.

What sort of tweaking are you doing that annoys you? I talk to OS X users, and the response I get is that A, B, C work perfectly without any interference, but X, Y, Z don't work at all and they've just found a way to work around it. Everything has bugs, and with Arch it's easy to find a clean solution around it. With other OSs, they may be easy at the start, but as soon as you do anything out of the ordinary they fall apart.

I would be very interested in the "tweaks" you have to do that annoy you, because I can't think of any.

1 points

The reason I use Arch is because I don't want to tweak everything. When you install a package, Arch hasn't set all kinds of strange defaults you weren't expecting or starts running magic scripts in the background that you don't know about. The number one principle behind Arch is simplicity. I use Arch because it's the easiest and least stressful distro out there. And the docs are so so good.

1 points

Do you have a hybrid graphics laptop? Apparently the issue is about how Windows and Linux handle booting on discrete vs. integrated graphics. I've had the same error messages for awhile now.

Here is the kernel bug: https://bugzilla.kernel.org/show_bug.cgi?id=193531

They reported it resolved/moved and now it is being handled by acpica here: https://github.com/acpica/acpica/pull/189/

Basically, this is a known bug, it's been around for a few months but they're working on it. Nothing to worry about, just ignore those messages.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.