If you often find yourself accidentally triggering the emoji picker in Linux by CTRL + Period (CTRL + .), you may want to disable the hotkey that brings it up. In this post, we will show you how to disable the emoji hotkey using the gsettings command. The emoji picker in Linux is typically activated
Read more
Tag: terminal
Installing Zlib in Ubuntu 22.04
Posted onZlib is a popular open-source compression library used by many software applications to compress and decompress data. It provides fast and efficient compression and decompression algorithms that can be used to reduce the size of data, which can improve performance and reduce storage requirements. In this post, we will discuss how to install zlib in
Read more
2 Ways of Modifying macOS Keyboard’s Right Option to Control for Mac Pro
Posted onFor heavy Terminal/Shell/command line users, the Control key is a very frequently used key. However, in Mac Pro keyboard, there is only a single left Control key for some models. This cause quite some inconvenience. In this post, we will go through how to configure/remap the keys to “create” a right Control key. Remap keys
Read more
Install R and RStudio Desktop in macOS
Posted onWe ever discussed How To Install R and RStudio Desktop in Ubuntu Linux 20.04. In this post, we introduce how to install R and RSTudio Desktop on macOS. Install R environment Install R environment as follows using Homebrew. $ brew install R Then verify that the R environment is installed and ready, by running in
Read more
How to Match Multiple Lines using Regex in Perl One-liners
Posted onPerl one-liners with perl’s regular expression statement can be a very powerful text processing tools used as commands in a terminal or a script. By default, the input to the perl one-liner with -p or -n options is passed line by line. However, when we want to match multiple lines, it gets us some trouble.
Read more
Installing Zlib from Source Code in Ubuntu Linux
Posted onZlib is a popular open-source compression library used by many software applications to compress and decompress data. While it can be installed in Ubuntu using the apt package manager, you may need to install it from the source code if the version available in the Ubuntu repositories is outdated or if you need to customize
Read more
Auto Pressing Multiple Keys Together in Linux
Posted onThis post introduces a key presser on Linux with xvkb. But how to simulate pressing multiple keys together on Linux? That is, I would like to have multiple keys such as “A” “B” “C” “D” pressed together and being hold. How to simulate this on Linux with programs/commands? You can make use of xdotool (xdotool:
Read more
How to export Google Chrome password on Linux?
Posted onHow to export my Google Chrome password on Linux to a human-readable text file? In newer versions of Chrome, the passwords are stored using the encrypted password storage provided by the system, either Gnome Keyring or KWallet. We need to force Chrome to use a temporary profile folder with unencrypted password storage. Step 1. Connect
Read more
How to display chinese character in lxterminal
Posted onDo you know how to display chinese character in lxterminal? I tried to install lxterminal on my workstation and it seems display Chinese characters well: FYI, my Linux system is Fedora 21. The lxterminal version: $ rpm -q lxterminal lxterminal-0.1.11-10.fc21.x86_64 Not sure what’s the reason why it does not work for you. You may check
Read more
How to add a “status bar” to screen on Linux?
Posted onI noticed that some guys’ screen console has a status bar with tab numbers. That will be very useful for 1) know you are using screen rather than a normal terminal. 2) which tab you are working in. Below is my ~/.screenrc: hardstatus alwayslastline hardstatus string ‘%{= kG}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}]’ It
Read more
How to unlock a locked SSH terminal accidentally by ctrl-s on Linux?
Posted onI find I sometimes lock the SSH terminal accidentally by ctrl-s on Linux. How to unlock/unfreeze it? Ctrl-s: lock the SSH terminal. Ctrl-q: unlock the SSH terminal.
Manage Linux console screen by commands?
Posted onHow to manage Linux console screen by commands? When the screen will be blanked? Put the screen into powerdown mode or power off the screen? 2 tools are useful for managing the console screen on Linux: setterm – set terminal attributes.vbetool – run real-mode video BIOS code to alter hardware state. When the screen will
Read more
Cannot connect QEMU guest os with vncviewer
Posted onThe question is as follows. harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024 VNC server running on `::1:5900′ harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:1 vncviewer: ConnectToTcpAddr: connect: Connection refused Unable to connect to VNC server Solution (add -vnc parameter for qemu-system-x86_64): harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024 -vnc 127.0.0.1:2 harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:2
Read more
Replacing with a string with newline in Emacs?
Posted onHow to replacing a string with another string with newline in Emacs? For example, to replace: good editor with good editor: Emacs What you need is actually to input a newline in Emacs: C-q C-j C-q is for quoted-insert, and C-j is a newline (0xa).
How to convert between dos and unix file coding in Emacs?
Posted onHow to convert between dos and unix file coding for files in Emacs? From Dos to Unix coding: M-x set-buffer-file-coding-system RET undecided-unix or C-x RET f undecided-unix Then save the file (C-x C-s). From Unix to Dos M-x set-buffer-file-coding-system RET undecided-dos or C-x RET f undecided-dos Then save the file (C-x C-s).
Bash comparison operators
Posted onWhat are all the bash supported comparison operators? The man 1 test contains all the operators supported in bash. An omitted EXPRESSION defaults to false. Otherwise, EXPRESSION is true or false and sets exit status. It is one of: ( EXPRESSION ) EXPRESSION is true ! EXPRESSION EXPRESSION is false EXPRESSION1 -a EXPRESSION2 both EXPRESSION1
Read more
How to turn the space bar to another ctrl key?
Posted onHow to turn the space bar to another ctrl key? It will be dam useful especially for Emacs users and also useful for normal usage like for tab changing in Chrome or Gnome terminal. You may try 2 tools in userspace: Space2Ctrl: https://github.com/r0adrunner/Space2Ctrl xcape: https://github.com/alols/xcape Note that the limitation of these solutions: the space will
Read more
How to print a plain text file to printers from a terminal in Linux
Posted onHow to quickly print a plain text file to printers from a terminal in Linux? You can also use enscript: enscript – convert text files to PostScript, HTML, RTF, ANSI, and overstrikes https://www.systutorials.com/docs/linux/man/1-enscript/ enscript text-file The lp command can print a plain text file to a printer. My favorite command: cat text-file | lp -o
Read more
How to add a space between the line numbers and text content in Emacs?
Posted onI use Emacs in console. The linum-mode displays the line numbers just well. However, in the console, there is no space between the line numbers and the text content, which makes it a little messy some times. How to add a space between the line numbers and text content in Emacs? If you are using
Read more
How to make eps files using gnuplot
Posted onHow to make gnuplot generate eps files instead of plot the figures on screen? First, save a Gnuplot plot as a PostScript file by this commands: # gnuplot> load ‘saveplot’ # gnuplot> !mv my-plot.ps another-file.ps The saveplot file’s content: set size 1.0, 0.6 set terminal postscript portrait enhanced mono dashed lw 1 “Helvetica” 14 set
Read more