Quick way to switch from KDE to GNOME or viceversa

in Categories CentOS, Howto, Linux, Linux desktop, Linux distribution, Linux laptop, RedHat/Fedora Linux, Tips last updated September 7, 2006

This tip is submitted by reader Zacharie:

switchdesk is the command to switch from KDE to GNOME or viceversa. This command provides a simple method of choosing between the various desktop environments available under Fedora Core, Cent OS and Red Hat Enterprise Linux.

If X Windows is running, switchdesk will bring up a dialog box which allows the user to choose between the available desktops installed on the system.

Task: To switch from GNOME to KDE, use the command

$ switchdesk kde

Task: To switch from KDE to GNOME, use the command

$ switchdesk gnome

Please note that file ~/.Xclients, ~/.Xclients-default stores the currently selected desktop.

A note about other distros/BSD

switchdesk is RedHat and friends only command. If you are using different Linux distribution or FreeBSD, open ~/.xinitrc file and type full path to your desktop manager. For example, to use xfce4 desktop:
$ vi .xinitrc
Append following line (your path may be different use, which command to get exact path):
/usr/X11R6/bin/startxfce4

Save and close the file. Enjoy new desktop.

While login you will see option for different desktops (provided that all of them are installed). Usually this is located below Username / password box or lower left button. Just select appropriate desktop (KDE/XFC4 etc).

Load KDE while running Gnome

You can load KDE while running Gnome desktop (thanks to sweta for pointing it out):
Just open your gnome terminal and type the command:
$ startkde &

Knock-based commands for your Linux laptop

in Categories Howto, Linux laptop last updated July 28, 2006

Knock some sense into your computer with an HDAPS-aware kernel, an accelerometer-enabled laptop, and this Perl script.

FTA, “For the first time, you can hit your computer and get a meaningful response! Using Linux and the Hard Drive Active Protection System (HDAPS) kernel drivers, you can access the embedded accelerometers on Lenovo (formerly IBM) ThinkPads, then process the accelerometer data to read specific sequences of “knocking” events — literally rapping on the laptop case with your knuckles — and run commands based on those knocks. Double tap to lock the screen, and knock in your secret code to unlock. Tap the display lid once to move your mp3 player to the next track. The possibilities are endless”, Read more at IBM developerworks

Good stuff, but mostly it will work with IBM laptops only.

SSH Public Key Based Authentication on a Linux/Unix server

in Categories CentOS, Debian Linux, FreeBSD, Gentoo Linux, Howto, Linux, Linux desktop, Linux laptop, OpenBSD, RedHat/Fedora Linux, Solaris, Suse Linux, Sys admin, Tips, Ubuntu Linux, UNIX last updated January 3, 2018

The SSH protocol recommended a method for remote login and remote file transfer which provides confidentiality and security for data exchanged between two server systems. The SSH depends upon the use of public key cryptography. The OpenSSH server offers this kind of setup under Linux or Unix-like system. This how-to covers generating and using ssh public keys for automated usage such as:

  1. Automated Login using the shell scripts
  2. Making backups
  3. Run commands from the shell prompt and more
  4. Login without password