[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/slackware/ - Slackware Linux

#slackware@irc.rizon.net

Catalog

Name
Email
Subject
REC
STOP
Comment *
File*
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Options

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


File: 220477abb68f796⋯.png (31.1 KB,522x270,29:15,4e06eda7.png)

 No.34 [Open thread]

These are two perl scripts I use to verify if my terminal emulator program (XTerm) is displaying colours properly.

Save one (or both) to /usr/local/bin and "chmod 755" them. No need to leave the .pl at the end.

256colours:

#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $

# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades

# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {
for ($green = 0; $green < 6; $green++) {
for ($blue = 0; $blue < 6; $blue++) {
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
16 + ($red * 36) + ($green * 6) + $blue,
($red ? ($red * 40 + 55) : 0),
($green ? ($green * 40 + 55) : 0),
($blue ? ($blue * 40 + 55) : 0));
}
}
}

# colors 232-255 are a grayscale ramp, intentionally leaving out
# black and white
for ($gray = 0; $gray < 24; $gray++) {
$level = ($gray * 10) + 8;
printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
232 + $gray, $level, $level, $level);
}


# display the colors

# first the system ones:
print "System colors:\n";
for ($color = 0; $color < 8; $color++) {
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m\n";
for ($color = 8; $color < 16; $color++) {
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m\n\n";

# now the color cube
print "Color cube, 6x6x6:\n";
for ($green = 0; $green < 6; $green++) {
for ($red = 0; $red < 6; $red++) {
for ($blue = 0; $blue < 6; $blue++) {
$color = 16 + ($red * 36) + ($green * 6) + $blue;
print "\x1b[48;5;${color}m ";
}
print "\x1b[0m ";
}
print "\n";
}


# now the grayscale ramp
print "Grayscale ramp:\n";
for ($color
Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 790dab768b413dc⋯.png (1.14 KB,41x30,41:30,Screenshot_2022_10_07_at_2….png)

 No.33 [Open thread]

If you need help with sed (stream editor), this thread is for you!

Actually, this is a cheat. I'm just copy/pasting from another link, but the original links are as follows.

-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5

Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt

This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
Czech - http://sed.sourceforge.net/sed1line_cz.html
Dutch - http://sed.sourceforge.net/sed1line_nl.html
French - http://sed.sourceforge.net/sed1line_fr.html
German - http://sed.sourceforge.net/sed1line_de.html
Italian - (pending)
Portuguese - http://sed.sourceforge.net/sed1line_pt-BR.html
Spanish - (pending)


FILE SPACING:

# double space a file
sed G

# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between l
Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 818e24e98a373c9⋯.png (10.57 KB,264x65,264:65,logo.png)

 No.32 [Open thread]

If you're interested in running a Local DNS (Domain Name System) for your machine, the instructions are as follows. Please remember that this guide is only for local DNS requests. Other machines in the network (if you have any) will not be able to use it, unless some more work is done (I won't get into that).

1. Download an updated version of named.root and replace the current one (/var/named/caching-example/named.root). Even better, rename the original named.root to something like named.root.orig just in case:

$ curl 'ftp://ftp.internic.net/domain/named.root'

$ sudo cp /var/named/caching-example/named.root /var/named/caching-example/named.root.orig

$ sudo mv named.root /var/named/caching-example/named.root

2. Make BIND's daemon executable:

$ sudo chmod 755 /etc/rc.d/rc.bind

3. Start BIND:

$ sudo /etc/rc.d/rc.bind start

4. Make sure /etc/resolv.conf is using the local IP Address of the machine running BIND. You should have a line like this "nameserver <local ip address>" commented out (remove the # at the beginning of the line if there is one). If you're using NetworkManager to configure DNS requests (which I think it can do), you'll need to configure it properly. Any other nameserver lines in /etc/resolv.conf must be commented out (put a # at the beginning of the line so it's not used).

Example of a working line in /etc/resolv.conf: nameserver 192.168.0.1

5. Verify that it's working:

$ dig localhost

You should see the IP Address in "SERVER:"

or

$ nslookup localhost

You should see the IP Address in "Server:"

6. Once it's working, you may want to dump the server caches and zones to a file for inspection:

$ sudo rndc dumpdb -all

Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 138e36187573a13⋯.png (25.53 KB,356x200,89:50,f66e7d73.png)

 No.31 [Open thread]

Below is the bash script for the terminal clock that I use. To quit the clock, use Ctrl + c.

#!/bin/bash
# clock.sh

# the script is executed inside a while without conditions
while :
do
# time and date are formatted to show HH:MM:SS YYYY-MM-DD
cmd=`date +"%c"`

# cursor's current position is saved through an escape sequence
echo -n -e "\033[s"

# Uncomment the next two lines to clean up the whole first line, although it causes a lot of blinking
#tput cup 0 0 # positions on row 0 col 0 (left top corner)
#tput el # cleans from position to end of line

# to place the clock on the appropriate column, subtract the length of 'HH:MM:SS YYYY-MM-DD', which is 19,
# from the total number of columns
C=$((`tput cols` - 32))
tput cup 0 $C # positions cursor at row 0 col $C

# clock will be shown green inverted
# setaf 2 = green, smso = inverted
COLOR=`tput setaf 7; tput smso`

# back to normal screen colors
NORMAL=`tput sgr0`

# print the time-date output on the above position
echo -n $COLOR$cmd$NORMAL

# restore the cursor to whatever was its previous position
echo -n -e "\033[u"

# script is executed every second
sleep 1
done

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: f4ed7438975e0f0⋯.png (9.81 KB,164x100,41:25,tor_logo_2x.png)

 No.30 [Open thread]

This thread will quickly explain how to use the Tor Browser after connecting to a VPN.

1. Read this thread first so you'll configure IPTables properly: https://8ch.net/slackware/res/10.html

2. $ cd $HOME/tor-browser_en-US/Browser/TorBrowser/Data/Tor/ (or wherever the Tor Browser is installed)

3. $ cp torrc torrc.orig (make a backup of torrc)

4. $ /sbin/ip -c a (check which ip address the VPN interface is using; the network interface should be tun0 in most cases, so check the ip address right after "inet" from the tun0 interface)

5. Add to the bottom of torrc "OutboundBindAddress 127.0.0.1" (without the quotes and replace 127.0.0.1 with the ip address obtained from step #4).

6. Run Tor Browser.

7. # ss -utapn | grep -i tor (yes, do this as root or use sudo; verify that "OutboundBindAddress" is listed, and that it is connected to the "Guard" by looking at the Tor Circuit List; go to https://check.torproject.org/ and click on the green padlock)

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 91f2cc78688656b⋯.png (11.35 KB,576x200,72:25,efb53217.png)

 No.29 [Open thread]

In this thread, I'll be giving some tips on GnuPG. I will not be explaining the basic commands, but rather giving out a few useful commands that I use every now and then. As time goes by I'll be adding more tips.

1. Always create a strong password. Preferably use a passphrase as long as you can remember it. A long passphrase is very important. If anyone ever manages to access your private key, the longer the passphrase the safer it is. If you lose your passphrase, you'll lose access to your private key and everything that has been encrypted with it, so be careful.

Want a passphrase example? OK: "Th3 l1ttl3 r3d riding H00d @t3 Some w0lf m3@t". Mix lower and uppercase letters, numbers and symbols.

2. How to create a password wallet:

After you have successfully created your own private key with GnuPG, one of the things I use the most is a text file containing my various passwords, protected with GnuPG.

Encrypt: $ gpg -r compass -o password.gpg -e password.txt (-r means "id name"; -o means output file; -e means file to encrypt)

Decrypt: $ gpg -d password.gpg | grep -i google (this command will decrypt password.gpg to your screen; grep -i will filter the output so only the line containing "google" will be shown; this helps to filter what you want in case password.txt is big)

Once this is done, you can upload multiple copies of your password.gpg file to anywhere you want. It will be safe as long as you keep your private key and passphrase safe.

3. How to verify multiple .asc files in one go:

$ gpg –verify-files *.asc

4. And don't forget: https://www.gnupg.org/faq/gnupg-faq.html

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 220477abb68f796⋯.png (31.1 KB,522x270,29:15,4e06eda7.png)

 No.28 [Open thread]

To make it possible for you to use sudo, you need to add your username(s) to /etc/sudoers. As root, do:

# visudo

visudo is the recommended way to edit /etc/sudoers. You should not use anything else. If you're not familiar with vi, you might have issues editing /etc/sudoers. Check the internet for the basic visual and ex command modes.

Add below the line "root ALL=(ALL) ALL" something like this "username ALL=(ALL) ALL", so it looks likes this:

root ALL=(ALL) ALL

username ALL=(ALL) ALL

Now username can use sudo.

The next thing to do is to uncomment (remove the #) from the line '# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"' so it looks like this:

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Then save and exit (:x).

That will allow username to use sudo without typing the full path for the commands.

I haven't edited anything else, but feel free to read and edit /etc/sudoers as you require.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: fa26a906abbed35⋯.png (29.04 KB,1143x270,127:30,8757fc0b.png)

 No.27 [Open thread]

For those interested in installing LibreOffice 6 RPM binary by hand, read on. An alternative is to use Alien's packages (https://alien.slackbook.org/blog/ - http://www.slackware.com/~alien/slackbuilds/) or compile LibreOffice itself, which should take some time.

I'm using LibreOffice_6.0.2_Linux_x86-64_rpm.tar.gz in this guide, but it should work with any recent version.

$ mv LibreOffice_6.0.2_Linux_x86-64_rpm.tar.gz /tmp

$ cd /tmp

$ tar zxf LibreOffice_6.0.2_Linux_x86-64_rpm.tar.gz

$ cd LibreOffice_6.0.2.1_Linux_x86-64_rpm/RPMS/

$ sudo rpm2tgz -c '*.rpm'

If sudo or rpm2tgz aren't found in your $PATH, just use the complete path to those commands.

$ rm *.rpm

The RPM's aren't needed anymore

$ /sbin/explodepkg *.tgz

$ cd opt/ && ls

$ mv libreoffice6.0 /opt

$ cd opt/ && ls

$ sudo chown -R root:root libreoffice6.0

Now you can symlink to soffice (I use /opt/libreoffice6.0/program/soffice).

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 24addd2262ca7e5⋯.png (16.45 KB,270x270,1:1,76196047.png)

 No.26 [Open thread]

In this thread I'm going to be sharing some XTerm (https://invisible-island.net/xterm/) tips and themes (that I have and online).

Tip #1: XTerm has fours menus. mainMenu, vtMenu, fontMenu and tekMenu. The most useful ones are the first three. For mainMenu, use Ctrl + Left Mouse button. For vtMenu, use Ctrl + Middle Mouse button. For fontMenu, use Ctrl + Right Mouse button.

Tip #2: XTerm is capable of displaying 256 colours. Download the "256colors2.pl" script from the following link and read the instructions. http://web.archive.org/web/20130125000058/http://frexx.de/xterm-256-notes/

Or read this thread (https://sys.8ch.net/mod.php?/slackware/res/34.html).

Tip #3: Through the file $HOME/.Xresources you are able to configure various X.org programs, including XTerm colours and fonts. Once you have edited $HOME/.Xresources to your liking, do "$ xrdb ~/.Xresources". The changes will take effect in the next XTerm that you open.

My current $HOME/.Xresources looks like this:

$ cat ~/.Xresources

xterm*termName: xterm

xterm*font: 6x13

xterm*faceName: 6x13

xterm*faceSize: 10

xterm*saveLines: 4096

xterm*cursorBlink: true

xterm*cursorOffTime: 300

xterm*cursorOnTime: 300

xterm*cursorUnderLine: true

xterm*dynamicColors: true

xterm*utf8: 0

xterm*fastScroll: true

xterm*Background: #000000

xterm*Foreground: #FFFFFF

xterm*metaSendsEscape: true

Xft.antialias: Post too long. Click here to view the full text.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 0efbde61c878d77⋯.png (24.07 KB,933x200,933:200,3dc0cab7.png)

 No.25 [Open thread]

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: eb6c530ea947b99⋯.png (44.17 KB,200x200,1:1,6c196bd1.png)

 No.24 [Open thread]

If you ever want to use another Operating System without having to reboot into it, for example, you should try using a virtual machine.

In this thread, I'll be talking about VirtualBox. I installed four packages in total. Three from SlackOnly (pre-compiled) and one from SlackBuilds (I built it myself).

https://packages.slackonly.com/pub/packages/14.2-x86_64/system/virtualbox/

https://packages.slackonly.com/pub/packages/14.2-x86_64/system/virtualbox-addons/

https://packages.slackonly.com/pub/packages/14.2-x86_64/system/virtualbox-extension-pack/

https://slackbuilds.org/repository/14.2/system/virtualbox-kernel/

Those four worked fine here on a full Slackware64 14.2 installation.

I'm not going to get into the details of how to use VirtualBox. The VirtualBox Manual (https://www.virtualbox.org/manual/) should be a good reference if you're beginning to use VirtualBox.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: d0779013ce58e4f⋯.png (5.62 KB,809x270,809:270,9a01dfb1.png)

 No.21 [Open thread]

Trying to send the output of youtube-dl + Twitch through mpv didn't work me. The cache keeps zeroing out, no matter the youtube-dl or mpv options that I used. In order to fix this, the best alternative that I found was to snatch the .m3u8 and use mpv from there. Below are the commands.

This works horribly (do not use it):

$ youtube-dl -f 720p -o - 'https://www.twitch.tv/monstercat' | mpv -

Now let's do it the right way. First let's check the quality options for any given stream:

$ youtube-dl -F 'https://www.twitch.tv/monstercat'

Then I chose 720p quality but added a "-g":

$ youtube-dl -f 720p -g 'https://www.twitch.tv/monstercat'

Then copy/paste the output using mpv:

$ mpv https://video-weaver.slc01.hls.ttvnw.net/v1/playlist/CokDQvdLXkvrpe8AaYXXNdyXRrHvlRjY0hxeG3DOwRZeNiffMPKrDrMY-Uj3-TolDdE7SBsEzi2DJS-Iu_PgAc65aQ3ABGAXFW4THfYWlPJBExo5Wq1vIeU8KSGBdrBU6cPP2GGO7f7QiPvUmeKJAL0iJnDnpOCcr1O5G4O0ue30evMBTjwOMtmNZJJP92v5PmHL2WHgT4qqoUlvB4roafDgPePTrVj2dXxZLMHpSp0jGSbLa2p6lp7SlvwmqHzVDq8lBkeTius5KiXAxcafp1PzvN0bM-AVr7nLmExJY2s_vqQYyM8tt6RQRkuUGmVK_esy1Ne2pDho-ZVTeH933yhwyWywH2JjIQeuPCHt07Pu6cMhBolKEt-A18bii2Rhv18wJTsDzahWwDu-PETPost too long. Click here to view the full text.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 7609d2a3390906d⋯.png (46.07 KB,897x153,299:51,03650f0b.png)

 No.20 [Open thread]

As promised, here is how you can watch videos from YouTube or Twitch, by combining youtube-dl + mpv.

You should read the previous post on how to use youtube-dl.

YouTube:

$ youtube-dl -f 22 -o - 'https://www.youtube.com/watch?v=fauJ0JQJNM0' | mpv - (if you want to choose the quality)

$ youtube-dl -o - 'https://www.youtube.com/watch?v=fauJ0JQJNM0' | mpv - (if you want to use the best quality detected by youtube-dl)

Those commands will pass the output through mpv instead of saving the file.

More information here: https://www.reddit.com/r/linux/comments/3un9pj/streaming_twitch_through_youtubedl/

Easy, fast and no browser exploits to deal with.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 7609d2a3390906d⋯.png (46.07 KB,897x153,299:51,03650f0b.png)

 No.19 [Open thread]

This thread is about youtube-dl. What is youtube-dl?

youtube-dl is a command-line program to download videos from YouTube.com and a few more sites.

I used SlackOnly's youtube-dl package on a full Slackware 14.2 installation. No extra dependencies required.

https://packages.slackonly.com/pub/packages/14.2-x86_64/network/youtube-dl/

It isn't a new version, but so far it has worked flawlessly on YouTube and Twitch.

The instructions for a straight installation are here: http://rg3.github.io/youtube-dl/download.html

But the way I did it (updated) is like this:

1. $ curl -L 'https://yt-dl.org/downloads/latest/youtube-dl'

2. $ sudo mv youtube-dl /usr/local/bin/

3. $ sudo chown root:root /usr/local/bin/youtube-dl

4. $ sudo chmod 755 /usr/local/bin/youtube-dl

5. $ hash -r (this is necessary so that youtube-dl is located if you removed the youtube-dl slackonly package)

Examples for YouTube (How I do it):

$ youtube-dl -F 'https://www.youtube.com/watch?v=fauJ0JQJNM0'

Choose the format that you want. The one on the bottom (22) is also the "(best)".

$ youtube-dl -f 22 'https://www.youtube.com/watch?v=fauJ0JQJNM0'

The video will be downloaded to your current directory.

Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at


File: 892223e6feeecb1⋯.png (58.29 KB,270x270,1:1,3db97610.png)

 No.15 [Open thread]

One of the scripts I've used a lot in the past is chcase. I still use it to this day, but with less frequency.

It is a perl script for renaming files. Slackware comes with "rename" if you want something else.

http://www.primaledge.ca/chcase.html

eval 'exec perl $0 ${1+"$@"}'
if 0;
# don't modify below here
#-------------------------
$VERSION='2.0';
# chcase 2.0
# Changes case of filenames
# http://www.primaledge.ca/chcase.html
# supermike, at primaledge daut ca
#

use Getopt::Std;
use Cwd;
use File::Basename;

sub HELP_MESSAGE {
print<<EOT;

chcase $VERSION
USAGE:
chcase [-terdlouCcqn] [-x '<perl exp>'] FILE...

-t : Test mode (don't actually rename any files)
-e : Print examples
-r : Rename recursively
-d : Also rename directories
-l : Rename & follow symbolic links (default is not to)
-o : Overwrite if file exists
-u : Change to uppercase (default is lower)
-C : Capitalize each word
-c : Capitalize first character only
-q : Quiet mode (no output)
-n : No escape characters (for bold/inverse output)
-x '<perl exp>' : Perl expression to operate on filename
like s/// or tr/// (you need the quotes)
case of filename not changed when this option used

EOT
exit;
}

sub EXAMPLES() {
print<<EOT;

chcase $VERSION
EXAMPLES:
\$ chcase My.DOC *.JPG /tmp/FileName.txt
=> files are changed to lowercase

\$ chcase -rdt .
=> show what would happen if we renamed all files and sub dirs
r
Post too long. Click here to view the full text.
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
Post last edited at

 No.16

Very nice.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

 No.18

>>16

You're welcome! :)

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



Delete Post [ ]
[]
[1] [2] [3]
| Catalog | Nerve Center | Random
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]