1) Upgrade kernel higher than 5.15.76 because TigerLake drivers added to the kernel after that.
2) With non-free drivers of nvidia
2-a) if kernel is 6.x family add ibt=off to the kernel parameters within grub config and run update-grub
2-b) if hybrid mode runs with nvidia-prime then intel becomes primary monitor. So you cannot reach the HDMI output. To fix this you must set prime mode to nvidia.
This project helps this on Manjaro:
--> envycontrol
Here is to step by step how to create an ssh tunnel and bind browser on it:
1) Create a tunnel by using SSH Dynamic Port Forwarding
ssh -q -C -N -D 9001 user@166.167.168.169 -p 2525&
-q: quiet
-C: compress
-D: Dynamic port (this will set our connection as socks proxy)
-N: tells ssh not to try reading a command from standard input which, being connected to /dev/null, would return EOF and thereby terminate the tunnel immediately.
& : means send process to background and bind the process to init (not ssh spesific)
Note: You must put this shell piece into a bash file and autostart with your desktop if you want to stay connected all the time
Now we have a socks proxy running on our local machine.
2) Now it is time to configure your browser:
You can connect to local socks server by adding a socks proxy in your browser's proxy configuration but i dont prefer that always. So I prefer to use that plugin to connect my server whenever I want.
Here is the link of plugin ->https://chromewebstore.google.com/detail/proxy-switcher/iejkjpdckomcjdhmkemlfdapjodcpgih
Now configure it as below and voila!
journalctl --list-boots
journalctl -b -1
-b -1 means boot logs of -1 index of boot list
sudo journalctl -p 3 -xb
-p 3
means priority err
-x provides extra message information
-b means since last boot
priorities
- journalctl -u nginx.service -u php-fpm.service --since today
e.g.:
--since 09:00 --until "1 hour ago"
- journalctl -k
- journalctl --no-pager
-n and -f works just like in tail
Get disk usage
- journalctl --disk-usage
Compress
- sudo journalctl --vacuum-size=1G
- sudo journalctl --vacuum-time=1years
- sudo mkdir -p /var/log/journal # if you planning to make it persistent to see previous bot logs
- sudo nano /etc/systemd/journald.conf
[Journal]
#Storage=auto # make persistent if you want to keep logs
#Compress=yes
#Seal=yes
#SplitMode=uid
#SyncIntervalSec=5m
#RateLimitIntervalSec=30s
#RateLimitBurst=10000
SystemMaxUse=100M # max size of logs
#SystemKeepFree=
#SystemMaxFileSize=
#SystemMaxFiles=100
#RuntimeMaxUse=
#RuntimeKeepFree=
#RuntimeMaxFileSize=
#RuntimeMaxFiles=100
#MaxRetentionSec=
#MaxFileSec=1month
#ForwardToSyslog=no
#ForwardToKMsg=no
#ForwardToConsole=no
#ForwardToWall=yes
#TTYPath=/dev/console
#MaxLevelStore=debug
#MaxLevelSyslog=debug
#MaxLevelKMsg=notice
#MaxLevelConsole=info
#MaxLevelWall=emerg
#LineMax=48K
#ReadKMsg=yes
#Audit=yes
This simple example creates peewee model from exisiting database table by pwiz module
user@home > python -m pwiz -e mysql -u USER_NAME -H HOST_NAME_OR_IP -p 3306 DB_NAME -t TABLE_NAME
We are creating a worker.py file wihch is our threaded part:
# worker.py
from PyQt5.QtCore import QThread, QObject, pyqtSignal, pyqtSlot
import time
class Worker(QObject):
finished = pyqtSignal()
intReady = pyqtSignal(int)
@pyqtSlot()
def procCounter(self): # A slot takes no params
for i in range(1, 100):
time.sleep(1)
self.intReady.emit(i)
self.finished.emit()
And the main window part which is our main thread running in main.py file
# main.py
from PyQt5.QtCore import QThread
from PyQt5.QtWidgets import QApplication, QLabel, QWidget, QGridLayout
import sys
import worker
class Form(QWidget):
def __init__(self):
super().__init__()
self.label = QLabel("0")
# 1 - create Worker and Thread inside the Form
self.obj = worker.Worker() # no parent!
self.thread = QThread() # no parent!
# 2 - Connect Worker`s Signals to Form method slots to post data.
self.obj.intReady.connect(self.onIntReady)
# 3 - Move the Worker object to the Thread object
self.obj.moveToThread(self.thread)
# 4 - Connect Worker Signals to the Thread slots
self.obj.finished.connect(self.thread.quit)
# 5 - Connect Thread started signal to Worker operational slot method
self.thread.started.connect(self.obj.procCounter)
# * - Thread finished signal will close the app if you want!
# self.thread.finished.connect(app.exit)
# 6 - Start the thread
self.thread.start()
# 7 - Start the form
self.initUI()
def initUI(self):
grid = QGridLayout()
self.setLayout(grid)
grid.addWidget(self.label, 0, 0)
self.move(300, 150)
self.setWindowTitle('thread test')
self.show()
def onIntReady(self, i):
self.label.setText("{}".format(i))
# print(i)
app = QApplication(sys.argv)
form = Form()
sys.exit(app.exec_())
The only connection between worker and main is via emit and pyqtSignal. This is the critical part (çokomelli)
Reference: https://stackoverflow.com/a/33453124
1) Be sure you are a member of the lp group . İf not :
sudo gpasswd -a YOUR_USER lp
then relogin or reboot
2) Then install capt-src from aur
i used yay for it. An be sure cups installed as a dependency of capt-src
yay -S capt-src
sudo pacman -S cups
3) Enable and check cups
systemctl start org.cups.cupsd.service
systemctl status org.cups.cupsd.service
# At this point you must see "active" status without errors as an output.
# If you see some errors that means that you are missing something
# After everything goes well enable the service permenantly
systemctl enable org.cups.cupsd.service
4) Check where is your printer rested. In py pc it is on lp1
ls /dev/usb/lp*
5) Enable and check capt
sudo /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59687 -E
sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp1 # lp1 is our printers port that we checked before
sudo systemctl start ccpd.service
sudo systemctl status ccpd.service # Status must be active without any errors
sudo systemctl enable ccpd.service
6) If everything goes well you must see "Redy to print!" mesage after below lines
captstatusui -P LBP2900
Note: Restarting or relogin is important after you add yourself to the lp group
sudo nano /etc/systemd/system/SERVIS_ADI.service
[Unit]
Description=BASIT_ACIKLAMA
[Service]
ExecStart=KOSACAK_UYGULAMA
[Install]
WantedBy=multi-user.target
# yeni bir dosya olusturdugunuzda veya degistirdiginizde calistrimeniz gerekir.
sudo systemctl daemon-reload SERVIS_ADI.service
# Bilgisayar açılışında otomatik başlatır
sudo systemctl enable SERVIS_ADI.service
# Servisi başlatır
sudo systemctl start SERVIS_ADI.service
# Servisi durdurur
sudo systemctl stop SERVIS_ADI.service
# Bilgisayar açılışında otomatik başlatmasını durdurur
sudo systemctl disable SERVIS_ADI.service
Taiga'nın media urllerini localhost olarak göstermesini önelemek için
taiga-back/settings/local.py >
MEDIA_URL = "http://<your_host>/media/"
olarak yeniden düzenlenmeli