How to activate or deactivate a Linux host with Gnome remotely?

Posted on

I have a Fedora Linux server with Gnome 3. I want to lock / unlock the remote Gnome desktop remotely. How to activate or deactivate it remotely through SSH? Use gnome-screensaver-command. It is not specific to Gnome 3. Turn the screensaver on (blank the screen): $ gnome-screensaver-command -a If the screensaver is active then deactivate
Read more

Chrome reports “Adobe Flash Player was blocked because it is out of date.”

Posted on

On Linux (Fedora 17 x86-64), Chrome keeps reporting “Adobe Flash Player was blocked because it is out of date.” every time I browse a page that contains Flash. How to fix this? I did this and it turned to be working for me: Disable the libpepflashplayer in Chrome by run chrome://plugins/ in the URL bar.
Read more

3 Ways of Making Case Insensitive Search in Vim/Vi

Posted on

By default, Vim/Vi’s search is case sensitive. However, if I want to search case insensitively, is there any method? For example, I search for dog, instead of matching dog only case sensitively, I also want to find out phases containing Dog, DOg, etc. There are several methods: 1. Setting the search to be case insensitive
Read more

Make changes to sysctl.conf take effect without rebooting Linux?

Posted on

I made some changes to /etc/sysctl.conf. I know it will take effect next time Linux boots. However, how to make the changes to sysctl.conf take effect without rebooting Linux? You can force Linux to reload the new configuration in /etc/sysctl.conf by: execute the following command as root: sysctl -p For more details, check the manual
Read more

How to quickly find out failed disks’ SATA port in Linux? (how to map Linux disk names to SATA ports)

Posted on

I find one disk failed on my server which have several ones installed. I know the disk’s name in Linux (e.g. sda, sdb). However, the Linux disk name to SATA port mapping does not follow the same order. Now, I want to find out the failed disks. How to quickly find out them and which
Read more

Git: setting a local branch’s upstream tracking branch

Posted on

How to set a local branch’s upstream tracking branch in git? For example, I want to track remote repository ‘origin’ ‘s branch ‘demo’ with the local ‘demo’ branch. You can set tracking information for the current branch (say cur_branch) of upstream branch (say also cur_branch) in remote repository origin with: git branch –set-upstream cur_branch origin/cur_branch

Gnome: disabling / deleting keyrings

Posted on

How to disable/delete the current keyrings on gnome? If the Gnome keyrings are not needed, or we forget the password, we can disable/delete the current keyrings. The keyrings are stored under ~/.gnome2/keyrings/ To disabled or delete current keyrings, we can simply delete this folder: rm -rf ~/.gnome2/keyrings/ Remember to backup this directory if you still
Read more

Installing Latex and Compiling a Latex Docuent in Linux

Posted on

Latex is a popular document preparation system that is widely used for creating scientific and technical documents. Compiling Latex documents on Linux is a straightforward process that requires only a few Latex packages and a set of commands. By following the steps outlined in this post, you can easily compile Latex documents on your Linux
Read more

Google Chrome keyboard and mouse shortcuts for Linux and Windows

Posted on

What are the Google Chrome keyboard and mouse shortcuts for Linux and Windows? Keyboard shortcuts of Chrome can make it easier to control the browser and save our time. Here are a list of commonly used shortcuts: Ctrl+T Opens a new tab. Press Ctrl and click a link. Or click a link with your middle
Read more