Linux‎ > ‎


Fix log in screen configuration (rotation)

The only fix that works for me is: to copy a users config

sudo cp /home/cmartin/.config/monitors.xml  /var/lib/lightdm/.config

Note: using a symlink does not work

Install Driver for DWA-131 USB WiFi Adaptor

Install it for Xenial this way: 
sudo add-apt-repository ppa:hanipouspilot/rtlwifi sudo apt update sudo apt install rtl8192eu-dkms

Install NodeJS

sudo apt-key adv --keyserver --recv 68576280
sudo apt-add-repository "deb $(lsb_release -sc) main"
sudo apt-get update
sudo apt-get install nodejs
This is for the latest (at time of writing) Nodejs version 5. Other versions can also be gotten with a simple change to the repo URL - consult documentation for details.

Manually configure bluetooth device (keyboard)

You can try running bluetoothctl from the command line, make sure your device is on / ready to be discovered:
$ bluetoothctl [NEW] Controller AA:BB:CC:DD:EE:FF device-name [default]

check if you keyboard is already in a connected sate. if so you can disconnect it and reconnect and remove it before continuing.
You can try running bluetoothctl from the command line, make sure your device is on / ready to be discovered:

$ bluetoothctl
[NEW] Controller AA:BB:CC:DD:EE:FF device.-name [default]

Any other bluetooth devices will be listed here. You'll then be inside a [bluetooth] prompt.

First, turn bluetooth power on (if your device is off):

[bluetooth]# power on
Changing power on succeeded

Then, make sure your agent is registered:

[bluetooth]# agent on
Agent registered

[bluetooth]# default-agent 
Default agent request successful

Now you can scan for devices from the console:

[bluetooth]# scan on
Discovery started
[CHG] Controller AA:BB:CC:DD:EE:FF Discovering: yes
[NEW] Device FF:EE:DD:CC:BB:AA Someone's Keyboard

You can manually pair from here as well:

[bluetooth]# pair FF:EE:DD:CC:BB:AA 
Attempting to pair with FF:EE:DD:CC:BB:AA 
[CHG] Device C8:E0:EB:04:52:55 Connected: yes

At this point, you should be prompted to enter a pin code for pairing:

Request PIN code
[agent] Enter PIN code: 12345

Enter a number (eg. 12345), and you will be prompted to input the same number from the device:

[Someone's Keyboard]# 12345

You should then be notified that your keyboard has paired:

[CHG] Device FF:EE:DD:CC:BB:AA Paired: yes

Hopefully this works for you, was trying to solve this for a while before I found any reference to bluetoothctl.

Start "Software Sources"/"Additional Drivers" from the Command Line

sudo software-properties-gtk

Random keyboard lockups (iBus)

This occurs frequently with Chrome, or any java based application.
The solution is to disable iBus on the keyboard input.
The control is configured in
Settings -> Language Support:  Then set "Keyboard input method" to none

Touchpad / Trackapd

on laptops the touch-pad can be really annoying especially of the have a mouse attached.  YOu can disable the touch-pad via settings, but it is re-enabled after each reboot, logon or retrun form suspend.  A better solution is "touchpad-indicator"

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

To start the app for the first time run:
This will then enable you to configure:
  • Disable touch-pad when mouse is present
  • Auto start applet
to remove
sudo apt-get purge touchpad-indicator
sudo add-apt-repository -r ppa:atareao/atareao
sudo apt-get update

Disable Caps Lock

Install the GNOME Tweak Tool (gnome-tweak-tool)
sudo apt-get install  gnome-tweak-tool
under the Typing tab there is an option to Disable Caps Lock. 

14.10 Nvidia issues

After each kernel update run
sudo apt-get install nvidia-331 nvidia-331-uvm --reinstall

12.04 & 12.10 Add USB MTP support

Add/Update the folwoing PPA to get the version of Gvfs intended for 13.04 with support for MTP
This will enable you to access your Android 4.X devices over USB

sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
sudo apt-get upgrade

Logging in init-scripts

Currently there are two sets of functions intended to implement the several kinds of messages normally output by Debian and Ubuntu initscripts.

The first is for reporting the starting and stopping of services:
log_daemon_msg "Foo" "bar" ; log_progress_msg "baz" ; log_end_msg 0 Debian: Foo: bar baz. Ubuntu: * Foo bar [ ok ]
The second is for reporting actions to be taken:
log_action_msg "Foo" Debian: Foo. Ubuntu: * Foo
The third is for reporting actions to be taken and their completion:
log_action_begin_msg "Foo" ; log_action_cont_msg "bar" ; log_action_end_msg 0 Debian: Ubuntu: * Foo... * bar... [ ok ]
In addition there is a function for reporting success:
log_success_msg "Foo" Debian: Foo Ubuntu: * Foo
one for reporting failure:
log_failure_msg "Foo" Debian: * Foo [asterisk is red] Ubuntu: * Foo [asterisk is red]
and a function for warning:
log_warning_msg "Foo" Debian: * Foo [asterisk is amber] Ubuntu: * Foo [asterisk is amber]
Finally there is a log_begin_msg which seems to be obsolete.

Note that the success/failure/warning message functions are the ones specified by the upstream LSB... they aren't very pretty and don't conform to Debian policy, and there's no real way to kludge them into doing so. 

Generally you will use the format:
  • Report what foo will be do
  • Do foo
  • Report that foo has now been done
log_action_begin_msg "Will do foo" foo log_action_end_msg $?
A problem is that foo may produce output and this will break up the nice single-line format. You may need to devert stdout to /dev/null, but you will be reluctant to divert stderr to /dev/null and error messages will also break up formatting:
Debian: Foo...ERROR failed. [in red] Ubuntu: * Foo... ERROR [fail] [in red]
I think if you have a serious worry about stderr, you probably should 2> to a temporary file, then cat it after the failure message if necessary. e.g. something like:
f=`tempfile` log_action_begin_msg "Will do foo" foo 2>>$f log_action_end_msg $? if [ -s $f ]; then cat $f >/dev/fd/2 fi rf -f $f