The small linux problem thread

I like to use du | sort -n. That runs du without pretty size values but being straight numbers allows sort -n (sort by number, not text) to put the largest directories at the bottom.

For example, a few lines from my Linux Steam directory:

72028828	./Steam/steam/steamapps/common/DOOM
82181896	./Steam/steam/steamapps/common/ARK/ShooterGame/Content
82323044	./Steam/steam/steamapps/common/ARK/ShooterGame
82406160	./Steam/steam/steamapps/common/ARK
642398876	./Steam/steam/steamapps/common
660838972	./Steam/steam/steamapps
661878120	./Steam/steam
663455048	./Steam
2 Likes

In my experience this works most of the time. I’ve run a lot of Java apps on the newest JRE that claim to require 1.8 or 1.6 or even 1.4.

The apps that don’t are doing crazy things with reflection or JNI. I’ve also run into a few old Java tools that have threading bugs which become obnoxiously obvious on 12 core CPUs. Those you have to wrap in a Linux taskset command to restrict to a single CPU, or run them inside a single core VM. They’re still buggy then, but hardly ever fail.

2 Likes

There were some drawing API changes post 1.2 that broke stuff iirc (got some ancient book examples that don’t compile any more, and probably won’t run either as they rely on stuff that appears to have disappeared from the standard library)

Trying to use ancient APIs in new environments, like running very old J2EE code on a new application server, with a new JDK has lead to some pain as well. Issues were caused by app server not properly supporting the (ancient) spec, but well, it broke our stuff all the same until it got patched (on their end, of course)…

Combined with what you brought up that’s about it, I think. Even old pre-enum (1.5) code runs just fine on modern JDKs. Compiling it, well, that’s another story :wink:

tl;dr stuff’s more likely to “just work”, than not work :slight_smile:

Can’t get any smaller than this.

How do you config the default video player on ubuntu to have subtitles set to off?

Turns on every time, so annoying. yes VLC but the skin is butt.

not vlc ubuntu’s video player “video”

Might want to have a play with this…

Or hold tight for the joys of the 5.10-5.11 vanilla kernels…

Little issue I can’t figure out…
I wrote myself 2 helperscripts to update and start RPCS3 because they are rolling release and I wanna stay up to date:

#!/bin/bash
curl -JLO https://rpcs3.net/latest-appimage
ln -fs $( ls -t | grep AppImage | head -n 1 ) rpcs3_binary
chmod +x rpcs3_binary
ls -l | grep "rpcs3_binary"
#!/bin/bash
./update_rpcs3.sh && ./rpcs3_binary "$@"

Basically it downloads the latest version, links it to a symlink and makes it executable.

So far so good, both work as intended via the Terminal. But it won’t work when starting from a .desktop-file via the application launcher. Using a symlink in the desktop file as the executable definitely works, so the issue must be in the script it’s starting instead… any ideas?

Selinux or app armor maybe preventing it? Have you looked at the stderr?

If it was SELinux or AppArmor is also shouldn’t start from Terminal though, right?

Where would I find the stderr when starting from the application launcher? I don’t know where the output goes for those :confused:

I believe they can discriminate between you running commands in your shell vs run from a .desktop file.

Oh I have no idea. Either redirect it manually to dump to a file or use logger.

1 Like

I have a real smooth brain question. I am not a linux expert so be gentle. I ctl+c out of htop and this [1] appeared at the end of the prompt. What does it mean?

image

That is probably an error code. Many programs return 1 for an abnormal exit and return 0 for a normal exit.

3 Likes

Yep. Your prompt is configured to show a non-zero exit code of the previous command. You can test with the command return 99 and it should say [99].

2 Likes

Thanks.

Hm but running the appimage from the desktop file worked fine (I had it linked to a symlink directly previously, without using the shell-script).

I’ll have to look into logger since last time I was trying to redirect output in a desktop file that didn’t work.

1 Like

Yeah it was just a guess so maybe not.

Strange that wouldn’t work. Maybe try sending it to a file in /tmp instead.

1 Like

Figured it out, and turns out it wasn’t even related to my script (well sort of).

So I did a test with logger in the Terminal and that showed up in journalctl (using -b 0 -r). Then tried adding some logger lines to the updater script, but that didn’t show up so I was a bit confused until I saw this:

Feb 22 00:21:18 localhost.localdomain krunner[722035]: gamemodeauto:
Feb 22 00:21:18 localhost.localdomain krunner[722035]: /home/tarulia/programs/RPCS3/rpcs3: line 2: ./update_rpcs3.sh: No such file or directory

Which reminded me that at some point I changed my shortcuts to run RPCS3 using gamemoderun. So I reverted that and then it started. Added gamemoderun to the launcher-helper script and that works fine.

So yeah, errors in desktop files show up in journalctl and are logged by krunner :slight_smile:

1 Like

I’m pretty sure the default video player in ubuntu is “Totem” though it doesn’t call itself that on its GUI.

Searching with Totem instead of videos should give you more information. Seems like its been a problem for quite some time and the work arounds are pretty cheesy if you sometimes want subtitles & sometimes don’t.

https://itectec.com/ubuntu/ubuntu-how-to-turn-off-subtitles-in-totem/

I have a small shell scripting problem. Can anyone help… whos a linux scripting guru around here: Need help with a FLAC sort script

I have a small problem with Fedora 33 Cinnamon spin on a laptop with a 1366x768 display.

dnfdragora - the graphical package manager, overruns the screen vertically, so that the Apply button is hidden somewhere south of the display (hiding task bar doesn’t reveal it either). This window, for whatever reason, cannot be resized any smaller in the vertical.

Yes I can use dnf from the terminal, but the graphical app makes it easier to find things or just browse.

I’ve not run into any other program, system applet, etc that exhibits this same behaviour.

The display will not run higher than 1366x768 either - it’s a 4 year old cheap consumer grade Acer with AMD A9 graphics