How should I install libdvdcss.so.2 (Library) to Ubuntu 16.04

In Ubuntu 16.04 they changed a way to install libdvdcss2.

Install it by

sudo apt install libdvd-pkg

and follow on-screen directions.


how to start update process in ubuntu 16.04?

The Software and Update in System settings is for specifying which repositories is to used during use during update.The actual Gui tool used for updating is software updater .It can be accessed by typing software updater or update manager in the dash by pressing super key.


Ubuntu 12.04 LTS on a Lenovo Ideapad S405

Regarding the function key, disable hot key in bios.

  Setting hotkey mode

  By default, the hotkey functions are accessible by pressing the
  appropriate hotkey. However, you can disable the hotkey mode in the
  BIOS setup utility.

  To disable the hotkey mode:

  Restart the computer. When the Lenovo logo appears, immediately
  press Fn + F2 to enter the BIOS setup utility.
  In the BIOS setup utility, open the Configuration menu, and change
  the setting of HotKey Mode from Enabled to Disabled.
  Exit Saving Changes.

  Note:When hotkey mode is disabled, press the Fn key and the
  appropriate hotkey to access the corresponding hotkey function. From Manual


What does `fd01h/64769d` mean in Device and `142368` in Inode?

Device:
Device: fd01h/64769d tells you on which device the file you examined is. The value is represented both as hexadecimal (fd01) and decimal (64769) number.
Now each device is identifiable by its major and minor number. The major number identifies a class of devices, which normally use the same driver/kernel module, whereas the minor number identifies a unique device within that class.
Note that in this context, "device" is not necessarily a hardware device here though, it includes virtual devices. Everything in /dev is a device actually (except for the directories and symlinks) and has a major and minor number. You can check them yourself with ls -l /dev (shortened example output):
drwxr-xr-x  20 root root          4560 Nov 14 00:03 ./
drwxr-xr-x  27 root root          4096 Nov  2 03:30 ../
brw-rw----   1 root disk      8,     0 Nov 14 01:06 sda
brw-rw----   1 root disk      8,     1 Nov 14 01:06 sda1
brw-rw----   1 root disk      8,     2 Nov 14 01:06 sda2
brw-rw----   1 root disk      8,     3 Nov 14 01:06 sda3
brw-rw----   1 root disk      8,    16 Nov 14 01:06 sdb
brw-rw----   1 root disk      8,    17 Nov 14 01:06 sdb1
brw-rw----   1 root disk      8,    18 Nov 14 01:06 sdb2
crw-------   1 root root     10,   224 Nov 13 15:53 tpm0
crw-------   1 root root    253, 65536 Nov 13 15:53 tpmrm0
crw-rw-rw-   1 root tty       5,     0 Nov 14 01:06 tty
crw--w----   1 root tty       4,     0 Nov 13 15:53 tty0
crw--w----   1 root tty       4,     1 Nov 13 15:53 tty1
crw-rw-rw-   1 root root      1,     5 Nov 13 15:53 zero

The fourth and fifth columns here show the major and minor numbers. For regular hard disks, the major number is 8 and each of the disks and partitions has its own unique minor number among them.
Now back to your stat output, the hexadecimal device number was fd01. This can be split up into two bytes, fd (decimal 253) is the major number component and 01 (decimal 1) is the minor number. We could try to look up the major number in this list, but it is only classified as part of a range of numbers for "RESERVED FOR DYNAMIC ASSIGNMENT" and "LOCAL/EXPERIMENTAL USE". I would guess on an encrypted or LVM volume.
Anyway, you can use lsblk and check which of the storage block devices listed there corresponds to this major and minor number. You will see this is of course the device/partition/file system on which your examined file actually is stored.
See also: Device number in stat command output

Inode:
On Unix file systems like ext4, the default for Ubuntu, each file system object (like files and directories) is described by a so-called "inode". It is basically a data structure that stores which blocks on the disk belong to the object, but also metadata like timestamps as well as owner and permission information. Each object has (at least) one inode, and each inode belongs to exactly one file system object.
The number you see in your stat output is the number or index of this file's inode, which therefore lets you uniquely identify the file. E.g. debugfs could be used to show that this number is correctly corresponding to the file you examined by searching for the path, knowing only the number.
See also: Inode (Wikipedia)


Ubuntu cannot find extra HDDs with fdisk -l

I don't think the boot mode (UEFI or Legacy) would cause you to not see the additional hard drives. It is just used to load the OS, which then sees and mounts the drives.

Do you know if the drives are mounted properly?

A couple things to try:

dmesg | grep ata

See if it mentions any errors about the drive.

Install updates and reboot.

apt update && apt upgrade && reboot


Canon LBP 2900b is not Working in ubuntu 20.04

First install the latest drivers.
For Canon LBP 2900B - https://in.canon/en/support/0100459601/7?model=0017B011
Download and extract

Now based on your OS( 32-bit or 64-bit) install the Debian packages


How do I find all key bindings in Ubuntu 14.04?

The answer to show all key bindings in Ubuntu / Unity is:

gsettings list-recursively  org.gnome.desktop.wm.keybindings | sort | more

However Alt+F1 is not in there, meaning it's hard-coded in Unity and cannot be changed.

Sorry to be the harbinger of bad news


Cannot install Sketchup with Wine / TLS library not found, SSL connections will fail

I also got first two error like you got when i ran iexplorer from wine by

wine iexplore.exe "https://example.com"

but was able to solve only one
i.e

err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.

above error can be solve by installing winbind package

sudo apt-get install winbind


Update from 14.04 to 16.04.3 interrupted due to power disconnection

It is showing the terminal, login with your username and password from the terminal and run same upgrade command

  sudo do-release-upgrade

to continue your upgrade.
This should work fine


Wired Connection to LAN, but no Internet

You seem to be connected by wireless but using the tricky driver iwlwifi. Please open a terminal and do:

sudo -i
echo "options iwlwifi 11n_disable=1" >> /etc/modprobe.d/iwlwifi.conf
exit

Reboot and let us hear your report.


First make sure you have disabled Legacy boot option and secure boot from BIOS settings. It's fairly easy to disable
Create live USB stick of the Ubuntu version you have installed on the system.
Boot using the live UBS stick, select Try Ubuntu option. You should have internet connectivity to perform below steps:

Open the terminal

Execute following commands.

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

Popup will appear, select recommended repair


Why is Ubuntu's clock getting slower or faster?

ntp does well at keeping your computer set to the right time, and does that without ever running it backwards--which would be a bad thing for some programs you might be running.

It not only sets the time, but it makes continuous adjustments to how your computer keeps time so that its time is not only right at one instant in time, but stays close to the real time (within dozens of milliseconds, not dozens of minutes). It adjusts both phase (the time) and rate (how fast the clock "ticks"). ntp never makes the clock run backwards. It can take a long time to establish how fast to tick the clock after a reboot, so ntp keeps track of the drift in a file called /var/lib/ntp/ntp.drift . Since you aren't running ntp none of this happens.

ntp is not as popular as it once was because sleeping laptops and desktops, and virtual machines stop it from running some of the time. It's designed to run every once in a while on its own schedule on a computer that is running all of the time, and in the real world where time is continuous. That's probably why it isn't installed by default on the modern workstation. [For Vmware, see this]

Instead ntpdate is run when the network interface is brought up. When a sleeping laptop is awakened it reestablishes the network connection, ntpdate is run, and the time is again correct. If the machine's hardware clock is pretty accurate, and the network is brought up and down fairly often, that's generally good enough for most people.

For some reason stock ntpdate doesn't alway run. Use ntpdate-debian instead in this case. Syntax for the for.mer is something like ntpdate ntp.ubuntu.com,  for the latter it is ntpdate-debian

In the absence of one of those things, then ntp is a better way to keep time.

Systems are designed to take a timer interrupt every so often and update its idea of the time every interrupt. As long as the hardware timer is running to spec. the time doesn't drift too much. If the hardware timer isn't, the time will drift more (all such clocks will drift some, for the same reason your wristwatch or battery controlled clock will. Clocks plugged into the wall are synced to the time by the frequency and phase kept by your power company).

Most computer timers are controlled by a crystal controlled oscillator circuit on its integrated circuits. Despite the crystal, they run faster and slower depending on the environment, mostly the temperature. Unless you have some time syncing software installed we don't know about, I'd say your system's clock is off spec.

If you were to run ntp for a day or two it would store information in /var/lib/ntp/ntp.drift that would indicate how much it would have to adjust the rate at which your operating system time advances per interrupt in order to match your hardware clock rate with the real time it gets over the internet. Keeping the file the same and just starting and stopping ntp after a minute after that (assuming you keep the /var/lib/ntp/ntp.drift file unchanged) might do a lot to correct for this if the clock bias ntp sets remains after ntp ends. I'm not sure of this detail.

I suspect the value ntp would store in /var/lib/ntp/ntp.drift is far different than mine.

If this machine is kept running all of the time, however, the best thing to do is to install ntp and let it do its thing. See the other answers for details on getting the time right before starting it. I run ntp on my desktop and ntpdate on my laptop.

An interesting possible alternative, adjtimex, is mentioned in this answer by nealmcb.

If your system is not kept running all of the time, running ntpdate at boot time seems like a good option.

Warning some software can freak if the computers time goes backwards. Running ntpdate after boot could cause this to occur.

One gotcha, that can be a problem: As I recall ntp expects the time to not be too far off. If it is, trying to act conservatively, ntp won't adjust the time at all. If you are in this situation it makes sense to do both--run ntpdate at boot to get the time initialized to the right time, and then let the ntp run to keep it running to provide accurate timekeeping. In particular a bad motherboard battery can cause this error, as can booting a computer that's been off for a long time.


Windows 10 not showing in GRUB boot menu

Update your grub2 using this command:
sudo update-grub2


example of console output that is not written to standard output

In your example, read is writing to stderr instead of stdout. Here's how I know:

$ read -p "Type a key and press Enter: " key >/dev/null
Type a key and press Enter: x
$ read -p "Type a key and press Enter: " key 2>/dev/null
x

You can do this test on any program whose output you want to redirect.

So the command you are looking for is this:

$ read -p "Type a key and press Enter: " key 2>&1 | tee file
Type a key and press Enter: x
$ cat file
Type a key and press Enter: $

For explanations of the above redirections:

What does 2>/dev/null mean?
What does 2>&1 mean?
How to pipe stderr, and not stdout?


The group and permissions for your /dev/video0 are not correct.
The groop root for your /dev/video0 will deny access to the camera for users outside this group.

The output of ls -l /dev/video0 should look like this:

crw-rw----+ 1 root video 81, 1 Apr 19 22:25 /dev/video0

Try fixing the group by running:

sudo chown root:video /dev/video0

Then fix permissions by running:

sudo chmod 660 /dev/video0


How to configure XRDP to start  cinnamon as default desktop session

Found this on the net, on this url: http://sigkillit.com/tag/xrdp

Customize Desktop Environment for xRDP Session

If you do not want to use the default desktop environment, you can customize it by creating a .Xclients file (X is capital!!!) in your home directory to launch the desktop environment you want and making it executable.  In order to do this, open a terminal and run one of the following commands

Gnome 3:

echo "gnome-session" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

Gnome Fallback:

echo "gnome-fallback" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

KDE:

echo "startkde" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

MATE:

echo "mate-session" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

Cinnamon:

echo "cinnamon" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service

Xfce4:

echo "startxfce4" > ~/.Xclients
chmod +x ~/.Xclients
sudo systemctl restart xrdp.service


How to properly reset all grub/boot settings?

Did you try undoing each of the steps in that tutorial?

Like, (Note: This is just an undoing of whatever that was done in that tutorial)

sudo apt-get remove v86d
editing the /etc/default/grub file and

changing the line 9 which would now read     GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset       video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap" back to    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and line 18 which would now read - GRUB_GFXMODE=1280x1024 back    to    GRUB_GFXMODE=1280x1024.

  3. gksudo gedit /etc/initramfs-tools/modules and remove the last line reading uvesafb mode_option=1280x1024-24 mtrr=3 scroll=ywrap

  4. Remove the line that reads FRAMEBUFFER=y in the /etc/initramfs-tools/conf.d/splash file

  5. Then run sudo update-grub2

  6. Then run sudo update-initramfs -u

  7. Then reboot


(K)Ubuntu 16.04 Plasma 5.5.5 takes long time at login

There is a workaround to avoid this problems: "disable the splash screen (System Settings -> Workspace Theme -> Splash Screen -> Set Theme to "None")" (see https://bugs.launchpad.net/ubuntu/+source/breeze/+bug/1584604/comments/14). The bug seems to caused by breeze.


Invalid ROM Contents preventing boot on MacBook

Reinstalling the nvidia drivers seems to have fixed the problem.  Boot headless (you can probably use one of the backup kernels).

sudo apt-get update
sudo apt-get install nvidia-310


Cannot see bitrate and other information when using iwconfig command

You probably just need to install the missing Broadcom firmware. See community WIFI Docs for Broadcom.  Exact instructions depend upon your exact Broadcom chip.


Use Ubuntu on Tablet with mouse/keyboard?

I just tried connecting a keyboard to my Nexus 4 and it didn't work, I'm sure it's doable with a bit of tinkering but at this point it is not a plug and play thing.

Also keep in mind that Nexus 7 2012 is no longer officially supported and that Ubuntu images for it are outdated. The list of currently supported devices is here.

Your second option could be to do just a plain Ubuntu install rather than Ubuntu Touch as described here Keep in mind that this wiki page was last updated a year ago though.


gcc or cc no longer seems to work in 12.04 lts

You should look at line 6 of your code, and re-type it. It would solve the problem.

Here is an excerpt from http://www.giannistsakiris.com:

  The errors were of this form:  giannis@giannis-vbox:~$ gcc
program.c program.c: In function ‘main’: program.c:57: error: stray
‘\342’ in program program.c:57: error: stray ‘\200’ in program
program.c:57: error: stray ‘\234’ in program program.c:57: error:
stray ‘\’ in program

  I couldn't see any obvious syntactical error in the mentioned line.
  This is how line #57 looks like:

printf(“\nThe linked list representation is...\n”);

  At first sight, it looks pretty fine, but if you look closely you will
  see that the double quotation marks that surround the string literal
  are not the neutral (vertical) ones (like this: "). They are left and
  right double quotation marks respectively.

  If I replace the quotation marks with the neutral ones, like this:

printf("\nThe linked list representation is...\n");

  the problem is solved. So, if you are getting this kind of error maybe
  you should look closely to any double (or single) quotation marks in
  the erroneous line.


Permission error when auto mounting network drive Ubuntu 14.04

I've fixed that problem on my system by allowing me to mount a samba share without having to enter my password.

My .profile contains:

# mount my network share
HDRIVE=$HOME/HDrive
WINH="//nzch1s003/users/$USER"
SMBUSER=$USER
SMBOPTIONS="-o credentials=/home/$SMBUSER/.samba.id,uid=$SMBUSER,gid=$SMBUSER"
# create mounting points, if not there
if [ ! -d $HDRIVE ]
then
   mkdir -p $HDRIVE
fi
# mount the drive, if not already
grep $HDRIVE /etc/mtab > /dev/null || sudo mount.cifs $WINH $HDRIVE $SMBOPTIONS

Note that I set uid and gid to $USER in $SMBOPTIONS

To allow me to use sudo mount.cifs without having to enter my password, I created file /etc/sudoers.d/mountcifs, which contains:

# let me use smbmount without password
<username> <hostname>= NOPASSWD: /sbin/mount.cifs

Where <username> is your username and <hostname> is the name of your computer or its IP address.

this file should be automatically included by file /etc/sudoers. It should have a line like:

#includedir /etc/sudoers.d


What's the best way to autorun a. sh script on startup (Lubuntu)?

This is quite opinionated, but I use to run a game server for my grand-kids and used Crontab to backup the server and initiate the server start up automatically. Worked very well for me. Use this to complete your setup.


Password less account asking me to type the password

How to login to Ubuntu 18.04 without a password Should help with solve the issue.
That is so say, run sudo passwd -d username on the command line to prevent this
Do note, as mentioned in the link that this will make authentication difficult in some cases, preventing changes.


How to find the program name of a shortcut?

Generally apropos will be of help.

For example, apropos 'text editor' gives me

ed (1)               - line-oriented text editor
ex (1)               - Vi IMproved, a programmer's text editor
gedit (1)            - text editor for the GNOME Desktop
gnome-text-editor (1) - text editor for the GNOME Desktop
red (1)              - line-oriented text editor
rview (1)            - Vi IMproved, a programmer's text editor
rvim (1)             - Vi IMproved, a programmer's text editor
vi (1)               - Vi IMproved, a programmer's text editor
view (1)             - Vi IMproved, a programmer's text editor
vim (1)              - Vi IMproved, a programmer's text editor
xedit (1)            - simple text editor for X


My 8gb sandisk shows 64 mb after installing ubuntu from it

Create a new partition table under the Device menu. Default settings should be fine.


Keyboard layout keeps allways falling back to default after reboot - how to change?

This is an old post but here is the solution I use on 16.04 (Xenial)

sudo dpkg-reconfigure keyboard-configuration

Then run:

sudo dpkg-reconfigure console-setup


Attempt to Upgrade is failing due to unstable mfc6490cwlpr:i386

I'd suggest visiting the Brother Linux Driver page and download the required *.deb files. Then use dpkg -i mfc*.deb (if you are on i386 -- on 64bit you would need dpkg -i --force-all mfc*.deb instead) -- which fulfils the request of "reinstall it". Hopefully, after that the package no longer is in a "bad state", and you can upgrade. In the worst case, you may have to uninstall all the brother packages, then upgrade, and finally re-install (and re-configure) them.

I created an installation script to ease the installation of Brother printer drivers which can be used for a clean installation -- and was successfully used for an MFC-9120CN on Ubuntu 12.4 64bit. It requires the packages downloaded from above mentioned driver page to reside within the same directory, and should work on 32bit and 64bit installations as well, taking care for all dependencies and quoting necessary steps.


X11 doesn't start after clean 11.10 install (Dell E6500, nvidia, 8Gb RAM, i386)

The "nv" driver was dropped from Ubuntu, in favor of the "nouveau" driver.  Check if you have a /etc/X11/xorg.conf file; if you do, see if it lists driver "nv"; if it does, change that to "nouveau" (or "nvidia" if you still have nvidia-current installed)

Btw, you probably should install t he nvidia driver using jockey-text or jockey-gtk, since that will also do some sanity checking, ensure xorg.conf is set right, update the kernel, etc.


No Items show in dash of gnome-shell when using "Axiom" Theme?

There have been a lot of changes going on in Gtk3.  I don't know when you downloaded the theme, or what version of gnome-shell you are using, but this is almost certainly the result of those changes, particularly in styling.  You can hack around the css style sheet for the theme you downloaded or you can wait for the artist to update (or you to update depending).  From the website posted the artist updated 3/31 to support for gnome-shell 3.4.  From the looks of it you are still in gnome-shell 3.2 and this is probably the reason.  The relevant section of the gnome-shell.css sheet should be under Overview Apps, that being said it may be easiest to contact the Artist and ask if s/he has the old version.  I have a great 3.2 theme that is screwed up in the app overview in 3.4.


What is difference between ls -lh and du -sh?

The du command shows how much disk space is used for the given file.

In contrast, the ls command shows the size of the file. The space used can be larger than the file size, depending on the filesystem used.

For example, we can create a file with the size 1 byte like this (just one newline character in the file):

echo > tmp.txt

Then check its size using ls -l which shows the size one byte:

ls -l tmp.txt
-rw-r--r-- 1 elias elias 1 aug  6 17:50 tmp.txt

Then check the used space using du:

du -h tmp.txt
4,0K    tmp.txt

So the used disk space was in this example 4 kilobytes, although the filesize is only one byte.


VPN SSTP support in ubuntu network manager ... [ubuntu 15.04, 64bits]

If anyone else still has this problem, just use the PPA sources mentioned on the page above. I.e.,

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 61FF9694161CE595
Put the following two lines into the following file:
 /etc/apt/sources.list.d/sstp-client.list
  deb http://ppa.launchpad.net/eivnaes/network-manager-sstp/ubuntu vivid main
  deb-src http://ppa.launchpad.net/eivnaes/network-manager-sstp/ubuntu vivid main

Then use your apt-get command to get both network-manager-sstp and sstp-client.

This will install network-manager-sstp 0.9.10.0, for which the ppp version is not a problem. This fixed it for me.


One way to proceed would be to use Compiz and its Zoom Desktop plugin.

  The Zoom Desktop plugin offers the ability to zoom in for an enlarged view of the screen. [..] Zoom Desktop works by causing the entire screen to zoom in, effectively giving you a more readable view of a portion of the screen.

Thus you can use compiz as a WM to zoom into portion of the screen while you're recording the screencast.

See also:

How to zoom in & zoom out


Enters airplane mode after suspend / resume, can't toggle it

I was able to workaround it using @Gibbsoft's answer in Wifi Hard Blocked After Suspend in Ubuntu on GS65.

Update /etc/default/grub with:

GRUB_CMDLINE_LINUX_DEFAULT="acpi_osi=! acpi_osi='Windows 2009' quiet splash"

And now after resuming, fn + f10 takes it out of airplane mode and removes the hard block on the wifi driver.


As Rinzwind suggested, I went to the preferences (Ctrl+P), audio tab and changed the output controller from 'pulse' to 'alsa'. Now the sound is back, problem solved.


What will happen to Ubuntu 17.04 after January 18?

You're thinking about doing it backwards by downgrading your OS instead of forwards by upgrading your OS. Upgrading from Ubuntu 17.04 to Ubuntu 17.10 after it is released in October and upgrading from Ubuntu 17.10 to the next LTS release, Ubuntu 18.04, is an easier way to do it. As usual, backup your data before upgrading your OS as insurance against losing your data.

I expect that bad things will gradually happen if you continue to use an Ubuntu release after its End of Life (EOL) date. Ubuntu releases are not meant to be used after the support period has ended. Ubuntu is designed to be a secure and up-to-date operating system and upgraded if necessary to keep it that way.


Desktop on Ubuntu 14.04 lts doesn't appear after login

Either this is caused by a broken script or an unrelated issue with unity (or both).

If the script is the problem:

Before typing the following keystroke, remember that Ctrl+Alt+F7 is your friend.  This is the keystroke to type to get back to where you are right now.

OK? Remember? Sure?

Open TTY1 with Ctrl+Alt+F1

move radiotray.sh out of /etc/profile.d temporarily to see if it's the problem.

mv /etc/profile.d/radiotray.sh ~/Desktop

and then reboot

sudo shutdown -r 1

If this resolves the issue, you can now test your script by running it in it's current location in ~/Desktop. You may find you'll need the full path to radio tray which as @Serg suggests you can obtain with the command which radiotray

If this doesn't solve the problem, leave the script where you moved it and continue.

If it's an unrelated Unity problem proceed as follows:

Obtain dconf-tools with

sudo apt-get install dconf-tools

Next,

dconf dump /org/compiz/ > ~/Desktop/myCompizSettings

This will dump your Compiz Settings into a file on your Desktop for later review if needed.

dconf reset -f /org/compiz/

will reset compiz settings to default.

Finally,

setsid unity

The above command will restart Unity.

Return to the GUI with Ctrl+Alt+F7


Look at xkeysnail, I believe it can be installed via the repos, but the latest has commits in it that allow for more. I contributed code to allow for Alt/Ctrl+Tab functionality.

https://github.com/mooz/xkeysnail


Run rkhunter regularly on a desktop system

Run at startup, display with zenity

Create a file /usr/local/sbin/rkhunter-check and make it executable:

sudo touch /usr/local/sbin/rkhunter-check
sudo chmod +x /usr/local/sbin/rkhunter-check

Edit the file gksu gedit /usr/local/sbin/rkhunter-check

#!/usr/bin/env bash
export DISPLAY=:0
MAINUSER="$(awk -F: '$3==1000{print $1}' /etc/passwd)"
LOG=/tmp/.rkhunter-warnings
rm -f $LOG
touch $LOG
rkhunter --checkall --report-warnings-only  | while read OUTPUT; do
  if [ "$OUTPUT" != "" ]; then
    OUTPUT="${OUTPUT//[\`\"\']/}"
    echo "$OUTPUT">>$LOG
  fi
done
if [ "$(cat $LOG)" = "" ]; then
  #like this there is always a notification, even if there is no warning, it will show an empty notification.
  echo "#no warnings">$LOG
fi
if [ "$(cat $LOG)" != "" ]; then
  su $MAINUSER -c 'zenity --text-info --width 800 --title "Rkhunter warnings" < '"$LOG"
fi

If the rkhunter run generates any output (only warnings), this script will show up as a scrollable window with the rkhunter output.

create a systemd startup script

Create the script /etc/systemd/system/rkhunter.service:

[Unit]
Description=starts rkhunter and displays any findings with zenity

[Service]
TimeoutStartSec=infinity
ExecStartPre=/bin/sleep 1800
ExecStart=/usr/local/sbin/rkhunter-check

[Install]
WantedBy=default.target

Update systemd with:

sudo systemctl daemon-reload
sudo systemctl enable rkhunter
sudo systemctl start rkhunter

start by /etc/rc.local

On systems without systemd call the script at runtime in /etc/rc.local and put a sleep before the whole command:

gksu gedit /etc/rc.local

Add this  command before the last line in /etc/rc.local that contains exit 0:

sleep 1800 && /usr/local/sbin/rkhunter-check &

Both solutions will wait 30 minutes before executing the rkhunter check as root.

You can also combine this solution with the notify-send solution, because in case there are no warnings, a zenity dialog is not perfect. a notification would suffice in that case

#!/usr/bin/env bash
export DISPLAY=:0
MAINUSER="$(awk -F: '$3==1000{print $1}' /etc/passwd)"
LOG=/tmp/.rkhunter-warnings
echo ""> $LOG
rkhunter --checkall --report-warnings-only  | while read OUTPUT; do
  if [ "$OUTPUT" != "" ]; then
    OUTPUT="${OUTPUT//[\`\"\']/}"
    echo "$OUTPUT">>$LOG
  fi
done
if [ "$(cat $LOG)" = "" ]; then
  MAINUSER="$(awk -F: '$3==1000{print $1}' /etc/passwd)"
  if [ -r "/home/$MAINUSER/.dbus/Xdbus" ]; then
    . "/home/$MAINUSER/.dbus/Xdbus"
  fi
  su $MAINUSER -c $"notify-send \"rkhunter: no warnings\""
fi
if [ "$(cat $LOG)" != "" ]; then
  su $MAINUSER -c 'zenity --text-info --width 800 --title "Rkhunter warnings" < '"$LOG"
fi

source: How to run a script during boot as root


How can I install a previous version of xserver-xorg-video-intel?

I chatted to a colleague who gave me this answer. It is possible, but not advisable.

To install an alternate package:

Open Synaptic Package Manager
From the menu select Settings | Repositories
Add the alternate source (in my case the maverick repo)
You should be prompted to reload sources, if not hit the Reload button
Find and select the package to downgrade
From the menu select Package | Force version...
Pick the older version
You will be warned that this may cause dependency errors
If you're feeling brave, go ahead

Reverting would involve undoing this process. In my case this involves dealing with a broken video driver, and that sounds like a nightmare, so I'll just wait for the bug to be fixed.


TL;DR: You can when hibernated, you can't when suspended.

When you are suspended, the memory of the current OS is still stored in RAM. You can't just wake up into another operating system from being suspended, because only one operating system can occupy the process and ram at a time. Having two operating systems with the same RAM won't work.

When hibernating, it's a bit different. Ubuntu will store the memory into the "swap" space you have set up, and completely shut down the computer. This means that when you restart your computer, you can choose to boot into Windows instead of Ubuntu.

Note that if you have two Linux distributions using the same swap partition, you won't be able to hibernate in one and boot into the other - they will both try to use the swap partition, resulting in the same problem when suspending. The reason windows can start when Ubuntu is hibernating is because Windows has a separate hibernation file on it's own partition.


Error processing package fglrx. Package fglrx is not configured yet

I solve this problem just by purge fglrx* packages due to unnecessary of ATI drivers (if I'm not confusing something). I have Nvidia GPU, so I've run this:

$ sudo apt-get purge fglrx*

That's all. Thanks for this answer.


Cannot open ubuntu 20.06 which is in downloads on my hp pavilion with xp. dualboot

Step 1- Get a pen drive / HDD with enough space (above 5–6gb is more than enough).
Step 2- Format it by right clicking on the drive and clicking format.
Step 3- Download UNetbootin. This software allows you to create a bootable HDD/pendrive. Do not forget to download the Ubuntu ISO file.
Step 4- if you want to keep Windows XP and Ubuntu, partition your drive. Refer to YouTube tutorials for this because I'm not experienced enough to share this.  If you want to kill Windows XP forever, ignore this.
Step 5- Shut down your PC, connect your pen drive and select boot from USB.  To do this step successfully, you need to know your motherboard model and company as it varies from company to company. Once again, refer to YouTube for this step.
Step 6- Follow the steps and install just like any other windows program.
Step 7- Post installation, enjoy Linux life.


If you had run in boot problems go ahead... delete suse partition and if necessasy fix the grub. But man I suggest you to back up your ubuntu data than delete ubuntu and suse partition and do a fresh install of ubuntu. This way its more easy to avoid unnecessary mess.


What is the correct output of cat /etc/apt/sources.list?

Here is a simple example of a standard /etc/apt/sources.list file for Ubuntu 12.04:

deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-backports universe main multiverse restricted
deb http://archive.ubuntu.com/ubuntu precise-security universe main multiverse restricted

The easiest way to edit the sources.list file is from the terminal  in nano editor using the following command:

sudo nano /etc/apt/sources.list

The instructions for using nano are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.

Make sure to run this command after changing sources.list to refresh the list of available software.

sudo apt update

A standard sources.list file for Ubuntu 16.04 looks like this:

deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner

A standard sources.list file for Ubuntu 18.04 looks like this:

deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu bionic partner

A standard sources.list file for Ubuntu 20.04 looks like this:

deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner


Since we know it worked, I'll answer your question:

Create an empty file:

/etc/init.d/ape-server

Now remove the package, and it will be all clear.


how to copy / install various data from a DVD drive to Hard disk in Ununtu 14.04

use

$sudo apt-cdrom add

to add these DVD to repository list

and then use

$sudo apt-get update

and then

$sudo apt-get install {package name}


Is there a stopwatch app available that shows the time on the sidebar?

Not exactly what you are looking for, but maybe even better: the Hamster Indicator installs from the official 16.04 repositories (Enter sudo apt install hamster-indicator in a terminal in case you are using the unity desktop environment).

It allows you to take the time on different tasks and analyze them afterwards.
It does not show the elapsed time constantly in the panel (per default, see comment), but you can set a notification after 30 minutes. Constantly seeing the time passing, may be even a distraction to some people.

Cheers


"No space left on device" when installing packages, yet I have space left

On unix file system, file and directory have two part: inode and data.

In inodes are stored information about file such as permission, owner, change time, access time, and so on.

The total number of inodes is limited, so you can get No space left on device if you reach such limit even if the disk is not very full.

Use:

df -i

to view inodes, if you get 100% for IUse and 0 IFree, this means that you have a lot of small file.

For example if you have 2 billions files whose size is 1 byte, you could reach inode limit, but your disk could be not completely full.

If this is your case, try to remove more file you can and than redo apt-get update.


Disable automatic ZSys snapshots - ZFS on root

ZSys automatically removes snapshots after a while and you can configure how many snapshots should be saved. The automatic removal system only looks at the number of snapshots, however. It does not take into account how much space you have left and how much space a snapshot uses.
Disable user snapshots
ZSys automatically creates a snapshot of user data (your home directory) each hour. To disable these snapshots, run the following commands:
systemctl --user stop zsys-user-savestate.timer
systemctl --user disable zsys-user-savestate.timer

Disable system snapshots
ZSys also automatically creates a snapshot of the system (packages, snaps, etc.) every time you install a package. To disable these snapshots, run the following command:
sudo mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled

Re-enable snapshots
Follow these instructions if you want to turn the snapshots back on.
To re-enable user snapshots, run the following command.
systemctl --user start zsys-user-savestate.timer
systemctl --user enable zsys-user-savestate.timer

To re-enable system snapshots, run the following command.
sudo mv /etc/apt/apt.conf.d/90_zsys_system_autosnapshot.disabled /etc/apt/apt.conf.d/90_zsys_system_autosnapshot


Program is starting every time I search on Unity's search

Type the following commands:

gsettings get com.canonical.Unity.Lenses home-lens-default-view > broken_scope.txt
gsettings set com.canonical.Unity.Lenses home-lens-default-view "['applications.scope', 'files.scope']"

Now you have an absolute minimal lens scope (only applications and files; no music, no videos, no pictures, ...) (you might have to log off and log on again)

If that corrects your problem and you're happy to continue like this, leave it alone as I'm running like this and the dash is very responsive! >:)

If you want to add some of the other stuff back, open broken_scope.txt and add them one by one to the second command above, and test whether the problem comes back.  If it has, remove the last one and continue with the others...


First, no need to run make as root, just make

Second, there is no error message. In Linux as long as the command runs without errors there may be no message.

To see if it worked, run ls again.

I see .bin files so it appears make worked just fine.

Now run sudo make install

you need sudo to install as these are system files.

When in doubt, read the README and/or MAKEFILE, the make file is plain text

EDIT - you are already root, so no need for sudo at all. Why are you running as root ?

Last it appears you are not running ubuntu ;)


Can I share same bookmarks db among Firefox installations in Ubuntu and Windows?

Try Xmarks - even though it stores your bookmarks on a server to synchronise with each browser it is installed on (available for Firefox, Chrome and Internet Explorer) you also have the local data in the browser installation folder


I had the same problem.
Did you install " third party software " in OS installation ?
You can try to delete your not recognized graphics, but more easy is a fresh new OS installation and let system choose right drivers. Install via sudo apt install ubuntu-restricted-extras won't enough to completely purge files and paths. Nothing other works for me. Feel free to choose Normal or Minimal installation in first step of this window.


How do I install a network driver on Linux?

If you have installed OS and you want to run Network Card as new hardware, you must ask the vendor for network drivers. Usually network drivers come with source pakage of kernel modules.
You must compile driver module for you kernel.

install "build essential" utilites

$ sudo apt-get install build-essential

unpack your source pakage to some folder
go to this folder
do this:

$ ./configure
$ make
$ sudo make install

After installation you can load just compiled module by enter command:

$ sudo insmod your_module.so
$ ifconfig eth0 up


how to setup ubuntu that fstab runs after network is connected?

You can declare this filesystems as a network device by adding _netdev to the options sections of your fstab line like so:

//192.168.5.167/H /mnt/ssd cifs credentials=/root/.smbreds,_netdev,noauto,x-systemd.automount 0 0

This will prevent the system from attempting to mount this filesystem until the network has been enabled on the system.

This is stated in man-pages for mount:

  _netdev

  The filesystem resides on a device that requires network access (used
  to prevent the system from attempting to mount these filesystems until
  the network has been enabled on the system).

Important:

You appear to be trying to use x-systemd.automount but not successfuly. As it appears in the example you posted in your question, you have added an extra space between  x- and systemd.automount which will result in an error. If you want to use systemd.automount in your fstab options, then use it like this x-systemd.automount and then run sudo systemctl daemon-reload and follow it by sudo systemctl restart remote-fs.target
I assume you understand that having the noauto option as in the example you added to your question, will prevent this filesystem from beeing mounted at boot time and will not be mounted with mount -a command. This filesystem can only be explicitly mounted with this option in the fstab line. If that is not what you want, then you should remove the noauto option.


Python 3.2 script not working and/or importing tkinter when running from desktop

Solution kindly supplied on Stackoverflow board by Furas:

For Python 2 try:

import tkMessageBox
import tkSimpleDialog

msg = tkMessageBox
sdg = tkSimpleDialog

or simpler:

import tkMessageBox as msg
import tkSimpleDialog as sdk

For Python 3 try:

from tkinter import messagebox
from tkinter import simpledialog

msg = messagebox
sdg = simpledialog

or simpler:

from tkinter import messagebox as msg
from tkinter import simpledialog as sdg

** I used the last 2 lines and it works perfectly now..


"ERROR: zlib check failed" while compiling Qemu

You don't have the headers/libraries to build qemu. The easy way to solve this situation is doing:

sudo apt-get --no-install-recommends -y build-dep qemu

Now, to solve that message:

sudo apt-get install zlib1g-dev


How to add keyboard shortcut to launch terminal program?

You can use: bash -c "gnome-terminal -x application" to open a terminal, note that it exits once the application opened stops running.

bash -c "gnome-terminal -x julia"


Can I setup an smtp server with Ubuntu Desktop?

The short answer is YES.

The longer answer is probably rooted in why you would choose Desktop versus Server. I'm guessing you want the GUI out of the box for ease of administration. For that (and other information on Servers in general and Desktops vs Servers), see Frequently Asked Questions about the Ubuntu Server Edition.

Unfortunately, nothing will save you from the (exim|postfix|sendmail|webmail|doevcot|courrier|spamassassn|clam) configuration and administration. See Setting up an Ubuntu System as an Email Server for details.


How to make a VM use AMD IOMMU so I can use a 2nd Graphics card?

I assume you use VirtualBox, like in your question earlier. However you may want to try KVM. They have a How-to on that topic. I did a quick search on if the M5A99x EVO and its BIOS supports IOMMU and it looks promising, may be you need a BIOS update.


Cannot install grub for dual boot ubuntu 13.10 and windows 7

Yes,change the UEFI mode to Legacy mode in bios.Because UEFI mode makes the windows to boot directly and block Ubuntu from booting.

After that make sure that you boot from the HDD.


The virbr0, or "Virtual Bridge 0" interface is used for NAT (Network Address Translation). It is provided by the libvirt library, and virtual environments sometimes use it to connect to the outside network.

It was likely bundles with a VM software you installed at some point. If you'd like to remove it, and you're sure nothing else depends on it, you can use the following command:

sudo brctl delbr virbr0

(from UbuntuForums)

It is unlikely that the virtual bridge is affecting your guests' ability to connect to the Internet, though.


Installed Ubuntu 17.04 from usb, but now cannot boot

I had the same computer, except with 4GB RAM. I had the same issue with EFI booting. I would get no bootable device found.

My system had a system recovery partition first on the drive and the EFI partition second. The fix for me was to use my windows recovery disk to partition the drive. Then, delete all partitions except the first (the recovery). Then installing ubuntu.
My system also only booted by device (no OS boot) so, the default media path had to be created. Copy /EFI/ubuntu/shimx64.efi to /EFI/BOOT/ and rename it BOOTx64.efi, worked perfectly.

Try creating an NTFS partition at the beginning of the drive and flag it as system recovery. And a FAT32 partition flagged as ESP. then installing ubuntu.


In Ubuntu 17.10 and later how do I change the clock to a 12 hour format?

Click on Activities and search for "Settings" and launch it. Click on Details at the bottom of the sidebar and then select "Date & Time".

You'll find an option to change the time format.

For an option with more customisations, you may use a GNOME shell extension called "Clock Override" as mentioned in my answer here.


I've managed to solve this issue with pppoeconf from terminal, but I need to add at network-manager from KDE so I can change settings easily when I need to.


How to fix problematic Ubuntu ppa configuration?

After your information, the output of lsb_release -a is

LSB Version:    core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:cxx-3.0-amd64:cxx-3.0-noarch:cxx-3.1-amd64:cxx-3.1-noarch:cxx-3.2-amd64:cxx-3.2-noarch:cxx-4.0-amd64:cxx-4.0-noarch:desktop-3.1-amd64:desktop-3.1-noarch:desktop-3.2-amd64:desktop-3.2-noarch:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.0-amd64:graphics-3.0-noarch:graphics-3.1-amd64:graphics-3.1-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-3.2-amd64:printing-3.2-noarch:printing-4.0-amd64:printing-4.0-noarch:qt4-3.1-amd64:qt4-3.1-noarch
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.5 LTS
Release:    12.04
Codename:   precise

The error messages are based on Raring.

To fix this, run this commands:

sudo sed -i 's/raring/precise/g' /etc/apt/sources.list
sudo find /etc/apt/sources.list.d -name "*.list" -print0 | sudo xargs -0 sed -i 's/raring/precise/g'
sudo apt-get update

So that the entries are corrected to match your system.


I also had this problem. For me the solution was to install the propietory drivers from Radeon AMD. Once installed and chosen in the software, and a quick restart, I have a normal start-up window.

To install the proprietary graphics driver open the terminal and type:

ubuntu-drivers devices

The results of running this command will show you the package name of the recommended proprietary graphics driver. Then you can install it using the following commands:

sudo apt-get install package-name-of-the-recommended-graphics-driver
sudo reboot


How can I make grub menu appearing after installing minimal Ubuntu alongside Windows 10?

The computer is booting into windows instead of ubuntu because you don't have the partition GRUB is installed on marked as your first boot option. Go into your BIOS and you can easily change it... though the name of this drive probably won't show up as GRUB or Ubuntu, for me its just the name of my hard drive, if I want windows as my first boot option.. the drive is called Windows Boot Manager.


How can I reverse a 'fn' key on a Dell keyboard so that F1,F2,F3... are used as default?

There are 2 methods to change the Fn behavior.

Method 1:
Try one of the following combination:
Fn + NumLock
Fn + ~ key (it’s the one before a 1 on most US keyboards)
Fn + Esc
Method 2:
Change the Fn behavior from the BIOS menu.
After you open the BIOS menu, go to Function Key Behavior.
Then select Function Key First (if it doesn't work, repeat and select Multimedia Key First).


Run in terminal

sudo tee /etc/modprobe.d/blacklist-acer-wmi.conf <<< "blacklist acer_wmi"

and reboot.


Because I can't commend I will just post it here, I know it's wrong but I'm trying to help.
Try ubuntu-drivers devices
it will run for a while but if it detects a missing wifi driver it will let you know, if it does, execute sudo apt install <name of driver>
You said that it only happens to your home AP? try setting your phone the same name (SSID) and password as your home router and wait to see if it will happen again (be sure to be out of range of your actual wifi router of turn it off).
Additionally, you can try changing your routers SSID to see if the name was cusing the problem (quite rare!), try deleting your network from the memory and connect again, this should resolve any issues.
Also you can try a live iso from a usb to see if the problem will continue to exists even on a different "installation".


Solved.
Get scanner's IP Address by using the Menu button on the printer/scanner, select Network, then TCP / IP, then IP Address. Ping it:

brsaneconfig4 -p 192.168.0.107

not any answer in my case. So I set my scanner IP by brsaneconfig:

brsaneconfig4 -a name=DCP-7070DW model=DCP7070DW ip=192.168.0.107

Then restart computer and ping again. Ping now works fine and xsane detects scanner successfully.


How to install ubuntu server 14.04 without internet connection?

It seems ridiculous to me that a 14.04(.1) server install requires an available HTTP APT repository server. I could find no simple way of getting it to install without one.

As it happened I had a 12.04 server set up with CNTLM (to authenticate properly with the corporation's main proxy) and squid-deb-proxy (for package caching) and by setting this as the proxy during installation it would get through but this is a real pain as I wanted a clean offline install which I then pointed just apt at the squid-deb-proxy (i.e. Acquire::http::Proxy ...).

The only reason this server should ever be attempting to connect to the outside world is for critical system updates so configuring the whole system to use that proxy (which won't allow connection to anything other than Ubuntu update servers anyway) seems silly.

I'll try to update this once I know all the places that the installer saves proxy details entered during installation so they can be removed post-install. Doing it the way I have done above at least ensures the password for proxy authentication doesn't get saved in any weird, unknown places.


Files lens and xdg-open only open nautilus but not the correct applicatiion

I had the same problem when I installed xfce  (my question can be found here).

My problem was solved after uninstalling all xubuntu*, xfdesktop4* and xfce4* packages (and thunar).

Perhaps you should start by typing:

aptitude search xfce xfd xubuntu | grep ^i

in order to see which packages are installed in your system.

Then proceed with their uninstallation.


How to install Emmet with gedit text editor in Ubuntu 12.04?

To my knowledge no-one has done a full port of emmet to gedit yet

there is a version of zen coding that will work with gedit 3.x

https://github.com/mtrovo/zen-coding-gedit3


Missing boot screen after installing nvidia drivers at Ubuntu 16.04

I have the solution: How to fix plymouth (splash screen) in all Ubuntu releases!

I used this advice and after a small correction it works. I wrote my knowledge to the original answer.


Set chromium as default browser under lubuntu

You can try: Default application for LXSession -> then select the default web browser.

Also for html files, you can right click on any .html file and set the open with option to chromium. From there on, the default application for all html files would be chromium.


Use this command to view motherboard information on your Ubuntu box

sudo dmidecode -t 2

You might need to install this tool if not available

sudo apt-get install dmidecode


I can't put anything on my desktop and i can't change the wallpaper. Lubuntu 16.04

Try typing this in a terminal:

pcmanfm --desktop-pref

You can change the desktop wallpaper from this window.

And uncheck the box "Show menus provided by window managers when desktop is clicked" found under the "Advanced" tab.

Then you should be able to right click on the desktop and get the menu to bring up the preferences window that allows you to change the wallpaper anytime.


Logwatch email failing with "invalid sender domain"

Many thanks to heynnema for his helpful suggestions. He pointed me to the 2nd configuration file which could be modified to fix the problem.

This turned out not to be a problem with logwatch, or nullmailer, but with sendmail itself.  It was sendmail that was ignoring the inputs from the logwatch config file and inserting its own value of the From address.

Fortunately, the /user/share/logwatch/dist.conf/logwatch.conf file has a line

mailer = "/usr/sbin/sendmail -t"

I was able to force the correct From address by changing this to read

mailer = "/usr/sbin/sendmail -t -f me@gmail.com"


Black screen installing Ubuntu Server 20.04.2 from USB

Solved it - needed to add nomodeset to the kernel params in the GRUB screen, and then permanently add it to GRUB config once ubuntu was installed.


How to pack a snap which accesses a usb device

Check Snapcraft.io docs, it is the upstream project. However, snap is still evolving so documentation lag behind current code releases.
So read directly, interfaces/plugins code from https://github.com/snapcore/snapd to know non documented features.
HowTo use, search for resent snapcraft.yaml on open source code repositories.


Screen problem when playing Planetside 2 on Ubuntu 12.04

I read my wine log files and they mentioned this line on game startup.

err:winediag:wined3d_texture_init The application tried to create a DXTn texture, but the driver does not support them.

A bit of searching led me to believe that WINE couldn't find any handler for the S3TC (aka DXTn) format, used for texture compression. It's a nonfree algorithm, so Mesa doesn't have support for it by default. You can enable support by installing the S2TC package.

sudo apt-get install libtxc-dxtn-s2tc0

You may need to get the 32-bit version of that package. I'm not sure which program's bittage dictates this: Planetside 2, or WINE.

sudo apt-get install libtxc-dxtn-s2tc0:i386

Nothing will break if you have both.


What does the aptitude `why` and `why-not` mean?

aptitude's why
In short, aptitude's why command try to say why a package should be installed or is installed in the system already. For example, in my system (Ubuntu 16.04) when I ran aptitude why nautilus-data, It says
i   unity-settings-daemon Depends nautilus-data (>= 2.91.3-1)

Which means unity-settings-daemon depends on nautilus-data and that's why it is installed, indicated by the i at the left most side column.
Again, when I ran aptitude why edubuntu-desktop, It says,
Unable to find a reason to install edubuntu-desktop.

Because none of my installed packages depends or recommends (depends and recommends are apt's internal term) edubuntu-desktop
aptitude's why-not
why-not is the opposite of why. It tries to find a reason why a given package should not be installed or should be removed if already installed.
For example, when I typed aptitude why-not mate-power-manager:i386, It says
i   mate-power-manager Conflicts mate-power-manager:i386

which means my installed mate-power-manager:amd64 will conflict with mate-power-manager:i386 (Because my system is a amd64 installation, that's why it didn't explicitly mention amd64).
The relevant part of the manual page is very clear. But including that will make the answer too long. Here is the aptitude's manual

About your problem
When you tried to install libdbus-1-3:i386, the messages here saying
The following packages have unmet dependencies:
 libdbus-1-3:i386 : Depends: libc6:i386 (>= 2.10) but it is not going to be installed
 unity-control-center : Depends: libcheese-gtk23 (>= 3.4.0) but it is not going to be installed
                        Depends: libcheese7 (>= 3.0.1) but it is not going to be installed

the package libdbus-1-3:i386 requires libc6:i386 (>= 2.10) but it cannot be installed. Also package unity-control-center depending on libcheese-gtk23 (>= 3.4.0) and libcheese7 (>= 3.0.1) cannot be installed.
The reason why cannot be installed can be many, including the specific version required for those packages are missing or will conflict with existing version installed etc.


How do I copy from a Mac OS X partition to my Ubuntu desktop via root access?

this seems to be a bug: Bug #858247
between Gnome (GVFS) and samba. You can mount your MBP partition using:

mount.cifs //192.168.0.x/public /mnt/public -o user=myusername,password=mypassword,nounix,sec=ntlmssp,noperm,rw


How to fsck hard drive while hard drive is unmounted, using bootable USB stick?

A more easy way is to tell ubuntu to check the filesystem on next boot. You can do this by touching /forcefsck (have a look here):

sudo touch /forcefsck

Another way is to pres ESC on boot while Grub is loading. You will get the Grub-boot-menu (have a look here). Herein you can choose to boot the recovery console. In the recovery console you can ask ubuntu to fsck all disks.

These both methods have the advantage that they working with encrypted partitions, too.

Doing a fsck from a live-system (USB-stick) requires more knowledge about finding disks and partitions and maybe about open encrypted partitions.


Broken something cant connect to my servers VIA SSH and any other daemons

Similar symptoms show up if one has same IP adress on two machines in network. Not very probable, though.

Do you have a headless server (no keyboard, no mouse, no monitor? Or can you sit in front of it and log in. In this case commands like ifconfig, ps -ef | grep ssh and netstat -anmight give you a clue what's going on.

"password is definitely right" - is there any chance that you are connecting to another server than you are thinking you are? Maybe the new network equipment is generously distributing new IP addresses via DHCP?

Well, just some ideas. TomTomTom


ubuntu 16.10 to 17.10 upgrade - don't get any menu in GUI

I had the same problem as you. I also followed the link that you posted on how to upgrade from 16.10 to 17.10 and I managed to fix this by running the commands below:

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo init 6

You can also check this link.


Where to find the code for the terminal commands?

Where to find it depends on the command. There are several locations.

Regarding the two you mention:

GNU coreutils

ls is part of GNU Coreutils. You can get the source code for all the GNU core utilities (so not just for ls: wikipedia list of core utilities) on www.gnu.org. From the command line using git (git needs to be installed):

git clone git://git.sv.gnu.org/coreutils

The source for ls can also be found online on git.savannah.gnu.org. All the other commands are accessible there too.

Shell builtins

cd is a built-in in the shell so is part of bash. You can find the source code for bash on ftp.gnu.org. That will also be the source code for all builtins.

  bash defines the following built-in commands: :, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete, continue, declare, dirs, disown, echo, enable, eval, exec,  exit,  export, fc, fg, getopts, hash, help, history, if, jobs, kill, let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, shift, shopt, source, suspend, test, times, trap, type, typeset, ulimit, umask, unalias, unset, until, wait, while.

  In what language are those programs written?

C or C++

  With that I would like to get into modifying existing programs and writing new ones

You are better off using the existing tools and adding to them: create a script called ls2 and then add functionality to that script to mimic ls + your additions. Your additions could be extra letters as parameters that trigger functions. Biggest advantage: you can write it in the language you prefer. Safer since you do not mess with the normal commands if your intention is to code new functionality for your these tools you should join their respective mailing lists.


Did you search for your driver on www.openprinting.org I also have an epson but a different model and drivers work perfect

Before install

Make sure to know if you are using a 32 or 64 bit OS to do that:

Hit Command(mac) or Window key.
Type Details, and select "Details" icon
Read "OS type" field
64 bit OS will read "64-bit"

Download

First option:
Search for your driver on the manufacturer web page
Once there: Search for XP-225 DO NOT choose an operating system. There are three linux results: (1)first one is the driver, (2) second one is an utility wich you may want to downlaod as i understand your computer allows wifi printing and it might help you. (3) third is the scanner driver

Second Option
Once you know what OS you have go to https://www.openprinting.org/
 and search for your printer.
Make sure to download the proper 32 or 64 bit file and it should be a DEB file not RPM

I save you the trouble to find your printer it is here:
https://www.openprinting.org/printer/Epson/Epson-XP-225_Series

Install
Once you download the DEB you should be able to install it just with a double click i recommend to use GDEBI


Wireless Adapter Driver not available for Linux

There appears to be a Linux driver for that. Open a terminal (press Ctrl+Alt+T) and run:

mkdir temp
cd temp
wget https://github.com/jurobystricky/Netgear-A6210/archive/master.zip
unzip master.zip
cd Netgear-A6210-master
make
sudo make install
cd ../..
rm -rf temp/


First of all, you can use apt or apt-get to install pip. You will probably need to uninstall your locally installed version of pip if you do this.

You can run the following commands to install pip:

sudo apt update
sudo apt install python-pip

To install python3-pip, use the following command:

sudo apt install python3-pip

Instead of using a virtual environment, you can install stuff with the --user flag.

Here is an example of how to install youtube-dl using this method:

pip install --user youtube-dl

Here is an example of how to update youtube-dl using the same method:

pip install --user --upgrade youtube-dl


Shutdown Takes too much time in Ubuntu 15.04

First this may be bug #1464917:

If this affects you please go there and let them know by clicking the link "This affects me" above the intial bug report.

After the shutdown or reboot has hanged with this message.

Reached target Shutdown

You may only see this if you have removed the splash screen, if you don't see this message you can still try the following.

Try Sysrq

Hold down the Alt and SysRq (Print Screen) keys.
While holding those down, type the following keys in order, several
seconds apart: REISUB
Computer should reboot.

Once it reboots immediately try shutdown button again, it should shutdown properly.  Please add your name to the "This Affects Me" link at the launchpad bug site linked above.

You can also try the following after it hangs.

Try and login tty1 and reboot

Press Ctrl+Alt+F1 or Ctrl+Alt+F2 or Ctrl+Alt+F3 ...
Write your username (lowercase, the name of the user folder in
/home) and hit Enter
Write your password (nothing will appear) and hit Enter

If your password and username are correct, you are now logged in.

If that fails try Ctrl+Alt+Del a couple times at that point in the tty1 screen.

You might see a message that states the machine is going to reboot and then it should do just that after a minute or so.

Its better than a hard boot - until its fixed.

In the bug notes it is reported that you can upgrade to Vivid-Proposed and it fixes the issue but some still see this after that upgrade.  It might be worth a shot.


How can I change the color of Ubuntu Touch ToolBar?

As far as I know, there is not a way to change to color of the bottom toolbar. There is no official way to do it, but there may be a hack to do it.

However, the toolbar at the bottom will be going away, being replaced by toolbar buttons in the header (and search will replace the header title). See this post on the Canonical design blog for further details.


Is it possible to have music accompany the BURG screen on startup?

The grub menu will be displayed only after the music stops playing.

This command can be used to set a tune (in this example Super Mario) as your music with the grub menu:

echo "GRUB_INIT_TUNE=\"1000 334 1 334 1 0 1 334 1 0 1 261 1 334 1 0 1 392 2 0 4 196 2\"" | sudo tee -a /etc/default/grub > /dev/null && sudo update-grub.

Super Mario Tune via CommandLineFU.
GRUB Manual


Content Alignment in Libre office is different from MS Office

I have upgraded Libre Office 3.5 to 4.2 and then i installed ttf-mscorefonts-installer through Ubuntu Software Center.

Now I am able to choose MS Font styles, so it gives similar alignment.

I'm not sure about this one, but my issue has been solved.


which ubuntu version is suitable for my laptop?

Xubuntu 12.04 LTS. Its fast and low on resource and is supported till April,2015.
Download from HERE


I use a MOUSE not a joystick, please no more joystick answers! How do I change my pointer so I can see it better?

Install the Unity Tweak Tool, select the cursor tab, select use large cursors at the bottom of the window.

Unity Tweak Tool can probably be found in Synaptic, the Ubuntu Software Center, or at https://launchpad.net/unity-tweak-tool.

Also, Solaar supports Logitech mice on Ubuntu. Find it at http://pwr.github.io/Solaar/


What are the consequences laptop running out power while GParted is running?

Theoretical and short answer:
yes, something could have gone wrong (though not very likely in your specific case).

Just to be sure that all is well:
The best thing you can do is running a filesystemcheck on any of the filesystems you have.
(let windows check NTFS, let linux check the ext partitions , etc).
If everything checks out OK and you are not missing any personal/data files, there shouldn't be any reason to worry.

The commandline tool to check the integrity of your linux filesystems is: fsck
The graphical tool for filesystemcheck under ubuntu is: palimpsest


Your font cache is probably messed up. Try clearing it.

To do the same, switch to tty1 using Ctrl+Alt+F1 and run:

$ sudo pkill -9 lightdm  # or whatever your desktop manager is
$ rm ~/.fontconfig/*
$ sudo rm /var/cache/fontconfig/*

You may want to reinstall font-packages fonts-* and ttf-* at this point:

$ sudo dpkg -l | awk -F" " '/ttf-/ {print $2} /fonts-/ {print $2}' | while read line; do apt-get purge -y $line && apt-get install $line -y; done

Finally, hit Ctrl+Alt+Del to reboot.


Is there any problem with OpenJDK on Minecraft?

The official advice is that you should use Oracle Java, since that's what Minecraft's developed against. However OpenJDK is pretty much equivalent in functionality so you can use OpenJDK for Minecraft.

If you run into problems however, try switching to Oracle Java.


How can i show Deadbeaf music-player queue

I am not aware of a clear "option to queue music files" in deadbeef; but I guess this would mean adding files to a playlist - which the following solution does:

There are some DeaDBeeF plugins.

Install the DeaDBeeF File Browser plugin (from here: i686, x86_64)

(On their site they say to put the .so file in: ~/.local/lib/deadbeef/

For installation from PPA it is also /usr/lib/deadbeef

while for the installation from .deb: /opt/deadbeef/lib/deadbeef)

Go to Preferences/Plugins/File Browser/Configure and set the default path for the music library (that may well be an external drive).

After that, you will see the music folders in DeaDBeeF in a left panel and each folder can be added (queued) to an existing or new playlist.


What software should I install for opening .stl files?

Meshlab reads all kind of 3D meshes, also STL

sudo apt-get install meshlab
meshlab file.stl

Example with this file:


How to create a bootable USB from a macOS dmg file?

Try installing unetbootin in the ubuntu machine with the command

sudo apt-get install unetbootin

and using your mac iso, install it to your usb


Virtualbox from apt does not detect most of my CPUs

The user manual for VirtualBox states hardware virtualization must be enabled for SMP to function properly.

Even though VirtualBox does not always require hardware virtualization, enabling it is required in
the following scenarios:

    VirtualBox’s  64-bit  guest  support  (added  with  version  2.0)  and  multiprocessing  (SMP,
    added with version 3.0) both require hardware virtualization to be enabled.  (This is not
    much of a limitation since the vast majority of today’s 64-bit and multicore CPUs ship with
    hardware virtualization anyway; the exceptions to this rule are e.g. older Intel Celeron and
    AMD Opteron CPUs.)

Perhaps your BIOS supports hardware virtualization but your CPU doesn't?


ThinkPad W530 - Mini display port doesn't work

I know your question is a year old, but I'm posting this for the benefit of others who might have the same question.

It looks to me like you are using the Intel integrated video card (or switchable graphics). It has been my experience that the only external video connection that works with the Intel card on this laptop is the vga port. If you want any digital video output you need to use the Nvidia discrete card. Switch your video card/device to "Discrete Only" in the bios and your mini displayport should start working. Unfortunately this will have an impact on battery life.


Upstart Script not catching mono application's start or stop

since the file is an EXE it is likely that you need a different way of detecting if it is running due to the fact that EXEs are run through wine and so are different than the programs native to ubuntu


restrict crontab from executing on 0th minute for a range of minutes

You can make the count start at 14 with 14-59/14 or, as suggested by @steeldriver in a comment, use an explicit list: 14,28,42,56.


Missing Java plug ins with U.S. Patent office web site

Mozilla has disabled the icetea-plugin for security reasons. As far as i see, there has be no updates right now to fix this problem. You could enable that plugin in the Firefox AddOn/Plugins menu. But that is not recommended and then youre at your own for potential risks. The security issues that are adressed by the decission are in the wild and even if linux may not be the first target for attackers its a big potential security risk.


If you're using screen keybindings, then press Ctrla,
then : (colon), to get a : prompt, where you can enter the clear-history command.


OK, I managed to find a solution.

Using openvpn package without any wrappers:

Add those 2 lines to your .ovpn file (or .conf if you're auto connecting):

script-security 2
up /etc/openvpn/up.sh

Then, create /etc/openvpn/up.sh with executable permissions (755/700):

#!/bin/sh
ip rule add from <your-server-ip> table 128
ip route add table 128 to <your-server-subnet> dev <your-interface>
ip route add table 128 default via <server-gateway>

For example, here's my configuration:

#!/bin/sh
ip rule add from 192.168.1.26 table 128
ip route add table 128 to 192.168.1.0/24 dev eno1
ip route add table 128 default via 192.168.1.1

Using a different VPN client/different configuration:

I can't predict the steps required, but generally you need to run up.sh script (above) everytime your VPN connection is established.

Hope it helps someone having the same issue. Cheers!


Why does vi start vim but typing vim says vim needs to be installed?

Well, you do have vim installed, but a minimal version of it called vim-tiny. If you run vim.tiny, you'll find it runs. This version has very few features enabled, and therefore doesn't provide the vim command. The other packages, vim-nox, vim-gnome, vim-gtk, vim-athena, have more features, and provide the vim command.

The vi command itself is actually a symbolic link, and points to whichever preferred version is installed through the Debian alternatives system. By default, since only vim-tiny is installed, the only alternative is vim.tiny, and running vi actually runs vim.tiny. If you install one of the other packages, they will become the preferred alternative for vi.

Related:

What are the differences between the different vim packages available in Ubuntu?


If I run an application, ~/.application is created. Is it safe to delete?

Those folders definitely were created before, but you probably hit Ctrl+H accidentally (the key combination to toggle visibility of folders and files with a name starting with a dot), so you can see them now.
What these folders are for
Usually applications store all kinds of (user specific-) settings & configuration files, profiles etc. in these hidden folders. In general, you can remove them safely, but then possibly changed settings, stored in such folders, will be lost. Also: on the next run, they simply will be re- created.
Be careful
Deleting these folders can however have bigger consequences: if you delete e.g. the folder .thunderbird, all your mail wil be lost.
Possible reasons to remove these directories

Not really your question, but related: many times in case an application starts acting weird or with errors, removing (or temporarily renaming-) this folder is the first thing you would like to try, to force the application to recreate its settings file(s).
Sometimes settings files of newer application versions are incompatible with older settings files. If you install a newer version of an application (e.g. when you upgrade your Ubuntu version), remaining outdated settings files can act up.
If you have application settings of applications you don't use anymore.


Screen truns off when I lock, but doesn't lock. "Lock" settings grayed out

Do you use Unity Tweak Tool? You might have this option enabled and not even know about it:


Button release does not work with xbindkeys

You need to add  to the release (because you'll have shift pressed when your mb9 is down):

# Press shift with your mouse button 9:
"xte 'keydown Shift_L'"
  b:9

# Release shift with your mouse button 9 + shift
"xte 'keyup Shift_L'"
 Shift+Mod2+Shift_L + b:9 + Release


This might help http://ubuntuforums.org/showthread.php?t=1930450 eventhough it's for AMD/Intel. Also this http://wiki.cchtml.com/index.php/Ubuntu_Precise_Installation_Guide has a lot of information in installing switchable graphics.
Hope it helps.


Can't install/remove packages - update-initramfs with little space on /boot

This was an issue with bootchart /var/lib/dpkg/info/bootchart.postrm script. I edited it to remove the update-initramfs command, and then I was able to remove bootchart and old linux-image packages normally, which freed up a lot of space in /boot.


Ubuntu 12.10: Installing proprietary Nvidia driver causes freeze at boot

You may be missing kernel headers, which are needed to build kernel modules for the Nvidia driver. To install kernel headers, run the following in a terminal (if your graphical interface is unusable, press CtrlAltF1 to switch to a virtual terminal):

sudo apt-get install linux-generic

And then re-install the Nvidia driver:

sudo apt-get --reinstall install nvidia-current-updates

Finally, restart:

sudo reboot


Dual Ubuntu Installations with Whole Disk Encryption

Here is the full account.

I have grouped the steps into phases between reboots:

Preliminaries
Back up your data
Reboot to live-USB for main tasks
a. pre-installation: make space on disk
b. installation: do manual partitioning
c. post-installation: supplement initramfs
Reboot to primary Ubuntu to update grub
Reboot to secondary Ubuntu to add keyfile
Reboot to secondary Ubuntu for finishing touch
Reminders for future installations
About unencrypted /boot

0. Preliminaries

I have done this on a laptop that has BIOS (for UEFI details, see Ubuntu full disk encryption with encrypted /boot), and encrypted Ubuntu 15.10 already installed (but it could as well be 14.04 LTS). I have repeated the procedure to install Ubuntu 16.10 over earlier 16.04, and then to install 18.04 over earlier 16.10. However, I had to erase the contents of the logical volume that I used for root (/) for Bionic installation. Whenever I left it unerased, either Ubiquity or update-initramfs failed various ways.

Beginning with Cosmic, LUKS2 is the default, and grub only supports LUKS1. Therefore, you cannot begin with an installation of Cosmic or later and expect to be able to add another installation in the same container the way explained here. Instead, you have to do partitioning and create a LUKS1 container manually to begin with.

I will refer to partitions and LVM volumes by the names that were created by the standard Ubuntu installation on the hard disk /dev/sda:

$ lsblk -o NAME,TYPE,FSTYPE,MOUNTPOINT
NAME                    TYPE  FSTYPE      MOUNTPOINT
sda                     disk
├─sda1                  part  ext2        /boot
├─sda2                  part
└─sda5                  part  crypto_LUKS
  └─sda5_crypt          crypt LVM2_member
    ├─ubuntu--vg-root   lvm   ext4        /
    └─ubuntu--vg-swap_1 lvm   swap        [SWAP]

The LUKS container "sda5_crypt" takes up all space on the logical partition. Shrinking a LUKS container is far too difficult for me; I do not want to destroy the existing Ubuntu installation by attempting it. So instead, I decided to shrink the logical volume "root" to make room for new installations.

The only unencrypted space on the disk therefore is the 255M /boot partition. It would be possible to split this partition, but two equal halves would only hold two kernel versions each, and for me that is not enough. So instead, I decided to place the new /boot directory under the new / root (by not pointing it to any other location). This creates some extra complications, but also leaves room for multiple installations alongside the primary Ubuntu.

All commands in the following are to be executed with sudo rights, so I have skipped the sudo part from all command lines.

Also, I will be talking about "secondary Ubuntu", because I cannot know which Linux you wish to install. Replace "secondary Ubuntu" (and any details specific to Ubiquity) with your choice of flavor.

1. Back up your data

In addition to your normal backups, you might also want to create a separate copy of the essential settings (such as /etc/crypttab) into a location in which they are easily accessible. That will not be needed if all goes by the plan, but may help you keep your calm.

2. Reboot to live-USB for main tasks

2.a. pre-installation: make space on disk

Open the LUKS container and activate LVM.

cryptsetup luksOpen /dev/sda5 sda5_crypt
vgscan
vgchange -ay

Shrink the existing root volume.

e2fsck -f /dev/mapper/ubuntu--vg-root
#resize2fs -p /dev/mapper/ubuntu--vg-root 16G
lvreduce -L 16G --resizefs /dev/ubuntu-vg/root

The commented-out line is there just in case you don't trust "lvreduce --resizefs" to do the resize bit reliably. Run the "resize2fs" if it makes you feel better.

Add a new root volume. The size is up to you to choose; 16G is just an example.

lvcreate -L 16G -n root2 ubuntu-vg

Create a new swap only if you believe you can get hibernate to work with LUKS. Otherwise, let the two installations share the existing swap space.

lvcreate -L 4G -n swap2 ubuntu-vg

Creating a new data volume seems like an obvious thing to do, but it is not essential for the installation as described here.

lvcreate -l 100%FREE -n data ubuntu-vg

At this point, a newbie might want to reboot without the live-USB and log in to the primary Ubuntu just to see that it still works. If you do, remember to re-open the LUKS container again when you reboot back to the live-USB.

Moreover, be careful to use the right command to open the LUKS container. For example, if you click the icon you see in the Launcher side bar, the container will be opened by the wrong name, and that will cause update-initramfs later on to fail to do its job.

cryptsetup luksOpen /dev/sda5 sda5_crypt

2.b. installation: do manual partitioning

Launch the installer and choose "Something else" for installation type.

Point / to your new root volume (/dev/ubuntu-vg/root2).
Do not point /boot anywhere.
Point swap to your new swap volume if you created one, and otherwise to the old one.
Carefully check that no other partition or LVM volume takes part in the installation.
Place grub on a logical volume. It does not matter which volume, as the point is to ensure that gub-install fails. First time around, this is the safest option. Later, when you have done this many times, you will know exactly when to choose /dev/sda.

Proceed to the rest of the installation.

If the installer asks if mounts should be unmounted, you have done something not mentioned here. Unmount your extra mounts.

At end of installation, choose to continue testing.

When the installer reports that grub-install failed, choose to continue without grub.
If the popup window gets stuck, just minimize the installer window.

2.c. post-installation: supplement initramfs

Mount the both root volumes.

mkdir /mnt/newroot && mount /dev/mapper/ubuntu--vg-root2 /mnt/newroot
mkdir /mnt/oldroot && mount /dev/mapper/ubuntu--vg-root /mnt/oldroot

Copy the file /etc/crypttab form the old root volume to the new one.

cp -p /mnt/oldroot/etc/crypttab /mnt/newroot/etc/
cat /mnt/newroot/etc/crypttab

If the file you copied already refers to a keyfile, copy also the keyfile and the script that you need to load the key to initrd.img.

cp -p /mnt/oldroot/crypto_keyfile.bin /mnt/newroot/
cp -p /mnt/oldroot/etc/initramfs-tools/hooks/crypto_keyfile /mnt/newroot/etc/initramfs-tools/hooks/

On the first time around, the key does not exist yet, and it is better to create it in a later step, because trouble-shooting is easier when changes are not all made at once.

The crucial final step is to load the changes to initrd.img in chroot jail.

for DEV in dev dev/pts sys proc; do mount --bind /$DEV /mnt/newroot/$DEV; done

chroot /mnt/newroot update-initramfs -u

# Note reverse order.
for DEV in proc sys dev/pts dev; do umount /mnt/newroot/$DEV; done

If you get an error message saying "cryptsetup: WARNING: invalid line in /etc/crypttab", you did not open the LUKS container by the right name.

Tidy up (not 100% necessary, especially if you did not choose persistence when you created your live-USB).

umount /mnt/oldroot && rmdir /mnt/oldroot
umount /mnt/newroot && rmdir /mnt/newroot

You could also try to tidy up by closing the LUKS container, but if you had to minimize the installer window, you will get an error message saying "Device or resource busy". Don't worry, it will be closed in shutdown anyway.

cryptsetup luksClose sda5_crypt

The hardest part is now over.

3. Reboot to primary Ubuntu to update grub

Edit file /etc/default/grub to enable the encrypted /boot to include:

GRUB_ENABLE_CRYPTODISK=y
GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda5:sda5_crypt"

If you set the value of GRUB_ENABLE_CRYPTODISK to "true" or "1" or anything else, update-grub will complain the value should be "1", but it really has to be "y". This is a known bug.
As usual, be careful not to add a newline to the end of the file.

Next, update grub -- mainly to add the newly installed Ubuntu to the menu, but also for the modified settings.

update-grub

4. Reboot to secondary Ubuntu to add keyfile

When you choose the secondary Ubuntu from grub menu, you will be asked for a password to open the LUKS container. And then you are asked for the same password again.
Once you have logged in, we need to fix the problem of having to type in the password twice. We do it by adding a keyfile to the LUKS container.

First, we want to know how many keys the LUKS container already has. A LUKS container can have up to eight keys (numbered 0..7), so we only want to create the keys that we really need.

cryptsetup luksDump /dev/sda5

In Wily Werewolf, the container already has three keys. No idea why.

Next, we create the new keyfile.

dd bs=512 count=4 if=/dev/urandom of=/crypto_keyfile.bin
chmod a=,u+r /crypto_keyfile.bin

Then we add the new key to the container. The command will as for an existing password, so type in the one you know.

cryptsetup luksAddKey /dev/sda5 /crypto_keyfile.bin

We still need a script that update-initramfs runs to load the key to initrd.img. Place the file in /etc/initramfs-tools/hooks/, and set its protection.

chmod +x /etc/initramfs-tools/hooks/crypto_keyfile

The script only needs to have one line in it:

cp /crypto_keyfile.bin "${DESTDIR}"

The name of the script, as well as the name of the keyfile, is up to you to decide.

We also have to add a reference to the key to /etc/crypttab. Before the modification, it looks like this:

sda5_crypt UUID=sda5-uuid-here none luks,discard

After the modification, it should look like this:

sda5_crypt UUID=sda5-uuid-here /crypto_keyfile.bin luks,discard,keyscript=/bin/cat

Now we are finally ready to update the initramfs:

update-initramfs -u

5. Reboot to secondary Ubuntu for finishing touch

This time, when you choose the secondary Ubuntu from grub menu, you will need to type in the LUKS password only once.

Copy the keyfile to the old root volume for backup.

mkdir /mnt/oldroot
mount /dev/mapper/ububtu--vg-root /mnt/oldroot
cp /crypto_file /mnt/oldroot/

Copy also the grub settings across for backup (from the old root volume to the new). Since the grub menu is shared by both installations, its settings are the same to the both, and the menu can be installed through either installation. So even if you prefer to keep the primary Ubuntu at top of the menu for now, you may need a backup copy of the settings later on.

cp /mnt/oldroot/etc/default/grub /etc/default/
umount /mnt/oldroot
rmdir /mnt/oldroot

You may also want to modify the mount options of the logical volumes (root volumes mainly), so that the two installations do not expose each other's private parts in the GUIs. I could give you a pattern for /etc/fstab, but fortunately Disks makes such a decent job that I don't need to.

Finally, you can begin the normal deployment of the secondary Ubuntu, and also deploy the new data volume in both installations.

6. Reminders for future installations

When overwriting either of the Ubuntu installations, you have to always repeat the same post-install steps, except the creation of a new keyfile for LUKS.
The need for the keyfile may disappear in any future release. Actually, I have found no proper documentation for the cryptsetup part of the installation, so I'm afraid anything about it could change. Beware!

7. About unencrypted /boot

If you choose to split the unencrypted primary partition to make room for the new /boot, you can drop out some of the steps I presented:

You do not need a keyfile, so you also do not need the script to load the key into initrd.img, and you do not need to add a reference to the keyfile into /etc/crypttab. Even so, you still need to add the /etc/crypttab file and run update-initramfs in chroot jail in post-installation phase.
If the new /boot is not encrypted, you also do not need GRUB_ENABLE_CRYPTODISK in your grub ssettings, and you do not need to set startup parameters to GRUB_CMDLINE_LINUX. Even so, you still need to run update-grub to add the secondary installation to grub menu.


check the Problem with installing Steam on Ubuntu 15.04 post.

This problem don't seem to affect the closed source drivers, only the open ones.


How to configure ADB access for Android devices?

Please read the following first: How do I set up Android ADB?

Configuring USB access

First, you don't need root permissions to run ADB if you have set the permissions accordingly. The AOSP site provides examples for Configuring USB Access for Pixel/Nexus devices. You can use the following scheme for non-Nexus devices:

SUBSYSTEM=="usb", ATTR{idVendor}=="xxxx", ATTR{idProduct}=="xxxx", MODE="0600", OWNER="<username>"

Vendor and product ID can be obtained by using lsusb and searching for your device. (Note: The device actually is a Galaxy Nexus.)

$ lsusb | grep -i samsung
Bus 002 Device 103: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]

So my /etc/udev/rules.d/51-android.rules udev rule looks like this:

# adb protocol on maguro/toro (Galaxy Nexus)
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="username"

You may want to repeat this for the other phone states like fastboot if needed. To let the changes take effect either reload udev (sudo udevadm control --reload) or reboot (recommended).

Making programs available

Instead of modifying the path variable I would suggest adding a symbolic link to the executable either in ~/bin/ (user only) or in /usr/local/bin/ (system wide).

mkdir ~/bin/
ln -s /opt/android-sdk-linux/platform-tools/adb ~/bin/


How to Place a script file at other machine root

By default openssh will denied any root login attempt. However, this can be allowed by modifying /etc/ssh/sshd_config on the server side.

Make sure this line sets to yes and no commented out:

PermitRootLogin yes

And then reload your sshd.

However, above setup is not a good security practice. Instead use pubkey login.

the config line should be:

PermitRootLogin without-password.

On source machine genereate key, follow the wizard:
ssh-keygen -t rsa
Above command will create .ssh/id_rsa.pub and .ssh/id_rsa containing public and private key pair.
You need to copy .ssh/id_rsa.pub content into the destination machine /root/.ssh/authorized_keys. Make the directory and file if its not exist and make sure the ownership of the authorized_keys is 600.
Now try scp attempt, it will asks for password that you have entered in step 1.


So, after following many bad leads, I finally found this:

> gsettings set com.canonical.indicator.datetime time-format 'custom'

then

> gsettings set com.canonical.indicator.datetime custom-time-format '%Y-%m-%dT%H:%M:%S'

I'm sure

%Y-%m-%dT%T

does the same thing.


Empathy cannot connect with Google Talk and Facebook

With the facebook part, make sure you use the user name you have with facebook. This isn't your email. It's a facebook email. But you don't include @facebook.com
To set one up if you haven't already. Go to account settings on facebook, and then there should be a spot to create a username.

(it will be at the end of http://www.facebook.com/userNameWouldBeHere)

Try using that, and see if it helps.


You've to login via sesman-XVnc. disconnect, connect a second time, and, THEN choose the new session (returning) in my case. That worked somehow...


no mysql workbench in ubuntu 12.04 software center

In precise (12.04), quantal (12.10), and raring (13.04), the mysql-workbench package is in universe, so:

Open the "Software Sources" app, a.k.a. software-properties-gtk
Ensure the "Community maintained free and open-source software" checkbox is checked
Refresh your packages, either through a Refresh button or through sudo apt-get update
Install it via your favorite package management app, or sudo apt-get install mysql-workbench


My computer running Ubuntu crashed and doesn't remember my login password

You should be able to use grub to choose one of the recovery options, this should give you a root terminal. (This is from memory! So might not be correct)

if you're root then the prompt should end with a # so you don't need to use sudo.

To verify that you can change the users/passwords etc type cat /etc/passwd if this shows a list of usernames then you should be able to run the command passwd <username> which will prompt for a new password. If you don't get cat to show anything you will need to look up how to mount the root partition in recovery mode

You might have to look at usermod & useradd if you want to create a new user to login with.
If you do create a new user, run sudo usermod -aG sudo <username> so that user can use sudo

Think I'll go familiarise myself with recovery while you try that..


Is there a way to select the 1st Unity search result with 1 keystroke?

Simply pressing the return key will select the first result once a search has been entered, but selecting the second result onwards has to be done by pressing the down arrow twice and then moving across to the correct choice.

Hope this helps.


Home folder button "buggy" after opening specific program (Maple 15)

I've seen behavior like this before, when something claims a directory as its mimetype. You can fix it by editing ~/.local/share/applications/mimeapps.list and removing the offending line.


Assuming you just want x,
file="$PWD/x.zip"
(cd /tmp/w;zip -r "$file" x)

does the job in a subshell. When the subshell exits, the cd wears off.


Combo wireless keyboard+mouse, Mouse is not working

This was the same case with me. I'd bought a combo keyboard and mouse, just like yours with a usb receiver. The first time I plugged it in, it was not working, the whole set.

Yet, your case looks a little bit different to me. Your keyboard is working but mouse is not. So, first, check if there is any hardware/manufacturing problem with the device. This is pretty common. It could be anywhere from battery issues to receiver problem.

Next, here are some more things you can do:-

Check if there is any need of drivers. Or, you could use the software and updates app in Ubuntu to install drivers for 3rd party.
Try plugging the device to another machine (windows or linux) . If it also does not respond, consider getting it replaced, it might be faulty.
Try to run a linux distro live (ubuntu or another one), and then check if the mouse works. This happened once. My mouse was not working with Opensuse, but on trying it with Fedora live, it worked seamlessly.

This is all I have as far the case of the mouse is concerned. I hope it helps you !


Enable nomodeset and noapic parameters. Additionally, you can also try noalpic and acpi=off but nomodeset generally works


How to configure rtl8723be to detect wifi networks (solved for HP laptop)

I was able to successfully scan for networks after completing the steps below on an HP 11" Pavilion X360 model 11-k020nr. Apparently the rtl8723 can have two antenna but HP only installs one in the laptop.  The rtl8723be driver needs to have the correct antenna assigned or the wifi reception is too poor to detect networks.

download drive source files at:
https://github.com/lwfinger/rtlwifi_new

There is a "Download Zip" button, in the top 1/3 of the web-page on the right side.

Extract the .zip into any folder.  A "rtlwifi_new-master" folder will be created.

Enter the "rtlwifi_new-master" folder and run:

make clean
sudo make install

Once the code is compiled and installed:

sudo modprobe -r rtl8723be
 sudo modprobe -v rtl8723be isp=0 ant_sel=2

run

sudo iwlist wlp3s0 scan

to see if networks are detected.  One might have to try ant_sel=1.  I confirmed that Bluetooth still works.

If it helps, make it permanent:

sudo -i
 echo "options rtl8723be isp=0 ant_sel=1"  >>  /etc/modprobe.d/rtl8723be.conf
 exit


After modifying /etc/hosts which service needs to be restarted?

You don't need to restart any services.

When tested on a 14.04 server installation, the changes were reflected immediately.

The only service that I think could be related is 'networking', but it's unnecessary to restart it.