PC Doctor Godalming

Dedicated to Fixing Computers of all Shapes and Sizes
01483 424378
07876 476990

Category: Linux

Linux based Operating Systems

Terminal History Manipulation

 BASH (Bourne Again SHell) is the default command line shell used in Ubuntu and Kubuntu and many other Linux distributions. BASH allows you view and manipulate the command line history.

The following examples are from Kubuntu Konsole

List History

user@hostname:~$ history
1 sudo restart
2 sudo restart --help
3 reboot
4 sudo reboot
.
..
...
709 history
user@hostname:~$

List last 10 lines of history

user@hostname:~$ history 10
700 dmesg | less | grep error
701 sudo nano /etc/modprobe.d/alsa-base.conf
702 history
703 ls
704 cd Annex
705 cd Annex 1
706 cd Music
707 cd ..

Continue Reading

Kate editor not parsing @media queries correctly

This problem exhibits itself when viewing css files with @media {…} queries with Kate text editor versions < v3.14. Kate highlights these sections incorrectly with  red underline or similar.

The fix for this bug is to add <DetectSpaces/> to the MQEV context of Kate’s  css.xml highlighting file so that it parses spaces after @media attribute and before the curly brace correctly.

In Kubuntu 14.04 css.xml is located in /usr/share/kde4/apps/katepart/syntax/css.xml

Edit this file with Kate as follows

kdesudo kate /usr/share/kde4/apps/katepart/syntax/css.xml

Find the second occurrence of “MQEV”

Continue Reading

Disable Linux Mouse Scroll Wheel Click Paste

Follow the steps below to disable mouse middle or wheel click button:

From Terminal run xinput to discover the mouse device name

xinput list
⎡ Virtual core pointer                          id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ Microsoft Microsoft® Classic IntelliMouse®        id=10   [slave  pointer  (2)]
⎣ Virtual core keyboard                         id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ Belkin Corporation Flip CC                id=8    [slave  keyboard (3)]
    ↳ LITE-ON Technology USB NetVista Full Width Keyboard.

Continue Reading

Stop Spotify Stealing Windows Focus

This cure is applicable to Linux based systems such as Kubuntu and Ubuntu.

Stop those annoying pop-ups intruding into your workspace by simply running Spotify Music player in a second desktop window and leave it maximised as follows:

  1. Go to System Settings/Workspace Behaviour/Virtual desktops and increase the number of desktops to 2
  2. Activate second desktop by typing Ctrl-F2
  3. Launch Spotify and select the music you like to play
  4. Switch back to main desktop by typing Ctrl-F1 or select desktop from System Tray icon and continue working!

Continue Reading