Some tips for limiting damage remote users can do through OpenSSH
https://distrowatch.com/weekly.php?issue=20210405#qa
https://redd.it/mk8duk
@r_linux
https://distrowatch.com/weekly.php?issue=20210405#qa
https://redd.it/mk8duk
@r_linux
Can someone tell me why my while loop never ends
Hello team
I created this noscript to increment IPs and Vlans to copy to a text file and copy and paste on switches. The numbers are incrementing, the only issue is that it doesn't stop. I want the third octet in my IP to stop at 250 and I was the last Vlan to stop at 1250. The third octet start is entered as 1 and the starting VLAN is 1001. Im a bit of a starter on Shell noscripts, so any help will be appreciated.
\#!/bin/sh -x
MaxValue=250 # highest valid IP octet value
MaxValueVlan=1250
Vlan= 1001
\#echo -n "Enter IP address: "; read IP
echo -n "How many IP addresses do you need: "; read count
echo -n "Which Vlan: "; read VLAN
echo -n "Whats network: "; read Third
​
Pre=10
Sec=150
Fourth=1
while [[ $count -gt 0 \]\] || [[ $vlan -gt 0 \]\] || [[ $Third -gt 0 \]\]
do
if [[ $Third -eq $MaxValue \]\] || [[ $vlan -eq $MacValueVlan \]\] ; then
\# here you'll need to increment the third level IP value,
\# but that might cascade into the second, or the first.
\# consider the case of 17.255.255.255 + 1
echo "edge case needs to be written"
fi
\#echo $baseaddr.$lsv
echo $vlan
echo $Pre"."$Sec"."$Third"."$Fourth
\#lsv=$(( $lsv + 1 ))
vlan=$(( $vlan + 1 ))
Third=$(( $Third + 1 ))
count=$(( $count - 1 ))
done
exit 0
https://redd.it/mk592e
@r_linux
Hello team
I created this noscript to increment IPs and Vlans to copy to a text file and copy and paste on switches. The numbers are incrementing, the only issue is that it doesn't stop. I want the third octet in my IP to stop at 250 and I was the last Vlan to stop at 1250. The third octet start is entered as 1 and the starting VLAN is 1001. Im a bit of a starter on Shell noscripts, so any help will be appreciated.
\#!/bin/sh -x
MaxValue=250 # highest valid IP octet value
MaxValueVlan=1250
Vlan= 1001
\#echo -n "Enter IP address: "; read IP
echo -n "How many IP addresses do you need: "; read count
echo -n "Which Vlan: "; read VLAN
echo -n "Whats network: "; read Third
​
Pre=10
Sec=150
Fourth=1
while [[ $count -gt 0 \]\] || [[ $vlan -gt 0 \]\] || [[ $Third -gt 0 \]\]
do
if [[ $Third -eq $MaxValue \]\] || [[ $vlan -eq $MacValueVlan \]\] ; then
\# here you'll need to increment the third level IP value,
\# but that might cascade into the second, or the first.
\# consider the case of 17.255.255.255 + 1
echo "edge case needs to be written"
fi
\#echo $baseaddr.$lsv
echo $vlan
echo $Pre"."$Sec"."$Third"."$Fourth
\#lsv=$(( $lsv + 1 ))
vlan=$(( $vlan + 1 ))
Third=$(( $Third + 1 ))
count=$(( $count - 1 ))
done
exit 0
https://redd.it/mk592e
@r_linux
reddit
Can someone tell me why my while loop never ends
Hello team I created this noscript to increment IPs and Vlans to copy to a text file and copy and paste on switches. The numbers are incrementing,...
CLI replacement for Baobab (disk usage analyzer)?
my current method is slow and clunky, but I guess I could noscript it into a solution. I'll do sudo du -chs / to see the overview and a total, then will do a du -bcs / | sort -n (show in bytes and then sort numerically) to see the worst offenders at the bottom, then will continue the process the with one or two of the worst offender folders, until i've developed a sense of where the problem is...
I don't need something with a pretty display of where the problem is, but it would be nice to have a MC view of the system, and be able to go down the tree to see where the largest files are. Sometimes I may have a suspicion of where the problem is (/var/logs/ or something), but many times i do not.
https://redd.it/mk9wuq
@r_linux
my current method is slow and clunky, but I guess I could noscript it into a solution. I'll do sudo du -chs / to see the overview and a total, then will do a du -bcs / | sort -n (show in bytes and then sort numerically) to see the worst offenders at the bottom, then will continue the process the with one or two of the worst offender folders, until i've developed a sense of where the problem is...
I don't need something with a pretty display of where the problem is, but it would be nice to have a MC view of the system, and be able to go down the tree to see where the largest files are. Sometimes I may have a suspicion of where the problem is (/var/logs/ or something), but many times i do not.
https://redd.it/mk9wuq
@r_linux
reddit
CLI replacement for Baobab (disk usage analyzer)?
my current method is slow and clunky, but I guess I could noscript it into a solution. I'll do [sudo] du -chs /* to see the overview and a total,...
Emacs Tutorial It's semantic how Emacs binds all keys
From the prelude, Emacs big-bang its universe simply from M-x. It invoke interactive functions with M(Meta)-x(Execute).
Then it go one more step, replaces the double keys of M-xwith the single key of Ctrl, and even further truncates function’s name to its initial letter.
Now instead of redundant M-x forward-char, we straightforwardly strike C-fto move cursor forward a character.
The logic here is obvious: C (Ctrl) substitutes for M (Meta)-x, while f for forward-char.
We pause a moment here to organize our thoughts.
​
1. Key “Meta” has source meaning in etymology, so it is applied to invoke full-name functions,
2. Key “Ctrl” corresponds to “Command”
3. Key “f” is abbreviated for “forward-character”
So differs from Vim, we could easily conclude that Emacs was designed to bind keys semantically.
With such semantic key bindings, we could manipulate Emacs smoothly as veterans even without remembering one key binding.
The subsequent sessions starts to the cursor movement semantically from:
1. Character and Word
2. Line and Sentence
3. Vertical movement
4. Vertically Page down and up
5. Buffer
6. Logic Text Unit
7. Keys layout
8. Concepts
read the complete github project
#
https://redd.it/mjw3to
@r_linux
From the prelude, Emacs big-bang its universe simply from M-x. It invoke interactive functions with M(Meta)-x(Execute).
Then it go one more step, replaces the double keys of M-xwith the single key of Ctrl, and even further truncates function’s name to its initial letter.
Now instead of redundant M-x forward-char, we straightforwardly strike C-fto move cursor forward a character.
The logic here is obvious: C (Ctrl) substitutes for M (Meta)-x, while f for forward-char.
We pause a moment here to organize our thoughts.
​
1. Key “Meta” has source meaning in etymology, so it is applied to invoke full-name functions,
2. Key “Ctrl” corresponds to “Command”
3. Key “f” is abbreviated for “forward-character”
So differs from Vim, we could easily conclude that Emacs was designed to bind keys semantically.
With such semantic key bindings, we could manipulate Emacs smoothly as veterans even without remembering one key binding.
The subsequent sessions starts to the cursor movement semantically from:
1. Character and Word
2. Line and Sentence
3. Vertical movement
4. Vertically Page down and up
5. Buffer
6. Logic Text Unit
7. Keys layout
8. Concepts
read the complete github project
#
https://redd.it/mjw3to
@r_linux
GitHub
Master-Emacs-From-Scratch-with-Solid-Procedures/01.semantic-keybinding-en.org at master · AbstProcDo/Master-Emacs-From-Scratch…
Master Emacs. Contribute to AbstProcDo/Master-Emacs-From-Scratch-with-Solid-Procedures development by creating an account on GitHub.
9 Best Linux Distros for Beginners & Programmers
https://alto-palo.com/blogs/best-linux-distros-for-beginners-programmers/
https://redd.it/mkd10d
@r_linux
https://alto-palo.com/blogs/best-linux-distros-for-beginners-programmers/
https://redd.it/mkd10d
@r_linux
Alto Palo
9 Best Linux Distros for Beginners & Programmers
Best Linux distros for beginners & programmers software development. Discover full blog and learn more about linux latest technologies.
Bash noscript to set wallpapers from your favourite subreddits
Not sure if this is the right place to post this, but I'm guessing this might be useful for some people.
#!/usr/bin/env bash
# This noscript needs imagemagick and feh
SUBREDDITS=$(cat <<-END
earthporn/top
cityporn/top
skyporn/top
beachporn/top
waterporn/top
auroraporn/hot
exposureporn/hot
END
)
SUBREDDIT=$(echo "$SUBREDDITS" | shuf -n 1)
echo "Choosing $SUBREDDIT"
mkdir -p ~/.wallpapers
wallpaperlocation=~/.wallpapers/current-wallpaper.jpg
urls=$(wget -O - -o /dev/null http://www.reddit.com/r/$SUBREDDIT/.rss | grep -oP 'https://i.redd.it/\w{13}\.(jpg|png)')
for url in $urls; do
wget -O $wallpaperlocation $url
islandscape=$(identify -format '%[fx:(w>h)]' $wallpaperlocation)
resolution=$(feh -L "%p" $wallpaperlocation)
ishighres=0;
if [ $resolution -gt 1000000 ]; then
ishighres=1;
fi;
if [[ $islandscape = 1 && $ishighres = 1 ]]; then
feh --bg-scale $wallpaperlocation
break;
fi
done;
https://redd.it/mkf4kt
@r_linux
Not sure if this is the right place to post this, but I'm guessing this might be useful for some people.
#!/usr/bin/env bash
# This noscript needs imagemagick and feh
SUBREDDITS=$(cat <<-END
earthporn/top
cityporn/top
skyporn/top
beachporn/top
waterporn/top
auroraporn/hot
exposureporn/hot
END
)
SUBREDDIT=$(echo "$SUBREDDITS" | shuf -n 1)
echo "Choosing $SUBREDDIT"
mkdir -p ~/.wallpapers
wallpaperlocation=~/.wallpapers/current-wallpaper.jpg
urls=$(wget -O - -o /dev/null http://www.reddit.com/r/$SUBREDDIT/.rss | grep -oP 'https://i.redd.it/\w{13}\.(jpg|png)')
for url in $urls; do
wget -O $wallpaperlocation $url
islandscape=$(identify -format '%[fx:(w>h)]' $wallpaperlocation)
resolution=$(feh -L "%p" $wallpaperlocation)
ishighres=0;
if [ $resolution -gt 1000000 ]; then
ishighres=1;
fi;
if [[ $islandscape = 1 && $ishighres = 1 ]]; then
feh --bg-scale $wallpaperlocation
break;
fi
done;
https://redd.it/mkf4kt
@r_linux
crocus: gallium for the gen 4-7 generation
https://airlied.blogspot.com/2021/04/crocus-gallium-for-gen4-7-generation.html
https://redd.it/mkg6ei
@r_linux
https://airlied.blogspot.com/2021/04/crocus-gallium-for-gen4-7-generation.html
https://redd.it/mkg6ei
@r_linux
Blogspot
crocus: gallium for the gen4-7 generation
The crocus project was recently mentioned in a phoronix article . The article covered most of the background for the project. Crocus is a ga...
Creating a secured terminal paste tool, spaste.online
https://blog.oxagast.org/posts/secure-terminal-paste-spaste/
https://redd.it/mkfxqy
@r_linux
https://blog.oxagast.org/posts/secure-terminal-paste-spaste/
https://redd.it/mkfxqy
@r_linux
oxasploits
Creating a secured terminal paste tool
Background
Challenge to scientists: does your ten-year-old code still run?
https://www.nature.com/articles/d41586-020-02462-7
https://redd.it/mklg4n
@r_linux
https://www.nature.com/articles/d41586-020-02462-7
https://redd.it/mklg4n
@r_linux
Nature
Challenge to scientists: does your ten-year-old code still run?
Nature - Missing documentation and obsolete environments force participants in the Ten Years Reproducibility Challenge to get creative.
Supreme Court rules usage of Java SE APIs by Google fair use
https://www.reuters.com/article/us-usa-court-google-oracle/u-s-supreme-court-sides-with-google-in-major-copyright-dispute-with-oracle-idUSKBN2BS1A9
https://redd.it/mklw2w
@r_linux
https://www.reuters.com/article/us-usa-court-google-oracle/u-s-supreme-court-sides-with-google-in-major-copyright-dispute-with-oracle-idUSKBN2BS1A9
https://redd.it/mklw2w
@r_linux
U.S.
U.S. Supreme Court backs Google over Oracle in major copyright case
The U.S. Supreme Court handed Alphabet Inc's Google a major victory on Monday, ruling that its use of Oracle Corp's software code to build the Android operating system that runs most of the world's smartphones did not violate federal copyright law.
Looking for advice
Hey everyone, I need advice with choosing a distro that would run fairly decent on my late 2008 Macbook Pro. It has a core 2 duo 2.66GHz CPU with 4GB DDR3 memory and an Nvidia Geforce 9600M 256MB GPU.
I don't want to run osX lion anymore and doing a Dosdude1 Sierra causes the mac to overheat severely and I'm not ready to retire the machine yet since it still looks and works perfectly. But my issue is I cannot find a decent OS that I feel comfortable with that doesn't cause performance / overheating issues.
I've tried the following distros:
Ubuntu: Not fond of the desktop environment
Elementary OS - looks similar to mac
OSMint Cinnamon - it runs fairly well but has some performance issues
Pop! OS - runs okay but takes a while to boot and I'm not fond of the distro TBH
Solus Budgie - I like the UI but I'm having weird freeze issues when I connect it to the net.
I'm currently considering Manjaro, Arch or Deepin. What are your suggestions? I want a lightweight and responsive distro, but I do want something that still looks good.
https://redd.it/mkkt57
@r_linux
Hey everyone, I need advice with choosing a distro that would run fairly decent on my late 2008 Macbook Pro. It has a core 2 duo 2.66GHz CPU with 4GB DDR3 memory and an Nvidia Geforce 9600M 256MB GPU.
I don't want to run osX lion anymore and doing a Dosdude1 Sierra causes the mac to overheat severely and I'm not ready to retire the machine yet since it still looks and works perfectly. But my issue is I cannot find a decent OS that I feel comfortable with that doesn't cause performance / overheating issues.
I've tried the following distros:
Ubuntu: Not fond of the desktop environment
Elementary OS - looks similar to mac
OSMint Cinnamon - it runs fairly well but has some performance issues
Pop! OS - runs okay but takes a while to boot and I'm not fond of the distro TBH
Solus Budgie - I like the UI but I'm having weird freeze issues when I connect it to the net.
I'm currently considering Manjaro, Arch or Deepin. What are your suggestions? I want a lightweight and responsive distro, but I do want something that still looks good.
https://redd.it/mkkt57
@r_linux
reddit
Looking for advice
Hey everyone, I need advice with choosing a distro that would run fairly decent on my late 2008 Macbook Pro. It has a core 2 duo 2.66GHz CPU with...
dd command linux
If I want to clone one compact disk “A” to compact disk “B”, will the data from “A” be deleted?
If so, how to do it without losing data?
I need to clone very important data and I can’t lose it.
~~filler filler filler filler filler filler filler~~
https://redd.it/mkp0pg
@r_linux
If I want to clone one compact disk “A” to compact disk “B”, will the data from “A” be deleted?
If so, how to do it without losing data?
I need to clone very important data and I can’t lose it.
~~filler filler filler filler filler filler filler~~
https://redd.it/mkp0pg
@r_linux
reddit
dd command linux
If I want to clone one compact disk “A” to compact disk “B”, will the data from “A” be deleted? If so, how to do it without losing data? I...
Google vs Oracle Api Lawsuit
https://www.cnbc.com/2021/04/05/supreme-court-rules-in-googles-favor-in-copyright-dispute-with-oracle-over-android-software.html
https://redd.it/mkq9on
@r_linux
https://www.cnbc.com/2021/04/05/supreme-court-rules-in-googles-favor-in-copyright-dispute-with-oracle-over-android-software.html
https://redd.it/mkq9on
@r_linux
CNBC
Supreme Court rules in Google's favor in copyright dispute with Oracle over Android software
Oracle had claimed to be owed as much as $9 billion, while Google claimed that its use of the code was covered under the doctrine of fair use.
KDE e.V. is hiring 2 positions for environmental sustainability project
https://mail.kde.org/pipermail/kde-community/2021q2/006846.html
https://redd.it/mks1mg
@r_linux
https://mail.kde.org/pipermail/kde-community/2021q2/006846.html
https://redd.it/mks1mg
@r_linux
Turkish government using linux on their school computers and smartboards (They made a special distro named pardus)
https://redd.it/mksn5i
@r_linux
https://redd.it/mksn5i
@r_linux
Occasional audio hiccups
I would like to touch a sensitive topic that has plagued my setup for many years, sometimes more frequently, other times less frequently. I think it's an issue that many users might experience here and there.
I use gentoo for many years (more than 10) with this setup lately, which seems to be the best I ever had in terms of low latency/snappy desktop feel even during load:
1. Xanmod Kernel https://github.com/xanmod/linux/releases with custom config, based on default xanmod's config.
2. https://github.com/hamadmarri/cacule-cpu-scheduler scheduler
3. https://github.com/Nefelim4ag/Ananicy to optimize nice values for programs
4. kde with pulseaudio
I experience once or twice per day a hiccup during audio playback, mostly on youtube via firefox. I have ruled out network, since the buffer is full and the hiccups might happen also on strawberry player. The hiccup can happen also during low load average, no cpu/io usage. I don't recall any hiccups, when viewing movies via vlc/mpv.
I have experimented on the past with MuQSS as well.
What is your experience? Do you experience in general, occasional hiccups too? Could it be players' issue?If your setup is flawless, share it!
https://redd.it/mkv0l7
@r_linux
I would like to touch a sensitive topic that has plagued my setup for many years, sometimes more frequently, other times less frequently. I think it's an issue that many users might experience here and there.
I use gentoo for many years (more than 10) with this setup lately, which seems to be the best I ever had in terms of low latency/snappy desktop feel even during load:
1. Xanmod Kernel https://github.com/xanmod/linux/releases with custom config, based on default xanmod's config.
2. https://github.com/hamadmarri/cacule-cpu-scheduler scheduler
3. https://github.com/Nefelim4ag/Ananicy to optimize nice values for programs
4. kde with pulseaudio
I experience once or twice per day a hiccup during audio playback, mostly on youtube via firefox. I have ruled out network, since the buffer is full and the hiccups might happen also on strawberry player. The hiccup can happen also during low load average, no cpu/io usage. I don't recall any hiccups, when viewing movies via vlc/mpv.
I have experimented on the past with MuQSS as well.
What is your experience? Do you experience in general, occasional hiccups too? Could it be players' issue?If your setup is flawless, share it!
https://redd.it/mkv0l7
@r_linux
GitHub
Releases · xanmod/linux
Git repository moved to https://gitlab.com/xanmod/linux - xanmod/linux
Interesting thought using CDRs as USB keys
I know this is just nostalgia talking. But it would be like 90s kid cool to use a CDR to log into Linux. Also to remain logged in it would have to re-read the disc periodically, or to check sudo privileges.
My question is would it be just a drop-in replacement or do I need to do some weird things for it work.
Thanks in advance and Linux rules. : ]
https://redd.it/mkqzxn
@r_linux
I know this is just nostalgia talking. But it would be like 90s kid cool to use a CDR to log into Linux. Also to remain logged in it would have to re-read the disc periodically, or to check sudo privileges.
My question is would it be just a drop-in replacement or do I need to do some weird things for it work.
Thanks in advance and Linux rules. : ]
https://redd.it/mkqzxn
@r_linux
reddit
Interesting thought using CDRs as USB keys
I know this is just nostalgia talking. But it would be like 90s kid cool to use a CDR to log into Linux. Also to remain logged in it would have to...
Awesome news
https://podcasts.google.com/feed/aHR0cHM6Ly90dXhkaWdpdGFsLmNvbS9mZWVkL3RoaXN3ZWVraW5saW51eC1tcDM/episode/aHR0cHM6Ly90dXhkaWdpdGFsLmNvbS8_cD0zMjc0?ep=14
https://redd.it/mktbnr
@r_linux
https://podcasts.google.com/feed/aHR0cHM6Ly90dXhkaWdpdGFsLmNvbS9mZWVkL3RoaXN3ZWVraW5saW51eC1tcDM/episode/aHR0cHM6Ly90dXhkaWdpdGFsLmNvbS8_cD0zMjc0?ep=14
https://redd.it/mktbnr
@r_linux
Google Podcasts
This Week in Linux - 145: RHEL Rebuild AlmaLinux, Ubuntu 21.04, Lineage OS, NVidia, ARMv9, Linux Mint | This Week in Linux
On this episode of This Week in Linux, CloudLinux has released the stable version of their rebuil of RHEL or CentOS Alternative, AlmaLinux OS. We’ve got some exciting media streaming news for the Raspberry Pi. OBS Studio announced some great news for those…
Who watches the watchers?
bye linux community. recently published information about pocketchip a device that until two days ago did not interest anyone. Thanks to my post, many discovered it, but WHAT IF SOMEONE CONSIDERS THAT IT IS NOT RELEVANT, WOULD THEY DELETE IT? under what criteria? then in another post I talked about bunsenlabs heir to another distribution called crunchbang #! which for many users is mythical. apparently it was deleted as irrelevant when I see daily other posts with desktop screenshots just for posturing and totally irrelevant. It does not seem correct to me since in these times of economic madness many people are acquiring cheap computers that are useful. What better than a thinkpad considered an armored tank such as the x230 model as well as a Netbook that is technically garbage but thanks to bunsenlabs it would allow many people at least to have a working computer. All these computers allow me to compose music, draw, write, browse, edit photos, and many more functions. it doesn't seem irrelevant to me. for this reason I think it is not worth staying here. I had plans to continue publishing information on things that surely many young users do not know, even preparing a post on how to build a piratebox with pocketchip to share files anywhere anonymously, an important issue in these times of massive surveillance worldwide. but I am not going to endure censorship from strangers. I thought it was a good community but I was wrong. This is why I will delete all my posts in this community. Regards, and thank you very much.
https://redd.it/mknrkw
@r_linux
bye linux community. recently published information about pocketchip a device that until two days ago did not interest anyone. Thanks to my post, many discovered it, but WHAT IF SOMEONE CONSIDERS THAT IT IS NOT RELEVANT, WOULD THEY DELETE IT? under what criteria? then in another post I talked about bunsenlabs heir to another distribution called crunchbang #! which for many users is mythical. apparently it was deleted as irrelevant when I see daily other posts with desktop screenshots just for posturing and totally irrelevant. It does not seem correct to me since in these times of economic madness many people are acquiring cheap computers that are useful. What better than a thinkpad considered an armored tank such as the x230 model as well as a Netbook that is technically garbage but thanks to bunsenlabs it would allow many people at least to have a working computer. All these computers allow me to compose music, draw, write, browse, edit photos, and many more functions. it doesn't seem irrelevant to me. for this reason I think it is not worth staying here. I had plans to continue publishing information on things that surely many young users do not know, even preparing a post on how to build a piratebox with pocketchip to share files anywhere anonymously, an important issue in these times of massive surveillance worldwide. but I am not going to endure censorship from strangers. I thought it was a good community but I was wrong. This is why I will delete all my posts in this community. Regards, and thank you very much.
https://redd.it/mknrkw
@r_linux
reddit
Who watches the watchers?
bye linux community. recently published information about pocketchip a device that until two days ago did not interest anyone. Thanks to my post,...