Fadak.IR Fadak Solutions
English Русский العربية فارسی
Articles Management Studies Language


/ Coumputer / Linux

Linux Tutorial & Debian Tutorial


      APT Settings
         Install/Uninstall . deb files
         autoclean vs autoremove vs clean
      Autostart
      Search in Packages:
      Convert Image(Photo) by ImageMagick
      Search files and folders in Linux
          VI
         How install Repository
      Hardware information
      insmod
      Commandline in Grub
      Remove Old Unused Kernels on Debian and Ubuntu
      Debian & ubontu
      How to Autorun application at the start up in Linux
      How install and run application in linux
      Eject / safely remove vs umount
      *.ISO
      Compress
      Automatically Mount USB Drives On Ubuntu Or Debian Server ...(fstab)
      Anki
      Packages in debian
      Installing and Removing software - Debian
      How install offline debian
      Affairs Than Debian After Install
      Night Mode
         Hidden shade in xfce
      Mousewheel
      Network
         nmcli
         gammu
         Install Modem DLink
      Call time
      festival --tts
      cron
         xfce4-power-manager - Panel Plugin
         Settings Keyboard
      udisksctl
         VNC
         MYSQL & PHP & Apache
         Restart services in linux(debian)
         Samba
      systemctl
      Android
      OCR
      PDF
         Compress PDF
         pdftotext
         Split PDF file
         Join PDF file
         Convert PDF to JPG
         Convert JPG to PDF
      Computer Application (Application software)
         Devive Manager
         winefile
         Translate
         Office
         Religion
         LibreOffice
         Midori
         SSH
         Telnet
         Geany
         rsync
         crontab
         Dolphin
      20 Best FREE YouTube Playlist Downloader Online (2020)
      Best Image Viewers for Linux
      Other
      Xfce
         xfconf
         Thunar
      PATH
      XFCE
      Modem
         mmcli
         gammu
      nodm Display manager (desktop login screen)
         Terminal
      NTFS Partition Repair and Recovery In Linux
      Link
      Speaking Clock
      cron
         Project Management Software(مدیریت پروژه)
         Telegram linux
      Run Two or More Terminal Commands at Once in Linux
         How to check the health of a hard drive
         df
         dd
         Format Hard
         ISO
         عدم استفاده از تمام ظرفیت سی پی یو
      Virtualization
      How to Set or Change Timezone
         Flash Player
         UGET
      Backup and Restore
         64 bits/amd64 Skype
         sudoers
      Kill a Application or Process
      Activate tap to click on touchpad?
         How to Run Two or More Terminal Commands at Once in Linux
      Loop
      Bootable USB From an ISO
      MPV

APT Settings

# mkdir /media/usb
# mount -t auto /dev/sdb1 /media/usb
sudo echo 'dir::cache::archives /media/pi/Drive/apt/arm/;\nBinary::apt::APT::Keep-Downloaded-Packages "true";' >> /etc/apt/apt.conf
rm /etc/apt/sources.list
#echo "deb http://mirror.yandex.ru/debian testing main contrib non-free deb http://mirror.yandex.ru/debian stable main contrib non-free deb http://www.deb-multimedia.org sid main non-free #deb http://mirror.yandex.ru/debian stable main #deb http://www.deb-multimedia.org wheezy main non-free" >> /etc/apt/sources.list
echo "deb http://mirror.yandex.ru/debian testing main contrib non-free" >> /etc/apt/sources.list
echo "deb http://www.deb-multimedia.org testing main non-free" >> /etc/apt/sources.list
#cp -v /media/usb/apt/varaptlists/* /var/lib/apt/lists/
#cp -v /var/lib/apt/lists/* /media/z/Files/apt/varaptlists/
dpkg --add-architecture i386
apt update
apt dist-upgrade
apt upgrade
ifconfig wlp2s0 up
iwconfig wlp2s0 essid Ali
dhclient wlp2s0
#ifconfig
#apt dist-upgrade
wlan0

Latex - Debian Wiki

Debian -- List of sections in "bullseye"

Install/Uninstall . deb files

How to extract a .deb file without opening it on Debian or Ubuntu Linux - nixCraft

Building a Debian (`.deb`) source package, and publishing it on an Ubuntu PPA – Saverio Miroddi – 64K RAM SYSTEM  38911 BASIC BYTES FREE

lxsplit_0.2.4-1_i386

https://itsfoss.com/install-deb-files-ubuntu/

ex. install skype

https://repo.skype.com/latest/skypeforlinux-64.deb

http://www.skype.com/go/getskype-linux-deb

autoclean vs autoremove vs clean

-    clean: clean clears out the local repository of retrieved package files. It removes everything but the lock file from /var/cache/apt/archives/ and /var/cache/apt/archives/partial/. When APT is used as a dselect(1) method, clean is run automatically. Those who do not use dselect will likely want to run apt-get clean from time to time to free up disk space.

-    autoclean: Like clean, autoclean clears out the local repository of retrieved package files. The difference is that it only removes package files that can no longer be downloaded, and are largely useless. This allows a cache to be maintained over a long period without it growing out of control. The configuration option APT::Clean-Installed will prevent installed packages from being erased if it is set to off.

https://www.howtoforge.com/how-to-install-vnc-server-on-debian-11/

Autostart

Add an autostart application for all users

  1.     Create a .desktop file in the /etc/xdg/autostart/ directory:
        [Desktop Entry]
        Type=Application
        Name=Files
        Exec=nautilus -n
        OnlyShowIn=GNOME;
        AutostartCondition=GSettings org.gnome.desktop.background show-desktop-icons
  2.     Replace Files with the name of the application.
  3.     Replace nautilus -n with the command you wish to use to run the application.
  4.     You can use the AutostartCondition key to check for a value of a GSettings key.
    The session manager runs the application automatically if the key's value is true. If the key's value changes in the running session, the session manager starts or stops the application, depending on what the previous value for the key was.

ex. /etc/xdg/autostart/blueman.desktop

Add an autostart application for a user

~user/.config/autostart/

Search in Packages:

FrontPage - Debian Wiki

Debian -- Packages

Debian -- Package Search Results -- tesseract-ocr-engf

Convert Image(Photo) by ImageMagick

Convert to Gray

for file in *.jpg; convert -colorspace Gray $file $file; end;
convert test.png -fx '(r+g+b)/3' -colorspace Gray gray_fx_average.png
convert -set colorspace Gray -separate -average

Cut From Right

convert -gravity East -chop 86x0 $filenameall.jpg $filenameall.jpg

Cut From Bottom

 convert -gravity South -chop 0x40 $filenameall.jpg $filenameall.jpg

Search files and folders in Linux

Search Tools
ripgrep Recursively search directories for a regex pattern
fzf Command-line fuzzy finder for your shell
peco Interactive filtering tool
McFly Navigate through your shell history
catfish Versatile search GUI powered by locate and find
FSearch Fast file search utility based on GTK+3
ANGRYsearch Like FSearch, a search tool inspired by Everything Search Engine

Flocate

Before I started working on Flocate I took a look at all the existing solutions I found (MATE Search Tool (formerly GNOME Search Tool), Recoll, Krusader (locate based search), SpaceFM File Search, Nautilus, ANGRYsearch, Catfish, ...) to find out whether it makes sense to improve those, instead of building a completely new application. But unfortunately none of those met my requirements

FSearch

GitHub - cboxdoerfer/fsearch: A fast file search utility for Unix-like systems based on GTK3

Install package home:cboxdoerfer / fsearch

Add in file: /home/m/.config/fsearch/fsearch.conf

[Applications]
folder_open_cmd=./sh/thunar.sh -select {path_full}

 

Before I started working on FSearch I took a look at all the existing solutions I found (MATE Search Tool (formerly GNOME Search Tool), Recoll, Krusader (locate based search), SpaceFM File Search, Nautilus, ANGRYsearch, Catfish, ...) to find out whether it makes sense to improve those, instead of building a completely new application. But unfortunately none of those met my requirements:

GitHub - cboxdoerfer/fsearch: A fast file search utility for Unix-like systems based on GTK+3

$ sudo apt install git build-essential automake autoconf libtool pkg-config intltool autoconf-archive libpcre3-dev libglib2.0-dev libgtk-3-dev libxml2-utils
$ git clone https://github.com/cboxdoerfer/fsearch.git
$ cd fsearch
$ ./autogen.sh
$ ./configure
$ make && sudo make install

ANGRYsearch

GitHub - DoTheEvo/ANGRYsearch: Linux file search, instant results as you type

8 Most Awesome Quick File Searching Tools for Linux Desktop

اضافه کردن به برنامه‌ها

Make a .desktop file in ~/.local/share/applications/ for your application with a text editor. If done right, this will cause an entry in the main menu, and supply the needed information to the system to run it.

File name looks like:

.desktop [ex: leafpad.desktop]


Example: (replace <...> with appropriate content)

Code:

[Desktop Entry]
Type=Application
Icon=
Name=
Comment=
Categories=


Exec=
Path=
StartupNotify=true
Terminal=false

There are numerous possible keys. All the specifications are here to study:

http://standards.freedesktop.org/des...est/index.html

More .desktop files to see are in /usr/share/applications, but those are for all users.

Fuzzy finder

GitHub - junegunn/fzf: A command-line fuzzy finder

Catfish

catfish --fileman=nautilus --path=/ --hidden --method=locate
sudo geany /usr/lib/python3/dist-packages/catfish/CatfishWindow.py

for dolphin or nautilis edit with this lines

if self.get_exo_preferred_file_manager() == "nautilus":
command = ['nautilus', '--select', self.selected_filenames[0]]
elif self.get_exo_preferred_file_manager() == "dolphin":
command = ['dolphin', '--select', self.selected_filenames[0]]
else:
command = ['exo-open', '--launch', 'FileManager', filename]
else:
command = ['xdg-open', filename]

Catfish for thunar

#self.thunar_display_path(filename)
os.popen('dbus-send --type=method_call --dest=org.xfce.Thunar /org/xfce/FileManager org.xfce.FileManager.DisplayFolderAndSelect string:"'+os.path.dirname(filename)+'" string:"'+os.path.basename(self.selected_filenames[0])+'" string:"" string:""')

sudo geany /usr/share/applications/org.xfce.Catfish.desktop
Exec=/usr/bin/catfish --method=locate --path=/ --hidden %f

Add follow line after this «self.settings.get_setting("exclude-paths"))»

if self.options.method == 'locate': self.search_engine = CatfishSearchEngine(['locate'],self.settings.get_setting("exclude-paths"))

Add in this file /usr/lib/python3/dist-packages/catfish/__init__.py

sudo geany /usr/lib/python3/dist-packages/catfish/__init__.py

parser.add_option('', '--method', help=_("Set the default search method ex. 'zeitgeist' or 'locate' or 'walk'"))

Catfish for Thunar

dbus-send --type=method_call --dest=org.xfce.Thunar /org/xfce/FileManager org.xfce.FileManager.DisplayFolderAndSelect string:"/home/m/.clamtk/" string:"prefs.txt" string:"" string:""

How can I open thunar so that it selects specific file? - Unix & Linux Stack Exchange

Thunar - ArchWiki

Find

Locate

/etc/fstab
for edit config in locate This file:
/etc/updatedb.conf
for update indexing this file:
# updatedb

7 Practical Linux Locate Command Examples – mlocate and updatedb
Linux Locate Command for Beginners (8 Examples)
GitHub - ehoppmann/mlocate-web: Very simple file search web interface with a locate / mlocate backend
updatedb & locate command problem - Files from external hard drive are no longer indexed after rebooting - Ask Ubuntu
FindingFiles - Community Help Wiki
debian squeeze - How can I view updatedb database content, and then exclude certain files/paths? - Server Fault

Grep

Although grep command is not a tool for directly searching files (its instead used to print lines matching a pattern from one or more files), you can employ it to locate files. Assuming you know a phrase in the file(s) you are looking for or you are looking for a file that contains a particular string of characters, grep can help you list all files that contain a particular phrase.
For example, if you are looking for a README.md file which contains the phrase “An assortment”, which you suspect should be somewhere in your home directory, possibly in ~/bin, you can locate it as shown.
$ grep -Ri ~/bin -e "An assortment"
OR
$ grep -Ri ~/bin/ -e "An assortment" | cut -d: -f1

Recoll

 

 VI

Key insert and change text then type ":wq"
Shourtkey in Terminal
Shift + PageUp
Shift + Pagedown
Alt + <
Alt + >

How install Repository

# yum install epel-release or yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# yum install http://download.virtualbox.org/virtualbox/rpm/rhel/virtualbox.repo
# yum install ntfs-3g ntfsprogs
yum install gimp simple-scan vlc geany wine ffmpeg clamav thunderbird xchat kdepim
default-jre
Пакет rsync-3.0.9-17.el7.x86_64 уже установлен, и это последняя версия.
Пакета с названием qalculate-gtk не найдено.
# yum install http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm

Hardware information

$ lscpu

lshw

lspci -v | grep "VGA" -A 12

lsusb

lshw -short

df

sudo fdisk -l

mount | column -t

insmod

cp '/media/m/Sharing/m/DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz' /home
ls
tar -xf DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz
mount /dev/sr0 /mnt
cp '/mnt/DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz' /home
insmod
apt install insmod
ls /lib/modules/$(uname -r)/kernel
apt install tree
lsmod
modprobe
/lib/modules/$(uname -r)
adduser m sudo
cd /
cd sbin
insm
apt install kmod

Commandline in Grub

GNU GRUB Manual 2.04

Grub GUI

sudo apt install grub-customizer

How To Configure GRUB2 Boot Loader Settings

Backup
sudo cp /etc/default/grub /etc/default/grub.bak
Config
sudo nano /boot/grub/grub.cfg
Setting
sudo nano /etc/default/grub

GRUB_DEFAULT="Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 5.10.0-2-amd64"
GRUB_TIMEOUT="1"
Update
sudo update-grub

How Boot Windows through Grub

set root='hd0,msdos1'
chainloader +1

How Boot Windows through Grub

chainloader (hd0,1) +1

boot

insmod chain
insmod ntfs
set root=(hd0,1)
chainloader +1

If the os-prober method above doesn't work try to add a custom grub menu entry
documented here edit the /etc/grub.d/40_custom file
menuentry "Windows 7" {  
     insmod ntfs  
     set root='(hd0,1)'  
     search --no-floppy --fs-uuid --set a3f1ea41fc67a3f1  
     chainloader +1  
}

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
sudo gedit /boot/grub/menu.lst

Append the following lines at the end of file
title        Microsoft Windows
root        (hd0,0)
savedefault
makeactive
chainloader    +1

 parttool (hd0,1) hidden-
parttool (hd0,2) hidden+
set root=(hd0,1)
chainloader +1
parttool ${root} boot+
boot

drivemap -s (hd0) (hd1)

 /boot/grub/grub.conf

grub2 - How do I change the GRUB boot order? - Ask Ubuntu

Remove Old Unused Kernels on Debian and Ubuntu

$ sudo apt remove --purge linux-image-4.4.0-21-generic
$ sudo update-grub2
$ sudo reboot

Debian & ubontu

Help Text:

http://linux.die.net/man/8/apt

https://www.debian.org/doc/books

http://debianworld.ru/

https://help.ubuntu.com/community/FuseIso

http://askubuntu.com/

 

How to Autorun application at the start up in Linux

Purpose
This article describes how to automatically start an application during or after boot of a Colibri module running Embedded Linux.
Daemons
You can easily start your scripts or applications as daemons.
A daemon is an application that runs as a "background" process (without a terminal or user interface).
Systemd
Starting with V2.x of our Linux BSP we use systemd as our init and service manager.
systemd is a system and service manager for Linux, also capable of replacing the traditional SysV init system.
http://www.freedesktop.org/wiki/Software/systemd/
http://www.freedesktop.org/software/systemd/man/systemd.html
A unit configuration file whose name ends in .service encodes information about a process controlled and supervised by systemd.
Service files can be found in /etc/systemd/system/ and, for distribution provided ones in /lib/systemd/system/. Services can be started or permanently enabled using the systemctl command.
The common configuration items are configured in the generic "[Unit]" and "[Install]" sections. The service specific configuration options are configured in the "[Service]" section.
Service files must include a "[Service]" section, which carries information about the service and the process it supervises.
For more information on options of [Service] section refer to: http://www.freedesktop.org/software/systemd/man/systemd.service.html#Options
Procedure
Create a unit configuration file ending in .service
Copy the unit configuration file to "/etc/systemd/system" and use the systemctl tool for starting or permanently enabling the service.
Using the systemctl command
From: http://www.freedesktop.org/software/systemd/man/systemctl.html
Reload the systemd configuration and unit files:
root@colibri-t20:~# systemctl --system daemon-reload
Check status, start and stop a service, valid until next reboot:
root@colibri-t20:~# systemctl status .service
root@colibri-t20:~# systemctl start .service
root@colibri-t20:~# systemctl stop .service
Add a service to or remove it from the ones started at boot. Note that this neither starts or stops the service but takes only effect during the next boot:
root@colibri-t20:~# systemctl enable .service
root@colibri-t20:~# systemctl disable .service
Example unit configuration file to automatically execute the (hypothetical) mydatalogger application at start up:
[Unit]
Description=mydatalogger service, collects and logs data in the background
After=multi-user.target
 [Service]
Type=simple
ExecStart=/usr/bin/mydatalogger
 [Install]
WantedBy=multi-user.target
 Shells
/etc/profile
Each time a login shell is spawned the script /etc/profile plus all scripts in /etc/profile.d are executed. This is done for logins over a serial line, over an ssh connection and also for logins in the display manager to a graphical desktop.
/etc/profile is sourced upon login: it sets up the environment upon login and application-specific settings by sourcing any readable file in /etc/profile.d/.
Using /etc/profile is well suited to set the environment or to do some small tasks. Note that these scripts must return control in order to continue with the login.
Remove the file /etc/profile.d or the additions to /etc/profile in order to undo the automatic execution.
    Procedure
Add a script file in /etc/profile.d/*.sh.
Example script file:
#!/bin/sh
#script file for deleting backup entries
rm /home/root/*~
Graphical
You can start applications automatically when you login into your Window Manager or Desktop Environment.
The lxsession session manager can start applications when the graphical environment is started. This can be achieved in two ways:
- A lxsession specific way in which the entries in the files /etc/xdg/lxsession/LXDE/autostart and in ~/.config/lxsession/LXDE/autostart are parsed.
- A generic way which many session managers support. Files in the folders /etc/xdg/autostart/ and ~/.config/autostart/ ending in .desktop get parsed and if applicable the application described therein is started.
http://wiki.lxde.org/en/LXSession
LXSession Autostart file
Edit /etc/xdg/lxsession/LXDE/autostart or ~/.config/lxsession/LXDE/autostart. Add the application to a new line in the file. If you want that your application gets restarted should it get terminated abnormally, precede the application name with a @.
e.g at @lxterminal to /etc/xdg/lxsession/LXDE/autostart
@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@lxterminal
Note that this file is not a shell script and therefore shell acrobatics like redirectors and pipes are not allowed. If required this can be worked around by spawning a custom shell script which in turn can support the full shell feature set.
.desktop files
Creating a .desktop file.
Adding the .desktop file to autostart.
http://standards.freedesktop.org/desktop-entry-spec/latest/
Note that in /usr/share/applications/ a number of .desktop files already exists which can be copied into the autostart folder
For Example:
If you want to execute lxterminal automatically at startup.
Create a terminal.desktop in /etc/xdg/autostart/ .
Add some keys like:
    [Desktop Entry]. (Must be the first line of every desktop file and is the section header to identify the block of key value pairs associated with the desktop. Necessary for the desktop to recognize the file correctly.)
    Name of the application.(The name of the Desktop Entry group - should be unique on the system )
    Type of the application. (Possible values are "Application", "Link" or "Directory".)
    Exec filename of the application plus optionally arguments.
    Terminal (Describes whether the application should run in a terminal.)
File content with the entries should be as follows:
[Desktop Entry]
Name=LXTerminal
Type=Application
Exec=lxterminal
Terminal=false
Save the .desktop file.
Note: A graphical file manager will list .desktop files not with their file name but rather with the value of the key "Name". e.g. in the example above "LXTerminal".
To disable the automatic start of an application, just either remove the respective .desktop file from /etc/xdg/autostart/ and/or .config/autostart/ or add the key NotShowIn=LXDE; to the desktop file. Alternatively use the graphical front end 'LXDE Menu'/Preferences/'Desktop Session Settings' and untick the 'Enabled' checkbox.

How install and run application in linux

1. Unpack the archive.
2. To build catfish run
      ./configure
      make
3. To install catfish run either
      (sudo) make install
   or
      (sudo) checkinstall
4. For a list of command line options run
      catfish --help
5. To create a distributable package of catfish run
      make deb

if we have file with extension .sh:

# sh namefile.sh

before name file "sh"

Eject / safely remove vs umount

Eject USB drives / eject command

The best way to unplug a USB external hard-drive, after proper unmounting, is:
udisksctl power-off -b /dev/sdb
or
udisks --detach /dev/sdb

udisks --detach /dev/sdX

So is not the same unmount, eject and detach
udisks = power off the usb
umount = just unmount the partition not the whole pendrive
eject = the same or very close to umount command

eject(1): eject removable media - Linux man page

command line - Eject / safely remove vs umount - Unix & Linux Stack Exchange

*.ISO

Create ISO

# genisoimage -o %f.iso -V BACKUP -R -J %f

Mount ISO

# udisksctl loop-setup -f %f

 

Disk Image Mounter:

# sudo apt install gnome-disk-utility

Compress

A Quick Benchmark: Gzip vs. Bzip2 vs. LZMA

mountavfs
fuse-zip is an option and claims to be faster than the competition.
# fuse-zip -r archivetest.zip /mnt
archivemount is another:
# archivemount -o readonly archivetest.zip /mnt

Automatically Mount USB Drives On Ubuntu Or Debian Server ...(fstab)

fstab - Debian Wiki

# df

fstab

UUID=5C802232802212D6 /media/mahdi/Sharing ntfs rw,auto,users 1 1
#UUID=5C802232802212D6 /media/mahdi/Sharing ntfs rw,auto,users,exec,nls=utf8,umask=003,gid=46,uid=1000 0 0
#UUID=/dev/disk/by-uuid/5C802232802212D6 /media/mahdi/Sharing1 ntfs nosuid,nodev,nofail,x-gvfs-show 0 0

Auto Mount

fstab - Debian Wiki
AutoFs Debian Wiki
http://superuser.com/questions/646249/automatically-mount-a-2nd-hard-drive-in-debian-7
http://unix.stackexchange.com/questions/72393/mounting-all-partitions-on-hard-disk-automatically-on-linux-mint

Anki

Anki - powerful, intelligent flashcards

Add-ons for Anki 2.1 - AnkiWeb

Shared Decks - AnkiWeb

Packages in debian

algobox
anki
apt
aria2
ark
artikulate
aspell-en
aspell-fa
aspell-ru
autoconf
autoconf-archive
autofs
automake
backintime-common
backuppc
bittorrent-gui
blender
blueman
breeze-icon-theme
build-essential
caja
catfish
chromium
chromium-l10n
cifs-utils
clamav
clamtk
cron
cryptsetup
cups-pdf
dconf-editor
dconf-tools
deb-multimedia-keyring
default-jre
deluge
dia
dolphin
dstat
duff
duplicity
duply
eclipse
emacs
engrampa
enigmail
eog
evince
exactimage
fdupes
festival
festvox-us1
ffmpeg
file-roller
filezilla
firefox-esr
firmware-iwlwifi
flite_time
font-manager
fotoxx
freeglut3-dev
fsearch-trunk
fslint
furiusisomount
fuse
fuseiso
gammu
gdebi
geany
geany-plugins
gedit
genisoimage
geogebra
gimp
git
git-gui
gitg
gnome-clocks
gnome-disk-utility
gnome-software
gnuhtml2latex
goldendict
gparted
gpicview
gthumb
guake
guidedog
hdup
hexchat
hplip
hunspell-ru
icedove
iceweasel
ifstat
iftop
imagemagick
inkscape
insmod
install
intltool
iptraf
iptraf-ng
jack-midi-clock
jmemorize
juffed
kaddressbook
kazam
kchmviewer
kdeconnect
kdenlive
kdepim
kdiff3
kdiff3-qt
klavaro
kmod
knights
kolab-desktop-client
konsole
krusader
ktikz
latex2rtf
latex2rtf-doc
latexdraw
libc6-dev
libglib2.0-dev
libgtk-3-dev
libpcre3-dev
libreoffice
libreoffice-l10n-en-gb
libreoffice-l10n-fa
libreoffice-l10n-ru
libreoffice-l10n-tr
libthunarx-2-0
libtool
libxml2-utils
locate
luckybackup
smartmontools
lxterminal
lyx
mc
meld
quiterss
midori
mirage
mlocate
modem-manager-gui
modemmanager
mplayer
mplayer2
mpv
msttcorefonts
mupdf
nautilus
nautilus-open-terminal
nemo
net-tools
netbeans
netdiag
nethogs
network-manager
network-manager-gnome
nftables
nload
nodm
ntfs-3g
nwipe
okular
opendict
openssh-client
p7zip-full
pdftotext
php-mbstring
php-xmlreader
php7.4-mbstring
php7.4-intl
php7.4-curl
php7.4-xml
pixmap
pkg-config
pktstat
poppler-utils
putty
python
python3
python3-tk
qalculate-gtk
qbittorrent
qct
qt-sdk
qt5ct
qtikz
qupzilla
radiotray
realtime
recoll
redshift
redshift-gtk
rmlint-gui
rsync
samba
saytime
scite
scribus
shorewall
shutdown-at-night
shutter
simple-scan
smplayer
software-properties-common
sqlitebrowser
talking-clock
tcptrack
tesseract-ocr
tesseract-ocr-ara
tesseract-ocr-eng
tesseract-ocr-fas
tesseract-ocr-rus
tesseract-ocr-script-arab
testdisk
texlive
texlive-full
texlive-fonts-extra
texlive-lang-arabic
texlive-lang-cyrillic
texlive-lang-european
texlive-xetex
texmaker
texstudio
thunar
telegram-desktop 
thunar-archive-plugin
thunar-vcs-plugin
thunderbird
timemachine
tinymce
tor
tracker-gui
transmission
truecrypt
ttf-mscorefonts-installer
uget
unetbootin
unrar
viewnior
vim-gtk
printer-driver-cups-pdf
virtualbox
virtualbox-dkms
visudo
vlc
vnc
vnstat
wammu
wine
wine-bin:i386
wireshark
xarchiver
xbacklight
xchat
xfce4-genmon
xfce4-genmon-plugin
xfce4-power-manager
xfce4-taskmanager
xfce4-popup-whiskermenu
xfce4-taskmanager
xfce4-systemload-plugin
xfce4-xkb-plugin
xfce4-settings-manager
xorg-dev
xserver-xorg-input-synaptics
xtitle

sudo apt install adwaita-icon-theme anki apache2 aspell-en aspell-fa aspell-ru bibletime bibletime-data blueman bridge-utils build-essential bzip2 catfish chromium cron curl dkms exfat-fuse exfat-utils ffmpeg filezilla firefox-esr firefox-esr-l10n-ar firefox-esr-l10n-fa firefox-esr-l10n-ru fslint gcc gdebi geany geany-plugin-lineoperations genisoimage ghostscript gimp gnote goldendict gparted gthumb jupyter jupyter-console kazam kdiff3 klavaro libapache2-mod-php libreoffice libreoffice-l10n-ar libreoffice-l10n-fa libreoffice-l10n-ru libsword-utils libvirt-bin libvirt-clients libvirt-daemon libvirt-daemon-system libvirt0 locate make manpages-dev mariadb-client mariadb-server mc mlocate modem-manager-gui mpv mtools mupdf noblenote nuitka othman p7zip-full php php-curl php-intl php-mbstring php-sqlite3 php-xml php-xmlreader playonlinux python3 python3-keras python3-matplotlib python3-pip python3-pysword qbittorrent qdirstat qemu-kvm qemu-launcher qemu-system qemu-system-gui qemu-utils qt5ct rsync samba sqlitebrowser tesseract-ocr tesseract-ocr-ara tesseract-ocr-eng tesseract-ocr-fas tesseract-ocr-rus tesseract-ocr-script-arab texlive texlive-lang-arabic texlive-lang-cyrillic texlive-lang-european texlive-xetex thunderbird thunderbird-bidiui thunderbird-l10n-ar thunderbird-l10n-ru translate-shell uget unrar viewnior virt-goodies virt-manager virtinst vlc vnc4server winbind wine wine-bin:i386 wine32 wireshark xarchiver xfce4 xfce4-goodies xiphos xiphos-data xserver-xorg galculator

Installing and Removing software - Debian

1Add Debian Backports sources to /etc/apt/sources.list, also including the "contrib" component. For example:
# Backported packages for Debian 7 "Wheezy"
deb http://http.debian.net/debian/ wheezy-backports main contrib
2Update the list of available packages:
# apt update
3Install the relevant linux-headers package for your system, for example:
# apt install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')
or
# apt install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox
4Install the wheezy-backports/virtualbox package:
# apt -t wheezy-backports install virtualbox
After install debian 64bit need
This should be used as last resort. If you use this carelessly you can end up with a broken system. Please try the other answers before doing this.
You can delete the lock file with the following command:
sudo rm /var/lib/apt/lists/lock
You may also need to delete the lock file in the cache directory
sudo rm /var/cache/apt/archives/lock
After that, try opening Synaptic again.
rm -rf /var/libs/apt/lists/

VBoxGuestAdditions is the latest version

 apt upgrade
 dpkg --add-architecture i386
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
deb http://ftp.us.debian.org/debian/
Replaced with:
deb ftp://mirrors.usc.edu/pub/linux/distributions/debian/
http://askubuntu.com/questions/15433/unable-to-lock-the-administration-directory-var-lib-dpkg-is-another-process
نحوه نصب بسته‌های دانلود شده دبیان
به آدرسی که فولدر بسته‌های دبیان در آن است رفته و کد زیر را بزنید تا تمامی فایل‌های موجود در آن فولدر نصب شوند:
dpkg -i *

How install offline debian

mount -t iso9660 -o ro /dev/cdrom /media/cdrom
mount -t auto /dev/sdb1 /media/usb
 cp -v /media/cdrom/* /var/cache/apt/archives
 Remove old package .deb  in folder archive
sudo dpkg-scanpackages /media/z/Files/apt/archives 2>&1 >/dev/null | grep -Po '((/.*?deb)(?=.*?repeat;))|used that.*?K(/.*deb)' | xargs rm

Affairs Than Debian After Install

Night Mode

How to Change Display Brightness Using Command Line in Linux – Linux Hint
How to change LCD brightness from command line (or via script)? - Ask Ubuntu

Screen identification:

xrandr -q
or
xrandr -q | grep " connected"

Description:

1000 — Lowest value (super warm/red) - 1.00000000, 0.18172716, 0.00000000, }, /* 1000K */
4000 — Default night light on temperature
5500 — Balanced night light temperature
6500 — Default night light off temperature
10000 — Highest value (super cool/blue)
The three columns above are values for Red, Green and Blue.

Daily mode:

xrandr --output LVDS-1 --gamma 1:1:1 --brightness 1

Night Mode:

xrandr --output DP-1-1 --gamma 1.1:0.8:0.7 --brightness 0.5
xrandr --output LVDS-1 --gamma 1.1:0.8:0.7 --brightness 0.5
xrandr --output LVDS-1 --brightness 0.5

Change Xfce Theme from bash script:

xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita-dark"

Redshift:

redshift -O 2600
redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v
Disable
redshift -O 6500
or
Use redshift -x to reset everything:
-x Reset mode (remove adjustment from screen).
DESCRIPTION
A configuration file with the name `redshift.conf' can optionally be placed in
`~/.config/'. The file has standard INI format. General program options are placed under
the `redshift' header, while options for location providers and adjustment methods are
placed under a header with the name of that provider or method. General options are:
temp-day = integer
Daytime temperature
temp-night = integer
Night temperature
transition = 0 or 1
Disable or enable transitions
brightness-day = 0.1-1.0
Screen brightness at daytime
brightness-night = 0.1-1.0
Screen brightness at night
gamma = R:G:B
Gamma adjustment to apply
adjustment-method = name
Select adjustment method. Options for the adjustment method can be given under the
configuration file heading of the same name.
location-provider = name
Select location provider. Options for the location provider can be given under the
configuration file heading of the same name.
Options for location providers and adjustment methods can be found in the help output of
the providers and methods.
EXAMPLE
Example for Copenhagen, Denmark:
$ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v
An example configuration file with the same effect as the above command line:
[redshift]
temp-day=5700
temp-night=3600
gamma=0.8
adjustment-method=vidmode
location-provider=manual
redshift.conf - configuration file for redshift and gtk-redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5800
temp-night=4800
; Enable/Disable a smooth transition between day and night
; 0 will cause a direct change from day to night screen temperature.
; 1 will gradually increase or decrease the screen temperature
transition=1
; Set the screen brightness. Default is 1.0
;brightness=0.9
; It is also possible to use different settings for day and night since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel individually)
gamma=0.9
;gamma=0.8:0.7:0.8
; Set the location-provider: 'geoclue', 'gnome-clock', 'manual'
; type 'redshift -l list' to see possible values
; The location provider settings are in a different section.
location-provider=manual
; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values
; 'randr' is the preferred method, 'vidmode' is an older API
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr
; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings
; e.g. 'redshift -l manual:help'
[manual]
lat=43
lon=1
; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust screen 1.
; Note that the numbering starts from 0, so this is actually the second screen.
[randr]
screen=0

GitHub - bimlas/xfce4-night-mode: XFCE4 plugin: Switch between light and dark variants of a theme

16.04 - How do I enable night mode in display of Xubuntu? - Ask Ubuntu

xrandr

xrandr -q | grep " connected"
xrandr --output LVDS-1 --gamma 1.1:0.8:0.7 --brightness 0.55
xrandr --output LVDS-1 --gamma 1:1:1 --brightness 1

Hidden shade in xfce

- go to windows manager > style > active

- Click and drag the buttons to change the layout

Mousewheel

Xfce4 - Deactive rolling in of window - disable xfce roll-up windows with mousewheel:

Open the xfce4-settings-editor via terminal
Click xfwm4 / general / mousewheel_rollup and uncheck the enable box

Disabling mouse-wheel window-shading in XFce?:

- go to settings> setting editor
- click on xfwm4 in 'chanel side bar
- uncheck 'mouesewheel_rollup'

Network

Intel(R) Centrino(R) Advanced-N 6205
apt install network-manager
apt install firmware-iwlwifi
apt install network-manager-gnome

1. Overall bandwidth - nload, bmon, slurm, bwm-ng, cbm, speedometer, netload
2. Overall bandwidth (batch style output) - vnstat, ifstat, dstat, collectl
2. Bandwidth per socket connection - iftop, iptraf, tcptrack, pktstat, netwatch, trafshow
3. Bandwidth per process - nethogs

List Network Interfaces in Debian

How can I display the list of available WiFi networks? nmcli dev wifi

To scan all networks try using the command sudo iw dev wlan0 scan | grep SSID.

List Network Interfaces in Debian 10 – Linux Hint

8 Linux Commands: To Find Out Wireless Network Speed, Signal Strength And Other Information - nixCraft

N

۱۸ دستور برای نظارت بر پهنای باند شبکه در سرورهای لینوکسی | مرکز آموزش زاگریو

su
passwd

mount -n -o remount,ru /
sudo modprobe module_name
sudo modprobe

nmcli

nmcli g
nmcli device show
nmcli monitor
nmcli device wifi hotspot ssid www.fadak.ir password 12345678
nmcli connection up Personal
nmcli connection up Public
nmcli connection down/up mcinet
nmcli connection show
nmcli radio wifi on/off
nmcli radio all on/off
There is a way to toggle the state of the WiFi connection. It might be useful to know.
nmcli radio wifi `nmcli r wifi | grep enabled -c | sed -e "s/1/off/" | sed -e "s/0/o
nmcli radio help
nmcli radio wwan
nmcli radio wwan on/off
nmcli networking on/off

nmcli dev wifi list
nmcli dev status
nmcli device show

nmcli: NetworkManager Reference Manual
nmcli-examples: NetworkManager Reference Manual

gammu

gammu getussd "*555#"

Install Modem DLink

su
cd /media/apt/dlink/
sudo tar –xf *.gz
cd /home/mahdi/D310A/
sudo ./install.sh
./install.sh
sudo ./install.sh
sudo sh install.sh

gnome-system-monitor
sudomount/dev/sr0/mnt
sudo mount /dev/sr0 /mnt
cd/mnt
cd /mnt
sudo cp DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz /home
cd /home
sudo tar -xf DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz
sudo ./install.sh
cd /mnt
sudo mount /dev/sr0 /mnt
unmount /mnt
sudo mount /dev/sr0 /mnt
unlink /mnt
sudo unmount /mnt
sudo unlink /mnt
sudo ./install.sh
cd /home
sudo ./install.sh
sudo gedit /etc/3g_modem_connection/apn.dat
cd /etc/3g_modem_connection/

65 sudo ./install.sh
66 cd /home
sudo ./install.sh
sudo ./uninstall.sh
cd /home/mahdi/Mobile/
sudo cp DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz /home
sudo tar -xf DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz
sudo tar -xf /home/DTLWA_D310A_linux_v7.0.3WW_151014.tar.gz
sudo ./install.sh

Call time

qjackctl

echo now=$(date +%s)
echo "Its" `date "+%l O clock now"` | festival --tts
saytime -r 60

festival --tts

echo This is my custom message | festival --tts
10:34 | festival --tts
echo 10:34 | festival --tts
date
echo date | festival --tts
echo $(date) | festival --tts

cron

Cron job every 2 hours

systemctl restart cron.service
crontab -e
crontab -l
crontab -u root -l
crontab -u mahdi -l
sudo grep CRON /var/log/syslog

@reboot /usr/bin/dircproxy

ls -ld /etc/cron*
cat /etc/crontab

grep CRON /var/log/syslog

xfce4-power-manager - Panel Plugin

Display Brightness
Allows control of the laptop's display brightness with the slider
Presentation Mode
Ticking this option temporarily overrides any suspend settings in Power Manager Settings and will prevent interruptions due to inactivity in the course of giving a presentation.
Power Manager Settings...
Launches the Xfce Power Manager settings dialog.

Settings Keyboard

xfce4-popup-whiskermenu

xfce4-taskmanager

xfce4-systemload-plugin
xfce4-xkb-plugin

xfce4-settings-manager
xfconf-query -c xfce4-keyboard-shortcuts -l -v | cut -d'/' -f4 | awk '{printf "%30s", $2; print " " $1}' | sort | uniq

tlmgr install euenc
exo-preferred-applications

df
nano /etc/wpa_supplicant/wpa_supplicant.conf
exo-open --launch FileManager %S
exo-open --launch FileManager

sudo apt list --installed > n.txt

journalctl -xe NM_CONNECTION=6ba97fcf-a67e-48df-b54b-46faf891941d + NM_DEVICE=wlo1

udisksctl

udisksctl --help
udisksctl power-off
udisksctl power-off /dev/sdc
udisksctl status
udisksctl status
udisksctl unmount -b /dev/sdc2
udisksctl power-off -b /dev/sda

VNC

https://www.howtoforge.com/how-to-install-vnc-server-on-debian-11/

https://computingforgeeks.com/install-and-configure-tigervnc-vnc-server-on-debian/

MYSQL & PHP & Apache

chmod 777 '/var/www/html'
php --version
apt install apache2 mariadb-server php libapache2-mod-php samba vnc4server
service apache2 restart
mariadb-server (mysql)
httpd(apache)
apt install httpd mariadb-server  php mysql
mysqladmin -uuser -ppassword shutdown
mysql -uroot -ppassword
ALTER USER 'root'@'localhost' IDENTIFIED BY 'NewPassword';
systemctl restart mysql
sudo geany /etc/php/*/apache2/php.ini
sudo geany /etc/php/*/cli/php.ini
service mysql restart
systemctl restart apache2.service

chmod -R 777 /var/www/html/*

It gives me this error: Failed to restart apache2.service: Unit apache2.service is masked.

sudo systemctl unmask apache2
sudo service apache2 restart

Error: Process: 50039 ExecStart=/etc/init.d/apache2 start (code=exited, status=1/FAILURE)
There is some syntax error in the file apache2.conf.
In a terminal, type:
$ cd /etc/apache2
Then:
$ apache2ctl configtest
It will show you where is the error in the apache2.conf file to correct.

Restart services in linux(debian)

Restart PHP by restarting your web-server
Type the following command as per your web-server.
Restart Apache for php service
If you are using Apache web server type the following command to restart the php:
# /etc/init.d/apache2 restart
OR
# apache2ctl restart
See how to restart Apache Web Server on Ubuntu Linux for more information.
Restart Nginx for php service
If you are using Nginx web-server type the following command to restart nginx:
# /etc/init.d/nginx restart
OR
# service nginx restart
OR
# nginx -s reload
Restart Lighttpd for php service
If you are using Lighttpd web-server type the following command to restart lightpd:
# /etc/init.d/lighttpd restart
OR
# service lighttpd restart
Restart PHP-FAM Fastcgi for PHP service
If you are running php via PHP-FAM fastcgi manager, use any one of the following as per your version of Linux/Unix:
# /etc/init.d/php-fpm restart
# /etc/init.d/php5-fpm restart
OR
# service php-fpm restart
OR
# service php5-fpm restart
OR
# restart php-fpm

 

sudo systemctl restart apache2.service
sudo systemctl restart apache2
sudo service apache2 restart

Samba

testparm -s
Code: Select all
net usershare info --long
It may not be a samba problem but a path / permissions problem.

 

How to configure Samba in Debian

[SOLVED] Thunar Shares Plugin - Linux Mint Forums

Samba/ServerSimple - Debian Wiki

sudo apt install samba
mkdir /home//sambashare/
sudo nano /etc/samba/smb.conf

[sambashare]
    comment = Samba on Ubuntu
    path = /home/username/sambashare
    read only = no
   browsable = yes

sudo service smbd restart
sudo smbpasswd -a username
\ip-addresssambashare

Samba GUI page

One of the most asked for features for Samba is a graphical user interface to help with configuration and management. This is finally starting to happen.
In fact, there are now several GUI interfaces to Samba available. Some of them are listed below and I will add the others as soon as I can find the URLs.
Smb4K - An SMB share browser for KDE
Smb4K is an SMB share browser for KDE. Its features are inspired by Komba2 by Frank Schwanz. It uses the Samba software suite for an easy access to the SMB shares of your local network neighborhood.
LDAP Account Manager
LDAP Account Manager (lam) is a webfrontend for managing accounts stored in an OpenLDAP directory. It supports Samba 3/4 users, groups and hosts.
Webmin
Webmin is a general web based unix administration tool with a Samba component. Have a look at the Webmin pages.
SMB2WWW
This SMB2WWW is an extension to smbclient, so you can use it directly as a CGI-binary. You can get more information at http://www.scintilla .utwente.nl/users/frank/smb2www/.
smb-mode.el - Emacs mode
smb-mode.el is an Emacs mode for editing smb.conf.
gnomba - A GNOME SMB Subnet Scanner
Gnomba is a GUI machine and share browser for the SMB protocol. Gnomba allows you to scan any number of subnets for machines with SMB. The workgroups, machines and share are shown in a tree-view. For each machine you can then view the list of shares, and mount, unmount or browse them.
jags - Yet Another GNOME SMB Client
Jags is a Gtk+ based "windows network neighbourhood browser". The program parses the output from smbclient and use this to display a graphic view of the network. This program does the parsing with help from shell- scripts.
komba2 - A KDE SMB Subnet Scanner
Komba2 is a GUI machine and share browser for the SMB protocol. Komba2 allows you to scan any number of subnets for machines with SMB. The workgroups, machines and share are shown in a tree-view. For each machine you can then view the list of shares, and mount, unmount or browse them. You can also search a machine by name or ip.
konqueror - KDE File Browser
KDE's filebrowser Konqueror can access smb filesystems using smb:// URL's.
KSambaPlugins
KSambaPlugin is a KDE 3 plugin for configuring a SAMBA server. It consists of two plugins, a KControl Center module for all SAMBA options and a Konqueror properties dialog plugin for quickly configuring the SAMBA share options of a directory.
ChangePassword
This is a web-based tool that allows users to change their unix,samba and squid password using a web-based interface. Freely available here.
smbc - Simple Samba Commander
Simple Samba Commander is a text mode SMB network commander. With SMBC, you can browse your local network or use the search function to find files in a share. You can also download/upload files and directories or create them both locally and remotely. SMBC features the resume capability and UTF-8 encoding support.
SMB Web Client
SMB Web Client is a single PHP script to access Windows Networks similar to Windows Network Environment. It requires smbclient, PHP 4.1.x+, and a web server.
Davenport WebDAV-SMB Gateway
Davenport is a servlet that makes it possible to access samba-shares via webdav through a servlet-container. It allows access to samba-shares through a firewall/proxy without the need to open the smb-related ports and without a VPN-client. See http://davenport.sourceforge.net/ for more info.
QtSmbstatus
QtSmbstatus is a GUI for smbstatus. It is meant to provide the possibility of administering remote machines. QtSmbstatus was designed as a client/server system (with SSL). Possibilities include: view connections, disconnect a user, or send a message (with smbclient -M). For more info see, http://qtsmbstatus.free.fr/.
LDAP Admin
Ldap Admin is a free Win32 application for managing LDAP directories. This tool lets you browse, search, modify, create and delete objects on an LDAP server.
SMBNetFS
SMBNetFS is a Linux filesystem that allows you to use Samba/Microsoft network in the same manner as the network neighborhood in Microsoft Windows. The program uses fuse() and libsmbclient. Currently SMBNetFs work on Linux 2.4/2.6, but should work also on FreeBSD 6.0.
IntegraTUM WebDisk
IntegraTUM WebDisk is a free web application which gives you direct access to a file server. It is written using Java Servlets and the jCIFS library. Supported file servers are Samba, MS Windows and NetApp OnTAP and those based on the CIFS-protocol.
SambaDAV
SambaDAV is an SMB-to-WebDAV bridge, written in PHP and running as a web application on Linux servers. It acts as the glue between Windows Samba/CIFS filesharing and WebDAV internet file access.

systemctl

systemctl poweroff
systemctl reboot

Android

sudo apt install snapd
sudo snap install android-studio --classic
sudo snap install wps-office --classic

How to Install Android Studio in Ubuntu 18.04 – Linux Hint

How to install and run Android Apps on Ubuntu using Anbox | FOSS Linux

OCR

OCR - Community Help Wiki

tesseract: command-line OCR engine - Linux Man Pages (1)

Tesseract OCR for Non-English Languages - PyImageSearch

Create box file for Persian/Arabic text in tesseract 4.00 · Issue #1320 · tesseract-ocr/tesseract · GitHub

GitHub - tesseract-ocr/tesseract: Tesseract Open Source OCR Engine (main repository)

Using Tesseract - Introduction to OCR and Searchable PDFs - LibGuides at University of Illinois at Urbana-Champaign

c# - Tesseract ocr PDF as input - Stack Overflow

Installing additional language packs — ocrmypdf 12.4.0.post1+g0b19b084 documentation

OCR the output PDF
ocrmypdf -l rus+eng combined.pdf combined_ocr.pdf

PDF

pdf-quench

mutool man page - mupdf - General Commands | ManKier

mupdf man page - General Commands | ManKier

MuPDF

Compress PDF

sudo apt install ghostscript

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -dNOPAUSE -dQUIET -dBATCH -sOutputFile=compressed_PDF_file.pdf 00.pdf

The good ghostscript:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf mine1.pdf mine2.pdf
or even this way for an improved version for low resolution PDFs (thanks to Adriano for pointing this out):
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -dPDFSETTINGS=/prepress -sOutputFile=merged.pdf mine1.pdf mine2.pdf
In both cases the ouput resolution is much higher and better than this way using convert:

sudo apt install imagemagick
convert -density 300x300 -quality 100 mine1.pdf mine2.pdf merged.pdf

I found a superb trick to shrink the size of PDFs, I reduced with it one PDF of 300 MB to just 15 MB with an acceptable resolution!

gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/default -dNOPAUSE -dQUIET -dBATCH -dDetectDuplicateImages -dCompressFonts=true -r150 -sOutputFile=output.pdf input.pdf

sudo apt install pdftk

Pixelated (lossy):
convert input.pdf -compress Zip output.pdf
Unpixelated (lossless, but may display slightly differently):
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dBATCH -dQUIET -sOutputFile=output.pdf input.pdf

SQLite Database Recovery

-dPDFSETTINGS=configuration
Presets the "distiller parameters" to one of four predefined settings:
/screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
/ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
/printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
/prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
/default selects output intended to be useful across a wide variety of uses, possibly at the expense of a larger output file.

----------------

PDF optimization level selection options:
-dPDFSETTINGS=/screen (screen-view-only quality, 72 dpi images)
-dPDFSETTINGS=/ebook (low quality, 150 dpi images)
-dPDFSETTINGS=/printer (high quality, 300 dpi images)
-dPDFSETTINGS=/prepress (high quality, color preserving, 300 dpi imgs)
-dPDFSETTINGS=/default (almost identical to /screen)

 

http://milan.kupcevic.net/ghostscript-ps-pdf/

pdftotext

Printable data utilities

pdftotext -layout -f M -l N /home/mahdi/Downloads/Article/jha-v17n57p26-fa.pdf /home/mahdi/Downloads/Article/jha-v17n57p26-fa.html
pdftotext -layout /home/mahdi/Downloads/Article/jha-v17n57p26-fa.pdf /home/mahdi/Downloads/Article/jha-v17n57p26-fa.html
pdftotext -layout /home/mahdi/Downloads/Article/SSU_Journa-v16n2p3-fa.pdf /home/mahdi/Downloads/Article/SSU_Journa-v16n2p3-fa.txt

pdftk input.pdf cat 2-4 output out1.pdf

pdfjam -o
and an example of page ranges would be:
3,67-70,80

Command line - Convert a directory of JPEG files to a single PDF document - Ask Ubuntu

How to Convert PDF to Image in Linux Command Line

Split PDF file

Join PDF file

Convert PDF to JPG

Manpages of texlive-extra-utils in Debian testing — Debian Manpages

Convert JPG to PDF

sudo apt install img2pdf

img2pdf *.jp* --output combined.pdf

img2pdf *.jp* --pagesize A4 --output com.pdf

Computer Application (Application software)

Devive Manager

lspci
lsusb
ls /dev/tty*

winefile

winefile
wine explorer
winefile --help
winefile home
wine /home/mahdi
wine /home/mahdi/Everything.exe

Translate

Crow

Releases · crow-translate/crow-translate · GitHub

if error !strcmp(locale, "C"):Error:Assert failed:in file api/baseapi.cpp

$ export LC_ALL=C

NI-Translate: A translator for Linux, running at the background which wakes up with the translation of the last selected text on command.
Dialect:  A translation app for GNOME.

Translate Any Text You Select On Your Linux Desktop With A Keyboard Shortcut And Notifications ~ Web Upd8: Ubuntu / Linux blog

How to translate any selected text in your favourite language on Linux Mint | by Ideneal | Medium

 

Office

WPS Office 2019 For Linux,WPS For Linux
Flatpak—the future of application distribution         WPS Office—Linux Apps on Flathub
Install wps-office for Linux using the Snap Store | Snapcraft
The Most Compatible Free Linux Office Suite | WPS Office

texmaker

echo 'dir::cache::archives /media/m/Sharing/archives/;' >> /etc/apt/apt.conf
apt upgrade

gammu getussd "*100*1*0#"
gammu getussd "*555#"

mmcli -L
mmcli -m 1 --3gpp-ussd-initiate=*555#

gammu getussd "*100*1*0#"

gir1.2-keybinder-3.0 gstreamer1.0-gtk3:amd64 xfburn libburn4:amd64 xfce4-weather-plugin xfce4-mailwatch-plugin xfce4-panel libexo-1-0:amd64 libisofs6:amd64 libjs-sphinxdoc libjs-underscore libjte2:amd64 xfce4-pulseaudio-plugin:amd64 libkeybinder-3.0-0:amd64 xfce4-clipman-plugin xfce4-clipman libqrencode4:amd64 libreoffice-gtk3 parole libtagc0:amd64 libxfce4ui-utils xfce4-sensors-plugin libxnvctrl0:amd64 mousepad node-html5shiv python3-feedparser ristretto tango-icon-theme xfce4-appfinder xfce4-battery-plugin xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict xfce4-diskperf-plugin xfce4-fsguard-plugin:amd64 xfce4-netload-plugin xfce4-screenshooter xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-timer-plugin:amd64 xfce4-verve-plugin xfce4-wavelan-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin
redshift redshift-gtk

Religion

GitHub - ejabu/quran-tron: Quran Offline powered by Electron, React, NeDB

xiphos

bibletime

python3-pysword

LibreOffice

How to enable complete dark mode in LibreOffice
As I mentioned earlier, you need to enable a system-wide dark mode first. This will ensure that the window color (or the title bar) blends well with the in-app dark color.
Next, open any LibreOffice tool from the suite such as Writer. Then from the menu, click Tools -> Options -> Application Colors and select Document background & Application background as Black or Automatic (whichever works for you).
Libreoffice Application Colours
In case the icons are not in dark colour, you can change them from menu (as shown in the image below), Tools -> Options -> View and my personal choice on MX Linux, is the Yaru icon style from Ubuntu (if you have a dark version of the icon pack, select that).
Libreoffice Iconstyle
Of course, you can also try some other icon themes available for Linux distros.
The end result should look like this:
3 Libreoffice Dark
Additional tip for LibreOffice flatpak package
If you’re using the Flatpak package of LibreOffice suite, the header area (or the menu area) of LibreOffice may look white. In that case, you can try navigating to Tools-> Options-> Personalization and then select the “Grey theme” as shown in the screenshot below.

LibreOffice - Debian Wiki

Top 5 Best MS Office Alternatives for Linux in 2020 – Linux Hint

sudo apt install -t buster-backports libreoffice

Midori

midori:faq [Xfce Wiki]

WebKitGTK+ Reference Manual: WebKitWebSettings

SSH

SSH - Debian Wiki

Telnet

telnet www.example.com 80

Geany

~/.config/geany/colorschemes/

Keyboard shortcuts - Geany Wiki

Themes | Geany

rm "%e.pdf";xelatex -synctex=1 -interaction=nonstopmode "%f";rm "%e.synctex.gz";rm "%e.log";rm "%e.aux";rm "%e.synctex.gz";rm "%e.out";rm "%e.toc";mupdf "%e.pdf"

rsync

rsync -zvh –progress /var/www/html/* /media/m/Sharing/Backup/
rsync -zvh /var/www/html/ /media/m/Sharing/Backup/ --delete-before
rsync -av /var/www/html/ /media/m/Sharing/Backup/html/ --delete-before

crontab

crontab -e

Dolphin

Dolphin Service Menus

/home/mahdi/.local/share/kservices5/ServiceMenus/Search.desktop

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=inode/directory
Actions=search
X-KDE-Priority=TopLevel

[Desktop Action search]
Name=Search
Icon=system-search
Exec=/usr/bin/catfish --path=%u

Search Here [MATE Search Tool] - KDE Store

Log:
bash: adduser: command not found

$ su -l
# adduser sudo
# logout

 

LibreOffice 7.0: Release Notes - The Document Foundation Wiki

برترین توزیع‌های لینوکس در کاربری‌های مختلف 2014 - XMEN Team

https://netix.dl.sourceforge.net/sourceforge/corefonts/webdin32.exe
https://stackoverflow.com/questions/14803062/sudo-install-sh-command-not-found-is-not-working-on-lion
In the 6th step i had typed "sudo insmod" instead of "sudo /sbin/insmod"
https://linuxhint.com/debian_modprobe_tutorial/
To black list a module or driver you don't have to use a command "blacklist".
Open this file (Create it if it does not exist):
sudo nano /etc/modprobe.d/blacklist.conf
add a line like this:
blacklist nouveau
save the file, reboot the system. You can use modprobe -r nouveau to remove it temporary.

20 Best FREE YouTube Playlist Downloader Online (2020)

Itubego

Snapdownloader

Airy

Softorino YouTube Converter

Allavsoft

ClipGrab

Snaptube

YouTubNow

iTube HD Video Downloader

Download YouTube Videos in Linux Command Line

What are the Best Youtube Video Downloader for Ubuntu

Best Image Viewers for Linux

Note: You should be able to find these image viewers listed in your software center or AppCenter. If you don’t find it there, we’ve mentioned the instructions for manual installation as well.
1. Nomacs
What’s good about it?
Simple & Fast UI
Image adjustment tools (color & size)
Geolocation of the image
Metadata information panel
LAN Synchronization
Fullscreen mode
A free and open source image viewer that does not come baked with any fancy features. However, Nomacs does support most of the common image file formats if you want to use it.
The user interface is very simple but it does offer some essential features for image adjustment (color, brightness, resize, crop, & cut). In addition to that, it also supports fullscreen mode, histogram, and a lot of different panels that you can toggle for metadata, edit history, and more such information.
How do I install it?
You can find it listed in the software center/AppCenter for easy installation. If you want to install it via terminal, you can take a look at their GitHub page or type in the command below:
sudo apt install nomacs
2. Eye Of Gnome
What’s good about it?
A dead simple image viewer
Slideshow style (if that’s what you like)
An image viewer tailored for GNOME desktop environment
This is a classic image viewer developed as a part of The GNOME Project a lot of years ago. Do note that this isn’t actively maintained anymore. But, it still works on Ubuntu’s latest LTS release and several other Linux distros.
If you want a dead simple image viewer where you browse through the images in a slideshow-type UI and get the meta info in the sidebar, Eye of GNOME should be your choice. One of the best for GNOME desktop environment!
How do I install it?
To manually install it on Ubuntu (or Ubuntu-based Linux distros) type in the following command:
sudo apt install eog
For other distros and source, you should follow the GitHub page.
3. Eye Of MATE Image Viewer
What’s good about it?
A simple image viewer
Plugins supported
An image viewer tailored for MATE desktop environment
Yet another simple image viewer with the basic functionalities of slideshow view and rotating images.
Even if doesn’t support any image manipulation feature, it does support numerous image file formats and can handle big image files.
How do I install it?
For Ubuntu/Ubuntu-based distros, type in the following command:
sudo apt install eom
If you need help for other distros and the source, follow their GitHub page.
4. Geeqie
What’s good about it?
A flexible image manager that supports plugins (you’ll find other image viewers supported as well)
Information about the color profile
Geeqie is an impressive image manager and viewer. It supports other image viewers as plugins but does not offer any image manipulation tools.
If you need to know the color profile, image info, and manage/view a collection of images. It should be a good choice for that.
How do I install it?
Type in the terminal:
sudo apt install geeqie
For the source, you can refer the GitHub page.
5. gThumb Image Viewer
What’s good about it?
An all-in-one image viewer with the ability to manage, edit and view the images
Reset EXIF orientation
Convert image formats
Find duplicate images
gThumb is an amazing image viewer with a lot of features. You get an impressive user interface to view/manage your images along with the basic image manipulation tools (crop, resize, color, and so on.)
You can also add comments to an image or reset the EXIF orientation info. It also gives you the ability to find duplicate images and convert image formats.
How do I install it?
You can enter this command in the terminal:
sudo apt install gthumb
If that doesn’t work, head to the GitHub page for more info.
6. Gwenview
What’s good about it?
A basic image viewer with common image manipulation tools to rotate and resize
Feature extension using KIPI plugins
Gwenview is just another basic image viewer tailored for KDE desktop environment. However, you can install it on other desktop environments as well.
If you utilize the Konqueror web browser, you can use it as an embedded image viewer. Here, you can add comments/description to the image as well. In addition, it supports KIPI plugins.
How do I install it?
Type the following in the terminal to install it:
sudo apt install gwenview
For the source, check out their GitHub page.
7. Mirage
What’s good about it?
Customizable interface even it is a basic UI
Basic image manipulation tools
Command-line access
If you want a decent image viewer along with the ability to access it via command line, a fullscreen mode, slideshow mode, basic editing tools to resize/crop/rotate/flip, and a configurable interface – Mirage would be the simplest option.
It is a very fast and capable image viewer that supports a lot of image formats that include png, jpg, svg, xpm, gif, bmp, and tifff.
How do I install it?
You need to type in the following:
sudo apt install mirage
For the source code and other installation instructions, refer the GitHub page.
8. KPhotoAlbum
What’s good about it?
Perfect image manager to tag and manage the pictures
Demo databases
Image compression
Merge/Remove images to/from Stack
KPhotoAlbum is not exactly a dedicated image viewer but a photo manager to tag and manage the pictures you’ve got.
You can opt for slideshows to view the image along with the ability to compress images and search them using the labels/tags.
How do I install it?
You can install it via the terminal by typing in:
sudo apt kphotoalbum
In either case, you can check for the official instructions on their website to get it installed on your Linux distro.
9. Shotwell
What’s good about it?
Red-eye correction tool
Upload photos to Facebook, Flickr, etc.
Supports RAW file formats as well
Shotwell is a feature-rich photo manager. You can view and manage your photos. Although you do not get all the basic image manipulation tools baked in it – you can easily crop and enhance your photos in a single click (auto brightness/contrast adjustments).
How do I install it?
Go to the terminal and enter the following (Ubuntu/Ubuntu-based distros):
sudo apt install shotwell
For more information, check out their GitHub page.
10. Ristretto
What’s good about it?
A dead simple image viewer
Fullscreen mode & Slideshow
A very straightforward image viewer where you just get the ability to zoom, view in fullscreen mode and view the images as a slideshow.
It is tailored for Xfce desktop environment – but you can install it anywhere.
How do I install it?
Even though it’s built for Xfce desktop environment, you can install it on any Ubuntu/Ubuntu-based distro by typing the following command in the terminal:
sudo apt install ristretto
11. digiKam
What’s good about it?
An all-in-one image viewer with advanced photo management features (editing/managing/viewing)
Batch Queue Manager
Light Table
digiKam is an advanced photo manager with some additional image manipulation tools. You get the ability to configure the database using SQLite or MySQL.
To enhance your experience of viewing images, it lets you choose the reduced version of images while you preview them. So, that becomes super fast even if you have a lot of images. You get several import/export options via Google, Facebook, Imgur, and so on. If you want a feature-rich image viewer, this is the one you should have installed.
How do I install it?
Type in the following command:
sudo apt install digikam

Other

gitk
tesseract

startxfce4
org.freedesktop.udisks2.filesystem-mount-system
python3 /home/mahdi/Desktop/search2.py

nuitkf /home/mahdi/Desktop/search3.py
nuitka /home/mahdi/Desktop/search3.py
cd '/home/mahdi/Desktop'

chmod +x Search4.py
chmod 777 Search4.py
chmod -x Search4.py
chmod +x Search5.py

chmod +x /home/mahdi/Desktop/Search5.py
cd /home/mahdi/Downloads/locatefish-master
make install
sudo make install

find "search"
find -f "search*"

/home/mahdi/Downloads/Catfish/fsearch-master
cd /home/mahdi/Downloads/Catfish/fsearch-master
sh autogen.sh
./programName
chmod +x /home/mahdi/Desktop/Flocate6.py
eject
eject /dev/sdc1
 unmount MULTIBOOT

Xfce

xfconf

xfce:xfconf:xfconf-query [Xfce Docs]

xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita"
xfconf-query -c xsettings -p /Net/ThemeName -s "Adwaita-dark"

xfconf-query -c منوی اصلی --property زیرمنوها به ترتیب -s "false"

دانستن مقدار
xfconf-query -c منوی اصلی --property زیرمنوها به ترتیب

xfconf-query -c xfce4-panel --property /panels/dark-mode -s "false"

Thunar

xfce:thunar:custom-actions [Xfce Docs]

ThunarCustomActions - Community Help Wiki

scripts - Add "delete confirmation prompt" in Thunar - Ask Ubuntu

thunar/NEWS at master · xfce-mirror/thunar · GitHub

/usr/share/Thunar/sendto/bluetooth-sendto.desktop

Xfce Very important (terminal)

For the user:

~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
~/.config/Thunar/accels.scm
~/.config/xfce4/terminal/accels.scm

System wide:

/etc/skel/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml
/etc/skel/.config/Thunar/accels.scm

 

xfce:thunar:custom-actions [Xfce Docs]

- Prevent unnecessary fallback copy-delete in file move when overwriting

 

/home/m/.config/Thunar/accels.scm

(gtk_accel_path "/ThunarActions/uca-action-1484038296058938-2" "Delete")

Back Up The XFCE4

How To Back Up The XFCE4 Desktop Settings On Linux

PATH

The PATH is an important concept when working on the command line. It's a list of directories that tell your operating system where to look for programs, so that you can just write script instead of /home/me/bin/script or C:UsersMeinscript. But different operating systems have different ways to add a new directory to it:
Windows
The first step depends which version of Windows you're using:

If you're using Windows 8 or 10, press the Windows key, then search for and select "System (Control Panel)".
If you're using Windows 7, right click the "Computer" icon on the desktop and click "Properties".

Click "Advanced system settings".
Click "Environment Variables".
Under "System Variables", find the PATH variable, select it, and click "Edit". If there is no PATH variable, click "New".
Add your directory to the beginning of the variable value followed by ; (a semicolon). For example, if the value was C:WindowsSystem32, change it to C:UsersMein;C:WindowsSystem32.
Click "OK".
Restart your terminal.

Mac OS X
Open the .bash_profile file in your home directory (for example, /Users/your-user-name/.bash_profile) in a text editor.
Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.
Save the .bash_profile file.
Restart your terminal.

Linux
Open the .bashrc file in your home directory (for example, /home/your-user-name/.bashrc) in a text editor.
Add export PATH="your-dir:$PATH" to the last line of the file, where your-dir is the directory you want to add.
Save the .bashrc file.
Restart your terminal.

XFCE

systemctl set-default graphical.target

apt install gir1.2-keybinder-3.0 gstreamer1.0-gtk3:amd64 xfburn libburn4:amd64 xfce4-weather-plugin xfce4-mailwatch-plugin xfce4-panel libexo-1-0:amd64 libisofs6:amd64 libjs-sphinxdoc libjs-underscore libjte2:amd64 xfce4-pulseaudio-plugin:amd64 libkeybinder-3.0-0:amd64 xfce4-clipman-plugin xfce4-clipman libqrencode4:amd64 libreoffice-gtk3 parole libtagc0:amd64 libxfce4ui-utils xfce4-sensors-plugin libxnvctrl0:amd64 mousepad node-html5shiv python3-feedparser ristretto tango-icon-theme xfce4-appfinder xfce4-battery-plugin xfce4-cpufreq-plugin xfce4-cpugraph-plugin xfce4-datetime-plugin xfce4-dict xfce4-diskperf-plugin xfce4-fsguard-plugin:amd64 xfce4-netload-plugin xfce4-screenshooter xfce4-smartbookmark-plugin xfce4-systemload-plugin xfce4-timer-plugin:amd64 xfce4-verve-plugin xfce4-wavelan-plugin xfce4-whiskermenu-plugin xfce4-xkb-plugin

apt install xfce4-panel xfdesktop4 xfwm4 xfce4-settings xfce4-session xfce4-terminal xfce4-power-manager xfce4-pulseaudio-plugin:amd64 xfce4-battery-plugin xfce4-datetime-plugin xfce4-whiskermenu-plugin --no-install-recommends

apt install lightdm xfce4 xfce4-goodies synaptic --no-install-recommends
From the console
Xfce can be started from the console simply by running the startxfce4 command. startxfce4 is a script that sets the required environment variables and calls Xinit to start the X server with the Xfce session.

Devuan GNU+Linux Free Operating System

GitHub - spanezz/nodm: Automatic display manager

Xfce - Debian Wiki

Devuan GNU+Linux Free Operating System

GitHub - spanezz/nodm: Automatic display manager

Xfce Git repository browser

Open Whisker Menu with Win key:

xfce4-popup-whiskermenu

Notes

~/.local/share/notes

Terminal

Keyboard Shortcuts
Keyboard shortcuts can be configured by editing your ~/.config/xfce4/terminal/accels.scm file.

Modem

mmcli

mmcli -L
mmcli -m 3 -e فعال کردن
mmcli -m 3 -d غیر فعال کردن
systemctl status ModemManager.service
mmcli -p -d /dev/cdc-wdm0 --query-device-caps
mmcli -d /dev/cdc-wdm2 --3gpp-ussd-initiate="*555#"
mmcli -m 3 --3gpp-ussd-initiate="*555#"

Balance of GSM USB Modem using USSD - Ask Ubuntu

gammu

gammu getussd "*555#"

nodm Display manager (desktop login screen)

nano /etc/default/nodm
NODM_USER=mahdi
or
NODM_USER=root

Terminal

xfce4-terminal

NTFS Partition Repair and Recovery In Linux

apt install ntfs-g3

lsblk

Can't write to NTFS formatted drives:

sudo ntfsfix --clear-bad-sectors /dev/sdX1
sudo ntfsfix --clear-dirty /dev/sdX1

sudo ntfsfix -b -d /dev/sdb1

sudo ntfsfix /dev/sda4

sudo fsck /dev/sdb1

Link

~/.thunderbird/

/home/mahdi/.local/share/applications/

/home/mahdi/.mozilla/

/home/mahdi/.local/share/applications/

Speaking Clock

software recommendation - How do you get an hourly talking clock? - Ask Ubuntu

talking-clock/control at master · pikkewyn/talking-clock · GitHub

sound - How to make speaking clock ( via cron and festival tts) work while playing music - Ask Ubuntu

cron

Newbie: Intro to cron

Project Management Software(مدیریت پروژه)

Odoo Suite of open-source business apps written in Python
OpenProject Collaborative project management
MyCollab Project Management, CRM and Document Management
Taiga Web-based tool for agile project management
Redmine Flexible application written using the Ruby on Rails framework
ProjectLibre Standalone replacement for Microsoft Project
GanttProject Graphical Java program for editing Gantt charts
eGroupWare Enterprise ready web-based groupware suite with project management
dotProject Web-based, multi-user, multi-language project management application
Taskjuggler Modern and powerful open source project management tool
Planner The GNOME project management tool
Libreplan Project planning, monitoring and control

PackageManagementTools - Debian Wiki

Telegram linux

wget -O - https://tdesktop.com/linux > tsetup.tar.gz

Run Two or More Terminal Commands at Once in Linux

A ; B – Run A and then B, regardless of the success or failure of A
A && B – Run B only if A succeeded
A || B – Run B only if A failed

8 Most Awesome Quick File Searching Tools for Linux Desktop

7 Essential Tools to Search the Filesystem - LinuxLinks

9 Best File Comparison and Difference (Diff) Tools for Linux

Thunar custom actions

PCLinuxOS Magazine - Page 8

How to check the health of a hard drive

sudo fdisk -l
or
lsblk

sudo badblocks -v /dev/sda10 > badsectors.txt

------------ Specifically for ext2/ext3/ext4 file-systems ------------
$ sudo e2fsck -l badsectors.txt /dev/sda10
OR
------------ For other file-systems ------------
$ sudo fsck -l badsectors.txt /dev/sda10

 

sudo smartctl -a /dev/sda | less

badblocks is one more useful utility; it shows the amount and location of bad blocks on your drive:
sudo badblocks -v /dev/sda

 

sudo apt install gsmartcontrol

sudo apt install smartcontrol

 

$ man smartctl
$ smartctl -h

 

$ sudo smartctl -H /dev/sda10

smartctl -a /dev/sdX >> /home/username/Documents/drive-report.txt

Unless you consider running chkdsk.exe under wine or virtualisation, Linux cannot run it. There is a linux compatible tool that can be used to fix ntfs partitions that is called ntfsfix and is available on most distribution repositories.
It is NOT chkdsk for Linux and may not produce results compatible with Microsoft Windows, however it is able to fix some common ntfs possible problems. It may lose your data while attempting repairs, even though chkdsk may do that too. Example usage:
ntfsfix /dev/sdxY
Where you should replace xY with the appropriate letters for the partition you want to fix.

Yes. This was handled by fsck on some releases. If the partition is not listed in /etc/fstab, then you will likely need to tell it the partition type. I've used this from a Linux CD to recover a partition Windows wouldn't boot from.
Based on the comments below, the actual fixing is done by the ntfsfix program. It should be available, even if there is no program to run a fsck on and NTFS file system.

 

ntfsfix /dev/sdxx
This command comes from ntfsprogs.
Do be warned (from the man page):
ntfsfix is a utility that fixes some common NTFS problems. ntfsfix is NOT a Linux version of chkdsk. It only repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

In my case, none of fsck & ntfsfix could fix the issue of my external NTFS mobile disk.
I end up to boot into windows os, and use follow steps to fix the disk issue.
Steps:
Check the identifier of the bad disk. e.g g
Open the "cmd" terminal of windows.
Input chkdsk : /f to fix it.
Where is the identifier, e.g chkdsk d: /f
Then it would be fixed within seconds (For a disk of size 1Tb).
After years, finally I found something that windows can do easily, but linux can't ;)

How to Check Bad Sectors or Bad Blocks on Hard Disk in Linux

windows - NTFS Repair - chkdsk from Linux - Unix & Linux Stack Exchange

How to check hard drive health on Linux

disk - Checking a NTFS drive with Linux - Ask Ubuntu

df

برای نمایش حافظه اشغال شده توسط حافظه است

df etc

sudo apt install ncdu

ncdu -x /

sudo apt install qdirstat

sudo apt install baobab

sudo apt install xdiskusage

sudo apt install duc

duc index /usr

duc gui /usr

dd

برای درست کردن دیسک بوت

How to use dd in Linux without destroying your disk | Opensource.com

Format Hard

sudo mkfs -t ext4 /dev/sdb1

ISO

GUI to mount disk images (iso, etc) in Xubuntu? - Ask Ubuntu

عدم استفاده از تمام ظرفیت سی پی یو

ps -A -o pcpu | tail -n+2 | paste -sd+ | your command

Explanation:

ps: In most Unix and Unix-like operating systems, the ps program displays the currently-running processes
tail: display the tail end of a text file or piped data
paste: It is used to join files horizontally (parallel merging) by outputting lines consisting of lines from each file specified, separated by tab as delimiter, to the standard output. When no file is specified, or put dash (“-“) instead of file name, paste reads from standard input and gives output as it is until a interrupt command [Ctrl-c] is given.

درصد مشغولیت سی پی یو

grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage "%"}'

Virtualization

KVM vs. Xen vs. VirtualBox Virtualization Performance

VirtualBox

Debian -- Package Search Results -- virtualbox

KVM

sudo apt install qemu-kvm libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager -y
sudo systemctl status libvirtd.service
How to Install and Configure KVM on Debian 10 (Buster)

Xen - Debian Wiki

How to Run Windows on Linux Using Xen | by William Schwab | Better Programming

Xen

Qemu-kvm

Qemu: QEmu is a complete and standalone software of its own. You use it to emulate machines, it is very flexible and portable. Mainly it works by a special 'recompiler' that transforms binary code written for a given processor into another one (say, to run MIPS code on a PPC mac, or ARM in an x86 PC).
To emulate more than just the processor, Qemu includes a long list of peripheral emulators: disk, network, VGA, PCI, USB, serial/parallel ports, etc.
KQemu: In the specific case where both source and target are the same architecture (like the common case of x86 on x86), it still has to parse the code to remove any 'privileged instructions' and replace them with context switches. To make it as efficient as possible on x86 Linux, there's a kernel module called KQemu that handles this.
Being a kernel module, KQemu is able to execute most code unchanged, replacing only the lowest-level ring0-only instructions. In that case, userspace Qemu still allocates all the RAM for the emulated machine, and loads the code. The difference is that instead of recompiling the code, it calls KQemu to scan/patch/execute it. All the peripheral hardware emulation is done in Qemu. This is a lot faster than plain Qemu because most code is unchanged, but still has to transform ring0 code (most of the code in the VM's kernel), so performance still suffers.
KVM: KVM is a couple of things: first it is a Linux kernel module—now included in mainline—that switches the processor into a new 'guest' state. The guest state has its own set of ring states, but privileged ring0 instructions fall back to the hypervisor code. Since it is a new processor mode of execution, the code doesn't have to be modified in any way.
Apart from the processor state switching, the kernel module also handles a few low-level parts of the emulation like the MMU registers (used to handle VM) and some parts of the PCI emulated hardware.
Second, KVM is a fork of the Qemu executable. Both teams work actively to keep differences at a minimum, and there are advances in reducing it. Eventually, the goal is that Qemu should work anywhere, and if a KVM kernel module is available, it could be automatically used. But for the foreseeable future, the Qemu team focuses on hardware emulation and portability, while KVM folks focus on the kernel module (sometimes moving small parts of the emulation there, if it improves performance), and interfacing with the rest of the userspace code.
The kvm-qemu executable works like normal Qemu: allocates RAM, loads the code, and instead of recompiling it, or calling KQemu, it spawns a thread (this is important). The thread calls the KVM kernel module to switch to guest mode and proceeds to execute the VM code. On a privileged instruction, it switches back to the KVM kernel module, which, if necessary, signals the Qemu thread to handle most of the hardware emulation.
One of the nice things of this architecture is that the guest code is emulated in a posix thread which you can manage with normal Linux tools. If you want a VM with 2 or 4 cores, kvm-qemu creates 2 or 4 threads, each of them calls the KVM kernel module to start executing. The concurrency—if you have enough real cores—or scheduling—if not—is managed by the normal Linux scheduler, keeping code small and surprises limited.

AMD64

How to Run Android in QEMU to Play 3D Android Games on Linux – Linux Hint

How to Install and Configure KVM on Debian 10 (Buster)

Windows 10 Virtualization with KVM - Funtoo

Ubuntu 15.10: KVM vs. Xen vs. VirtualBox Virtualization Performance - Phoronix

Arm64Qemu

Emulating ARM with QEMU on Debian/Ubuntu · GitHub

Arm64Qemu - Debian Wiki

Virtualbox

sudo apt install virtualbox-guest-utils virtualbox-guest-dkms
sudo apt install build-essential dkms

Debian -- Package Search Results -- virtualbox

sudo apt install virtualbox-guest-utils virtualbox-guest-dkms
Then execute again sudo ./VBoxLinuxAdditions.run

To check the version of the Linux kernel run the command: $ uname -r OR $ hostnamectl | grep -i kernel

---------------

sudo apt install build-essential dkms
sudo apt-get install virtualbox-guest-additions-iso
---------------
Here are the manual steps to install VirtualBox Guest Additions kernel modules inside the VM:
Download the ISO file, e.g.
wget http://download.virtualbox.org/virtualbox/5.0.20/VBoxGuestAdditions_5.0.20.iso -P /tmp
Mount the ISO file:
sudo mount -o loop /tmp/VBoxGuestAdditions_5.0.20.iso /mnt
Run installer (add -x after sh to debug):
sudo sh /mnt/VBoxLinuxAdditions.run
---------------

In case we have installed the OSE edition of Virtual Box from the repositories we can add the guest additions from the repositories in the guest.

sudo apt-get install virtualbox-guest-additions-iso
/usr/share/virtualbox/VBoxGuestAdditions.iso

--------------
sudo apt install virtualbox-guest-dkms virtualbox-guest-x11 virtualbox-guest-utils
sudo apt-get install make gcc

--------

https://linuxhint.com/enable_kvm_kernel_module_on_raspberry_pi_os/
sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
sudo apt install qemu-launcher qemu-system qemu-utils libvirt-clients libvirt-daemon-system bridge-utils virtinst libvirt-daemon virt-manager qemu-system-gui virt-goodies libvirt0

Google-android-platform

Debian -- Details of package google-android-platform-24-installer in buster

How to Set or Change Timezone

timedatectl
ls -l /etc/localtime
timedatectl list-timezones
sudo timedatectl set-timezone Asia/Tehran
sudo timedatectl set-timezone Europe/Moscow

Xfce localization

Flash Player

Install Browser Extension Ruffle for run Adobe Connect in linux and debian

Ruffle | Flash Player emulator written in the Rust programming language

UGET

Display Name: Uget
Executable Name: uget-gtk
Arguments: --quiet [HREF]
Placement: Link Context

Hostinger:
IMAP (Входящая почта)
Хост: imap.hostinger.com
Номер порта: 993
Шифрование: SSL

SMTP (Исходящая почта)
Хост: smtp.hostinger.com
Номер порта: 465
Шифрование: SSL/TLS

Backup and Restore

To backup
sudo dd bs=4M if=/dev/sdb of=PiOS.img
To restore or clone to another card, use dd in reverse:
sudo dd bs=4M if=PiOS.img of=/dev/sdb
To backup
sudo dd bs=4M if=/dev/sdb | gzip > PiOS.img.gz
To restore, pipe the output of gunzip to dd:
gunzip --stdout PiOS.img.gz | sudo dd bs=4M of=/dev/sdb

Or

sudo apt-get install deja-dup

64 bits/amd64 Skype

64 bits/amd64
Download the Skype for Linux DEB.
wget https://go.skype.com/skypeforlinux-64.deb
Install.
sudo apt install ./skypeforlinux-64.deb
Note: Run this in the directory where the skypeforlinux-64.deb is located.

sudo gdebi /path/to/skypeforlinux-64.deb

sudoers

For issue: Username is not in the sudoers file. This incident will be reported

apt install sudo adduser

su -l
useradd m sudo
logout

 

usermod -a -G sudo user

sudo whoami

Kill a Application or Process

ps aux | grep [process name]
kill [process ID]

Or

pkill [process name]

Activate tap to click on touchpad?

SynapticsTouchpad - Debian Wiki

To enable the touchpad tapping permanently

sudo nano /etc/X11/xorg.conf.d/40-libinput.conf

Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "Tapping" "on"
EndSection

or

Section "InputClass"
Identifier "touchpad catchall"
Driver "synaptics"
MatchIsTouchpad "on"
## for natural scrolling
Option "VertScrollDelta" "-111"
Option "HorizScrollDelta" "-111"
## tap to click
Option "TapButton1" "1"
## two finger tap to Right click
Option "TapButton2" "3"
EndSection

How to Run Two or More Terminal Commands at Once in Linux

Here’s a useful summary of each of the operators used to combine commands:

A ; B — Run A and then B, regardless of the success or failure of A
A && B — Run B only if A succeeded
A || B — Run B only if A failed

Debian Reference

Loop

for f in *.rar; do unrar e $f; done

remmina

https://codepen.io/jaromvogel/pen/aNPRwG

https://demo.mobiscroll.com/javascript/calendar/single-select#

$d=date_create("2022-06-10T19:30");
echo "Created date is " . date_format( $d,"Ymdhi");

Bootable USB From an ISO

Ventoy
Balena-io etcher
Unetbootin
Rufus
Multiboot USB

 

MPV

mpv "Inside Out (2015).mkv" -sub-file "Inside Out (2015).en.srt" -sub-file "Inside Out (2015).fa.srt" -secondary-sid 2

mpv "Friends.S10E01.mkv" -sub-file "Friends.S10E01.en.srt" -sub-file "Friends.S10E01.fa.srt" -secondary-sid 2


Articles
Digital Media
Humanities
IT Management
Coumputer
Miscellaneous
Product & Services
About Fadak
Management
Contemporary Management Journal
Managerial Verses
Photography Quotes
Photo is written
Management Researcher Bank
Management articles titles
Educational Resources (Seminary & University)
Studies
Observatory - Personalities
Observatory - Cultural
Observatory - Academic
Observatory - Media
Observatory - scientific events
Language
Dictionary
Russian Language Test
Russian Proverb
English Proverb
Four language sentences
logo-samandehi
About | Contact With Us | Privacy Policy | Terms | Cookies Policy |
Version (Pre-Alpha) 2000-2022 CMS Fadak. ||| Version : 5.2 ||| By: Fadak Solutions Old Version