> Linux Reviews >

Tips and Tricks

Tips and Tricks v1.0.3 (en)

Quick and simple tips for a more productive day.

Things you may find handy to know

How to get bash to clean the screen after logging out?

echo "clear" >> .bash_logout

The file .bash_profile is loaded when you login. You can place aliases here. The file .bash_history keeps track of your last commands.

Mozilla and Firefox

Simply run "xine /misc/cdrom" to play whatever content is on a CD with xine.

Cut and Paste in X

You can select any text in X-Windows using the mouse and instantly paste it by clicking on the third mouse button. Two button mouse users emulate three by pressing both. On modern mice the third button is commonly found on the mouse wheel.

Using bash and other shells

How do I change the resolution in X?

You can change your resolution on the fly in X with the tool xrandr. This is a command line utility. You can do this in Gnome from the control panel.

KDE has a nice frontend called krandrtray. It can be used with most window managers, like fluxbox. krandrtray allows you to change Hz, resolution and control power saving features.

You can also change your resolution on the fly with ctrl + alt + + and ctrl + alt + -.

kate - kde text editor

Writing a list in kate? Press ctrl + enter instead of just enter at end of a line to start a the next new line with the beginning of the previous line.

X11 - Use the keyboard as mouse

You can turn mouse emulation on/off by pressing shift+num-lock. This allows you to use the number keypad as a mouse.

Is someone bothering and messing with you?

Then find their IP address in your logs and simply add this to your iptables firewall:

  BADIP="24.83.73.244"
  iptables -A INPUT -i all -s $BADIP/24 -j DROP

Bruk iptables -L -v for å se gjeldene regelsett. Noen system vil automatisk lage dine iptables innstillinger ved utlogging.

You should make sure you have a firewall running with strict rules.

You can ensure that it is started at boot with the following commands:


> Linux Reviews >
Tips and Tricks