OpenVPN apt-get install hanging at 72% on Ubuntu 17.10

So - this definitely isn't a fix, however I booted a live version of Ubuntu 17.10 and found that OpenVPN installed without issue. Since this was a fresh install, I ultimately decided to just re-install the whole OS and start again. This appears to have resolved the issue. Side note - another random issue is that virtualbox would also not install, this was also resolved by reinstalling the OS.

I'd be interested to see if anyone else runs into this, if there is a less overkill option to try.


What is the difference between "source" and "."?

source and . are synonymous in Bash.

For anyone who might like to verify that the commands are simply synonyms and nothing more, look at the source code, say for version 4.3, and examine the file builtins/source.def. You will read that both of the built-in commands, source and ., use the very same function: source_builtin.


In Xubuntu 16.04.1, how can I force external USB HD to mount as non-root user?

Try working in a non-sudo environment?

As sudo means that the "root" user is copying it instead of the user (you). So I assume that if you do not work in a sudo environment, the user (you) who copied it will inherit the ownership of the copied files.


ip tuntap add gives "open: No such file or directory"

Docker doesn't map in the tun/tap device, so this needs to be done manually.  Use the following flag for docker run.

--device /dev/net/tun:/dev/net/tun


Installation of Ubuntu 20.04 LTS is getting stuck everytime

Boot with Try Ubuntu Without Installing
Get the desktop loads up
Connect to wifi from wifi menu on top panel
If it works, good. Else go to the Additional Driver and check for available drivers and select accordingly, then apply and reconnect wifi
Install Ubuntu from the Install Ubuntu icon

Hope it helps


pv permission denied, but dd works without error

The redirections above are setup by your shell before forking and execing sudo. You may want something like the following:

sudo bash -c 'pv </dev/sda  >/dev/sdb`

This will cause bash to be run by sudo. Bash will execute the parameter to the -c arg as a command in that shell rather than running interactively.

The dd command worked because presumably you didn't use redirections with it.

Also, pv doesn't run above dd.  The pv command does lots of things, including showing progress of its output to stdout  or rate limiting its output.


I am/was having the same issue. Computer has blank screen after resume. It appears that the backlight is just not illuminating because I feel like I can see everything just without light.

HP Compaq Presario F763NR attempting to run with Ubuntu 13.10

I found, however, that I could 'wake' the system by Ctrl-Alt-F5, then Ctrl-Alt-F7.

First, before this - in order to prevent the computer from crashing when accessing Search your Computer and Resources - I was required to install the System Settings > Software & Updates > Additional Drivers > Using NVIDIA binary Xorg driver, kernel module and VDPAU library from nvidia-304-updates (proprietary).

Solution: create the file /etc/pm/sleep.d/99_wake_hack to contain:

#!/bin/sh
#
# Action script to activate the screen on resume.
# Without this script, the screen remains blank.
#

PATH=/sbin:/usr/sbin:/bin:/usr/bin

case "${1}" in
    hibernate|suspend)
            #nothing
            ;;
    resume|thaw)
            chvt 5 && sleep 1 && chvt 7 &
            ;;
esac

Essentially, I am switching the foreground virtual terminals. There is a command for this: chvt 5 && chvt 7. I require the sleep 1 and need execute in parallel (&) because the fix does not work if the chvt 7 happens before the wake_hack script (and other resume scripts) are complete.

I look forward to hearing better solutions to this problem.


Can't Add new local library Folder in Steam: New Steamlibrary folder must be on a filesystem mounted with execute permissions

This is resolved.  I had to disable Windows Fast Start inside of Win10 because I didn't have the option in my bios (mobo: AsRock Extreme4 Z77).  Once I did that then I did a shut down in Windows and booted Ubuntu.  I ran the same command and added the library successfully.


What is the difference between Terminal and Root Terminal?

The default Kali user is root and the Root Terminal application that was installed by the Katoolin script provides the same functionality in Ubuntu, however it should be mentioned that the single user, root access policy of Kali Linux is not recommended for Ubuntu users. In Kali Linux the default user is root and the default root password is toor. Using the default root password is a security risk, so either the Root Terminal application should be uninstalled or else the default root password should be replaced by a strong password.

From Kali Linux Root User Policy

  Most Linux distributions, quite sensibly, encourage the use of a
  non-privileged account while running the system and use a utility like
  sudo when and if escalation of privileges in needed. This is sound
  security advice: this provides an extra layer of protection between
  the user and any potentially disruptive or destructive operating
  system commands or operations. This is especially true for multiple
  user systems, where user privilege separation is a requirement —
  misbehavior by one user can disrupt or destroy the work of many users.

  Kali Linux, however, as a security and auditing platform, contains
  many which tools can only run with root privileges. Further, Kali
  Linux’s nature makes its use in a multi-user environment highly
  unlikely.

  For these reasons, the default Kali user is "root", and no
  non-privileged user is created as a part of the installation process.
  This is one reason that Kali Linux is not recommended for use by Linux
  beginners who might be more apt to make destructive mistakes while
  running with root privileges.


Can find recurse into some folders but not others in the same command?

You can pass the directories you want to start from as multiple starting points to find.

You want to use find to search a handful of specific directories, all of which happen to be subdirectories of your home directory:

  To clarify, I'd like to recurse into ~/Desktop, ~/Documents, and ~/Dropbox, but not into ~/.config or ~/.dropbox or ~/.cache.

So you can just pass those directories as starting points for find. We often use a single directory as a starting point, and it is often ., but find isn't limited to that.

find ~/Desktop ~/Documents ~/Dropbox -name my-file

Replace -name my-file with the rest of the find command (i.e., the tests and actions) you want to run.

This doesn't supply your home directory itself as a starting point to find, and since none of the directories it supplies contains your home directory--they are instead contained by it--files in your home directory that are not contained within any of those specific directories will not be found.

If these directories happen to be all the subdirectories of your home directory whose names don't start with ., then you can have your shell build the list for you:

find ~/*/ -name my-file

* matches any sequence of characters in a filename. The last trailing / causes only directories to be matched. By default, shells don't expand * to files whose names start with .. So unless you've enabled the dotglob shell option (or whatever your shell has for that, if your shell is not Bash), the list produced by * won't include the .config, .dropbox, or .cache subdirectories of your home directory.

Files and directories whose names start with . and that reside within the directories passed as starting points will still be found, of course.


What is the relation between ALSA and PulseAudio sound architecture?

PulseAudio basically sits atop ALSA, and use it internally. ALSA is unable by itself to be used by multiple applications, so PulseAudio provides this functionality among others.

Summarized:

ALSA - dealing with the hardware, basically owning it
PulseAudio - a software proxy providing additional featues (mixing, equalizer) between your application and the ALSA/OSS subsystem

This diagram is from the Wikipedia page of PulseAudio:


Had similar problems after upgrade from 18.04 to 18.10.

In my case the problem seems to be not in keyboard at all, but in latency of displaying pressed keys. So after switched to open source drivers rather than NVIDIA via software & updates -> Additional Drivers -> 'Using X.Org X server'.

The keyboard lags gone. But it made problems with unable to change standard 640x480 screen resolution with xrandr, and also disabled my audio. After some debugging - all problems simultaneously vanished after sudo apt-get purge nvidia-* in cmd.


How to install pygame in python 2.7.6 on ubuntu 14?

the best way to install python modules in python is
do

sudo apt-get install python-pip

and then do

sudo pip install name_of_python_module

for you

sudo pip install pygame

and if you are unsure about name of any of the modules
you can do

pip search name_of_python_module

and it will give you the search results and take the name and install by above method


no suitable windowing system found, exiting. open office 4 ubuntu

You need to install package libxt6 and libxrender1

  apt-get install libxt6
  apt-get install libxrender1


Trying new video drivers with Ubuntu live disk?

I have not tried it myself as the drivers in my Xubuntu 16.04 are working just fine, still I think you can load/replace drivers in a Live session. One thing though. You may want to consider to make use of a persistent Live USB. That way changes in the Live config are saved and survive a reboot.
There are many references in Ask Ubuntu how to create a persistent Live USB. Here is one: https://help.ubuntu.com/community/mkusb?action=fullsearch&value=linkto%3A%22mkusb%22&context=180


"sudo apt-get upgrade" keeps hanging and I can't figure out why

This is a problem with the SD card that doesn't support the IO speed.
I made a script that performs the upgrade without hanging:

for i in $(apt list --upgradable | cut -d/ -f1); do
    sudo apt-get -y install --only-upgrade $i
    sleep 10
done


How can i play EA SPORT CRICKET(TM)2011 on ubuntu

I would use PlayOnLinux. You can install it using the Software Center. It is kind of hard to give step by step instructions since I don't own the game but PlayOnLinux has an easy assistant.

For starters: Klick Install. In the following menu you can select predefined profiles. Sadly there is none for your game so you have to do it manually. Klick Install a non-listed program in the lower left corner. Just follow the assistant. You want to create a new virtual drive. At some point it will ask you for the installer. Just enter your game disk (or whatever you have) an select the .exe file that will install the game.

There is no guarantee that your game will work on Ubuntu but this is the easiest way to try.


Ubuntu 16.10: teamviewer:i386 depends on libpng12-0

Teamviewer depends on libpng12-0, which is replaced in yakkety (16.10) with libpng16-16. You can try using the libpng12-0 package from the xenial repository:

$ wget http://se.archive.ubuntu.com/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1_i386.deb
$ dpkg -i libpng12-0_1.2.54-1ubuntu1_i386.deb
$ rm libpng12-0_1.2.54-1ubuntu1_i386.deb


incorrect permissions after copying over scp

I've had some issues with rsync/ssh and cygwin, this is how I managed to solve:

Disable acl's as these cannot be properly mapped to Linux ACL's
Check mount options before changing:

$ mount

D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,posix=0,user,noumount,auto)

Change setting for ACL's

cp /etc/fstab /etc/fstab.install

echo "none /cygdrive cygdrive binary,posix=0,user,noacl 0 0" >> /etc/fstab

To activate the new setting, logout and login again

logout
ssh Adminstrator@hostname

Check the new setting for "noacl":

$ mount

D:/ProgramsVista/ICW/etc/terminfo on /usr/share/terminfo type ntfs (binary,noacl)
D:/ProgramsVista/ICW/bin on /usr/bin type ntfs (binary,noacl)
D:/ProgramsVista/ICW/lib on /usr/lib type ntfs (binary,auto)
D:/ProgramsVista/ICW on / type ntfs (binary,noacl)
C: on /cygdrive/c type ntfs (binary,noacl,posix=0,user,noumount,auto)
D: on /cygdrive/d type ntfs (binary,noacl,posix=0,user,noumount,auto)
E: on /cygdrive/e type iso9660 (binary,noacl,posix=0,user,noumount,auto)

(sorry can't seem to get the formatting right this morning.)


If you're going to always use the same nameserver (ie: you're not on a laptop or other mobile device) and want a permanent solution, you can try the following:

Set /etc/resolve.conf as Immutable

Edit /etc/resolve.conf
Set /etc/resolve.conf as immutable

sudo chattr +i /etc/resolve.conf

Remove /etc/resolve.conf Immutable

No program will be able to change the contents of your /etc/resolve.conf file, unless your remove the immutable flag:

sudo chattr -i /etc/resolve.conf


I tried the following commands and it worked for me:

 sudo mv /var/lib/dpkg/status /var/lib/dpkg/status.bad
 sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
 sudo apt-get update


Start an app from grub with minimal bootup time

The link you included with your question explains basic way of creating a startup application for graphical login ( which is exactly what you want ).
Basically, Ubuntu runs .desktop files in /etc/xdg/autostart or ~/.config/autostart for each app that you want to start as soon as you log in.

Grub's purpose is to boot the OS, not the apps. If you want to speed up the boot of your OS, minimize number of items on graphical startup and number of services that boot in /etc/init. For instance, with ubuntu 14.04 in /etc/init/bluetooth.conf you can safely add # in front of line start on started dbus to prevent it running on startup.

The way I'd approach such question, is to research first which services I can safely prevent from starting on boot, make an autologin (to avoid typing password each time), and create a startup entry for your game.

Here's an example script with the behavior that you've described in the comments. Place this script into your /usr/bin directory, make sure it has executable permissions by running sudo chmod +x scriptname.sh and add this script as a startup application or add manually a .desktop file into your ~/.config/autostart directory. The script is very simplistic, requires having xdotool which you can get with sudo apt-get install xdotool and well commented, so it should be very self explanatory

#!/bin/sh

# lets see if we have logitech mouse
# connected

xinput | grep -iq logitech

# if we do, then don't do anything
# if we don't launch the game, wait
# 3 seconds
# and simulate pressing F11 key
# to enter full screen mode
if [ $? -eq 1 ]; then
   sol &
   sleep 3
  xdotool key F11
fi


How to load dll to C# in mono and run it

This is finally solved by setting the MONO_PATH environmental variable in my .bashrc file.

The documentation says:

  At run time, Mono looks in three places for assemblies necessary to
  run a program. It first searches the location of the executing
  assembly. If your application uses assemblies not provided by the
  runtime, you may place them all in the same directory so that Mono may
  find them. If a required assembly isn’t found there, Mono searches the
  MONO_PATH environment variable.

In my .bashrc: export MONO_PATH=/home/local/prasanth/test/dist/lib/net45/

I added this line and compiled my .bashrc file. Now my application runs without any problem.


XFCE with Nemo: Context menu -> open in terminal does not work anymore

Try this command:

gsettings set org.cinnamon.desktop.default-applications.terminal exec 'TERMINAL'


How can i recover files from hdd dedicated to unbootable OS with Ubuntu on USB?

Setting the boot priorities in BIOS and putting your USB containing Ubuntu before the HDD with windows will boot up Ubuntu and you will have the HDD mounted as a storage device.


Unable to change brightness on a toshiba m505

Sometimes the kernel needs a parameter. Try this:

Open a terminal (Ctrl+Alt+T) and give this command

gksudo gedit /etc/default/grub

at the opened window , search for this line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and change it to look exactly like this

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

proofread , save the document and then

run in terminal this command

sudo update-grub

Reboot your PC and see if problem solved.


Bluetooth Mouse / Keyboard disconnect constantly (Ubuntu 18.04)

All above attempts and restarting the computer and the devices didn't help.

The solution was to pull out the batteries and then press the bluetooth button on the mouse to make it discoverable. After this the keyboard was also recognized (without restarting it and even if it is a separate model and hasn't anything to do with the mouse).


Intel releases microcode updates to correct processor behavior as documented in the respective processor specification updates. AMD releases microcode patches to correct processor behavior as documented in the respective processor revision guides. Login to a virtual console and install the system processor microcode that is compatible with your computer's CPU.

When the system is booting immediately before the system is about to lock up access the virtual console by pressing the keyboard combination Ctrl+Alt+F3. To login from a virtual console:

At the login: prompt type your username and press Enter.
At the Password: prompt type your user password and press Enter.

Run the following command to display the CPU manufacturer (Intel or AMD):

cat /proc/cpuinfo

Run one of the two following commands depending on whether your computer's CPU manufacturer is Intel or AMD.

sudo apt install intel-microcode # Intel CPU
sudo apt install amd64-microcode # AMD CPU

Reboot the system.

sudo reboot

If you can't access the virtual console in Step 1, all you need to do to get into a virtual console is for the Linux kernel to be loaded and the kernel is the first thing to load when the computer is booting, so press the keyboard combination Ctrl+Alt+F3 earlier and maybe it will work. Otherwise you can install the firmware updates by booting from an Ubuntu live USB and using chroot to run a command or interactive shell with a special root directory (your Ubuntu installation on the hard drive).


Multimedia keys (XF86Audio*) not shown by xev, even though still working

The issue here is twofold:

These music players don't react to the keystrokes themselves, but to some D-Bus events from the gnome-settings-daemon.

The gnome-settings-daemon might have grabbed them in a way that xev no longer sees them.

Other players, their plugins or other software might however try to access these keys directly and fail (since g-s-d already owns them).


Unable to install WPS Office on Ubuntu Gnome 17.04

WARNING: This answer may became obsolete anytime soon. WPS for Linux seems be have been abandoned. The version you have is the last one and it may not be installable in newer Ubuntu releases.

The original error message - unexpected end of file or stream - suggests corrupt download. This has been confirmed with the checksum.

Download from my personal share and confirm SHA1 matches 80d884c47eaeee3305958ed87e61eafbee30b0cf.

Before installing, due to a missing dependency since 16.10, this workaround is still required.
You should now be able to install and enjoy this great office suite that unfortunately reached the end of its life.


Wubi 12.04 installation error executing command command

Are you using also having cygwin installed in your windows System ? If yes, then first uninstall it, then try again. In my opinion your cygwin installation is interfering with Wubi .

Usage: /**cygdrive**/c/Users/Eriks/AppData/Local/Temp/pyl4F88.tmp/bin/resize2fs.exe -f C:/ubuntu/disks/root.disk 17744M [-d debug_flags] [-f] [-F] [-p] device [new_size]

Hope this helps...


Ubuntu 20.04 "Dummy output" No sound card in use

I ran into this exact same issue on my issue. I don't know if you are experiencing the same problem because it ended up being that timidity-daemon was causing this to appear. I ended up having to remove that and it started working.

The one thing I can suggest as a workaround is running this command

sudo alsa force-reload

This would force my device to start working again.


How to get mit-scheme from the package manager?

You need to enable the installation of i386 packages on your amd64 system.

To do so, enter the following commands:

dpkg --add-architecture i386
apt-get update
sudo apt-get install ia32-libs
apt-get update
sudo apt-get install libmhash2:i386 mit-scheme:i386

For further information see the Debian Multiarch Wiki.

Reference


Why does Ubuntu show slightly less RAM than my computer has built in?

This is most probably due to your graphics card reclaiming some of the RAM for its own purposes (mostly texture storage). There's also a chunk of memory reserved by the kernel, but it's tiny (a few megabytes) compared to the discrepancy you see.

On many systems, the amount of RAM reserved for graphics is configurable in BIOS settings.


Ubuntu Server 18.04 does not show Intel SW RAID(RAID 0 or RAID 1) device in Partition Manger

When asked:
Active MDADM containers (Intel/DDF RAID), choose "yes"

It will then ask:
Activate Serial ATA RAID device, at this point wait and switch to a shell by pressing "alt+f2"

Press Enter to activate the console

Then run the command "mdadm --stop /dev/md127"

Next activate the intel dmraid by running the command "dmraid -ay"

Press "alt+f1" to go back to the installer.

Now you can answer the
Activate Serial ATA RAID device with "No".

It should now pick up your Intel RAID.


Why does Wubi.exe for Ubuntu 11.10 not run on Windows 7 32bit?

at last problem solved.

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup

accidentally this "startup" folder was deleted.just create this manually & wubi.exe runs.

09-28 19:48 DEBUG WindowsBackend: startup_folder=C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
01-03 01:13 DEBUG WindowsBackend: startup_folder=None
From analysis of the code, it appears that the bug is due to the fact that you don't have the startup folder set properly. To workaround this problem, set the startup environment variable by editing the registry (regedit) and make sure the following is set: 'HKEY_LOCAL_MACHINE', '\SOFTWARE\Microsoft\Windows\CurrentVersion' '\Explorer\Shell Folders', 'Common Startup'
I added a more detailed answer to the bug report including some code snippets.

thanks bcbc for your log it helps me a lot.


How to safely expand root partition for Xubuntu running in VirtualBox with GParted?

The previous modified volume just needed a boot-repair. I booted into live cd and installed boot-repair. It automatically fixed my issue.


How do I share a directory between an LXC container and the host?

According to the LXC documentation you can do this via a privileged container:

lxc launch ubuntu priv -c security.privileged=true
lxc config device add priv homedir disk source=/home/$USER path=/home/ubuntu


How to take a screenshot and then upload the image to imgur through terminal?

Take the screenshot of your desktop

gnome-screenshot was the default command-line tool on Ubuntu to take a screenshot.

gnome-screenshot -d 10

Delayed the screenshot action by 10 seconds,So that you can place the desired window on front within 10 seconds.The taken images are actually stored in ~/Pictures folder.

Upload the image to imgur.com

gedit ~/.bashrc

Add the below lines to the opened .bashrc file and then save it.

imgur() {
    for i in "$@"; do
        curl -# -F "image"=@"$i" -F "key"="4907fcd89e761c6b07eeb8292d5a9b2a" imgur.com/api/upload.xml|\
        grep -Eo '<[a-z_]+>http[^<]+'|sed 's/^<.\|_./\U&/g;s/_/ /;s/<\(.*\)>/\x1B[0;34m\1:\x1B[0m /'
    done
}

Source the .bashrc file,so that the changes can take effect,

source ~/.bashrc

The above script requires curl package to work.So install it by running

sudo apt-get install curl

Then run the below command to upload the image stored in the ~/Pictures folder to imgur.com,

imgur ~/Pictures/filename.png

Get the link of uploaded image

Source


Pcretest seems to be gone from libpcre3 package

It was dropped in version 8.12-3ubuntu1:

pcre3 (8.12-3ubuntu1) natty; urgency=low

  * FFe LP: #733501
  * Drop pcretest from the libpcre3 package, to allow for correct
    coinstallability.
  * Build for multiarch, pre-depending on multiarch-support.

 -- Steve Langasek <steve.langasek@ubuntu.com>  Thu, 17 Mar 2011 11:05:43 -0700

The relevant commit can be found here.

The file is still available in Maverick's package.

Other than using older builds (discouraged) or building it from source, I suggest you to fill a bug against the pcre3 source package.


Conjure-up with Openstack NovaLXD installation doesnt work

I have come across similar challenge but with Parallels Desktop (similar in functionality to your virtual box) on my laptop. In my case problem existed with following setup:

Parallels Desktop running fresh install of ubuntu-16.04.3-server-amd64.iso, + conjure-up --classic
WiFi connection;
virtual network set as "Bridged Network (Default adapter)"

To resolve my problem I have changed network settings to "Shared Network" for this virtual and it works fine. In Virtual box I think this will be NAT or NAT network.
I am also planning on testing it with physical connection to see if i can replicate this behaviour.


You are accessing a terminal, which is 80x25 characters by default. This will not change. Different RDP software can resize fonts, but still will be 80x25 chars. It is not clear if you ar eusing VNC protocol to access the server, but most probably yes.

I will recommend to use putty (http://www.putty.org/) for Windows instead via ssh protocol, which allows you to display whatever size, font, fontsize, etc, of your server text screen. You will need to have port 22 open for that purpose and sshfs installed (usually is installed by default, but we dont know anything about your server).

if it is a server I would not recommend to install a windows manager on the server, it is pretty useless. If you want to manage a server in some clickable windows mode, it is good to install webmin (web-admin)

to install sshfs (if it is not present) enter following in command line of your server.

sudo apt-get install sshfs

To install webmin follow this (How to install webmin?) or this guide: (http://www.ubuntugeek.com/how-to-install-webmin-on-ubuntu-12-04-precise-server.html)


The File you are trying to run is too old, will run only on python2.6 which is not supported anymore.

You have following options

Try and get newer supported version
Use some old linux which uses python2.6
install python2.6 manually, recommended in Virtual machine.


You can just add it to your fstab file so it mounts hen you boot. You can just edit /etc/fstab as root and add it... Here is a quick guide to get you going.

Drop to a terminal prompt

Use blkid to get the uuid (you could just use /dev/sdX, but this is better because if you move stuff around, linux still knows what drive you mean)

Make your additions, ctrl-o (the letter) and hit enter to save, ctrl-x to exit

reboot or sudo mount -a to see changes.

sudo nano /etc/fstab and add the drive. here are examples...

UUID=my-uuid-goes-here /media/ntfs ntfs rw,nosuid,nodev,noatime,allow_other 0 0
UUID=my-home-drive-uuid-happens-to-go-here /home           ext4    defaults 0 2


What mean path to the icon in *.desktop file?

Current icon reference, com.visualstudio.code, only specifies the name of the icon. The system accordingly will look in default locations (~/.icons, ~/local/share/icons, /usr/share/pixmaps, icon folders of current icon themes, ...) for a graphics file with that name and the extension png or svg or xpm. Instead, you can also specify the full file path of a specific icon file to unambiguously define the icon, even if you change icon themes, as in (hypothetical example):
Icon=/home/user/.local/share/icons/com.visualstudio.code.png

You need to make sure the icon file is readable by all intended users if you specify a full file path.


Get Desktop Configuration File to run 2 programs when clicked

You can have a Exec line like this:

Exec=sh -c 'firefox & gnome-terminal -x irssi'


Ubuntu 18.04 strange sound volume behaviour on MSI GD63 7RD Stealth

Have you tried using pactl?
(I guess it's installed by default)
do this in terminal: pactl set-sink-volume 0 -50%


How to configure GRUB for triple boot: Ubuntu 12.10, Windows 7 and RHEL Server 6.3

title Ubuntu 12.10
  root (hd0,0)
         kernel /boot/vmlinuz-3.5.0-17-generic ro root=/dev/mapper/vg_ubuntu-lv_ub_root rhgb quiet
         initrd /boot/initrd.img-3.5.0-17-generic

Please try to add /boot behind the kernel and initrd. I had the same problem with SL 6.4 and Mint 13 and found out that my kernel name in grub.cfg had an error at the end in the kernel filename inside /boot.

Cheers.


This usually happens when there is a missing driver.

First, run the following commands to enable the Universe and Multiverse repositories:

sudo add-apt-repository multiverse
sudo add-apt-repository universe
sudo apt update

The Multiverse repository contains "non-free" software that is free to use but is not considered free because of licensing and restrictions.

Next, run the following to install the the hardware enablement stack and the Intel HD graphics drivers:

sudo apt-get install --reinstall --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04 i965-va-driver-shaders libvdpau-va-gl1 libva2 libva-dev libva-drm2 libva-glx2 libva-wayland2 libva-x11-2

Reboot to apply the changes.


It was a duplicate of this issue: Keyboard misbehaviour with Firefox / Javascript after upgrade to 16.04

Just like DS Justice, I didn't find an actual solution, but deleting ~/.config worked for me as well.

EDIT: The issue came back on the next day. Can somebody find a true fix?


How to reset my password without rebooting?

You can if you:

know a root password, do su - and enter root password.

But authenticating directly as the root account is disabled by default (and unsupported, though possible) in Ubuntu, so you may not be able to do this.
have sudo access without password, do sudo passwd youruser.
can log in to another administrative account, and then use sudo in that account to change the password for your first account.
can perform actions with PolicyKit (e.g., via psexec) without entering your password. This is very unlikely, but it's easy to try. Try psexec passwd youruser.

Basically you need to get root access somehow.

If you have access to VM console you have root permissions there (e.g. for XEN: xm console vm-name).

Theoretically at least, you could make a copy of the VM, mount the drive of the (non-running) copy, dump the password hashes from /etc/shadow, and crack them, to discover your password. If you remember some things about your password, then a good password cracking program (which tend to be proprietary payware) should be able to use that information to avoid checking for passwords that can't be it.

But unless your password is really simple, or you know a lot about it and are experienced dumping and cracking password hashes, and also unless the need to avoid downtime is extreme, you should not attempt something like this. (In fact, I mainly bring it up for completeness, so you can see that the reasonable options really have been exhausted.) Instead, if you cannot become root in the VM and you cannot use the VM console, you should just reboot the VM, boot into recovery mode, and reset the password.


Sound only comes in headphones doesn't come out of the speakers on a HP Pavilion dv6 1280us


How to get rid of light desktop manager entry in Ubuntu greeter

Is a bug though some users report it's stopped thru some post release updates
(I can still recreate as orig. described

Report here, if still affected then there is a workaround or 2 in the comments

https://bugs.launchpad.net/ubuntu/+source/unity-greeter/+bug/1235785


Why I can't change my password in ubuntu?

It might be because you filesystem is mounted with read-write permissions(are you in Recovery mode?).

To mount your filesystem in read-write mode, in the terminal type:

sudo mount -o rw,remount /

and then change your password using passwd <username>.


In a command prompt run:

lsb_release -a

That will let you know what version you have installed.
If in doubt, you can always fix an incomplete upgrade with:

sudo apt-get update
sudo apt-get dist-upgrade

If while that is running you get errors, then you can run:

sudo apt-get install -f

then repeat

sudo apt-get dist-upgrade
sudo apt-get upgrade

That should fix any broken 13.10 packages that did not upgrade properly to 14.04


Missing fonts for photoshop cs6 on Ubuntu 14.04LTS

You have to manually search for the missing fonts using in your PSD file in the internet and then install them in your Ubuntu system.

To install fonts, just drop them into the hidden folder .fonts in your home folder or double click on font files one by one and click Install Font button.


You have to edit /etc/grub.d/40_custom file by:

sudo -H gedit /etc/grub.d/40_custom

add an entry like:

menuentry 'Windows 7′ {
set root='(hd0,msdos2)’
chainloader +1
}

Since you have two drives, you should also modify the location of Windows in the above script accordingly.

After that run:

sudo update-grub


Well, I fixed that by installing "libgnomeui-0" on fresh Ubuntu 15.10.

Now I have

Gtk-Message: Failed to load module "canberra-gtk-module"


What is the easiest way to host a CD-ROM drive or ISO through a network (for booting/install)

The thing you are looking for it called setup PXE Install server. It allows you to mount .iso and allows you to setup network installation on your network. Check out this documentation.


$ dkms status

bbswitch, 0.8, 4.4.0-142-generic, x86_64: installed
bbswitch, 0.8, 4.4.0-145-generic, x86_64: installed
nvidia-410, 410.48, 4.4.0-142-generic, x86_64: installed

This shows us that the nvidia-410 dkms driver did not build on kernel 4.4.0-145-generic. There should be a 4th line that looks like:

nvidia-410, 410.48, 4.4.0-145-generic, x86_64: installed

Who knows why it didn't build on the -145 kernel... there IS a dkms.conf file there.

Cuda 10.0 can be downloaded from here. Installation document is here.

Download the Cuda package and reinstall it. Then do a dkms status command and verify that it shows the 4th line, as I show above.

Note: if you'd like a newer version of the Nvidia driver, the latest version is 418.56. I can't say if it's compatible with Cuda 10.0.

Note: if there's a bug in the Cuda/Nvidia software package(s), you may have to do this every time the kernel is updated :-(

Update #1:

Recent updates have caused the Nvidia video driver 410 not to build on the current kernel.

Cuda 10.0 installs Nvidia video driver 410.

Cuda 10.1 gets installed with Nvidia video driver 418.

Cuda 10.1 has problems with tensorflow.

User needs Cuda 10.0 with a working Nvidia video driver.

User is requesting further help from Nvidia.

Update #2:

Try this...

Remove Cuda 10.1 and video driver 418.

Reinstall Cuda 10.0 and video driver 410.

This will put you back to the beginning status.

Let's try and build the 410 driver manually...

sudo dkms build nvidia-410/410.48 # the build may fail, but give us a reason

sudo dkms install nvidia-410/410.48 # run if the build is clean

dkms status # verify 410 installation on current kernel

Update #3:

It turned out that installing either Cuda 10.0/10.1 did not automatically install Nvidia video drivers, and visa-versa.

Final solution was for the user to manually install the required Cuda 10.0, and manually install the latest Nvidia video driver 418.56, and it's all working again.


I think this might help.  You can set default password expiry using the file /etc/login.defs.

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

sudo nano /etc/login.defs

For example, you can setup values as shown below:

PASS_MAX_DAYS 30
PASS_MIN_DAYS 1
PASS_WARN_AGE 7

Once done, just close and save the file.

For more info see login.defs manpage.


Create watermark libreoffice writer 5.3.3.2

This short video should be helpful
https://www.youtube.com/watch?v=VXdxK9JCW6Q

You need to have an image as a watermark (white image with "Draft" written in light gray on it, for example)

You can download some images  with Draft, Urgent, and so written in it,
here > http://www.apertura.co.nz/libreofficewatermarks

EDIT: I just upgraded to the Version: 5.4.x.x of LibreOffice,
So now, You just need to go to > Format > Watermark, then a window open where you input the text you want for your watermark and choose the color of the watermark (which is a lot faster and easier)


Put the instillation disc  in your computer, you can get an image from http/www.ubuntu.com/download when the disc loads select install, the select erase disk and install Ubuntu and you will be guided though the rest


repair system after deliting extended partition

Solution credits to emk2203 :

To solve the problem the first thing is to recover the delited partition.
In order to do so is useful to use a program like TestDisk following the instructions here and summarised there and then make your partition one of the bootable options of grub.

Recover partition with TestDisk

After TestDisk is installed run it as superuser (sudo ./ followed by the directory to the executable file of TestDisk) and choose the "log creation" choice you prefer using ↑ and ↓ and proceed with Enter.

With ↑ and ↓ choose the disk where the partition was and with →, ← and Enter select proceed.

With the same controls used since now choose the "partition table".
If you don't know which partition is the correct one notice that probably TastDisk have detected it and if so you will see it written below.

Now select analyse...

And then run a Quick search...

At the end of the quick search you should notice your lost partition be added to the partition list and therefore you can naw press Enter to continue.
If the partition you was looking for is still missing press Enter anyway but pay attention to the next step.

Now if the missing partition is listed to restore it select the write option. If instead you still don't see it go for a deeper search and then go back to step 6.

The partition he's been successfully restored but to be sure that grub recognize it as a bootable option follow the second part of this answer.

Reconfigure grub with boot-repair

To install boot repair you just need to add the repository and install it with apt like for most programs.

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

Now you can lounch it typing the boot-repair command and with the GUI select  recommended repair

Then after a pop-up asking information about the log handling it will almost certainly automatically configure grub to boot on your partition again.


In the terminal exist a number of tools to do a preliminary diagnosis:

Before mentioning some of the tools remember that adding --help to any of the commands will normally throw you some help for the command. For example dmesg --help. Why do I mention this, because most of the time this will give you very good information about how to use the command, make it more verbose or simple or how to output some info. The --help parameter is one of 3 that can show you information about a command. The other 2 are info and man. For example man dmesg or info dmesg. This 2 show more info about a command. In the order of --help showing you less help and man showing you the most.

The following list is a small list of commands I use to check problems:

dmesg - Shows Boot Up Message and other Kernel related messages like device connections (When you plug in a new device eg: external hard drives, webcams, bluetooth devices...). Type dmesg in console and it will show you how the system booted up. If you have hard drive problems or any other booting problem they might show here.

lshw - It shows you the Hardware List for all devices connected and in the PC.

lsusb - It shows you all USB devices connected.

lscpu - Shows you basic CPU information.

lspci - Shows you all PCI devices (Video Card, Sound Card, Capture Card...)

lsb_release -a - Shows you the Ubuntu Version, Codename, Release..

lspcmcia - Shows you all pcmcia devices connected to the PC.

lshal - Shows you all devices registered with HAL. If the device uses HAL it will appear.

lsmod - Shows you all modules loaded with the kernel

modprobe - Adds or Removes modules to and from the kernel.

lsblk - Shows you all block devices. In normal language it means it shows you a nice little list of how you partitioned you hard drives, size of each partition, where it is mounted, etc...

fsck - Used to fix several filesystem errors. DO NOT USE IT ON A MOUNTED PARTITION!. This is similar to chkdsk on Windows but with steroids.

X(Capital letter X) - The X system. If you have xorg.conf problems you can do X --configure to create a new xorg.conf and X -config XORGFILE to test a xorg.conf (XORGFILE is the path and name of the xorg.conf file). X also does many MANY things.

xrandr - To change, check and do custom changes to the resolution.

dmidecode - Shows memory specific information. Needs sudo to run.

add-apt-repository / apt-add-repository - Used to add PPAs. For example add-apt-repository ppa:ubuntu-wine/ppa. saves from having to add it manually and then add the key for it.

apt-get - Default installer for packages in Ubuntu. Example: apt-get install wine1.3

aptitude - Excellent installer for packages in Ubuntu. Example: aptitude install wine1.3. Includes search options, cleaning and other in one single command. This are also included in the apt packages but divided in several commands.

alsamixer - Sound mixer in console. This solves some sound problems related to microphone not working, sound not very loud...

dpkg - Official package manager for debian based packages.

df - shows free space and used space for each partition/mounted device.

glxinfo - Used to show OpenGL information about the video card. Needs to install the mesa-util package to use it.

glxheads - Used to show basic OpenGL video card information. Video card name, OpenGL version and Vendor.

hdparm - Used to check and perform several actions/tests/checks in regard to hard drives.

netstat - Shows you network connections, routing...

nano / pico - My best friend. Edit files in the terminal. I know..I know. vi or vim. But it has a very weird learning curve and I want something "user friendly" and not "hacker angry". It is true there are many things you can do with vi but it is easier to learn nano or pico than to learn vi. I will actually learn vi before the end of the year.. it is on my wish/work list.

ntfsfix - Fixes some ntfs partition problems.

wineserver - Manages wine apps. If you add the parameter -k like so wineserver -k it will close/kill any wine app opened. This will solve wine app problems that stay opened without closing or having some hanging problems.

testdisk - Recovers deleted partitions.

photorec - Recovers multiple files deleted overtime. Has a very good recovery percent.

foremost - Recovers multiple file deleted overtime. Has a better recovery than photorec in several formats but since it has not been updated since 2007 photorec with the work done in it has much of it surpassed it. Version 6.13 Beta is many times better. Although I still use both just in case.

parted - Partition manipulation software. Nice one.

fdisk - Similar to parted. Very good also.

ssh - Remote control protocol. Without this about 90% of all remote assistance for me would be gone.

kill - Kills a specific process using its ID. Add the parameter -9 to it to kill it with a machine gun filled with velociraptors holding scissors with bullets. Example: kill -9 12345

killall - Similar to kill but using the process name. Example: killall lightdm. You can also use the -9 parameter but using it with the ID as in the kill command.

top - Shows you all process active, zombies and whatnot. Real time check.

ps - Shows to a list of runnin process. Not in real time as in top. Add the paramater -ex to it to see a better list of the process with name, locations, parent ID... . Example: ps -ex


How can I create a shorcut of my snapshot of my virtual machine in VirtualBox with Ubuntu?

Right-click on the machine, choose a shortcut on the desktop - that puts it in your desktop folder, which you can then move wherever. It's a *.desktop file, so you can check its properties in order to copy the command if you want to use that to make a menu entry.

If what you want is a shortcut to a previous snapshot, but not the current state, without messing up the current state, you'll need to clone the machine (again from the right-click menu). Then restore the snapshot on the original, with the current state preserved in the clone.


JREs from different vendors on the same system

You can install multiple JRE/JDK at a time. You just need to configure which one to use by using update-alternatives

sudo update-alternatives --config java

There are 2 choices for the alternative java (providing /usr/bin/java).

Selection    Path                                            Priority   Status

0            /usr/lib/jvm/java-6-openjdk/jre/bin/java         1061      auto mode

1            /usr/lib/jvm/java-6-openjdk/jre/bin/java         1061      manual mode

* 2            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1051      manual mode

Press enter to keep the current choice[*], or type selection number: 1

Similarly, you can configure your JDK with

sudo update-alternatives --config javac


Capacity of pen drive shown is less than the actual

These instructions worked for me to reformat an 8GB USB flash drive that was made useless after I used dd to write a bootable iso file to the flash drive. I reformatted the flash drive to its original FAT32 format as follows:

Remove all of your USB devices except for the 8GB USB flash drive that you want to reformat, so you won't get confused about the device name of the USB flash drive later on.

List all the partitions.
 sudo fdisk -l

Search the results of the command for output that looks like this:
 Disk /dev/sdc: 7864 MB, 7864320000 bytes
 30 heads, 33 sectors/track, 15515 cylinders, total 15360000 sectors
 Units = sectors of 1 * 512 = 512 bytes
 Sector size (logical/physical): 512 bytes / 512 bytes
 I/O size (minimum/optimal): 512 bytes / 512 bytes
 Disk identifier: 0x00016288

    Device Boot      Start         End      Blocks   Id  System
 /dev/sdc1   *        2048    15359999     7678976    b  W95 FAT32

If you see something like 7864 MB (8GB) in the output (see the example output above), then that is your 8GB USB flash drive. In this example it is called /dev/sdc. Now open the Disks application from the Dash and check again to make sure that the device name of your 8GB flash drive is the same as what you got from running the command: sudo fdisk -l.

Create a partition table on the disk of type msdos, sometimes known as Master Boot Record (MBR).
 sudo parted /dev/sdc mklabel msdos

In this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. I can't stress strongly enough how important it is to verify the device name before running this step!
Warning: If you type the wrong device name you may overwrite your operating system or another one of your partitions containing important personal files!!! So be careful and check the device name a second time. Open the Disks application and check the device name of your 8GB USB flash drive in Disks. It should be the same device name!!! Now check again! You don't want to accidentally type the wrong device name!

Add an empty "primary" partition, which will hold a FAT filesystem later.
 sudo parted -a none /dev/sdc mkpart primary fat32 0 8192

Once again in this example I used /dev/sdc for the name of the device which is what was found in the results of step 2. The command specifies the start point (from 0 MB) to the end point (8192 MB). If the 8GB USB flash drive does not have the full 8192 MB space, parted will adjust it automatically. If the terminal returns a message that the start point can't start at 0 MB and you have to use some other small number close to 0 MB, type Y to accept this. Note the command is creating a single, primary partition on the whole disk.
This newly created partition will have the ID /dev/sdc1. That is because the device name in this example is /dev/sdc and the 1 at the end is because it is the first partition on that device.

Create a FAT filesystem on the /dev/sdc1 partition by formatting the partition.
 mkfs.vfat -n "8GB-USB" /dev/sdc1

/dev/sdc1 is the partition ID from step 4. "8GB-USB" is the partition label, which can be your own choice of label, just enclose the label inside two double quote characters.

You now have a ready-to-use reformatted USB flash drive with an 8GB FAT partition.


Windows 7 corrupts Ubuntu partition everytime I reboot

Microsoft Windows, by default, does not recognize other file systems. It would be impossible for Windows alone to cause the error.

However, you installed ext2fsd, a tool to enable read/write in EXT partitions from Windows. This software often runs as a service and mounts partitions at boot, hence accessing Ubuntu partitions.

ext2fsd may not be fully compatible with newer EXT4 file systems or have other issues or Ubuntu may have been installed with partitions settings the Windows tool can't understand, either way resulting in the "invalid superblock checksum" error.

The solution is uninstall ext2fsd.


Can I set up MAAS and Juju on one machine?

With this configuration You can do it:

1) Install MAAS on 1 VM

2) Add 3 VMs as node to MAAS

3) Install Juju on one of nodes

4) You have 2 node available for install Charm

5) you can define the machine number for deploying charms by adding --to 'Machine Number' to your command.

I hope this helps you!


Why aren't icon shown in xfce4-panel menu items when loaded into Unity?

Probably those icons are related to something in notification area.
In Unity notification area is already handled by another indicator, and the one in xfce4-panel (or whatever else) would conflict. That's why the second loaded notification area will always fizzle.


Have some patience. It eventually will go over.
Tracker is an indexing system. It searches all files for words, which are included in a database so you can quickly find files containing specific words.
The first time, tracker needs to index all files. On subsequent times, only changed and new files are also included in the index. It is typical for Tracker to require some minutes of high processor activity to check the file system for changed files and update the index.
‣ If, despite your patience, tracker keeps using high cpu, then there may be an issue with the database. In that case, clearing the database and having tracker reconstruct it may help:
tracker reset --hard ; tracker daemon --start

Beware, all files need reindexing, so there will be some processor useage for a while.
‣ It may be that you have a folder with frequently changing content, e.g. a Downloads folder. You can selectively disabling tracking a folder by placing a hidden file .trackerignore in the folder, or disable searching the folder in the Settings - Search dialog (button "Search locations:" in Ubuntu 20.04, gear wheel in older versions).
‣ If Tracker overall annoys you, you can disable it completely. File name based search in nautilus will still work (and be quite a bit faster).


How to enable confirmation dialog on files delete in Ubuntu 18.04?

Short answer You cannot enable such confirmation dialog in Files aka nautilus. It is not (anymore) available.

Long answer A confirmation dialog that appears when you delete a file to the trash is not (anymore) available in Files, aka nautilus. The idea is likely that this dialog is not essential, because a normal delete-to-trash operation is reversible. Thus, an accidental delete is easily undone.

Currently, when deleting to the trash, an "undo" pop up appears. 1) This already warns/reminds the users that he/she has deleted a file, so deleting a file does not go unnoticed. 2) That pop-up allows to undo the operation. 3) Next to that dialog, hitting Ctrl+z also allows to undo the delete. 4) Finally, the file can be restored at any time from the trash, as long as that trash has not been purged by the user.

With all these fallbacks, developers probably did not feel the need to still have a warning dialog. The warning dialog has been retained only for irreversible actions, i.e., when permanently deleting (i.e. bypassing the trash by pressing Shift+Del) or when purging the trash.


Is it safe to automatically install security updates?

Some latest "updates" show that it is not safe.

You can get:

kernel panic - see example 1 or  example 2
broken USB 3.0
broken console login
broken VirtualBox

So I considered to install updates on my machines manually after reading some feedback about latest updates.
You can always disable unattended-upgrades to make Ubuntu act as Ubuntu and not Window$ 10.
Do it only if you are sure.


What exactly do you mean by "importing" with respect to nautilus? Are you talking about downloading photos from a camera to your harddrive? Anything else would just be moving the pics to another location.

As for the bulk renaming, you might achieve some limited tasks using bash (eg. with the for ...; do ...; done command).


From See https://help.ubuntu.com/community/EncryptedFilesystemsViaUbiquity -

The Desktop CD installer (ubiquity) currently does not provide support for setting up LVM or encrypted partitions. With the recipe below, the Desktop CD can be used to install Ubuntu on a previously created (optionally encrypted) LVM.

Boot desktop CD, open terminal, and install missing packages:

apt-get install cryptsetup lvm2
sudo modprobe dm-crypt

Now set up the LVM and crypto partitions with the command line tools. If you already have Ubuntu installed on a standard LVM-on-LUKS, this is as easy as:

sudo cryptsetup luksOpen /dev/sda4 sda4_crypt

or whichever partition is the encrypted LVM PV. This should automatically create the LVM LVs in /dev/mapper/.

Start ubiquity with manual partitioning, and use the existing partitions; keep /home etc. as they are, and reformat the root partition in the LVM. Do not reboot immediately, your system will not boot!

Mount the newly installed target system:

sudo mount /dev/mapper/ubuntu*-root /mnt
sudo chroot /mnt mount /proc
sudo mount --bind /dev /mnt/dev
sudo chroot /mnt mount /boot

Create an appropriate crypttab:

echo "sda4_crypt UUID=`sudo blkid -s UUID -o value /dev/sda4` none luks" | sudo tee -a /mnt/etc/crypttab

Reboot


You absolutely can use only one script instead of 3. For that, you could just pass arguments from the command line. In every bash scripts and functions, some variables called positional parameters are automatically generated. At the beginning of your script (i.e. when no other command has been executed yet), you will have :

$0 : the name of the script
$1 : the 1st argument passed
$2 : the 2nd argument ...

Note that those arguments are affected by your IFS & your quotation, so john doe will count as 2 arguments whereas "john doe" will count as one. You can read more about it here

Once you've read the arguments, you will also have to ensure that the user really exists (i.e. you didn't call your script with a typo). To do that, you could use the following code snippet :

#!/bin/bash
user_name="$1"

#here, id returns 'true' if the user exists, else 'false'
#>/dev/null 2>&1 hides the output of the id command
if id -u "$user_name" >/dev/null 2>&1; then
    sudo passwd -l "$user_name"
    sudo pkill -u "$user_name"
    echo "Account locked and logged off! Screaming in 3....2....1..."
else
    echo "Error: user $user_name does not exist"
fi

You can now simply call your script like this : ./myscript amber or ./myscript john


Exporting LD_LIBRARY_PATH that contains spaces and special characters

You are supposed to export the variable, not its value.

I.e.

export LD_LIBRARY_PATH

not

export "$LD_LIBRARY_PATH"

Edit (example):

$ LD_LIBRARY_PATH='/usr/share/My Company, Inc/ProductName'
$ export LD_LIBRARY_PATH
$ env | grep LD_
LD_LIBRARY_PATH=/usr/share/My Company, Inc/ProductName
$


Can Ubuntu server connect to a WPA2 encrypted wireless network?

Note: First off you will want to make sure that the server has wpa_supplicant installed. Servers don't always have it and that can make it difficult if you can't connect it to Ethernet at least once.

This is how I do it. (be sure to use your ip numbers and network interface name)

Wont need this part for a server it is just if you wanted to kill off everything that would be interfering on a desktop.

sudo stop network-manager
sudo killall wpa_supplicant #must stop network-manager before this as it resurrects it.
sudo killall nm-applet

this only needs to be done once unless the file gets trashed. (you can put the config anywhere really)

wpa_passphrase "YOUR_ESSID" | sudo tee /etc/wpa_supplicant.conf #and type your password

-B for background -s to log to syslog -c to tell it where the config is. -i interface

sudo wpa_supplicant -B -s -c /etc/wpa_supplicant.conf -i wlan0

for DHCP just use

sudo dhclient wlan0

for static ip

sudo ifconfig wlan0 192.168.1.12 #Be sure to set you ip to what works for you.

should be able to ping your router by ip. $ ping 192.168.1.1

sudo route add default gw 192.168.1.1 # use the ip of you router

should be able to ping the net at large. $ ping 8.8.8.8

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf

should be done. $ ping google.com

This will not last through a reboot. To make this persist through a reboot,

sudo nano /etc/network/interfaces

Add this to the bottom (substitute for wlan0 if you have a different interface):

auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -B -c /etc/wpa_supplicant.conf
post-down killall -q wpa_supplicant

Note that you might not have the KILLALL component installed if you have a minimal  server. You can get killall with:

aptitude install psmisc


How to remove decimal date from a text file?


How to drag widgets from monitor to monitor in kubuntu?

I have a work around. Make an empty panel. Put the widgets in it. Then you can move the panel to the bottom screen.


Unity 2D is designed for old chipsets such as the 845 and 855 intel series.

Your issues are most probably due to buggy old drivers together with Compiz incompatibilities.

Suggest boot into recovery mode - with network support.  Then install unity-2D

How do I install and switch to the Unity 2D desktop?

I have found with my i855 laptop that I need to boot with an extra grub parameter otherwise I get a similar login screwed up display -

can I suggest that you also see if either grub string i915.modeset=0 or i915.modeset=1 works for your PC.  Follow my answer here on how to add it to grub - instructions also include how to fix in grub permanently.

As an alternative to Unity-2D, you could try a light-weight distribution such as Lubuntu (or possibly Xubuntu) which should work much better with very old graphics chipsets such as the i8xx chipsets.


Conflicting libraries in /usr/local/lib and /usr/lib/x86_64-linux-gnu

Not sure if this is the best fix, but I just added:

-L/usr/local/lib/

to my linker flags (right after I included the libraries for opencv per https://stackoverflow.com/a/15975490/229311) and it effectively got rid of the error.


Does canceling copying files process leave partially copied/uncopied files?

I have found that a cancelled (^C) copy can leave the last file partially copied (but not always), so I've got in the habit of checking/erasing the last copied (IF it was in the process of an actual copy at the moment I ^C).

As I cp -p  (ie. preserve time/date/attributes) ; the date/time will be the moment of copy instead of preserved - a clue that makes such files easy to find & erase too if you forget immediately (using find).

This may depend on file-system used, as well as local files or network (nfs)


Does the package nautilus-extension-gnome-terminal provide what you want?

Method of determining the new package (in case it's of interest)

I'm still on Xenial, which made some things easier, some harder.

First, try to determine what specific file (i.e. script, linked library or the like) is responsible for the feature on Xenial. The name of the file is likely to contain terminal so search for that:

locate terminal | less

and within less search for nautilus, as a first guess (if I were more confident I'd have just used grep).

/usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so seems the most likely candidate, as it's correctly located (within the nautilus/extensions-3.0 hierarchy) and reasonably named.

Check what package provides it:

dpkg -S /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so

It seems that it's provided by the package gnome-terminal itself (which matches what I remember — I didn't have to install any special packages).

The online list of files provided by the gnome-terminal package corroborates this:

https://packages.ubuntu.com/xenial/amd64/gnome-terminal/filelist

Unfortunately, /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so is no longer provided by gnome-terminal in bionic:

https://packages.ubuntu.com/bionic/amd64/gnome-terminal/filelist

If I had access to a machine running bionic (or could be bothered fiddling with the options for apt-file to use an alternative sources.list, I'd have used:

apt-file search /usr/lib/nautilus/extensions-3.0/libterminal-nautilus.so

to find the package providing the file.

As it is, I just used the online interface at packages.ubuntu.com.

To check, nautilus-extension-gnome-terminal does provide the needed file on bionic.


Ubuntu not installing/problems with trying ubuntu 16.04

Ok, well sorry, but I was able to install (new distro) without any problems. I still believe that to be a bug of some sort with the new 16.06 installation CD.

Thanks anyway!


How do you create new users with passwords and set their permissions in SSH?

The root is admin
If you are talking about Ubuntu , then you need not to worry , the files in your home folder cannot be accessed by anyone else . You can create a new user by the command

useradd <username>

You can set password for the user using the command

Passwd <username>

Then enter the password.

By default, users have minimum permission, and can access nothing but  their own files , unless given root priviledge.
Hope this helps


How do I install a driver for a Broadcom BCM43142?

Run in terminal

sudo apt-get install bcmwl-kernel-source

it will download and install wl driver. It should work.


Re-enable hibernate

su
cd /var/lib/polkit-1/localauthority/50-local.d/
gedit com.ubuntu.enable-hibernate.pkla
Copy and paste below lines into the file and save it.

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate
ResultActive=yes

Hibernate your laptop when lid is closed:

su
sudo gedit /etc/systemd/logind.conf
In /etc/systemd/logind.conf look for HandleLidSwitch=suspend and change it to HandleLidSwitch=hibernate and save the file.
Restart your computer to apply changes or run sudo restart systemd-logind


Installing Apache Cordova, unable to locate package

Not really sure why this worked, but...
Followed the tutorial here, installed Cordova with NodeJS. Can successfully build to Ubuntu now.

  Install NodeJS:

sudo apt-get install nodejs

  If that doesn’t work, try using a PPA:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

  Then install NPM:

sudo apt-get install npm

  Cordova uses Git in the background to download assets when creating a
  new project, so:

sudo apt-get install git

  Finally, install Apache Cordova using NPM:

  sudo npm install -g cordova


Ubuntu 13.10 and 14.04

To avoid being asked for webapp integration you can use the following command, open a Terminal (Ctrl+Alt+t) and type:

gsettings set com.canonical.unity.webapps integration-allowed false

Tested on both releases with Firefox/Chromium + Launchpad, Facebook and Youtube. No popup asking for a webapp integration.

Removing existing webapps

We can't just remove all packages beginning with unity-webapps- as some of them are runtime dependencies of Unity or other packages (like the Ubuntu SDK which requires unity-webapps-qml)

A safe way is to remove such installed packages not belonging to the gnome section:

sudo apt-get remove $(dpkg-query -W -f='${db:Status-Abbrev} ${binary:Package} ${Section}\n' unity-webapps-* | awk '{if ($1 == "ii" && $3 != "gnome") {print $2}}')


This kind of problem is probably not a problem with Ubuntu, rather with the router. Because this is a problem with the router, I would check out your router's User Manual, as there are setup instructions in there. If D-Link didn't include a print copy of the User Manual with your Router, here's a link to it:

I assume that you can view the PDF in some way, because you have to be connected to the internet to post to AskUbuntu.

You will have to reset your router before proceeding with the initial setup instructions in the manual. If you can not find a reset button in your router's configuration tool, there should be a reset button on the router.

Off-topic, but why are you still using Ubuntu 11.10? If you want to minimalize system upgrades, you can go to Ubuntu 14.04 LTS, or you can stay at Ubuntu 12.04 LTS and still be fine for a while.


Keys malfunctioning - ctrl and shift seem to be pressed when they aren't, or don't work when pressed

I've the same problem on HP Pavilion 15 ab062nl.
CPU AMD A10 8700p, GPU radeon r6 + radeon r7 m360, RAM: 8GB DDR3.

Try pressing only Left_SHIFT Key. On my notebook this fixes the problem for a while

problem with SHIFT, CTRL and ALT button with integrated keyboard

I've also opened a bug on launchpad

You can add yourself as affected or create a new bug if you think yours is different.

In my opinion it's a problem of compatibility with these HP Keyboards.


How to edit grub.cfg file for Ubuntu installation moved to another drive?

Use
hd0,5

Also,
hd0,gpt5

should be equivalent.

hd0 represents your disk, nvme0n1
5 or gpt5 represents your fifth partition on this disk


Clickable file that adds code in terminal and runs it automatically?

From the commands you have provided, it is clear that you are trying to load two modules into the kernel in the runtime after just starting your computer.

This can be done easily by the /etc/modules file. This file is the designated place to put the modules that will be loaded into the kernel upon system boot every time.

In your case, to load the mentioned two modules use the following command:

printf "mt7630e\nmt76xx" | sudo tee -a /etc/modules


How can I make the fan in my computer turn off when it's suspended?

I had the same problem, and solved it by going to BIOS into "Power Management Setup" set "ACPI Suspend Type" to "S3 (STR)".

STR stands for "Suspend to RAM", screenshot and more in here


Software Updater shows one more empty update at the end

duplicate of Invisible updates
there is also a bug-report on launchpad
you can run

sudo apt upgrade

from a shell to see what packages will be installed and continue from there


You have two options:

Install ubuntu directly on the usb (like you do on your computer hard drive). The problem here is that if you run the system on different hardware machines, problems with drivers could appear.
Create a persistent space in your usb and launch ubuntu in live version (as you did yet). With UnetBootin is easy to create a persistent space (with the size you want) at the moment that you create the Live USB. There are other ways of doing that but for me this is the easiest


Wildcards with reserved characters (*,?,+)

In basic regular expression (BRE) syntax a + is treated literally, and to get the special meaning of one-or-more it needs to be escaped:

sed 's/+\+/+/g'

Conversely, in extended regular expression (ERE) syntax, + is a quantifier by default, and \+ restores the literal meaning:

sed -E 's/\++/+/g'

You can avoid some confusion by using the POSIX quantifier \{1,\} (BRE) or {1,} (ERE):

sed 's/+\{1,\}/+/g'

sed -E 's/\+{1,}/+/g'


How to know how dejadup calls duplicity?

Set DEJA_DUP_DEBUG=1 like so on the command line:

DEJA_DUP_DEBUG=1 deja-dup --backup


Downloaded images failed checksum validation for ubuntu for nexus7

Julio,

We had some caching problems with the checksums that should be resolved now by a new version of the installer and some server-side changes.  It's possible that's what you were hitting.  Please update your copy of the installer and try again.  It's also possible that my old answer, below, still applies:

It sounds like the download is failing. Can you go into your Downloads/UbuntuNexus7 directory see what files are there? You should have rootfs.img, boot.img and a checksum.
Those are about 700M worth of files and so perhaps your download is timing out before they finish?

The next thing to try is simply deleting everything in Downloads/UbuntuNexus7 and try again. If that still doesn't work we can investigate alternatives.


To use PyQt with Python 2.6 on Ubuntu 12.10, you will need to rebuild a custom PyQt against Python 2.6, as it is a compiled module, and not written in Python.

To use Opticks with the Python extension for it, on newer versions of Ubuntu, it will need to be ported to 2.7 upstream, and built against 2.7; include it's own version of everything required, or you'll have to build all the dependencies that are needed, yourself. Their Python extension seems to only work with Python 2.4, 2.5, or 2.6.

If you don't wish to compile everything yourself, you'll need to get support from the Opticks developers or community.


Boot problems in ubuntu 17.10 after I upgraded it from 14.04

After weeks of R & D, I found a solution,
I updated linux kernel, previously it was 4.13 now its 4.15.
You can download latest kernel from the following link,

http://kernel.ubuntu.com/~kernel-ppa/mainline/

After downloading all the .deb files you can install it using,

sudo dpkg -i *.deb


Browse folders and files using the Places menu

You can try two options:

install and switch to the GNOME FlashBack session with sudo apt-get install gnome-session-flashback gnome-panel.
install and switch to the MATE DE with sudo apt-get install ubuntu-mate-desktop^.


it's totally fine that you are new to UBUNTU...

You do know about "Software Center" in UBUNTU....

Go here : SynapticHowto. This article has all answers you needed.

More over to do it totally using Terminal:  AptGet/Howto

I hope this will help you alot.


The recommendations of your mysql tuner are making the assumption that this is a dedicated mysql server, and that that the server isn't also handling webapps.

You have innodb_buffer_pool_size=10G which means that MYSQL will always try and use 10GB of memory if it can, in order to maximize its performance.

If you need more memory for other programs on the server to use, you should reduce the innodb_buffer_pool_size, and set it to a lower amount of memory. However keep in mind that this could severely harm the performance of your database.

It's worth mentioning that in production environments, it's generally considered best practice to have the database and the web app programs running on separate servers.


The best client for your purposes would be RabbitVCS, a great Version Control System  (VCS) utility that has a more than decent package in the Ubuntu Repositories. To install the complete package use the following from  Terminal window:

sudo apt-get install rabbitvcs-cli rabbitvcs-core rabbitvcs-gedit rabbitvcs-nautilus

The Nautilus interface gives graphical access to git and hg repositories as well as the svn access you were after. Don't want see hg and git? See the ingenious solution here...

Snapshot below shows RabbitVCS working with the MPlayer svn repository:

I would recommend also having a look at the remote repository browser available from within the Nautilus screen that works well without a local repository loaded. Again showing the MPlayer svn repository, this time with the remote repository browser:

References:

RabbitVCS Home Page
Ask Ubuntu: Show only svn in RabbitVCS context menu


Is there a way to check if a specific snap is running (from the CLI)?

Try sudo snap info "name of snap" it should give the details of the snap and the services it's running.


How do I check if a package is available for install?

apt-cache search <name>

Will give you a list of available packages matching the name.


The cool thing with the ubuntu installer is this (Btw, this is from 12.04, but it's the same concept)
-

When you install Ubuntu, you can choose to use it apart from Windows (or other operating systems) when you start your computer, and it won't be removed.
Please note that the picture above describes the situation when Windows 7 is installed. This screen may change depending on which OS and system (partitions and harddrives) you've got.
You will still be able to browse files on your old OS's (such as pictures and documents) while using Ubuntu installed alongside with other operating systems.


Alt-tab switching workspaces if Chrome is in focus

Assuming the problem is really some Chrome window setting a window manager flag _NET_WM_STATE_DEMANDS_ATTENTION and your window manager failing to focus correct window, you could run a script such as following to figure out the problem:

#!/bin/bash
# Copyright 2020 Mikko Rantalainen <mikko.rantalainen@iki.fi>
# License: MIT
set -e

# check 'wmctrl' has been installed
wmctrl --version > /dev/null || { echo "This script requires command 'wmctrl', aborting." 1>&2; exit 1; }

# save active window id
ACTIVE_ID=$(xprop -root | grep _NET_ACTIVE_WINDOW\(WINDOW\) | sed 's/.*window id # //')

wmctrl -l | while read id desktop machine title
do
    if xprop -id "$id" | grep -q "_NET_WM_STATE_DEMANDS_ATTENTION"
    then
        printf "\nWindow id %s (%s) on desktop #%s demands attention:\n" "$id" "$machine" "$desktop"
        #xprop -id "$id" | grep -E '(WM_CLASS|^WM_NAME.*UTF8)'
        printf -- "- %s\n" "$title"
        if test "$1" = "--clear"
        then
        wmctrl -i -a "$id"
        sleep 1
        fi
    fi
done

if test "$1" = "--clear"
then
    wmctrl -i -a "$ACTIVE_ID"
else
    echo ""
    echo "Pass flag '--clear' to focus each window demanding attention" 1>&2
    echo "for 1 seconds to clear the demands attention flag" 1>&2
fi

Save the file e.g. as ~/bin/list-window-demands-attention and you can run it in terminal:

$ list-window-demands-attention

Window id 0x0320005e (desktop) on desktop #2 demands attention:
- linux - How to check actual RAM usage of tmpfs? - Unix & Linux Stack Exchange - Google Chrome

Window id 0x03200079 (desktop) on desktop #2 demands attention:
- breaking-thunderbolt-security-bjorn-ruytenberg-20200417.pdf - Google Chrome

Pass flag '--clear' to focus each window demanding attention
for 1 seconds to clear the demands attention flag

That should be enough to figure out which windows you need to focus to clear the flag. If you don't mind about the actual windows and just want to clear the flag, you can pass --clear and the script will display each window for 1 seconds and then return to your window that was active before switching any window. The focused windows will be raised to top of window stack.

list-window-demands-attention --clear

If you don't want to wait for 1 second per window, feel free to comment out or remove the sleep 1 above.


In order to be able to install ubuntu from a USB you need to make it bootable not just copying the iso file.

The process for making a live ubuntu USB can be found here ( Assuming you are on Windows system) :

http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows


Output on HDMI only, laptop screen undetected

a little update on the situation :

Aux grands maux, les grands remèdes, I decided to reinstall the whole OS as an emergency solution, so I gave a try at Ubuntu 17.10 and it turns out that multiple monitors configuration are smoothly, plug'n'play, painlessly working here, straight out of the box (no drivers twisting or anything) !

And by the way 17.10 looks very nice, I am very happy with it.


This strange thing happens with me too. I have solved it by deleting the old network setting and created new one. But not sure will this work for you too.

1) At your right-hand corner top click on network > edit connections . You will get a small popup like the one below.

2) Delete all the network settings.

3) Re-add then and try to connect.


Is there a log of the output of "bash install.sh [ ]" available for Ubuntu server?

best I could find on my own (and I'm a newbie) was just running 'apt-get check' for a clue as to how things turned out following an install. Also running 'script' prior to running an 'apt-get install' will capture all the output from the command to file so that you don't have to worry about it scrolling away.


If you've permanently deleted a file (using something like rm or Shift-Delete), the file is still there, but marked as "free", meaning it can be overwritten by any other file operation. In order to prevent this data from being destroyed, SHUT DOWN YOUR SYSTEM NOW.

Boot into a live session (USB/CD/DVD/etc) and use a tool like foremost or photorec to attempt to pull the lost data from your drive. Do not mount the partition from your live disk. Operate on the raw block device itself.

You can get information about these two utilities using man photorec or man foremost after the eponymous packages have been installed to the live media.

Your folder itself is likely gone (as it's just virtual), but the files within might still be okay, but you might need to sort through a lot of cruft to find those files.


How to make my Ubuntu 18.04 LTS auto upgrade to latest Linux Kernel?

That's not how Ubuntu is set up; Ubuntu does not follow the strategy Arch uses.
The idea is to upgrade your system to 19.04 is you want newer versions of software/a kernel. If you want a newer kernel in 18.04 you will need to update your system yourself. 18.04 will get the 19.04 kernel somewhere later this year when the next point release arrives (18.04.02).

There is a tool called Ubuntu kernel update (UKUU) that makes this rather easy though:
sudo apt-add-repository ppa:teejee2008/ppa
sudo apt update
sudo apt install ukuu

After starting ukuu you will get a list of available kernels and you can add the one you want to the system. As the old ones are still there you can then always pick an older one from grub if the newest is not to your liking.
Issue with this... it is not free...

Purchase
A personal license for Ukuu is currently available for $12. This is a single-user license that is valid for lifetime, and includes future updates.

Note: Do not upgrade your kernel if you do not know what you are doing.


I can't edit / create / delete files and directories in my samba share

Got it. There are many ways to do this the simplest in my opinion is this:

Change your share definition on the server from this:

  public = yes
  path = /home/user/server
  only guest = yes
  writable = yes
  write list = user scinkpad scinorandex
  printable = no
  msdfs root = no

To this:

public = yes
path = /home/user/server
writeable = yes
force user = user

EDIT: Every time I look at the change I think it will confuse people so I changed the "user" in the path to me to make it clear:

public = yes
path = /home/morbius/server
writeable = yes
force user = morbius

Save the file then restart smbd:

sudo service smbd restart

When the client to this system connects to the share his identity will be changed to "user" ( the same "user" in the path ) on the server - for this share only. So when he adds a folder  / file it will save as owner = user and both of you will be able to edit its contents.


There are quite a few (though I have not tried all of them in 12.04):

Gwibber

To install this, run the following code in the terminal:

sudo apt-get install gwibber

although a post Install latest Gwibber (friends-app) in Ubuntu 12.04? says that the package is broken (I have not tested this)
Polly - supports in-line images

To install this, run the following code in the terminal (more info is available at How do I install Polly?):

sudo add-apt-repository ppa:conscioususer/polly-daily
sudo apt-get update
sudo apt-get install polly

Turpial - supports multi-column layout and multi-account

To install this run the following codes in the terminal:

sudo apt-get install turpial

TTYtter CLI, but not currently under development I guess

To use this, first download the perl script from here to a location on your computer from where you want to run it. Then make it executable with:

chmod +x <path/to/script-file>

and run it with:

./ttytter

Birdie - Reported to be buggy in 12.04 but worth a try

To install this, run the following commands in the terminal:

sudo add-apt-repository ppa:birdie-team/stable
sudo apt-get update
sudo apt-get install birdie


To install heroku in all currently supported versions of Ubuntu open the terminal and type:

sudo apt install snapd
sudo snap install heroku --classic

This installs the heroku snap package (version 6.15 which is currently the latest version) successfully, and it is the recommended way of installing Heroku CLI in Ubuntu at the Heroku Dev Center website.


So I purchased an Nvidia GTX 650 Ti with four video outputs (two DVI, one HDMI, on VGA). The card was about $175.  I am running 12.10 with the nvidia-experimental-310 drivers installed.

By playing with the Displays dialog and the NVIDIA X Server Settings program I now have TwinView running three monitors simultaneously.  Compiz effects are fantastic.

Think I finally found my perfect triple head display.


How do I correct zfs pool trying to use incorrect device after reboot?

I ended up resolving this issue. Apparently lvm and zfs don't play nicely together.

Power down jbod enclosure
reboot machine
zpool status nolonger shows the drive.
zpool import -d /dev/disk/by-id stor4

pool: stor4
state: ONLINE
 scan: scrub repaired 0 in 0h2m with 0 errors on Wed Apr  6 13:15:36 2016
config:

    NAME                                            STATE     READ WRITE CKSUM
    stor4                                           ONLINE       0     0     0
      raidz2-0                                      ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134LLA13H  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC130YUZ78J  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC130ADRPT2  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC133YHCH74  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134HF0CN1  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC133CL339U  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC133YHC7A8  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134PDTNA9  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134HF0TF5  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134HF01HR  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC132RDTE7E  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC134PDT71R  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC136HXYZS3  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC136PT6DE9  ONLINE       0     0     0
        ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC133FE5JND  ONLINE       0     0     0
    spares
      ata-WDC_WD4000FYYZ-01UL1B2_WD-WCC131FYE89J    AVAIL

The array is online and data is intact. It seems as though lvm which is managing /root was stepping on zfs and assinging one of zfs's drive letters to its physical volume. I should note that zpool export would error because status was unavail. Using the id should keep this type of thing from happening in the future.

I hope this helps anyone who runs into the same issue.


Creating a swap partition on an SSD with full encryption

There is a really nice tool called system-config-lvm, which helps guide the resizing, adding, removing and other functions of pv's and lv's of your LVM.  Unfortunately, you'll run into issues trying to resize or edit an active partition.

You will need to run a Live Distribution in order to modify your SSD's partitions.  You can do this with Ubuntu itself, or try out the [no-longer free] partedmagic.  Parted Magic does have better features and functionality dealing with SSD/HDDs.

Once you're in a Live Distro, you'll be able to find lots of information on how to resize your partitions.

https://askubuntu.com/a/196134/13247
https://wiki.archlinux.org/index.php/LVM
https://wiki.archlinux.org/index.php/Dm-crypt


How can I fix KDE compositing at a low framerate?

Eventually I figured out that the display had somehow been reset to 24hz, not 60hz after a reboot (only thing I had changed was adding another monitor).
Answer: Double check "Refresh rate" in System Settings -> Display and Monitor -> Display Configuration.
Alt: (If using an Nvidia card and drivers are installed) run nvidia-settings and check the refresh rate there.


How do I show the built-in integrated calendar in Thunderbird?

You need to click the calendar icon in the right-hand corner of the top bar. It is hard to find, so hopefully this screenshot will be helpful:


How do I block a specific version of a package to be installed by aptitude (or apt-get)?

Edit the /etc/apt/preferences file and add:

Package: unzip
Pin: version 2.7
Pin-Priority: 100

Package: unzip
Pin: version 3*
Pin-Priority: 1000

This will keep the package on 2.7, skip 2.8, 2.9 and upgrade to 3* when available.

Note that this is an unnatural way of not upgrading to an unstable package version. A better (and the recommended way) is to hold the package till the issues are resolved:

dpkg:

$ echo "package hold" | sudo dpkg --set-selections

Aptitude

$ sudo aptitude hold package_name


Is there a way to execute a custom command and cd in the same line?

Followup to Jos's comment you can try &&. Below example will explain the difference:

  $ true && echo "Things went well"

Things went well

  $ false ; echo "This will always run"

This will always run

So its on you if the 2nd operation is dependant on the first operation go with && else use ;


upstart and gnome-session-Unity.log goes mad

You should really try to learn why gnome-session is outputting so many logs, but in the meantime, you can do this:

rm ~/.cache/upstart/gnome-session-Unity.log
ln -s /dev/null ~/.cache/upstart/gnome-session-Unity.log


Cinnamon Annoying Volume Notification Popup - osd

EDIT: As of the new Cinnamon version 2.6 (currently in RC phase with Linux Mint 17.2), it is now possible to completely disable the media key OSD:

System Settings → Preferences → Notifications → Media keys OSD size: Disabled

I assume this requires the Cinnamon version of the control center.

This doesn't come from Cinnamon specifically, but from GNOME 3, from which Cinnamon was forked. Unlike  most other notifications or popups, these are shown directly by the desktop and not managed by some notification library like libnotify. They are hardcoded to show up when the volume or brightness is changed using the default key triggers.

To fix it, use your own hotkeys for XF86AudioRaiseVolume, XF86AudioLowerVolume, XF86MonBrightnessUp and XF86MonBrightnessDown, using commands not bound to the desktop.

As an example, you can use the following commands, but you have to install the package xbacklight before.

pactl set-sink-volume 0 +5% #increase sound volume
pactl set-sink-volume 0 -- -5% #decrease sound volume
xbacklight -inc 20 # increase screen brightness
xbacklight -dec 20 # decrease screen brightness

Normally, meaning using Cinnamon's default theme or the Mint-X theme, this thing looks much nicer and is transparent. Then I like it. But the way it looks in your screenshot, it really is annoying. You may want to consider installing the Linux Mint default themes. You can get them by installing the mint-themes package and its dependencies. They are, however, only included in the Mint repos, so it might be easiest to get and install the debian package archives from a rebecca/main mirror, like from here. But watch out, it could break things in Ubuntu (it certainly breaks Ubuntu's custom LibreOffice theme)


Setup Postfix using an external SMTP Server

To anyone with same problem, I just created email accounts at my ISP for each user in the machine sending emails (root@mydomain.com, users@mydomain.com, and apache-user@mydomain.com) and works.


Why is the output of this find -newermt command apparently not in order?

There are two important concepts here: -newerXY only affects which files are operated on and not the order in which they are operated on, the the order find discovers siblings is unspecified and in practice contingent on the implementation details of the filesystem driver.

-newerXY filters but it does not sort.

The -newermt predicate tests if files were modified more recently than the time you specify as its operand (1 sec ago in this case), filtering out those that are older. It does not affect the order in which find discovers files, nor does it affect the order in which actions (including the default -print action when no other action is supplied) are performed, which is the same as the order in which files are discovered. Since find performs actions on files in the order they are discovered and does not sort its output, newermt does not cause files to be sorted by their modification time.

All this applies equally to other forms of -newerXY.

Files in the same directory may be discovered in any order.

As for what the order of discovery is, as steeldriver says, there is no guaranteed order for this for files residing directly in the same directory. You may sometimes see files in the same order in similar situations and sometimes not, and there is no promise made about the order.

find operates recursively, walking the entire directory hierarchy from each of its starting points. (Ubuntu uses GNU find which treats the absence of a specified starting point, as in your example, as meaning to start from ..) Specifically, it performs a depth-first preorder traversal of one or more directory trees. It is possible to limit where in a tree it goes with the -maxdepth and -prune predicates, as well as to prevent it from selecting files based on where they are in the tree in various ways (including -mindepth), but otherwise it looks everywhere under its starting points.

This does imply some constraints on the order in which it discovers files. It cannot skip back and forth between files in different directories. If you give it a as a starting point, it may discover a/x/1 before or after a/x/2. If it finds a/y, it may appear either before or after a/x/y and a/x/2. This is all to say that entries residing immediately in the same directory may be processed in any order. But a/y will not appear between a/x/1 and a/x/2.


move pointer automatically to default button

I believe that this is window manager-dependent. By default, in Ubuntu you're running either Compiz or Metacity. I don't think that either of those WMs has the option you're looking for. But there are many WMs out there. I seem to recall encountering at least one such WM years ago when I used to experiment with window managers. Of course, I no longer remember which one it was, but I suspect a Synaptic and/or Google search for window managers would yield some interesting reading.


How to install OpenCV without nVidia drivers

I had the same problem, to get around it you can install an alternative provider of libopencl1.  If there isn't one available for your specific graphics card (i.e. one for AMD/ATI appears to be absent from the repositories) you can use the generic one:

sudo apt-get install ocl-icd-libopencl1

If you already installed libopencv-dev, you will also want to remove the redundant packages it brought in:

sudo apt-get autoremove

Seems strange to me that the Nvidia provider is brought in by default rather than the generic one - maybe some packaging wizard can sort this out.

There is a bug for this issue here:
https://bugs.launchpad.net/ubuntu/+source/opencv/+bug/1245260


rsync can be used to do this.

--no-whole-file or --no-W parameters use the block-level sync instead of the file level syncing.

Test case

Generated a random text files using /dev/random and large chunks of text file from websites as following. These 4 files are different in all contents. tf_2.dat is our target file.

~/logs/rs$ ls -tlh
-rw-rw-r-- 1 vayu vayu 2.1G  二  25 23:11 tf_2.dat
-rw-rw-r-- 1 vayu vayu 978M  二  25 23:11 a.txt
-rw-rw-r-- 1 vayu vayu 556K  二  25 23:10 file2.txt
-rw-rw-r-- 1 vayu vayu 561K  二  25 23:09 nt.txt

Then copied them to different hard disk using rsync (the destination is empty).

rsync -r --stats rs/ /mnt/raid0/scratch/t2

The following stat was received.

Number of files: 5 (reg: 4, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 4
Total file size: 3,260,939,140 bytes
Total transferred file size: 3,260,939,140 bytes
Literal data: 3,260,939,140 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 3,261,735,553
Total bytes received: 92

sent 3,261,735,553 bytes  received 92 bytes  501,805,483.85 bytes/sec
total size is 3,260,939,140  speedup is 1.00

Now I merge, the files to make a new file which has approx 60% old data.

cat file2.txt a.txt >> tf_2.dat

Now, I sync the two folders , this time using the --no-W option.

rsync -r --no-W --stats rs/ /mnt/raid0/scratch/t2

Number of files: 5 (reg: 4, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 4
Total file size: 4,289,593,685 bytes
Total transferred file size: 4,289,593,685 bytes
Literal data: 1,025,553,047 bytes
Matched data: 3,264,040,638 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 1,026,127,265
Total bytes received: 611,604

sent 1,026,127,265 bytes  received 611,604 bytes  21,169,873.59 bytes/sec
total size is 4,289,593,685  speedup is 4.18

You can see a large data is matched and speedup.

Next, I try again, this time I merge several shell files to the target (tf_2.dat) such that change is ~2%,

cat *.sh >> rs/tf_2.dat

And, again sync using rsync.

rsync -r --no-whole-file --stats rs/ /mnt/raid0/scratch/t2

Number of files: 5 (reg: 4, dir: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 4
Total file size: 4,289,727,173 bytes
Total transferred file size: 4,289,727,173 bytes
Literal data: 178,839 bytes
Matched data: 4,289,548,334 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 541,845
Total bytes received: 690,392

sent 541,845 bytes  received 690,392 bytes  43,236.39 bytes/sec
total size is 4,289,727,173  speedup is 3,481.25

We see a large match and speedup giving fast syncing.


How to make the nautilus icon open the existing window instead of a new one

The other solutions didn't helped me. however, this one did.

Edit /usr/share/applications/nautilus.desktop

sudo gedit /usr/share/applications/nautilus.desktop

replace Exec=nautilus --new-window %U with Exec=nautilus


Error on installing downloaded Chrome .deb

Make sure that you have all checked under Software & Updates --> Update tab, then do

sudo apt-get update && sudo apt-get upgrade

An easier way to install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable

Or use synaptics

Source:TecAdmin


Adobe somehow drop their support to Ubuntu recently. The latest Adobe Reader for Ubuntu is 9.x. I have tried several other pdf readers, but none of them have comparable annotation functionality and compatibility with Windows machine comparing to Adobe Reader.

To use the latest version of Adobe Reader, there are probably only two ways you can do that. One is to set up a Windows virtual machine by using VMWare workstation or VirtualBox, and run the latest Adobe Reader in the VM.

Otherwise, you may reconsider to use Adobe Reader with Wine. Actually, I can run Adobe Reader 11.0 with Wine 1.7.18 in Uubntu 12.04 without any problem. You should be able to install it by following this guide.


Can i have more than one desktop installed and then choose which one to use?

yes thats what said in that link .

so as you asked , if you want to install gnome-shell

open your terminal and type as

sudo apt-get install gnome-shell

I like KDE , to get it you can do

sudo apt-get install kubuntu-desktop

IF you want some light desktops

sudo apt-get install xubuntu-desktop

sudo apt-get install lubuntu-desktop


how to access windows ntfs drive on plex server

You have a dual-boot system with Windows 10 and Ubuntu, Plex server installed on the Ubuntu partition. You want to read the Windows ntfs partions "C" and "D" but you don't want write access to make sure that Windows 10 runs without any issues later.

Assuming that your Windows partions are /dev/sda2 and /dev/sda3, put the following lines in /etc/fstab:

/dev/sda2                                  /media/virajlinux/C     ntfs         defaults,umask=002         0       0
/dev/sda3                                  /media/virajlinux/D     ntfs         defaults,umask=002         0       0

and point Plex to them accordingly. Windows drives are mounted at boot of the Ubuntu partition with the Plex media server, and they are read-only.

This should give you what you want.