Legenda (oznaczenia używane w postach) czyli lets clean this burdel

Oznaczenia używane w postach

Zwykły tekst Czcionka Georgia

apt-get install -Komenda



-ryzyko uszkodzenia systemu


-skrypt w bashu
-Ważna informacja

=====
wycinek z loga konsoli
====

nano /etc/resolv.conf plik do edycji


czwartek, 7 grudnia 2023

sudoers

 ## sudoers file.

##

## This file MUST be edited with the 'visudo' command as root.

## Failure to use 'visudo' may result in syntax or file permission errors

## that prevent sudo from running.

##

## See the sudoers man page for the details on how to write a sudoers file.

##


##

## Host alias specification

##

## Groups of machines. These may include host names (optionally with wildcards),

## IP addresses, network numbers or netgroups.

# Host_Alias    WEBSERVERS = www1, www2, www3


##

## User alias specification

##

## Groups of users.  These may consist of user names, uids, Unix groups,

## or netgroups.

# User_Alias    ADMINS = millert, dowdy, mikef


##

## Cmnd alias specification

##

## Groups of commands.  Often used to group related commands together.

# Cmnd_Alias    PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \

#                           /usr/bin/pkill, /usr/bin/top

#

# Cmnd_Alias    REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff

#

# Cmnd_Alias    DEBUGGERS = /usr/bin/gdb, /usr/bin/lldb, /usr/bin/strace, \

#                           /usr/bin/truss, /usr/bin/bpftrace, \

#                           /usr/bin/dtrace, /usr/bin/dtruss

#

# Cmnd_Alias    PKGMAN = /usr/bin/apt, /usr/bin/dpkg, /usr/bin/rpm, \

#                        /usr/bin/yum, /usr/bin/dnf,  /usr/bin/zypper, \

#                        /usr/bin/pacman


##

## Defaults specification

##

## Prevent environment variables from influencing programs in an

## unexpected or harmful way (CVE-2005-2959, CVE-2005-4158, CVE-2006-0151)

Defaults always_set_home

Defaults env_reset

## Change env_reset to !env_reset in previous line to keep all environment variables

## Following list will no longer be necessary after this change

Defaults env_keep = "LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS XDG_SESSION_COOKIE"

## Comment out the preceding line and uncomment the following one if you need

                                                                                                                                                                                                 19,1         Góra


wtorek, 29 sierpnia 2023

Wejście do uefi przy fast boot / super fast boot (systemd)


Działa jeśli mamy systemd.

Sprawdzamy, czy mamy systemd?

ps --no-headers -o comm 1

Jeżeli konsola poda: systemd

Wydajemy komendę:

systemctl reboot --firmware-setup

poniedziałek, 17 lipca 2023

slackware post install

su

pass

usermod -aG wheel username

more /etc/group   szukamy czy w grupie wheel jest nasz username

visudo odkomentowujemy wheel group

vim /etc/inittab ustawiamy runlevel   ustawienie graficznego logowania

default id runlevel ustawiamy na 4

zachowujemy plik

vim /etc/slackpkg/mirrors


odkomentowujemy najbliższy nam mirror   UWAGA TYLKO JEDEN

JEŻELI UZYWAMY SLACKWARE STABLE NIE ODBLOKOWYWAĆ CURRENT

zachowujemy plik

Teraz update gpg

slackpkg update

slackpkg install-new

slackpkg upgrade-all

cd /boot/efi/EFI/Slackware

geninitrd

eliloconfig

/usr/share/mkinitrd/mkinitrd_command_generator.sh

skopiuj co wygenerował i odpal


slackpkg clean-system <--- nie usuwamy paczek instalowanych ręcznie

reboot

piątek, 14 lipca 2023

Slackware zarządzanie pakietami

https://sbopkg.org/


ściągamy i instalujemy

installpkg sbopkg-version-noarch-1_wsr.tgz

konfig pod slacware current (jeżeli masz stable 15.0 zignoruj)

/etc/sbopkg/sbopkg.conf

REPO_BRANCH=${REPO_BRANCH:-current}

REPO_NAME=${REPO_NAME:-SBo-git}

następnie uruchom sbopkg z flagą „-r” (zdalna synchronizacja). Jeśli chcesz go używać tymczasowo, mając inne domyślne repozytorium sbopkg -V SBo-git/current -r sbopkg -V SBo-git/current -i my_package_or_queue

(do tąd)

użycie

sbopkg -r odświerza repozytorjum

sqg -p <filezilla> tworzy quene file z zależnościami


sbopkg -i filezilla Both a queuefile and a package were found with the name "filezilla". Use (Q)ueuefile, (P)ackage, or (A)bort?: q

używamy opcji q i mamy paczke zciągniętą z zależnościami

Przy okazji quene files znajdują się w /var/lib/sbopkg/quene

sbopkg -s filezilla pokaże nam readmy z ogromną ilością informacji, w tym zależnościami

żeby odsiać informacje możemy użyc sbopkg -s filezilla | grep -i requires

proste przeszukiwanie sbopkg -g filezilla , pokaże czy i w jakiej gałęzi repo jest pakiet ==================================================================================

 

https://pink-mist.github.io/sbotools/

Zciągamy instalujemy

installpkg pakiet

sboconfig -r https://slackbuilds.org/repository/15.0/

powinno też działać z 

sboconfig -r ftp://ftp.slackware.pl/pub/slackbuilds.org/slackbuilds/15.0
tworzy to /etc/sbotools/sbotools.conf z zawartością

REPO=ftp://ftp.slackware.pl/pub/slackbuilds.org/slackbuilds/15.0

sbosnap fetch zciąga zawartość repo
sbofind pakiet szuka pakietu
sbofind -i pakiet   wyświetla info pakietu
sbofind -r pakiet   wyświetla całe readmi pakietu
sbocheck odświerza repo, i listuje przestarzałe paczki
sboupgrade pakiet  uaktualnia pakiet 
sboupgrade --all uaktualnia wszystko

https://dslackw.gitlab.io/slpkg/

slpkg install <package_name>


or change the repository:

$ slpkg install <package_name> --repository=<repo_name>

You can install a whole repository with the command:


$ slpkg install '*' --repository=<repository_name>

Remove packages

To remove a package with the dependencies:


$ slpkg remove <package_name>

Search for packages

If you want to search a package from all repositories, run:


$ slpkg search <package_name> --repository='*'

Edit configuration

Edit the configuration /etc/slpkg/slpkg.toml file:


$ slpkg configs

For further information, please read the manpage:


Manpage

$ man slpkg





Slackware polonizacja

 Oczywiście najważniejsze to ustawić POLSKI w samym KDE: Menu - Ustawienia systemowe - Kraj/region i język:

1. Sekcja z lewej nr 1 - Kraj/region i język

    Zakładka "Ustawienia regionalne"

       Na górze klikam "zmień" i wybieram: "Polska"

       Na dole klikam przycisk "Dodaj język" i wybieram "Polski"

2. Sekcja z lewej nr 2 - Układ klawiatury

    Zakładka "Układ"

       Zaznaczam: "Włącz układy klawiatury"

       W polu "Model klawiatury" wybieram: "Generic 105-key (Intl) PC"

       Z tej sporej listy krajów pod "Dostępne układy" wybieram "Poland" tak, żeby znalazł się w tym oknie po prawej "Aktywne układy"

Również pliki mam tak poustawiane:


***   /etc/profile.d/lang.sh   ***

  export LANG=pl_PL.UTF-8

  export LC_ALL=pl_PL.UTF-8

  export LESSCHARSET=latin1


***   /etc/rc.d/rc.font   ***

  setfont -v lat2-16.psfu.gz


***   /etc/rc.d/rc.keymap   ***

  /usr/bin/loadkeys -u pl2.map


***   /etc/lilo.conf   ***

  append=" vt.default_utf8=1"


A jak już jesteśmy przy polskich znakach to dodam i to bo niektórzy się gubią:

==========================================================

***   /etc/fstab   ***

#dla ntfs

  /dev/sdg1     /mnt/S_500_C         ntfs-3g     user,auto,rw,umask=113,fmask=113,dmask=002,noexec,locale=pl_PL.utf8   0   0


#dla fat, np.pendrive, odtwarzacz mp3, karta pamięci

  /dev/sdf1     /mnt/usb             auto        user,noauto,rw,umask=113,fmask=113,dmask=002,shortname=winnt,noexec,utf8   0   0



Oczywiście "user" lub "users" - jak to woli ... 

A dla każdej partycji ustawiam atrybut "noexec" żeby mi się coś samo nie uruchomiło bez mojej wiedzy.

Tylko partycja "/" czyli systemowa ma taką możliwość ale tam nic się bez "roota" nie znajdzie :)


***   /etc/fstab   ***

  /dev/sda6     /home                ext4        defaults,noexec                1   2

===================================================

żródło https://forum.linux.pl/index.php?topic=16758.0

czwartek, 6 lipca 2023

Use virt-manager as a non-root user on Linux

ByJosphat Mutai-December 17, 20211271904

Hello all. I’ve been using KVM for a long time now. Every time I try to use virt-manager as a non-root user, I have to enter the sudo password. This ain’t a problem but if you use virt-manager most of the times, it can be boring and irritating.


For KVM installation, refer to our guides below.

How to install KVM on RHEL/CentOS 8, Fedora, Arch Linux, CentOS, Ubuntu/Debian, SLES

I’ll show you a simple way to use virt-manager as a non-root user, by just creating a libvirt group and adding a standard user account to it. Without wasting much time, let’s dive in.

To use virt-manager as a non-root user, follow steps below:


Step 1 – Create unix group to use

First check if group already exist, if not create it

sudo getent group | grep libvirt

Some distributions may be using libvirtd.


sudo getent group | grep libvirtd

If it doesn’t exist, add it as system group.


sudo groupadd --system libvirt

Step 2 – Add user account to the libvirt group

Now that the group is available, add your user account to the group.


sudo usermod -a -G libvirt $(whoami)

newgrp libvirt

Verify that user is added to libvirt group.


$ id $(whoami)

uid=1000(jmutai) gid=1000(jmutai) groups=1000(jmutai),998(wheel),992(kvm),988(storage),968(libvirt),108(vboxusers)

Step 3 – Edit libvirtd configuration file to add group

Open the file /etc/libvirt/libvirtd.conf for editing.


sudo vim /etc/libvirt/libvirtd.conf

Set the UNIX domain socket group ownership to libvirt, (around line 85)


unix_sock_group = "libvirt"

Set the UNIX socket permissions for the R/W socket (around line 102)

unix_sock_rw_perms = "0770"

Restart libvirt daemon after making the change.


sudo systemctl restart libvirtd.service

Check service status.


$ systemctl status libvirtd.service    

 ● libvirtd.service - Virtualization daemon

    Loaded: loaded (/usr/lib/systemd/system/libvirtd.service; enabled; vendor preset: disabled)

    Active: active (running) since Fri 2019-04-19 08:48:13 EAT; 1h 16min ago

      Docs: man:libvirtd(8)

            https://libvirt.org

  Main PID: 31709 (libvirtd)

     Tasks: 26 (limit: 32768)

    Memory: 64.7M

    CGroup: /system.slice/libvirtd.service

            ├─  754 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>

            ├─  755 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leases>

            ├─  777 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/docker-machines.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─  778 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/docker-machines.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25924 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/vagrant-libvirt.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25925 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/vagrant-libvirt.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvir>

            ├─25959 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/fed290.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leasesh>

            ├─25960 /usr/bin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/fed290.conf --leasefile-ro --dhcp-script=/usr/lib/libvirt/libvirt_leasesh>

            └─31709 /usr/bin/libvirtd

Step 4 – Launch virt-manager

Start Virtual Machine Manager from the command line or your Start menu.


$ virt-manager

You should be able to create a VM without getting a permission error.


use virt manager non root user

You should be able to use virt-manager as a non-root user. If not, try to read your libvirtd.conf file to see the relevant sections to modify.


Conclusion

We’ve covered how to use virt-manager as a non-root user in easy to follow steps. You may have to install KVM virtualization package group to get tools including virt-manager.


środa, 7 czerwca 2023

Rise of a tomb rider crash sigsev 11

 Ok, I finally solved it. This is how I did it:

(1) echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
(2) export STEAM_RUNTIME_PREFER_HOST_LIBRARIES=1 (This is important, you have to set that environment to 1)
(3) LD_PRELOAD='/usr/$LIB/libpulse.so.0 /usr/$LIB/libpulse-simple.so.0 '${LD_PRELOAD}
(4) steam&
(5) Start Rise of the Tomb Raider


Believe it or not after a lot of digging on the internet, at least in my case fedora the issue is that there is no executable pulseaudio available, it happens on modern systems that use pipewire (see https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/562).
Summmary:
- Check if there is a executable pulseaudio in the path
- if not then:
touch /usr/local/bin/pulseaudio
chmod 755 /usr/local/bin/pulseaudio

Edit the file /usr/local/bin/pulseaudio and write (yes it does nothing):

#!/bin/sh

exit 0

And done, the game starts.
systemctl --user unmask pulseaudio

Disable the pipewire-pulse service:

systemctl --user --now disable pipewire-pulse

Re-enable the PulseAudio services:

systemctl --user --now enable pulseaudio.service pulseaudio.socket

Instalacja z sida na innej gałęzi

 1. odpowiedni apt pinning
2. wpis w sources.list 

sudo apt-get -t sid install audacity

poniedziałek, 5 czerwca 2023

Zmiana aplikacji domyślnych

 https://bbs.archlinux.org/viewtopic.php?id=266054

xdg-mime query default inode/directory

xdg-mime default pcmanfm.desktop inode/directory

czwartek, 1 czerwca 2023

Dodanie sprawdzania pisowni w brave -browser

 1.Zainstaluj chrome.
2.Włącz potrzebne słowniki w chrome
3. zamknij chrome -otwórz chrome - zamknij chrome
4.cp ~/.config/google-chrome/Dictionaries/*.bdic ~/.config/BraveSoftware/Brave-Browser/Dictionaries/ 5. Można odinstalować chrome