Ubuntu 16.04 No Sound from Speakers, only headphones working

I also had this problem when upgrading my Xubuntu 14.04 to Xubuntu 16.04 (headphones produced sound, but not the speakers).  I have an HD Intel sound card with a Realtek ALC259 chip.  The problem persisted when booting with various kernels from 3.13.X to 4.10.X.

However, I GOT IT FIXED, and here's how:

It's important to understand that Pulseaudio(PA) is the default sound control system for Ubuntu and most (all?) of it's variants.  PA is essentially and overlay on top of the core ALSA sound system.  So, for every action made in PA, there is a subsequent reaction within ALSA.  For each output (aka port) defined within PA, there is a defined adjustment to the ALSA system.  This adjustment is known as the "mixing path".

!!! IMPORTANT !!!

Before you continue, now is a good time to verify that this is actually your problem and there isn't some other reason why your speakers are not working.  You can do so very easily by doing the following test.  (If you've been fiddling with your sound system, you might want to get it back to its defaults before testing):

Unplug any headphones or other sound devices EXCEPT the speakers that are NOT working.
Start playing an audio file that would normally generate sound from your speakers, although isn't currently.  Then,
Open up your terminal and run the command:

alsamixer

You should see the following:

Due to differences between sound cards, your devices my be a little different from those in the image.  In my case, and before fixing the problem, my alsamixer looked just like the image above.

Unmute any devices that are currently muted (use 'm' key to toggle mute).  Then raise the volume sliders up on any devices that are not at 100%.

If you can hear sound from your speakers, this fix is for you!

If you do not hear any sound, go back to "The Google" and keep searching.  This will method will NOT help you.

If you successfully got sound from the above the test, what we need to do now is play with the alsamixer settings in order to determine:

Which device's volume control actually controls the volume of your speakers, and
Which of the devices need to be unmuted for the speakers to work.  Multiple devices may need to be unmuted.

Once we know the ALSA settings by which the speakers will work, we can use this information to make the necessary changes to our PA mixer paths.

In my case, I discovered that my headphones and speakers are linked within ALSA in the following ways:

My Headphone Volume is controled by the "Headphone" device.
Getting sound from my headphones requires that the "Master" and "Headphone" devices be unmuted.
My Speaker Volume is ALSO controlled by the "Headphone" device. (The ALSA speaker volume setting suprisingly has no effect on my speaker's volume.)
Getting sound from my speakers requires that the "Master" and "Speaker" devices be unmuted.

The speaker's default mixer path within PulseAudio(PA) assumed that my speakers were independant of my headphones. Which, as demonstrated above by observation 3, was not the case.  Subsequently, the default mixer path within PA for my speakers made the following problematic changes within ALSA whenever the speaker output was selected within PA:

Dropped the headphone volume to 0.
Set the speaker device as the volume control.

Given how I had observed ALSA's linkage of my speakers and headphones as described earlier, these changes to ALSA would prevent sound from coming out of my speakers.

So, the solution to this problem is obtained by modifying the speaker's mixer path.

The PA mixer path files are located in:

/usr/share/pulseaudio/alsa-mixer/paths/

To determine which mixer path file controls your speakers, you need to:

Make sure that your speaker output is selected within PA (i.e. not your headphones).

Open a terminal and run the following command:

pactl list | grep 'Active Port.*output.*'

It should output something that looks like this:

Active Port: audiotype-output-device

i.e.

The "active port" is the PA port currently controlling the ALSA settings.  Since you already selected your speaker as the PA output, this output from the terminal command tells you that you need to edit the mixer path file audiotype-output-device.conf.  In my case, the mixer path file was analog-output-speaker.conf.

Now that we have the correct mixer path file, we need to make our changes.

NOTE: Within this mixer paths folder, there is a file named 'analog-output.conf.common'.  The contents of this file explain how the mixer path files are interpreted.  If you wish to understand the following changes, I strongly recommend looking at this file before editing your mixer path(s)!

Each mixer path file contains numerous "Elements".  Ideally, there is an element representing each ALSA device on you computer within each of the files.  There are probably elements that you don't have as well.  This is normal.

In my case, I needed to change the Headphone and Speaker elements within the mixer path for analog-output-speaker.conf in the following ways:

Allow PA volume to adjust the headphone ALSA volume.

Original:

[Element Headphone]
switch = off
volume = off

Edited:

[Element Headphone]
switch = off
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

(Optional) Set the speaker volume to off and prevent PA volume from affecting ALSA volume. (If you don't do this, your sound will still work, but the speaker settings within ALSA will bounce around unnessesarily.)

Original:

[Element Speaker]
required-any = any
switch = mute
volume = merge
override-map.1 = all
override-map.2 = all-left,all-right

Edited:

[Element Speaker]
required-any = any
switch = mute
volume = off

Then, restart PA by executing:

pulseaudio -k && pulseaudio --start

Voilà!


possibility to save the current resolution, wallpaper and desktop arrangement settings in gnome 3

1. Script to run your command if four screens are connected

The script below is an edited version of this one.

What it does

Once per five seconds, it checks the number of connected screens. If the number changes, and the total number of connected screens is four, it runs the xrandr command we found in the comment(s).

How to use

Copy the script into an empty file, save it as four_screens.py
Test run the script from a terminal with the command:

python3 /path/to/four_screens.py

and connect your screens. After the fourth is connected, your screen setup should be made.
If all works fine, add the script to Startup Applications: Dash > Startup Applications > Add. Add the command:

python3 /path/to/four_screens.py

#!/usr/bin/env python3
import subprocess
import time

#--- set both commands (connect / disconnect) below
connect_command = "xrandr --output DP-2 --pos 0x0 --mode 1920x1200 "\
                  "&& xrandr --output HDMI-0 --pos 1920x0 --mode 1920x1200 "\
                  "&& xrandr --output DP-3 --pos 3840x0 --mode 1920x1200 "\
                  "&& xrandr --output eDP-1-1 --off"

disconnect_command = ""
#---

while True:
    time.sleep(5)
    try:
        subprocess.Popen(["xrandr"])
    except:
        pass
    else:
        break

# function to get the output of xrandr
def get(cmd): return subprocess.check_output(cmd).decode("utf-8")
# - to count the occurrenc of " connected "
def count_screens(xr): return xr.count(" connected ")
# - to run the connect / disconnect command(s)
def run_command(cmd): subprocess.Popen(["/bin/bash", "-c", cmd])

# first count
xr1 = None

while True:
    time.sleep(5)
    # second count
    xr2 = count_screens(get(["xrandr"]))
    # check if there is a change in the screen state
    if xr2 != xr1:
        if xr2 == 4:
            # command to run if connected (two screens)
            run_command(connect_command)
        elif xr2 == 1:
            # command to run if disconnected (one screen)
            # uncomment run_command(disconnect_command) to enable, then also comment out pass
            pass
            # run_command(disconnect_command)
    # set the second count as initial state for the next loop
    xr1 = xr2

Notes

The script is extremely low on juice, it adds no noticeable burden whatsoever.
In the same script, we can run the wallpaper change, but to do so, please post the (path to) the two wallpapers into your question.

2. Alternatively, a shortcut

If, for whatever reason, you'd prefer not to run a background script, you can run the same command through a keyboard shortcut:

Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

/bin/bash -c "xrandr --output DP-2 --pos 0x0 --mode 1920x1200 && xrandr --output HDMI-0 --pos 1920x0 --mode 1920x1200 && xrandr --output DP-3 --pos 3840x0 --mode 1920x1200 && xrandr --output eDP-1-1 --off"


Your Shift key is probably stuck.

This can happen because either the keyboard key switch is physically stuck a bit or because the last time you released the key the system did not properly detect it.

Both causes should get eliminated by hitting the key a few times.

It's perfectly normal behaviour that the key combinations Shift+↑, Shift+↓, Shift+→ and Shift+← in a terminal window result in the characters A, B, C and D to be printed.


Just run this command and put the modules name that you want to load automatically where it says modulename.

sudo su

echo modulename >> /etc/modules

exit


Recommended way to install regular(cli) .deb packages on Ubuntu Phone?

Create a chroot inside the home directory:

mkdir -p vivid-chroot
cd vivid-chroot
wget http://cdimage.ubuntu.com/ubuntu-touch/vivid/daily-preinstalled/current/vivid-preinstalled-touch-armhf.tar.gz
sudo tar -zxvf vivid-preinstalled-touch-armhf.tar.gz

Then, use the chroot and install whatever CLI tools you need to use, within that chroot:

cd ~/vivid-chroot
sudo chroot .
apt-get update
apt-get install git

In order to perform certain things, it may be required to bind mount some directories. You will need to take extra care when doing so, if you wish to delete the chroot from your phone, or perform other destructive actions.

sudo mount --bind /proc /home/phablet/vivid-chroot/proc
sudo mount --bind /dev /home/phablet/vivid-chroot/dev
sudo mount --bind /sys /home/phablet/vivid-chroot/sys

This isn't an exhaustive list, but you can bind mount other directories as needed in similar fashion. You need not create the chroot in your home directory if you have an external storage device to create it on, such as an SD card. However, not all phones have SD card slots. If you wish to create the chroot on an SD card, simply replace the home directory in the commands above, with the path to a directory on your alternate storage media where you wish to create the chroot.


NetBeans will not launch for the first time

Try to run it from shell:

$ /bin/sh /usr/local/netbeans-8.1/bin/netbeans

and you may see some error messages.


Does the iwlwifi Wifi driver for intel cards support AP mode?

Have you looked at something called hostapd? It is in the Ubuntu Software Centre with a link to the developer's website. There you will see this comment:

  Note! Host AP driver was added into the main kernel tree in Linux v2.6.14. The version in the kernel tree should be used instead of this external hostap-driver package. The external releases are only for older kernel versions and all the future development will be in the main kernel tree.

I have also found this link

https://help.ubuntu.com/community/WifiDocs/MasterMode

Regards.


You could add a systemuser first and then only use smbpasswd [username] to set a password  for that user, so the user can use samba shares.

You have to set a seperate password for samba since it needs to be in a specific format.

However, see samba docu for more information about that stuff.

If you have a ldap set up which you sync your samba already, you can make your system use that ldap aswell. E.g. see the official ubuntu wiki


Ubuntu VM (18.04) Unable to Copy/Drag from Guest to Host

I think it's the 6.1.0=dfsg-3 update because when I installed that, I get same errors you do.

So I've skipped virtualbox updates using synaptic package installer. You could try to install the older version that also listen when using synaptic, give it a try.


The most likely explanation is that you have selected a codeblocks workspace that is on a non-Linux filesystem (such as an external NTFS hard drive). Such filesystems don't natively support Unix-style permission bits, so there's no way to mark files as executable (except globally, at mount time).

If that is the case here, then the easiest solution is to move your workspace to your regular Linux home directory.


Step by step instruction required to install Canon TS3150 Printer

I would suggest using the drivers that Canon supply for their printer;

please go here http://support-asia.canon-asia.com/contents/ASIA/EN/0100910801.html and click to download and SAVE what will be cnijfilter2-5.50-1-deb.tar.gz and it should end up in our Downloads folder.Canon released this 8th Dec 2017.

Below will be some commands; each line needs to be copied and then pasted into a terminal; hit the ENTER key after each paste; then move to the next command;

to paste into the terminal; right-click at the text prompt: the flashing light; you should see a MENU there, and select PASTE from that

cd Downloads
tar -zxvf cnijfilter2-5.50-1-deb.tar.gz
cd cnijfilter2-5.50-1-deb

then the install script; watch as it runs, as it will ask you questions

sudo ./install.sh

so that should 1) install the drivers and 2) register the printer on lpadmin

(I had understood the michael gruz ppa was no longer supported; support stopped in 2015 or so?)


evdev ButtonMapping logs ok but has no effect

ButtonMapping is a pointer function (for mice) but you have MatchIsKeyboard set which means you're trying to apply it to a keyboard.  Keyboards have no buttons.  You can check this with:

xinput list

and then

xinput get-button-map <id-of-your-device>

You probably don't want to be using evdev functions for this anyway, you want to change your keyboard mapping it sounds like.


If you have dconf installed then to disable:

dconf write /org/compiz/profiles/unity/plugins/unityshell/shortcut-overlay false

and to switch back on

 dconf write /org/compiz/profiles/unity/plugins/unityshell/shortcut-overlay true

If you don't have dconf installed then install it through

sudo apt-get install dconf


Taking the input and output of a terminal

script should be what you are looking for (man page).

Start a logged session with script /path/to/your/logfile, every command and its output will be logged into the logfile.

If you need timing info for a realistic replay, use script -t=/path/to/your/timingfile /path/to/your/logfile. Afterwards, you can replay the log using scriptreplay /path/to/your/timingfile /path/to/your/logfile.


Useless/broken options on Ubuntu Tweaks? (Ubuntu 19.04)

Thanks to @guiverc, as he already provided the links about the uses of those extensions..

These gnome-shell-extensions are pre Installed with the Ubuntu.ISO and configured in the file /usr/share/gnome-shell/modes/ubuntu.json

{
    "parentMode": "user",
    "stylesheetName": "Yaru/gnome-shell.css",
    "debugFlags": ["backtrace-crashes-all"],
    "enabledExtensions": ["ubuntu-dock@ubuntu.com", "ubuntu-appindicators@ubuntu.com", "desktop-icons@csoriano"]
}

This causes, the toggle button useless.. from the gnome-tweaks extensions tab..

you can remove these extensions from the line "enabledEstensions":

{
    "parentMode": "user",
    "stylesheetName": "Yaru/gnome-shell.css",
    "debugFlags": ["backtrace-crashes-all"],
    "enabledExtensions": []
}

now all the 3 pre enabledExtensions will respect the toggle button..

Note: this concept of modes, ubuntu.json will apply to ubuntu desktop session which is default in Ubuntu 19.04

If you install different desktop sessions and logged into that session, this case varies based on that sessions configuration..


Split a large video file into small clips 15 seconds each

Use the segment muxer:

ffmpeg -i ~/Desktop/in.mp4 -c copy -map 0 -f segment -segment_time 15 -reset_timestamps 1 -segment_format_options movflags=+faststart out%03d.mp4

This example will use stream copy mode, so re-encoding will be avoided. However, it has to cut on the nearest keyframes so accuracy is not guaranteed. Remove -c copy if you need more accuracy, but note that re-encoding will occur.
Output files in this example will be named out001.mp4, out002.mp4, etc.


How do I reinstall ubuntu after formatting partition on windows dual boot

You can change the boot order so that you can use windows.Type the following in your terminal

sudo gedit /etc/default/grub

Find the line GRUB_DEFAULT=0 and change to GRUB_DEFAULT=saved.

Then execute command to update grub using

sudo update-grub

to change the boot order, execute the folowing

sudo grub-set-default n (n is the windows listed in grub, count from 0,1 and so on)

as boot items are count from 0 to n, not 1 to n.
If uh want to change again the grub boot loader you need to execute the

grub-set-default

Hope this helps you.
Thank you.!


If you're getting an error in 20.04 when storing a password in a keychain, that's AppArmor securing snap applications.
You can fix this by clicking "Permissions" in Ubuntu Software when viewing the MySQL Workbench app. Turn on the reading/writing passwords permission.


How to create sandbox home directory with AuFS

AuFS started as an implementation of UnionFS Union File System.

An union filesystem takes an existing filesystem and transparently overlays it on a newer filesystem.

To install aufs:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
apt-get update
apt-get install aufs-tools

How to mount two directories of a same filesystem:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
mkdir /tmp/rw
mkdir /tmp/aus
mount -t aufs -o br=/tmp/rw:/home/user none /tmp/aus/

The first two commands created two new directories in /tmp.

The mount.aufs is the command to mount the filesystem.

The mount command, specifies it is going to union mount /tmp/rw and /home/user under /tmp/aus.

The directory /tmp/aus will have the content of both /tmp/rw and /home/user.

The options are used in mount command are:

-o – specifies options to be passed to the filesystem
br – specifies a branch, where each branch is separated by colon (:).
none – specifies we don’t have any device associated with it.

mkdir /tmp/rw /tmp/aufs
mount -t aufs -o br=/tmp/rw:${HOME} none /tmp/aufs
or
mount -t aufs -o br=/tmp/rw=rw:${HOME}=ro none /tmp/aufs

Then, you can see whole tree of your home dir through /tmp/aufs.

If you modify a file under /tmp/aufs, the one on your home directory is not affected, instead the same named file will be newly created under /tmp/rw.

And all of your modification to a file will be applied to the one under /tmp/rw.

Source: http://aufs.sourceforge.net/


gcc doesn't do anything when trying to compile a code

When write programs in C, you must compile the program with a compiler (here gcc). So you get an executable file (here a.out).

you should give that file execution permissions with the following command:

chmod +x a.out

and then run your compiled program with

./a.out


Why is the superblock last mount time in the future?

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install ntp

Once you install NTP, then you do

sudo service ntp start


Trying install OS on SSD but "Erro: no such device d7a2c..."

I helped Filipe do the initial install.

/home is sda1 (hard drive)

swap is on sdb1 and root on sdb2  (both the ssd)

I have gotten the original grub error -- and re-installing grub usually solves it.   But I have no experience with ssd.

My guess is something in the bios is preventing it from booting from the ssd.

I always thought that an ssd would look like just another hard drive.

Well Filipe, I am not opposed to helping you install this on the hard drive at a later date.  Let's see if someone can help fix this.

sda is not marked bootable -- but sdb -- the ssd was when he installed the system.  COuld that be an issue?  I have not had issues with sdb being root.   Maybe it just wants the boot info on sda?  If so that is easy to fix.

http://pkill-9.com/recovering-ubuntudebian-linux-after-a-windows-installhiccup/

Wayno


How does Ubuntu create "user-defined" file associations?

In my experience using the default applications section in System settings > Details > Default applications isn't all that reliable for some reason that I can't figure out, but Nautilus->RightClick->Open with->SetAsDefault works every time


font problem in photoshop used via playonlinux

To fix this open Terminal using (Ctrl+Alt+T) and type the below:

sudo apt-get install msttcorefonts

Reopen Photoshop and it should work. This basically installs the Standard Microsoft Fonts onto your computer and configures them in wine.


Moonlight is an open source Silverlight implementation written in Mono. You can download it here: http://www.go-mono.com/moonlight/


(Re-)boot not working after 17.10 upgrade

This (extremely likely) got fixed by upgrading grub from 2.02~beta3-4ubuntu7.1 to 2.02~beta3-4ubuntu7.2.


I don't know what your hardware and BIOS setup is, but you could still go trough the BIOS settings, check the Ubuntu Help on USB Keyboard, there are few steps to do on some BIOS settings, maybe you just need to correct some of them.

Also check the Keyboard Layout chart, if you can't find it use the terminal:

gkbd-keyboard-display -l keyboard_layout

EDIT: Also check the Universal Access under System Settings, deactivate Sticky Keys
That would be my best clue on the Ctrl lock.


Upgrade Ubuntu to 19.10 but cannot boot into the system with purple screen - Dual Boot

I'm the PO of this post and I've fixed the booting problem by updating the BIOS to the newest version.

My previous BIOS is the 2019 July version, but the lastest on ASUS website is the 2019 October version which adds support for Core X 10th generation (my CPU onboard is from the 9th generation).

I'm not sure how it has helped the booting problem, but it has made the kernel 5.3 bootable through the new GRUB. Maybe it's about the intel-microcode and it's an ASUS or X299 specific problem?


Lubuntu starts then transitions to ubuntu

Since what you have now isn't what you want.  Download and do a fresh install of Lubuntu 14.04.  I have it on an old (10 years) Dell Inspiron 1000 and it runs great.


Unarchive a file into specific directory

This is happening because you have use absolute paths while creating the archive, and as you are using -C to do chdir(2) before unarchiving, you will get the absolute paths starting from where you have chdir(2)-ed.

Now, you have two options if you want to use -C:

Use relative paths while creating the archive, and then you can use -C like you have used while unarchiving:

tar -xzvf /tmp/file.tar.gz -C /home/user/Documents/

pick the destination carefully to make sure it does not have the possibility of overwriting anything existing.
Change the directory to /, and use the absolute paths while archiving, and again of course choose the chdir(2) path very carefully in this case as this could replace any existing file:

 tar -xzvf /tmp/file.tar.gz -C /

based on your example, this will put the file(s) in /home/user/Documents/.


MPlayer command line start video at x position

Your best bet is to use the -ss xx option of MPlayer. The setting uses seconds and thus to start your video 60 seconds in the following would suffice:

mplayer -ss 60 video.mp4

If you were interested in transferring allegiance to mpv (as I have) you will find the mpv option --start is much more fully featured than MPlayer's -ss option...


its not a bug, after changing setting it takes little extra time to configure , sometimes hangs if you try to click on other buttons, So after making changes wait till it becomes stable it would take max a minute but not more than that.


If the kernel is Linux, the desktop, and DM is Gnome, then what exactly is Ubuntu?

Ubuntu, Debian, antiX, Mint, Kali, etc. are "distributions," sometimes called "distros".  This convention has existed for at least fifteen years.

There's even a website devoted to the various distributions called distrowatch.com.


Linux can see all of my WIndows 7 partition?

Yes, that is normal.

Ubuntu recognizes an incredible lot of filesystems and can read them (mostly write them too).

Windows recognizes only it's own FAT and NTFS, if we don't consider the filesystems of optical media.

That is the reason why Windows cannot read Ubuntu partitions, but that Ubuntu can read and write any Windows partition without any problem. There exist some projects like Ext2Fsd or zfs-win which bring partial support for some filesystems to Windows.


The debian policy forbids you from messing around with files that belong to other packages and/or system changes. (or at least I think it does)

Teach your users

You may instruct users to use purge instead of remove:

sudo apt-get purge mypackage

Automatic overwrite

If you need to overwrite configuration files, debian may prompt the user to install the maintainer configuration files: http://www.debian.org/doc/manuals/maint-guide/dother.en.html#conffiles

  One of the most annoying things about software is when you spend a
  great deal of time and effort customizing a program, only to have an
  upgrade stomp all over your changes. Debian solves this problem by
  marking such configuration files as conffiles. [55] When you upgrade a
  package, you'll be asked whether you want to keep your old
  configuration files or not.

Force new configuration files by default

You may do that automatically while upgrading:

apt-get -o Dpkg::Options::="--force-confnew" dist-upgrade

Sources: http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/ and https://askubuntu.com/a/104912/5538

Provides/Conflicts/Replaces

I'm not sure about this, but I think you may can fully purge and replace an old package version with a new package version.

Read here: http://www.debian.org/doc/debian-policy/ch-relationships.html#s-replaces


Thunderbird not loading any mails from yahoo , POP issue

I'm not sure about this, but I think that only Yahoo Plus accounts can work with email programs like Thunderbird and Outlook. That's what happened when I tried to set up Outlook, so I switched to Google.


Trouble connecting to remote printer with cups

On server-B, access the CUPS admin page (http://localhost:631/admin) and ensure that BOTH the Share printers connected to this system and Allow printing from the Internet are checked.

Interesting info can be found in /var/log/cups/.


Assuming the file is sorted and the dates are always there, this should work:

#!/bin/bash

base_dir='./'

while read line; do
    date="${line:0:8}"
    echo "$line" >> "$base_dir$date.txt"
done < "$1"

[Save it as my_splitter, make it executable by running chmod +x my_splitter, then call it like ./my_splitter input_file]

It reads the input file line by line, extracts the date and uses that to append the lines with the same date to the same file.

base_dir is the target directory, and the files will be of the form <date>.txt. Note: existing files won't be overwritten, new lines would be appended due to the >> redirector, so better make sure the target directory doesn't contain any files of the form <date>.txt.


Gcc version conflicts after upgrading to 19.10 from 16.04

Found a solution that worked for me here. Just in case the link goes down, the solution:

The problem of broken package was in the dpkg status file.

$ sudo vim /var/lib/dpkg/status

Locate the corrupt package, and remove the whole block of information about it and save the file. In my case, I removed gcc-9 related two paragraphs of information. After that I ran

sudo aptitude install gcc

This gave me the option to downgrade packages now which resolved all further issues.


In which system file does 'export' command make changes?

export is a shell command. It affects the current running instance of the shell. It does not make changes in any file. The changes are temporary, only in effect until the shell exits. Once you set a new variable in the shell, to make it available to other programs started from it, you export it. See:

What is the difference between Terminal, Console, Shell, and Command Line?
What is the difference between `VAR=...` and `export VAR=...`?
What's the difference between set, export and env and when should I use each?

java and javac might work because you installed Java using a PPA, and the installation automatically added these commands to the PATH (What is the PATH environment variable and how do I add to it?). Specifically, just checking the version shouldn't need the JAVA_HOME variable. Whether you set it or not makes no difference just for that. And apparently JAVA_HOME is used by other applications, not the Java compiler or the JVM.


How can I restore using systemback when not booting (and without iso)

First, try to boot the system in normal mode. Wait a little and try to switch to tty1 with Ctrl+Alt+F1. If possible, then login and using systemback-cli command to perform a system restoration.
If the restoration is not possible, you need to boot an other system. Install the Systemback and perform a system repair. Just set the storage directory, select a restore point and mount the partitions.


Installation fails due to snapd trying to overwrite a package from snap-confine

Solution: Unplug your internet connection / disable wifi.

Quick fix is to have no active connection during installation.

This is a known bug that is being caused by a package that is downloaded using aptitude. (See link below.) To make sure you don't download the package, unplug the ethernet cable or disable wifi before beginning installation.

See bug report:
https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1673247.


Problem facing while installing TrueCrypt

Make the file executable and then run it.

sudo chmod +x truecrypt-7.1a-setup-x64
sudo ./truecrypt-7.1a-setup-x64

Before running the above commands, you have to cded into the directory where truecrypt-7.1a-setup-x64 file is located.


Graphical packages not installed by mistake, lubuntu

Do you have a live disk or USB? Boot from it and reinstall.
If you have access to the web, through the command prompt try   sudo apt-get update && sudo apt-get upgrade


Wifi re-prompts to ask for password repeatedly(Kubuntu 13.10 fresh)

its not an access point issue, look this up in the ubuntu forums. Sometimes a changing of the power management settings can solve it. Other times its the MTU setting.


HWE for 14.04 ended but update to current security-supported stack does not work

Hm, a pity that nobody seems to have a solution. I tried it myself: I did a "dpkg -l | grep vivid" and removed the packages and installed the packages with no "vivid" in its named. That did the trick.


Is it ok to install python 3.2 in 11.10?

Python 2.x and 3.x happily coexist on ubuntu.  All python scripts not specifically launched with python 3 will default to python 2 though.

aking1012@devlaptop:~$ python3
Python 3.2.2 (default, Sep  5 2011, 21:17:14)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()
aking1012@devlaptop:~$ python
Python 2.7.2+ (default, Oct  4 2011, 20:06:09)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> quit()

If you're want to test 3 packages I would use something like Aptana where you can select which python dist you want to test under.

Credit to James Henstridge on suggesting the pseudo-package python3 over a specific version number.


sudo unable to resolve host and sh: 1: cannot create /tmp/vcsSemKey_ServiceId: Permission denied

I had the same problem, I fixed it by uninstalling the packages relating to Fingerprint Scanner using Synaptic Package manager, now my terminal works fine.
Idk if I'm being naive here :/ I'm new to the Linux.


Wifi home network authentication problem only with Ubuntu on laptop

Are u using Wicd per case on Ubuntu? Back in time I were testing wicd with NM still installed and had similar issue.
Fix was easy, removing wicd and keeping NM, the two programs were in conflict and  could not read my password.
however try to connect through CLI

this  command to enable device
sudo ifconfig wlan0 up
if no any feedback it means no problem

than make sure network is available  with
sudo iwlist wlan0 scan
this should list all available networks

than
sudo iwconfig wlan0 essid NETWORK key WIFI_KEY
NETWORK is your ESSID and WIFI_KEY is password

Get IP address by dhclient.
sudo dhclient wlan0
if no any feedback it means no problem and you should be up and running.

Update Please comment under specific answer its just easier to follow up click here to see how this site work.
However if returned unknow host on sudo iwconfig wlan0 essid NETWORK key WIFI_KEY command most likely you are using wrong network ID, make sure its right (copy it from results of sudo iwlist wlan0 scan as there it will be listed and make sure you aren't using quotation marks).


Installing Ubuntu OpenStack requires at least five machines with two disks, two of which have two network interfaces. Why?

Multiple disks are required because the OpenStack configuration deployed by the Autopilot co-locates the Nova Compute service and Ceph on the same nodes. This results in one disk being used for system boot, and one being allocated to the Ceph OSD for data storage.

You get scale-out storage and scale-out compute in the bargain, but you need two disks.

You could substitute USB keys for the second drive... I would not call that "production" but it is a quick workaround for trying out things.


Sounds like you might be hitting this bug:
https://bugs.launchpad.net/ubuntu/+source/nuntium/+bug/1417976

There are some questions being asked in that bug that perhaps you can provide answers for to help us debug.

Thanks.


Are there any synchronization APIs in Ubuntu Touch yet? (Contacts/Calendar/...)

The API you will want to use is the Qt Organizer API.  Currently that only stores things temporarily in memory, but there will soon be a new Evolution Data Server backend that will allow syncing with various services.


How to show the numpad automatically when the textfield is loaded?

It is quite simple to do the above. To set automatic focus to the TextField component, you can call forceActiveFocus() from within your TextField component as shown below,

Component.onCompleted: {
    forceActiveFocus()
}

This sets the focus to the textfield immediately after it is loaded.

As for showing the numpad, you can do so by setting the input hint to numbers only,

inputMethodHints: Qt.ImhDigitsOnly

Your TextField should look like,

TextField {
    id: inputQuestion

    Component.onCompleted: {
        forceActiveFocus()
    }

    width: units.gu(5)
    height: units.gu(2)

    errorHighlight: true
    validator: IntValidator { }
    text: '?'
    inputMethodHints: Qt.ImhDigitsOnly
}

Note: Do not set the width and height in pixels. Use grid units as shown in the example above since that will ensure that the textfield has the same dimensions on all devices regardless of their pixel density.


I was having issues with Dash too after a failed upgrade from 11.04 -> 11.10. To finally fix it I had to do:

sudo apt-get install unity-lens-files unity-lens-music unity-lens-applications

Afterwards, dash started behaving correctly again. I guess the install missed those at some point.


obs-studio package is available in Ubuntu 18.04 LTS, 19.04 and 19.10 (pre-beta).

You can install it with sudo apt-get install obs-studio.


swappiness=0 will wait to swap until it is absolutely necessary. Setting a moderate value like swappiness=10 will cause pages to be swapped from memory to disk somewhat more readily. This can prevent the need to swap a lot at once; such a need can introduce annoying delays.

In addition, often a process runs but does nothing for an extended time. Many daemons (background services) behave this way. You may have a background application that is left unused for a while. And these days some applications are implemented as multiple processes, like Chromium and Google Chrome, where each tab has a separate process behind it (not a separate thread, but a separate process). Setting swappiness to a value like 10 makes it so these background tasks that are not being actively used are swapped to memory even when they could remain crammed in RAM. Then when a more actively used process needs to allocate more RAM, it can do so more quickly.

In conclusion, allowing processes to be swapped from RAM to disk earlier than necessary often confers a performance benefit and lower latencies when a process allocates memory. This is at the expense of the time it takes to swap the processes back. But this is usually done much less frequently than a process in active use allocates and releases memory, so the trade-off is often worthwhile.


How do I disable Apport for my user account?

This looks like a problem in Apport. I'd fill a bug, because there is no guarantee that you program won't fail on different environment if it causes Apport to crash.

If you really want to disable Apport for your program, try this:

if sys.excepthook != sys.__excepthook__:
   print("Warning: 3rd party exception hook is active")
   if sys.excepthook.__name__ == 'apport_excepthook':
       print("         killing Ubuntu's Apport hook")
       sys.excepthook = sys.__excepthook__


Ubuntu 16.04 : Different partitions for root and home, but files in home occupy memory in both

What you're probably running into is temp space:

Depending on the methodology of uploading and size of the files, these files might first be created in the root partition in /tmp and once upload is completed there, transferred to /home.  As rebooting removes all files from /tmp you wouldn't know what's happening...

(as you don't know where it comes from and where it goes to, I suspect you just reboot and the problem goes away until you run out of space again and reboot again)

Edit:

And don't forget to clean out your /root/.local  :-D ;-)


Well, since you have broken packages I would suggest you to use the following command:

sudo apt-get update -f

To fix any broken packages.

and install wine again

sudo apt-get install wine

  And you didn't have to add a repository, since wine is listed by
  default, a regular sudo apt-get install wine would have been enough.

[EDIT]: wow the whole question just changed -.-


You should install Firefox through the software center. Running it through wine is slow and not needed. Open the Software Center > Search for Firefox > Select Firefox > Install Firefox


What specs would a tablet need to run painting apps (mypaint, etc.) well?

The main limitting factor is your memory, screen resolution can effect the responsiveness too. I'd say a 2Ghz Core2 with a 512MB Video card and about 2GB of RAM should do well for medium sizes (3kx4k) and large complex vector images.


Can I have a .desktop Launcher for both Python2 and Python3 depending on version installed?

It sounds too obvious to a good answer but...

Why you don't use a bash script as your app binary. I mean drop in /usr/bin/ a bash script that checks for python3 and then runs the real script.

The launcher will just point to the bash script.

It will even work from the command line (as only the bash script will be on PATH).


Guest Ubuntu 16.04 runs very slowly in VirtualBox Windows 10 host

Some general troubleshooting...

Make sure Unity can use 3D acceleration - it makes a big difference. Run /usr/lib/nux/unity_support_test -p from the terminal and note whether the last line shows Unity 3D supported: yes. If not, enable it in the VM options.
Check you have given it enough video memory. The default settings in VirtualBox for guests are pretty low. Give it 64MB at least, and 128MB if you can.
Check screen resolution. No matter what hardware I try, it just can't seem to power my 4K screen at its native resolution (3840 x 2160). Significantly better experience at 1920 x 1080, scaled.
Check CPU virtualisation settings. If you have, say, a 4-core CPU don't assign all 4 cores to the VM. If you do that, the VM guest will fight the host for resources and the result is that it will actually run slower. Stick to one or two cores. (There's not much difference between 1 and 2 in my experience, but yours may differ).
Do the same for RAM as for CPU. Don't assign more RAM than you need - ensure the host has enough left for itself. 4GB for Ubuntu desktop seems fine for practically everything I throw at it.
I've read that people get better speeds on a mechanical hard disk by using a fixed allocation virtual HDD rather than dynamic. In my experience there's no noticeable difference, but perhaps worth mentioning anyway.


17.10 WiFi connects to phone hotspot, but does not connect to home network

For many years, in diagnosing and attempting to solve connectivity issues, I have preached to all:

  First, check the settings in the router. WPA2-AES is preferred; not
  any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your
  router is capable of N speeds, you may have better connectivity with a
  channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40
  MHz, although it is likely to affect N speeds. I also have better luck
  with a fixed channel, either 1, 6 or 11, rather than automatic channel
  selection. Also, be certain the router is not set to use N speeds
  only; auto B, G and N is preferred. After making these changes, reboot
  the router.

Your case seems like the perfect example. You can easily connect to:

Cell 01 - Address: <MAC 'ThisNetworkWorks' [AC1]>
                    Channel:6
                    Frequency:2.437 GHz (Channel 6)
                    Quality=40/70  Signal level=-70 dBm
                    Encryption key:on
                    ESSID:"ThisNetworkWorks"
                    <snip>
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK

But you cannot connect to:

Cell 02 - Address: <MAC 'Redacted1' [AC2]>
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=53/70  Signal level=-57 dBm
                    Encryption key:on
                    ESSID:"Redacted1"
                    <snip>
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK
                    IE: WPA Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

As far as we can tell from the available data, the only difference is that the SSID that you can connect to is set up with WPA2-CCMP (sometimes known as AES) and the SSID that you cannot connect to is set up with WPA/WPA2 mixed mode and TKIP.

Please change the encryption mode in Redacted1 and tell us if you connect.


2.5. Indenting Code

  Python functions have no explicit begin or end, and no curly braces to
  mark where the function code starts and stops. The only delimiter is a
  colon (:) and the indentation of the code itself.

  Example 2.5. Indenting the buildConnectionString Function

def buildConnectionString(params):
    """Build a connection string from a dictionary of parameters.

    Returns string."""
    return ";".join(["%s=%s" % (k, v) for k, v in params.items()])

Source: Dive Into Python

So the indent in Python is those 4 spaces at beginning of code lines in function definition,class definition, condition block...

Basically, you have the indent inside the function which does not correspond the indent before it.


Ubuntu OpenStack and What Did I Miss Here?

There are three (3) different Ubuntu OpenStack installation options, depending on whether you plan to build your own infrastructure, run Ubuntu as a guest on existing infrastructure (be it public or private) or you want to deploy services on a working cloud with Juju Charms.

Ubuntu Cloud Guest:
This can be done using any of the existing services: Amazon EC2, HP Cloud, Windows Azure, Rackspace Cloud. You only need to execute cloud-init and follow the instructions.

Ubuntu OpenStack:
This could be archived downloading the server image and following the OpenStack documentation. There's also the MAAS route.

Juju Charms
This only requires an existing Ubuntu installation, installing Juju and deploy charms. This is the easiest in case you don't want to deploy immediately.


ibus-avro for Bengali not working in Ubuntu 13.10

Just go to Terminal and type

sudo apt-get install ibus-avro-saucy

If you have not installed avro in Ubuntu 13.10 before then follow this

sudo add-apt-repository "deb http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_13.04/ ./"

then

wget -q http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_13.04/Release.key -O- | sudo apt-key add -

then

sudo apt-get update

then

sudo apt-get install ibus-avro-saucy


To further reduce messages from Update Manager we have the option to install security updates silently in the background. This is done by choosing System Administration -> Update Manager -> Settings -> Updates:

By selecting Install security updates without confirmation all security updates will be downloaded and installed without user interaction.

In case you need to install non-security application's updates tick the appropriate options for Recommended Updates or Unsupported Updates and let Update Manager Download all updates in the background. Then you can manually install these updates at a convenient time.

Though not recommended further reducing on update frequency may be acchieved by increasing the Check for Updates from Daily to Weekly or more.


Integrated webcam isnt working at all ubuntu 14.04 x64

Install the Webcam driver packages :

sudo apt-get install build-essential linux-headers-`uname -r`

If already installed them, reconfigure them:

sudo dpkg-reconfigure -phigh build-essential linux-headers-`uname -r`


How to install Recoll's python:epub helper?

As per a comment at launchpad.net bugs site , you can use the following workaround to get the python epub module installed:

sudo apt-get install python-pip
 sudo pip install epub


Shared /boot/efi partition between Windows/Ubuntu

Generally a UEFI system has just one EFI System Partition (ESP), which in Linux usually gets mounted to /boot/efi. Confirm that with just mount command: /boot isn't a separate mount point, but /boot/efi is. And since system has just one ESP, that's the same ESP Windows uses. You should have there /boot/efi/EFI/BOOT, /boot/efi/EFI/Microsoft, /boot/efi/EFI/Ubuntu, something like this.
As for separate /swap, it does no harm, but may make hibernating Linux less painful. Also it is better because it is simpler, swap file is a file and is routed via swap code AND file system code, and busy file system might make it slower. You can avoid this file system code, why not take this shorter path? This is why I only use swap files as last resort and always recommend to use swap only on separate partitions or volumes.


External USB HD not being automounted according to fstab

The problem was the quotation marks. I didn't notice it before and it makes the fstab line to be ignored.


How to find out which disk is "sd 0:4:0:0"

I did a bit of googling because I was also curious what the 4 digits with colons meant in terms of drive identification. I believe the 4 digits are the SCSI numbers.

Update

If you just install and run lsscsi it will give you something like this:

[0:0:0:0]    disk    ATA      LITEON LCH-256V2 902   /dev/sda
[3:0:0:0]    disk    Kingston DataTraveler G3  PMAP  /dev/sdb

Original Post

If you run ls -ld /sys/block/sd*/device it should look like this:

lrwxrwxrwx 1 root root 0 Feb 21 18:11 /sys/block/sda/device -> ../../../0:0:0:0
lrwxrwxrwx 1 root root 0 Feb 21 18:12 /sys/block/sdb/device -> ../../../3:0:0:0

which means 0:0:0:0 is sda and 3:0:0:0 is sdb.

You can sort out what sda and sdb are by using sudo lshw -class disk -short or something similar.

In my case:

H/W path               Device     Class          Description
============================================================
/0/100/14/0/1/0.0.0    /dev/sdb   disk           16GB SCSI Disk
/0/0/0.0.0             /dev/sda   disk           256GB LITEON LCH-256V2

sda is my internal drive and sdb is my flash drive.


I had the same problem, here:
Run this in the terminal

sudo ln -s /usr/lib/insserv/insserv /sbin/insserv

Then run the usual

It solved my problem below, I hope it fixes yours.

Setting up initscripts (2.88dsf-34) ...
Can't exec "insserv": No such file or directory at /usr/sbin/update-rc.d line 406.
 update-rc.d: error: insserv rejected the script header
dpkg: error processing initscripts (--configure):
 subprocess installed post-installation script returned error exit status 255
Errors were encountered while processing:
 initscripts

ln -s /usr/lib/insserv/insserv /sbin/insserv

Then I ran synaptic again

Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up initscripts (2.88dsf-34) ...

I have another error now though

E: /var/cache/apt/archives/
gstreamer0.10-plugins-good_0.10.31-3+nmu1ubuntu1_i386.deb:
trying to overwrite '/usr/lib/i386-linux-gnu/gstreamer-0.10/libgstcamerabin.so',
which is also in package gstreamer0.10-plugins-bad:i386 0.10.23-7

So I marked gstreamer-bad-plugins for removal in synaptic. So far, so good.
Update: It finished with no errors. :D


I can not access internet on Ubuntu 16.04 LTS

The last error looks to be using *.ownit.se, ownit.se. Is ownit.se your ISP (internet service provider)? I looked at the page in Google and they appear to be, but did not see much information. If you do not have any relation to them, I would be very careful.

They are attempting to hijack your web browser page, possibly to enter a username/password, or accept some terms before allowing any use of the provided internet connection. However modern browsers are designed to block that where possible as it can be used maliciously, e.g. to give a 3rd party your bank details, etc. by tricking you when you try and visit your banks website.

You could try visiting http://ownit.se or https://ownit.se directly. As that is there own website Firefox may accept it.

Any http page should work, but sites are increasingly going https only to stop various attacks, giving you the HSTS errors.


USB will not boot ISO from it. You need to make bootable usb.
If you already use ubuntu, You can check out here. Visit here to make bootable usb from Windows machine.


How to edit quicklist for a Mounted Device in the launcher?

A similar discussion took place in the Ayatana Mailing List. It is not possible to create a quicklist for mounted devices or CDs by just editing the .desktop files. You need to hard code this in Unity itself.


Dell actually ships newer dell xps laptops WITH ubuntu pre installed on them. I'm assuming they probably don't change their hardware drivers too drastically, so older ones should be able to handle ubuntu. Just try to go with an LTS version, like ubuntu 16.04. Their hardware should work just fine, but with linux you'll probably run into little issues here and there, theres usually a host of issues in forums (like this one!) that have been answered, so you'll have plenty of support for that


Realtek driver RTL8723BE not working in Ubuntu 16.04 (kernel 4.4)

So, I figured out what the problem was. Since my machine runs on a UEFI BIOS with secured boot enabled, all the drivers that can be loaded onto the driver stack must be "signed". I think in kernel 4.4 Ubuntu, they enforced this sign verification quite strictly. That being said, all I did was to disable the secure boot from my BIOS setting (won't say this is a permanent solution) and now the wifi works like a charm.


It happens for my mother's PC too.

Ubuntu (it must be said) has a poor driver support. Probably you're using an external Wi-Fi antenna, even worse.

You should try an Ethernet network connection to the modem (it must works)... when setup is terminated do immediately a sudo apt-get update -y && sudo apt-get upgrade -y and reboot.

If you're encountering the same problem with Wi-Fi... hope to find online the proper driver or a workaround to support them.

Or wait for the 15.04.


How to create a user group that can only use one application?

This looks promising, though a bit involved...

http://users.telenet.be/mydotcom/howto/linuxkiosk/ubuntu01.htm


Click on the cog like icon in the top right, go to shutdown and click restart. Alternatively you could just press the power button and a menu should pop up with an option to reboot.

EDIT: I'm not sure what your question actually is. If you want to reboot into windows, check the comments for your question.


Start from Ubuntu Server and build up. It uses the same repos as the desktop distribution and you can install various desktop configurations.

I just suggest you stay away from the big metapackages like ubuntu-desktop or you'll end up will the full blown distro.

If you only want to strip down (rather than building up) you're going to have to remove ubuntu-desktop (which depends on loads of things) and convert all the automatically met dependencies to manually installed. If you don't aptitude will nuke them as it (amongst other tools) will automatically clean up "obsolete" packages -- those are packages that fulfil no dependency or user choice.


How can I quickly copy large files off of a laptop when booted off a LiveCD?

You can set up a Windows machine as an FTP server to transfer files to:

Download FileZilla Server on the Windows machine and install it. Leave all settings default. Then, go to the Filezilla administration interface:

and enter the Users dialog. Add a user, remembering the username and password, and give it a directory on the Shared Folders tab. Give the user read, write, delete,append access to files, and allow this user to create subdirectories and list them. You now have a user set up. Close the dialog.

You can now try to access the FTP server(on your local network, with the IP address of the server machine and port 21. Do this using Nautilus. When you copy files there, they will end up on the Windows machine, in that user's folder.


I'd hoped to find another way out but the solution was just to reset the desktop using
dconf reset -f /org/gnome/


This will not be a fix to your problem but more suggestion and my experience. Tuxguitar might not be good option but I believe it's the best software come with more function that I used for my need to learn guitar. It's support .gp3 to gp5 file extension of Guitar Pro.

Just for your consideration. Hope it help with your problem. Thank you.


I received a malicious email, how do I make sure I'm safe?

I'd consider it unlikely that your system got attacked in any way, but it's not possible to rule out entirely.

Most "spam" e-mails have random looking characters in an attempt to bypass (poorly-implemented) spam filters, but that doesn't immediately mean that it could constitute a threat.

Unless the e-mail itself contained some sort of image (and IIRC Gmail blocks images unless you manually open then) and you saw that image, it's very hard to inject anything malicious into an e-mail, save for maybe a CSS/HTML zero-day (like CVE-2008-2785, CSS), but that seems unlikely. Even so, most browser-based exploits don't tend to work well due to browser sandboxing and other similar security features, although these are still vulnerable to exploit (see CVE-2016-1706).

But let's go down the image route because it's the most likely. Image malware is a fascinating subject, but it really boils down to it being relatively rare because you can only exploit certain versions of a certain program, typically only on a certain operating system. As one can guess, these bugs tend to be fixed alarmingly quickly.

The window for these sorts of attacks is very small, and you were unlikely to be hit by one, if it were present. Due to the nature of these exploits, they can (potentially) be used to break out of the sandbox provided by browsers. For an example as to how something like this can happen, look at CVE-2016-3714 for ImageMagick. Or, specifically for Google Chrome (or, more exactly, libopenjp2), see CVE-2016-8332.

It could be possible that the e-mail you received had a maliciously-crafted image inside it that exploited some bug in the image rendering engine, infecting your machine. This is already pretty unlikely, and if you kept your system up-to-date, you should have nothing to worry. For example, in the case of the OpenJPEG exploit mentioned earlier, any system running version 2.1.2 (released September 28, 2016) would be safe from this exploit.

If you do feel as though you or your system have been infected, it's a good idea to run the standard checks, including clamav, rkhunter, ps -aux, netstat, and good old fashioned log searching. If you really feel your system's been infected, wipe it and start from scratch from a recent known-good backup. Be sure to keep your new system as up-to-date as possible.

But, it's more than likely nothing in this case. E-mails are less attack vectors now as they are junk magnets. If you want, HowToGeek even has an article on the matter that just opening an e-mail usually isn't enough anymore. Or, even, see this SuperUser answer saying the exact same thing.


Postgres-xc won't uninstall (Fails on Stopping Co-ordinators)

The solution that worked for me was:

Modify postgres-xc.prerm:

sudo vim /var/lib/dpkg/info/postgres-xc.prerm

Add "exit 0" after first line (#/bin/sh -e)
Then remove normally:

sudo apt-get remove postgres-xc

(I found this solution at: https://bugs.launchpad.net/ubuntu/+source/postgres-xc/+bug/1084849)


Installing MS Office in Ubuntu 15.10 with PlayOnLinux with setup.exe

Although it's recommanded to use LibreOffice, you still can install MS office in Ubuntu with PlayOnLinux using a CD or Wine using an .exe file which is your case.

Try to follow those guides. Office 2010 , Office 2007 .

Install mesa OpenGL
sudo apt-get install mesa-utils mesa-utils-extra libgl1-mesa-glx:i386 libgl1-mesa-dev

then create a link to OpenGL 32-bit library sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/mesa/libGL.so and
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so /usr/lib/i386-linux-gnu/libGL.so

Install Wine

sudo add-apt-repository ppa:ubuntu-wine/ppa
 sudo apt-get update
 sudo apt-get install wine winetricks

Set Office to the 32 bits version ( 64 bits will not work )

export WINEPREFIX="/home/$(whoami)/.wine/office2007/"
 export WINEARCH="win32"

Run winetricks and pick Select the default wineprefix then Install a Windows DLL or component and choose those packages vcrun2008, dotnet20, dotnet40, msxml6, riched20, riched30, gdiplus, vb3run, vb4run, vb5run, vb6run close and run wine Setup.exe.


Here is a way to do this using only xkb, which I think is superior to using xmodmap. This answer includes more details on what I wanted to achieve than the original question did. Xmodmap and xkb don't always play well together, this approach allows a lot more flexibility:

This is all coming from: https://wiki.archlinux.org/index.php/X_keyboard_extension

There is a list of available keysyms that seem to work here: http://docs.ev3dev.org/projects/grx/en/ev3dev-stretch/c-api/input_keysyms.html

This is being done manually to allow you to start with the configuration that is already there on your computer to prevent compatibility issues with different keyboards.
Examples of prior runs of this are seen in config_files/linux/keyboards

Begin by running xkbcomp $DISPLAY output.xkb to get your current keyboard
settings.
Then add:

    interpret osfLeft{
        repeat= True;
        action = RedirectKey(keycode=<LEFT>, clearmodifiers=Lock);
    };
    interpret osfRight{
        repeat= True;
        action = RedirectKey(keycode=<RGHT>, clearmodifiers=Lock);
    };
    interpret osfDown{
        repeat= True;
        action = RedirectKey(keycode=<DOWN>, clearmodifiers=Lock);
    };
    interpret osfUp{
        repeat= True;
        action = RedirectKey(keycode=<UP>, clearmodifiers=Lock);
    };
    interpret osfEndLine{
        repeat= True;
        action = RedirectKey(keycode=<END>, clearmodifiers=Lock);
    };
    interpret osfBeginLine{
        repeat= True;
        action = RedirectKey(keycode=<HOME>, clearmodifiers=Lock);
    };
    interpret osfEscape{
        repeat=True;
        action = RedirectKey(keycode=<ESC>, clearmodifiers=Lock);
    };

to the compatibility section of the generated file.

To the bottom of the types section, add:

   type "CUST_CAPSLOCK" {
       modifiers= Shift+Lock;
       map[Shift] = Level2;            // Note that this maps Shift only of {Shift,Lock} to Level2. Alt+Shift will be mapped to Level2
       map[Shift+Lock] = Level3;       // but Lock+Shift won't map to Level2 even without this line.
       map[Lock] = Level3;
       level_name[Level1]= "Base";
       level_name[Level2]= "Shift";
       level_name[Level3]= "Lock";
   };
   interpret osfDelete{
       repeat=True;
       action = RedirectKey(keycode=<DELE>, clearmodifiers=Lock);
   };

Search for interpret Caps_Lock and change the LockMods to SetMods
so that caps lock only sets the modifier, doesn't lock it.

To allow capslock + WASD to work as arrow keys: edit the keys <AD02>, <AC01>, <AC02>, <AC03> to have type CUST_CAPSLOCK and have respectively osfUp, osfLeft, osfDown, osfRight in the third position.

To allow capslock + HJKL to work as arrow keys: edit the keys <AC06>, <AC07>, <AC08>, <AC09> to have type CUST_CAPSLOCK and have respectively osfLeft, osfDown, osfUp, osfRight in the third position.

To allow capslock + 0 to register as home and capslock + $ to register as end: edit the keys <AE04> and <AE10> to have type CUST_CAPSLOCK and have respectively osfEndLine and osfBeginLine in the the third position.

To allow capslock + space bar to register as escape (handy for vim) edit the key <SPCE> to have type CUST_CAPSLOCK, have space in the second position and osfEscape in the third position.

To turn the numlock key into a delete key and make capslock + numlock make the <NMLK> have type CUST_CAPSLOCK, have position one and two have osfDelete and posiition three have Num_Lock

Now upload the changed file back into the server with: xkbcomp output.xkb $DISPLAY.

If everything works, put file somewhere, ~/.Xkeymap works and create a script for example named ~/start_keyboard.sh with:

#!/bin/bash

xkbcomp ~/.Xkeymap $DISPLAY

Make it executable (chmod u+x ~/start_keyboard.sh) and add the script to your startup applications.


After Ubuntu update display size is 7" and it loads a Mobile version of Ubuntu

Apologies, this problem does not appear to be related to the 13.10 update.

After loading the GRUB menu by holding shift when booting up and pressing 'e' on the main Ubuntu entry, I discovered a sequence of references to "msdos".

The solution therefore is to return the GRUB entry to it's default state.

To conclude, this issue appears to be caused by dual boot with Windows and not with Ubuntu 13.10 as previously stated.


no shutdown or restart possible in ubuntu 20.04

after  months of research i found out that the mangement of the power supply button has a conflict with management of graphic cards
if /boot/grub/grub.cfg contains
nomodeset
result: power button is operating regularly
shut down works with automatic power off and restart also works.
But then I have only one monitor
For more monitors( I have 3) I decided to have
nouveau.modeset=1 instaed of nomodeset
result all 3 monitors running but power switch not operating automatically
Next try
nouveau.modeset=0 nvidia-drm.modeset=1
result all 3 monitors running and power switch operating
--> Nouveau driver can't replace original nvidia-driver which was target of nouveau
Maybe that helps somebody!


Zooming does not work in my text editors

According to a blog post on iTecTec, use the command:
sudo apt-get install -y gedit-plugin-text-size

This adds the needed plugin.  Then you can activate it in your preferences settings and you should be good.


How do I install fluxbox in Ubuntu 20.04

To install Fluxbox,first you will want to make sure that you’ve enabled the universe repository.
Open up a terminal window and type in the following command:
sudo apt-get install fluxbox

You will be prompted for your password, and the installation will continue.
Once you are done installing, you will need to rebooting the computer.
At the Ubuntu Login prompt, click the Options button in the bottom left hand corner.
You will be prompted to choose from a list of Window Managers that are installed on your system.
Select Fluxbox and continue to login.
The main menu can be seen by right-clicking on the desktop.
At the bottom of the screen, you will see a taskbar that shows you the running programs and lets you switch between workspaces.
As long as you have not developed enough experience with Fluxbox, you should not uninstall Gnome.


Use the -d option

date -d '7:00 tomorrow' +%s

https://www.gnu.org/software/coreutils/manual/coreutils.html#date-invocation
https://www.gnu.org/software/coreutils/manual/coreutils.html#Relative-items-in-date-strings


Using an unofficial PHP PPA on a production server

The package maintainer of the suggested PPA also seems to be the person who does the official packages for Debian, from what I gather.

... is the crucial part for me.

If this is the case all you would need to do is keep track what changes in the crew of the PHP package. When the maintainer quits and someone takes over it might warrant holding back updates until the new maintainer proves him/herself.

What you also should ask yourself: do I need the features the Ubuntu version does not give me yet. If the answer is no don't use that PPA. If the answer is yes you could consider it.

  What are the practical downsides to using something non-official in production in this use-case?

You will also pull in bugs quicker. Bugs Ubuntu will not fix for you (since it does not know about it).

  Would you not recommend it?

In general: no. In this case: it is probably worth it if you need the extra features.


Error message with virtuabox with ubuntu as host

you have  to recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

If some error appears then try this solution:

sudo apt-get install virtualbox-ose

This will take care of dependencies like the kernel headers which is included in the package linux-headers-generic

But if you've a PAE kernel, you need to install the headers first:

sudo apt-get install linux-headers-$(uname -r)


Revert usage of Fn key to control notebook (e.g. brightness, sound)

I have the same laptop. You have two options:

Change that behavior in BIOS, there is a option
Press Fn + Esc (On Esc is a mark FN)

I hope this will help.


Error while building FleaFPGA-JTAG-Linux

I finally found the solution. The Makefile comes precpecified with -m32 as a GCC Flag. Under $CFLAGS.

Deleting this led to smooth compilation. I'm on a 64-bit computer. I assume it means compile for a 32-bit architecture. So it looks for 32-bit .so libs


Help me choose the best filesystem for my PC

Ext4 file system is recommended for all Linux operating systems because has  backwards compatibility with its predecessors, you can mount Ext2 and Ext3 as an Ext4 file system
Ext4

reduces file fragmentation
employs delayed allocation which helps with flash memory life as well as fragmentation.
Good choice for SSDs and HDD

BtrFS

it allows for drive pooling, on the fly snapshots
transparent compression
online defragmentation
it’s not stable in some distros

ReiserFS

Has great performance for small files such as logs and is suited for databases and email servers.
ReiserFS can be dynamically expanded but not shrunk and does not support FS level encryption.

XFS

Good for a media file server because of constant throughput for large files.
Most distributions require separate /boot partition because XFS and GRUB can be unpredictable
Performance with small files is not as good.

JFS

Good performance for both large and small files and because of its low CPU usage is probably best for low powered servers and computers
It does not have built in tools for drive pooling
It also has fast disk checking compared to Ext but there have been some reports of disk corruption after long term use.

ZFS

Shows great performance in large disk arrays.
Supports a lot of advanced features including drive pooling, snapshots, and dynamic disk striping.
It may be difficult to install in Linux because it requires FUSE and might not be supported by your distribution.

More info found Here


Changing the default SQL developer icon [Applications]

This process assumes you have installed SQL developer already and have created the desktop shortcut to expose SQL dev onto the applications menu.
cd /usr/share/applications/

The below was added to the sqldeveloper.desktop file etcetera.
[Desktop Entry]
Exec=sqldeveloper
Terminal=false
StartupNotify=true
Categories=GNOME;Oracle;
Type=Application
Icon=/opt/sqldeveloper/icon.png
Name=Oracle SQL Developer

Below is the default icon which comes with the SQL package is blurry and unappealing.

Step 1: Download a new icon of your choice, preferably one with an alpha background or in other words set to transparent.
Step 2: Locate the position of the original icon using the following terminal commands:
cd /opt/sqldeveloper/ && ls -l

Step 3: Either remove the original icon named icon.png or copy the new downloaded png file to the sqldeveloper directory using:
sudo cp Pictures/icon_2.png /opt/sqldeveloper/

[change the new icon name to avoid confusion]
Step 4: Remove the file named icon.png if you kept it using:
sudo rm icon.png

then rename the new file to icon.png
mv icon_2.png icon.png

Finally check the application menu after restarting Ubuntu


Bootloader Has Disappeared After Reinstalling Windows And Ubuntu

It seems you may have installed using WUBI, the windows installer, in uninstalling windows It also uninstalled your ubuntu install, Since you reinstalled Ubuntu, try using boot-repair. https://help.ubuntu.com/community/Boot-Repair


How to see conversation history in "Pidgin Messenger" when using Ubuntu?

All the messenger logs will be stored under .purple directory located in your home directory.

cd ~/.purple/logs/yahoo/

this is the location where all your yahoo messenger chat logs will be stored.

You can also view the logs by selecting "Conversation -> View Log" when you have the contact window opened.

To send a message to a offline contact, use "Offline Message Emulation". Open "Tool->Plugins" and make sure you have selected "Offline Message Emulation". This will save the message you sent to a offline contact and the message will be delivered once he is online.

If you are offline and a contact sends you a message that will be delivered to you when you come online.

There are other good plugins for pidgin. To install the extra plugins use the command

 sudo apt-get install pidgin-plugin-pack

Hope this helps.


I had the same problem when trying to setup xen.

The commands

apt-get install linux-image-server
update-grub

made a new entry for xen available in the boot menu.
(Thanks to fossfreedom for the hint.)


That might depend on the assembler you use, but generally

'this is a string of text to be put into your program'

"This also will be stored as literal bytes."

but both most likely require some sort of directive, to be placed on the left side (before).

e.g.

StringConstant:
    dc.b 'Literal string',0

... which is comparable to a "C" definition of a char pointer named "StringConstant" referencing 'Literal string'.


How to install debug symbols for installed packages?

Packages in Ubuntu have their debugging symbols stored in a separate repo. To download these debugging symbols, run (copy and paste):

printf "deb http://ddebs.ubuntu.com %s main restricted universe multiverse\n" $(lsb_release -cs){,-updates,-security,-proposed} | \
 sudo tee -a /etc/apt/sources.list.d/ddebs.list

to add the repo links into /etc/apt/sources.list.d/ddebs.list (This makes it easier to remove the repo). Alternatively, you can also copy each of the deb links into Software Sources and add them from there (Note that you'll likely need to replace $(lsb_release -cs) with the Ubuntu release that you're running).

To download the debugging symbols for package, you can just install package-dbgsym or, in some cases, package-dbg. Note that packages from a PPA don't have debugging symbols available from repos, and that it's the maintainer's responsibility to provide a package that contains the debugging symbols, usually in a package named package-dbg.

Debugging symbols are installed in /usr/lib/debug, although gdb automatically reads in debugging symbols if available and that you don't manually need to specify a location to look in. Depending on the Debhelper Compatibility version of the package, debugging symbols may either be located in a folder with the name of the build ID located inside .build-id (>= 9), or may be located relative to where the executable would be installed (< 9). For example, if you were looking for the location of the debugging symbols for /usr/bin/zip, and the version is less than 9, it would be in /usr/lib/debug/usr/bin/zip.

To remove all debugging symbols and the repo, run sudo apt-get remove \.*-dbgsym to remove all -dbgsym packages, and sudo rm /etc/apt/sources.list.d/ddebs.list to remove the debugging symbols repo.


if its a fresh install of Ubuntu 18.04 and what ever the icon theme you use those come by default here is the path

/usr/share/icons/Adwaita/scalable/devices/

here is the folder in my Ubuntu 18.04

i have re-placed my customized icons in place of those 4 icons. and below is the result when i increase the volume level.

if you use different custom icon themes (those are not installed by fresh install of Ubuntu), and if that theme has specifically have these four icons, audio-volume-high-symbolic.svg and other 3. then they will be used, other wise above path is used.

in your case, you can simply search for the icon that is bothering you in the above path or in your custom icon theme and put your own icon.

i am using 2 customized icon themes like in below.. one is having those 4 icons and other one not.


Mounting VMware shared folders on Ubuntu - ANSWER

Building open_vm_tools Kernel Modules

Problem

The default open_vm_tools package for Ubuntu 16.04 (and apparently other releases) do not adequately support mounting shared folders.

Environment

Ubuntu 16.04.3 LTS desktop host
VMware Workstation 12 Pro Version 12.5.7 build-5813279
Ubuntu 16.04.3 LTS server VM

Solution

This solution was derived from vmware/open-vm-tools#62.

sudo apt-get install build-essential libprocps4-dev dnet-progs libdumbnet-dev doxygen libglib2.0-dev libtool autotool
 git clone https://github.com/vmware/open-vm-tools.git
 cd open-vm-tools/open-vm-tools
 autoreconf -i
 ./configure --without-x --without-pam --without-ssl –without-icu --
 enable-deploypkg=no
 cd modules
 make MODULES=vmhgfs
 sudo insmod linux/vmhgfs/vmhgfs.ko

Kernel Module Updates

The module must be rebuilt and reinstalled after each kernel update.

To clean up the repo after a linux kernel update: git reset --hard open-vm-tools

make distclean does not adequately reset the environment and will result in a broken module.

Module Installation

sudo mkdir /lib/modules/`uname -r`/extra
sudo mv linux/vmhgfs/vmhgfs.ko /lib/modules/`uname -r`/extra
sudo chown root:root /lib/modules/`uname -r`/extra/vmhgfs.ko
sudo chmod 644 /lib/modules/`uname -r`/extra/vmhgfs.ko

Mounting share folder(s)

mount -t vmhgfs .host:/share /mnt/hgfs

To mount automatically, edit the /etc/fstab file and add:

.host :/ /mnt/hgfs vmhgfs defaults 0 0

Update #1

Upon further investigation, it appears vmhgfs has been moved to userspace and uses a fuse interface.

To mount a shared folder (assuming $HOME/Shared exists):

/usr/bin/vmhgfs-fuse -o auto_unmount .host:/ $HOME/Shared

To mount automatically, edit the /etc/fstab file and add:

.host:/ /home/user/Shared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0

Where user is your userid and your uid and gid == 1000. Use id to determine your uid and gid.


32-bit Linux Android emulator binaries are DEPRECATED - Android Studio

I thought it strange that I was getting this message as I am running a 64 bit system. I did some further research and dissevered that it was a bug with the kernel.

I updated it as per the solution below and it now works without using force 32 bit.

https://stackoverflow.com/questions/31680018/solved-android-studio-64-bit-error-32-bit-linux-android-emulator-binaries-are

The Kernel below produces no error.

3.13.0-61-generic


How do I flash dailies without data loss?

Upgrades

Some parts of the image can’t currently be upgraded, so it is best to deploy a full updated image. Some individual apps can be updated with apt, though. First add the phablet-team ppa (https://launchpad.net/~phablet-team/+archive/ppa) to /etc/apt/sources.list. Then run the following command with root permissions to update apps:

 # apt-get update && apt-get upgrade

This part is from the Ubuntu Touch release notes. In short, you can upgrade to the newest packages but sometimes when some of the Android stuff gets updated, you still need to reflash like you have been doing.


Is it possible to download a bash script and execute it from a preseed file?

Here is how:

d-i preseed/late_command string in-target wget -P /tmp/ $server/script.sh; in-target chmod $+x /tmp/script.sh; in-target /tmp/script.sh`

Put this line into a preseed file and you can do everything in your system you are familiar with bash.

You have to replace $server with a webhost or a local ip of course.


Today I think I found the solution:

disable disk encryption on the internal SSD;
permanently set nomodeset inside the grub boot file.

1) guid on apple support, 2) guide on youtube.

I would suggest not closing the thread because other freezes might come up with more usage of the OS and it might not be solved yet.

Note: I have not tried acpi=off because I read it can cause bad issues like fans not working anymore and therefore overheating.


Ordinary user can read /etc/passwd. Is it a a security hole?

Is it a security hole? Why or why not?

No, it isn't. /etc/passwd should be readonly to users (-rw-r--r--). It is sometimes called the user database. That should give us a clue as to why it needs to be readable by everyone. Any utility that inspects file metadata needs to be able to read /etc/passwd (and so /etc/group) in order to be able to resolve the numerical IDs used by the kernel and its subsystems to the human-friendly names that we rely on. Tools that need to find your home directory look that information up in /etc/passwd, and inet miniservers like fingers look up your details in /etc/passwd.

As has been pointed out elsewhere, there is no particularly sensitive data in the file, as modern systems put the password hashes in /etc/shadow file, which is readonly by root.


New installation:
Sometimes, especially around new releases we are faced with servers having issues to provide the data in time. In this case, or when we have a slow internet connection locally it may be better to run the installation from CD or USB. We should not download updates or additional packages during the installation process in this case. After the installation is complete we can then update our system, where we may choose a different mirror to do so.
Upgrade from a previous installation:
On some occasions we need user action outside the GUI-window of the installer during an upgrade. Debconf may have asked you to press a key. To see this we need to click on Details in the installer window.
See also the release notes:

In some cases update-manager might appear to hang indefinitely. In that case, open the expander at the bottom and check if there is a debconf question which needs to be answered. (979661)


Force GNOME Night Light to stay on and never turn off

The "native" way for Gnome Shell to always keep your nightlight color on involves to access some hidden options in dconf-editor. dconf-editor is not installed by default on Ubuntu 18.04. You may need to install it first.

Open dconf-editor and navigate to the key /org/gnome/settings-daemon/plugins/color/
Set night-light-schedule-automatic to false
Set night-light-schedule-from to 0, and night-light-schedule-to to 24 (or any value higher than this)

You can also adjust your color temperature there.

In Ubuntu versions later than 18.04, these settings are exposed in "Settings", under "Displays".


How to embed a GtkAboutDialog's content in a GtkNotebook widget

You can move content area (GtkVBox) from GtkDialog to another GtkContainer, and then append to GtkNotebook - using gtk.Widget.reparent() method.

about = Gtk.AboutDialog()
about.set_program_name ("Application")
about.set_copyright ("Author")

box = Gtk.VBox ()
about.vbox.reparent (box)
notebook.append_page (box, Gtk.Label("About"))
about.destroy ()

With interface created in Glade, You must do simple trick for this solution. Create "About" tab in notebook with appended GtkBox (with id for example "about_box"). Then you can do something like this:

box = builder.get_object ("about_box")
about.vbox.reparent (box)

In some reasons Glade's GtkAboutDialog content area contains also GtkButtonBox. If You don't need this buttons simply destroy them:

about.action_area.destroy()

If You want only 'Credits' button, without 'Close' button, do something like this:

close_button = about.get_widget_for_response(Gtk.ResponseType.CANCEL)
close_button.destroy()


Can't find php binaries after successfull installation

The php it self is a meta package which pulls other necessary packages and installs them on your system.

For now you are playing with the meta package and it does not have any effect on your system, to get a running PHP, you have to install php7.0 which installs:

php7.0-common (documentation, examples and common module for PHP)

And most likly one of these three depends on how you want to interact with your PHP,

php7.0-fpm (FPM-CGI binary)
libapache2-mod-php7.0 (Apache 2 module)
php7.0-cgi (CGI binary)

you can even install php7.0-cli to only get a PHP command line.


By default, client has to request the option for the server to send it.

You can use these lines in the dhcpd.conf file to force some options:

if exists dhcp-parameter-request-list {
  option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,fc);
}

Note: code 252 = 0xfc


Uhm, well, apparently libnetcdf is only for C, for FORTRAN I have to install libnetcdff. Embarassing.


Can I prevent a named application changing the CPU's frequency?

I found cpulimit.

$ sudo apt-get install cpulimit  # for installing cpulimit
$ pgrep process_to_limit         # getting the pid
1234

$ cpulimit -p 1234 -l 30         # -p pid -l percentage_of_cpu_to_use

But it looks like cpulimit only uses the pid of a running process or executes a program. That means you need to find a way (bash script) to execute cpulimit when the daemon is running.

Here's a short shell script that reads the pid, executes cpulimit and sleeps for 60min.

#!/bin/sh
# This example uses firefox, replace the variable PROG

PROG=firefox
PID=`pgrep $PROG`

if [ $PID ]                # if $PID not equals 0 (zero)
then
   cpulimit -p $PID -l 30  # limit the cpu time to 30%
   sleep 60m               # wait 60 minutes
else
   sleep 60m
fi

Save it as e.g. run_cpulimit.sh, grant permission chmod u+x run_cpulimit.sh and start it.


Is it possible to read the output from any process using its PID?

You can get that process's standard file descriptors, e.g. stdout:

tail -f /proc/<pid>/fd/1


Installation needs 4.4GB but only have two 3.5GB SSD

I ran into this same problem. Check this out:
http://gobitech.blogspot.com/2011/06/install-ubuntu-1104-on-asus-eee-pc-701.html

Hope it helps!


Excuse me being a a little indirect here, after doing a bit of research, something came to mind, have you considered using xpra, xnest or Xephyr to launch your unity session on one of your heads, you could use another Xephyr session for your application if necessary, even using a more appropriate window manager

you can also make use of the DISPLAY="" variable here, so you could launch your app in your Unity launcher, and display it in a separate screen

Ill will use Xephyr as an example here, as it comes bundled default with Ubuntu, you will need to install xdotool to follow my example, you could use xprop to get similar results i believe

Logout of your user and stop/disable lightdm, or whatever you use to manage your X login

sudo service lightdm stop

you may want to create an .xinitrc file

Xephyr -ac -screen 1024x768 :2 &
Xephyr -ac -screen 1024x768 :3 &
sleep 1
xdotool windowmove `xdotool search --onlyvisible --name "Xephyr on :3.0"` 1024 0
DISPLAY=:2 unity
DISPLAY=:3 *application in other window*

you will execute startx

startx

adjust your properties accordingly, maybe you aren't using a 1024/768 display, the size of the display is whatever you want, and the xdotool is used to move the second Xephyr display across to your second head

I doubt this will work as is, but I didn't see anyone else giving an answer, it's better then nothing ;-)


I have snap loops on my ssd. Doesn't this beat the purpose of using an ssd?

If the files from which the loop devices are mounted, are located on the SSD, then they will be read at roughly the same speed as any other data on the SSD. As the loops are read-only, they also will not severely affect the life span of the SSD.

As snaps are SquashFS files, reading of data may be slightly slower, due to needing to decompress data as they are being read into memory.


How can i download youtube videos one after another automatically from terminal

I was quite tempted to mark this question as a duplicate of How do I download a YouTube video?

However, your question is remotely different because you want to download YouTube videos one after another, not a single YouTube video. This is also simple: use the program youtube-dl as suggested in this answer. youtube-dl can also take a list of URLs as parameters and download them one by one.

For instance,

youtube-dl http://www.youtube.com/watch?v=CP8CNp-vksc http://www.youtube.com/watch?v=JmOXHH3DTwg


here's your problem:

=================== blkid:
/dev/sda3: UUID="f18a769e-4f52-49ad-a38e-bab773834ad8" TYPE="crypto_LUKS"

mount: unknown filesystem type 'crypto_LUKS'
mount /dev/sda3 : Error code 32
mount -r /dev/sda3 /mnt/boot-sav/sda3
mount: unknown filesystem type 'crypto_LUKS'
mount -r /dev/sda3 : Error code 32

ermm...

at this point, you'll probably need to load up a live cd, and mount your lukscrypt partition there, with the decryption key.

you're going to need to use /dev/mapper for mounting sda3 in your fstab/mount commands.

At this point, I suspect, you're going to need to boot to a live Ubuntu CD, chroot the Ubuntu environment, mount all the partitions on all the drives, and run grub-update.  This process should both recover the boot for Windows and Linux to the grub menu.

Try the following:

Boot the Ubuntu LiveDVD
Select the option Try Ubuntu
Then try the following:

sudo su -
mount /dev/sda3 /mnt
cryptsetup luksOpen /dev/sda3/ crypthome
mount /dev/mapper/crypthome /mnt

At this point, you'll have mounted your encrypted LUKS partition to /mnt on the LiveDVD.

I would advise saving everything from /mnt/home to external storage before continuing.  Worst case, if this becomes too painful, you can start over and at least save any docs/pics/desktop/junk/etc you may have been working on.
Now we're going to attempt to fix things... through a chroot

mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt /bin/bash

At this stage you'll be in your PC's native OS in a chroot environment, but we're far from clear of your problem:  we're going to need to review things, so your input from here forward will greatly help.
copy things that will help us diagnose, your pc should have internet access as well, if not you can place the following things on external storage and paste individually to http://paste.ubuntu.com/ passing the links back to this help topic.

/etc/fstab
/dev/mapper/*

Please update on your progress and pain points. At the moment, it's hard to decypher just what went wrong
you're running full disk encryption and the mount point for dev/mapper doesn't appear to be properly set up, so boot is failing...


I just bought one, and it runs great. Everything seemed to work, even booting off the flash drive.

I'm pretty sure you can install it with UEFI, but for now I just went all legacy.
Just turn off all the UEFI stuff in the BIOS setup, and anything that says 'security', and turn on anything that says legacy.

The downside of going the legacy route, is that the Win8 option in the grub loader won't boot Win8. You have to hit F-12 when booting and select Win8 that way.

If you use legacy mode, the dual-boot option comes up during install. It wouldn't come up if I booted up in UEFI mode. But I know it can be done, I just recently did it with another laptop, but already forgot all the details.

It's good to shrink the Windows 8 partition (inside Windows) to <100GB, so that GRUB can make a partition under 100gb, or else GRUB doesn't work.

Ideally, I would've wanted to scrub the whole drive, and re-install Win8 and Ubuntu from scratch so I could have it exactly like I wanted it, but didn't want to spend the time or copying of the recovery partitions, etc.

The touchscreen works really well in Ubuntu.

The only problem I had was the brightness control didn't work. This fixed it and posted here: How do I get brightness working on a Lenovo IdeaPad Yoga?

GRUB_CMDLINE_LINUX="acpi_osi=\"!Windows 2012\""
sudo update-grub

I'd suggest installing tlp for power saving. Battery life seems to be at about 3 - 3.5 hours from it's estimate. The only problem is that the auto-dimmer doesn't seem to work when unplugging power. I'm sure that's fixable.

I think if I can spin down the drive more (have not heard it spin down yet), it would work well.

I'll probably buy a second power adapter, so I can have one ready to plug in wall at home, and carry the other with me. Saw one for $25. I would definitely get a 6-cell battery for it, if Lenovo comes out with one.


How to change the time after which I have to type my password again?

Go to "System Settings" > "Brightness & Lock" and change the "Lock" section.


Miss RAM, Total ram is bigger than Used ram + Free ram by 1.5 gb

The way Linux handles the RAM depends on the Linux kernel version but in big picture, it goes roughly like this:

The actual hardware has X amount of RAM. The Linux boots and takes control of the RAM as much as possible (some may be reserved by BIOS/firmware, some other part by integrated graphics, etc). The rest of the RAM is first free.

During the kernel boot the Linux kernel locates the filesystem and starts init process (nowadays SysV init, Upstart or Systemd) that needs some RAM and will start additional processes from that point forward. All content that has been fethed from the filesystem will be kept in cache if possible. This allows kernel to skip reading the filesystem (and hard drive) in the future if the same data is needed again. The RAM that init or any other user mode process needs for processing instructions in CPU is called used.

By default, every time a user mode process writes something to the filesystem, the kernel will instead put the written contents to buffers and pretend to the user mode process that the data was already written to the filesystem. The user mode process continues and the kernel proceeds to write the buffers to the filesystem (and hard drive) in paraller.

In the end, used RAM is the part of the RAM that cannot be easily freed if another process needs more RAM. free RAM is part of the RAM that is not used for anything (practically wasted RAM) and buffer or cache are part of RAM that is used to speed up I/O. If some process needs more RAM than is free, the buffer and cache RAM is sacrificed but overall performance may suffer as a result.

As for the problem you mentioned in the comments about system working slower when some specific application is run, you would need to share more information about that specific case. Most probably the application you run on Linux and the "same" application on Windows are not the same thing.


Allow non-sudo group to control Upstart job

You can start with finding out where the D-Bus configuration specific for Upstart is kept. See that destination="com.ubuntu.Upstart" snippet from the error message?
Now try to grep it in the folder with D-Bus config files:

vhost07:~ $ grep -r "com.ubuntu.Upstart" /etc/dbus-1
/etc/dbus-1/system.d/Upstart.conf:    <allow own="com.ubuntu.Upstart" />
[...skipped...]

That Upstart.conf file has some examples of policies. I guess you could try to figure out the format of a policy from them.
Then try to allow your specific user just the actions that it needs. For instance, as in:

<policy user="pope_benedict">
  <allow send_destination="com.ubuntu.Upstart"
         send_interface="com.ubuntu.Upstart0_6.Job"
         send_member="Start"/>
</policy>

This should permit the pope_benedict user to start that job.

Note that the values for the 'allow' policy attributes are listed in your original error message.


How do I copy the whole history of the clipboard to a text file?

You can see some strings in clipit history file with this command:

strings ~/.local/share/clipit/history

But it's not the best way. The output may be garbled.


Open wine configuration (winecfg) and go to the Drives tab.

If your cdrom mount point is not present in the list of drives, then add it.
from here

Added image:

Your disc is probably at /media/cdrom or similar.


No "Places", "Bookmarks", "Devices" labels in Naultilus sidebar

As far as I can tell the Gnome developers removed the section labels of Nautilus’ tree view pane during a re-design for the 3.14 release (source¹):

Knowing the Gnome developers, there is quite probably no way to change this through configuration or theming options.

However, you can try alternate file managers like

Nemo (the captain of the Nautilus), the default file manager of the Cinnamon Desktop and a fork of Nautilus.

¹ I know the file name is a bit misleading. The figure title on the source page says “Nautilus 3.14.3”, though.


Sd card is readable but,not able to write or format the card

If it's a standerd SD-card then look for a phisical switch on the side of the card. If it was broken off then you can put some tape over the opening and you should be able to write to it.


Is it possible to uninstall individual Firefox plugins?

Type about:plugins into the address bar. It will show you the filename of each plugin. You can find the name of the package that ships each plugin with: dpkg -S /path/to/plugin.so Then you can uninstall those packages using Synaptic.

For example, the Totem plugin is in the package totem-mozilla, and iTunes Application Detector is in rhythmbox-plugins. Note that some packages might ship more than one plugin - if you need one of them, you can't remove the others.

There is no way to uninstall plugins directly from Firefox.


How to add/remove user accounts in Ubuntu from a remote machine

Adding a user

To add a user account, use the following syntax, and follow the prompts to give the account a password and identifiable characteristics such as a full name, phone number, etc.

sudo adduser {username}

Deleting a user

To delete a user account and its primary group, use the following syntax:

sudo deluser {username}

Deleting an account does not remove their respective home folder. It is up to you whether or not you wish to delete the folder manually or keep it according to your desired retention policies.

Remember, any user added later on with the same UID/GID as the previous owner will now have access to this folder if you have not taken the necessary precautions.

Backup an existing account

You may want to change these UID/GID values to something more appropriate, such as the root account, and perhaps even relocate the folder to avoid future conflicts:

sudo chown -R root:root /home/{username}/
sudo mkdir /home/archived_users/
sudo mv /home/{username} /home/archived_users/

Lock and Unlock an account

To temporarily lock or unlock a user account, use the following syntax, respectively:

 sudo passwd -l {username}
 sudo passwd -u {username}

Groups

To add or delete a personalized group, use the following syntax, respectively:

sudo addgroup {groupname}
sudo delgroup {groupname}

To add a user to a group, use the following syntax:

sudo adduser {username} {groupname}

Source


How to customize/label the hard drive icons in the launcher

I have a GoFlex which I changed the display Icon by adding two things to the hard drive.

1) Create an Image Icon or import an icon of your choice that represents your hard drive. I recommend no larger than (128 x 128 pixels) and a transparent background.

Mine is like this:

2) Name it "whatever.ico" and save it to the hard drive's "/" partition

3) Create a text file with the name "autorun.inf" and in the the file place 2 lines of text like this:

[autorun]
icon=\whatever.ico

4) save the text file to the same "/" partition.

Now this is how mine is displayed and when I take to my win7 computer it is the same there too:

Shows on the panel also.


Evolution dismissed as "less secure app" by Google

I have second factor auth turned on on my google account. I ran into this problem with Thunderbird and posted on gmail forums, but the answer turned out to be simple. Try using an app-specific password, if you are already using app-specific passwords, then make sure you type your standard password correctly. For me, it was just the fact that I needed to type my actual password in, and not use a generated one when I was trying to use a generated one without typing in my regular password first.


Missing /dev/xconsole causes rsyslog to stop as well as all other services

The reason this exists is because Ubuntu Server 12.04 incorrectly assumes you have xterminal installed.  It may be a hang over from their desktop OS where it does perhaps exist by default.

Anyway, best thing to do is simply comment it out of /etc/rsyslog.d/50-default.conf as follows:

# daemon.*;mail.*;\
#        news.err;\
#        *.=debug;*.=info;\
#        *.=notice;*.=warn       |/dev/xconsole

And viola, no more error.

BTW. I doubt that was causing it to die though.