Linux - Reddit – Telegram
Linux - Reddit
778 subscribers
4.19K photos
207 videos
39.9K links
Stay up-to-date with everything Linux!
Content directly fetched from the subreddit just for you.

Powered by : @r_channels
Download Telegram
Invoke Sudo but specify user and password???

I'm working on pushing out a linux executable and have it run silently.

In terminal I just have to type sudo ./nameoffile and then enter the password.

Can I put all of this in one command?

Like $ su admin | sudo ./name of file | passwordforadmin

https://redd.it/bp2s90
@r_linux
PacketFence Network Access Control v9.0: new GUI, VPN support and Let's Encrypt integration
https://packetfence.org/news/2019/packetfence-v90-released.html

https://redd.it/bp34ex
@r_linux
Which distro do you think is the Flagship of the various Desktop Environments and Window Managers?

We all know that some distro makers have developed their own desktop environment, like Mint making Cinnamon, Elementary with Pantheon or Solus making Budgie, so it's understandable that their distro is meant to be the flagship of that desktop.

But what about the others? A lot of people say that OpenSUSE is the one of KDE Plasma, but with the introduction of KDE Neon disrupts that idea, or despite being stated a spart of the GNU project, GNOME is pretty relevant on Fedora, being that Red Hat has a lot of influence on the project, and also on the [Getting GNOME page Fedora is on the top on the list](https://www.gnome.org/getting-gnome/), plus the fact that Fedora Workstation by default ships with a pretty much vanilla instance of it.

But what do you thing for the others? XFCE, Mate, i3, Openbox, etc.

https://redd.it/bp1wwm
@r_linux
Comprehensive Kernel 5.1.2 Tuning Analysis

## Intro
I was having difficulty finding information on the performance of the vanilla kernel vs the [`linux-zen`](https://www.archlinux.org/packages/extra/x86_64/linux-zen/) kernel, and how much CPU exploit mitigations (e.g. Spectre) affected performace. In particular I wanted information about general system performance and gaming performance in desktop computers. So I did some testing of my own and I wanted to share the results.

### TL;DR
There is a measurable benefit to both disabling CPU exploit mitigations and using the `linux-zen` kernel, but it's not worth disabling CPU exploit mitigations.

**Disabling** CPU exploit mitigations, compared to the vanilla kernel, using `linux-zen` nets around a +6% CPU/system performance improvement and less than +1% gaming performance (FPS) improvement.

**Without disabling** CPU exploit mitigations, compared to the vanilla kernel, using `linux-zen` nets a +1-2% CPU/system performance improvement and less than +1% gaming performance (FPS) improvement.

## Testing Methodology
I used the [Phoronix Test Suite](https://www.phoronix-test-suite.com/). The two tests I used were `system/gimp` and `pts/unigine-valley`. To disable exploit mitigations I used the Linux boot cmdline option `mitigations=off` which was added in [this commit](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v4.19.43&id=8cb932aca5d6728661a24eaecead9a34329903ff). To verify the state of CPU exploit mitigations, I used the latest version (as of today, May 15) of [spectre-meltdown-checker](https://github.com/speed47/spectre-meltdown-checker) from GitHub.

### Hardware and versions
I'm using an Intel 4960K overclocked to 4.4 GHz at 1.3 V with a Noctua NH-D15. I'm using the `cpuidle.governor=teo` Linux boot cmdline option, which was added in the new 5.1 kernel. The graphics card is (unfortunately) an MSI NVIDIA 980 Ti that is not manually overclocked, though its factory clock is 1139 MHz while the reference 980 Ti clock is 1000 MHz. Using [Green with Envy](https://gitlab.com/leinardi/gwe) as a flatpak and running a video game reports that the card runs at around 1300 MHz.

The `nvidia` driver version is 418.74. `mesa` is 19.0.4-1. The `intel-ucode` version is 20190514-1. Both kernels were released today May 15, version 5.1.2.

## Terminology
Vanilla Kernel: The default kernel that comes with Arch Linux.

`linux-zen`: The linux-zen kernel that is essentially the [Liquorix kernel](https://liquorix.net/) but without the MuQSS CPU scheduler.

mitigations on: The tests were ran without any kernel parameters modifying mitigations, after spectre-meltdown-checker verified all

mitigations were in place.

mitigations off: The tests were ran with mitigations off, after spectre-meltdown-checker verified most mitigations were NOT in place.

## Results
### system/gimp (lower is better, measured in seconds)
#### resize
Vanilla Kernel mitigations on: 10.44

Vanilla Kernel mitigations off: 10.21

`linux-zen` mitigations on: 10.39

`linux-zen` mitigations off: 10.16

#### rotate
Vanilla Kernel mitigations on: 11.88

Vanilla Kernel mitigations off: 11.45

`linux-zen` mitigations on: 11.66

`linux-zen` mitigations off: 11.26

#### auto-levels
Vanilla Kernel mitigations on: 12.70

Vanilla Kernel mitigations off: 12.27

`linux-zen` mitigations on: 12.51

`linux-zen` mitigations off: 12.10

#### unsharp-mask
Vanilla Kernel mitigations on: 14.47

Vanilla Kernel mitigations off: 13.82

`linux-zen` mitigations on: 14.21

`linux-zen` mitigations off: 13.63

### Unigine Heaven (higher is better, measured in FPS)
Vanilla Kernel mitigations on: 37.71

Vanilla Kernel mitigations off: 37.86

`linux-zen` mitigations on: 37.94

`linux-zen` mitigations off: 37.98

###### Edit: spacing and formatting

https://redd.it/bp5qnu
@r_linux
Issues installing NVIDIA drivers

Hi all,

I am new to Linux and using Linux Mint currently. I am trying to install drivers for my NVIDIA MX150 gpu and when I run the command "sudo sh NVIDIA-Linux-x86\_64-430.14.run" it starts the install but then says

ERROR: You appear to be running an X server; please exit X before

installing. For further details, please see the section INSTALLING

THE NVIDIA DRIVER in the README available on the Linux driver

download page at [www.nvidia.com](https://www.nvidia.com).

I looked around a bit on how to exit the X server, but when I do it just logs me out of my computer and when I log back in and try running it I get the same issue. I am probably missing something stupidly simple but any help would be much appreciated!

How do I successfully install the driver?

https://redd.it/bp71o0
@r_linux
This media is not supported in your browser
VIEW IN TELEGRAM
Recommendation: Goodvibes is an online radio player with a well-thought UI and tray icon implementation
https://redd.it/bp8twv
@r_linux
Linux maintainers appreciation post! These are the latest commits to the kernel before 5.1.12 - these guys do some amazing work
https://redd.it/bp9igz
@r_linux
My 11 year old son wrote a game in BASH Shell on Linux.

Hi! I'm teaching my son to code. He's 11, so none of that scratch stuff -- we're working in C on Linux. I taught him to write shell noscripts in BASH to make his life easier, and I told him, go write something, anything you want, and I'll get you some chips and ice cream. This is what he came up with. He's getting pretty good, that crafty sod :)

#!/bin/bash

#Strings and variables
ranoppo=$((`od -An -N2 -i /dev/random | tr -d " "` % 6 + 1))
oppohealth=$((`od -An -N2 -i /dev/random | tr -d " "` % 10 + 20))
playerhealth=$((`od -An -N2 -i /dev/random | tr -d " "` % 10 + 10))
oppodam=$((`od -An -N2 -i /dev/random | tr -d " "` % 5 + 1))
potion_used=0

#Start
echo -n "What is your name? "
read n
echo -n "Your opponent is ... "

#Picking opponent
if [ $ranoppo -eq 1 ]; then
echo "an Orc!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 2 ]; then
echo "a Stick monster!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 3 ]; then
echo "a Giant slug!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 4 ]; then
echo "a Zombie!"
echo "It does $oppodam damage."
fi

if [ $ranoppo -eq 5 ]; then
echo "a Fighting bear!"
echo "It does $oppodam damage."
fi

#The program loop begins
while [ $playerhealth -gt 1 ]; do
playerdam=$((`od -An -N2 -i /dev/random | tr -d " "` % 6 + 1))
oppodam=$((`od -An -N2 -i /dev/random | tr -d " "` % 5 + 1))
echo
echo
echo "Your health is $playerhealth."
echo "Your opponent's health is $oppohealth."
echo
echo "Do you want to //attack// your opponent?"
echo "Or use Health //potion// ?"
echo -n "Choice: "
read movement

if [ $potion_used -lt 1 ]; then
if [ ${movement,,} == "potion" ]; then
echo
echo "You drink the Health potion and gain 20 health!"
playerhealth=$((playerhealth + 20))
potion_used=1
fi
else
echo "Oh no, you're out of potions!"
fi

if [ ${movement,,} == "attack" ]; then
echo
echo "You attack your opponent."
echo "The opponent attacks back!"
oppohealth=$((oppohealth-playerdam))
fi

echo
echo "The opponent attacks!"
playerhealth=$((playerhealth - oppodam))

if [ $oppohealth -lt 1 ]; then
echo
echo
echo "==============================="
echo "| You defeated your opponent! |"
echo "|-----------------------------|"
echo "| You win! |"
echo "==============================="
echo
exit
fi

done

echo
echo
echo "=================================="
echo "| Oh no! You have 0 health left! |"
echo "|--------------------------------|"
echo "| Game over! |"
echo "=================================="
echo

BTW, I am keeping a diary of how I teach my son Linux and Computer Programming. You might want to check it out at [helloneo.ca](https://helloneo.ca). We're going to be doing great things together... great things!

https://redd.it/bpa0fk
@r_linux
New Kernels with Patches for MDS, The Latest Side-Channel Vulnerability In Intel CPUs, are now available. Greg Kroah-Hartman stressed that all users of Intel CPUs made since 2011 MUST upgrade.
https://linuxreviews.org/intel-mds-patches

https://redd.it/bp9zs9
@r_linux
Superpaper v1.1.1 released - the multi monitor wallpaper manager gets a Linux package, GUI, and UX & performance improvements

[Superpaper on GitHub](https://github.com/hhannine/Superpaper) [Releases](https://github.com/hhannine/Superpaper/releases)

​

[Photo](https://raw.githubusercontent.com/hhannine/Superpaper/branch-resources/readme-banner.jpg) of Superpaper with alignment corrections enabled. The displays are a 27" 4K on the left and a 25" 1440p in portrait on the right.

# Superpaper

Superpaper is a cross-platform multi monitor wallpaper manager that I wrote especially for Linux since I couldn't find anything similar, but since it's python other platforms fell essentially for free.

## New in this release:

* GUI
* Wallpaper profile configuration
* General settings
* Error dialogs/messages and hopefully more robust error handling in general
* Help dialog
* Linux binary, no more hassle with dependencies
* Alignment test tool designed to help with dialing in all the settings
* Performance
* Better threading for heavier tasks
* Misc.:
* Fix URL in about dialog
* Fix for CLI offset handling
* Fix monitor sorting issue when using alignment corrections if display order detected badly
* Logging fix, attempt to better log uncaught exceptions
* File handling fixes: handle empty folders and non-image types
* Windows: handle Windows's negative offsets correctly
* Other improvements and changes

## Supported Linux desktop environments / window managers:

* BSPWM (via feh)
* Budgie
* Cinnamon
* Gnome
* i3 (via feh)
* KDE
* LXDE
* Mate
* Pantheon
* XFCE

## Features

* Set a single image across all displays
* Set different image on every display
* **Pixel per inch correction**: span an image flawlessly across displays of different shapes and sizes!
* **Bezel correction**
* Manual pixel offsets for fine-tuning
* Slideshow with configurable file order from local sources
* **Command-line interface**
* Tray applet for slideshow control
* Configuration GUI
* Hotkey support for easy slideshow control (Only Linux and Windows)
* Align test tool to help fine tune your settings

https://redd.it/bpayg6
@r_linux