Saturday, May 29, 2021

Linux (Ubuntu) tips and tricks

File manager (File explorer) with expandable tree

Often the simple "Files" app is preinstalled in Ubuntu.
Unfortunately, the expandable tree view is not setup by default. To show it, press the hamburger menu in the top right corner.

In the pop up window, press "Preferences".

Check "Allow folders to be expanded"

How to change terminal theme

Unfortunately, obvious way does not work. In Ubuntu terminal, we click hamburger menu in the top right corner -> Preferences -> General -> Theme Variant -> and nothing changes...
We select "Dark", however the terminal is still light..
Instead, we need to go to Hamburger menu in the top right corner -> Preferences -> Profile name (in our case "unnamed") in the bottom left menu -> Colors -> Built-in schemes. Voila!

How to include an app in startup list of Ubuntu

Press "Windows" button.
Type in search text box "startup"
Press "Startup Applications Preferences"

Press "Add"
Press "Browse" and choose path to the script infra.
If we add script, we need to create .sh script file with the commands to launch upon a startup. In the .sh file, we list commands to launch programs at startup like if we would launch them from the terminal.
Then we need to make this script executable by running in the terminal:
chmod +x myscript.sh
where "myscript.sh" is the name of our script name

How to turn off the Caps Lock key in Ubuntu

Open the Terminal and execute the following command:
xmodmap -e "keycode 66 = Shift_L NoSymbol Shift_L" 
Credits to this askUbuntu question.

Internet does not work

It could happen especially after the system update. In that case, there would be an error sign with unknown error in the corner of the task panel.
Check the Internet source (i. e. the phone's Wi-Fi hotspot), reload it (reload, reboot the phone).
Try to connect to another Internet source (another Wi-Fi).
Restart the laptop.
Do hard reset instead of regular restart for the laptop: when it is turned on, press the Power button and hold it pressed for 10 seconds to completely turn off the laptop. Then turn it on again.
If nothing of this helps, google the problem and ask the question on forums.

Set up directory to open at terminal startup (by default)

vim ~/.bashrc
In the end of the file, add the following line:
cd "my default directory"

Increase the sound above limit

If the current sound level is not high enough:
Press "Windows" button
Type "Sound" in search box
Choose "sound" in Settings
In the "System volume" section, toggle "Over-Amplification"
Increase the sound level via regular increment button

How to hide the computer and user name in every line of the terminal

Open in the terminal ~/.bashrc file with any text editor, e. g. write in the terminal:
vim ~/.bashrc
In the end of the file, add the line:
export PS1='$ '

Exit the terminal and launch it again. Now we should see the empty name in the terminal command line:

$ 

No comments:

Post a Comment