314 Matching Annotations
  1. Last 7 days
    1. By default, fork(2) places a newly created child process in the same process group as its parent, so that e.g. a ^C from the keyboard will affect both parent and child.
    2. But the shell, as part of its session leader duties, creates a new process group every time it launches a pipeline.
    3. Job control is what happens when you press ^Z to suspend a program, or when you start a program in the background using &
    4. A job is the same as a process group.
    1. Windows Subsystem for Linux, also known as WSL, is a compatibility layer for running Linux binary executables natively on Windows 10 using a Linux image
    1. i found that for the osx host "gonzo" , the vanished files (not the warning message itself) appear in stdout - for linux hosts they _both_ appear in stderr , but nothing in stdout (rsync.err.#num is stderr, rsync.log is stdout)
  2. Mar 2021
    1. Proton is a new tool released by Valve Software that has been integrated with Steam Play to make playing Windows games on Linux as simple as hitting the Play button within Steam. Underneath the hood, Proton comprises other popular tools like Wine and DXVK among others that a gamer would otherwise have to install and maintain themselves. This greatly eases the burden for users to switch to Linux without having to learn the underlying systems or losing access to a large part of their library of games. Proton is still in its infancy so support is inconsistent, but regularly improving.
    1. I've been made aware of a "Compatibility tool to run DOS games on Steam through native Linux DOSBox" called "steam-dos". It can be found on https://www.github.com/dreamer/steam-dos . I pulled this tool from git and using it as the the steam play compatibility tool Megarace 2 runs without issue. Saving both settings and games works again! There is no keyboard support for controlling the vehicle in game but both mouse and joystick/gamepad work. To get around a missing launcher.exe error I copied "MegaRace 2.exe" to the same folder as the original and renamed the copy to "Launcher.exe". Linux users: in your MegaRace 2 folder (steamapps/common/MegaRace 2/) create a symbolic link to start.sh named Launcher.exe. This allows the game to launch through Steam. This also allows you to put time on the game through Steam, hitting that coveted 5 minute mark that makes creating a review possible. With that out of the way, the game itself is a nice touch of nostalgia but the port is absolutely terrible. I don't remember it being quite this difficult to install off the 2 CDs. The game won't launch at all without tweaking. Can't save the config settings. Can't save the game at all in fact. While I really like MegaRace 2, you unlock tracks by completing the previous ones. Since the game can't be saved, I end up running The Foundry track over and over until I'm sick of it.So I'm torn. I love the game but I hate the completely broken port. For $3 and a local install of DOSBOX it can be made to work so I will recommend it anyway.
    1. The reason we've avoided registering "Cinnamon" as a desktop name is that it opens up issues with many upstream apps that currently OnlyShowIn=Gnome or Gnome;Unity or just Unity. The relationship Mint has with Gnome and Ubuntu isn't genial enough that we could get them to add Cinnamon to their desktop files, so we would have to distribute and maintain separate duplicate .desktop files just for Cinnamon for these upstream packages.
    1. Also manually adding [Default Applications] x-scheme-handler/zoommtg=ZoomLauncher.desktop to either $HOME/.config/mimeapps.list or $HOME/.local/share/applications/mimeapps.list does not lead to xdg-open via exo-open recognizing the zoommtg protocol.
    1. xdg-email
    2. There's a command that knows about your default browser: xdg-open http://google.com This will also work for every other type of URI (Uniform Resource Identifier), like images - which will automatically open with eog, openoffice documents, and so on, and also on filesystem paths (xdg-open /tmp/foobar.png).
    1. SystemRescue (also known as SystemRescueCd) is a Linux system rescue toolkit available as a bootable medium for administrating or repairing your system and data after a crash.

  3. www.ventoy.net www.ventoy.net
    1. Ventoy is an open source tool to create bootable USB drive for ISO/WIM/IMG/VHD(x)/EFI files.

      With ventoy, you don't need to format the disk over and over, you just need to copy the ISO/WIM/IMG/VHD(x)/EFI files to the USB drive and boot them directly.

  4. Feb 2021
    1. For example, on the terminal I'm using, the right arrow outputs ^[[C. You can see what sequence your terminal outputs by pressing Ctrl-V Right Arrow. The same is true for other cursor-control keys such as Page Up and End.
    1. Typically, a process associated with a controlling terminal is foreground process and its process group is called foreground process group. When you start a process from the command line, it's a foreground process:
    2. Quit the program by sending a different signal to both processes, e.g. SIGQUIT with Ctrl + \.
    1. Why then sending the SIGINT manually to the shell doesn't kill the child, e.g. 'kill -2 <shell-pid>' doesn't do anything to a child process while Ctrl-C kills it?
    2. The shell process itself is in yet another process group all of its own and so doesn't receive the signal when one of those process groups is in the foreground. It's that simple.
    3. Switching "jobs" between foreground and background is (some details aside) a matter of the shell telling the terminal which process group is now the foreground one.
    4. I am trying to understand how CTRL+C terminates a child but not a parent process. I see this behavior in some script shells like bash where you can start some long-running process and then terminate it by entering CTRL-C and the control returns to the shell. Could you explain how does it work and in particular why isn't the parent (shell) process terminated? Does the shell have to do some special handling of CTRL+C event and if yes what exactly does it do?
    1. The CTRL-\ key sends a kill signal to the foreground job which, under normal circumstances, is guaranteed to terminate it. This signal cannot be captured by a process. However, this means the process cannot cleanup and is just summarily stopped. In some cases, a process can be stuck in a kernel wait state so this signal never reaches it. In that case, the process is unusable but cannot be killed.
    1. Also, this code will fail if $$ is not the process group leader, such as when the script is run under strace. Since a call to setsid(2) is probably tricky from a shell script, one approach might be to ps and obtain the process group ID from that.
    2. ps -o pid,pgid,stat,args
    3. When your script starts a process, that child becomes a member of a process group with PGID equal to the PID of the parent process which is $$ in the parent shell.
    4. To accomplish this, after starting the children (loop.sh) in the background, call wait, and upon receipt of the INT signal, kill the process group whose PGID equals your PID.
    5. You need a trap in loop.sh. Traps are cleared for every subshell started unless they are explicitly trap ''SIG ignored by the parent.
    1. ps --forest -o pid,tty,stat,time,cmd -g $(ps -o sid= -p 2795)
    2. To get all the processes spawned by a process the whole tree needs to be built. I used awk for that. At first it builds a hash array to contain all PID => ,child,child... . At the end it calls a recursive function to extract all the child processes of a given process. The result is passed to another ps to format the result.
    1. # Usage: run_with_timeout N cmd args... # or: run_with_timeout cmd args... # In the second case, cmd cannot be a number and the timeout will be 10 seconds. run_with_timeout () { local time=10 if [[ $1 =~ ^[0-9]+$ ]]; then time=$1; shift; fi # Run in a subshell to avoid job control messages ( "$@" & child=$! # Avoid default notification in non-interactive shell for SIGTERM trap -- "" SIGTERM ( sleep $time kill $child 2> /dev/null ) & wait $child ) }
    2. Personally, I prefer signalling an error for invalid values
    1. We can ask timeout to try to stop the program using SIGTERM, and to only send in SIGKILL if SIGTERM didn’t work. To do this, we use the -k (kill after) option. The -k option requires a time value as a parameter.
    1. timeout_child () { trap -- "" SIGTERM; child=$!; timeout=$1; ( sleep $timeout; kill $child; ) & wait $child; } And the usage: ( while true; do echo -n .; sleep 0.1; done) & timeout_child 2
    1. All platforms. Professional features. Beautiful UI. Totally free. FontBase is the font manager of the new generation, built by designers, for designers.

    1. Instead of modifying /usr/share/applications/google-chrome.desktop, the file can be copied into ~/.local/share/applications/google-chrome.desktop and modified without root access. This file will take precedence over the global desktop file.
    1. Systemd targets are reached once and do not fire again when the connection state changes. Depending how your network is managed there are a couple of options:

      Alternatives to react to network-changes in various linux setup: systemd, NetworkManager, netcl, wicd

    1. About network-activation targets & events, but does not detect e.g. "airplane-mode" :-( (referred by man-pages)

    1. I still cannot install it on SID (Winter 2021):

      $ sudo apt install wine32
      Reading package lists... Done
      Building dependency tree... Done
      Reading state information... Done
      Some packages could not be installed. This may mean that you have
      requested an impossible situation or if you are using the unstable
      distribution that some required packages have not yet been created
      or been moved out of Incoming.
      The following information may help to resolve the situation:
      The following packages have unmet dependencies:
       libcurl4:i386 : Depends: librtmp1:i386 (>= 2.4+20131018.git79459a2-3~) but it is not going to be installed
       libfaudio0:i386 : Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.10.0) but it is not going to be installed
       libwine:i386 : Depends: libgstreamer-plugins-base1.0-0:i386 (>= 1.0.0) but it is not going to be installed
                      Recommends: libodbc1:i386 (>= 2.3.1) but it is not going to be installed
                      Recommends: libsane1:i386 (>= 1.0.27) but it is not installable
                      Recommends: libasound2-plugins:i386 but it is not going to be installed
                      Recommends: gstreamer1.0-plugins-good:i386 but it is not going to be installed
      E: Unable to correct problems, you have held broken packages.
    1. please, for the love of god do NOT use Mint as a source of inspiration for a derivative distro. If you like Cinnamon or Mate, fine, but holy CHRIST do not let your infrastructure get as criminally sloppy as Mint's. No unholy mixing of Debian and Ubuntu debs into some kind of Frankenbuntu, no namespace collisions, no ... well, no being Mint in general, please!Ideally, I really, really hope you'll continue to support Ubuntu as a primary platform, regardless of what you do with Pop!_OS. But hooboy, do not turn into another Mint, please.
    2. If it was remotely possible to get Davinci Resolve running that would be incredible (and bring a lot of video people I think)
    3. the most productive environment possible for people that use their computer to create.What is a productive environment?How do you measure productivity in an operating system environment?How do you compare YOUR distribution to other distributions when it comes to productivity?Is the way in which 'people that use their computer to create' (creators) the same across all professions and activities?Does a photographer have the same requirements for a productive environment as a software engineer?Why do you think your distribution will be the best for delivering a productive environment than any other Linux distribution?
    1. And then think about if you want a rolling release, or a fixed release. Although all the distros you mentioned are on the fixed release side.
    2. Think about how much you want to customize the desktop environment(DE), and whether you know how to do so. Pick a distro that has the DE you like.
    3. There is no best distro. All of them are more or less the same.
    4. When people talk about "beginner distros" they mean distros that are no hassle to get started, it doesnt mean they are somewhat inferior or less capable.
    5. And honestly, most people prefer the no hassle, especially after wasting too much time dabbling with distros that are "for advanced users" troubleshooting all kinds of dumbass problems that just worked out of the box in many other distros.
    1. considering PopOS is trying to tackle Ubuntu they really need their dual-boot setup to be a lot less tedious
    2. The part where you want to add 2 EFI partitions is not advisable. It seems that Windows doesn't really like this, of you are dual booting multiple Linux installs it might work. But it is always recommended to use only 1 EFI partition per disk. Hope this helps. :)
    1. Make a 512MB fat32 partition during manual/custom PopOS install.Select its role as: "/boot/efi" in the PopOS installer.When the OS is installed, type sudo apt install refind and then it should automatically start the installer else type sudo refind-install. This will install rEFInd to your /boot/efi path.
    1. Windows and Linux store their time in the BIOS differently, this will cause your clock to be desynchronized when you switch from one OS to the other. The easiest solution for it is to fix it in Linux, forcing it to work the same way as Windows. You can do this through the terminal:
  5. Jan 2021
    1. We recommend the Alpine image as it is tightly controlled and small in size (currently under 5 MB), while still being a full Linux distribution. This is fine advice for Go, but bad advice for Python, leading to slower builds, larger images, and obscure bugs.

      Alipne Linux isn't the most convenient OS for Python, but fine for Go

    1. 1) QT Apps load very slow in startup (ex, qpdfview, Audacious), had to look at Ubuntu forums to find a solution installing kvantum and KvYAru theme, so this is solved at the moment; but the theme (SVG based, cannot modify it in a text file) have orange highlights, not consistent with Mint-Y theme, but it is the best option at the moment. This temporary solution I found was here: https://itectec.com/ubuntu/ubuntu-qt-apps-are-very-slow-to-load-in-xubuntu-20-04-when-export-qt_qpa_platformthemegtk2-is-enabled/
    2. We took a stance on an issue.
    1. Pango is one of the most common font rendering libraries on Linux. It's used by GTK/GNOME and a lot of standalone apps, like Rofi, Polybar, and a lot of terminals.
    2. cp src/glyphs/Symbols-2048-em\ Nerd\ Font\ Complete.ttf ~/.local/share/fonts fc-cache -fv pango-view -t "Playing some  for you right now"
    1. Besides running contrary to the principles that lead a lot of people to Linux systems (a closed store that you can't alter...automatic updates you have no control over....run by just the one company)
    2. Linux on the desktop won't take off until it is equally easy. Snap may be dumbed down, restricted and all the rest of it, but for ordinary users it's easier - and more secure - than the alternative.
    3. >We do want Linux to be mainstream, don't we? Not at any cost.
    1. Welcome to Ubuntu!. It is good to ditch the Windows rubbish and get into the real OS where one can change anything you want, yet have a global community who can support the OS.
    1. The best thing about an open source operating system, such as Linux, is that you can customize it as much as you want, ranging from default applications such as file managers, music players, web browsers, and text editors etc. to more vital system components such as the kernel, display managers, and terminal consoles. You can do this simply by downloading new application software and replacing the old ones with that, or editing system components by making changes in the source code of your operating system. The display manager is one such system component that you can replace simply by running a few commands mentioned in this article.
  6. Dec 2020
    1. BlackArch is a Linux distribution designed for penetration testing and security research. You can think of it like Kali Linux, with the exception of being based on Arch Linux. Its official repositories contain more than +2500 various penetration testing tools, and hence it can be considered a very good option for anyone wishing to explore this field and try to hack their own phones/routers/devices during the quarantine time.

      BlackArch <--- kind of Kali Linux based on Arch Linux

    2. Redstar OS is a Fedora-based Linux distribution that was developed to empower all computers running in North Korea. Researchers from various independent teams verified that the distribution contains huge spying mechanisms and logging capability, beside some modified kernel modules to record everything done on the OS.

      Redstar OS <--- Linux distribution for North Korea

  7. Nov 2020
    1. Normally Ubuntu swaps files to disk frequently. Since the disk is a microSD card that's a bit slow and has limited write cycles, it's best to reduce swapping to only when needed.
  8. Oct 2020
    1. I have downloaded this browser, to use with Office 365 (for my Uni stuff). I haven't really given it a full workout yet, mostly as I generally use Brave.

      I personally think we'll see more Microsoft apps coming to Linux with the big one being the ultimate... basing Windows on a Linux Kernel, rather than the NT Kernel, within the next 5 year or so!

    1. Future kernel updates would require the updated kernels to be signed again, so it makes sense to put the signing commands in a script that can be run at a later date as necessary. A sample script /root/module-signing/sign-vbox-modules is given below.
    1. Linux Memory Management at Scale

      "we had to build a complete and compliant operating system in order to perform resource control reliably"

      epic real-talk. the only people on the planet who seemed to have tamed linux for workloads. controlling memory. taming io. being on the bleeding edge, it turns out, is almost entirely about forward-progress. what can we reclaim?

      • oomd for memory protection
      • fbtax2
      • psi monitoring for io regulation
      • cgroups v2


  9. Sep 2020
  10. Aug 2020
  11. Jul 2020
    1. A shell script to automate the retrieval and installation of the Oracle (Sun) Java Runtime Environment
  12. Jun 2020
    1. To get a feel for how much pseudo-random data is available in your entropy pool, you can run this command:$ cat /proc/sys/kernel/random/entropy_avail 2684 The number shown appears to represent the number of bits of entropy that have been collected. Even 2,684 might not seem like much in a world in which we routinely speak in terms of terrabytes, but numbers above 100 are said to be a good sign. I
  13. May 2020
    1. I'd like to offer my thoughts on ctime verses mtime. Sorry, but this will be a little verbose. First, if you change the contents of a file you change the mtime of a file. Since this is a change to the inode, ctime is updated as well. The mtime is bit like the date on a letter and ctime is a bit like the postmark on the envelope. You can set mtime to anything you want via the utime() system call or the touch command. Doing so sets the ctime and you cannot reset ctime. If you restored last year's payroll records from tape, you might want to set the mtime back to the end of last year. But the ctime will reliably still indicate when the last change to the file occurred. This is how your backup program will know that it must back up the file. The ctime is really used by backup program. But an application program that prints out a payroll listing would use mtime.
    2. ctime indicates inode data change: ie. when you do chmod. chown on the file or when the file size changes. Not the contents of the file.

      ctime -inode -? ->file changes sizes

    1. ctime refers to changes made to the file's inode (such as changing permissions, etc). mtime refers to changes to the data within the file. So cnewer will use a reference files inode change time for the comparision, whereas newer will use a reference files data modification time.

      ctime - inode changes mtime - file changes atime - access time

    1. The main caveat to note is that it does use musl libc instead of glibc and friends, so certain software might run into issues depending on the depth of their libc requirements. However, most software doesn't have an issue with this, so this variant is usually a very safe choice.
    2. See this Hacker News comment thread for more discussion of the issues that might arise and some pro/con comparisons of using Alpine-based images.
    1. So be careful running editing a bash script that may be currently executing. It could execute an invalid command, or do something very surprising.

      Never modify a running bash command as it can execute something surprising

    1. That app you desperately need in order to function? We probably have it. The vast software libraries of Ubuntu and Flatpak combine to make all of your tools available in a single location, called the Pop!_Shop.
  14. Apr 2020
    1. I could probably bootstrap my way up from this with the C compiler to write a terrible editor, then write a terrible TCP client, find my way out to ftp.gnu.org, get wget, and keep going from there. Assume that documentation is plentiful. You want a copy of the Stevens book so you can figure out how to do a DNS query by banging UDP over the network? Done.

      What would the author do in a situation of being alone in a room with:

      HD #1 is blank. HD #2 has a few scraps of a (Linux) OS on it: bootloader, kernel, C library and compiler, that sort of thing. There's a network connection of some sort, and that's about it. There are no editors and nothing more advanced than 'cat' to read files. You don't have jed, joe, emacs, pico, vi, or ed (eat flaming death). Don't even think about X. telnet, nc, ftp, ncftp, lftp, wget, curl, lynx, links? Luxury! Gone. Perl, Python and Ruby? Nope.

  15. Feb 2020
    1. I use this to keep information about processes that were running at any time during last five days. These are 1-min snapshots so something might get lost but I think it is good enough for me. I want to have some data available when I discover there was a peak in resource usage (I use munin for that). I haven't found a better way to keep track of past processes (tried psacct).
  16. Jan 2020
  17. directory.fsf.org directory.fsf.org