Welcome!
Forum users

Current releases
--MX-23 release info here
--Migration information to MX-23 here
--antiX-23.1 (Arditi del Popolo) release info here

Important information
--If in starting your system it boots to an unwanted Desktop, right click desktop, then select leave and logout. At the
login screen there is a session chooser at the top of the screen.

News
-- MX Linux on social media: here
-- New Forum Features, Marking Solved and Referencing a User: here

Tips and Tricks

Topics relating to MX Docs and MX Videos
Message
Author
User avatar
eemaestro
Posts: 52
Joined: Wed Aug 02, 2006 12:12 pm

Re: Tips and Tricks

#31 Post by eemaestro »

asinoro, what did I forget to do ? Am I using the wrong syntax ?

Code: Select all

$ ls -Fdltr strong*
-rwxr-xr-x 1 george 100 198 May 23 10:40 strongpw*
$cat strongpw
strongpw () {
echo -n "Enter secret:"
read -r
echo '' # line break
echo -n "$ REPLY: $ 1" | sha256sum | perl -ne "s / ([0-9a-f] {2}) / print chr hex \ $ 1 / gie" | base64 | tr + / Ea | cut -b 1-20
$ strongpw(google.com)
bash: syntax error near unexpected token `google.com'

asinoro
Posts: 152
Joined: Mon Feb 22, 2016 12:26 pm

Re: Tips and Tricks

#32 Post by asinoro »

eemaestro wrote:asinoro, what did I forget to do ? Am I using the wrong syntax ?

Code: Select all

$ ls -Fdltr strong*
-rwxr-xr-x 1 george 100 198 May 23 10:40 strongpw*
$cat strongpw
strongpw () {
echo -n "Enter secret:"
read -r
echo '' # line break
echo -n "$ REPLY: $ 1" | sha256sum | perl -ne "s / ([0-9a-f] {2}) / print chr hex \ $ 1 / gie" | base64 | tr + / Ea | cut -b 1-20
$ strongpw(google.com)
bash: syntax error near unexpected token `google.com'
The correct way:
strongpw google.com

or having different result:
strongpw google
If your case is solved, edit [Solved] to your initial post title to help other users.

Fix your Grub

asinoro
Posts: 152
Joined: Mon Feb 22, 2016 12:26 pm

Re: Tips and Tricks

#33 Post by asinoro »

Reboot keyboard combination

As Windows user you know that the combination of the keys ctrl+alt+delete restarts the computer.
To have the same result you have to go:
Settings > Keyboard > Applications Shortcut > and you find the xflock4 command where it is to lock the screen > Edit > and change to a key combination ctrl+alt+L > OK > where you will have a visual verification.
Now you can add your reboot command: Add > Command > xfce4-session-logout –reboot > OK > you press ctrl+alt+delete > where you will have a visual verification.
You are ready!
If your case is solved, edit [Solved] to your initial post title to help other users.

Fix your Grub

User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Tips and Tricks

#34 Post by penguin »

Making Screen shoots of your screen and save it automatically somewhere ....

I use this :

Code: Select all

#!/bin/bash
scrot /home/user/Screenshots/$(date +%F_%T:%3N).png
As you see scrot package (terminal screenshot utility) needs to be installed in your system.By default as I know it is installed.
Write above lines in an editor and save it as : as_you_wish.sh ( I use crshoot.sh). Make it executable.
Save this file somewhere .Let's say in the directory Scripts that you have created under /home/user/Scripts/
Now go to: Whicker Meny >Settings>Keyboard>Application Shortcut and click Add+. For the Command give the pathname of file including name; lets say /home/user/Scripts/crshoot.sh
As Command Shortcut press PrtScr. Done!
Now each time you press PrtScr a screenshot will be saved under : /home/user/Screenshots/ named by the exacts time when you clicked PtrScr button.

Instead of png you can use jxfce4-screenshooterxfcepg or bmp.

Meanwhile you can reserve Shift+PtrScr (in the same way : Whisker>Menu>Settings>Keyboard>Applications ) for xfce4-screenshooter :happy:
Last edited by penguin on Tue Jun 20, 2017 4:44 pm, edited 1 time in total.

User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Tips and Tricks

#35 Post by penguin »

The follow command in the terminal :

Code: Select all

dpkg --list >~/packages_till_$(date +%F_%T:%3N)
will save in a file log of all packages installed in your system till the moment you asked for this log. The file is save under directory ./user/.

Log looked something like this :

User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Tips and Tricks

#36 Post by penguin »

Cleaning of your terminal history

After trying :

Code: Select all

history - c
or something else I found in the follow website :

Code: Select all

https://unix.stackexchange.com/questions/203290/how-do-i-clear-the-terminal-history
that writing down in terminal

Code: Select all

cat /dev/null > ~/.bash_history && history -c && exit
Can do very well this job :happy:

User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Tips and Tricks

#37 Post by penguin »

Cleaning up of your system:
I use as follow :

Code: Select all

rm -v -f ~/.cache/thumbnails/*/*.png ~/.thumbnails/*/*.png && rm -v -f ~/.cache/thumbnails/*/*/*.png ~/.thumbnails/*/*/*.png  &&
sudo apt-get update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove && sudo updatedb

User avatar
penguin
Posts: 260
Joined: Wed Jan 04, 2017 3:15 pm

Re: Tips and Tricks

#38 Post by penguin »

Cleaning of your tmp history:

Code: Select all

for i in /tmp/* ; do rm -r "$i" ; done
found somewhere in the Arch forum.

and :happy:

Code: Select all

e4defrag /
to defrag your / in a ext4 file system :happy: . Some times also linux have bennefits from defrag.Pay attention!Use defrag only if your system is installed in a HDD. Do not use this command if your system is installed in a SSD. Mx Linux has activated fsrim-mx timer that run fstrim utility frequently as maintenance for triming of SSD.
I do not remember very well .The originally fstrim-mx timer (that activates fstrim service) is under /etc/cron.daily/ or /etc/cron.weekly/ ?
You can check for this.Much better to be under /etc/cron.weekly/. One trim per week is enough for SSD.

It is a very interested discussion there

Code: Select all

https://forum.manjaro.org/t/fstab-okay-for-ssd/894/6
.

asinoro
Posts: 152
Joined: Mon Feb 22, 2016 12:26 pm

Re: Tips and Tricks

#39 Post by asinoro »

After suspend resume no mouse cursor

I experience in the past this issue with Mint and MX 15 and after the recent upgrade to 16.1. I solved it by trying to kill the mouse activity where in monitor-task manager is as kpsmoused.
Because some things are difficult to remember and no visual contact to see first you use Superuser key and type task to start the task manager to monitor your system.
After Ctrl+F and type mouse and find the PID of kpsmoused.
Then Ctrl+Alt+T to start the terminal.
And then the command,
sudo kill PID where PID is the number of kpsmoused.

I hope it will help this trick if you experience this annoying situation.
If your case is solved, edit [Solved] to your initial post title to help other users.

Fix your Grub

asinoro
Posts: 152
Joined: Mon Feb 22, 2016 12:26 pm

Re: Tips and Tricks

#40 Post by asinoro »

Fix MX EFI Grub after install of Mint 18.2

Not all the Linux OS have the politeness to let choose the user to keep its Grub version.
After installing Mint 18.2 it install its own version of grub but I want my own of MX 16.1 with the Kingfisher image.
How to reinstall your MX EFI Grub:

Code: Select all

sudo su

Code: Select all

blkid
Mount your efi partition where sdaX or sdbX according blkid.

Code: Select all

mount /dev/sdaX /boot/efi
Install grub on hard drive sda or sdb or whatever is your drive in the example is the normal sda.

Code: Select all

grub-install /dev/sda

Code: Select all

update-grub
You are ready you have again install your MX grub.
If your case is solved, edit [Solved] to your initial post title to help other users.

Fix your Grub

Locked

Return to “Documentation and videos”