PC Doctor Godalming

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

Category: Ubuntu

Linux variant primarily used on Desktops and Laptops.

Ubuntu No Sound Audio Output Dummy Device

If audio output device set to Dummy Device reset audio as follows:

pulseaudio --kill; sleep 2s; sudo alsa force-reload ;
pulseaudio --start

Restart audio application(s), e.g. Spotify

This works with Ubuntu 18.04 and may work for other versions too

How to mount NTFS volume

  • ls /media
  • If you don’t see a folder for your Windows partition, you should create one with the following command:

    sudo mkdir /media/windows

  • Next, mount the partition in read-only mode onto this folder with this command:

    mount -t ntfs-3g -o ro /dev/sda3 /media/windows

Remove VirtualBox from Ubuntu

If you need to completely remove VirtualBox, e.g. because a new version install fails preventing future installations then from the Console run commands below:

List VirtualBox installations

sudo dpkg -l | grep virtualbox

Example below

sudo dpkg -l | grep virtualbox
rc virtualbox-4.3 4.3.30-101610~Ubuntu~raring amd64 Oracle VM VirtualBox
iW virtualbox-5.0 5.0.28-111378~Ubuntu~trusty amd64 Oracle VM VirtualBox

Purge these installations in sequence replacing 4.3 and 5.0 with your versions  and answering ‘Y” to questions

sudo  apt-get purge virtualbox-4.3 virtualbox-qt

sudo  apt-get purge virtualbox-5.0 virtualbox-qt

After reboot you should be able to reinstall VirtualBox without errors

Continue Reading

Download project folder from GitHub using subversion

Install Subversion (SVN) as follows:

sudo apt-get install subversion

This command exports the GitHub PROJECT folder and subfolders and to DEST

svn export https://github.com/USER/PROJECT/trunk/PATH DEST

Suffix the PROJECT folder with /trunk and append the folder /PATH you wish to download. If the DEST folder does not exist it is automatically created.

For example the following command copies Tutsplus 30-days-to-jquery/lessons folder to lessons folder on the local drive:

svn export https://github.com/tutsplus/30-days-to-jquery/trunk/lessons lessons

Continue Reading

Create ISO file from CD/DVD using DD

In Linux/Ubuntu to create an ISO from a CD/DVD is simplicity itself using the DD command

Use lsbk to determine the CD device name

sda      8:0    0   1.8T  0 disk
├─sda1   8:1    0    50G  0 part /
├─sda2   8:2    0    10G  0 part [SWAP]
├─sda3   8:3    0   1.6T  0 part /home
└─sda4   8:4    0    50G  0 part
sdb      8:16   0   1.8T  0 disk
├─sdb1   8:17   0   100G  0 part
├─sdb2   8:18   0    20G  0 part
├─sdb3   8:19   0   250G  0 part
├─sdb4   8:20   0     1K  0 part
├─sdb5   8:21   0    50G  0 part
├─sdb6   8:22   0  1000G  0 part /media/NTFS_DATA
└─sdb7   8:23   0   443G  0 part
sr0     11:0    1  25.6M  0 rom  /media/mike/NEW 
loop1    7:1    0  25.6M  1 loop /media/iso

Create ISO file with DD

dd if=/dev/sr0 of=/home/mike/Downloads/test.iso

Create Mount Point

sudo mkdir /media/iso

Mount ISO file

sudo mount -o loop /home/mike/Downloads/test.iso /media/iso

Unmount ISO File

sudo umount /media/iso

Remove Mount Point

sudo rmdir /media/iso

Continue Reading

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

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

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