Showing posts with label Tricks. Show all posts
Showing posts with label Tricks. Show all posts

Tuesday, August 12, 2014

Microphone Not Working on Skype

I believe there might be various reason why microphone not working correctly under Skype for Ubuntu. For my case, my laptop is Lenovo Y500 (with dual GT650M), and ubuntu version 14.04 64-bit. From what I read from various forum, the problem happen because Pulseaudio from ubuntu assumed that the laptop comes with stereo mic, but the real case is that some laptop only comes with single mic (forums say that this problem will not happen for laptop with stereo mic, but I am not too sure about this). Somehow both left and right mic will cancel out each other in Pulseaudio causing no sound being received by Pulseaudio.

One way around this, which is working for me is to install PulseAudio Volume Control, and mute one side of the mic volume.

1. Install PulseAudio Volume Control from Ubuntu Software Center. Search for PulseAudio Volume Control and click Install.

2. Set one channel of the mic to 0% and another channel to 50%. Run PulseAudio Volume Control by searching it from Unity Dash. Jump to the 4th tab (Input Devices), click the top right Lock icon to unlock the left and right channel "lock" and turn the volume of one channel to 0%, and another channel to around 50%. The lock Icon on the top right will lock the volume adjustment of the left and right channel together, make sure it is unlocked.

3. Disable Skype to automatically adjust mixer levels. Go to the setting of Skype, under Sound Devices, uncheck the "Allow Skype to automatically adjust my mixer levels". Having this checked will somehow cause the volume to be increase and decrease which will lead to the same volume level for both left and right channel.

Also remember not to adjust the volume of the mic level from sound setting. If you need to edit the level of the mic, you will need to go back to the PulseAudio Volume Control. Adjusting the mic level from Sound setting will also lead to same level for both left and right channel.

4. Verify the functionality of the mic on Skype. Finally, test out the functionality of the mic by running the test call services. 


Thursday, August 7, 2014

Running 2 Instance of Dropbox under Ubuntu

Have you ever wanna run 2 instance of Dropbox (2 different account) at the same time, syncing both account's files at the same time? You can find the guide for Windows here. As for Ubuntu, I will try to share the method I found and use.

Dropbox is a powerful software to allow files syncing, and sharing between devices, and users. Me myself owned 2 Dropbox account, one for personal use (sharing files between computer and devices), and another one for my work (sharing files between colleague).

Step 1: Install Dropbox in Ubuntu. There are many ways to do this, but I personally recommend going through Ubuntu Software Center. You can simply open Ubuntu Software Center, search for "dropbox" and click Install. It might take a few minutes, and you should have your Dropbox running.


Step 2: Create Shell Script to start multiple instance of Dropbox. You do not need to continue with the Dropbox configuration, or if you already have a Dropbox setup and running, just "quit" it. Create a .sh file, and store it somewhere. (I found this method from this page here, the original code provided do not work on ubuntu 14.04, and I edit some part of it)

The content of the .sh file:
#!/bin/bash
dropboxes=".dropbox-1 .dropbox-2"
for dropbox in $dropboxes
do
    HOME="/home/$USER"
    if ! [ -d "$HOME/$dropbox" ]
    then
        mkdir "$HOME/$dropbox" 2> /dev/null
        ln -s "$HOME/.Xauthority" "$HOME/$dropbox/" 2> /dev/null
    fi
    HOME="$HOME/$dropbox"
    /var/lib/dropbox/.dropbox-dist/dropboxd 2> /dev/null &
done

Step 3: Add the .sh file to be executed automatically on startup. You can go to your Startup Application list, and you should find a Dropbox in the list by default. Edit it and replace the command with the execution of your .sh file. For example I store my .sh file under "/mnt/Data/Software/ubuntu/SH/" folder, and the name of the .sh file is "dropbox.sh"


So, my edited Startup Application Command:


Step 4: Reboot and setup both Dropbox instance. Upon reboot, if everything is in order, you will have 2 instance of Dropbox setup running. I have no Idea how to know which are which, I just simply insert my first account to the 1st one that pop out. After setting up both account, you should have 2 dropbox syncing at the background.


So far both account is syncing properly, no crash, no issue. The only downside of this method is there is no way to know which icon is for which account, the way to overcome this is to store both "Dropbox" folder at 2 known places. To access the folder simply use file explorer to browse to the directory for each account. 

Also take note that, there is no way to edit the name of the main syncing folder. It has to be always "Dropbox", and this will prevent putting both account's folder on the same folder. 

Create Shortcut to Turn Off Monitor

Normally I do not turn off my laptop, I will just close its lids, or suspend/sleep it. Sometimes, when I have some process running in my laptop, I wish I just turn off the monitor and leave it running.

After some googling, I found this. Someone suggest to use the command:
sh -c "sleep 1 && xset dpms force off"

I tried execute it under terminal, and it works. To be able to make it controllable by a combination key on keyboard, I created a shortcut for it under Application Shortcuts editor.


Then I use Super+O as the combination key to turn off the screen. 


The turn off will take 1 second after the key is being press to prevent the keypress to reactivate the screen.

Thursday, November 14, 2013

Enable Automount Harddisk on Startup

  1. Open Terminal, (you can use Ctrl + Alt + T shortcut to start terminal in ubuntu)
  2. Create a backup for fstab file, just in case
    sudo cp /etc/fstab /etc/fstab.old
  3. Get UUID for the partition for automount
    sudo blkid
  4. Open fstab file for editing
    sudo gedit /etc/fstab
  5. Add in the following line to the file, and save it
    UUID=<uuid> <pathtomount> <file system> uid=<userid>,gid=<groupid>,umask=0022,sync,auto,rw 0 0
  6. Restart and check if the partition is automounted
Examples for the <> variables:
<uuid>=3087106951D2FA7E (get this variable from step 3)
<pathtomount>=/media/Data/
<file system>=ntfs-3g (for an NTFS partition)
<userid>=1000
<groupid>=1000


Friday, January 4, 2013

Make Empathy Internet Messaging to Run on Startup

To enable Empathy Internet Messaging to automatically run on startup, we will need to add the run command to the Startup Applications. Press the Superkey and search for "startup applications".


Under Startup Applications, add a new startup programs. Under Name, put "Empathy", Command put "empathy -h" and you can put anything under Comment, or leave it blank. Take note that the "-h" at the command is to hide the Empathy on startup, you can remove the "-h" if you want to show the Empathy windows on startup.


Click Add and that's it. Have fun!

Wednesday, October 19, 2011

Ubuntu 11.10 keep Waiting for jockey-backend to exit

I have this problem twice, that after a fresh install of ubuntu 11.10, it is having problem updating software cache. Whenever I tried to run Update Manager, it will pop out a message box saying "Waiting for jockey-backend to exit". I believe this is a bug of ubuntu 11.10.

I found the solution for this problem from http://naveenubuntu.blogspot.com/2011/09/waiting-for-jockey-backend-to-exit.html, and you simply need to follow these few steps to manually end the jockey-backend and allows your ubuntu to update software cache.

What is jockey-backend ?

Jockey is a tool for installing third-party hardware drivers.

Jockey provides the infrastructure and the user interface for finding and installing third-party drivers which are applicable to the computer. This includes drivers which are added or updated after the release of a distribution, or drivers which cannot be included into the distribution for various reasons (CD space limitation, licensing problems, etc.).

Solution :
You only need jockey for enabling restricted drivers, afterwards you can safely disable it.

Open Terminal and type following commands:

1) To get into root mode
    sudo -i

2) To check the process id of jockey
    ps -e | grep jockey

Output: 2982 pts/0 00:00:00 jockey

remember the process id(2982)

3)Type the following to stop/kill the process

  sudo kill -9 [process_id]

 sudo kill -9 2982

Friday, October 14, 2011

Install Google Chrome on ubuntu 11.10 (64-bit)

I just finish installing a fresh copy of Ubuntu 11.10 64-bit. One of my first thing to do is to install Google Chrome.
After download the deb file for Google Chrome 64-bit, I found out that I cannot simply run the deb file to install it. Ubuntu 11.10 kind like reject the installation.
I found the solution from http://www.google.co.uk/support/forum/p/Chrome/thread?tid=381d28fd49d3fc52&hl=en, the workaround for this is to install Google Chrome via Terminal. The instruction:

Step one: Download chrome to your Download Directory from http://www.google.com/chrome

Step Two: Open Terminal ( Ctrl + Alt + T )

Step Three: Run this command:
sudo apt-get install libnspr4-0d libnss3-1d libxss1 libcurl3

I guess this step is to install some required libraries for Google Chrome.

Step Four: Run this other command (Not Optional)
sudo dpkg -i './Downloads/google-chrome-stable_current_amd64.deb' 
For this step, please modify the command if your downloaded Google Chrome installer is not located in your Downloads folder. For me the Google Chrome installer is located under my Desktop, so the command will be:
sudo dpkg -i '/home/tph/Desktop/google-chrome-stable_current_amd64.deb'

Step Five: Hit the "Super" Key and search for Chrome.

After following all the steps, I had my Google Chrome running nicely under my Ubuntu 11.10. Thanks to Luke Woods.