Don't use smbfs, the new protocol's name is cifs and its part of the package cifs-tools (install it if you did not already.

Instead use this line in your fstab

//server/share /mnt/mountname cifs username=server_user,password=user_password,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

Where

server = your server that you are trying to access
share = mapped share on that server
/mnt/mountname = any folder that you created with sudo /mnt/<folder_name>
username = the name of the user on that server that can access the mount
password = the password for that user

After that you can test with sudo mount -a, if you dont get any faults you can safely reboot to find your shares mounted in /mnt/<folder_name>.

To use a credentials file instead of the username and password parameters on the fstab you can create a file with those 2 lines so that your username and password are not explicitly shown in the fstab

sudo nano /etc/cifspwd

Add these lines to the file

username=<username on server>
password=<password for that username>

Press ctrl+x keys and when asked press y to save the file.

Secure it with

sudo chmod 600 /etc/cifspwd

Use this line instead of the previous

//server/share /mnt/mountname cifs credentials=/etc/cifspwd,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0

After this it will be safe to reboot and you mount should be mounted and your details secured.


Modifying mydestination directive in postfix MTA

Correct the line to:

mydestination = $myhostname, lamtakam.com, localhost.localdomain, localhost

Save and restart postfix service.


How can I list only folders with no sub folders in given path?

In a small python script:

 #!/usr/bin/env python3
import os
import sys

src = sys.argv[1]
for root, dirs, files in os.walk(src):
    for dr in dirs:
        directory = root+"/"+dr
        if len([sub for sub in os.listdir(directory) \
                if os.path.isdir(directory+"/"+sub)]) == 0:
            print(directory)

To use it

Copy it into an empty file, save it as count_empty.py
Run it with the targeted directory as an argument:

python3 /path/to/count_empty.py '<source_directory>'

How it works

python's os.walk() walks through directories and sub- directories
The line

if len([sub for sub in os.listdir(directory) if os.path.isdir(directory+"/"+sub)]) == 0:

subsequently counts the number of subdirectories on each of them. If it is zero (no subdirectories), the directory and its path is printed.

Test on a simple package folder on my desktop:

$ '/home/jacob/Bureaublad/pscript_5.py' '/home/jacob/Bureaublad/0.5.3'
/home/jacob/Bureaublad/0.5.3/nonotifs-0.5.3/manpages
/home/jacob/Bureaublad/0.5.3/nonotifs-0.5.3/miscellaneous
/home/jacob/Bureaublad/0.5.3/nonotifs-0.5.3/icon
/home/jacob/Bureaublad/0.5.3/nonotifs-0.5.3/code
/home/jacob/Bureaublad/0.5.3/nonotifs-0.5.3/debian/source


How can I move my files to a secondary internal harddrive?

You can do both :-)

I have a system with home as a directory in the root parttion (the simple standard). Alongside that I have a large disk with a data partition. I mount that partition via a line in /etc/fstab ('directly', not in home). I have short aliases to get to the directories, that I use often (I use terminal windows a lot), and I have symlinks too.

In the beginning I dual booted with Windows, so I had the NTFS file system in the data partition. But now I use almost only linux, and I have switched to ext4, which is faster (in linux) and also allows more flexible permissions and links.

I have separate backups for the system and the data partition.


The .bash_profile is used just by login-shells. If you start a terminal/xterm/konsole on your Desktop, this file isn't sourced.

The file you probably want to use is ~/.bashrc. Just copy the systems /etc/bash/bashrc to your home directory:

cp /etc/bash.bashrc ~/.bashrc

and append your information to that file:

echo 'export WORKON_HOME="$HOME/.virtualenvs"' >> ~/.bashrc
echo '. /usr/local/bin/virtualenvwrapper.sh' >> ~/.bashrc


How to diagnose/fix very slow boot on Ubuntu 18.04

I upgraded to 18.04 today and encountered the same issue. I was able to fix it by booting the kernel with the noresume parameter.

Like you, I also have no swap space. At some point during the upgrade, the initramfs config was modified, adding a line pointing to a nonexistent swap partition. The slow boot was because it was looking for this partition and then timing out after 30 seconds.

To update GRUB so that it passes this option to the kernel automatically on boot:

Edit the file /etc/default/grub file so that the string noresume is included in the GRUB_CMDLINE_LINUX_DEFAULT line, for example:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash noresume"

Run this command to update GRUB:

sudo update-grub

Reboot the computer


How to open Ubuntu Gnome 16.04 Nautilus (File Manager) preferences?

It is known bug 1518786 (reported on 2015-11-22).

IMHO Nautilus is dead.

MATE DE will be the last resort with its fully-functional and powerful Caja.


How to change a users username without the GUI

First open a terminal, become root

sudo -i

Next use the following commands,

change "old" to the old user name, and "new" to the new desired name.

usermod -d /home/new -m old

sed -i -e 's_old_new_g' /etc/passwd

sed -i -e 's_old_new_g' /etc/group

sed -i -e 's_old_new_g' /etc/shadow

The first command moves your home directory, see man usermod

  -d, --home HOME_DIR
             The user's new login directory.
  If the -m option is given, the contents of the current home
  directory will be moved to the new home directory, which is created
  if it does not already exist.

The sed command changes the name in /etc/{passwd,group,shadow}

The system otherwise identifies users by number, not name, so your file ownership and permissions will be fine

To see your numerical id, run the command

id


How do I install Firefox 52 ESR on 16.04?

There is an official Firefox ESR PPA for supported Ubuntu versions:
https://launchpad.net/~mozillateam/+archive/ubuntu/ppa

sudo add-apt-repository ppa:mozillateam/ppa
sudo apt-get update
sudo apt-get install firefox-esr


Can I change file systems inside of partitions within GParted?

For various reasons you should not use ntfs for home partition. What you should do is shrink it to make free space for a new partition that will be NTFS. It will be visible for both systems - Windows and Linux.

Process overview:
- boot to Parted Magic LIVECD / USB
- backup sda6
- resize the sda6 to free some space
- create new NTFS partition

Step by step instructions by yours truly
 how to convert free space to a ntfs partition

Please proceed only after reading the instructions through and through if you're not familiar with partitioning.


Usually ssh sessions are closed after timeout(via inactivity).
This is options in /etc/ssh/sshd_config :

#Default values
TCPKeepAlive yes
ClientAliveInterval 0
ClientAliveCountMax 3

So you don't need to worry about it.


How to update a package in ubuntu-builder which requires system reboot?

That won't be necessary. The update installs the new kernel, create a new boot image and update the GRUB config to point to the new kernel ready for the next boot, that is the maiden boot of the new ISO.

In other words, ignore the restart message.


Ok. I am try to test it.
It looks, that it works fine.

Ubuntu 18.04LTS need update kernel (I am using 5.0.0, it is needed for graphic accelerator).
Ubuntu 19.10 works "out of the box".
MINT 19.2 is same as Ubuntu 18.04LTS

Here is ouput from "inxi -Fxzd" command:

System:    Host: xxxxxxxx Kernel: 5.0.0-32-generic x86_64 bits: 64 compiler: gcc v: 7.4.0 Desktop: Cinnamon 4.2.4
           Distro: Linux Mint 19.2 Tina base: Ubuntu 18.04 bionic
Machine:   Type: Laptop System: LENOVO product: 81NC v: Lenovo IdeaPad S340-15API serial: <filter>
           Mobo: LENOVO model: LNVNB161216 v: SDK0J40700 WIN serial: <filter> UEFI: LENOVO v: AMCN25WW(V1.08) date: 07/25/2019
Battery:   ID-1: BAT1 charge: 52.3 Wh condition: 52.5/52.5 Wh (100%) model: LENOVO PABAS0241231 status: Unknown
CPU:       Topology: Quad Core model: AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx bits: 64 type: MT MCP arch: Zen rev: 1
           L2 cache: 2048 KiB
           flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 33536
           Speed: 1222 MHz min/max: 1400/2100 MHz Core speeds (MHz): 1: 1248 2: 1274 3: 1272 4: 1252 5: 1223 6: 1222 7: 1397
           8: 1397
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Picasso vendor: Lenovo driver: amdgpu v: kernel bus ID: 04:00.0
           Display: x11 server: X.Org 1.19.6 driver: amdgpu,ati unloaded: fbdev,modesetting,radeon,vesa
           resolution: 1920x1080~60Hz
           OpenGL: renderer: AMD RAVEN (DRM 3.27.0 5.0.0-32-generic LLVM 8.0.0) v: 4.5 Mesa 19.0.8 direct render: Yes
Audio:     Device-1: Advanced Micro Devices [AMD/ATI] vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 04:00.1
           Device-2: Advanced Micro Devices [AMD] vendor: Lenovo driver: N/A bus ID: 04:00.5
           Device-3: Advanced Micro Devices [AMD] vendor: Lenovo driver: snd_hda_intel v: kernel bus ID: 04:00.6
           Sound Server: ALSA v: k5.0.0-32-generic
Network:   Device-1: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter vendor: Lenovo driver: ath10k_pci v: kernel
           bus ID: 02:00.0
           IF: wlp2s0 state: up mac: <filter>
           Device-2: Atheros type: USB driver: btusb bus ID: 3-2:2

Works: Accelerated graphic in full resolution, keyboard, touchpad, USB ports, sound, headphones jack, camera, WiFi, NVMe disk, SDcard slot

Not tested: HDMI, battery life


check the swappiness value by :

cat /proc/sys/vm/swappiness

and edit or add if it does not exist

in /etc/sysctl.conf
vm.swappiness=40

than reboot.


This sounds like a graphic driver problem.  But boot problem can be  caused by your Windows filesystem being corrupt.  First check your Windows disk by following the directions here
Then tyro to boot into Ubuntu.
If that doesn't work here is how to try to get booted into Ubuntu and Install the drivers for your Radeon card.

On the boot screen, highlight Ubuntu and then press f8, it should give you several options.  The one most likely to work is "nomodeset"  If this works, Ubuntu will boot into low graphics mode.  If it boots, press your Windows(super) key and the type driver, the program "Additional Drivers" will come up, click on it with your mouse to open it.  It should automatically search for proprietary driver and hopefully find the one needed for you AMD Radeon card.  If it does install the version listed as "stable" first and try to reboot.  If the drivers work, you will boot into Ubuntu, if it doesn't repeat the "nomodeset" booting  process., UNINSTALL THE PROPRIETY DRIVERS YOU INSTALLED FIRST.  Then reboot with "nomodeset" and try again with one of the other drivers.


You have to add the webkit dev PPA as well.

ppa:webkit-team/ppa


How do I write an output of one command into a file?

tacmd listsystems | grep -i $i | awk '{print $1}' >> offline.lst

The >> operator tells bash to append output to a file.


Ubuntu Partition Freezes a minute or 2 after logging in

Incomplete answer...
1. Lets first check your file system for errors.
To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot

2. Boot to the Ubuntu Live USB or DVD, and see if it's stable.
Report back to @heynnema in the comments.


How can I bidirectionally sync my documents folder to Google Docs silently and in the background?

My solution was to run Super Flexible Filemanager at startup, then just minimize the thing. It offers two way sync with gdocs and file conversion to gdocs format. Since I have to minimize the thing at startup so it isn't very pretty or silent but at least it gets the job done and gets around the new pricing policy of GDrive (which isn't available to me yet). Converted docs still don't count toward the 5gb limit. SFFM allows me to select which folders I want synced, similar to UbuntuOne and I am going to email the devs to see if Google is going to maintain that 3rd party functionality and to let them know Linux users are using their product and looking for background sync functionality.

Then I use Conduit (which will run in the background) to sync to Picasa and convert images so a smaller file size. Hopefully, Conduit devs are working on two-way gdocs sync and are upping the size limit to fit new larger Picasa/G+ file sizes (adding G+ would be good too). The privacy concerns of gdocs don't bother me because I know to upload anything sensitive to UbuntuOne or SpiderOak (or better yet just stored on an encrypted USB drive that stays on my car key ring). Besides, I like some of the features that can only be achieved by letting Google's servers "read" my stuff; facial reconition, 'tagging' and the ability to search a document.


I get " 'Couldn't listen on 0.0.0.0:2222 " when I try to start my honeypot

That generally means some process is already listening on the port, in this case 2222. Try sudo netstat -pant | grep 2222 to see if that's the case. Then you might kill that process.


That's because you are using logical volume management (LVM)

the /dev/sda1 partition contains an LVM physical volume (PV)
the PV is assigned to a volume group (VG)
the VG contains your root filesystem

So

the PV fully occupies the partition
the filesystem fully occupies the VG

but

the files only occupy a small fraction of the filesystem


About dual booting Ubuntu 16.04 LTS with Windows 10

With dual boot you will use only one OS at a time.

It will not slow down your Windows.

Both OS's will use the full RAM.


Why /var/run/docker.sock permissions are changed every time I log out? How can I forbid it?

Because the people from docker take security serious. And so should you.
You really need to understand that this opens up your docker instance to everyone. For a thorough explanation this is a must read. chmod 777 is never the correct solution (well... unless the sticky bit is also set).

If you still want to do it with

sudo chmod 777 /var/run/docker.sock

you need to have this command executed each time you login. "startup applications" can be used to execute script at the time you login to the desktop. But please please do not. Use the group method below.

You can also set the immutable bit (chattr +i {file}) so normal users can not change the attributes but that is just a trick. Someone with access to the system can easily change that by rebooting with an live session; even a non admin user can do that.

  Please do not suggest such things like running rootless docker or anything about docker group, I am interesting only in dealing with permissions.

Why? You forgot to explain why these are not acceptable. In theory you could have a valid reason (though I can not imagine one myself :) ).

See How can I use docker without sudo? on how to set this up or use the official documentation on how to setup docker with a group or rootless. Those ARE the 2 methods provided by docker.


ibus symbol disappears for Japanese language selection

If you are using vanilla Ubuntu, maybe you can try this command when the ibus indicator disappears.

ibus-daemon -drx

If you are using Kubuntu, make sure that you have gnome-icon-theme installed.

sudo apt-get install gnome-icon-theme


Can I make ReText use a different font type for displaying code?

We can use Cascading Style Sheets (CSS) to achieve this.

If you are new to CSS and want some help/tutorial, see this Stack Overflow question:

 The best CSS tutorial/site/blog/book

Also refer to the ReText Wiki for Configuration File:

 ReText Wiki for Configuration File

Follow these steps to create and modify the CSS File:

ReText stores its configuration files at ~/.config/ReText project/ReText.conf. Open your File Manager (Nautilus if you are using Ubuntu). Press Ctrl + H to show all the hidden files. Now, navigate to the directory .config → ReText project. Here you would find ReText.conf. We would need to edit it to point to our css file. But let's first create the css file.
In this same directory create a file called myconfig.css (you can name it whatever you want). Now open it in a Text Editor.
Edit the file as below:

code {
    font-family: Ubuntu Mono, DejaVu Sans Mono;
    background-color: #D3D3D3;
}

pre {
    background-color: #D3D3D3;
}

Obviously, what you want is to only set the font-family property to code tag. However, I recommend to set background-color property as well to both code and pre tags. I have set the background-color to LightGrey (its Hex Value is #D3D3D3). You may modify the color to your tastes and preferences. The following link should help you in this regard.

 Popular Colors and their Hex Values

Now modify ReText's Configuration file to point it to the newly created stylesheet. Open ~/.config/ReText project/ReText.conf in your Text Editor and add the styleSheet setting at the end and point it to its location. For me it is:

styleSheet=/home/aditya/.config/ReText project/myconfig.css

Note:

Ensure that you provide the full path to the file. It cannot expand ~ as your $HOME.
Furthermore, if you named your css file as something other than myconfig.css or placed it in some other directory, ensure that you provide the correct file name and path.

If you already had ReText running, close and restart it again for changes to take effect.

How to know what HTML <tag> to modify

If you are unsure about the tag names, you can view the HTML code of your markdown and then make your preferred changes to CSS.

Edit Menu → View HTML code would show the markup of your markdown text.


How to mount drive without partition table?

Lack of a partition table is not the issue.  You appear to have an entirely blank drive in the first instance, and in the second, you have a freshly formatted one.  Perhaps your xen configuration is pointing the drive to the wrong location?


Ubuntu 18.04 hangs after login page after installing nvidia drivers

My experience with setting up NVIDIA graphics with proprietary drivers:

Go to https://www.geforce.com/drivers and download latest Linux 64-bit
drivers for your GPU (Pick the latest one, 410.93 being the latest
as am writing)
Reboot your Laptop in recovery mode (In the GRUB
screen, press 'e' and add '1' to the line that starts with linux, it
should 2nd line from the bottom) and press 'F10'
Enter the root password
Make sure there is no 'xorg.conf' under '/etc/X11/' folder
Go to the directory where you have downloaded the latest NVIDIA driver
Run the NVIDIA driver installer as 'sh ./NVIDIA-xxxxx.run' and follow the instructions
Edit the file with 'sudo nano /etc/initramfs-tools/modules' and add the following modules in separate lines: nvidia, nvidia_modeset, nvidia_uvm, nvidia_drm
Run 'sudo update-initramfs -c -k all'
Add the kernel parameter 'nvidia-drm.modeset=1' in the file '/etc/default/grub' to the line that starts with "GRUB_CMDLINE_LINUX_DEFAULT"
Run 'sudo update-grub'
Reboot the Laptop into Linux normally

If you run into compilation problems, look into the NVIDIA installer logs for exact errors. In most cases, you may need to install the 'linux-headers' (corresponding to your linux kernel version), 'gcc' packages and then retry the NVIDIA driver installation.


Ubuntu will not allow me to add a repository, why can't it access PPA?

try adding the source manually into /etc/apt/sources.list  or do it through the software manager add sources.  the option explained https://launchpad.net/~webupd8team/+archive/java in technical details about this ppa


How to get Netextender (VPN) working in Ubuntu 12.10 x64?

See Franck Routiers Post:

Note, you'll have to have the Java Development Kit installed on your System.

  1) go to https://sslvpn.demo.sonicwall.com/cgi-bin/welcome

  2) log in with demo/password

  3) click on NetExtender icon, this will download a tar.gz with the
  client

  4) sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0
  /usr/lib/libssl.so.6

  5) sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
  /usr/lib/libcrypto.so.6

  6) un-tar the client, make install script executable and launch
  install

  You're done.

  Connect with :

  sudo netExtender -u user -p password -d domain server

  (and see man netExtender)


Deleted Network Manager - Can’t Reinstall

To get internet back (wifi), do these commands. (I am assuming Network Manager is actually uninstalled).

1.) Ensure that the wifi is actually enabled (no Airplane mode, or physically disabled wifi)
     sudo rfkill list

You should get a reply like:

  0: acer-wireless: Wireless LAN
          Soft blocked: no
          Hard blocked: no
  1: acer-bluetooth: Bluetooth
          Soft blocked: no
          Hard blocked: no
  2: phy0: Wireless LAN
          Soft blocked: no
          Hard blocked: no
  3: hci0: Bluetooth
          Soft blocked: no
          Hard blocked: no

Make sure all wireless related are not blocked.

2.) Next, find out your WiFi device name (wlan0 or wlp0s0, etc.)

Run the command iwconfig

This is the kind of output you should get.

  $ iwconfig
  lo        no wireless extensions.

  wlp2s0    IEEE 802.11bgn  ESSID:"WiFiAPName"
            Mode:Managed  Frequency:2.432 GHz  Access Point: 00:22:75:6C:BE:74
            Bit Rate=36 Mb/s   Tx-Power=16 dBm
            Retry short limit:7   RTS thr:off   Fragment thr:off
            Power Management:off
            Link Quality=69/70  Signal level=-41 dBm
            Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
            Tx excessive retries:0  Invalid misc:1772   Missed beacon:0

  enp1s0f1  no wireless extensions.

The wireless interface name in this case is wlp2s0.

3.) Create an wpa_supplicant.conf file for your network (the one you want to connect to).

This assumes that you know your WiFi name, the password for it, and that the WiFi station is up and running and within range.

Use command wpa_passphrase to create the file.

  wpa_passphrase my-ESSID my-passphrase | sudo tee ~/my_wpa_supplicant.conf

This will create a wpa_supplicant.conf file in your $HOME folder.

However, if you do not have the wpa_passphrase installed on your system (many don't), create a file my_wpa_supplicant.conf in your home folder, and using the editor of your choice (vim/nano/emacs/gedit/kate) write into the file:

network={
        ssid="my-ESSID"
        scan_ssid=1
        key_mgmt=WPA-PSK
        psk="my-passphrase"
}

In this case, my-ESSID is your WiFi name, my-passphrase is your WiFi password.

4.) With the config file, connect to the WiFi as:

  sudo wpa_supplicant -c ~/wpa_supplicant.conf -i wlp2s0

Replace wlp2s0 with your wiFi interface name (which you found out in Step 2, with iwconfig).
The ~/wpa_supplicant.conf is the path to the config file you had created in the last step.

That's it really, wpa_supplicant will run in foreground by default and inform you of the current connection status. As long as this terminal (on which you issues the command) is running, you have connection to WiFi.

Confirm by running route -n and ping commands  (in a separate terminal).

   ping 8.8.8.8


xubuntu: stopped working during system update

I restarted and chose the old/previous version to boot up.

Then I ran the following command.

sudo apt-get update
sudo dpkg --configure -a


Try ip link , you'll get a list of interfaces . Check the screenshot , the highlighted interface is the interface for USB tethering Here's the screenshot


Dual monitor Unity launcher opening on wrong monitor

Currently Unity sits itself down at 0,0. Supporting right monitor as primary is simply not implemented yet. It will be by release.


Ubuntu 20.04 black screen after installing, no booting

I had the same problem. My computer is a Dell Inspiron 15.

The problem is with UEFI. To fix it you can turn off PPT in the UEFI/BIOS options and enable Legacy Boot.


Sometimes the mouse becomes unusable and I have to restart the computer

I get this issue on systems that use the onboard graphics.  Typically an application, often Chrome when moving the window,  will get stuck and the window manager stops responding.  When this happens, CTRL-ALT-F1 and run top, and the window manager and the application will both be pegging the CPU.  Often I can just kill the application that is causing this issue, then CTRL-ALT-F7 back over to the UI and the mouse works again.  If it takes a long time to CTRL-ALT-F1 it's usually a good indicator your CPU is maxed.


Does installing zRam have any advantages on a system without SWAP?

I would presume whether or not you have swap space is more or less irrelevant to the usefulness of zRam. Regardless of whether or not you have zRam installed, if you run out of RAM with no swap space, bad things start to happen. :-)

If you do expect to run out of RAM, then zRAM could be helpful because it essentially expands the amount of data you can store in RAM (assuming it's not of unreasonably high entropy) so it will take longer to fill up. So it might buy you some more time, assuming you're not storing large arrays of random numbers.

If you're 99.9% sure you won't get close to running out of RAM (i.e. you have 16GB on your web-only netbook), than anything stored in zRAM is needlessly requiring extra CPU time to compress and decompress, so it's not really beneficial in this case.

If you're on the high end of the RAM usage spectrum (on average over 50-60%, for example) you might benefit from some additional peace of mind using zRAM. (Or you could buy more RAM.)

I suppose you have to evaluate your normal and heavily-loaded RAM utilization (average and max) and what kind of data you work with.


You don't need an alias, you can save a function directly. Just save the definition into your .bashrc file.

To invoke it, use prepareimages 400x300, i.e. no parenhteses. You can use single or double quotes, but as there's no special character, they aren't needed.


Any way to disable touchpad gestures in Ubuntu MATE 20.04

The laptop I'm using has both trackpad and buttons -- Unity, Ubuntu-20.04, Dell Precision 7510.  Certain movements on trackpad were interpreted as button presses, which was happening accidently with moderate frequency.  I want to use trackpad movement for cursor movement only -- and buttons-only for button presses.
My understanding of the question here, is that it requests either the same or very similar.
Went to Settings->Mouse&Touchpad->Touchpad per comment by Akash Karnatak, and under "Touchpad" section found three checkboxes, all enabled by default.
I removed the checkmark to disable "Tap to click", and so far I've been able to move the cursor without accidental button-presses/clicks.
[ ] Tap to click
[x] Two finger scroll
[x] Natural scrolling
See also https://help.ubuntu.com/stable/ubuntu-help/mouse-touchpad-click.html


After a bit of sleuthing, I found some additional details about how systemd's logind works here (more specifically, how logind uses policies through polkit), which ultimately led me to the solution to my issue here. What fun!


Because that docker is not the docker you expected. docker is the package name of system tray  for KDE3/GNOME2. You can verify that by visiting Ubuntu package search or by running
apt show docker

The error message you got while running docker from terminal gives a brief idea about this confusion.
To install the docker you expected, refer to official documentation or see How to install docker community on Ubuntu 20.04 LTS?


Playing video on www.foxsoccer.tv does not work

I had a similar problem that may - or may not - apply to your situation.  There is a plugin for Netscape to help you find if you are using the "best" version of Flash for your system; it's called Flash-Aid.  You can install it following the instructions here: http://www.liberiangeek.net/2011/11/flash-aid-helps-you-install-adobe-flash-player-in-ubuntu-64-bit-32-bit/

Once installed, run it and accept all the defaults.  After, restart Firefox and see if it will run your site.  If not, you can uninstall the plugin easily from Firefox by choosing Tools->Add-ons from the Firefox menu.

In my case, I thought I had the "best" Flash already on my system (11.10), but there was one site in particular that I couldn't run until I used Flash-aid.  I hope it works for you, too.


Found the problem. My /usr/share/zoneinfo/NZ got corrupted by a rouge unit test. The "NZ" file was originally a binary file and got replaced by a text file with "NZST-12NZDT,M9.5.0,M4.1.0/3"
I copied the NZ file from another machine and that fixed my problem.

timedatectl status

now says:
      Local time: Sat 2017-09-30 02:33:09 NZDT
  Universal time: Fri 2017-09-29 13:33:09 UTC
        RTC time: Fri 2017-09-29 13:33:12
       Time zone: Pacific/Auckland (NZDT, +1300)
 Network time on: yes
NTP synchronized: no
 RTC in local TZ: no


When will Osmos and Shatter be available for Ubuntu 12.10?

Ubuntu 12.10 is very new. Some applications, like MyUnity or Osmos, aren't avaliable yet. We have to wait until they go to the Quantal repositories.

Alternatively, it seems that Shatter is avaliable to download for cross-platform on their website, give it a check, but it looks as you'll have to buy it again! It's here.


Update-manager does not show all updates

This appears to be part of the phasing of stable release updates that has been in place since 13.04.

Users of Ubuntu 13.04 who install updates with update-manager are automatically participating in this process.

Basically, updates are released to 10% of users. Then an error report database looks for regressions or problems. If everything is ok, 6 hours later another 10% of users receive the updates. The phasing status tracker is automatically updated accordingly, and you can monitor the process there.

One can opt out of the Phased Update process by adding 'Update-Manager::Never-Include-Phased-Updates "True";' to the configuration file "/etc/apt/apt.conf".

On my system that file does not exist, so if you choose to opt-out, you may need to create it with sudo nano /etc/apt/apt.conf and add the needed line.
On Ubuntu releases 20.10 and earlier, apt-get will always show updates right away. In Ubuntu 21.04, phased updates came to apt-get.
Also, in System Settings >> Software and Updates, go to the Updates tab and make sure When there are security updates and When there are other updates both say Display immediately (But note that these settings do not override the phased updates.)
See also:

Stable Release Updates on the Ubuntu Wiki, section 5: Phasing


*Error Permission denied (publickey)* Does Windows 10 Powershell Support OpenSSH Public Keys with Ubuntu 20.04

Alright so as @muru said, do it likes this:

Exec ssh-keygen -t rsa on your remote (device connecting to server) and use passphrase
Find id_rsa.pub file in C:\Users\Username\.ssh\
Upload it with ftp to your server (or upload to webserver and use wget)
Save it in ~/.ssh
Make sure the file is called authorized_keys or it wont work sudo cp id_rsa.pub authorized_keys
Remove the downloaded unused file sudo rm id_rsa.pub
Disable password login sudo nano /etc/ssh/sshd_config
Find or add the line PasswordAuthentication no
Restart ssh service sudo service sshd restart
Connect with Powershell ssh user@ip.address
Optional parameters for the ssh command in powershell are a custom port -p [port] and for debug info use -vvv
Some other optional settings for security I added to /etc/ssh/sshd_config are:

Port [port]
Protocol 2
LogLevel VERBOSE
PermitRootLogin no
StrictModes yes
RSAAuthentication yes
IgnoreRhosts yes
RhostsAuthentication no
RhostsRSAAuthentication no
PermitEmptyPasswords no
PasswordAuthentication no
ClientAliveInterval 300
ClientAliveCountMax 0
AllowTcpForwarding no
X11Forwarding no
UseDNS no


Network not functional after converting Virtual Machine to Physical

The addition of ip addr was already useful, we see none of the interfaces is up or configured. If the following doesn't help please consider also adding the output of networkctl so you can check which are actually managed.

As it seems the system most likely has a network config not matching the adapters you have on the bare metal machine. Read netplan.io for more but a config matching your screenshot would be placed in e.g. /etc/netplan/51-my-interfaces.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0:
      dhcp4: true
    eno1:
      dhcp4: true

After that is in place run sudo netplan apply and your interfaces should try to come up and try to get dhcp addresses.


when i try to install any thing in ubuntu 12.04 i get this error

You have to remove the particular libjson0,libjson0:i386 packages forcely without removing it's dependencies,

sudo dpkg --purge --force-all --force-remove-reinstreq libjson0 libjson0:i386
sudo apt-get -f install


18.04 - How to enable right click dock icon to see windows open without having to click 'all windows'?

Install Tweaks and Dash to Panel from the Ubuntu Store. From Tweaks, enable the Dash to Panel extension and click on the gear icon to allow you to customize your panel to your liking.


Nautilus keeps trying to access a folder that doesn't exist

Turns out it's an issue with the startup applications. I am almost certain it was caused by copying my configs from my previous (lucid) instalation to this new one (maverick). Following Bobby's suggestion, here's what I did.

Open System -> Preferences -> Startup Applications -> Options
Close any currently running applications.
Hit Remember Currently Running Applications.


Trouble updating/installing newer required R

change the line in /etc/apt/sources.list to

   deb http://r.meteo.uni.wroc.pl/bin/linux/ubuntu oneiric/

and retry

 apt-get update


How to automate backup downloads between two Ubuntu 14.04 servers

you could use rsync as a means to achieve synchronizing a folder on your backup server with a folder on the main server.

to install rsync if you don't have:

sudo apt install rsync

also, you can use  cron jobs to automate the whole process of backup;

here's a simple way to make it work, just add this to the cron in the production server:

0 0 * * * rsync -avh /proction_server_directory/ user@backup_server_IP:/backup_directory/

this will sync the contents on the proction_server_directory to the backup_directory every midnight.

also make sure to add your production server's public key to the backup server's known hosts


Ubuntu 18.04 with routing but need VM bridge

With VirtualBoxSimply setup the VM network adapter attached to Bridged Adapter with the Ethernet nic.


Suspending Ubuntu Session when Laptop lid is Closed...

I would like to suggest first (unless you have done already)  that you hit the unity button in the corner or win/super key and type Power Management.

Here you should be able to select what action happens when you shut the laptop lid ie suspend/blank screen. It usually works on my laptop but more often than not.

Apologies if you have done this already but for some people it is an easier method

Let us know how you get on.


Available computer-assisted translation (CAT) software for Ubuntu

The list is quite extensive. These are those listed by Wikipaedia with an open source licence:

GlobalSight
Gtranslator
Lokalize
OmegaT
Open Language Tools
Poedit
Pootle
Virtaal


How to change the desktop wallpaper that's part of a slideshow?

--After installing wallch (from the software centre) you can safely remove the offending wallpaper.

Wallch PPA Gnome3

Wallch PPA Gnome2

Linked Question:

How do I create a desktop wallpaper slideshow?


disabling x to install graphics nvidia graphics card drivers

I would not recommend to use nvidias own installer because what happens then is outside of ubuntu's package management.
Just install using a terminal

sudo apt-get install nvidia-current nvidia-settings

and reboot.

In case you need the absolute latest drivers use the x-swat-PPA:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install nvidia-current nvidia-settings

and reboot.


There are some projects out there, but the general answer is no.
The main problem is that most mobile drivers are closed source and only available for certain versions of Android. So they cannot be used by other systems and of course reverse-engineering them is not easy (and/or can cause legal issues). The mentioned projects are usually focused on a subset of models, but even they cannot guarantee flawless working for every component.


After searching a bit I came across RatioMaster.NET 0.42 that claims to work under Linux with mono 2.6.3 and hardcoded support for torrent clients uTorrent, BitComet, Azureus, ABC, BitLord, BTuga, BitTornado, Burst, BitTyrant, BitSpirit. So this does not include transmission or deluge but some of these do work native under Linux or work with wine.

Did not test that program... my ratio on private trackers is more then sufficient ;)


X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 2 at size 11 could not be loaded

I got this same issue using R in Ubuntu 14.04 specifically with the GGALLY package and the GGPAIRS function.  To recreate:

data(mtcars)
library(GGally)
mtcars_subset <- mtcars[,c(2:11)]
ggpairs(mtcars_subset)

Error:
Warning message:
Error in grid.Call.graphics(L_text, as.graphicsAnnot(x$label), x$x, x$y,  : X11 font -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*, face 1 at size 16 could not be loaded

To fix this loaded the following and rebooted Ubuntu:

sudo apt-get install t1-xfree86-nonfree ttf-xfree86-nonfree ttf-xfree86-nonfree-syriac xfonts-75dpi xfonts-100dpi


This instruction worked for my Ubuntu 18.04 installation.

sudo apt install hibernate It will install hibernate and other dependencies which are needed to hibernate

grep swap /etc/fstab (find UUID)

sudoedit /etc/default/grub
At the line GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" add UUID of swap.
The line looks like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID of swap"
You can choose
`quiet splash` will hide the boot screen output

`splash` will display the boot screen output

sudo update-grub

Restart, and after restart sudo systemctl hibernate. If everything works ok add menu entry's.

sudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
now paste this:

[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;org.freedesktop.login1.handle-hibernate-key;org.freedesktop.login1;org.freedesktop.login1.hibernate-multiple-sessions;org.freedesktop.login1.hibernate-ignore-inhibit
ResultActive=yes

Restart the computer
Install https://extensions.gnome.org/extension/755/hibernate-status-button/


How do I create an encrypted growable disk image?

Since EncFs is deemed unsecure it is not adviced to use it. It's planned to be fixed in the next version, but it would be unwise to start using it now while it's insecure. eCryptfs is secure and you can have a private directory in your home dir with:

ecryptfs-setup-private --noautomount

And follow the direction. It will make .Private as encrypted directory and Private as the where it's mounted. With the option --noautomount it won't mount until you doubleclick "Access my private data" inside the Private directory.

Old answer

The current version of EncFs has known security flaws covered in January 2014. Please read the report before preceding using EncFs.

Based on you comments you should have a look at encfs. I have been using this long before Ubuntu got ecyptfs and even though I keep my files private under ~/Private today I still have my old ~/safe which i use for sensitive information that doesn't need to be mounted all the time.

# install encfs
sudo apt-get install encfs

# setup. directories need to be absolute paths
SAFE=~/safe
SAFE_ENC=~/.safe
mkdir $SAFE
mkdir $SAFE_ENC

# this is for mounting the fs (or create for first time mount)
encfs -i 10 $SAFE_ENC $SAFE

The first time you run this you'll be asked if you want to create a new encrypted filesystem. Just pressiong RETURN creates one with default options. The option -i 10 will make the drive get unmounted if there has been ten minutes of inactivity. Remember not to do cd $SAFE or to keep it open in a file manager since it's considered activity.

If you have several systems that are going to access this (eg. by having $SAFE_ENC in a cloud storage) you should create it with the oldest version of Ubuntu you have or else it might not work on that system if it gets created with a newer system. (it's possible but you need to specify options that are compatible) I've used this since 2006 and am very happy with it.

Encfs has several applications. E.g. lately I have started using it for my USB thumb drive as well. I have a 16GB thumb that has 2GB live ubuntu-presistence with a 14GB which the live system mounts after asking for password. When using it from other systems i mount the drive manually in the terminal, but it would be trivial to get my systems to identify it as my safe drive and mount it with my keyring. I also mount it on my Windows work machine.

When setting this up I found there are some supplimentary packages that can be used to manage encfs from the desktop environment and get it mouted like ecryptfs.


Like heemayl said, you need so run sudo apt-get install gparted so that you run the apt-get command as root (adding sudo before a command in default ubuntu tells the computer that you want to run the command as root.)

Root in Linux gives you unlimited access to your computer, meaning that you can ruin pretty much anything you want, so use it with care.


Trouble with wakeonlan with Ubuntu 20.04

If the cause is WoL settings not being persistent after reboot as explained in the previous answer, there is a simpler solution, which is posted here: https://askubuntu.com/a/1051894/883129

Make sure you have ethtool and wakeonlan installed.
Create /etc/network/if-up.d/wol_fix file with the following content:
#!/bin/sh
/sbin/ethtool -s [card] wol g

where [card] is the name of your ethernet adapter, such as eth0, enp4s0 etc. (you can check this with ifconfig command).
Then run:
sudo chmod +x /etc/network/if-up.d/wol_fix


Thanks to some very nice Yoopers, we may have a solution:

If the screen on your Lenovo Twist Ultrabook is displaying upside down or on its side, the easiest way to rotate the screen to the desired position is hold down the Ctrl and Alt keys simultaneously while also clicking the up, down, right or left arrow keys to change the orientation of your display (Usually this is CTRL + ALT + Arrow Up).

If the key combinations don't work put the computer in tablet mode by laying the display 'screen side up' on the keyboard and then putting it back into laptop mode and try them again.


No there won't be any problem if you install the Ubuntu in a correct way. You can get the required training here Training
Follow the steps described here to install Ubuntu Install Ubuntu


Dual boot into ubuntu with windows boot manager?

I understand that you have never used that ubuntu, so it is a fresh instalation, with no data to save.

So, It is the easyest option to reinstall ubuntu.

And this time, install grub on the mbr.


How to change the format of the date & time displayed in top panel?

Open gconf-editor by pressing Alt+F2 and typing gconf-editor
Navigate to apps -> panel -> applets.
Look for your applet. In my case it is called applet_3, on another computer its name is clock_0. Maybe a good way is to search (Strg+f or for US keyboards Ctrl+f, activate both fields in the search menu) for ClockApplet (case must match).
Go to prefs. Change the value of format to custom and change custom_format to whatever you like. The syntax comes from strftime().
The format will immediately change if you enter some values.

Note: This option will not work in 10.10's netbook edition, see this question for a solution.


No Defragmenation is necessary for Ubuntu. Check out an earlier discussion Why is defragmentation unnecessary?


Make sure Grub2 was installed without problem.

sudo apt-get install grub2-common
sudo update-grub2

This will show up as entries.  If the entries are marked with everything currently installed on the boot disk, everything is good and you have no errors.
Below is a tool designed to make your grub boot manager look the way you want to and boot the way you want to.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

You can open by searching on dashboard by pressing the super button.

in tab "General Settings"

visibility check "show menu"


Steam Controller works in Steam, but not in games under Ubuntu 17.04

Your issue may be resolved, but I have the exact same issue. After many research, I found in this thread (How do I get a Steam Controller working?) that you must have access to /dev/uinput. I just executed sudo chmod 666 /dev/uinput before launching the game and the Steam Controller worked wonderfully in game!

Hope this helps!


Can't find toggle switch for location services

With the default color scheme, I could not see the purple/black toggle a the top.


The Menu Bar font in the Appmenu (when in Unity)  is as far as I'm aware not customizable by itself as in there's no appmenu font setting, It takes on the system fonts specifically the Title bar font, when not using the appmenu it takes on the "Default font" in the Gnome Tweak Tool settings.


Repost screencasts for Lubuntu? (blip have removed them)

Many of the same videos are available at YouTube.
See
https://lists.ubuntu.com/archives/lubuntu-users/2013-October/005730.html
and
http://www.youtube.com/llelectronics


'Installing breakpad exception handler for appid(steam)' while trying to run Steam

Install ia32-libs:

sudo apt-get install ia32-libs


This is a common problem with ATI graphics (you didn't mention your graphics but I am assuming you have ATI graphics because of this).

As far as I know there is currently no solution to this problem. Don't worry though because it is harmless.


Gnome-Shell, use the hot corner to display Application

You could use this extension: https://extensions.gnome.org/extension/6/applications-menu/


How do I know that the drivers are installed and working properly on Ubuntu 12.04?

Install HardInfo from Ubuntu Software Center (Applications –> Ubuntu Software Center).

After installing, go to Applications –> System Tools –> System Profiler and Benchmark.

You can view a summary of your system hardware information as depicted in screenshot below.

Extracted from here.


The beauty of Linux is you can easily set things up.  It has the original "app store" called a repository.

A repository stores programs that have already been inspected most times by the distro creator and in our case the Debian/Ubuntu community.

It is as easy as installing an ssh server program on your server machine.

The command to install an ssh server is

sudo apt-get install openssh-server

After that you can run Putty, or another Ubuntu machine  to connect simply by using this command.

ssh user-name@hostname-or-ip-of-machine-running-ssh-server

If you are using Putty just enter the correct details like your username you use on the Ubuntu server and the ip address or hostname.

You should also look into setting up a secret key pair to avoid having to enter your password every time.


Installing on a mac without a CD burner or USB boot

If I understand, you want to download a new version of Ubuntu and put it on some media and boot from that media to install it to the whole disk on your Mac OS system. You are constrained in that the media you can write to you can't boot from and you can boot from the CD/DVD drive but have no means of writing one. Further, I assume you can't write a CD from that old PC running Ubuntu.

If all of that is correct, I can see three choices. (If it's not correct, please correct me by editing your question).

Buy an Ubuntu 12.04 CD. Canonical has them here . At one time Canonical would give away single CD's on request but I don't see that on the Get Ubuntu part of the Ubuntu site anymore. The cost is about five pounds.
Get an Ubuntu CD from your LOCO (or maybe one nearby). If it's inconvenient to meet with LOCO members perhaps someone would mail you a CD. LOCO's are Ubuntu Local Community Teams. You can find LOCO's starting from here. A LOCO near me always seems to have extra CD's they give away. A LOCO is a good alternative for getting help and advice too. This would be my choice if I were in your situation.

In France, for example, please see this site.
As a final alternative, if you still have the old CD you used to install Ubuntu on that old PC, perhaps you could install from that CD onto your Mac, and then upgrade the system to 12.04. If you installed from USB, however, I see from your question that USB booting won't work.


I have a 4.19 kernel and Nvidia driver version 390.
I changed gdm  to lightdm.

sudo apt install lightdm

Problem is solved now.


That looks like you have a broken non-responding DNS server listed first in your network config. Check in Network Manager, or cat /etc/resolv.conf and look for nameserver lines.

Your ISP should give you DNS server entries which are in their own network and will be pretty fast for you - make sure you're using those; although given the speed it's currently working at, any working DNS server will probably be better :)


If you have a dedicated GPU, the most common reason for getting the purple screen is the graphics driver needs to be reinstalled. To fix this see Fixing Ubuntu Freezing at Boot Time.

To summarize steps in link:

Editing Grub
Temporarily Modifying Linux kernel parameters in Grub
Make permanent changes in Grub
[Alternate for NVIDIA Graphics] Update your system and install proprietary NVIDIA drivers
Enjoy Ubuntu Linux


How to play a full album starting from unity music lens?


You are looking for the ar command. It is installed on any Ubuntu version.
Wikipedia:

The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses; it can be used to create archives for any purpose, but has been largely replaced by tar for purposes other than static libraries. An implementation of ar is included as one of the GNU Binutils.
In the Linux Standard Base, ar has been deprecated and is expected to disappear in a future release of that Standard. The rationale provided was that "the LSB does not include software development utilities nor does it specify .o and .a file formats."

To list contents:
ar -t

-t option of the gnu archiver (ar) writes a table of contents of archive to the standard output. Only the files specified by the file operands shall be included in the written list. If no file operands are specified, all files in archive shall be included in the order of the archive.

And all of the options from the "usage" when you just type "ar":
~$ ar
Usage: ar [emulation options] [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
       ar -M [<mri-script]
 commands:
  d            - delete file(s) from the archive
  m[ab]        - move file(s) in the archive
  p            - print file(s) found in the archive
  q[f]         - quick append file(s) to the archive
  r[ab][f][u]  - replace existing or insert new file(s) into the archive
  s            - act as ranlib
  t            - display contents of archive
  x[o]         - extract file(s) from the archive
 command specific modifiers:
  [a]          - put file(s) after [member-name]
  [b]          - put file(s) before [member-name] (same as [i])
  [D]          - use zero for timestamps and uids/gids
  [U]          - use actual timestamps and uids/gids (default)
  [N]          - use instance [count] of name
  [f]          - truncate inserted file names
  [P]          - use full path names when matching
  [o]          - preserve original dates
  [u]          - only replace files that are newer than current archive contents
 generic modifiers:
  [c]          - do not warn if the library had to be created
  [s]          - create an archive index (cf. ranlib)
  [S]          - do not build a symbol table
  [T]          - make a thin archive
  [v]          - be verbose
  [V]          - display the version number
  @<file>      - read options from <file>
  --target=BFDNAME - specify the target object format as BFDNAME
 optional:
  --plugin <p> - load the specified plugin
 emulation options:
  No emulation specific options
ar: supported targets: elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-x86-64 pe-bigobj-x86-64 pe-i386 plugin srec symbolsrec verilog tekhex binary ihex


Acquire::http::Proxy "http://user:password@10.1.1.8:8080";
Acquire::https::Proxy "http://user:password@10.1.1.8:8080";
Acquire::ftp::Proxy "http://user:password@10.1.1.8:8080";


Shotwell photos lose edits when files are missing

OK, I've figured it out. The general idea was to copy the new parts of the database to the old one, thus having a fully working database. Throughout I refer to the "old" photos/database as the one that worked before removing the storage, and the "new" photos/database as the ones that work after a certain date (which probably has a different storage location, or were added after photos were deleted) but where the "old" photos don't work properly. Hopefully this makes sense. :)

For this to work, you need to have already made backups of the Shotwell database. So I'm assuming you know a little about where that is stored.

Preparation

Make backups of everything!  I'm not kidding, there are no guarantees this will work.

The first step is to install sqliteman

sudo apt-get install sqliteman

After that, open your back-up Shotwell database using Sqliteman. Then enter this into the input box:

SELECT id, filename, flags FROM phototable;

Press F9 to run the command. You should see references to all of your photos appear in the scroll box. Scroll to the bottom, and verify that the last photo has a "flags" field of "0". This indicates that the file is present and working the last time Shotwell ran.
Make a note of the last ID value. Let's call it "phototable_max".

Now, delete the previous command and run this one:

SELECT id, filepath, flags FROM backingphototable;

This shows you all of the edits you have made. Again, make note of the last ID value. Call it "backingphototable_max".
Again delete the command and run this:

SELECT id, name FROM eventtable;

You will see the list of events. Once again, note the last value. This one is "eventtable_max".
This is getting a little repetitive, but now delete the command and run this:

SELECT id, name FROM tagtable;

Note the highest value. "tagtable_max".

OK, so now we have the ID numbers that worked in Shotwell before we broke it. After this point I'm assuming that the database works - i.e. after the point you made the backup all of the photos were not marked as missing.

SQLite time!

Now to copy the new database into the old one.
 Definitely make several backups of your backups. There is a fair chance you will mess this up. You don't want to lose your Shotwell database forever.

OK, close Sqliteman. It's time for some CLI work. Here I am assuming that your old shotwell database is located at "~/.local/share/shotwell-old/data/photo.db" and the new one at "~/.local/share/shotwell-new/data/photo.db"

sqlite3 ~/.local/share/shotwell-old/data/photo.db

Now you will have an SQLite prompt. Into this, enter:

ATTACH "/home/sean/.local/share/shotwell-new/data/photo.db" AS new;

Don't forget the ; and obviously replace "sean" with your username. And yes, you have to use the full path.

Now we can just do these commands, and you're all done! You have to replace the _max values with the ones you noted earlier.

INSERT INTO phototable SELECT * FROM new.phototable WHERE new.phototable.id > phototable_max;
INSERT INTO backingphototable SELECT * FROM new.backingphototable WHERE new.backingphototable.id > backingphototable_max;
INSERT INTO eventtable SELECT * FROM new.eventtable WHERE new.eventtable.id > eventtable_max;
INSERT INTO tagtable SELECT * FROM new.tagtable WHERE new.tagtable.id > tagtable_max;
DELETE FROM videotable;
INSERT INTO videotable SELECT * FROM new.videotable;

What we are doing here is copying across all of the newer values into the old working database from the working part of the new database. The last two lines delete and then copy the videotable, which sorts itself out just fine when restoring missing files.

Then press Ctrl+D to close the sqlite3 interpreter.

You can now move the photo.db file to the Shotwell location, at "~/.local/share/shotwell/data/photo.db" and open Shotwell and it should all work! Make sure you have your hard drive or external storage connected this time.

I found Shotwell ran a little slowly once I first opened it, but it did eventually re-cache everything and got going again.

Also, note that I think because of how we copied the tags table and existing tags applied to new photos would have been lost. Any new tags should survive though, and likewise all old tags on old photos would survive too. This is because of the strange way Shotwell stores tag information - each tag record in the database stores which photos it tags.


How do I recover a BTRFS partition formatted by mkfs.btrfs?

Try PhotoRec but seen the date of your question you probably removed more/all data in the mean while. PhotoRec does not explicity support BTRFS, but it works filesystem agnostic.


Updated for 12.04

To install, download the 32bit or the 64bit, and then just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, navigate to the folder where the download is saved, more that likely its Downloads, and then run the command below.

sudo dpkg -i <package_name.deb>

To download xulrunner click Here, and for libhunspell-1.2-0 click Here


Why do the installed and most recent version numbers of Gwibber differ?

Some information on Gwibber's website appears to be outdated. The latest blog post, titled Introducing Gwibber 2.30, was written in April 2010.

If you click the Download link on their site you'll see that they refer visitors to version 3.0 for source code releases and to Ubuntu's repository (which also happens to be version 3.0) for packaged releases.


Cannot boot into Ubuntu (12.04) after putting Sapphire 7770 OC on my pc

It sometimes happens when you buy a new graphics card that has an AMD GPU that the graphics card is so new that the latest version of the AMD Catalyst graphics driver for Linux doesn't work on Ubuntu. Sometimes it takes AMD a few months for their latest Catalyst graphics driver for Linux to catch up with the newest models of graphics cards.

There are instructions for how to install the latest AMD Catalyst graphics driver in the answers to the question: Ubuntu 14.04.5/16.04/16.10 and AMD graphics.

Sometimes however you can simply install the fglrx package from the default Ubuntu repositories, and it will work just fine, even with one of the newest models of graphics cards that has an AMD GPU. fglrx is a video driver for the AMD Radeon and FireGL graphics accelerators for Ubuntu 12.04-14.04.


Vmware Horizont Client 4.0.2 64bit Ubuntu 16.04.1 - No home sharing

It looks like a known bug:
according to this thread on vmware communities

  We still doesn't officially support 16.04 in our Matrix. And it's a known issue which is tracked internally.

and

  Thanks for using Horizon product but this is not the right place to talk about product future plan. Please engage with the sales rep of VMware for your company. Thanks.

I have not found any workaround.


Trying to install Xfce on Ubuntu Server 18.04 but no GUI on reboot

You are not doing anything wrong, just not quite done yet.

Install a "Display Manager".

In short the display manager is the GUI login screen that will load the requested "Window Manager", like XFCE, with the entered user credentials.


Finally found the solution

Cannot connect to the internet after installing Cisco AnyConnect VPN Client

sudo dpkg-reconfigure resolvconf


Here's what worked for me:

sudo rmdir /usr/share/ghostscript/9.25/iccprofiles
sudo apt-get install --reinstall libgs9-common

Something had left an empty directory at /usr/share/ghostscript/9.25/iccprofiles.  It appears that libgs9-common creates a symlink from /usr/share/ghostscript/9.25/iccprofiles to /usr/share/color/icc/ghostscript, but silently fails to create it if there's already something in the filesystem.


intalling htk on ubuntu 12.04 inside bin directory

You need to install the following development package (the one providing bits/predefs.h):

sudo apt-get install libc6-dev


Why is "no new release" found after I'm told its available?

do-release-upgrade

should be prefixed with sudo

sudo do-release-upgrade

and you may want to run the following command first

sudo apt-get update

although if you have been upgrading from 9.xx then you probably know that anyway,

so I apologise for stating the obvious if that is the case.   :o)


Unable to change brightness using keys after recent 13.10 update

Are you running nvidia drivers per chance? This seems to be a common issue. Try installing the xbacklight package as a workaround. It won't fix your function keys but at least you can look for an answer without melting your retina's.

$ Sudo apt-get install xbacklight

You can then adjust the settings from a terminal using commands found here.

To increase brightness by 20%:

$ sudo xbacklight -inc 20

Alternatively to decrease:

$ sudo xbacklight -dec 20

Or use the -set parameter to define the exact level:

$ sudo xbacklight -set 50

If this works for you may want to add a new startup entry so it runs on boot. Open "Startup Applications" and add the following details:

Name: Brightness

Command: xbacklight -set 60

Click add and you are done! Hope this helps.


you probably need nmap

  Nmap (“Network Mapper”) is an open source tool for network exploration
       and security auditing. It was designed to rapidly scan large networks,
       although it works fine against single hosts. Nmap uses raw IP packets
       in novel ways to determine what hosts are available on the network,
       what services (application name and version) those hosts are offering,
       what operating systems (and OS versions) they are running, what type of
       packet filters/firewalls are in use, and dozens of other
       characteristics. While Nmap is commonly used for security audits, many
       systems and network administrators find it useful for routine tasks
       such as network inventory, managing service upgrade schedules, and
       monitoring host or service uptime.

check the manpage for the nmap command

Here a list of network tools that could you be interested in:

1) Wireshark -- network traffic analyzer

2) Nessus -- Remote network security auditor

3) Nmap -- The Network Mapper

4) Etherape -- graphical network monitor modeled after etherman

5) Kismet -- Wireless 802.11b monitoring tool

6) Chkrootkit -- Checks for signs of rootkits on the local system

7) Rkhunter -- rootkit, backdoor, sniffer and exploit scanner

8) tiger -- Report system security vulnerabilities

and much more security tools here


Multiline R commands are only partially shown in the command line history

See https://stackoverflow.com/questions/16226216/r-command-history-how-to-configure-up-arrow-to-treat-multiline-brace-enclosed

For instance

f <- function(x) # press Ctrl+v Ctrl+j NOT shift+enter
x^2

What you are looking for is not possible in my understanding using the R terminal from bash


I found that telepathy-butterfly, the package that allowed this in empathy has been replaced by telepathy-haze. Installing telepathy-haze solved this for me.

sudo apt-get install telepathy-haze

https://launchpad.net/ubuntu/precise/amd64/telepathy-butterfly


Right click on said folder
Left click on "Properties"
Ceckbox "Always check for new mail in this folder"


Application running over ssh (X11 forwarding) lagging a lot with local dual monitor

I came across this answer while looking for a solution to the same problem. To be honest, I did not manage to entirely solve this issue, though I suspect it has something to do with the X11 protocol and I am sure there is proper fix for that out there. In the meantime, I found a workaround that makes it possible to run the application over SSH while keeping the other screen on.

Namely, need to run a virtual machine on the local desktop limited to a single screen and then connect via SSH to the remote server. It goes without saying that the virtual machine should have enough resources, especially video memory if the application is heavy on the visual aspect; network paravirtualization is also something nice to have.

This process can be a bit more of a hassle than simply turning off one display, but you get to use the two monitors in exchange. If you are going to run that application over SSH regularly, I find it's worthwhile setting the virtual machine - and most will probably have one already.


dpkg -i complains of "conflicting packages" when installing self-compiled kernel

apt-get remove linux-image-4.15.0-29-lowlatency

say no, you don't wish to abort removing your running kernel so it gets removed. Then

dpkg -i $new-kernel+jeff

will succeed.


Ubuntu 20.04 Server install from USB - Sorry there was a problem completing the installation

Thank you for your solution, but it did not help in my case. I tried several things:

Different USB Sticks
Different USB Ports
Different USB media creation tools on different operating systems (Rufus, Balena, Unetbootbin, Universal USB Installer)
18.04 Server

Nothing worked.
My solution/workaround:

Use Unetbootbin to create the media
Chose the legacy 18.04 Netinstall image
Upgrade to 20.04 with sudo do-release-upgrade

This was the only way I got it to work


There are several steps to get the very latest chromium-browser package running on Precise Pangolin, but I have succeeded and so should you!

1. Install from PPA:

This PPA is not recommended for general use but worked well on my Precise Pangolin system:

sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser

chromium-browser will not work out of the box as you have experienced until a few other issues are attended to...

2. Missing libatomic:

You will see an error when loading chromium-browser from the command line: a missing library libatomic.so.1. You can search for this missing file by using the great utility apt-file:

sudo apt-get install apt-file
apt-file update

(This creates a local index rather than a system one, use sudo apt-file update if you want a system index.)

You will be prompted to download file indices and you should accept this prompt and allow the download. Then search for the missing file:

andrew@ithaca:~$ apt-file search libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib/libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib/libatomic.so.1.0.0
gcc-mozilla: /usr/lib/gcc-mozilla/lib32/libatomic.so.1
gcc-mozilla: /usr/lib/gcc-mozilla/lib32/libatomic.so.1.0.0
andrew@ithaca:~$

You can see that it is part of the gcc-mozilla package which you can install as follows:

sudo apt-get install gcc-mozilla

Note that shared libraries are not sourced from the gcc-mozilla installation location as demonstrated here:

andrew@ithaca:~$ ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/local/lib:
/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu/mesa-egl:
/usr/lib/x86_64-linux-gnu/mesa:
/lib32:
/usr/lib32:
/lib:
/usr/lib:
andrew@ithaca:~$

So we add an extra path for chromium-browser with a slight variation of the technique demonstrated by @Renaud:

sudo touch /etc/ld.so.conf.d/chromium-browser.conf
echo "/usr/lib/gcc-mozilla/lib" | sudo tee -a /etc/ld.so.conf.d/chromium-browser.conf
sudo ldconfig

And you will now see the added search path:

andrew@ithaca:~$ ldconfig -v 2>/dev/null | grep -v ^$'\t'
/usr/lib/gcc-mozilla/lib:   <------------- Here!
/usr/local/lib:
/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu:
/usr/lib/x86_64-linux-gnu/mesa-egl:
/usr/lib/x86_64-linux-gnu/mesa:
/lib32:
/usr/lib32:
/lib:
/usr/lib:
andrew@ithaca:~$

Note: If you try the aptitude build-dep chromium-browser method this step (adding the LD path) will still need to be followed...

But still more errors:

3. Missing  libXss.so.1:

You will then get an error message:

error while loading shared libraries: libXss.so.1:
cannot open shared object file: No such file or directory

Once again apt-file will locate the appropriate package:

andrew@ithaca:~$ apt-file search libXss.so.1
libxss1: /usr/lib/x86_64-linux-gnu/libXss.so.1
libxss1: /usr/lib/x86_64-linux-gnu/libXss.so.1.0.0
libxss1-dbg: /usr/lib/debug/usr/lib/x86_64-linux-gnu/libXss.so.1.0.0
andrew@ithaca:~$

And then install this library as follows:

sudo apt-get install libxss1

And that should do it as chromium-browser has no problem finding the library once installed!

4. Running the browser:

Running nicely here:

andrew@ithaca:~$ chromium-browser --version
Chromium 52.0.2743.116 Built on Ubuntu , running on Ubuntu 12.04
andrew@ithaca:~$

And the obligatory screenshot:

Click for full sized image....

And have fun :)

References:

Debian Wiki: apt-file
SO: How to print the ld(linker) search path


How can I hibernate on Ubuntu 17.10 or save my session?

The main source for this answer (aside from my own experience) is this page on the Arch Linux wiki.
In this answer I use sudoedit to make changes to root-owned files. If you prefer, you can just call your favourite text editor with root permissions, but if you want to use a GUI editor and are using Wayland, see Why don't gksu/gksudo or launching a graphical application with sudo work with Wayland?).
If you cannot hibernate, be aware that you can still (probably) save power by using the suspend state, where the state of RAM is maintained. The systemd command for this is systemctl suspend, and it's somewhat more likely to work than hibernation.

It should be said that hibernation is not guaranteed to work; that's why initiating hibernation via the GUI is disabled by default. Even if you do everything right, you may still have problems. Your system may crash, your machine state may not be recoverable (you may lose unsaved work, for example) and you may find yourself in the sad situation of holding-down-the-power-button-for-a-very-long-time. I recommend only attempting to test hibernation after saving all of your work, and leaving only some idle application open (such as a terminal emulator that isn't doing anything).
Hibernation involves writing the state of RAM to an area of the disk. The swap space is used for this purpose. Whether it is a file or a partition, it should work in the same way. The Arch Wiki says that you should be able to hibernate if your swap is at least 2/5 of the size of RAM. Redhat provide this guidance on swap size needed for hibernation which totally contradicts the Arch Wiki! But I recommend other debugging steps before you attempt to increase the size of swap space.
If you are using Btrfs you may not be able to hibernate and Btrfs does not support swap files, according to the Arch Wiki. The default format for main partitions on Ubuntu 17.10 (and all other currently supported versions) is ext4, not Btrfs, so most users won't need to worry about this.
NirajW's answer here explains how to test and enable hibernation if it works. The command it suggests is
sudo pm-hibernate

This fails for me no matter what other adjustments I make (my system instantly hangs and never recovers). Instead I use
sudo systemctl hibernate

You may also try
echo disk | sudo tee /sys/power/state

Hibernation is the lowest possible power state (ACPI S4). What should happen is that the system shuts down, the machine is off and can be left off indefinitely, and when you turn it back on, instead of a clean boot, you log in and resume your session.
If you get a clean boot when you try to hibernate, the first thing to try is to set a boot parameter so that GRUB knows where to find the machine state to load back into RAM on resume (at least, that's how I understand the process. If this isn't accurate, please correct me).
Setting boot parameters for resume
Fresh installations of Ubuntu 17.04 and 17.10 have a swap file. If you have upgraded from an earlier installation, you will still have a swap partition. The procedure for setting up resume parameters is different if you have a swap file. Check your configuration by running
grep swap /etc/fstab

If you have a swap partition, the output will show the partition label, for example
# swap was on /dev/sda3 during installation

If there is no output, run
ls /

and look for /swapfile.
If you have a swap partition
To add the resume parameter, you would run
sudoedit /etc/default/grub

Find the line that begins GRUB_CMDLINE_LINUX_DEFAULT= and add to the parameters between the double quotes the string resume=/Your/Swap/Partition, replacing /Your/Swap/Partition with the device file path you found in /etc/fstab. In the example I have given, the full line would probably be (depending on what other parameters were being used - quiet and splash are the default parameters on a desktop Ubuntu installation):
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sda3"

After editing this file, you must run
sudo update-grub

to write the configuration to the file GRUB reads on boot. If you forget to do this, your changes will have no effect ;) You are also advised to reboot after this before attempting hibernation.
If you have a swap file
You need to set a parameter for resume from hibernation. Your /swapfile should be in your root partition, so set a boot parameter  resume=/Your/Root/Partition where /Your/Root/Partition is the device file path for your root partition, for example, /dev/sda2. If you are not sure, check the contents of /etc/fstab to see which partition is mounted on /
You also need to set a boot parameter for the offset of the swap file. You can find the value for this parameter by running the command sudo filefrag -v /swapfile. Here is the start of this command's output on my system (it's exactly the same as the output I got on 17.04, but I'm now using Ubuntu MATE 17.10):
$ sudo filefrag -v /swapfile
Filesystem type is: ef53
File size of /swapfile is 1425873920 (348114 blocks of 4096 bytes)
 ext:     logical_offset:        physical_offset: length:   expected: flags:
   0:        0..   32767:      34816..     67583:  32768:
   1:    32768..   63487:      67584..     98303:  30720:
   ...

The number for the offset parameter is the first number in the physical_offset column. In my example, it's 34816. That means that the boot parameter I'd set would be resume_offset=34816.
To add the two boot parameters, edit the configuration file for GRUB:
sudoedit /etc/default/grub

Find the line beginning GRUB_CMDLINE_LINUX_DEFAULT= and add the two boot parameters, to that after your changes, the line reads something like
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=/dev/sda2 resume_offset=34816"

but replace /dev/sda2 and 34816 with the values for your system.
Save the file, exit, and run
sudo update-grub

to write the configuration to the file GRUB reads when it is loaded. Reboot, and try hibernation again.
If you still cannot hibernate, try disabling Secure Boot in your UEFI (or BIOS) settings, if not already done.
If you still cannot hibernate, you can attempt to debug the process by setting some additional boot parameters, as explained in detail in this post on debugging sleep states. Edit /etc/default/grub again, remove the parameters quiet and splash and add the debug parameters you want to try (for example, I use initctl_debug and no_console_suspend), run sudo update-grub, reboot, and try again.
Information made available by the debug parameters may lead you to figure out what is going wrong and might enable you to come up with a solution. I use my own system as a case study in my answer to another question on hibernation. In my case, the problem is always buggy drivers. In every version of Ubuntu I have used, I have needed to unload the brcmfmac module from the kernel before hibernation and reinsert it on resume. If more essential modules need to be unloaded, I use a sort of script (run with sudo bash filename) for hibernation (replacing list of buggy modules with the names of the actual modules that need to be pulled out):
modprobe -r list of buggy modules &&
echo disk > /sys/power/state
modprobe list of buggy modules

I use the && operator so that hibernation isn't attempted if unloading fails for some reason. If resume succeeds, the modules are immediately reloaded into the kernel, so the system should stay up.
You may well find different steps are needed for your particular system.


Chromium/Chrome window is black in Ubuntu 16.04/18.04

Running Chrome with --use-gl=angle does the trick for me and I don't have to turn off the 3D acceleration. The command looks like this:

google-chrome --use-gl=angle

However for the normal usage I've modified every exec line in /usr/share/applications/google-chrome.desktop and added the mentioned param, so it looks like this (notice there are three occurences of exec):

Exec=/usr/bin/google-chrome-stable %U --use-gl=angle

Works in Ubuntu 16.10, VirtualBox 5.1.12


How is the launcher's placement defined?

The Launcher's placement is defined by a few things:

The value, set in /org/compiz/profiles/unity/plugins/unityshell/num-launchers. You can read it by the command:

dconf read /org/compiz/profiles/unity/plugins/unityshell/num-launchers

which will output either 1 (launcher on one screen) or 0 (launcher on all screens).

To set the launcher to visible on all screens can be done by the command:

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers 0

If the value is 1 (visible on only one screen), we can set on which screen the launcher appears, by setting the targeted screen as primary screen, with an xrandr command:

xrandr --output <screen_name> --primary

Those are exactly the commands the script(s) below use(s).

Script1; manually set the launcher to only left or on both screens (with a key shortcut)

Depending on the argument you run the script with, it either sets the launcher to show on all screens with the command:

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers 0

or on only one:

dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers 1

In the latter case, it also sets the left screen as the primary one.

The script

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

key = "dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers "

arg = sys.argv[1]

if arg == "left":
    # the launcher is set to show on all screens
    subprocess.Popen(["/bin/bash", "-c", key+"1"])
elif arg == "all":
    # the launcher is set to show only on the left screen
    subprocess.Popen(["/bin/bash", "-c", key+"0"])
    # make sure the left screen is the primary one
    scr_data = subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()
    left = [l.split()[0] for l in scr_data if "+0+0" in l][0]
    subprocess.Popen(["xrandr", "--output", left, "--primary"])

How to use

Copy the script into an empty file, save it as launcher_pos.py
Test the script with both the commands (from a terminal window):

python3 /path/to/launcher_pos.py left

and

python3 /path/to/launcher_pos.py all

if all works fine, add the commands to two shortcut key combinations: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add both commands to available shortcuts.

Script 2; automatic version

The script below automatically keeps track of which is the current workspace (no matter how many workspaces you have and in what configuration).

This script is run with the workspaces, where you want the launcher only on the left, as an argument. An example:

If you run the script with the command:

python3 /path/to/launcher_pos.py 2 3

The result is:

The script

import subprocess
import sys
import time

wspace = sys.argv[1:]
key = "dconf write /org/compiz/profiles/unity/plugins/unityshell/num-launchers "

def get_res():
    # get resolution
    xr = subprocess.check_output(["xrandr"]).decode("utf-8").split()
    pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

res = get_res()

def get_dt():
    # get the current viewport
    vp_data = subprocess.check_output(["wmctrl", "-d"]).decode("utf-8").split()
    dt = [int(n) for n in vp_data[3].split("x")]
    cols = int(dt[0]/res[0])
    curr_vpdata = [int(n) for n in vp_data[5].split(",")]
    curr_col = int(curr_vpdata[0]/res[0])+1; curr_row = int(curr_vpdata[1]/res[1])
    return str(curr_col+curr_row*cols)

def set_launcher(arg):
    if arg == "left":
        # the launcher is set to show on all screens
        subprocess.Popen(["/bin/bash", "-c", key+"1"])
    elif arg == "all":
        # the launcher is set to show only on the left screen
        subprocess.Popen(["/bin/bash", "-c", key+"0"])
        # make sure the left screen is the primary one
        scr_data = subprocess.check_output(["xrandr"]).decode("utf-8").splitlines()
        left = [l.split()[0] for l in scr_data if "+0+0" in l][0]
        subprocess.Popen(["xrandr", "--output", left, "--primary"])

curr_ws1 = get_dt()

while True:
    time.sleep(1)
    curr_ws2 = get_dt()
    if curr_ws2 != curr_ws1:
        if curr_ws2 in wspace:
            arg = "left"
        else:
            arg = "all"
        set_launcher(arg)
    curr_ws1 = curr_ws2

How to use

The script needs wmctrl

sudo apt-get install wmctrl

Copy the script into an empty file, save it as launcher_pos.py
Test run it by the command:

python3 /path/to/launcher_pos.py 1 3

On workspace 1 and 3, the launcher now should appear only on the left
If all works fine, add it to your Startup Applications: Dash > Startup Applications > Add. Add the command:

/bin/bash -c "sleep 15 && python3 /path/to/launcher_pos.py 1 3"

(If workspace 1 and 3 are the ones you only want the launcher on the left)


Ubuntu kills USB 3.0 Chipset on Asus Z87-PRO motherboard

@Fabby, I don't think cosmic rays had anything to do with @heemayl issue because I am having the exact same issue. I also have an Asus Z87 Pro Mobo and after I updated to Ubuntu 15.04 the top 4 USB ports stopped working. My first thought was to RMA the board, but I've been seeing reports of issues with kernel 3.19 and the ASMedia USB controller.

More digging is in order, I'll reply on this thread I am able to find anything else.


Using find and stat to display filename(s) and statistics

Use:

find . -name 'geo*' -exec stat -c%n\ %y {} \;

Use stat --help for more info


Broken Dependencies (Symbol Lookup Error for hb_font_funcs_set_variation_glyph_func in libpangoft2-1.0.so.0) from 16.04 to 18.04

The solution of the problem was multi-step:

Install all upgrades without package removal by
sudo aptitude safe-upgrade

Remove duplicate trigger /usr/lib/gdk-pixbuf-2.0/2.10.0/loaders from /var/lib/dpkg/triggers/File

To get all upgrades installed I would recommend to run
sudo apt-get update
sudo apt-get dist-upgrade


Software uninstalled, apparently at random

I've seen this kind of thing happen when an apt update produces a conflict -- the "requested" package will be installed or upgraded, and conflicting packages (for instance, those that depend on a different version of an upgraded package) will be removed.

Unfortunately, fixing it can be time consuming; you'll have to check all the dependencies (at least at top level) for each removed package against the installed versions.  Chances are you'll find a single common library between the missing packages that has a higher installed version than the missing packages will work with.

Sometimes you can downgrade the upgraded packages, but it's usually preferred to try to find an upgrade for your missing packages.

This usually happens because your missing packages weren't installed from the core repositories for your OS, but rather from third-party repos or PPA sources, or compiled from source -- and the source of the missing packages was slower updating than the core repos, or simply no longer supports the version of Ubuntu you're using and will require you to upgrade your entire OS.


I need to know how to get my wireless to work

Are you saying that you do have a wireless router working, and you intend to connect to the wireless network in Ubuntu 12.04? In this case you might want to check out the bar at the top of the screen; there is an icon, by clicking which you can see something like
Enable Wireless Network. Make sure it's ticked and you should be able to find your network in that popup menu. Click on the network and follow the instructions!


Uninstalling Dependencies. Is This a Good Practice?

It should be quite safe. Autoremove removes only packages, which were installed by dependency of a removed package. They should not be needed.
You are correct. Your system should be as before you installed 'packagename'.


Unable To Boot into Ubuntu 14.04 LTS from USB

which mobo do you use ? it must have a select boot device option, like Intel boards used to have F10 or set the boot sequence to removable drives first in bios

for bootable media i suggest dd it works like a charm

dd if=/PathToIso/ubuntu.iso of=/dev/sdb

replace sdb with your usb drive
then boot into it
format the drive first before using dd remember to use whole drive instead of partition like use sdb instead of sdb1

and if after all your installation done sometimes dd does funny things with partitions,fortunately thats easy to fix too fill it with zero

dd if=/dev/zero of=/dev/sdb

and format the drive ,hope this helps :)


How to automatically run one or more lines of code after booting?

If you'd like to start a script when Gnome is starting, look here. Putting an setxkbmap in .bashrc won't help if the X server is not running (yet) and if you're not (manually!) starting a terminal each time after the X server starts. Caveat: I haven't tried either 'solution', because I verified the solution below and it works:
If you edit two files (as superuser - be careful!) on your system, you could have each user configure the layout for themselves and never worry about it again:
sudo nano /usr/share/X11/xkb/rules/evdev.xml

and insert the following just below the variant altgr-intl:
    <variant>
      <configItem>
        <name>eu</name>
        <!-- Keyboard indicator for European layouts -->
        <shortDescription>eu</shortDescription>
        <description>EurKEY (US based layout with European letters)</description>
        <languageList>
          <iso639Id>cat</iso639Id>
          <iso639Id>dan</iso639Id>
          <iso639Id>eng</iso639Id>
          <iso639Id>est</iso639Id>
          <iso639Id>fao</iso639Id>
          <iso639Id>fin</iso639Id>
          <iso639Id>ger</iso639Id>
          <iso639Id>gre</iso639Id>
          <iso639Id>gsw</iso639Id>
          <iso639Id>ita</iso639Id>
          <iso639Id>lav</iso639Id>
          <iso639Id>lit</iso639Id>
          <iso639Id>nld</iso639Id>
          <iso639Id>nor</iso639Id>
          <iso639Id>por</iso639Id>
          <iso639Id>spa</iso639Id>
          <iso639Id>swe</iso639Id>
        </languageList>
      </configItem>
    </variant>

(I took this from /usr/share/X11/rules/evdev.extra.xml and replaced layout with variant. Note that French is missing: you will not find this variant if you choose French (see below).) Next edit:
sudo nano /usr/share/X11/xkb/rules/xorg.lst

and insert one line below altgr-intl:
      eurkey          us: English (US based layout with European letters)

The last thing you need to do is to reconfigure the xkb-data:
sudo dpkg-reconfigure xkb-data

Now, the user will be able to run gnome-control-center (aka 'Settings'), go to 'Region and Language' and add a keyboard layout:

Choose English (United States) and see this after you scroll down quite a bit:

Choose EurKEY and that user is done, even when the system is shutdown and rebooted. In other words: the setxkbmap eu is no longer necessary!

There might be something wrong with the way EurKEY is integrated. The setxkbmap eu works out-of-the-box on my Ubuntu 20.04, but I cannot find it anywhere in the gnome-control-center (if that's what is meant by "keyboard layout configuration panel" on the EurKEY website).
On their website, there is an eurkey.deb. Looking inside (ar -x eurkey.deb and tar xvf control.tar.gz) we find a postinst script that edits some xml files in /usr/share/X11/xkb/rules. The edits are different from what is distributed but I used it to see how they did it. They're adding a layout called eu, but I don't know how to select the language eu. Then again, I'm no expert.
We did develop an alternative for altgr-intl that suits European languages a bit better and in the process we had to do something similar for the new layout.
Keyboard layouts that suit everyone are hard to make. EurKEY was made in Germany and it shows: the Portugese use a-tilde and o-tilde a lot, but it's not on EurKEY. I like our new altgr-weur better, but I'm biased!


How to fix google sheet shortcuts in ubuntu?

In Ubuntu 18.04 LTS using a Google Sheet opened in Firefox (which I use daily), if you click on Help you will see the following menu

from which you will see that to access Keyboard shortcuts the shortcut is Ctrl/ which in turn presents:

Indeed, if you have opened Google Sheets in Firefox, pressing Alth will bring up Firefox help menu.
Ctrlh will invoke Find and Replace in Sheets.


How add Second HDD and create new folders for sharing

To check for available drives and list their mount point use:

lsblk

The -f flag will scan for file systems, UUIDs and labels (requires super-user privileges).


Tomboy Notes panel no longer shows note titles after upgrade from Lucid to Maverick

This is due to a bug with the notification area fallback of the new Tomboy indicator. You'll see the fallback if you've removed the indicator applet that hosts application indicators from your panel. To see note titles until it's fixed, you can either add "Indicator Applet" back to your panel, or use Tomboy as an applet.


How to restore battery status indicator in landscape mode?

Make sure that the indicator-power is installed.

sudo apt-get install indicator-power

If it's installed though then you can try re-installing it.

sudo apt-get purge indicator-power
sudo apt-get install indicator-power

UPDATE:
The whole indicator applet:Clone of the GNOME panel indicator applet
sudo apt-get install indicator-applet-complete
Unity Global Menu type applet: Clone of the GNOME panel indicator applet
sudo apt-get install indicator-applet-appmenu
Session applet: Clone of the GNOME panel indicator applet
sudo apt-get install indicator-applet-session
Win+Alt+Right click the panel if using Gnome-Classic or
Alt+Right click the panel if using Gnome-Classic (No Effects)
Choose Add To Panel and add the following indicator

ALSO:
UPDATE2:

cat /sys/class/power_supply/BAT0/uevent |grep POWER_SUPPLY_CAPACITY

in acpi

sudo apt-get install acpi
acpi -b
produces kind of:

Battery 0: Charging, 43%, 06:09:08 until charged

battery-status

sudo add-apt-repository ppa:iaz/battery-status && sudo apt-get update
sudo apt-get install battery-status
/usr/lib/battery-status/battery-status --indicator


Alright then. Sounds like you need to reset your password. Follow these steps and you'll be on your way!

Reboot
At boot menu, select "Ubuntu (recovery mode)"
At the next menu, select "Root" using the up/down keys and hit enter.
Run this command to mount the root filesystem as read/write (it starts off in read-only): mount -o remount,rw /
Finally: passwd [username] (where [username] is the username of your account).
reboot


Bash script and escaping special characters in password

Use double quotes twice, escaped and not escaped: -p"\"$MYPASSWORD\""

#!/bin/sh
source pass.cre
/usr/bin/ssh -p 91899 user@remoteHost 'mysqldump -u db_user -p"\"$MYPASSWORD\"" my_database |  gzip -c >  my_database.sql.gz'

Or an other version

/usr/bin/ssh -p 91899 user@remoteHost "mysqldump -u db_user -p\"'io#bc@14@9$#jf7AZlk99'\" my_database | gzip -c > my_database.sql.gz"

Examples

% source pass.cre
% ssh user@host mysqldump -u root -p$MYPASSWORD
user@host's password:
zsh:1: bad pattern: -p#8111*@uu(

% source pass.cre
% ssh user@host mysqldump -u root -p"$MYPASSWORD"
user@host's password:
zsh:1: bad pattern: -p#8111*@uu(

% source pass.cre
% ssh user@host mysqldump -u root -p"\"$MYPASSWORD\""
user@host's password:
Warning: Using a password on the command line interface can be insecure.


Changes Aren't Saved After Shut Down - Ubuntu 16.10 Live USB

You can either do a Full install to pendrive, as you would to internal drive or do a Persistent install.
If a Full install, it is recommended to first disable the internal drive.
A persistent install is more compact and will fit on a 2GB or larger drive.

Startup Disk Creator that comes with Ubuntu no longer does persistent installs.

Unetbootin will do persistent installs and has a Linux version and a Windows version. Persistence is limited to 4GB with UNetbootin as it uses a FAT32 file system.

I prefer mkusb, a Linux only installer.
Mkusb makes several partitions, a boot partition, a read only ISO9660 OS partition, a casper-rw persistent partition, (without the 4GB limit) and a NTFS data partition that can be accessed by both Windows and Linux.

https://help.ubuntu.com/community/mkusb


For us, we use custom port and tcp.  I found that if I removed the protocol and port used after the remote ip address, this helps.  you would have to enter it manually but it saves a lot of time from manually building the entire profile.

For instance, within the .ovpn file...since we use custom a custom port and TCP:
remote x.x.x.x 1187 tcp
Remove "1187 tcp" and save.

This worked for me.

You might be using some other custom config within the file that the program doesn't like.  try removing these and adding manually after the file is accepted.


Cannot scroll in terminal of minecraft server

The scrollbar is not shown if something switches to the so-called alternate screen of the terminal emulator. It could be the app in question, e.g. if it uses ncurses (which I doubt for something that produces a sequential output, as seen in your screenshot). screen and tmux also switch to this mode.

I'm not familiar with Minecraft server at all, but a random web find says to run it as screen /home/minecraft/run.sh. If that's what you do, it's screen that switches to this mode and not the minecraft run.sh itself.

You can run it without screen, in which case you lose the functionality provided by screen, e.g. to be able to detact and attach back later. Or you can use the scrolling capabilities (keyboard actions) provided by screen itself, consult screen's documentation for what these keys are.


Difference between shutdown -r and shutdown -P?

You can get information about commands by typing:

man <command>

For the shutdown command you get:

OPTIONS
   -r     Requests that the system be rebooted after it has been brought down.

   -h     Requests that the system be either halted or powered off after it has been brought down, with  the  choice  as  to
          which left up to the system.

   -H     Requests that the system be halted after it has been brought down.

   -P     Requests that the system be powered off after it has been brought down.

   -c     Cancels a running shutdown.  TIME is not specified with this option, the first argument is MESSAGE.

   -k     Only send out the warning messages and disable logins, do not actually bring the system down.


Ubuntu 12.04 to 14.04 LTS Upgrade Crash!

I would say that the best that you could do is to backup your data, keep your settings ( ~/.config/ etc, see below) and do a clean install of 14.04, because I think that more things than just your package management system may have been messed up.

Finding out what has happened and how to fix it would be a very difficult thing to do.

A full guide for settings backup is How to backup settings and list of installed packages

For a start what to backup - and to make very clear it's not just ~/.config/:
At least any dir of file in $HOME starting with a dot, ~/.*. You can then sort out things like large, irrelevant dirs or subdirs: ~/.thumbnails, ~/.mozilla/firefox/*/CACHE ... - There is certainly more config data elsewhere; but not much more.


So, the answer is here:

By default, Ubuntu does not allow access through the web browser to
any file apart of those located in /var/www, public_html directories
(when enabled) and /usr/share (for web applications). If your site is
using a web document root located elsewhere (such as in /srv) you may
need to whitelist your document root directory in
/etc/apache2/apache2.conf.
The default Ubuntu document root is /var/www/html. You can make your
own virtual hosts under /var/www. This is different to previous
releases which provides better security out of the box.

Just added my folder to the file and it started working
Thanks


is there a way to get the option "Organize Desktop by Name" in Ubuntu 19.10 same as in 18.04?

Short answer: There is for now no possibility of getting the option "Organize Desktop by Name" back, apart from developping the source code of the Gnome Shell extension that provides desktop icons in Ubuntu 19.10.

Background: In Ubuntu 18.04, it was still the file manager 'nautilus' that provided the icons on the desktop. Gnome developers removed that function in newer versions of nautilus. In fact, Ubuntu 18.04 still shipped with an older version of nautilus to be able to keep the desktop icons.

Since Ubuntu 19.04, icons on the desktop are being implemented through a new Gnome Shell extension Desktop Icons. As this is a quite recent extension, it probably is not quite finished, and several functions that were available in nautilus have not yet been implemented in the extension.

Workaround: One could remove the Gnome Desktop shell extension, and then replace the file manager 'nautilus' by 'nemo', which still provides the functionality, but then it might be easier to switch to the cinnamon desktop altogether, or move to xfce or another desktop where desktop icons continue to be fully supported.


It's because the ^ symbol on the keyboard layout you are using is a "dead key" (dead_circumflex). You can do:
x + ^ + ^ + 2
or
x + ^ + Space + 2
to achieve what you want.
Or you can switch to some other keyboard layout or customize the layout you are using.