CUDA & MSI GT60 with Optimus enabled GTX670M?

OK I had the same problem. The following worked for me:

installing the NVIDIA developer drivers (295.41) without it overwriting the opengl files:

sudo stop lightdm
sudo ./devdriver_4.2_linx_64_295.41.run --no-opengl-files

It's important not to tick the option to change the xorg.conf file
install the CUDA toolkit (4.2. for me since I need OpenCL) and the code samples as per usual
if you run deviceQuery as a super user it should work:

sudo ./deviceQuery

It's all written in the doc file for the device drivers, in /usr/share/doc/NVIDIA_GLX-1.0/ (chapter 19).


Failure installing build-essential from mirror repository

I fixed this using aptitude. What seems to have happened was that the versions of some packages installed from the installation medium were newer than the dependencies of build-essential. I used aptitude to resolve the dependency problems.

sudo aptitude install build-essential


Yes. If you download Ubuntu using web browser or torrent, you should get a file Ubuntu.iso or something like that (Ubuntu comes in .iso file, which can be directly burn to a CD using CD burning software).

All you need to do, after that, is to install pendrive Linux (not sure if it is available on Mac) and you can install the iso file to pendrive.


How to add an SSD cache to an encrypted HDD for desktop/GUI use?

non-root LVM on LUKS

Introduction

Info:

I just started using LVM because of this feature and my intention was to use an encryted data partition with an SSD for caching.
I usually use ZFS on Linux (see also ARC) for data archiving and redundancy, which appears to be easier to administer and to setup. You may want to look at ZFS if you want to use more than one HDD, an advantage that LVM has over ZFS on Linux however is that it doesn't rely on a DKMS built kernel module which may not build and run correctly if you need to use mainline kernels from the kernel PPA for example. (May be I'm doing something wrong there with ZFS, but some articles on Phoronix read as if that is how it is.)
This is intended for workstation usage and GUI-way solutions are preferred, to possbily show what can be achived with GUIs currently.

Caveat:

Don't just add any SSD as a cache to your HDD and expect big performance increases. The BX200 with 480GB I currently use looks reasonable but showed slower write speeds than HDDs in benchmarks and product reviews. Also note that both devices have to write the data by default at the same time when not in writeback cache mode — which has a higher risk of data corruption — so don't be confused by doubled total transfer rates and slow writes in tools like indicator-multiload.

Overview:

To provide some more insight, here is what I set up in a VM after reading the articles in the question before trying it on actual hardware. The luks- named devices are automatically created when using the GUI to unlock the encrypted devices, LVM will detect that the devices have become available and will offer you to mount the filesystems in nautilus as usual.

lwbt@vxenial:~$ lsblk
…
sdb                                           8:16   0    8G  0 disk
└─luks-6bc875f1-de30-4698-ba74-eea2c5d5bb87 252:0    0    8G  0 crypt
  └─vg0-datalv_corig                        252:5    0  7,9G  0 lvm
    └─vg0-datalv                            252:1    0  7,9G  0 lvm
sdc                                           8:32   0    8G  0 disk
└─luks-e20dd038-9886-4895-b786-855ba4c31c7e 252:2    0    8G  0 crypt
  ├─vg0-cache_cdata                         252:3    0    8G  0 lvm
  │ └─vg0-datalv                            252:1    0  7,9G  0 lvm
  └─vg0-cache_cmeta                         252:4    0   12M  0 lvm
    └─vg0-datalv                            252:1    0  7,9G  0 lvm

lwbt@vxenial:~$ ll /dev/mapper/
total 0
drwxr-xr-x  2 root root     180 Sep  6 02:54 ./
drwxr-xr-x 20 root root    4420 Sep  6 02:54 ../
crw-------  1 root root 10, 236 Sep  6 00:37 control
lrwxrwxrwx  1 root root       7 Sep  6 02:54 luks-6bc875f1-de30-4698-ba74-eea2c5d5bb87 -> ../dm-0
lrwxrwxrwx  1 root root       7 Sep  6 02:54 luks-e20dd038-9886-4895-b786-855ba4c31c7e -> ../dm-2
lrwxrwxrwx  1 root root       7 Sep  6 02:54 vg0-cache_cdata -> ../dm-3
lrwxrwxrwx  1 root root       7 Sep  6 02:54 vg0-cache_cmeta -> ../dm-4
lrwxrwxrwx  1 root root       7 Sep  6 02:54 vg0-datalv -> ../dm-1
lrwxrwxrwx  1 root root       7 Sep  6 02:54 vg0-datalv_corig -> ../dm-5

The output of lsblk might have an additional layer if you partition the block devices (SSD/HDD) instead of straight encrypting them with LUKS. Of course if you have no interest in LUKS encryption you can skip these steps in the following instructions which is fine too.

Instructions

Install the required packages:

sudo apt install lvm2 thin-provisioning-tools cryptsetup

The commands in the following section will destroy all existing data on the drives.

Encrypt each individual device:

sudo cryptsetup luksFormat ${device_name}
sudo cryptsetup luksOpen ${device_name} ${mapper_name_hdd_or_ssd}

Note: gnome-disks has an options to encrypt and mount encrypted devices, but it also creates EXT4 filesystems which would have to be deleted to continue following the instructions.

Then add the device as a physical volume to LVM, create a volume group (named vg0) and a logical volume (named datalv) on the HDD which will be formatted later to hold all the data:

pvcreate /dev/mapper/${mapper_name_hdd}
vgcreate vg0 /dev/mapper/${mapper_name_hdd}
lvcreate -l 100%pvs -n datalv vg0 /dev/mapper/${mapper_name_hdd}

Note: 100%pvs will create a volume which spans over the entire device you have chosen (e.g. the encrypted container or a partition). More details and options can be found in lvmcache and other related manpages.

Now extend the LVM configuration by adding the SSD to the volume group:

pvcreate /dev/mapper/${mapper_name_ssd}
vgextend vg0 /dev/mapper/${mapper_name_ssd}

Create a cache-pool volume named cache in vg0 on the SSD, then add the new cache pool as a cache to datalv:

lvcreate --type cache-pool -l 100%pvs -n cache vg0 /dev/mapper/${mapper_name_ssd}
lvconvert --type cache --cachepool vg0/cache vg0/datalv

Note: lvcreate will automatically choose the optimal sizes for cache_cdata and cache_cmeta for you this way.

After making changes to an LVM configuration it may be necessary to rescan pv, vg and lv to activate the LVM devices, if you want to avoid rebooting:

pvscan
vgscan
lvscan
vgchange -ay

The following command deactivates all LVM volumes when no name is provided:

vgchange -an

Finally it's time to format the logical volume and transfer data.

Example for formatting using the Gparted GUI

pkexec gparted /dev/mapper/vg0-datalv

Example for formatting using command line tools:

sudo mkfs.ext4 /dev/mapper/vg0-datalv

Now the new filesystem should show up in Nautilus.

Usage

The many LVM commands make the setup look quite complex while it may not even leverage the full potential of LVM to experienced users, but once it's setup and the computer rebooted you just need to mount the encrypted disks from the Unity launcher or from within gnome-disks, then mount the volume that shows up in Nautilus like any other filesystem or disk. No memorizing of complex commands is required. To my knowledge there is currently no GUI tool available to handle the LVM setup of a cache pool in Ubuntu.

Notes:

I prefer to mount the smaller encrypted cache SSD device before mounting the HDD
The cache can be removed and replaced see Cache Removal in lvmcache manpage.
To display all metrics about the cache you can use the following command:

sudo lvs -o+cache_total_blocks,cache_used_blocks,cache_dirty_blocks,cache_read_hits,cache_read_misses,cache_write_hits,cache_write_misses,cachemode,cache_policy,cache_settings


How to let two differnet subnets, which are created by a DHCP server, talk to each others?

IP-Forwarding enables routing between the different subnets on your server, without specifying a static route. With IP-Forwarding enabled your server is now a router in a very basic way.

So this is working even if you choose to use another(third) or a different subnet for your ethernet devices and it doesn't matter how your clients will get the IPs (static, manual, auto(dhcp)).

For IPv4:

echo 1 > /proc/sys/net/ipv4/ip_forward

For IPv6:

echo 1 > /proc/sys/net/ipv6/conf/all/forwarding

You can even enable it for a specific device, but only for IPv6. The following command will show all netdevs + all + default(don't know what exactly this is for):

`ls /proc/sys/net/ipv6/conf`


Installation interrupted 12.04, usb method

Can't you just reinstall? Try to delete the partitions you made with the old istallation and just make a new one. I recommend the because i see you did not finish the installation process so there are no important files or configurations that need to be saved.


enlarging pane in tmux (C-b z) kills a pytest run

When tmux resizes it will ask the kernel to send SIGWINCH to the processes in the pane, it sounds like your application is not handling it correctly and is crashing or exiting.


Running a Perl script as cronjob is not working while manual starting does the job

Change the perl entry to path/to/perl. Often times, commands such as perl and python are actually environment based things and are found in your PATH. As cron lacks that PATH, it's best to use absolute paths in crontab.


Unlock all private keys on Ubuntu, entering password only once at login

1) After Creating the Public Key By Following,

The first step involves creating a set of RSA keys for use in authentication.
This should be done on the client.
To create your public and private SSH keys on the command-line:

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

You will be prompted for a location to save the keys, and a passphrase for the keys. This passphrase will protect your private key while it's stored on the hard drive and be required to use the keys every time you need to login to a key-based system:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.

  2) You must add your private key (might be not secure) but still you
  can do this,

ssh-add ~/.ssh/id_rsa

Source From Ubuntu Wiki.


git on Ubuntu get: gnutls_handshake() warning: The server name sent was not recognized

SOLVED for me

I found in https://stackoverflow.com/questions/7766961/git-trouble-via-https-routinesssl23-get-server-hello the sollotion that work for me:

I add the line

BrowserMatch "git" nokeepalive ssl-unclean-shutdown

to the configuration file of apache.


Is is possible to have one computer rendering screen and providing CPU-RAM for 2 or 3 other computers that act as client, rendering the output?

If you are on a fast local network, you can simply forward X server with ssh.
Establish an ssh connection with X forwarding enabled like
ssh -X user@host
Then simply run the application remotely like gimp, librewriter, gedit within the ssh session to have it shown over the remote computer.


Dual monitor Unity launcher opening on wrong monitor in 11.10

If this is still an issue with anyone a little google-ing around would have saved time, open terminal and run command xrandr --output HDMI-1 --primary (this is assuming there is only 1 HDMI connection but you can run the command xrandr and get a list of your monitors) if monitor name is different replace HDMI-1 with the proper device name of your chosen monitor.


List all versions of a library using bash

If you are unsure about the number of versions of the library installed:

echo "$(ldconfig -p | grep -Eo '/[^ ]+libpcap[^ ]+$')" | \
        while IFS= read -r lib; do readlink "$lib"; done

If you do not have any white-spaces in the path to the file using just xargs would suffice:

echo "$(ldconfig -p | grep -Eo '/[^ ]+libpcap[^ ]+$')" | xargs -L 1 readlink

If there is only one version:

readlink "$(ldconfig -p | grep -Eo '/[^ ]+libpcap[^ ]+$')"

To get the version number after so., use grep:

% grep -Eo '[0-9][^[:alpha:]]+$' <<<'libpcap.so.1.5.3'
1.5.3

here we are getting the starting number of the version and then continuing till the end ensuring there is no intermediate alphabetic characters in between.


I just fixed the issue, I found the kernel sources has not been installed which prevented from compiling the driver properly. So I installed kernel source for the current kernel from Synaptic then issued the following commands and my WiFi was instantly restored (like 3 or 5 seconds).

To install kernel headers and source:

 sudo apt-get install linux linux-headers-generic kernel-package

 sudo apt-get purge b43-fwcutter firmware-b43-installer firmware-b43-lpphy-installer firmware-b43legacy-installer bcmwl*

 sudo apt-get install b43-fwcutter firmware-b43-lpphy-installer bcmwl*

Then reboot.

This applies to BCM4312 only (My laptop is Lenovo g450)

For others can see this blog post, this might be useful for you.


I want to create a custom keyboard layout for ubuntu 20.04

Thanks to @Gunnar Hjalmarsson for the answer.
Found there is a keyboard layout with what I wanted already on it. Although it has so many unnecessary keys on it I just wanted a simple US layout with the £ and working ", with this keyboard layout there are so many unused keys which I would never use. It's not the end of the world. I can bare with it. It's fine.


Separating images from text in a scanned PDF document

Use pdfimages a PDF image extractor tool

Usage: pdfimages [options] <PDF-file> <image-root>

Example: Save images in JPEG format

  pdfimages -j in.pdf /tmp/out

PS: someone, please mark this as duplicate: Extracting embedded images from a PDF [creadits goes to pl1nk: https://askubuntu.com/users/48864/pl1nk ]


How do I push my app to Launchpad if I have followed the recommendations of the App Review Board for Quickly apps?

According to the source package you did not apply the changes to debian/rules.


I had similar issues with my Logitech touchpad in 13.10, but after updating the to latest 14.04 build it has been fixed.  I used to not be able to right click and select an option - the first one would always be selected as soon as I started to move to the option I wanted.  Now in 14.04 I can right click and touch scroll to the option I want.  There must have been something fixed in 14.04 to support touchpad use?


Most of the time, downloaded .deb packages fail to be installed because they have unmet dependencies (those are automatically handled when you install software from the repository). Try installing your package manually using the terminal (take a look at this post: How do I install a .deb file via the command line?), because you will be able to debug with it.


You can use `dpkg' to find out which package is providing a file. In your case you could have used:

sudo dpkg -S /etc/init.d/rc.local

This would have told you that the file is provided by package `initscripts':

$ sudo dpkg -S /etc/init.d/rc.local
initscripts: /etc/init.d/rc.local

Then just reinstall that package:

sudo apt-get install --reinstall initscripts

References:

http://manpages.ubuntu.com/manpages/raring/man1/dpkg.1.html

http://manpages.ubuntu.com/manpages/raring/man8/apt-get.8.html


How to end a loop with a grep in a temporary file?

The second if-block needs to be included in the until-loop. A check for the entered name has to added after the first read-command.

     read -p "Enter the username you want to delete (q to quit) " name

     if [ "$name" = "q" ]
     then
       echo "You quit the program"
       exit
     fi

     user=$( cut -d: -f1 /etc/passwd | grep -w "^$name$" ) 2>>/dev/null
     awk -F: '$3 >= 1000 && $3 <= 60000 && $6 ~ /^\/home/ {print $1}' /etc/passwd >/tmp/testuser

     if [ "$name" != "q" ]
     then
       until [ $(grep -w "$user" /tmp/testuser) ] && [[ "$name" =~ $regex ]]  && [[ ! -z "$name" ]] && [ "$name" != "q" ]
       do
          read -p "User system or nonexistant, try again (q to quit) " name
          if [ "$name" = "q" ]
          then
            echo "You quit the program"
            exit
          fi
          user=$( cut -d: -f1 /etc/passwd | grep -w "^$name$" ) 2>>/dev/null
       done
     fi


Bad video driver installed- how to get rid of it?

Well, sometimes switching to console (STRG-ALT-F1) and X (ALT-F7) several times helps to unscramble the console. Then you can do "sudo apt-get remove nvidia*" and it will remove the proprietary drivers. Sometimes you will also have to remove the xorg.conf in /etc/X11:
sudo rm /etc/X11/xorg.conf
Then reboot and it should work.


Temporary failure resolving ca.archive.ubuntu.com

Were you in recovery mode after booting from the CD?
In this situation you need to try to add a nameserver like Google's 8.8.8.8 to /etc/resolv.conf. However, it is slightly more difficult in Ubuntu to do this as it uses the resolvconf system.
You can get around that temporarily by:

rm /etc/resolv.conf
touch /etc/resolv.conf
echo "nameserver 8.8.8.8" > /etc/resolv.conf

before exiting rescue mode, reverse this change

rm /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf


Mount USB drive with write permissions for everyone or specific user

Your problem seems to be about the permissions you have set. FAT / FAT32 formatted drives don't support file permissions. The permissions for everything are determined by how the drive is mounted. When you set the permission open it worked when you

server# sudo mount /dev/sdb2 /home/storage -o umask=000

As for it not auto mounting on reboot

UUID=8C52-C1CD /home/storage auto user,umask=000,utf8, -->noauto<-- 0 0

The "noauto" makes this NOT automatically mount when the system starts and parses the /etc/fstab file.  Remove that option and it will mount on startup. You can set the permissions on the mount point once it's mounted with chmod or specify them in /etc/fstab.

If you need the media user to access it, you can set the permissions to 764, and add them to the security group. Root always has access to everything.

see http://www.linux.org/threads/file-permissions-chmod.4094/ for some examples of propper file permissions

On a side note, bodhi.zazen made a good point
Is there some reason you need to use FAT ? If not, I would back up the data and use a linux native file system. You can then set ownership and permissions.


Have you been using sudo recently (that you have to reinstall login)? Be more careful.

Here's how I got MY system (YMMV) to tell me how to do it:

w3@aardvark:~(0)$ type -p login
/bin/login
w3@aardvark:~(0)$ dpkg -S $(!!)
dpkg -S $(type -p login)
login: /bin/login
w3@aardvark:~(0)$ dpkg -l $(!! |cut -d: -f1)
dpkg -l $(dpkg -S $(type -p login) |cut -d: -f1)
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                       Version                    Architecture               Description
+++-==========================================-==========================-==========================-=========================================================================================
ii  login                                      1:4.2-3.1ubuntu5.3         amd64                      system login tools
w3@aardvark:~(0)$ sudo apt-get install --reinstall --dry-run $(dpkg -S $(type -p login) |cut -d: -f1)
[sudo] password for w3:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libdvbpsi10 libffmpegthumbnailer4v5 libllvm3.8 libllvm3.8:i386 libproxy-tools libupnp6 libva-drm1 linux-headers-4.4.0-83 linux-headers-4.4.0-83-generic linux-headers-4.4.0-87
  linux-headers-4.4.0-87-generic linux-image-4.4.0-83-generic linux-image-4.4.0-87-generic linux-image-extra-4.4.0-83-generic linux-image-extra-4.4.0-87-generic linux-tools-4.4.0-83
  linux-tools-4.4.0-83-generic linux-tools-4.4.0-87 linux-tools-4.4.0-87-generic pmount
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 3 not upgraded.
Inst login [1:4.2-3.1ubuntu5.3] (1:4.2-3.1ubuntu5.3 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])
Conf login (1:4.2-3.1ubuntu5.3 Ubuntu:16.04/xenial-updates, Ubuntu:16.04/xenial-security [amd64])


After all combination of packages upgrade commands I have fixed this problem by installing gfortran-5 library:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gfortran-5


Why do my two Ubuntu 16.04.3 LTS machines have different kernels after updating?

Kernel 4.4.0-110-generic is not released into main yet, and is in the Proposed repository, which is not enabled by default.

You must have the proposed enabled on the laptop. Check Software&Updates/Developer Options to make sure.


How to fix a failing grub-pc package installation in Hyper-V virtual machine?

I found that the "the grub-pc package failed to install" grub installation problem for Ubuntu 12.04.1 Server was related to the degree of network access. If there was no network connection (cable unplugged) Grub-PC installed OK (but then you need to configure the network by hand). If it was connected to an isolated or limited network (LAN access only or bad DNS) that could not contact an external ubuntu server, the Grub-PC installation failed. Only if it had full network access, was Grub-PC able to install correctly, ah including networking.

So my suggestion is to first troubleshoot your local network to make sure that it is providing complete Internet access. If it isn't, fix it, or completely disconnect from the network, do the install and then install and troubleshoot the network after the rest of the installation is complete.


Where can I find download images from WhatsApp web on Ubuntu?

As you have already downloaded the files then you have to follow the default directory $PATH as set in the specific browser you were using for this.
Assuming you are using the two post popular browsers on ubuntu

Chromium is defaulted to  ~/Downloads
Mozilla Firefox is defaulted to /tmp/mozilla_"$USER"0

Unless you have manually changed either of the defaults.
Also remember that any files from Firefox would have been purged from /tmp/mozilla_"$USER"0 when you rebooted - this possibly explains why you cannot find them?
Hope this helps?


Which email client is fast enough for a Maildir containing one million emails?

For such number of mails notmuch is an obvious choice. You can try using alot as a frontend.


Try these in a terminal

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get clean
sudo apt-get update


Go here: http://www.winehq.org/download and get your package.
Once you DL it, you can install by using sudo dpkg <pkgname> from within the same directory.


I can't hear anything in Ubuntu 11.10, except for "Front Left" and "Front Right" inside settings

Digital sound is somewhat Ubuntu. Is using a non digital connection to your TV an option? Does sound work then?

if not , i would try talking directly to the guys on the pulseaudio irc channel on irc.freenode.net


How to make chrome search engine independent of my GEO location?

A) Drop this into your Everything bar https://www.google.ca/search?q=
and type your search term after the = key for a one time use.

B) To make the change permanent, click on the triple-stacked-dot menu at upper right, and choose Settings, then scroll down to Search Engine. Click on Manage Search Engines and add https://www.google.ca/search?q= then, after adding, click on the triple-stacked-dot on the right side of the Google.Ca entry, and choose Make Default.

C) A third option is to edit your settings at Google.com, but I am uncertain as to whether deleting cookies would erase this change, and the result requires you login with your Google login: Go to https://www.google.com/preferences?hl=en&fg=1 and scroll down to nearly the bottom. Select United States then Save.


Resume from suspend with MCE remote doesn't work after Mythbuntu upgrade

Got it to work.

I created a new rule:

sudo gedit /etc/udev/rules.d/90-mcewakeup.rules

Entered this in with the correct product and vendor id's (with the help of lsusb):

SUBSYSTEM=="usb", ATTRS{idVendor}=="0471", ATTRS{idProduct}=="0815" RUN+="/bin/sh -c 'echo enabled > /sys$env{DEVPATH}/../power/wakeup'"

Edited one line in my grub (added "usbcore.autosuspend=-1 acpi_enforce_resources=lax"):

sudo gedit /etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1 acpi_enforce_resources=lax"

After which:

sudo update-grub

After a reboot tested it and it worked.


What you need to do is to enable PAM Fingerprint authentication method.

Issue sudo pam-auth-update
Select Fingerprint authentication
Press Spacebar
Hit Enter


Any benefit to uninstalling unused applications?

As long as the program we are talking about is not a service (examples of those are mysql, apache) it will not impede on the speed of your system. And even those services tend to be rather quiet when not actively used.

The only benefit you will see is that there is less to update where there are updates. But that is not worth all the trouble tracking down the software you want to uninstall and uninstall it.


Wifi & touchpad don't work in live USB - will they work after install? (Samsung NP900X5L)

I think that it is not supported and it will not work after the install for that version so I recommend that you install Ubuntu 15.10 or the daily build of 16.04 and it will be working correctly.

http://cdimage.ubuntu.com/daily-live/current/


Ubuntu 18.04.4 Desktop: since last upgrade : Wired unmanaged with the previous network configuration files

NetworkManager

Edit /etc/NetworkManager/NetworkManager.conf and change "managed" back to false.

Assure that /etc/network/interfaces only contains the following active lines:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Set your /etc/netplan/01-network-manager-all.yaml back to:

network:
  version: 2
  renderer: NetworkManager

sudo netplan --debug generate

sudo netplan apply

reboot

Then configure your wired connection using the NetworkManager GUI.


Ginn keeps settings in /etc/ginn/wishes.xml

Default configuration already includes shortcuts mentioned in wiki


Diodon not working after upgrade to 16.04

I found the solution here:

https://esite.ch/2015/07/using-custom-shortcuts-of-de-as-diodon-hotkey/

You should register the short-cut via desktop environment (not via diodon config)

Go to System Settings → Keboard, select Shortcuts tab and add a new custom shortcut for diodon. Important: You need to click on "deactivated" if you want to asign a new short-cut. Clicking on the name of the shortcut does not work!

This works for Diodon 1.3.0 from Ubuntu 16.04 (ppa version is not needed)


Ubuntu installation from Windows installer failed

I met the same problem and after I changed web proxy, windows installer worked fine so I'm sure it's network problem. The interesting thing is I could access internet and even could download ubuntu iso but wubi. exe didn't work before I change proxy. So I spent a long time to figure out it was network issue.

Or download iso separately and put wubi.exe and iso into same folder also can fix this problem.


Ubuntu touch: who decides to upgrade? And when?

Are you familiar with the Ubuntu desktop OS (or any desktop Linux distribution)? Ubuntu touch uses the same approach.

Canonical has a repository where they publish updates to the OS image (drivers are included in the image). The phone checks the repository and says that an update is available. User chooses when to download it and when to install it.

Updates to future versions are like regular updates. It was already updated from 14.10 to 15.04.

Also, the Ubuntu touch repository has multiple channels. So, user can switch to a 'devel' channel and receive OS updates that are less tested, but more recent.


Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo update-alternatives --config editor

When it comes up choose your editor.  See image below.


login problem for 13.10, my username does not appear

Found the solution that worked for me. Because I had installed likewise-open it had told lightdm to hide local users.

open the following file from command line:

  sudo nano /etc/lightdm/lightdm.conf

In the [SeatDefaults] section, there's a line that should say the following:

  greeter-hide-users=false

(mine had gotten changed to true, so all local users weren't being displayed. Rebooted after than and I can see my local users again.


Google Docs Voice Typing Places a Microphone Icon that Doesn't Disappear until Chrome is Closed Ubuntu 18.04

This issue doesn't add any extra processing weight its something I just find personally annoying. Apart from logging out and into Ubuntu, the only way to remove the microphones appearing in the taskbar is restarting the gnome-shell by pressing Alt+F2 and typing either "restart" or just "r".


Installer doesn't display partition I want to install to

I have often seen this after an installation of windows what has happened,for technical reasons,is windows C partition has been placed 1Mb in. normally this would not matter except in this case linux knows you can only have four partitions and that is what it shows.
Solution delete the 1 MB partition grow C to fill it write to disk and reboot.


Avoid flooding disk by copying to failed mount point

I could solve this by removing any writing rights from the dummy mount point folder. This way, copying files fails if mounting was not successful. For changing the access rights I used Dolphin's context menu.


Slow alt-tab (static application switcher) on Ubuntu 18.04.1 and XPS13 1397

This is the solution for the slow application switcher (at least for me XPS 13 9370 - Ubuntu 18.04.1):

Install the following extension:

https://extensions.gnome.org/extension/1317/alt-tab-switcher-popup-delay-removal/


How do host machine know about the private key in the machine which is doing ssh in it [ssh-copy-ip method ]

Technically, the remote server doesn't see your privkey itself.  Your system offers the ID of your key (which matches the ID on the pubkey) to the server to start the process.
From Digital Ocean tutorials on Understanding the SSH Encryption and Connection Process, specifically the section on "Authenticating the User’s Access to the Server" and just the key authentication process bits:

The public key is used to encrypt data that can only be decrypted with
the private key. The public key can be freely shared, because,
although it can encrypt for the private key, there is no method of
deriving the private key from the public key.
Authentication using SSH key pairs begins after the symmetric
encryption has been established as described in the last section. The
procedure happens like this:

The client begins by sending an ID for the key pair it would like to authenticate with to the server.
The server check’s the authorized_keys file of the account that the client is attempting to log into for the key ID.
If a public key with matching ID is found in the file, the server generates a random number and uses the public key to encrypt the
number.
The server sends the client this encrypted message.
If the client actually has the associated private key, it will be able to decrypt the message using that key, revealing the original
number.
The client combines the decrypted number with the shared session key that is being used to encrypt the communication, and calculates
the MD5 hash of this value.
The client then sends this MD5 hash back to the server as an answer to the encrypted number message.
The server uses the same shared session key and the original number that it sent to the client to calculate the MD5 value on its
own. It compares its own calculation to the one that the client sent
back. If these two values match, it proves that the client was in
possession of the private key and the client is authenticated.

As you can see, the asymmetry of the keys allows the server to encrypt
messages to the client using the public key. The client can then prove
that it holds the private key by decrypting the message correctly. The
two types of encryption that are used (symmetric shared secret, and
asymmetric public-private keys) are each able to leverage their
specific strengths in this model.

(Unfortunately, there is no way to simplify this explanation from the above further.)


Use previously run command as a properly-escaped argument

Although , watch doesn't have command history, shell history can use used for that purpose.  fc -nl -1 allows listing previous commands executed by shell. One can do

PCMD=`fc -nl -1`; watch -n 5 $PCMD

Or even shorter

watch -n 5 $(fc -nl -1)

Example,

$> stat /etc/passwd
  File: '/etc/passwd'
  Size: 2989        Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d  Inode: 6030444     Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2016-06-17 20:45:17.520447811 -0600
Modify: 2016-06-17 20:45:17.520447811 -0600
Change: 2016-06-17 20:45:17.528447711 -0600
 Birth: -
$> watch -n 5 $(fc -nl -1)


Backup your home directory with rsync and skip useless folders

The exclude list may only contain filenames, foldernames and lines starting with #. A comment behind the foldername is not allowed. I created a Git repository with all known files and folders that are superfluous:
Download this ignorelist to /var/tmp/ignorelist
wget https://raw.githubusercontent.com/rubo77/rsync-homedir-excludes/master/rsync-homedir-excludes.txt -O /var/tmp/ignorelist

Then start the rsync with
rsync -aP --exclude-from=/var/tmp/ignorelist /home/$USER/ /media/$USER/linuxbackup/home/

Note:
In the ignorelist there is a commented section at the start with folders, that are probably not worth a backup either. Uncomment those, you don't need.


internet is slow with D-Link DWA-131 wireless adapter

You can try a module built from source code on github
sudo apt-get install git build-essential dkms
git clone https://github.com/Mange/rtl8192eu-linux-driver.git
sudo dkms add rtl8192eu-linux-driver
sudo dkms install rtl8192eu/1.0
echo "blacklist rtl8xxxu" | sudo tee /etc/modprobe.d/rtl8xxxu.conf

Reboot


Dell Inspiron N5050 have display problem Xubuntu 16.04.3

The screen flickering was due to input by keyboard. We have disabled the laptop keyboard during splash using the following method:

sudo nano /etc/default/grub

Replaced

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

with

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.nokbd"

and updated the grub using the following command

sudo update-grub

After reboot the display problem solved.


No option on Ubuntu 17.4 to share my Ethernet connection?

For some reason this option is absent from the new UI introduced in 17.04.

Run this command from the terminal to bring up the old UI, which has the option you need:

nm-connection-editor

Double-click the connection you want to share, go to the IPv4 Settings tab, and choose Shared to other computers from the dropdown.


Opening .jar files with `pkexec` and using Desktop Entries to run commands

Current solution: Since the command works when run in the terminal, simply have the Desktop Entry run the command with a terminal:

Exec=lxterminal -e "pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY /usr/bin/java -jar -Dswing.systemlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel /home/me/.minecraft/tlauncher.jar"

Notes:

I think I could build off of this to make sure that when the launcher is closed, it is actually closed as I noticed through ps aux that processes aren't actually being killed the way I expect causing strange behavior the next time I open the launcher.


Root file not defined installing from VM

So, you boot Windows, start the VM booting from Ubuntu ISO (with no virtual hard disk) and are wanting to install to a second partition on your real hard drive?

This would be a very advanced use of VirtualBox but I doubt it would work; it's certainly not a supported or standard use of a VM.

Think of the VM as a completely separate PC. If it hasn't got a (virtual) hard disk, it can't install Ubuntu because, as it reports, there's nowhere to put a root file system. Because it's effectively a separate PC, it can't see the host PC's disk so cannot see that.

Either connect up a virtual disk and install it to the VM or find some way to copy the ISO to a USB drive or CD and use that the boot the real PC to install it in dual boot mode.


apt update: Could not handshake: An unexpected TLS packet was received

Check if the proxy is also set for https. Since curl is working with https, I assume, that somewhere a https_proxy variable is set (e.g. ~/.bashrc). apt requires a proxy configuration in /etc/apt/apt.conf or /etc/apt/apt.conf.d/. You need to specify the proxy for all protocols:

# e.g. in file /etc/apt/apt.conf.d/05proxy
Acquire::http::proxy "http://192.168.0.1:3128/";
Acquire::https::proxy "http://192.168.0.1:3128/";
Acquire::ftp::proxy "http://192.168.0.1:3128/";

Also keep in mind, if the proxy configuration is only set for the sdnc-dev user, you need sudo -E to expose the environment to the root user.


Deactivate weather server (aviationweather.gov) Mate 16.4

I did search for "aviationweather.gov" on Debian CodeSearch and I see that this URL is used in the libmateweather package.

This library is used by MATE Panel. The weather is usually shown in two places - in the left part of the Clock and inside Calendar applet.

To switch off the polling do the right mouse click on Clock applet, select Preferences and uncheck Show weather checkbox on General tab:


Ubuntu 16.04 ping to gateway works, ping to other win pc does not work

Maybe the problem is on Windows. In most installations by default, Windows doesn't answer to ping requests.


Install from Ubuntu Software Center web button

A couple of useful tips could help with this and similar questions.

If you look in the folder /usr/share/applications you will see a series of .desktop files.  You should hopefully see something that you would recognise in terms of the application name.

In this case - the desktop file is ubuntu-software-center.desktop

Have a quick look inside the file (it is a text file) and you will see a line that starts Exec= - that command line is where your application is located.

In this case - /usr/bin/software-center

An alternative is to use the following technique:

type which followed by the first few characters of the software you are attempting to locate - e.g. soft.  Then press Tab.  Hopefully you'll see the name of the application you are attempting to run.  Pressing return after which software-center will give the same value as the Exec= statement above.


Literally one google search away is your answer.
http://www.ubuntu.com/download/desktop/install-desktop-latest


It looks like you want to filter file2 based on the IDs in file 1 (rather than merge the files):

$ awk 'NR==FNR {a[$3] = 1; next} $3 in a' file1 file2
#CHROM  POS ID  REF ALT FORMAT
1   61442   rs2531261   A   G   GT:GL:GQ:DP:CGA_RDP:EHQ:HQ:CGA_CEGL:PS:CGA_CEHQ:AD
1   924629  rs28622096  A   G,T GT:GL:GQ:DP:CGA_RDP:EHQ:HQ:CGA_CEGL:PS:CGA_CEHQ:AD
1   974662  rs2465135   G   T   GT:GL:GQ:DP:CGA_RDP:EHQ:HQ:CGA_CEGL:PS:CGA_CEHQ:AD
1   995481  rs9442393   T   G   GT:GL:GQ:DP:CGA_RDP:EHQ:HQ:CGA_CEGL:PS:CGA_CEHQ:AD


Shortcuts, ALT-rightclick not working on 16.04, Gnome 3.18

There are two versions of Gnome-Classic Which come from Gnome 3.18 in Ubuntu 16.04. One is using Metacity as the window manager and another uses Compiz, which is the same composition manager used by Unity.

I guess you're using the one which uses compiz, and this gnome-classic doesn't allow you to do Alt-RightClick in the panel so that you can customize it. But there is a workaround. You can quickly switch the window manager to Metacity and then make changes to the panel and then switch back to compiz.

To do so

Open a terminal (Alt-Ctrl-T)
Type metacity --replace and hit Enter
Now do Alt-RightClick on the panel and customize what you want.
Now press Alt-F2 to bring the Run dialog
Type compiz --replace there and hit Enter

Keyboard Shortcut

As for the keyboard shortcut, I guess you're using wrong Keyboard Layout. Change the layout to En-US by going to Settings -> Text Entry -> Input Sources and Add the English (US) Layout


tried to change home folder location, now can't log in

You're like me: a Windows Guru who has switched to the dark side...  ;)

In a nutshell:

The easiest thing to do, is just start again, but when you're on the "Installation type" screen, don't choose "Alongside windows XXX" but "Something else".
Then choose the partition/disk where you want to install Ubuntu itself and use mount point "/" for that.  For your home folder just take the secondary partition/disk and use "/home" as a mount point.

The long version

I've been using Ubuntu for nearly a year now, so I wouldn't do what you just did any more.  Forget that you're a guru!  You're a newbie (I still am after nearly a year)!
Read all the following articles to help you become an Ubuntu Guru:
Switching from Windows

Read everything that applies to you from:
Ubuntu Installation

And also read:
File Hierarchy Standard


I recommend trying libinput- there is even a source out there to add gesture support. What laptop model are you using? It is probably a common issue.


How to recover files and folders from /tmp?

Try to use some recover tools like Testdisk or PhotoRec .
TestDisk can recover lost partitions of virtually any filesystem. PhotoRec can recover files of most types, including most picture and video formats. PhotoRec can be used on existing partitions, or can be used to recover files on deleted partitions without having to recover the underlying partitions.
Possible setups for recovery include:
Recover the files to a separate hard drive.
Recover the files to a networked storage drive.
Recover the files to a separate partition on the same hard drive.
Image the hard drive using a tool like ddrescue and recover files using only one partition.

Download them here, both tools are in the same package.
Install the package and try your luck, I hope you can recover your lost files.
Reference


How to make my application accept folders from Unity Launcher?

After some research I discovered that if you want an application from the launcher to be active and to stay lightened when you drag a folder, you need to name its .desktop file as follows:

app_name-nautilus.desktop

or:

app_name-nautilus-folder-handler.desktop

So, in your case it will be:

wallch-nautilus.desktop

I'm not sure if this restriction is a normal behavior (as it should be) or if it is a bug. If you consider that this is a bug, you can report it as a bug.

This being said, I created the following script which will make this job automatically for you (I named it wallch_on_launcher):

#!/bin/bash

#wallch_on_launcher - script to create a .desktop file for wallch application and set its icon on the launcher
#the icon from the launcher will stay lightened when a folder is dragged

#Licensed under the standard MIT license:
#Copyright 2013 Radu Rădeanu (https://askubuntu.com/users/147044/).
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

desktop_file="wallch-nautilus.desktop"
desktop_file_path="$HOME/.local/share/applications/$desktop_file"

launcher_icons=$(gsettings get com.canonical.Unity.Launcher favorites)
new_launcher_icons=$(echo $launcher_icons | sed "s/]/, 'application:\/\/$desktop_file']/g")

touch $desktop_file_path

cat << EOF > $desktop_file_path
[Desktop Entry]
Version=4
Name=Wallch
Comment=Change desktop wallpapers automatically
Exec=/usr/bin/wallch %U
Icon=wallch
Terminal=false
Type=Application
Categories=Utility;Application;
MimeType=inode/directory;

Actions=Start;Change_Wallpaper;

[Desktop Action Start]
Name=Start
Exec=/usr/bin/wallch --start
TargetEnvironment=Unity

[Desktop Action Change_Wallpaper]
Name=Change Wallpaper
Exec=/usr/bin/wallch --change
TargetEnvironmet=Unity
EOF

gsettings set com.canonical.Unity.Launcher favorites "$new_launcher_icons"

Don't forget to make the script executable:

chmod +x wallch_on_launcher

The result can be seen in the below screen cast:

Note that the current version of Wallch (3.01-0ubuntu2) doesn't know how to handle a folder which is given as argument:

$ wallch ~/Pictures
Invalid option: '/home/radu/Pictures'
Type wallch -h or --help for all available options

So, because of this nothing will happen when you drag and drop a folder on the Wallch icon on the Unity Launcher.


Missing the empathy menu after upgrade to 11.10

They removed that menu because the upper bar now takes place of any other application menu. Minimalize everything on your desktop except empathy. Click the empathy messenger and you can find the menu on the most upper bar on your screen. It took the menu from empathy


how can I paste copied-clipboard text to a file from terminal?

Using xclip.
For writing clipboard to file, overriding existing content:

xclip -o > /path/to/file.txt

or for appending clipboard to file:

xclip -o >> /path/to/file.txt


control audio kde plasma after hdmi removal

User68186 is right, the HDMI hogs the sound, this happens after upgrades too! Leftclick the small speaker in the upper right corner and chose "Sound Settings"

Go to Output devises and check, The sound is vissible as a voobling blue line, and its still attached to hdmi, click on internal speakers, it vill start playing from the speakers, eaven if you have to select it a couble of times.


How do I force a 16x16 icon size for toolbar icons in GTK 3?

You can try this by creating/modifying ~/.config/gtk-3.0/settings.ini:

[Settings]
gtk-icon-sizes = panel-menu=16,16:panel=16,16:gtk-menu=16,16:gtk-large-toolbar=16,16:gtk-small-toolbar=16,16:gtk-button=16,16

However, your theme may override this in its theme file.


Thunderbird Attach dialogue - Network Shares missing but are seen fine in Ubuntu 14.04LTS

I managed to attach a file by browsing to the network file from the file manager, then right clicking to open with Thunderbird.


The problem was indeed drop shadow with maximized windows.

.maximized separator:first-child + headerbar,
.tiled separator:first-child + headerbar, .maximized separator:first-child + headerbar:backdrop,
.tiled separator:first-child + headerbar:backdrop, .maximized headerbar:first-child,
.tiled headerbar:first-child, .maximized headerbar:first-child:backdrop,
.tiled headerbar:first-child:backdrop {
    border-radius: 0;
    box-shadow: none;  }


Install RAID0 on 2 GPT SSDs , booting in Legacy Mode, Ubuntu 16.04 Desktop

I ran Boot repair from within the live-usb and it prompted me to remove dmraid as it would conflict with mdraid.

On doing so, I was able to run mdraid --assemble --scan and view my RAID0 disks.

Boot-repair eventually detected GPT partition and asked me to make a bios_grub, unformatted partition at beginning of disk. I was not sure how to proceed now as I already had the necessary partitions.

I then followed this section of Grub2 installation.
Grub was installed and I could login at tty1.


A Docker image with no label is sometimes referred to as a “dangling image”. These may be unused leftovers that have accumulated over time. You can remove any unused images all at once like this:
sudo docker image prune

You’ll get a standard message:
WARNING! This will remove all dangling images.
Are you sure you want to continue? [y/N]

Hit Y if you’re okay with the action.
To remove specific images, you can do this:
sudo docker image rm {image id}

You can remove multiple images by adding more IDs to the command. If any of the images are required by a container, then you’ll get a message like:
Error response from daemon: conflict: unable to remove repository reference "Fedora Workstation" (must force) - container cd20b396a061 is using its referenced image 75835a67d134


How to prevent ubuntu from connecting to wifi hotspots automatically

You can stop Ubuntu from automatically connecting to Wifi connections without deleting the connection entry itself.

Go to: network-indicator > Edit Connections > Wireless

Select the entry that you do not want automatically connecting. Once selected/highlighted, click on the "Edit" button on the right side of the window. At the top of the window that opens, you will see an option to disable  "Connect automatically".


The & character has a special meaning on the replacement side of a sed s command:

          replacement may contain the special character & to refer to that
          portion  of  the  pattern  space  which matched, and the special
          escapes \1 through \9 to refer  to  the  corresponding  matching
          sub-expressions in the regexp.

To make it literal, you need to escape it, \&

Ex.

$ echo '&VARIABLE1 = 10000000' | sed 's/&VARIABLE1 = 10000000/&VARIABLE = 1/g'
&VARIABLE1 = 10000000VARIABLE = 1

but

$ echo '&VARIABLE1 = 10000000' | sed 's/&VARIABLE1 = 10000000/\&VARIABLE = 1/g'
&VARIABLE = 1


Help with Zotac zbox nano ad10 mini pc ?

I am using Linux Mint 12 KDE (based on Ubuntu 11.10). Full install on Zotac ZBOX Nano 10. Had zero sound from HDMI. Not sure which of these things fixed it, but it is working now.

Did ALL updates. No HDMI sound at this point.
Did search for proprietary drivers thru Applications/System//Extra Drivers.
Installed the first AMD Driver in the list. (2nd one did not work). Rebooted. Still no sound.
Unplugged HDMI from the ZBOX and replugged. Still no sound.
Opened Audio Mixer by clicking Speaker Icon(Volume control) in tray. Saw notification that Mint 12 thought there were several files (AMD DRIVERS) that it could ignore and asked for confirmation. I chose "NO".
In the Audio Mixer I selected "Settings", then in the Sound and Video Configuration Window I selected Device Preferences/Audio Playback/Music. In Rt. Side pane highlighted Internal Audio Digital Stereo(HDMI)
Pressed "Test" button- Viola! Sound! YAY!
With Internal Audio Digital Stereo(HDMI) still highlighted, pressed the "Prefer" button. This moved HDMI to the Top of the Device Preference list. Clicked on "Apply".
Opened up AMAROK and started listening to killer digital music on the Cool Streams "Darkerradio" Stream. Sweetness!


Ubuntu 19.04 - Turn off volume change sound

the alert sound for volume change is located in /usr/share/sounds/Yaru/stereo if your sound theme is Yaru

So renaming or removing the file in the system sound theme directory, for example: /usr/share/sounds/Yaru/stereo with the file name audio-volume-change.oga will mute the alerts in every volume change..


Color distortion with Intel HD4000 over HDMI output - VGA is fine

I am having the same issue, except I am connecting it to a Samsung HD TV. If I don't set it to 1920 × 1080 the colors are fine, but things are blurry of course.


I put this in an answer, so you can accept it.

The problem it with the package desktop-base, which installs some plymouth themes and other things.

You don't need it to use gnome-shell, as it is a dependency only of the package gnome, so you can remove it safely and the logo will be back as usual.


Mouse dragging does not work with Alps touchpad and stick

The kernel bug was resolved in 4.10.0-rc3. Right now, I am not 4.10.0-rc5 and it works well.


Short answer: You can probably trust g-o-a if you use Twitter, Facebook and Google-accounts and you're faced with a login-page that looks native to those services (e.g. a facebook-styleish login box instead of a GNOME-styleish one). Edit: However, always assume your accounts are compromised. g-o-a might not be the weakest link, but the more links you've got on a chain, the more likely it is that one of it is going to be weak. Always treat your data carefully.

Long answer:
Depending on what service you use it either uses a "token authentication" (see http://en.wikipedia.org/wiki/OAuth ) or clear text passwords. The worst case scenario for e.g. Twitter is that someone sends spam with your account, but they won't have access to sensitive data (however, if you store passwords in Chrome/Firefox - that's an entierly different matter) and the "hackers" cannot steal your password or change it. You can just go onto the security settings (on Twitter) and then delete the OAuth-token for your g-o-a.

This is different for different services. On Google (and Facebook), you can specify app-specific passwords if you're worried about your privacy. If these passwords are stolen, you can just delete them.

At the end of the day, exploiting g-o-a might not be that valuable unless you're actually targeting a specific person you know runs GNOME, since most people (I dare to say) stores their passwords in Firefox/IE/Chrome, which both should be less secure and more common - like telling a child not to steal candy from an open candy jar and then go away shopping for an hour.

If you're worried about g-o-a, you should always reset your browsing history (and cookies etc.) in your browser when closing the browser and not running any unofficial Facebook apps etc.


Priority field in CVE pages on http://people.ubuntu.com/~ubuntu-security/cve/CVE-XXXX

There's also the consideration of installed base and usage. Bash is present on practically every Ubuntu installation out there, is at the heart of an extremely large number of scripts, whereas Java ... not so much. I'd any day grant a higher priority to a bash exploit than a Java exploit. (And to hear people speak of it, Java exploits pop up every now and then anyway.)

The Security Team Wiki links to the CVE Tracker's README, which describes the priorites:

negligible        Something that is technically a security problem, but is
                  only theoretical in nature, requires a very special
                  situation, has almost no install base, or does no real
                  damage.  These tend not to get backport from upstreams,
                  and will likely not be included in security updates unless
                  there is an easy fix and some other issue causes an update.

low               Something that is a security problem, but is hard to
                  exploit due to environment, requires a user-assisted
                  attack, a small install base, or does very little damage.
                  These tend to be included in security updates only when
                  higher priority issues require an update, or if many
                  low priority issues have built up.

medium            Something is a real security problem, and is exploitable
                  for many people.  Includes network daemon denial of service
                  attacks, cross-site scripting, and gaining user privileges.
                  Updates should be made soon for this priority of issue.

high              A real problem, exploitable for many people in a default
                  installation.  Includes serious remote denial of services,
                  local root privilege escalations, or data loss.

critical          A world-burning problem, exploitable for nearly all people
                  in a default installation of Ubuntu.  Includes remote root
                  privilege escalations, or massive data loss.

In this case, Shellshock was a bug affecting a software that's part of the default installation - bash. Therefore, it's high priority.

As far as I can tell, the priority is set by people during bug triaging.


How do I bypass The TTY login on ubuntu 12.04 lts and what is it?

Simplest solution first, have you tried Ctrl+Alt+F7 (Not F8)? If this doesn't work, try this:

Login from the command line using your username and password.
Try starting the lightdm service.

sudo service lightdm restart

Otherwise, if your computer displays a message there's something wrong with the swap, you could try doing sudo swapoff -a and repeat the above steps. If they work now, something probably is wring with your swap.

That's all I have now. If these don't work, try posting some more info.


How to reduce consumed disk space for a 942 MB 13.10 amd64 server minimal install?

1. Ubuntu Core

After installation using the instructions from What commands are needed to install Ubuntu Core? the used space on the disk is 610MB (measured using $ df -h).

Largely due to the installation of the linux kernel command apt-get update && apt-get install linux-{headers,image}-generic. According to the command output causes 325 MB of additional disk space to be used. In reality the space used before running this command is 132 MB, and after the apt-get update is 141 MB. So in reality the Linux kernel in Ubuntu Core 13.10 amd64 consumes 469 MB of disk space.

The following extra packages will be installed:
  crda dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common iw
  libasprintf0c2 libdevmapper1.02.1 libfreetype6 libfuse2 libnl-3-200 libnl-genl-3-200 libssl1.0.0
  linux-firmware linux-headers-3.11.0-18 linux-headers-3.11.0-18-generic
  linux-image-3.11.0-18-generic linux-image-extra-3.11.0-18-generic os-prober ucf wireless-regdb

The following NEW packages will be installed:
  crda dmsetup gettext-base grub-common grub-gfxpayload-lists grub-pc grub-pc-bin grub2-common iw
  libasprintf0c2 libdevmapper1.02.1 libfreetype6 libfuse2 libnl-3-200 libnl-genl-3-200 libssl1.0.0
  linux-firmware linux-headers-3.11.0-18 linux-headers-3.11.0-18-generic linux-headers-generic
  linux-image-3.11.0-18-generic linux-image-extra-3.11.0-18-generic linux-image-generic os-prober
  ucf wireless-regdb

2. Debootstrap

  The utility used by the Ubuntu installer, and recognized as the
  official way to install an Ubuntu base system, is debootstrap.https://help.ubuntu.com/12.04/installation-guide/powerpc/linux-upgrade.html

A hardy debootstrap minbase install is 142M in df -h size. According to What takes less space: debootstrap or Ubuntu Core? a 12.04 debootstrap installation measures 205M.

The Fedora counterpart of debootstrap is named febootstrap. Its author - Richard W.M. Jones - has written an interesting blog post where he describes how to reduce the 225M minimal febootstrap to 38M. This small installation can even be slimmed further to 16M when willing to loose the RPM database (=updates), locales, time zones, etcetera.


Problems accessing samba shares on Ubuntu server with Windows 10

I had a problem with the samba connection some time back. I was suggested to add the following into the smb.conf:

[global]

workgroup = WORKGROUP

security = SHARE

interfaces = eth0 lo

bind interfaces only = yes

You may need to modify the workgroup and the interfaces as per your requirements.


new nvidia card causes ubuntu login to fail

Use Ubuntu live CD and go for 'Try Ubuntu'.

Have to remount the system partition (where Ubuntu is installed).

sudo mount /dev/sda1     /mnt
sudo mount --bind /dev  /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys  /mnt/sys
sudo chroot /mnt

# Remove existing drivers
sudo apt-get remove nvidia*
sudo apt-get purge nvidia*
# Housekeeping
sudo apt-get clean
sudo apt-get autoclean
# Handle any errors to due incomplete apt-get operations
sudo dpkg --configure -a
sudo apt-get update
sudo apt-get upgrade
# Remove xorg/X11/XFree86 references to graphics drivers
sudo rm /etc/X11/xorg.conf
sudo apt-get install ubuntu-desktop

Now, install the nvidia drivers we want:

sudo apt-get install nvidia-current
sudo apt-get install nvidia-common
sudo apt-get install nvidia-304

Now reboot the system.

Sources:

https://superuser.com/questions/651596/ubuntu-12-04-lts-blinking-cursor-and-cannot-start-after-nvidia-driver-upgrade


Have yiou tried setting the permissions of your image(s).  Go to the image repository (which I am assuming is usr/share/backgrounds) right click on the image and select properties. Set the permisiions tab and ensure the "Others Permission" is not set to "None"  It should be set to "Read" or "Read and Write"


Should I install ia32-libs or lib32stdc++ or can I just use --force-all for 32-bit printer driver

I just installed ia32-libs on ubuntu 12.04 LTS 64bit and it took long time to install.
I am happy to say that now my brother MFC J280W started working!

This Brother web page helped me.


nmap -p1-65535 ${SERVER_IP}
nmap -sU -p1-65535 ${SERVER_IP}

The first variant scans all TCP ports; the second all UDP ports.  Note that if you try broad portscanning over a public network, or against a server/network for which you are not an administrator, you are likely to trigger an IDS and get blocked.


Check your fstab,Just edit your fstab.. here's mine.

NOTE:
*The second colum is the mount path
**I use umask=000 because of folder permissions on Windows<>Linux

If you have trouble with umask here's a good article:

http://www.omaroid.com/fstab-permission-masks-explained/

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdb1 during installation
UUID=25677686-3338-406d-bb07-bcf2584cb8d9 /               ext4    errors=remount-ro,user_xattr 0       1
# /mount/DATA was on /dev/sdc1 during installation
UUID=79239C344158404E /media/DATA     ntfs    defaults,umask=000,gid=46 0       0
# /mount/VM was on /dev/sda1 during installation
UUID=00602055602053A6 /media/VM       ntfs    defaults,umask=000,gid=46 0       0
# swap was on /dev/sdb5 during installation
UUID=dbca6161-c0ad-4646-8d49-6e5243433a76 none            swap    sw              0       0


Are there alternative repositories for ruby1.8 package in 10.04?

I cannot test this, since I'm on Oneiric and that version is already 300+, but you can try to search for PPAs by using: https://launchpad.net/ubuntu/+ppas (sometimes it is a bit slow).

I've already tried a quick search for „ruby1.8 lucid”:

Redmine PPA for example contains ruby1.8 1.8.7.357-1~lucid+2

Be careful though when using PPAs, general precautions apply.


Can't install ubuntu-touch (dual boot) on mobile (stuck in )

I was trying exactly the same, same setup, and I think the critical error is this:

Downloading recovery for aquaris5
ls: cannot access recovery-aquaris5-6.0.4.3.img: No such file or directory

or as I had it:

Waiting for device to be connected in normal or recovery mode
Dev:: Waiting for fastboot to be ready
cannot load 'recovery-aquaris5-6.0.4.3.img': No such file or directory
Dev:: Waiting for adb recovery to be ready

The problem is that the script uses:

# Used version of CWM recovery
URL_CWM_PATH_BASE="http://download2.clockworkmod.com/recoveries/recovery-clockwork"

... but if you go to http://download2.clockworkmod.com/recoveries/recovery-clockwork:

    This XML file does not appear to have any style information associated with it. The document tree is shown below.
  <Error>AccessDenied<Message>Access Denied</Message>...</Error>

... so, clearly, the recovery images cannot be downloaded from here any more... There seems to be another website now:

https://www.clockworkmod.com/rommanager

... but there are no Aquaris ROMs there...

EDIT: Ok, did a bit more looking up into this. First, probably the title of this question should include "dual boot", because the dualboot.sh script is from https://wiki.ubuntu.com/Touch/DualBootInstallation.

Anyways, this is the thing: this script and concept (as on the Wiki page) assume there is stock Android on this device, and have relied on ClockworkMod (CWM) custom recovery image; it seems there was such an image for an Aquaris E5 in the past, but not anymore. Right now, the only custom recovery image which supports Aquaris E5 seems to be TWRP (Team Win Recovery Project), see:

https://twrp.me/Devices/
https://dl.twrp.me/vegetahd/twrp-3.0.2-0-vegetahd.img.html

I flashed my phone with this recovery image as per http://www.mibqyyo.com/comunidad/discussion/77467/how-to-root-a-bq-aquaris-e5-hd-phone ; and I was wondering if the dual boot could be used with this recovery instead.

First, the dualboot.sh basically does a sideload of UPDATE-SuperSU-v1.93.zip and UPDATE-UbuntuInstaller.zip; here the SuperSU application will already be there from the TWRP recovery rooting procedure, and then we're left with UPDATE-UbuntuInstaller.zip. This zip can actually be sideloaded from a PC using the TWRP recovery, and then we get a "Ubuntu Dual Boot" app when Android is booted. Unfortunately,

  It appears the device is not supported... Aquaris_E5_HD

Note that this device may appear as:

$ adb devices -l
List of devices attached
UA00XXXX               recovery usb:1-1.3 product:omni_vegetahd model:Aquaris_E5_HD device:vegetahd
# or
UA00XXXX               sideload usb:1-1.3
# or
UA00XXXX               device usb:1-1.3 product:Aquaris_E5_HD model:Aquaris_E5_HD device:Aquaris_E5_HD

Here, we can get the source of this app:

$ bzr branch lp:humpolec
$ cd humpolec/

... and then, in (humpolec/)src/com/canonical/ubuntu/installer/Utils.java, do this hack:

public static boolean isBringupMode() {
    if (!UbuntuInstallService.BRINGUP_MODE) {
        String deviceModel = Build.DEVICE.toLowerCase(Locale.US);
        if ("bq_aquaris5".equals(deviceModel)) {
            return true;
        }
        if ("aquaris_e5_hd".equals(deviceModel)) { // ADD..
            return true;                           // ..
        }                                          // ..THIS
        return false;
    }
    return true;
}

... and then to build:

JAVA_HOME=/path/to/android/jdk1.6.0_45 \
PATH=${PATH}:/path/to/android/adt-bundle-linux-x86-20140321/eclipse/plugins/org.apache.ant_1.8.4.v201303080030/bin:/path/to/android/adt-bundle-linux-x86-20140321/sdk/tools:/path/to/android/jdk1.6.0_45/bin  \
ANDROID_HOME=/path/to/android/adt-bundle-linux-x86-20140321/sdk \
ant debug

Here, to be able to sideload, you'll have to first unpack the UPDATE-UbuntuInstaller.zip as a directory, say, UPD-Ub, and then replace the .apk in there with the one built in previous step, and then repack the zip:

cp -a UPD-Ub UPD-UbNew
cp -a humpolec/bin/UbuntuInstaller-debug.apk UPD-UbNew/system/app/UbuntuInstaller.apk
rm -rf UPD-UbNew/system/app/UbuntuInstaller_apk # from previous unzip
(cd UPD-UbNew; zip -r ../UPDATE-UbuntuInstallerNew.zip .)

Then, when booted in TWRP recovery, you can sideload from PC with:

adb sideload UPDATE-UbuntuInstallerNew.zip

... and the updated app will install on phone.

Here, the app will open, and will even download from a channel (I tried stable/bq-aquaris.en) and unpack - however when you finally do "Reboot to Ubuntu" in the app, it will simply reboot to TWRP recovery. The problem is, the app still expects CWM recovery, and basically copies the data it downloaded in directories specific to CWM, not TWRP. And since CWM does not have a ROM for this device anymore, the app as such is unfortunately unusable for dual boot on this device.

The only other option for dual boot on Aquaris E5 seems to be MultiROM Manager app for Android, which seems to be based on/work with TWRP recovery - unfortunately, it does not recognize this device either: when it is started, it states: "This is unsupported device (Aquaris_E5_HD)!"


I am trying to re-install r in my ubuntu 14.04. But I keep getting this error always I try to install r as sudo apt-get install r-base

Run:

sudo apt-get -f install
sudo apt-get update
sudo apt-get install r-base

This may fix the problem for you, otherwise check here for additional troubleshooting.


You can use xargs and seq. Generally:

seq nr_of_times_to_repeat | xargs -Iz command

For example:

seq 10 | xargs -Iz xdotool click 1

will execute the xdotool click 1 command for 10 times.


How To Do a Fresh Install of Ubuntu to a Specific Drive or Partition

When installing Ubuntu 14.04, at the installation type menu, you need
to select the bottom option 'Something Else' instead of 'Erase
everything and Install Ubuntu'.

This will bring you to the partitioning menu where you select the drive & partition for installation.

Your Primary hard drive will be listed as 'Sda' followed by any partitions that are on it like Sda1 or Sda2. Other drives will be listed below as 'Sdb' 'Sdc' and so on.

Click on  the partition on the drive you want to install to and
select 'change'.
You need to select 'use this partition as Ext4 File System'.
Then you need to set the 'mount point' as '/' which is the
root file system and click OK.

You can also select 'format partition' at this point.

You will be taken back to the previous menu and that partition will have a tick next to it.

Make sure no other partitions or drives have ticks by them and proceed with the installation. Only the drive / partitions you have selected will be used.

Note: You can also format the partition using 'Disks' or 'Gparted' from a live session, by selecting 'Try Ubuntu' on the installation disc/usb.


How to install latest release ubuntu without losing data files

If I'm correct, there is no way to upgrade from 12.04 to 13.10 directly unless you reinstall Ubuntu completely, which will lead to a loss of data.

My advice is, backup your important files - this is important. Whether or not your files are supposed to be deleted does not matter - accidents can and will happen.

After backing up, you can upgrade from 12.04 to 12.10, then to 13.04, then to 13.10 by running

do-release-upgrade

in a terminal.

However, this is extremely slow as you will be upgrading 3 times. My recommendation is, copy your files to another device (perhaps using the 13.10 Live CD) and reinstall your Ubuntu.

Summary: Two choices.

Backup files and upgrade 3 times using do-release-upgrade, or
Reinstall Ubuntu 13.10 after copying files elsewhere.


pg_connect(): Unable to connect to PostgreSQL server

Consider the first rule in the pg_hba.conf:

  local all all   peer

It means that for all local connections, the Unix user should be the same as the db user. Obviously this is not the case for you php code, hence the failure Peer authentication failed for user....

The second rule would let your script connect, but it's ignored because the first rule takes precedence:

  local all all   trust

This rule means that all local connections are allowed without requiring password and without checking any identity.

If that's OK with you, just delete the first rule, and reload the postgresql service for the change to take effect.

The other rules should not be relevant to the problem since they're related to TCP connections, and according to the error message, that's not that the method used by your script, it's trying to connect through the default Unix domain socket.


Installing Ubuntu desktop cd 12.04.3-32bit without installing Grub

Its impossible Grub is required to load Ubuntu or any other operating system that uses Grub without it your computer simply will NOT boot-up. It's the same with windows you must have a copy of the MBR, same as grub but for windows installed or the computer will not detect you have an operating system installed.


How get a higher resolution icon for Google Chrome in Docky?

"Did you just install Google Chrome, or has it been installed? If you just installed it, you may need to log out and then log back in." -from user via comments: https://askubuntu.com/users/2733/russjr08


Clipboard manager with "history paste" support?

I'm not aware of a clipboard manager that itself provides the feature you want, but there are two ways in which I imagine that Klipper could be incorporated in a solution.

Klipper offers "Next History Item" and "Previous History Item" shortcuts that change the order of the clipboard history. Therefore, pasting the nth entry can be done by running the "Next History Item" shortcut n times, then running Ctrl+V (or whatever your paste shortcut is), and then -- to put the history back into its original order -- running the "Previous History Item" shortcut n times. Using this, your problem reduces to setting a shortcut that simulates entering a series of shortcuts.
The command qdbus org.kde.klipper /klipper getClipboardHistoryItem n where the n at the end is a number (e.g. 0, 1, 2...) will output the nth clipboard history item. Using this, your problem reduces to the problem of setting a keyboard shortcut that will paste the output of a command.


clear Ubuntu One (Web) Contacts Overview

No, there isn't. Why would you want to do that?


How to locate that folder and files content related to every process newly started

You are probably talking about the /proc filesystem:
http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/proc.html

Normally though you don't have to interact with it.

If you want to get the process ID of your application from within your application so you can locate the right directory, you can use e.g. getpid() in C:

#include <sys/types.h>
#include <unistd.h>

pid_t my_PID = getpid(void);

See also
https://www.gnu.org/software/libc/manual/html_node/Process-Identification.html
http://man7.org/linux/man-pages/man2/getpid.2.html


Webcam appears black in Skype, Acer Aspire V3-571G

I keep figuring out solutions to my own questions, but seeing as other people may face the same issue, what fixed it was typing this into terminal v4l2-ctl --set-ctrl=exposure_auto_priority=1 everytime i start a skype call.


setlocale: LC_CTYPE: cannot change locale (UTF-8)

Fixed it by adding these lines to ~/.bash_profile on my local machine (OSX).

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8


Weird World of Warcraft OpenGL glitchyness

I fixed it by opening "winecfg" and by navigating to the "Graphics" pane and checking the following:

Allow the window manager to decorate the windows ☑

Allow the windows manager to control the windows ☑


How to prevent svnserve from overwriting SVN repository permissions?

Ok, I found it. Full instructions can be found here: http://odyniec.net/articles/ubuntu-subversion-server/
Specifically, it says

Additionally, you need to make sure that all new files and directories created in the repos directory (in other words, anything committed to the repositories) will also be owned by the group. To accomplish this, use chmod again to set the set-group-ID bit on the directory, which causes any file created inside it to have the same group ownership as the directory itself. Effectively, everything in repos will belong to the svn group.
$ sudo chmod g+s /usr/local/svn/repos

For me, since I had multiple repositories already, I used
$ sudo chmod -R g+s /usr/local/svn/repos


With multiarch you need to explicitly install i386 packages needed, ex.

sudo apt-get  install libgtk2.0-0:i386

Otherwise maybe have a look here for alt. packaging - https://hadler.me/linux/forticlient-sslvpn-deb-packages/


Take a look at rEFInd, a graphical boot manager.

I did a trial install of it once and it worked well.

The maintainer of it is an active member of askubuntu.com

This question is not a duplicate, but the answer to it gives a good overview of the difference between GRUB and rEFInd.


How to hide one particular software from appearing in the Software Center & Dash

Press Alt+Ctrl+T to open the terminal and run the following command.

sudo apt-get remove Pornview


Install Ubuntu on a Panasonic Toughbook CF-28 that doesn't boot from USB or CD

There are many ways you can do this. Please visit Installation without a CD to know what suits your situation.


No Sound in ASUS ZenBook UX431FL running 20.04

In my opinion, a reinstallation may help. But before you make bootable media and start the reinstallation, make sure that you have verified it with SHA256, SHA1, and MD5, so in that way, you won't end up with one that is corrupted!


Ubuntu 12.10 Gnome shell stuck in fall back mode - Acer 5830TG Notebook

540m is a optimus enabled graphics card.

Execute following

sudo rm /etc/X11/xorg.conf

Now reboot,the issue will be resolved.

To properly use this card see Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


You should also get an error message when you run your script:

/home/terdon/scripts/foo.sh: line 7: 0: No such file or directory

This is because you are using < in a [ ], and that doesn't do arithmetic comparison, it's input redirection. So $num1 < 0 means "run the command $num1 and pass it the contents of file 0 as input". What you want is [ $num1 -lt 0 ], -lt means "less than".

Of course, your script doesn't make sense unless you are setting peak_time somewhere. This line:

peak_time=$(date -d "$peak_time" '+%H%M%S');

Will always print 000000 since when you run it, $peak_time has no value:

$ peak_time=$(date -d "$peak_time" '+%H%M%S');
$ echo $peak_time
000000

You need to first set $peak_time and then convert it to a date. for example:

$ peak_time="10:05:31"
$ peak_time=$(date -d "$peak_time" '+%H%M%S');
$ echo $peak_time
100531

So, a working version of your script would be:

#!/bin/bash
currenttime=$(date +%H%M%S);
peak_time="10:05:31"
peak_time=$(date -d "+1 hour" '+%H%M%S');

num1=$(($peak_time-$currenttime))
echo $num1
if [ $num1 -lt 0 ]
then
  echo "peak time is bigger than current"
else
  echo "peak time is smaller than now"
fi


Install Windows on fully encrypted Ubuntu machine

As Windows needs a NTFS partition to work you need to free some space on your hard drive. This new and free part won't be encrypted by Ubuntu, if you format it with GParted in a live session. I have never done it before, but it should work like this. You can even access your ubuntu file system via FreeOTFE within Windows


Web sites do not work when I am logged into Google Chrome or need to log in to Google

Ok, I finally solved the problem using plain old dumb luck and persistence.

I have lost the link, but via many searches I came on a path to a Russian web site (translated to English by Google) where people had similar problems with a range of TP-Link routers, the same brand as my ISP provided to me.

The solution was to lower the MTU from it's default 1500 to 1400.  Maybe higher will work, but for today I am a believer in "Don't fix what isn't broken"

I hope this helps some one else :-)


It's a bug in libpam-smbpass: bug report on Launchpad

Upgrade libpam-smbpass to the latest version using this command:

sudo apt-get update && sudo apt-get install libpam-smbpass

If the bug breaks the capability of running this command as well, download the package from packages.ubuntu.com and install it manually: libpam-smbpass on packages.ubuntu.com.


A small script to get the cryptic codes ;)

#!/bin/bash
#
#   This file echoes a bunch of color codes to the
#   terminal to demonstrate what's available.  Each
#   line is the color code of one forground color,
#   out of 17 (default + 16 escapes), followed by a
#   test use of that color on all nine background
#   colors (default + 8 escapes).
#

T='gYw'   # The test text

echo -e "\n                 40m     41m     42m     43m\
     44m     45m     46m     47m";

for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
           '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
           '  36m' '1;36m' '  37m' '1;37m';
  do FG=${FGs// /}
  echo -en " $FGs \033[$FG  $T  "
  for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
    do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
  done
  echo;
done
echo

The code is easy to read from the table that generated the previous script.

\e[1;37m\e[44m

\e[1;37m – Foreground
\e[44m – Background

Some examples

White foreground

TOA="\e[0m" # No Color
whiteForeground="\e[1;37m"
echo -e "${whiteForeground}foo${TOA}"

White on blue

TOA="\e[0m" # No Color
whiteOnBlue="\e[1;37m\e[44m"
echo -e "${whiteOnBlue}foo${TOA}"

And a sample bash script:

red="\e[0;31m"
green="\e[0;32m"
yellow="\e[0;33m"
blue="\e[0;34m"
TOA="\e[0m" # No Color

if [[ $cfg_log_level == "" ]]; then
  cfg_log_level=4
fi

function logError () {
  if [[ $cfg_log_level == "1" ]] || [[ $cfg_log_level == "2" ]] || [[ $cfg_log_level == "3" ]] || [[ $cfg_log_level == "4" ]]; then
    echo -e "${red}$1${TOA}" 1>&2
  fi
}

function logWarn () {
  if [[ $cfg_log_level == "2" ]] || [[ $cfg_log_level == "3" ]] || [[ $cfg_log_level == "4" ]]; then
    echo -e "${yellow}$1${TOA}" 1>&2
  fi
}

function logInfo () {
  if [[ $cfg_log_level == "3" ]] || [[ $cfg_log_level == "4" ]]; then
    echo -e "${green}$1${TOA}" 1>&2
  fi
}

function logDebug () {
  if [[ $cfg_log_level == "4" ]]; then
    echo -e "${blue}$1${TOA}" 1>&2
  fi
}


Is there any good reason to enable both full-disk and home-directory encryption on a single-user machine?

For some situations, yes. Both gives you:

Protection when your system is turned off through whole-disk encryption.
Protection against other sudo users and applications running as root when you're logged out through home folder encryption.
Your home directory gets tighter permissions when you use home folder encryption, though you can set these permissions yourself to get that benefit without encryption.

Home folder encryption is less important if you already use whole-disk encryption when you're the only user on the system, since the files are automatically decrypted anyway by the system whenever you're logged in, and you're probably going to be logged in whenever the system is turned on.


How can I add the Memtest86+ options back to the Grub menu?

Try opening a terminal and running

sudo chmod +x /etc/grub.d/20_memtest86+
sudo update-grub

Check to see if it's there

grep memtest /boot/grub/grub.cfg

Just done the same as I had it disabled

hob@hob-HP-dx5150-MT:~$ cat /boot/grub/grub.cfg |grep memtest
hob@hob-HP-dx5150-MT:~$ sudo chmod +x /etc/grub.d/20_memtest86+
[sudo] password for hob:
hob@hob-HP-dx5150-MT:~$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.2.0-24-generic
Found initrd image: /boot/initrd.img-3.2.0-24-generic
Found linux image: /boot/vmlinuz-3.2.0-23-generic
Found initrd image: /boot/initrd.img-3.2.0-23-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Ubuntu 11.10 (11.10) on /dev/sda6
Found Trisquel 5.5 (5.5) on /dev/sda8
Found Ubuntu 12.04 LTS (12.04) on /dev/sda9
done
hob@hob-HP-dx5150-MT:~$ cat /boot/grub/grub.cfg |grep memtest
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    linux16 /boot/memtest86+.bin
menuentry "Memory test (memtest86+, serial console 115200)" {
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
### END /etc/grub.d/20_memtest86+ ###

You could try creating the file if it's not there, using nano in a terminal

sudo nano /etc/grub.d/20_memtest86+

or with a gui editor

gksudo gedit /etc/grub.d/20_memtest86+

Fill it with

#!/bin/sh
set -e

if [ -f /usr/lib/grub/grub-mkconfig_lib ]; then
  . /usr/lib/grub/grub-mkconfig_lib
  LX=linux16
elif [ -f /usr/lib/grub/update-grub_lib ]; then
  . /usr/lib/grub/update-grub_lib
  LX=linux
else
  # no grub file, so we notify and exit gracefully
  echo "Cannot find grub config file, exiting." >&2
  exit 0
fi

# We can't cope with loop-mounted devices here.
case ${GRUB_DEVICE_BOOT} in
  /dev/loop/*|/dev/loop[0-9]) exit 0 ;;
esac

prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"

if test -e /boot/memtest86+.bin ; then
  MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
  echo "Found memtest86+ image: $MEMTESTPATH" >&2
  cat << EOF
menuentry "Memory test (memtest86+)" {
EOF
  printf '%s\n' "${prepare_boot_cache}"
  cat << EOF
    $LX $MEMTESTPATH
}
menuentry "Memory test (memtest86+, serial console 115200)" {
EOF
  printf '%s\n' "${prepare_boot_cache}"
  cat << EOF
    $LX $MEMTESTPATH console=ttyS0,115200n8
}
EOF
fi

#if test -e /boot/memtest86+_multiboot.bin ; then
#  MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+_multiboot.bin" )
#  echo "Found memtest86+ multiboot image: $MEMTESTPATH" >&2
#  cat << EOF
#menuentry "Memory test (memtest86+, experimental multiboot)" {
#EOF
#  printf '%s\n' "${prepare_boot_cache}"
#  cat << EOF
#   multiboot   $MEMTESTPATH
#}
#menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
#EOF
#  printf '%s\n' "${prepare_boot_cache}"
#  cat << EOF
#   multiboot   $MEMTESTPATH console=ttyS0,115200n8
#}
#EOF
#fi

Make sure to run the chmod +x command on it afterwards.

I'd be a bit concerned that it's missing though - do you have everything else in grub.d ?

ls /etc/grub.d/

00_header        10_linux.bak       20_memtest86+  41_custom
05_debian_theme  10_linux.dpkg-old  30_os-prober   README
10_linux         20_linux_xen       40_custom


What are Mouse Acceleration profiles in the gnome-tweak-tool?

Some digging unearthed information that is "for developers and is not necessarily useful for users".

After trying the different settings, I experienced:

adaptive - Less precise than other modes while moving the mouse slowly or quickly. It's quite jittery.
default: Very smooth and accurate when moving short distances. If I move the pointer across the screen I'll occasionally overreach the target. This mode basically seems to begin with a slow acceleration and increase as the mouses speed increases.
flat: There is no acceleration. Moving short distances results in less precision than the default profile, but I can anticipate where the pointer will be a bit better when moving over large distances, which helps avoid the overreach. I read here that when playing FPS games you want this profile.


Should I install through WUBI or in a Virtual Machine on my Windows machine?

WUBI PROS:

Direct access to your real hardware (important if you need full 3D support)

WUBI CONS

There have been numerous reports of unbootable systesm during kernel upgrades, I don't think it's effectively supported/tested

VM PROS:

Ability for simultaneous use/interaction between both systems
More widely used than WUBI

If you have a recent processor providing virtualization capabilities (VT) and sufficient RAM, the performance difference can be insignificant.

Unless you need real HW access I strongly suggest using a VM.


How can I make usual phone calls using a connected mobile phone?

You can try this:
http://nohands.sourceforge.net/

From the website description:

  HFP for Linux is a Bluetooth
  Hands-Free Profile server.

  It allows your Linux system to act as a speakerphone for your mobile phone.
  It aims to be a compliant Bluetooth
  HFP 1.5 Hands Free implementation,
  supporting all required commands and
  notifications, as well as streaming
  audio.

  HFP for Linux was designed
  specifically for automotive computing
  applications, but it can be used just
  as well in a desktop environment.

You should try it to discover if it's compatible with your device.


iptables rules for lxd container via ssh

Instead of using iptables, I suggest to use a LXD proxy device.
Such a proxy device would forward incoming connections to the host at the specified IP address to the correct IP address at the container.

For your case, the command to create the proxy device is as follows.

lxc config device add mycontainer myport2222 proxy listen=tcp:0.0.0.0:2222 connect=tcp:127.0.0.1:22

We created

a proxy device for container mycontainer
with the name myport2222
it is a proxy device
it listens on the host on all interfaces (0.0.0.0) on port 2222, but you can configure to listen to a specific interface if you want.
it then connects to port 22 of the container on the loopback interface (no need to put the private IP address of the container, as LXD knows it already).

I notice that you use port 23. This port is normally used for the Telnet protocol, and it is likely that some ISPs are blocking it.


How do I install the Korean (Hangul) keyboard on Ubuntu 13.10?

I hope that this helps. I struggled for some time with this exact same problem. I used to have no problem prior to Ubuntu 13.10. I just upgraded to 14.04 and decided to figure it out again... got it this time and it is REALLY SIMPLE and WORKs... it just isn't too straight forward and there are misleading problems with the adding keyboard step... anyway... try he following and let me know if this works for you!!!

Summary: How to set Ubuntu 14.04 to utilize Hangul.

Background: Since Ubuntu 13.10, the ibus interface became difficult to setup for Hangul. There were issues (most resolved by 14.04) with switching keys. Primary issue appears to be if you want to set the Right Alt key to serve as the "Hangul" key to switch between input modes. This is compounded by the fact that Linux utilizes many keyboard shortcuts and conflicts with modifiers persist. In the past, the dialogs required for setting up IBus for Korean were much different. Ubuntu is on the correct track with the Keyboard Language setup; however, it is confusing for those of us that utilized previous procedures due to lack of information.

Issues:

Ability to utilize the Right Alt key for selecting Hangul.
Zenity (the program that provides GUI interfaces for many scripts,
doesn't display the im-config properly. For that reason, recommend
running from command promt (terminal) with -c option.
It is misleading for users of a clean install to be able to select "korean"
keyboard from Text Entry prior to installing the correct package (or
rather, that the selection doesn't trigger installation of the
ibus-hangul package.

Process:

Install ibus-hangul
Code:

sudo apt-get install ibus-hangul
Run im-config to configure the IM client. If your system is not a "COMPLETELY clean" install where everything is new (ie - did not remount an older "home" partition), recommend that you run im-config twice. First run, delete the config in your home directory. Second run, select ibus as the input method. From a terminal (CTRL+ALT+T)
Code:

im-config -c

Setup "Text Entry Settings". From Dash, type "Text" and select "Text Entry" option. Alternatively, select system syettings (Power/Config icon top right of screen), then select "Text Entry" option. Once in the screen, execute the following steps:

In bottom left, click the + to add a keybaord.
In new dialog box - filter list by typing "Korean"
You will SEE three options:
Korean
Korean (101/104)
Korean (Hangul)

SELECT "Korean (Hangul)" and click ADD.

*If you do not see Korean (Hangul) in the list, restart the computer.

Configure Korean Keybaord -- Select "Korean (Hangul) in the "Input Sources to Use:" part of Text Entry. Now, in bottom right of the "input sources to use" you will see a "configure" button right next tot he small "Keyboard" icon. Select that to configure the Hangul input options.
OPTIONAL: You may wish to configure the keyboard switching options. Default is "Super + Space". I don't like that, so I default mine to an alternate key (currently the "menu" key which I rarely use). Right Alt doesn't work (my preferred since that is the location for the "hangul" key normally.)


List of fonts containing selected character

In Fontmatrix you can compare font characteristics - In the Font Information - Compare.

PS. I think that feature of Character Viewer on Mac OS X would be an awesome feature request to ask of the fontmatrix developer team.

In fact, the interface of Fontmatrix has something even better: you can select the Preview tab and enter a string (containing characters you would like the font to have), and see how it is displayed by each font. So you can scroll through the list of fonts and simultaneously see the fonts' coverage of all the interesting characters, instead of just one character at a time. This helps you visually pick out the fonts containing the selected character(s).

In the screenshot below, you can see that "BABEL Unicode Bold" (selected) contains all characters except ṝ and that "Arial Regular" (where the mouse is) contains only a few characters.


The article has been written way back in 2012. As of now, you could simply run sudo apt-get install unity-webapps-SOMEWEBAPP . Just search through the list using apt-cache search unity-webapps and pick what you want. So technically you can remove that ppa and forget about all this trouble


Getting the default text editor used in system

First of all you should notice that there are two types of text editors..

The command line editors such as vim, nano, emacs, etc..
GUI text editors such as gedit, kate, ...

The default text editor when using the GUI is not the same as the command line text editors so when you are opening a file using GUI you probably are using the GUI text editors which is gedit by default. While when using the command line so you are using the command line text editors.

To know that is the default command line text editor in your system you can try one of the following methods:

First Method:

sudo update-alternatives --config editor

This command show you the text editors. The one you are using has the  * in front

  Selection    Path                Priority   Status
------------------------------------------------------------
* 0            /bin/nano            40        auto mode
  1            /bin/ed             -100       manual mode
  2            /bin/nano            40        manual mode
  3            /usr/bin/vim.basic   30        manual mode
  4            /usr/bin/vim.tiny    10        manual mode

Second Method:

$ echo $EDITOR
/usr/bin/nano

to set the default editor you can add the following to your shell configuration ( ~/.bashrc):

export VISUAL="/usr/bin/nano"
export EDITOR="$VISUAL"


I'm trying to uninstall Ubuntu but there's some issues

If you want to Uninstall Ubuntu Completely, please follow the steps given here.
How To Safely Uninstall Ubuntu From A Windows Dual-Boot PC

If you want to make grub appear with options to boot into any Installed OS, then first try sudo update-grub in your terminal.

This link provides complete details on cant-boot-into-windows-after-installing-ubuntu.

There might one more cause, grub time set to zero. To set it follow : How do I set the grub timeout and the grub default boot entry?


I happend to chmod 755 my whole /usr/ dir

This is what we refer to as a "fatal error". It would be very tedious and lengthy to get to know the required file permission of every system file, then correct the permissions.  In practice, the only solution here is a reinstall.
Note that you can reinstall without reformatting the system file system. Doing so will rather work as a "repair", updating all of your system files but leaving installed programs and system configuration intact. Also user configuration is preserved because user home folders are not deleted.


Problem connecting to private IP address

Go to the right upper corner and click the network icon, go down to the bottom and right click edit connections.

This opens network connections and choose the connection to change, click edit and go to IPv4 settings.

For manual configuration

Choose Method: Manual and then fill in the Address, Netmask and Gateway ... and your desired DNS server.

If you router have configured DHCP - Dynamic Host Configuration Protocol you can from manual switch to Automatic DHCP. Router will give you ip, nm, gw, dns


How to open TCP port 7777 in control panel?

Disable the firewall entirely - it serves no purpose.  FTP needs to establish a connection back to your computer from the server on another random port to transfer files.


How to run executable (application/x-executable)

are you running a 64 bit platform of linux
as this is a 64 bit app?
i downloaded
chmoded the file
like so

chmod +x ToF_Beta2.065_linux64.bin

then i ran like this

./ToF_Beta2.065_linux64.bin

and it run perfect :)

but im 64 bit ubuntu

hope this helps


Can't upgrade ubuntu 12.04 to 14.04 (Package dependencies cannot be resolved)

Instead of:

apt-get upgrade

you can try:

apt-get dist-upgrade

but I would recommend to do fresh install anyway. Upgrade process is a real troublemaker, and installation process is short and simple. Just don't forget to make a backup of your files.


I can't see the link, but seeing the EFI partition I assume that it is a GUID partition table (GPT). So yes, you can use Windows to shrink C: (and leave unallocated drive space).

Reboot from a live Ubuntu drive and use the unallocated space. Either let the Ubuntu installer do it, or prepare it with gparted and select 'Something else' in the partitioning window of the installer.


How to list file names with a total of X letters

It can be done this way:

ls | grep -E '^(\W*[0-9]*[a-zA-Z]){7}\W*[0-9]*$'

This includes cases when the first and the last character is a digit or a non alphanumeric char.

Or shorter

ls | grep -Ei '^([^a-z]*[a-z]){7}[^a-z]*$'


Laptop not charging after switching from Windows 10

1: make sure you update after change to ubuntu,for the system to update the latest driver for the system by command: sudo apt-get update

2: Make sure you plug in the correct direction of the adapter and plug it carefully, you can try to unplug and plug in it securely on your own computer or another computer

for me result after you try all of above step :))


I broke logins to my server by fiddling with /etc/passwd and /etc/shadow

I'd start by using touch to recreate the shadow file, chmod'ing it to 0600 owned by root, and then using useradd to create a new user, and make sure they are in a wheel/admin group so they can sudo - this way you now at least have a method to get root commands on the box if something causes it to restart now.

You can then get some good info from this document. http://tldp.org/HOWTO/Shadow-Password-HOWTO-2.html - Points worth noting - the shadow file format, the usage of the crypt (3) command.