ebook img

Linux Magazine Special Editions - 17 June 2022 PDF

102 Pages·2022·76.6 MB·English
by  
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Linux Magazine Special Editions - 17 June 2022

TUNE YOUR LINUX SYSTEM 2022 EDITION — UL) | BT pw JKR IricKS and shortc for LINUX geeKS ° speed up downloads with Atreme Download Vianager ° searcn text, PDF, and UTrice tiles with one tool ° hun VMs on a Froxmox server without installing client software Discover the secrets of the experts RETRO FUN: Play DOS Games with DOSBox AUDIO EXPERTS: Tools for DJs, Musicians, Composers Source The Pulse of Open LINUX NEW MEDIA ? WWW.LINUX-MAGAZINE.COM Get started with VW Opensource JOB HUB Find your place in the open source ecosystem OpenSourceJobHub.com COOL LINUX HACKS -— 2022 EDITION WELCOME ~~ | JU IDC MS This Linux Magazine special edition promises you “Cool Linux Hacks,” and we'll certainly deliver — check the table of contents on the following page for a list of all the gems we present inside. But what exactly is a “hack”? In today’s world where Windows is the dominant desktop operating system, the decision to use Linux is the first and most important hack. In addition to that: e If|l can use it to solve a problem or get some work done faster than before, then it’s a hack. e If the way it works is unexpected, it’s very certainly a hack. e If it teaches me a new and interesting way to use my Linux machine, it’s a hack. e@ When it makes me grin, because it’s so obvious that only a geeky » Unix person would ever think of doing things this way, | add it to ‘ my list of anecdotes (and yes, it’s a hack). The definition of a hack is a matter of taste and so is our choice of hacks for this collection: Many authors have contributed, and together we have assembled a mix of new tools, useful add-ons for classic tools, and interesting use cases for software that you've used differently before. We've organized our hacks into nine categories so that you'll find them quickly when you go back to search for them. The last category is “Gaming,” because Linux is not exclusively about work; there are many ways in which you can have fun with your Linux machine. Playing games is one of them. We do, of course, hope that you will enjoy reading this issue. Hans-Georg Efger Editor-in-Chief 2022 Edition All hacks tested on Ubuntu 22.04! DU TAYE “Ss Networkine HACK 8 Advanced Tracing with traceroute and LFT HACK9 = Sync with the Maestral Dropbox Client 18 HACK 10 LANDrop Ad Hoc File Sharing 18 HACK11 Xtreme Download Manager 19 Obsidian: Note Taking App 7 HACK 12 EasyNAS Is a NAS for the Masses 20 HACK2 _ Sioyek: PDF Viewer with vi-like Shortcuts 8 HACK 13 DIY Network Configuration 23 HACK3 —KeenWrite Technical Text Editor 8 HACK 14 Use Network Manager's CLI 23 HACK4 = AltSearch Extension: Replace the Internal 9 HACK 15 Runa Simple HTTP Server: weborf 24 Search Tool in LibreOffice Writer HACK 16 Use screen in SSH Sessions 24 Install the draw.io Diagram Editor Locally 12 HACK 17 Dig a Tunnel with sshuttle 25 HACK6 = Creating Long Documents with Styles 13 Search Office Files with uvgrep Keep It Runnine HACK 25 Plasma System Monitor HACK 26 Guider Profiler and Monitor 38 ALU AES Og Tae SERGE al HACK 27 Visualize ddrescue’s Progress 38 HACK 19 Use Docker Tools as Filters 28 HACK 28 Run dmesg with the Right Options 39 HACK 20 Kaboxer Auto-Loads Docker Images = HACK 29 Get a Quick Machine Configuration 40 HACK 21 Launch Programs Inside a VirtualBox VM 32 Overview with inxi HACK 22 The Good Old Days: Linux from the 1990s 32 HACK30 Where Did You Mount That Disk? HACK 23 HACK 24 Test Alternative CMSs with Docker 34 35 HACK 31 System Monitoring with watch and fswatch 42 HACK 32 Parse the systemd journal with QJournalctl 44 Run Binaries from a Different Linux Installation 4 COOL LINUX HACKS - 2022 EDITION ye COOL LINUX HACK LW Security & Privacy 5G HACK 40 Age: Master of the Keys HACK 41 Securely Split Your Files with horcrux 58 HACK 33 project Audio Visualizer 49 HACK 42 OpenSnitch Application Firewall 58 HACK 34 AutoEQ Headphone Improver 49 HACK 43 Parrot OS Desktop Security 62 HACK 35 HACK 36 KnobKraft Orm MIDI Librarian Mixxx DJ Software HACK 44 HACK 45 Install and Run Tor Browser Permanently Wipe Files from Your Hard Disk HACK 37 ChowTapeModel Tape Emulation 52 HACK 46 Disable Webcam and Microphone 65 HACK 38 Surge XT Software Synthesizer 53 HACK 47 Lock Your Screen, Always 66 HACK 39 VCV Rack 2 Modular Synthesizer 54 HACK 48 Use ccrypt for Quick Encryption 66 HACK 49 Tabby Terminal Emulator HACK 58 = Highlighting Instead of Grepping HACK50 getnews.tech News Ticker 70 HACK 59 Cool Retro Term Brings Back the 80s 78 y HACK 51 Google on the Command Line vA HACK 60 = The fish Shell 78 HACK 52 xplr Terminal File Explorer 72 HACK 61 Universal Unpacker 719 HACK 53 Use bat, Not cat 72 HACK 62 Start the Right App 79 HACK 54 plocate Modern Search Tool 73 HACK55 Configure Your Shell History 75 HACK56 Progress Bars for Standard Tools 716 HACK 57 Replace top with htop 76 HACK 75 Runthe Gamebuntu Setup Script 89 HACK 76 SDLPoP: Prince of Persia Clone 89 HACK 77 Sonic Robo Blast 2 90 Workine with Code 30 HACK 78 Teeworlds Multiplayer Shooting Platformer 90 HACK 63 Control Git with the lazygit Client 81 HACK 79 Run Old DOS Games with DOSBox 91 HACK 64 Try the New Lapce Code Editor 81 HACK 80 Crispy Doom Clone os HACK65 CudaText Text Editor 82 HACK 81 UnCiv Strategy Game 93 HACK 66 Mix Python and Shell Commands 82 HACK 82 Space Station 14 94 HACK67 Textadept Works in Graphics and Text Mode 83 HACK 83 Explore, Expand, Exterminate: Play Star Ruler2 94 HACK68 Perform Dynamic Code Analysis with 83 HACK 84 __Lutris Gaming Platform 95 SystemTap HACK69 Replace hexdump with a Colorful Tool 84 HACK70 Manage Your git Repository with GRV 84 Welcome HACK71 RunC Code from the Command Line 85 HACK72 Making git Interactive 85 HACK 73 Count Lines of Code in Your Project 86 HACK 74 Fix Disturbing Indentation and More 86 COOL LINUX HACKS -— 2022 EDITION 5 For many of us, using the computer often means working with office applications, even when we’re Linux geeks. Why not use our tech skills to make the office chores easier? HACK 1 Obsidian: Note Taking App HACK 2 Sioyek: PDF Viewer with vi-like Shortcuts HACK 3 KeenWrite Technical Text Editor HACK 4 AltSearch Extension: Replace the Internal Search Tool in LibreOffice Writer HACK 5 Install the draw.io Diagram Editor Locally HACK 6 Creating Long Documents with Styles HACK 7 Search Office Files with uvgrep Obsidian: Note Taking App Linux is the worst choice of operating system for peo- ple who like to procrastinate because there’s simply too much choice. There’s also so much to learn when you do make a choice that it makes decisions even easier to postpone while you research another option. This is particularly true when it comes to note-writing applica- tions because procrastinators are also often prolific note takers. There are so many ways to make your own notes that it’s easier to spend time researching them than it is to make a decision and start using one. There are command-line tools, Markdown editors, editor add- ons such as Vimwiki and Emacs Org mode, and echo on the command line to a simple file. These all have their advantages, but none of them can easily link between notes and their wider context as you add links, make notes, and create different categories. This is a problem that Obsidian has been developed to solve, and it’s al- ready become hugely popular in the world of produc- tivity hacking, thanks to it both supplanting other pro- prietary applications and being particularly good. Obsidian is a desktop-bound note-taking application built on Electron. It takes more system resources than nano, but you do get beautiful font rendering, spell checking, syntax highlighting, and excellent cross-plat- form compatibility, with Applmages for both ARM64 and x86, as well as a multi- tude of other install options. To start tak- ing notes you first need to create a vault. A vault is like a folder or directory, and Obsidian includes a brilliant example Help vault containing its own documentation. With a vault started or loaded, Ctrl+N will create a new note and you can start typing. The notes themselves are written in simple Markdown so they can be read as raw text without difficulty, and they remain easily accessible from whichever editor you might want to use. The editing view can be split to show more than one note at a time, and a preview button lets you quickly see how they look rendered outside of the Markdown syntax. This can all be a little confusing in the beginning, but along with the excellent help documentation there’s also a great hint system that will pop up to show you options when you start using commands and linking things. Acommand palette can also be opened to show all the shortcuts, and there’s a Markdown bulk-importer that will con- vert some of the special formatting from rival applications. Markdown also means iy a 6 there’s very little to learn about the syntax, except in the way Obsidian uses links. The real genius of Obsidian is the way it’s built around links, or connections. These are created by add- ing double square brackets to standard Markdown link syntax, creating back-links to pages within the vault. If a page doesn’t exist, it can be created at the same time with a simple click. In this way you can quickly write not just your notes but also build a complex model of the relationships between one note and another without any further effort. Obsidian’s best use of this feature is in the Graph view. This is a way to visualize your links, showing a node for each document and lines between nodes to illustrate the links. Mouse over a single note to highlight its connections and explore more relation- ships by filtering the nodes or animating their creation over time. It’s a brilliant way of seeing which notes are interrelated and how they’re organized, and it’s a genu- ine reason to use Obsidian over any other note-taking tool you might otherwise be tempted by. By Graham Morrison https://obsidian.md/ 1. Markdown files: Your notes are saved as Markdown and the background intelligence comes from using an SQLite database. 2. Vaults: Sets of notes are arranged in vaults, which are analogous to filesystem directories. You can also add plugins. 3. Graph view: Maps each link from every note to the note they target, making it easy to see the relationship between your notes. 4. Node highlight: Hover over a note node to see which notes it references and vice versa. 5. Editor: The Markdown editor is simple, clean, and effec- tive with an optional output preview. 6. Export: Notes can be published directly or compiled into a PDF. 7. Help: The help documentation has its own vault and is both substantial and well written. Start here COOL LINUX HACKS — 2022 EDITION HACK Sioyek: PDF Viewer with vi-like Shortcuts There are many PDF viewers for Linux and several of them are good if not exceptional. Okular, in particular, is one of the best we've used, because it’s one of the few that will open most PDFs, offers sensible scaling, multiple page views, and the ability to annotate PDFs in a way that can be shared with other people. If you need to manage a library of PDFs, then the ebook editor and manager, Cali- bre, is another excellent and more ambitious choice. It’s particularly good when you're researching a subject and need to search across several publications, although Cali- bre’s PDF-viewing capabilities are little more than perfunc- tory —- which is where Sioyek can help. Sioyek is anew PDF reader developed specifically to help better manage and access academic papers, but it’s equally adept at beautifully rendering PDF content, especially if the files contain formulas, and for searching across a collection. Almost like a Vim PDF viewer, Sioyek is controlled en- tirely from the keyboard with a small command console that appears when you type something. You can quickly search across any file you've previously opened, as well as across the table of contents and even referenced fig- ures and bibliography entries when they’re not in the table of contents. There are commands for inserting a bookmark, so you can quickly get back to the same sec- tion after chasing another reference, and a more formal bookmark manager which can be used globally to KeenWrite Technical Text Editor There are now (probably) more people writing words than ever before. Whether it’s an email, feature specifi- cation, social media post, blog post, article, tutorial, or even a book, technology has liberated us. Any old text editor can be used for small documents, but as soon as you need to organize your writing, edit, reference your research, or single source a part for reuse, you typically need to find a more ambitious option. KeenWrite is a writer's IDE with a unique proposition. It offers a writing environment with a great emphasis on the “devel- opment” in the IDE part. What KeenWrite can substitute strings for their values within a body of text to help keep edits and mistakes to a minimum. Sioyek is a PDF reader designed primarily for accessing a library of academic papers, but it’s also excellent as a general reader. 3 Marks reference sections in any document. You can highlight a section of text, which is then separately searchable, and even open another reference while the original doc- ument is still open. It’s an excellent application, with both light and dark modes. While it’s ideal for academic searches, it’s also perfect as your default PDF reader. By Graham Morrison https://github.com/ahrm/sioyek content you write from the presenta- tion and layout. The main view is split into three panes, with the middle pane being the traditional editor, the right pane holding a real-time preview of the output, and the left pane holding vari- ables. These variables are literally the key to string in- terpolation because they allow you to assign key and value pairs within a YAML-formatted document that can then be referenced and interpolated in the main Markdown document. A simple example would set a book’s title as a string, with the string then used in the Markdown rather than the name itself. The book’s title can then be easily changed as quickly as it takes to change the string name, which is always reflected in the real- makes it time preview. The editor helps with all unique, and Don 2 DcCRSO Bi vnuoa Von OD of this by offering autocomplete for more hse pro- TE EY Rp emerge KeenWrrite the ey ane valle pairs you define. grammer’s de- . The editor also integrates R syntax, velopment en- sg Real-time equation rendering SVG support, Mermaid, Graphviz, vironment, is 4 UML elements, Pandoc-like HTML div that it’s a Mark- elements, and PDF output. down editor Maarelisecastiony For a test, download the keenwrite. that uses string interpolation to separate and modularize the Pets.t z Ulzelr KUM paedal x°2 HE = UOKpR Oud © ANbaF 2m Or Time-dependent Schrodinger equation Discrete-time Fourier transforms bin file, make it executable and run it. By Graham Morrison https://github.com/DaveJarvis/keenwrite oe COOL LINUX HACKS -— 2022 EDITION AltSearch Extension: Replace the Internal Search Tool in LibreOffice Writer Few features in a word processor are less glamorous than a search tool. That is, until you do some intensive editing, especially if your revisions include reformat- ting. Then you will be thankful for a full-featured tool. In the case of LibreOffice Writer, the available tools are barely adequate, which is why I recommend the Alter- native Find & Replace for Writer extension, also known as AltSearch [1]. Like all LibreOffice extensions, AltSearch is easily in- stalled. Just download it from the LibreOffice extension site, and open Tools | Extension Manager. The next time you start Writer, AltSearch appears as a menu item, as well as an icon with green binoculars in the upper left corner of the toolbar. You can understand the need for AltSearch by ex- amining the default search tools in Writer. Edit | Find is a simple field similar to the ones found in many web browsers. It is suitable for finding words and phrases, but its options are strictly limited. You can search backward or forward from your present loca- tion in a document, find all, or match case - and that’s all (Figure 1). Edit | Find & Replace is more versatile, but it, too, is relatively limited. It can match case or search for whole Figure 1: Find is Writer's basic search tool. For many purposes, it is too simple. many| Find Au. © Match Case Figure 2: Find & Replace is an improvement over Find but is still fairly basic. | ed Find & Replace Find: Match case © Whole words only Replace: Other options Replace backwards Regular expressions Paragraph Styles Similarity search Comments Diacritic-sensitive Attributes... Help COOL LINUX HACKS — 2022 EDITION words only. It has several addi- tional features, such as support for regular expressions, similarity, and searches on a half-dozen para- graph styles, which make it more use- ful than Find — although you must be careful not to re- place the Find field’s contents with nothing if you use the tool just to search (Figure 2). Another default tool, Navigator, which you open from the sidebar, allows searching by any object in the docu- ment, most usefully by six paragraph style headings, and even lets you reposition text below the headings without cutting and pasting (Figure 3) — but that is all. All three default tools are focused on finding and have lim- ited power to edit. By contrast, AltSearch offers more options (Figure 4). Admittedly, it suffers from some misspellings in the menus and is awkward to use. In particular, the menus are so long that it is best to position the window as close to the upper left corner of the screen as possible. How- ever, most of the menu items include online help, and AltSearch’s capabilities make the inconvenience worth enduring. To start with, AltSearch’s main window is better orga- nized than Writer’s default tools, with much of the com- plexity hidden. You can easily replace the default tools with AltSearch without delving into its complexities. But if you do take a closer look at AltSearch, you will find several important improvements. Figure 3: Navigator is useful for finding objects in a document but is separate ?7v@ += Headings Fonts, color, and the magic number Finding fonts to use Installing fonts for LibreOffice Choosing fonts in LibreOffice Font families Font styles Font sizes Font effects Choosing basic fonts Other considerations for fonts Matching fonts Adjusting the page color An tineynected inurneyv chapter4 -fonts-color-and-the-magic number ( Close OFFICE Figure 4: AltSearch is as much an editing tool as another search tool. | eg Alternative Find & Replace for Writer v1.4.2 3/2017 Search for: Regular . Extended » Properties Eg Count Replace: ~ Pick properties ’ Options: Searching range and direction: ~ Match case 4 Current selection only © Preserve capitalization ) Backwards Whole words only © Paragraph styles Regular expressions Save batch For example, although Find supports standard regu- lar expressions, it leaves the user to decide which ones to use. In comparison, AltSearch offers a selec- tion window that includes custom expressions for for- matting, such as custom hyphens and non-breaking dashes (Figure 5). In addition, AltSearch offers a list of extended regular expressions (Figure 6) that, among other things, allows searches for most of the objects displayed in Navigator, including images, tables, frames, and cross references — a combination of features so basic I’m surprised that Writer did not do the same years ago. Other extended regular expressions include hyperlinks, text inside pa- rentheses, and HTML tags. Similarly, while the default Figure 5: AltSearch’s list of useful reg- ular expressions. of la € First char of a paragraph A, End of a paragraph $ Empty paragraph AS Any text in one paragraph a* Find Any letter [:alpha:]{1,1} \1l ~ Any decimal digit [0-9] \d ; Beginning of a word \< Find Alt End of a word \> Paragraph (ending mark) \p Series of empty paragraphs A$\p* Replace Tabulator \t Manual Line break \n Manual column break \c Replace all Manual page break \m Any space [ \xAQ\x9\xA]__\s Non-breaking space (\xA0) XS ? Custom hyphens \xOOAL Non-breaking dash \x201 Batch >> A inserted by decimal code \#65 Dot \. Parentheses () \(\) Close Square brackets [] \E\] These options are not just useful in searches. They can also be useful in turning AltSearch into the desktop equivalent of the sed command. For example, if you save a Writer document that uses styles into text for- mat, the conversion eliminates the indentation of a new paragraph, as well as any space between paragraphs. Adding spaces between paragraphs manually is te- dious, but with AltSearch you can search for paragraph breaks with /p and replace them with a paragraph break and an empty new line (/p/n), preparing the text ver- sion of the document within seconds. If you want the extra space only in a list style, you can specify the style as well. In much the same way, you can easily remove Figure 6: AltSearch’s list of extended expressions. tools only support basic para- graph styles, AltSearch’s prop- erties not only support charac- ter and list styles, but they can search on any of these styles used in the document rather than a basic few (Figure 7). Moreover, should these choices be overwhelming, you can run AltSearch on the basis of the text you select with the cursor. All these options greatly in- crease the chance of pinpoint- ing a search item quickly, which is especially welcome in longer documents. e-mail address HTML tag Opening HTML tag Closing HTML tag 10 Expands found selection about one char to both sides Append mark || for multiple replace (in one step) Text between () (inside of one paragraph) Text between [] (inside of one paragraph) Text between {} (inside of one paragraph) Internet, URL, www address Notes (yellow bubbles) - searches substring in contents of notes Text fields - searches substring in contents of fields Text frame - searches substring in Names of frames Table - searches substring in Names of tables Picture - searches substring in Names of pistures Footnote - text of anchor; add \\ for searches in content of footnootes Endnote - text of anchor; add \\ for searches in content of Endnootes Cross-ref. marker (text); \\ for search in Name; \\\\ for search of empty text Cross-reference (text); \\ for search in N. of marker; \\\\ for s. of empty text Bookmark - searches substring in text of Bookmarks; add \\ for searches in Names COOL LINUX HACKS -— 2022 EDITION

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.