Note: (2016-02-22) I've realised this config leaks DNS queries to the torrent trackers through the normal WAN, instead of sending it through the VPN. I'm investigating how to fix this. I'm going to keep running my config though, since the connection itself does use the VPN properly.

Update: I've noticed that when I set Transmission to download overnight on the Beaglebone, CPU usage goes to 100% after a while. It doesn't seem to happen after the same amount of time, sometimes it's fine all night, other times it struggles after 10 minutes. It can also recover by pausing all torrents and waiting for CPU load to return to normal, then starting again. I'm still investigating. A workaround might be to pause and resume torrents periodically, although it's not a very good workaround.
Note this issue only applies to the Beaglebone, and probably other ARM devices. I've never had this issue on a x86 CPU.

Introduction

I've developed and tested this solution for Ubuntu 14.04, running on a BeagleBone Black. The VPN provider I am using is called ibVPN. It should work with any supported hardware though (i.e. on a "normal" x86 computer), with any OpenVPN compatible VPN provider - and should probably work for 14.10 or later. At some point I believe Ubuntu will use SystemD for boot, which will mean the Upstart scripts used here will need to be migrated. Update: Jonas Kalderstam has an answer below for using SystemD. I'm also assuming that ufw is being used as the firewall, if you are using something different then the ufw commands here will need to be changed.

I assume that all work is done over an SSH connection to the system, although it would work just as well if typed out into a physical terminal.

This is quite a long tutorial, please read all of it first and make sure you are comfortable with what you will be doing.

I've also noticed that Transmission does not properly bind to an IP address for sending UPnP/NAT-PMP data - i.e. torrent data correctly goes through the VPN, but if UPnP port forwarding is enabled Transmission will request the port forward from the local router, not through the VPN from the VPN server. Hence I've made the Upstart script disable port forwarding, since it might appear as though it has worked, but it has not. It should be possible to use iptables and iproute to force all traffic from the debian-transmission user through the VPN, but I am still looking into this. It should also work if the default route was changed to send all Internet data through the VPN, but I didn't want to do that because I use this server for other things too, and this would also cause all system updates to come through the VPN. The effect of this is that Transmission will probably download torrents slower than it could if port forwarding worked - but I've found that reasonable speeds can be achieved for most torrents without port forwarding. This question has further information if you really want to get UPnP working over the VPN.
Update: falk0069 has a fantastic tip below for helping to encourage UPnP over the VPN.

Installing and configuring OpenVPN

I'd recommend that you try getting your VPN connection to work using Ubuntu before trying to get it to work here - i.e. from a desktop. This will confirm that you have the correct configuration and reduce time spent debugging.

First, install the required packages

sudo apt-get install openvpn

Next, make a directory to store the configuration files in. I'm using /opt/ibVPN, since that's the provider I'm using. Change it to whatever you like.

sudo mkdir /opt/ibVPN

The first thing to do in this new directory is to create the config file for running the VPN client. ibVPN provides a basic config file for Linux users, which I've mostly just copied and pasted.

cd /opt/ibVPN
sudo vim config.ovpn

Copy and paste your edited version into vim, using the settings for your VPN provider. (FYI, paste in the Ubuntu terminal is Ctrl+Shift+V)
You should be able to get this from your VPN provider.

remote 888.888.888.888 1194 udp      #This address will be different for you
client
dev tap1
resolv-retry infinite
script-security 3 system
explicit-exit-notify 3
persist-key
mute-replay-warnings
ca ibvpn.com.crt
comp-lzo
verb 3
mute 20
ns-cert-type server
fragment 1300
route-delay 2
reneg-sec 0
max-routes 5000
link-mtu 1578

auth-user-pass pass
auth-nocache
persist-tun
route-noexec
lport 1195
lladdr 00:FF:11:AA:BB:CC
route-up "/opt/home/openvpn/route-up.sh"
down "/opt/home/openvpn/down.sh"

For those unfamiliar with vim, press Insert to type or paste text, then press Escape and type :wq to save and quit. Of course, you don't have to use vim - any text editor will work.

I'll quickly explain this config file: The first 18 lines specify the specific settings to use with the server, these came from ibVPN - yours will probably be slightly different if you have a different provider. The next lines are modified options I've specified.

If your settings file had any lines with auth-user*, comment these out. For this setup to work automatically, we need to have a file with the username and password in it - so make sure the password you chose for the VPN provider is strong, random, and unique.
The auth-user-pass pass tells OpenVPN to look for a file called pass to read the user and password from.
auth-nocache removes the password from memory, which might slightly increase security if you are worried about it.
persist-tun will try to keep the same IP address from the server if your connection drops out, which should hopefully mean less starting and stopping of Transmission-daemon.
route-noexec tells the OpenVPN client not to automatically use the routes provided by the server - which would pull all network traffic over the VPN. We just want to send torrent traffic, so we will need to use different routing settings.
lport 1195 tells the OpenVPN client to use port 1195 instead of 1194 - in my case I also want to run an OpenVPN server on the same device, and the server will need to use port 1194. Even if you aren't running an OpenVPN server, it doesn't hurt to make this change.
I changed the line dev tap to dev tap1, to force the virtual device to be tap1 instead of being assigned by OpenVPN, again because of running a separate OpenVPN server. Even if you're not running a VPN server, this change shouldn't matter. The firewall scripts have been written to use tap1, so if you would rather use another device then remember to change those scripts where appropriate.
lladdr 00:FF:11:AA:BB:CC tells OpenVPN to assign the tap interface to have this MAC address, which can be useful for iptables firewall rules.
route-up and down run scripts to start and stop Transmission-daemon as required - these are needed here because they run with environment variables containing information about the connection, which is needed to correctly bind Transmission to the right IP address and port.

In my case, I had a server certificate from the VPN provider - which also has to be in the same directory as the config file.

sudo vim /opt/ibVPN/ibvpn.com.crt

Copy and paste this, or move it via SCP or SSHFS.

-----BEGIN CERTIFICATE-----
MIIDeDCCAuGgAwIBAgIJAMVKgpjMPUfxMA0GCSqGSIb3DQEBBQUAMIGFMQswCQYD
VQQGEwJVUzELMAkGA1UECBMCQ0ExFTATBgNVBAcTDFNhbkZyYW5jaXNjbzEVMBMG
A1UEChMMRm9ydC1GdW5zdG9uMRgwFgYDVQQDEw9Gb3J0LUZ1bnN0b24gQ0ExITAf
BgkqhkiG9w0BCQEWEm1lQG15aG9zdC5teWRvbWFpbjAeFw0xMDA3MjExOTU5MzVa
Fw0yMDA3MTgxOTU5MzVaMIGFMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFTAT
BgNVBAcTDFNhbkZyYW5jaXNjbzEVMBMGA1UEChMMRm9ydC1GdW5zdG9uMRgwFgYD
VQQDEw9Gb3J0LUZ1bnN0b24gQ0ExITAfBgkqhkiG9w0BCQEWEm1lQG15aG9zdC5t
eWRvbWFpbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAz23m3BXY5Asiw8Dx
T4F6feqsp+pIx6ivftTniyUCbSAxI1J1s1x75DzxmUpIwPu5xavzgPXgZr8FT81X
JGqF9km4AE95iddJawKx0wNgdTo7GximQq9rw0dsQIB5hZZQ9TJwHC3VOnmEic5A
OawKOCybMcRs8saLakZOgh7Xc+UCAwEAAaOB7TCB6jAdBgNVHQ4EFgQUeRhE2N4l
XwL4H1dbjkZ4ou6fj3AwgboGA1UdIwSBsjCBr4AUeRhE2N4lXwL4H1dbjkZ4ou6f
j3ChgYukgYgwgYUxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEVMBMGA1UEBxMM
U2FuRnJhbmNpc2NvMRUwEwYDVQQKEwxGb3J0LUZ1bnN0b24xGDAWBgNVBAMTD0Zv
cnQtRnVuc3RvbiBDQTEhMB8GCSqGSIb3DQEJARYSbWVAbXlob3N0Lm15ZG9tYWlu
ggkAxUqCmMw9R/EwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQASt0pl
WzVseQLTNM8Mlgw4ZnGAv/x2xnijmMqrkE+F7pnaOicGpxgCfMKzjZuJu0TNJqF2
fibE7GhMdomD4dLFgIu8Wb5E7iQ1CSBEOGumRhK8qCsDzjr7WXUdhqA6Xvo+ylU6
DMzy0Wn3NNvfGC+qxOgybYCJwDnVPi0CEDSbzQ==
-----END CERTIFICATE-----

Obviously if you aren't using an ibVPN account, your certificate will be different.

Let's now make the password file:

sudo vim /opt/ibVPN/pass

The first line must be the full username, then the second line must be the password. This must be the only contents of this file.

you@address.com
myBIGstrongpassword1234567890

We also have to secure the permissions on this file, or OpenVPN won't start.

sudo chmod 400 pass

This will make the file read-only, and only for the owner (i.e. no other user can read it at all)

These commands will create the files to run at startup, and set them to be executable only by root.

sudo touch route-up.sh
sudo touch down.sh
sudo chmod 700 route-up.sh
sudo chmod 700 down.sh

At this point, it is probably a good idea to test if the VPN connection actually works. Start the connection with:

sudo openvpn --cd /opt/ibVPN --config config.ovpn

You will see warnings that the up and down external commands could not be run, but don't worry about that. If it works, you will see Initialization Sequence Completed on the terminal. Press Control+C to end the connection. If it doesn't work, you will have to investigate why not and fix it before continuing. I found that it sometimes it took a few goes to start working. Make sure your password file is correct. There are lots of great resources on the Internet about OpenVPN, so have a look around.

At this point, it's probably easiest to move on to getting Transmission up and running. Once you are sure that both the VPN and Transmission can run separately, they can be combined.

Installing and configuring Transmission

Install the required packages:

sudo apt-get install transmission-daemon

By default, Transmission will run automatically on boot. Since we will eventually be using OpenVPN to start Transmission, we want to disable this. To do so, edit the config file for Transmission-daemon

sudo vim /etc/default/transmission-daemon

And change the following line to read:

ENABLE_DAEMON=0

Now Transmission will not start on boot.

Let's now create a directory for the Transmission settings to reside in, and for the downloaded torrents to go into. This assumes you've already set up a disk of some sort, and it's mounted at /media/arm-disk/. For security purposes, the daemon will be run by its own user rather than as root or as "ubuntu". A new user is created by the installer for transmission-daemon, "debian-transmission". This user needs to own the folder that we create, and have read and write access to the storage location for the torrents being downloaded.

sudo mkdir /opt/transmission
sudo chown debian-transmission:debian-transmission /opt/transmission
sudo mkdir /media/arm-disk/torrents-complete
sudo chown debian-transmission:debian-transmission /media/arm-disk/torrents-complete
sudo mkdir /media/arm-disk/torrents-incomplete
sudo chown debian-transmission:debian-transmission /media/arm-disk/torrents-incomplete

Now we need to start transmission, just briefly, so that it creates the settings file we need:

sudo -u debian-transmission -g debian-transmission /usr/bin/transmission-daemon --config-dir /opt/transmission --foreground

This command starts transmission-daemon as the debian-transmission user, tells it to use the /opt/transmission directory for the settings files, and tells it to keep running in the foreground. Once it has run for a few seconds, press Control+C to end it. We can now edit the settings file.

sudo -u debian-transmission vim /opt/transmission/settings.json

We now need to change to following lines from their defaults to read:

"download-dir": "/media/arm-disk/torrents-complete",

"incomplete-dir": "/media/arm-disk/torrents-incomplete",

"incomplete-dir-enabled": true,

"rpc-whitelist": "127.0.0.1,192.168.1.*",

Save and exit (Escape, type :wq and press Enter)

The middle two edits will enable the use of the "incomplete" directory, separating your finished torrents from the unfinished ones. This isn't completely necessary, but I personally find it extremely useful. The last edit enables the web GUI to be accessed by any computer on the LAN (assuming your LAN subnet is 192.168.1.0, modify this if it is different).

It's now a good idea to run Transmission again, to see if it works and can actually download a torrent. We will use a web browser window to access the GUI and to add a torrent. First, let's allow access to the web GUI through the firewall from the LAN, then run transmission-daemon again.

sudo ufw allow in from 192.168.0.0/16 to any port 9091
sudo -u debian-transmission -g debian-transmission /usr/bin/transmission-daemon --config-dir /opt/transmission --foreground

Visit this URL in Firefox (or whichever browser you prefer): http://XXX.XXX.XXX.XXX:9091 , where XXX is replaced by the address of your server on the LAN (i.e. 192.168.1.10).
Find a torrent to download, for example Big Buck Bunny in 1080p60hz. This is a free short film, legally available for free download. In the Transmission GUI, click the "Open Torrent" button, and paste this link (or any other torrent you like) into the first box. Then press "Upload". If Transmission is working correctly, the torrent will begin to download. If it does not, then you will need to work out why before continuing. There are lots of resources available on the Internet for using transmission-daemon. It could also be the torrent you chose isn't working, try a few others first.

Once the download is finished, press Control+C in the terminal window to stop transmission-daemon.

Configure binding Transmission to the VPN interface

Now let's make an Upstart script, which will be used to start Transmission when the VPN is ready.

sudo mv /etc/init/transmission-daemon.conf /etc/init/transmission-daemon.conf.bak

Don't worry if this complains, it's just to make a backup of the Upstart file, if one existed - it might not have. Let's open vim to edit the new one:

sudo vim /etc/init/transmission-daemon.conf

Paste this into the editor:

description "transmission-daemon, attached to OpenVPN tunnel tap1"

start on transmission-daemon-start
stop on runlevel [!2345] or transmission-vpn-down

# This includes the information from OpenVPN into this environment

export LOCAL_IP
env PORT=51413

# give time to send info to trackers
kill timeout 30

# Run as unprivileged user
setuid debian-transmission
setgid debian-transmission

# Start transmission again if it stops for some reason
respawn
# If transmission stops 5 times in a minute, give up trying to respawn it
respawn limit 5 60

exec /usr/bin/nice -15 /usr/bin/transmission-daemon --config-dir /opt/transmission --bind-address-ipv4 $LOCAL_IP --peerport $PORT --no-portmap --foreground

Save and close vim. (Escape, then type :wq). Again, open vim:

sudo vim /etc/init/transmission-up.conf

And paste this:

description "Script to create firewall and routing rules for transmission-daemon"

start on transmission-vpn-up

# This includes the information from OpenVPN into this environment
export VPN_GATEWAY
export LOCAL_IP
env PORT=51413

task

script
    # Set up IP route, firewall rules
    # It doesn't matter if they already exist, they will be skipped
    /sbin/ip route add default via $VPN_GATEWAY dev tap1 table 200
    /sbin/ip rule add from $LOCAL_IP table 200
    /sbin/ip route flush cache
    /usr/sbin/ufw insert 1 reject out on eth0 from any port $PORT
    /usr/sbin/ufw insert 1 reject in on eth0 to any port $PORT
    /usr/sbin/ufw insert 1 deny in on tap1 to any
    /usr/sbin/ufw insert 1 allow in on tap1 to any port $PORT proto udp

    # Start the actual transmission-daemon process, in a separate task so that unprivileged user/group can be set
    /sbin/initctl emit transmission-daemon-start LOCAL_IP=$LOCAL_IP

end script

Again, save and close vim. (Escape, then type :wq). Finally:

sudo vim /etc/init/transmission-down.conf

Paste this:

description "Script to remove firewall rules for transmission-daemon"

start on runlevel [!2345] or stopping openvpn-transmission
env PORT=51413

task

script
    # Take down IP route, firewall rules
    # It doesn't really matter if they don't get taken down, but this will be cleaner
    /usr/sbin/ufw delete reject out on eth0 from any port $PORT
    /usr/sbin/ufw delete reject in on eth0 to any port $PORT
    /usr/sbin/ufw delete deny in on tap1 to any
    /usr/sbin/ufw delete allow in on tap1 to any port $PORT proto udp

    /sbin/ip route flush cache

end script

These scripts tell Upstart to listen for the "transmission-vpn-up" signal. The "transmission-up.conf" script then sets up the required routing rules to send traffic from the local VPN address via the VPN interface, and sets the firewall to allow in traffic from the VPN to the listening port for Transmission. Traffic directed to Transmission's listening port from the normal LAN interface is blocked. The "transmission-daemon.conf" script then starts transmission-daemon with the required settings to bind it to the VPN IP address. Note that this command will also ensure UPnP/NAT-PMP is disabled - see my note at the top about port forwarding. The "nice -15" sets Transmission to have a lower priority, which I found useful when using the lower spec'd BeagleBone - sometimes Transmission can hog resources, which slows the system down. At least with a low priority, more important system tasks can still run. The "transmission-down.conf" script will remove the firewall rules when the VPN is stopped. Three different scripts are used so that transmission-daemon can be run as an unprivileged user, but the firewall rules can be run as root.

Now let's go back to the OpenVPN settings, and edit the "route-up" and "down" scripts to trigger starting and stopping our Transmission script.

sudo vim /opt/ibVPN/route-up.sh

Paste this into vim:

#! /bin/bash

/sbin/initctl emit transmission-vpn-up VPN_GATEWAY=$route_vpn_gateway LOCAL_IP=$ifconfig_local

All this script does is say to Upstart that transmission-daemon should start, and gives it the information it needs to attach to the VPN connection.

sudo vim /opt/ibVPN/down.sh

Again, more pasting:

#! /bin/bash

/sbin/initctl emit transmission-vpn-down

This script is even more simple - it signals for transmission-daemon to stop.

At this point, it is probably a good idea to make sure that the owner of the entire VPN config folder is the root user - since these scripts run as root, anyone who could change them could run anything they wanted to as the root user.

sudo chown root:root -R /opt/ibVPN
sudo chmod 700 -R /opt/ibVPN
sudo chmod 400 /opt/ibVPN/pass

This now means that only the root user can modify or view the VPN connection settings.

OK, we're nearly done! Let's test if our setup is working so far:

sudo openvpn --cd /opt/ibVPN --config config.ovpn

Connect again to the Transmission web GUI, and resume the existing torrent or add a new one. It should be able to download, maybe after a few minutes of waiting for peers. A nifty way I found of testing whether or not it is working is to look at iftop. Install iftop, and run:

sudo apt-get install iftop
sudo iftop -i tap1

This screen will be showing all connections running through the VPN. If your torrent is downloading and is correctly using the VPN, there will be lots of IP addresses and host names here. Also look at iftop for the LAN connection:

sudo iftop -i eth0

Here you should see a large amount of traffic to a single IP address, being the VPN server, and then only minimal traffic to other LAN devices - assuming that you aren't running other services on your BeagleBone.

You can confirm that the VPN is working by following these instructions.
This site lets you download a torrent to see the IP address other peers use to connect to you - if everything is working this will be the VPN IP address and not your own WAN IP address.

If you are experiencing issues, you can see the Upstart error log by doing:

sudo tail -f /var/log/upstart/transmission-daemon.log

In a separate terminal/SSH window, try running the tail command while starting the VPN connection as above and look for any error messages. Hopefully you can resolve the issue from seeing the error messages, if not have a dig around on the Internet, or post a comment.

Configure it all to start automatically

If you are happy with manually issuing the command to start the OpenVPN tunnel, or you want to do it with your own script, then you are done. But I wanted it to start on boot, so I made another Upstart script to launch OpenVPN.

sudo vim /etc/init/openvpn-transmission.conf

This is the last thing we have to paste!

description "OpenVPN client, with attached transmission-daemon"

start on started networking
stop on runlevel [!2345] or stopped networking

# Give time for Transmission to send info to trackers, wait for graceful close
kill timeout 45

# Start the OpenVPN tunnel again if it stops for some reason
respawn
# If it stops 5 times in a minute, give up trying to respawn it
respawn limit 5 60

exec openvpn --cd /opt/ibVPN --config config.ovpn

post-stop script
    # Pause for a few seconds, before exiting
    /bin/sleep 3s
end script

All this does is wait for the system to signal that the network is ready, and then it will start the OpenVPN tunnel - which will in turn start Transmission. When the system is turned off, or if networking is shut down for some reason, Upstart will remove the firewall rules and close transmission-daemon. Simple! This will continue to work after a reboot too, so now you're all set.

To interact with Transmission, use the web GUI as we did during the setup phase. It is also possible to make the GUI accessible over the Internet, by setting up port forwarding. There are lots of tutorials on how to do this, so I won't repeat it here.

As for getting the completed downloads off the BeagleBone, I'm using NFS. I can get speeds of about 8 MB/s copying over the LAN from the BeagleBone to my desktop computer - which is pretty good for such a low-powered device. Ubuntu provides some handy information for setting this up.


Libertine container sound does not work on one machine, works on another

A bit of research indicates that many newer systems (Machine A) often feature HDMI which is set as default. Your older system (Machine B) likely only has analog audio so that is default for that one.

Issue the command aplay -l to get a list of audio devices you should get output similar to this:

$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog [ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC887-VD Digital [ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

This output should help you determine which card you want to be the default for output.

Look and see which audio out you need (card 0 device 0 is the alsa default which may not be what you need; In my case I need to specify card 1)

Create a file in your home directory with the command gedit ~/.asoundrc (Feel free to substitute your favorite text editor for gedit)

Add the following lines:

pcm.!default {

    type hw
    card *X*
}

ctl.!default {
    type hw
    card *X*
}

substitute the card number we discovered earlier for *X*

Save the file and try again.

Further possibly applicable information is available here

EDIT: I'm glad that you were able to get 2 audio channels working under Libertine. In regards to your expanded question. You could check the output of amixer scontrols and insure that the output you've chosen supports 6 audio channels and if so use the alsamixer to insure that none of them are muted and that you are in 6 channel mode and not in 2 channel mode as shown below.

To change channel modes in alsamixer use the arrow keys to highlight Channel as shown above and then arrow up or down to select the desired mode.

Sources:

man aplay

https://www.alsa-project.org/main/index.php/Asoundrc#The_.asoundrc_file_format


Video introduction to linux command line

The linux command line is called bash (B ourne A gain SH ell), you can search for it on youtube if you want. I used to watch some tutorials about scripting a while ago, here are some of my favorite:

Bash Introduction

Introduction to the BASH Shell (Linux Terminal) & File Manipulation Commands
Basic Bash Scripting Lesson #1
Basic Bash Scripting Lesson #2

Accelerated learning

Accelerated Bash scripting for beginners Part 1
Accelerated Bash scripting for beginners Part 2

Advanced bash

Advanced BASH
Intermediate and Advanced: 20. Bash Shell Scripting

Nowadays, I don't really like video lessons, I can read faster than hear someone teaching, if you want some reading material:

BASH Programming - Introduction
Ubuntu Bash guide
Bash guide for begginers


SD card reader seems not to be detected in Ubuntu 18.04

You should try installing exFat worked for me

sudo apt-get install exfat-fuse exfat-utils


You can use date for that anyway:

date '+%A, %Y/%m/%d'

which will currently output

Friday, 2013/12/20

Just run date --help to find out more...

For calendar specific, or at least locale specific, specific date names, try exporting the locale - e.g. this one:

export LC_TIME=am_ET.UTF-8

and then run the command again:

ዓርብ, 2013/12/20

You can list the locales with locale -a - more on that here.

This bit is based on a lot of guessing...


Is there a way to revert /bin default owner(s)?

Files from a clean install in /bin with setuid bit set

On a clean install, the following files in bin have the setuid bit set (according find /bin -perm -4000):

/bin/ping
/bin/ping6
/bin/su
/bin/umount
/bin/fusermount
/bin/mount
/bin/ntfs-3g

Note: You may have installed software which adds to that list (or which, for some reason, has the setgid bit set), so the following may not work completely, since it will leave the setuid bit off of anything not in that list.

Correcting the problem

sudo chown -R -H root:root /bin
sudo chmod u+s /bin/ping /bin/ping6 /bin/su /bin/umount /bin/fusermount /bin/mount /bin/ntfs-3g

Avoiding the problem in the future

It's rarely a good idea to modify anything in /bin, which is reserved for files installed and maintained via the package manager. The package manager, not you, owns /bin.

If you remove something, the things that depend on it will break. If you change or add something, your changes can be obliterated in a future update via the package manager.

Instead, store programs useful for all users in places like /usr/local/bin and /usr/local/sbin. Store programs useful for only one user in ~user/bin. Those places are owned and managed by the system administrator and the individual user respectively.

If you still want to ignore that advice, the correct way to modify things in /bin is to use sudo. For example, you can copy a file into /bin with:

sudo cp program /bin

You can delete it with:

sudo rm /bin/program


How to reinstall Ubuntu in dual boot with Windows 10?

Yes it is possible and very easy.

Make a backup of your personal data which is in /home/username where username is your actual username. This is less necessary if you have /home on a separate partition, but for the sake of safety in case you make any mistake, you should do it.
You may make a backup of your Windows also, for the same reason.
Assuming now that your data is safe, you just proceed to install as a fresh installation, using the partitions which were in use for Ubuntu in your current installation. If you had a separate /home, simply don't format it to save time. It is safe to format everything else, except your Windows partitions.

The Ubuntu installer will be very polite with your current Windows installation and will provide an entry in the boot loader to either boot Windows or Linux when you start.


Installed 13.10 ubuntu in my HP laptop, after booting up, it doesn't the display

I am not sure if this works for you. But one on my laptop (compaq) this happened and I just changed the display (you can find its key on keyboard) and my LCD turned on.
I hope your problem be as simple as mine


burning Ubuntu 12 image file on DVD in IMac

Hare's a complete guide on how to burn CD/DVD on Mac OS X


Boot Ubuntu, open a terminal window (ctrl-alt-t), and run

sudo grub-install /dev/sda

PS: dev/sda would, almost always, be the correct device to use if Ubuntu is installed on a single internal hdd. In case you have more the one internal hdd, or if Ubuntu is installed on an external one, verify the correct device name by running mount | grep ^/.


After 15.10 upgrade NetworkManager using 30% CPU

Turns out I had a custom config file

  /etc/NetworkManager/dnsmasq.d/local

with one line

  cache-size=300

When I removed this file (experimenting), network manager instantly stopped using CPU and returned to normal. The problem seems to be fixed.


You can view all sessions with x2golistsessions_root and kill sessions with x2goterminate-session <session id>. I don't believe you can force them to re-connect automatically. To kill all the sessions, you could run this as root:

x2golistsessions_root | awk -F'|' '{ print $2 }' | xargs -I % x2goterminate-session %


Can I use kernel-seeds on top of Ubuntu kernels?

First, why are you trying to compile a kernel ? If for learning, that is fine, but with anything resembling modern hardware you are not going to get a performance boost or significant hard drive space savings.

Second, the kernel seeds are extremely minimal. You then need to know your hardware.

Two tools to make it easier:

lspci -v

Will identify your hardware and the kernel modules in use.

You can also use localmodconfig

make localmodconfig

See http://kernelnewbies.org/Linux_2_6_32#head-11f54cdac41ad6150ef817fd68597554d9d05a5f

IMO localmodconfig is a superior tool to starting with a (minimal) kernel seed and build up.

I started a web page for compiling kernels

http://bodhizazen.com/Tutorials/kernel

The other issue is the Ubuntu patches, most important Apparmor (see Where do I get the AppArmor 2.4 compatibility patch?) and ureadahead (see this bug report).

See the Ubuntu wiki kernel compilation for ubuntu specific information.


I request any troubleshooting for the audio in Webex

A first step to diagnose this would be to start the application from console, something like

java -jar WhateverTheNameOfTheApp.jar

try to use it and see what messages are printed when the error occurs.

This may be a bit tricky to do if the only opportunity for you to test the application is in the real meeting call.

Since it's a paid application, I would imagine contacting the support would be a good option too.


How to make indicator applet work on AWN?

This bug is addressed in https://bugs.launchpad.net/awn-extras/+bug/871253. Some users indicate that installing the GTK2 indicator versions (indicator-session-gtk2, indicator-sound-gtk2 ...) makes at least some of the indicators visible.


Use second Ubuntu Desktop as external Monitor

Because they are separate computers, you cannot use anything like TwinView or Xinerama, as they are not separate monitors on the same computer.

You can however, use synergy or x2x to accomplish what you want to do. Using synergy is probably easier, and there is a simple GUI called quicksynergy, which you can install to make using it easier.


Matching multiple lines can be fairly easily done using Perl.

perl -p0e 's# in .*</div># walked down the path.#sm'

Briefly put,

-p0e turn Perl into a sed-like streaming multi-line processor.
The s#...#...# portion signifies that you want to replace all characters from in to </div> (the first clause) with walked down the path (the second clause).
sm roughly means "treat newline symbols as all other characters.

This answer assumes that the input text has only one such pattern.

Relevant documentation pages can be found here and here on Perl's official website.


Ubuntu 14.04 LTS (Trusty Tahr) won't output HDMI or boot

When you are in the GRUB menu, hit TAB and remove the kernel options "quiet" and "splash". This should give you the kernel boot messages. It may give a hint to your problem.

It is highly likely that there is an issue with the graphics driver. You could also try to hit Ctrl + Alt + F1 after you have a blank screen. This could give you a text-based login prompt. Once logged in, have a look at the file /var/log/Xorg.0.log. One way to view the file is like this:

more /var/log/Xorg.0.log


Workaround to make empathy to connect to google talk

As it turns out, I think I found a simpler way of doing this, without opening a terminal, or hitting Alt-F2 and pasting the killall -6 signonpluginprocess command.

When you see the following error:

... you know you've hit the bug. Apparently, when you open the Online Accounts, it automatically figures it out, and corrects the connection/authentication issue.

Press the blue curved arrow to retry connecting and then press F4 to open Online Accounts. It should be enough for empathy

P.S.: this is not a fix for the bug, just another workaround for the issue. I wish I knew why it works, though.

P.S.2: I haven't tested this on other networks (Facebook, ICQ, etc) since I don't use them.


Chrome will not play audio to the correct output

I have a pair of bluetooth earphones which keeps preventing chrome youtube audio plugin to work properly until I go to PulseAudio Control --> Configuration --> set profile of the bluetooth earphones to High Fidelity Playback (A2DP). I'm using Ubuntu 14.04.


Ubuntu 17.10 is based on GNOME, and GNOME doesn't support Fcitx well. Unless your friend is using the Unity desktop, it's probably wise to advise them to install and use ibus-mozc instead.

(There is no "Text Entry" on your friend's 17.10, right?)

Edit:

Otherwise, to use fcitx-mozc on Ubuntu 17.10 with GNOME, it can be enabled from the Fcitx Config Tool. Not sure how well it works, though. If fcitx-mozc is considered important, your friend may want to switch to a non-GNOME desktop environment.


Ubuntu 12.10 - Resolution stuck at 1024x768 using Open Source Radeon Driver

If I'm correct in understanding your question: you are using the radeon driver in the xserver-xorg-video-ati package from the xorg-edgers PPA.  If this is the case, then you are still using the radeon driver (as you should be).

You can add a new video mode (resolution) by doing the following.  Use $ xrandr to determine the video output in use.  Then, # xrandr --addmode [OUTPUT] [MODE].  For example, I would put # xrandr --addmode LVDS1 1920x1080.  This is taken from here.

EDIT: For the sake of completeness, a new mode needed to be created before adding the mode to the device.  The mode then needs to be switched to.  All of this is covered in the link.


Why does Ubuntu support so many file compression formats?

Different parts of the system use different compression formats and archive formats:

gzip (compression):

$ file - < /initrd.img
/dev/stdin: gzip compressed data, last modified: Wed Feb 22 01:10:21 2017, from Unix

cpio (archive):

$ gunzip < /initrd.img | file -
/dev/stdin: ASCII cpio archive (SVR4 with no CRC)

bzip2 (compression):

$ sudo cat /vmlinuz | file -
/dev/stdin: Linux kernel x86 boot executable bzImage, version 4.4.0-64-generic (buildd@lgw01-56) #85-Ubuntu SMP Mon Feb 20 11, RO-rootFS, swap_dev 0x6, Normal VGA

ar (archive): Debian packages are actually ar archives, themselves containing variously compressed archives:

$ ar t /var/cache/apt/archives/zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4_amd64.deb
debian-binary
control.tar.gz
data.tar.xz

tar (archive): The control.tar.gz and data.tar.xz are, of course, tar archives, gzip-compressed and xz-compressed respectively.

The compression format behind xz is LZMA, which is also used by 7z, hence you get 7z creation for free (but not 7z reading).

Accordingly, Ubuntu comes with support for a bunch of compression formats (as do most distros), because they're all in common use.

Why are all of these in use?

Hysterical Raisins.

(Historical reasons.)

Why should all of these components move to using something else, potentially breaking backwards compatibility and taking a hell of a headache, for what might be minimal benefits?

On a side note, Windows itself supports multiple archiving and compression formats:

Zip (of course)
LZX (compression)
Cabinet (archive)
MSI (archive)


How to install specific package from beta release on stable

Ubuntu uses a snapshot system - every six months updated packages are merged from Debian. These packages are often highly interdependent. This has many advantages for Debian and Ubuntu, but one drawback is that packages from different releases of Ubuntu may be incompatible.

Many software maintainers provide PPAs for safely testing pre-release software. This is, in fact, the original purpose of PPAs.

If there is no PPA, then the safest way to test pre-release packages without damaging your system is to try the entire Ubuntu pre-release, usually in a VM, LiveUSB, or separate partition.

Folks who use pre-release software are called testers, and are expected to be skilled in troubleshooting and filing bug reports. Pre-release software issues are generally considered off-topic here on AskUbuntu, since problems should be discussed in bug reports.

Only skilled users should attempt to install different-release packages onto an existing system. There are many possible complications from doing so. Cleanup may be easy...or very, very difficult.


This is what a top uses to populate the geolocation information of the remote network traffic.

To correct this:

wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz
wget -N http://download.maxmind.com/download/geoip/database/asnum/GeoIPASNum.dat.gz
gunzip GeoIPASNum.dat.gz
sudo mkdir -p /usr/share/GeoIP/
sudo mv GeoLiteCity.dat /usr/share/GeoIP/
sudo mv GeoIPASNum.dat /usr/share/GeoIP/

You may like to update the GeoIP monthly to keep the data up to date.

Source: http://www.mikereamy.com/2013/11/ntop-geoip-error/


Juju local charm deploy using juju-gui problem

That error is shown when there is an error uploading the local charm to Juju, Juju is returning a status code greater than 400. It's possible that there is an upload limit that we were yet unaware of and need to investigate.

In the mean time you can deploy your local charm using the instructions found here: https://jujucharms.com/docs/1.25/charms-deploying#deploying-from-a-local-repository

For those interested here is a link to the tracking issue: https://github.com/juju/juju-gui/issues/1349


I read some texts in the topic. According to them the partitioning and formatting are separate processes, so I don't have to give the file system type by partitioning a block device (ssd/hdd/virtual?). The dm-crypt can convert an unencrypted block device to an encrypted one by encrypting each block (or sector?) individually and the btrfs can live on that encrypted block device.

Note: dmcrypt + btrfs needs 4+ kernel to work properly; 3.2- kernels have compatibility and security issues, 4.0- kernels have performance issues.

The main problem with this setup that since raid1 will be on the upper level, both hdds/ssds will be encrypted differently, which means performance penalty and a lot of unnecessary encryption. According to other texts/answers I read there is no way to do this now. People are working on btrfs encryption, but there is nothing stable yet. Currently the stacked approach with ecryptfs - the btrfs FAQ mentions - is a lot slower than dm-crypt, so that wouldn't be a good solution either. Another option is using zfs, which has encryption support, but afaik. it consumes a lot of memory compared to btrfs.

update (Jan, 2019):

I checked zfs too, it has a nice native encryption and you can encrypt the swap partition too, so I think that is the way to go. It has some drawbacks too, it uses more memory and it isn't as straightforward to add a new disk as with btrfs.


My printer (Canon LBP6230dw), prints with too much density

Workaround Solution (with cloud print)

The only solution i found is to install a google cloud printer. I did this following the question: How can I easily set up a Google Cloud Print printer?

Since this printer is not "cloud ready" a windows PC has to be online so i can print with it's drivers.

Fortunately enough we have such a PC in the office (on air PC) so i installed cloud print on it following:

Set up your printer with Google Cloud Print

I could have done the same thing through sharing a windows printer but with this solution i can print from my mobile (or any device) from anywhere (as long as the printer is powered).

The out come is exactly the same as if i am using the windows driver, so everything is fine for now.


How to view the list of c library functions?

There is an offline documentation browser that I have found helpful, called Zeal, that is similar to Dash.
Other options:
whereis glibc

or
dpkg -L *libc*

And open the files in a text editor.
To recursively search inside files for string:
grep -R "some string" /path/to/includes

Some paths to consider:

/usr/local/include
/usr/target/include
/usr/include

Other options may include:

Cscope
Ctags
Cbroswer


rsync can not delete .git/objects directory files

You would be ok with a script that first changes the permissions.
It could work on specific directories or on all .git/objects in a (sub)set of directories.
Taking as an example the command line you posted in the question
rsync -ab --delete-delay /media/blueray/WDRed /media/blueray/UltrastarDaily

and naming rsync_my.sh script below,
#!/bin/bash
TARGET="${@:$#}"   # last parameter
SOURCE="${@:(-2):1}"   # second to last parameter
TARGET2="${TARGET}/$(basename ${SOURCE})/_Working/_NotesFiltered/
for d in $(find ${TARGET2} -type d -name .git) ; do
    chmod -R +w $d/objects
    for d2 in $(find ${d} -type d) ; do
        chmod +x $d2
    done
done
rsync "$@"

you would execute
$ chmod +x rsync_my.sh
$ ./rsync_my.sh -ab --delete-delay /media/blueray/WDRed /media/blueray/UltrastarDaily

The first command is needed only once. SOURCE would be /media/blueray/WDRed and TARGET would be /media/blueray/UltrastarDaily.
Please test it and post feedback.
To test, you could

Put together a dummy directory/file structure with some 10 files that replicates the essential structure of your target dir, and execute the script.
With rsync, use option --dry-run to only see what would be done, and create a log file that you can later inspect with --log-file=mylog.log.

Parameter expansion/extraction may need fine tuning.
Related:

https://stackoverflow.com/questions/41382232/git-objects-directory-contents-make-git-set-the-write-permission-instead-of
https://stackoverflow.com/questions/6448242/git-push-error-insufficient-permission-for-adding-an-object-to-repository-datab/6448326


How can I boot an Ubuntu DVD, and use the DVD drive while the system is running?

The standard way to run two or more operating systems at the same time is in a virtual machine application. The operating system that runs on the physical machine's bare metal hardware is the host OS. A guest OS is an operating system that runs inside the virtual machine application.

What you're thinking about in your question is that different virtual machine applications have different feature sets that target different scenarios for creating guest OSs.

I don't think you're going to be happy with this explanation unless I illustrate the reverse case where for security reasons applications can run natively inside virtual machines that are elevated to the status of core components of the operating system as is done in Qubes OS. Virtualization is performed by Xen, and user environments can be based on Fedora, Debian, Whonix, and Microsoft Windows, among other operating systems.


Ubuntu 20.10 – move LUKS header to external device

I was able to move the LUKS header to an external drive, but this is a workaround rather than a solution.
The file /usr/share/initramfs-tools/scripts/zfs was modified by changing this line
echo "keystore-${pool} ${ks} none luks,discard" >> "${TABFILE}"

to this
if [ $pool == "rpool" ]; then
    echo "keystore-${pool} ${ks} none luks,header=/dev/disk/by-id/usb-Kingston_DataTraveler_3.0_08606E6D3FEFF351776C4F42-0:0" >> "${TABFILE}"
else
    echo "keystore-${pool} ${ks} none luks,discard" >> "${TABFILE}"
fi

Then updating the initrd image with command
sudo update-initramfs -u


Ubuntu 13.10 Unity doesn't load after upgrade

I had the same thing, and i press CRTL-Alt-T, to have a terminal. after that i enter ccsm to have compiz configurator. To the left, under all categories, i selected Preferences,and on the new screen i selected unity profil. Wait a few seconds and normally the launcher appers.


openvpn can't import configurations on new 14.04 installation

You're right, it is a network manager bug. But I (and you too) can get around it by running openvpn from the command line.  You've probably done at least a few of these steps, but just in case (and for the benefit of others) I'll do a full step-by-step.

First install the required packages

sudo apt-get install network-manager network-manager-openvpn network-manager-openvpn-gnome

Create Files
These files must be kept safe and private at all times

Make a directory called openvpn in your home directory Copy your VPN
client file (renamed client.ovpn) into directory openvpn
Optional: Keep an original copy of the file – call it client.ovpn.orig
Next we will create 4 files under the openvpn directory.
See the bottom of this file for how to automate the following steps
Open the client.ovpn file in a text editor.
Create a file called ca.crt – copy the text between <ca> and </ca> from client.ovpn into this file
Create a file called client.crt – copy the text between <cert> and
</cert> from client.ovpn into this file
Create a file called client.key – copy the text between <key> and </key> from client.ovpn into this file
Create a file called ta.key – copy the text between
<tls-auth> and </tls-auth> from client.ovpn into this file
At this point I have a total of 6 files under my openvpn directory (including the backup file)

5-9  I've just worked out how to do bash script.  Whoop  Copy the following into a text file:

#!/bin/bash
sed '1,/<ca>/d;/<\/ca>/,$d' client.ovpn > ca.crt
sed '1,/<cert>/d;/<\/cert>/,$d' client.ovpn > client.crt
sed '1,/<key>/d;/<\/key>/,$d' client.ovpn > client.key
sed '1,/<tls-auth>/d;/<\/tls-auth>/,$d' client.ovpn > ta.key

I saved the file as openvpnconvert in the openvpn folder along with the client.ovpn file.  Made it executable with the command chmod a+x:

chmod a+x openvpnconvert

And then ran it:

./openvpnconvert

Modify the client.ovpn file

Just before the ## —–BEGIN RSA SIGNATURE—– line add the below lines and save

ca ca.crt
cert client.crt
key client.key
tls-auth ta.key

Finally, you need to run openvpn from the Command Line Interface (CLI)

cd into the openvpn folder

cd openvpn

Run openvpn, if you're using the filenames I specified, see below, otherwise use your filenames.

sudo openvpn --client --config ~/openvpn/client.ovpn --ca ~/openvpn/ca.crt

I'm currently running OpenVPN, which I set up using exactly these steps.  Hope it works equally well for others.

Sources:

Creating Files - http://naveensnayak.wordpress.com/2013/03/04/ubuntu-openvpn-with-ovpn-file/

Running from the Command Line - http://ubuntuforums.org/showthread.php?t=2206811


I get several "broken file" errors when creating my boot stick

Did you md5sum check the downloaded iso?

See https://help.ubuntu.com/community/HowToMD5SUM

Check the number against the listing in the link for your release listed at http://releases.ubuntu.com under the MD5SUMS link.
If using a CD/DVD, did you burn the disc as slowly as possible?

See https://help.ubuntu.com/community/BurningIsoHowto
Did you select the media check before trying to install?

https://help.ubuntu.com/community/Installation/CDIntegrityCheck
Did you ever do a "memory check" (another live-media menu choice) on your PC?

Doing the above can save you a lot of time struggling with a bad install media.


How to disable speech-dispatcher in Ubuntu 20.04?

Have you tried to uncomment the DisableAutoSpawn line in the file /etc/speech-dispatcher/speechd.conf, thus the server will not start automatically on requests from the clients ?
It looks like the speech-dispatcher service is not a system service started systematically like other SysV/systemd service, but launched on demand with your UID.


After upgrade to 20.04 Nautilus has become slow

The problem has now been remedied and I believe the culprit was a Nautilus extension by Dropbox. At least everything behaves well again after removing it.


if you really want to write your own driver, i would suggest two things.

1) research the hardware of the webcam, including chipsets, ect. This info can be very hard to find in my experience of searching for it.

2) reverse engineer the official windows drivers. Im thinking debuggers, decompilers, etc. You need to know how the device communicates to the computer, and this information will be in here. Now obviously you wont be able to implement all that you see in there, given the differences in API of the two platforms, but it will give you an idea of any hardware quirks, and possibly why it doesn't work with standard Linux drivers.

Good luck, and i hope you succeed :)


How do fix a broken PPA which pertains to installing Ethereum?

It looks like the build failed for amd64 and i386 on 19.10 eoan.

However, it also looks like there is no arm build available through this ppa. This ppa only provides i386 and amd64 packages.


Ubuntu Server 15.04 how to login using ssh?

I disable the password access and used private/public key. Follow this document:

https://help.ubuntu.com/community/SSH/OpenSSH/Keys

Note! Generates the keys in your client computer and transfer the public key to the server! Do not disable the passwords authentication until you test login using the public key.


Which interface is connected to the internet? "eth0" or "wlan0"?
Did you add "gateway" IP to both interfaces? If so, remove gateway IP from the local interface.


kidle_inject uses cpu power without apparent reason

Because you enabled Intel P-state (through intel_pstate=enable in GRUB_CMDLINE_LINUX_DEFAULT), you've also enabled the powerclamp driver. The powerclamp driver is working to try to keep the processor at a low-power state, so that power consumption is reduced, and not as much cooling is required.

To do this, it forces each thread on the CPU to be idle for some amount of time by injecting idle time. Typically, this amount is 50%. The 50% you see for each of the kidle_inject processes isn't actually causing the CPU to do work; rather, it's telling the CPU not to do work, thus reducing power consumption. Note that the overall CPU usage does not include kidle-inject.

As @ElderGeek noted, you can tell the driver to inject a less amount of idle time. However, I tried this, and was unsuccessful. It may be that the kernel doesn't support it yet; it may be that powerclamp is ignoring the request.


Does any TV work with Ubuntu TV or only specific ones (Hardware requirements)

You will be able to run Ubuntu TV with any TV by installing it onto a computer and connecting it to your television; however, Canonical is working with TV vendors to have Ubuntu TV software built directly into the unit so an additional PC or set-top-box wouldn't be needed.


I want to change only folder icons from humanity theme.How do i do it?

To change the folder icons in Humanity for those of Faenza you have to copy/paste the Faenza folders Faenza/places/[size] in Humanity/places/[size].

The sizes are set in the index.theme file. You can copy/paste the folders and edit the file to use the sizes you want/have.

From the comments:

If you want to change the indicator icons too copy the status folder.


.Xresources doesn't work for me either anymore. My workaround is to use /etc/X11/app-defaults/XTerm-color and /etc/X11/app-defaults/XTerm.


/dev/null should have 0666 permissions and that is what /etc/udev/rules.d/device-permissions.rules says:

KERNEL=="null|zero|full|random|urandom", MODE="0666"

But unfortunately this is a virtual server. So the kernel has not been updated:

# uname -a
Linux memocamp 2.6.32-042stab063.2 #1 SMP Tue Oct 23 16:24:09 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux

A temporary fix is to manually set the permissions:

chmod go+rw /dev/null


Show KDE Plasma desktop like in Windows 7

I assume you are using KDE from the tag. First, some background: KDE4 doesn't have a "desktop" per se, but uses a "widget dashboard". Users can make this behave like a traditional desktop, by using "folder view". There are two similar ways of showing this dashboard/desktop: either as a transparent overlay over all of your windows ("dashboard"), or by hiding all the current windows on screen ("desktop"). Each can be triggered by a keyboard shortcut, by a mouse-click on a widget (plasmoid), or by pushing the mouse cursor into the corner of the screen.

Keyboard shortcut

To show the widget dashboard, the default keyboard shortcut is Ctrl-F12. This can be changed in System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > KDE component = Plasma Desktop Shell > Show Dashboard.

To hide all the windows, customise the keyboard shortcut in System Settings > Shortcuts and Gestures > Global Keyboard Shortcuts > KDE component = KWin > Show Desktop.

Plasmoid (widget)

I don't know how it works in Windows 7, but you enable a widget in the panel. To show the widget dashboard, use the "Show Widget Dashboard" plasmoid. To do this, click on the cashew on your panel, then "Add Widgets". Search for "dashboard", then drag the icon to an appropriate position in your panel.

To hide all windows, use the "Show Desktop" plasmoid. Note that searching for "desktop" doesn't seem to find it, so just scroll across until you can see it.

Screen corners (or edges)

System Settings > Workspace Behaviour > Screen Edges > Active Screen Edge Actions. Click on the icons at the corners/edges of the screen picture, and select Show Dashboard/Desktop.


The following packages will be DOWNGRADED

You installed openssl from another source than the Ubuntu 18.04 repositories(?) or have held back openssl and your installed version does not include an important security patch. The 18.04 version then gets priority over your version regardless of the version number.
Please add to the question results of
apt policy libssl1.1 openssl

That will show more information about the packages. Including where it came from :)
Accept the package downgrade. It will install improved version over the one you use now.


Changing the icon style within LibreOffice may help with the toolbar display.  To do this, open an instance of LibreOffice and navigate through the menus to 'Tools->Options->LibreOffice->View' - you should see a screen something like what is shown below.

Check the Icon Style, there are several styles to choose from and changing the style may result in an icon set which works with your gnome theme.


how to check spreadsheet for input errors

Sorry this is a non-Linux/non-command line trick. Get the free MS Office 365/MS Office Online/OneDrive then check it from the web.


How to allow this connection on the Firewall?

Try.

Change pleases of ip and port

sudo iptables -A INPUT -s 2.2.2.2 -p tcp --dport 2049 -j ACCEPT


Making a bootable 12.04 Ubuntu Image on a flash drive

You only have a torrent "seed". You haven't actually downloaded Ubuntu at this point. The official documentation states:

  BitTorrent is a peer-to-peer download network that sometimes enables
  higher download speeds and more reliable downloads of large files. You
  will need to install a BitTorrent client on your computer in order to
  enable this download method.

Source: http://www.ubuntu.com/download/alternative-downloads


How do I get the touchpad working on a Dell Vostro 3460?

If you created factory image, you can mount it and find there debs folder. There will be all drivers for your laptop, if you didn't, here x64 package from my factory image for alps touchpad vostro 3460. In terminal run:

  sudo dpkg -i glidepoint_3.6-10_amd64.deb
  sudo reboot

Multi-gesture are working and you can turn touchpad off by pressing fn+F3. Tested on ubuntu 12.04 x64 with 3.2.x and 3.3.x kernels


External hard drive boots 16.04.2 on one computer but not another

when it comes to EFI/uefi I can't help as I've mostly dealt with legacy mode. most if not all /boot/* files can be modified; but the MBR of the 'boot' drive is a binary sector; so must be overwritten. I also can't help with fixing w10.

i've only done it with commands (and not often enough to remember) so won't in case of misleading/error.

a quick search found
https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows
https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

the first (help.ubuntu) looks dated; and includes a link to boot-repair (which I recall good luck with once on 14.04; but ages ago).  both are dated 2015

the second I've used successfully once; but also had it fail for me too. (2017)

the third I didn't see a date for; I liked it as I recognize the commands, but it provides no explanation so you'll have to rely on man.   (I think the third is from How can I repair grub? (How to get Ubuntu back after installing Windows?) which is old)

this isn't an answer; nor what you wanted - but I'm hoping contains some clues so you can help yourself.  i've used boxes where an external drive can change according to which usb-port is used (motherboard had more than one usb controller) so in my experience its play until you get it working.  I also have no fixing experience with w10 so can't include what it (if anything) it changes.  [this is a big comment really!]


WebKitGTK is a web-browser engine. Some apps use it to display local and remote web-pages. Some modern websites require local storage. This local storage is saved in SQLite format in the mentioned directories.
So it is cache, you can skip its backup creation.


How to update Ubuntu Core 20 ip address?

Found myself in the same situation and can't see the wifi details config file on the SDcard in any of the usual locations.
The official advice to change your network settings is to do a recovery mode startup, by holding down or repeatedly pressing the '1' key as the system boots then choose reinstall or try to use the recovery mode if you wish...
According to: https://ubuntu.com/core/docs/uc20/recovery-modes#heading--chooser

To access the recovery chooser, start or reboot the device with the ‘1’ key held on a connected keyboard. If the chooser fails to launch, try pressing 1 repeatedly from boot. It needs to be captured by Ubuntu Core boot process.

After the initial boot process completes, a status screen will appear showing “System mode selection triggered. Proceed to select one of the available systems and actions.”

The following recovery functions are currently available:

Run normally: restart and run the boot process (run mode)
Recover: reboot into recovery mode for data retrieval
Reinstall: initialise the device from an onboard system image

Would love to know if you go to the bottom of this as to why a static IP assignment failed for you.


How to convert Windows/Mac operating systems created, MPG file to Linux compatible file?

Increasing the bitrate while preserving resolution and playback fps may result in a bigger file but you can save much of the quality. It's about to try it. There are also several GUIs for  ffmpeg, such as the Mobile Media Converter, mentioned over here for a question similar to this: How can I maximum compress video files?

Remember, this won't increase the quality of your video, but this can help you to preserve your current quality.

I hope this gives you a clue on how to run your test, even if this doesn't answer your question.

I expect downvotes to this answer, let's see how much do I harvest this time.

Good luck!


Pidgin itself has a widget it calls "GtkIMHTML" or similar, which is used for the chat windows. It, as most chat services do these days, supports a subset of HTML for conversations, which is used for embedding images and such. It is however, not a full HTML/Browser engine.


Gnome Classic in 12.04 gives black screen

Compiz with gnome classic on 12.04 is extremely buggy. For starters it takes a very long time to load (it shows a black screen for nearly a minute.) Perhaps you just needed to wait a bit longer?

In any case, once it does load there are lots more bugs, graphical and otherwise. All of these bugs are caused by compiz 0.9.x. The only sensible way to use gnome-panel with compiz is to downgrade compiz to 0.8.x, though this will mean you cannot use Unity on the same machine.

It's also possible to enable metacity compositing in Gnome Classic (no effects) by using gconf-editor to set "/apps/metacity/general/compositing_manager" and "/apps/metacity/general/compositor_effects" to True. However, this does not give you everything that you get from compiz.


disable mouse/touchpad pointer acceleration & speed 18.04?

Settings -> Devices -> Mouse & Touchpad has "Mouse Speed".

Also, gnome-tweaks has a Mouse "Acceleration Profile" amongst other things.


When will PHP 5.6 be in the official Canonical repos?

Updated: I Just got an email back from Marc Deslauriers (security engineer at Canonical, so somebody who would know) and the answer is: Probably never. Unless something goes catastrophically wrong with 5.5, it'll have security patches backported for the lifespan of 14.04.

  Yes, like most packages in Ubuntu, the security team backports security fixes,
  including for versions that are no longer supported by upstream.

As of 15.04, the php5* packages are version 5.6. However I would not recommend using a non-LTS release on a production server as they require release upgrades every 9 months (opposed to the 5 years an LTS gets you).

And the only Canonical-supported version in 16.04 seems to be PHP7.

Around June 2016, maybe earlier, maybe never. There are a few different forces at play here:

Ubuntu doesn't do major upgrades on packages unless it's required or globally desirable.
PHP 5.6 is not fully backwards compatible with PHP 5.5 code, making a mid-term upgrade undesirable; potentially devastating for production servers.
But PHP 5.5 will only be supported to June 2016.

So unless somebody jumps in an plans on manually maintaining 5.5 (stranger things have happened) there probably will be a transition at some point. It's impossible to say when that'll be this far out though.

If you're deploying on 5.5, I'd get testing on 5.6 well in advance, just to make sure you're not caught out. Another option is to use a branch of PHP (like Zend Server) that has commercial support seemingly spanning into the next millennium.


I'm using a PPA:
https://launchpad.net/~fkrull/+archive/deadsnakes

Install the PPA:

sudo add-apt-repository ppa:fkrull/deadsnakes

Run Update:

sudo apt-get update

Install your flavor:

sudo apt-get install python2.6 python2.6-dev


Ubuntu overheating possible hw damage + defaults to gentoo kernel + initramfs-tools issue + failed to detect appropriate partition

I fixed the initramfs-tools issue by removing it via terminal.

The issue with wrong kernel can be selected in grub and edited as permanent fix.

The overheating seems to be fixed using Fan not running in Ubuntu 14.04

EDIT1: The overheating is still present

EDIT2: issue with initramfs-tools was fixed by extending /boot from 128MB to 1GB. + The issue with wrong kernel.

EDIT3: The overheating issue was resolved by installing nvidia drivers 390.


Install Grub Customizer.

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

Run it.

Click on Preferences (the wrench icon).
This is where you can choose which option should be selected by default when you boot.


USB Device No Longer 'Powering' Up In Ubuntu

It could be although I don't know for sure that Ubuntu 10.04 automatically disables the USB port and Windows re-enables it. Check the BIOS and see if it happens again before doing anything with Windows. Generally to get to BIOS you have to press F12 when the computer first turns on.

Jake


Can I Reinstall and Format An Encrypted Hard-drive?

If you reformat an encrypted drive you will lose the data that is encrypted; so yes. Just think of it as another filesystem but with encryption.


How to configure Apache on Ubuntu 14.04 if Nginx is already installed

Nginx runs on port 80 and that's ok. The default port for the Apache httpd is port 80, too and that's a problem.

Reconfigure Apache httpd

Use port 8080 for your Apache httpd. Open ports.conf

sudo nano vi /etc/apache2/ports.conf

and replace

Listen 80

with

Listen 8080

Do the same for virtual hosts, if necessary.
Restart Apache httpd

sudo systemctl restart apache2

or on Trusty with

sudo service apache2 restart

Check the output of netstat

$ sudo netstat -tulpn | grep apache2
tcp6   0  0 :::8080   :::*  LISTEN  22769/apache2

And yes, also with the output above, httpd is listening on tcp port 80.
Reconfigure nginx to work as proxy and use your Apache httpd as backend, e.g. for port 80 by editing of /etc/nginx/sites-available/default

sudo nano /etc/nginx/sites-available/default

and add the proxy settings below
in the location section

proxy_pass http://127.0.0.1:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-Port 80;
proxy_set_header Host $host;

Restart nginx

sudo systemctl restart nginx

or on Trusty with

sudo service nginx restart

Check the output of netstat

$ sudo netstat -tulpn | grep -P 'nginx|apache2'
tcp  0  0 0.0.0.0:80  0.0.0.0:*  LISTEN  22973/nginx -g daem
tcp6 0  0 :::80       :::*       LISTEN  22973/nginx -g daem
tcp6 0  0 :::8080     :::*       LISTEN  22769/apache2

And it's a good idea to configure httpd to listen only on 127.0.0.1.


As far as I know, indicator-workspaces isn't necessary anymore, in 13.04, because the standard workspace switcher icon shows which workspace you're in, however, you have to enable the workspace switcher in the first place.


There are 2 scripts you need. The one to convert from XLS to CSV is a command   xls2csv and the other one a script from github:  csv2xls (another csv2xls). There are also csv2xlsx (and another csv2xlsx).

In between the 2 conversions you can edit the files using your favorite tool.

If you want to do it yourself: xlsx files (and the same applies ODT (open/libeoffice) are zipped archives and contain an XML with the data. You can unzip then and the data is in an XML. Manipulating the XML is a bit more difficult that a CSV sure but when the manipulating is automated it becomes rather efficient.


Switching from Ubuntu Desktop to Server 14.04

you can use the following instructions it worked for previous releases (but you should take a backup so you can revert everything at any time )

**

Turn Ubuntu desktop into an headless server

**

This is one way to turn a Ubuntu desktop install into a headless server. A headless server is a server without a graphical desktop, and GUI-based apps. A common example of a headless server is a LAMP server, aka Linux Apache Mysql PHP/Python. All of these commands must be run as root, do not do this if you do not need to run a server.

Remove packages for graphics

% apt-get remove --purge libx11-6

Remove large package

This might be useful to further shrink the server and remove large and unused software. You can easily discover large packages with:

% dpkg-query -W --showformat='${Installed-Size} ${Package} [depends: ${Depends}]\n' | sort -n

Remove orphaned package

% apt-get install deborphan
% deborphan
% deborphan --guess-all

Repeat this until no more packages are deleted:

% apt-get remove --purge `deborphan`
% apt-get remove --purge `deborphan --guess-all`
% apt-get autoremove --purge

Remove unused kernel headers and images

The list of large packages above returned many unused linux-headers-* and linux-image-*. This command will make sure that you DO NOT remove the packages for the kernel currently in use. To avoid disasters, I put this into 2 separate steps. Please check the output of this command first:

% dpkg -l 'linux-headers*' 'linux-image*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'

If the output is OK (different than what you get with uname -r), rerun the last command and send it to apt-get purge:

% (last cmd) | xargs apt-get -y purge

Autoremove and clean

% apt-get autoremove --purge
% apt-get clean

Source


How to install Ubuntu alongside Windows on another partition

any linux distro will be installed on the another partition.
Try installing Win first(skip it if already done)
then during the installation choose "something else" and make your own partition,

http://www.everydaylinuxuser.com/2014/05/install-ubuntu-1404-alongside-windows.html

https://www.youtube.com/watch?v=hOz66FC0pWU

If Win came pre-installed (i.e. UEFI stuff) you have to be a bit careful though and look for videos on how to install ubuntu in efi mode .

Installing Ubuntu Alongside a Pre-Installed Windows with UEFI


How to add my user account to admin group (13.10 desktop)

Its Not recommended to add users to root group .

sudo usermod -aG (nameofgroup) (nameofuser)

the user will be a member of the group .

You can use chown to give the user the owenership :

sudo chown username:usergroup /path -R

-R means recursive so user well be the owner also of subfolders .

Now you can give the user who owned this directory a full access by :

sudo chmod 755 /path

755 means (drwxr-xr-x) read write execute permissions for the owner .


Restarts to install menu with usb in. Restarts to black screen and flashing underscore with usb out

What happened is GRUB, which is the bootloader (what allows Ubuntu on your hard drive to boot), was installed to your USB INSTEAD of your hard disk.

How to Fix:

Turn off your computer and plug your USB back in.

Turn on your computer.

Now, when a login prompt shows up, press CTRL + ALT + F1 to enter a TTY Session.

Now, it'll show a prompt like this:

ubuntu login: _

Enter your username and press Enter.

Then, enter your password and press Enter.

NOTE: The username and password are the ones you supplied during the installation process. Also, when you type your password, no characters will appear (be echoed back). This is normal behavior.

Now, once you login successfully, you should be at a prompt like this:

user@hostname:~$

Now, remove your USB from the computer (you can just pull it out, it's fine).

Then, enter the following command to install the bootloader. This command will ask for your password again.

sudo grub-install /dev/sda

Let it finish. Then once it's done, enter the following command to reboot your computer.

sudo reboot

If all goes well, your computer should reboot and boot into Ubuntu with no problems.

If this doesn't work / problems arise, please do comment!


How do I set ubuntu to compress a series of folders , deleting the original after its been compressed?

This script takes a list of folders as arguments. Save it as e.g. backup.sh and call it like this:

./backup.sh Folder1 Folder2

You have to make the script executable before this:

chmod u+x backup.sh

Here comes the script:

#!/bin/bash
for folder in "$@"
do
    tar czf $folder.tgz $folder
    rm -R $folder
done

Tell me if this is not what you need. If you are not sure what it's doing make a backup of your data before you test it ;-)


Faced with the perspective of having to work on Windows 7 (same computer, almost never-used option of dual boot), and disliking it in general, I tried upgrading to Ubuntu 12.04. Didn't work. For some reason, I suspect it has to be done under a graphical environment.

So I insisted, got myself a LiveCD and upgraded from it. It did just fine and now I have a working 12.04.

Not an answer to my original problem, yet it can be considered a solution.


For what it's worth I had the same problem this evening, and was able to resolve it by installing all of the dependencies of ubuntu-desktop.

I got the list with apt-cache depends, grepped for depends, cleaned it up with sed and fed it into xargs apt-get --reinstall install -y.

Apparently starting the newer calibre versions does something funny to permissions somewhere or something like that.


Sound Blaster Recon3Di sound card not working with Ubuntu 16

alsamixer normally defaults the headphone jack to mute.... just unmute it using alsamixer


In my office I downloaded some apps from uptodown.com but when I try to install them there's a problem with the dependencies

That is a problem uptodown.com needs to fix for you: they should alert you about dependencies and offer to download those too. Or let you download the snap version (those include all dependencies).

  I want to know how to download the apps with the dependencies from my windows computer

See packages.ubuntu.com for official supported software. From their list they include gedit. The link will show you all the dependencies needed to install gedit (though that one is likely already installed).

For all 3rd party software (and most of those on that website are) you will need to visit their respective website and see what they list as a dependency.


Lubuntu 18.04 lxde indicator applet and applications are not working

I have solved the problem of sound indicator by using sudo apt-get install indicator-sound-gtk2 then readding the indicator applet and adding from preferences.

but Unfortunately it is not working for indicator applications


How can screen recording software record the call audio of both the local person (on the mic) and the remote person (on the speakers)?

You can route your microphone through your speakers. That might do the trick:

How to hear my voice in speakers with a mic?

In summary:

pactl load-module module-loopback latency_msec=1


I can't get GPS working with Google Maps on my Nexus 4

From the indicator panel, to be sure to enable both the "Location detection" and the "GPS".
From setting> Security & Privacy> Location access> to select the "Using GPS, anonymized Wi-Fi and cellular network info."
Then reboot the phone.

It works for me: Google nexus 4, ubuntu-touch rtm 14.09.

Update: The stable-developers version: the Google maps could not determine  my precise location, and we don't have the option "Using GPS, anonymized Wi-Fi and cellular network info."

Source: the answer of Mr. Julia Palandri:
GPS unvailable on aquaris E45


How did this happen? Can Ubuntu create boot loaders by itself?

Ubuntu includes, installs and uses GRUB, a bootloader.

Is Ubuntu looking at new partitions or disks for another OS?

GRUB is, that's what is does.

Was this a product of all of the updates after my re-installation?

Yes and No... It was triggered by one update (kernel) but it would have happened anyway had you had your additional partitions (Windows) connected during the installation.

Everything you describe is what should happen and what so many users fail to achieve for one reason or another when dual-booting with Windows 8 or 10.
Please read the link above about GRUB for detailed in depth information. For using all you need to know is that GRUB will chainload all the other OSes bootloaders and give you an additional way to select the other OSes even when you select Ubuntu from the UEFI Boot Menu.


What does “%U” mean when calling a command?

It's a parameter for the Exec key in .desktop files (defined in the Desktop Entry Specification) that describes how arguments to the program (from the file manager/program launcher, e.g. multiple selected files) should be handled:

  %u  A single URL. Local files may either be passed as file: URLs or as file path.

  %U  A list of URLs. Each URL is passed as a separate argument to the executable program. Local files may either be passed as file: URLs or as file path.

So, e.g., /usr/share/applications/gedit.desktop contains:

  Exec=gedit %U

which means that arguments to gedit will be treated as a list of URLs (or local files).

For a complete list of possible parameters, see The Exec key.


After installation of bumblebee: i386 OpenGL Apps stopped working

I'll explain what happened. In Bumblebee version before 3.0-2~...ppa1, installing the bumblebee package also installs bumblebee-nvidia which on its turn installs nvidia-current.

The nvidia-current package installs both the 64-bit and 32-bit libraries on a 64-bit system. These OpenGL libraries conflict with the Mesa OpenGL library, package libgl1-mesa-glx. (read: breaks OpenGL capabilities on systems where the primary X server does not use the nvidia driver like an Optimus laptop)

The bumblebee-nvidia package tries to repair this by setting the default OpenGL library to the Mesa one for installed architectures. Initially, only libgl1-mesa-glx:amd64 is installed. So, unless libgl1-mesa-glx:i386 is installed before, OpenGL gets broken for 32-bit architectures.

The solution is to first install libgl1-mesa-glx:i386, and then install Bumblebee. virtualgl-libs:i386 can be installed at any time and will also be installed like bumblebee-nvidia in later versions. New installations will automatically pull in the drivers in the right order.

If you've already installed Bumblebee, simply install libgl1-mesa-glx:i386 and reinstall bumblebee-nvidia.


You will have to edit  the vsftpd.conf settings file, located at `/etc/ with an editor of you choice, for example:

sudo vim /etc/vsftpd.conf

In the settings file look for the line write_enable=YES which will be probably commented out #write_enable=YES, uncomment it removing the # from the front and save the file.
Finally restart the vsftpd service using:

sudo service vsftpd restart

Note that:

You will have to provide your password when you use sudo.
Also, the service was originally listed in this answer as ftpd which may work on some machines instead of vsftpd


How can I modify a line which contains 2nd occurence of a string?

I think this is what you want:

line=$(grep -n -m2 "eni" file | tail -n1 | cut -f1 -d:)

sed -i $line's/9$/8/' file


Backup Ubuntu (or any Linux) Software Configuration

In Linux, there are two kind of configuration files: system-wide and per-user.  The system-wide configuration files are stored in /etc, and usually (but not always) apply to system utilities, such as iptables.  The per-user configuration files reside in your home directory with names beginning with a dot, such as .bashrc, and hold specific configuration files for each user.  By default, these files are hidden from sight in most file browsers and from ls.  Press Ctrl-H to toggle hidden file viewing in Nautilus and use ls with the -a option.  To create a backup of the configuration files in /etc, simply run cp -r /etc destination, where destination is the folder that you wish to have a backup of /etc in.  To create a backup of the configuration files and folders in your home folder, just run sudo cp -r ~/.* destination, where destination is the folder that you wish to have a backup of all your dot-files (another name for files starting with a dot) in.


How to find non-release software I had installed?

I filtered the /var/log/apt/history.log file for this purpose.

A record in the file looks like:

Start-Date: 2016-12-14  18:28:01
Commandline: synaptic
Requested-By: user (1000)
Install: libglib2.0-bin:amd64 (2.48.1-1~ubuntu16.04.1, automatic) libglib2.0-dev:amd64 (2.48.1-1~ubuntu16.04.1)
End-Date: 2016-12-14  18:28:06

Package names with "automatic" are dependencies (libglib2.0-bin in the example) and without "automatic" are installed by command (libglib2.0-dev).

I found this code in my archives and probably it works

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import sys

for arg in sys.argv[1:]:
  fil = open(arg)
  for line in fil:
    ma = re.match(r'Install: (.*)', line)
    if ma:
      grp = ma.groups()[0]
      lst = re.split(r'\), *', grp)
      for item in lst:
        if item.endswith(', automatic'):
          continue
        else:
          name = item.split(':')[0]
          print dte, name
    ma = re.match(r'Start-Date: ([^ ]*)', line)
    if ma:
      dte = ma.groups()[0]
  fil.close()


How cycle through applications in Xubuntu without using Alt-Tab?

That seems to be what "Switch application" does in Xfce.

Go to Settings > Window Manager and select Keyboard tab. In the left column "Action", look for "Switch application". Select the row, then either press Enter key or double-click on mouse. A small window will appear, ready to accept key press and register a new shortcut.

The action has no shortcut, therefore does nothing, by default. When enabled, the action will switch applications immediately from one to another.

The behaviour of "Switch application":

Unlike "Cycle windows" or Alt+Tab, the popup window will not be displayed.
The action does not switch to all currently running programs.
For example, the action can not switch to Settings Manager but can switch to Application Finder in Xfce 4.10 (14.04) and newer. The result is reversed in older system i.e. Xfce 4.8 (12.04).
From my observation, the action will switch from oldest running program to newest running program and repeat the loop. The switching order is likely non-customizable.

Not all programs are applications. Some program has different type of window (dialog) compared to other programs (normal). The window type can be checked by using xwininfo -wm command.

Enable "Switch application" and try it for yourself.


Where can i find a precompiled verson of the Mesa 3D Library?

How to update OpenGL Driver on Ubuntu 14.04 LTS


In all currently supported versions of Ubuntu open the terminal and type:

sudo apt install default-jre libreoffice-java-common

Description: Standard Java or Java compatible Runtime
  This dependency package points to the Java runtime, or Java compatible
  runtime recommended for this architecture


Do I have to dismount VeraCrypt volumes before shutting down or restarting Ubuntu?

There are so-called run levels and script are executed when a new run level is entered. On Ubuntu, these are stored in /etc/rc<run level>.d. Run level 0 is shutdown and run level 6 is reboot. So you want your script to be in /etc/rc0.d and in /etc/rc6.d.

Create the file /etc/init.d/unmount-veracrypt-volumes.sh and make this its content:

#!/bin/sh
veracrypt -d -f
sleep 3

Then execute these commands:

sudo chown root /etc/init.d/unmount-veracrypt-volumes.sh
sudo chmod 751 /etc/init.d/unmount-veracrypt-volumes.sh
sudo ln -s /etc/init.d/unmount-veracrypt-volumes.sh /etc/rc0.d/K00-unmount-veracrypt-volumes.sh
sudo ln -s /etc/init.d/unmount-veracrypt-volumes.sh /etc/rc6.d/K00-unmount-veracrypt-volumes.sh

I chose K00 so the script is executed as the very first one when one of the run levels is entered. Those scripts are executed in increasing ASCII order, so the smaller the number of the symlink's name, the earlier a script is executed.


PR here is the value of the real-time priority, you can check its value for irq/47-iwlwifi with the ps command:

$ ps -eo pid,rtprio,ni,pri,comm
  PID RTPRIO  NI PRI COMMAND
[...]
  497     50   -  90 irq/47-iwlwifi

Source.


How to stop the fluent change / switch between work spaces?

Solution: Use arandr to properly deactivate the laptop monitor and properly configure the resolution for the external monitor to resolve all wonky and weird looking layouts. (Although it might look pretty good already.)


Installing Linux with RAID 1 for first time ever

You need to set up your hard disks as RAID disks BEFORE you install any OS.  Be Warned this is not an exercise for the fain of heart.

Here are the instructions I use (unfortunately I cannot remember the original source):

Software RAID

Redundant Array of Independent Disks "RAID" is a method of using multiple disks to provide different balances of increasing data reliability and/or increasing input/output performance, depending on the RAID level being used. RAID is implemented in either software (where the operating system knows about both drives and actively maintains both of them) or hardware (where a special controller makes the OS think there's only one drive and maintains the drives 'invisibly').

The RAID software included with current versions of Linux (and Ubuntu) is based on the 'mdadm' driver and works very well, better even than many so-called 'hardware' RAID controllers. This section will guide you through installing Ubuntu Server Edition using two RAID1 partitions on two physical hard drives, one for / and another for swap.

Partitioning

Follow the installation steps until you get to the Partition disks step, then:

Select Manual as the partition method.

Select the first hard drive, and agree to "Create a new empty partition table on this device?".

Repeat this step for each drive you wish to be part of the RAID array.

Select the "FREE SPACE" on the first drive then select "Create a new partition".

Next, select the Size of the partition. This partition will be the swap partition, and a general rule for swap size is twice that of RAM. Enter the partition size, then choose Primary, then Beginning.

A swap partition size of twice the available RAM capacity may not always be desirable, especially on systems with large amounts of RAM. Calculating the swap partition size for servers is highly dependent on how the system is going to be used.

Select the "Use as:" line at the top. By default this is "Ext4 journaling file system", change that to "physical volume for RAID" then "Done setting up partition".

For the / partition once again select "Free Space" on the first drive then "Create a new partition".

Use the rest of the free space on the drive and choose Continue, then Primary.

As with the swap partition, select the "Use as:" line at the top, changing it to "physical volume for RAID". Also select the "Bootable flag:" line to change the value to "on". Then choose "Done setting up partition".

Repeat steps three through eight for the other disk and partitions.

RAID Configuration

With the partitions setup the arrays are ready to be configured:

Back in the main "Partition Disks" page, select "Configure Software RAID" at the top.

Select "yes" to write the changes to disk.

Choose "Create MD device".

For this example, select "RAID1", but if you are using a different setup choose the appropriate type (RAID0 RAID1 RAID5).

In order to use RAID5 you need at least three drives. Using RAID0 or RAID1 only two drives are required.

Enter the number of active devices "2", or the amount of hard drives you have, for the array. Then select "Continue".

Next, enter the number of spare devices "0" by default, then choose "Continue".

Choose which partitions to use. Generally they will be sda1, sdb1, sdc1, etc. The numbers will usually match and the different letters correspond to different hard drives.

For the swap partition choose sda1 and sdb1. Select "Continue" to go to the next step.

Repeat steps three through seven for the / partition choosing sda2 and sdb2.

Once done select "Finish".

Formatting

There should now be a list of hard drives and RAID devices. The next step is to format and set the mount point for the RAID devices. Treat the RAID device as a local hard drive, format and mount accordingly.

Select "#1" under the "RAID1 device #0" partition.

Choose "Use as:". Then select "swap area", then "Done setting up partition".

Next, select "#1" under the "RAID1 device #1" partition.

Choose "Use as:". Then select "Ext4 journaling file system".

Then select the "Mount point" and choose "/ - the root file system". Change any of the other options as appropriate, then select "Done setting up partition".

Finally, select "Finish partitioning and write changes to disk".

If you choose to place the root partition on a RAID array, the installer will then ask if you would like to boot in a degraded state. See Degraded RAID for further details.

The installation process will then continue normally.


Gnome not starting on 19.10 with my existing user but does start with a new user

Thanks for your help.

So there was something in the syslog which helped me out.

In the syslog I saw:

  Bail out!
  Gtk:ERROR:../../../../gtk/gtkicontheme.c:4277:gtk_icon_info_load_icon_finish:
  assertion failed: (icon_info_get_pixbuf_ready (icon_info))

And this looks like it matches this bug.

The fix for me, which the bug indicates is to remove the file:

  .config/autostart/indicator-multiload.desktop

indicator-multiload is a useful load monitoring tool that shows your systenm load in the gnome panel. I really miss it.


Installed libinput-gestures to have mac-like gestures but it is not working for some reason

You need to add your user to the input group first. sudo gpasswd -a $USER input

xdotool was not installed. That is why the gestures were not working. sudo apt install xdotool to install it.

The guide is updated.


How can I allow a user to edit a specific system file normally restricted to root?

Instead of usingsudo, just set an ACL on the file:

$ ls -l /var/tmp/foo
-rw-rw---- 1 root root 4 Jul 31 15:26 /var/tmp/foo
$ sudo setfacl -m u:white:rw /var/tmp/foo
$ whoami
white
$ cat /var/tmp/foo
bar

Now the file is owned by 'root' but the user 'white' can read and write to it.  The user 'white' can now use his/her favorite editor to edit the file.


Problem installing latte dock master from git

I find a way to install it and it's work so if you wan't to install it in Kubuntu and KDE Neon Follow this way:
git clone https://github.com/KDE/latte-dock.git

sudo apt install cmake extra-cmake-modules qtdeclarative5-dev libqt5x11extras5-dev libkf5iconthemes-dev libkf5plasma-dev libkf5windowsystem-dev libkf5declarative-dev libkf5xmlgui-dev libkf5activities-dev build-essential libxcb-util-dev libkf5wayland-dev git gettext libkf5archive-dev libkf5notifications-dev libxcb-util0-dev libsm-dev libkf5crash-dev libkf5newstuff-dev libxcb-shape0-dev libxcb-randr0-dev libx11-dev libx11-xcb-dev

export CMAKE_PREFIX_PATH=/opt/xwi

sudo apt install libxcb-randr0-dev

sudo apt install kirigami2-dev

Then go into where you clone the latte dock "By default in the Home folder" and run this command in there:
sh install.sh

If when you run sh install.sh it's tell you mkdir: cannot create directory "Build": File exists you need to go in the folder latte dock clone it there and Delete the "Build" folder in there


run Google Chome on legacy 7.10 computer?

You can try running sudo dpkg -i --force-depends chrome_pkg.deb to force it to turn dependency errors into warnings.


First things first. You should not work and run your desktop as root. Full stop. It is a bad, bad idea. Especially if you want to run a web server. Forget about it. It is easy enough to do it: set a root password (sudo -i ; then: passwd) and log in as user root. But don't do it, there are better ways around it.

To start a web server (and xampp is just a bundle containing a web server, sql server and a few other things that you could have installed on your machine easily with your package manager), you need root privileges for a brief moment only. This is why you use sudo -- to become root for just the moment when your run the command. For example, if you have followed these instructions to install xampp, you can just run

sudo /opt/lampp/lampp start

If you are tired of typing in commands, create a desktop shortcut as described in the link above. If you are tired of typing in the password, edit your sudoers file. Type

sudo visudo

And at the end of that file, add the following line:

humanth ALL = NOPASSWD: /opt/lampp/lampp

(assuming that you start lampp as above and that humanth is your user name).

Furthermore, did you even read the Linux XAMPP HOWTO? It shows very clearly how to set up XAMPP as a service, so that you do not need to start it manually. In esssence, you just link the /opt/lampp/lampp script to /etc/init.d.

sudo -i
cd /etc/rc.d/rc3.d
ln -s /opt/lampp/lampp S99lampp
ln -s /opt/lampp/lampp K01lampp


Wifi is connected ,but can't use Internet

In Firefox edit preferences, go to the network section and set automatic proxy server. Does that work ?


Server requesting DNS lookup for a box that doesn't exist

Does running lsof -i on the requesting server help you find the process making all of the requests?

$ sudo lsof -i # Show all services with open ports
$ sudo lsof -i ":53" -P # Limit to all services on port 53

lsof shows open files.  lsof's -i flag limits the results to those with Internet addresses (ie: open sockets).  You can further restrict the list of processes returned by giving -i a restriction.  In the second example, :53 stands for port 53, and the -P flag tells lsof not to convert the port number to a string representing what that port is used for by default (ie: dhcp, ssh, https, etc).

Note: Port 53 is typically used for DNS traffic.


why the user cannot open a text file which is read-only?

Please refer this command. Hope this will solve the issue.

setfacl -R -m u:ripon:r-x /home/london/monir/doc2


Moving lubuntu boot disk to an SD card - Grub says no such device

Well, I did manage to get this working, in a way... I gave up trying to fix grub on the SD card and installed a brand new lubuntu install on it, then copied everything from the old system's root over it. The main issue was having to edit /etc/fstab and /etc/crypttab to deal with different GUIDs and device paths. (Since /dev/sda was removed, everything got shifted up a letter.) After doing that, it runs at least, though I suspect some things didn't mesh entirely nicely, as I get a lot of errors from .bashrc (or somewhere?) when opening a terminal now... but things seem to be working, anyway.


Error while installing Visual Studio Code on Ubuntu 14.04

cd to the directory where you have downloaded VSCode-linux-x64.zip and run unzip VSCode-linux-x64.zip -d ./vscode to extract the contents of downloaded .zip file to a folder vscode. I did it and it did not give me any error. I could not run it by clicking Code because I am getting -bash: ./Code: cannot execute binary file: Exec format error, mostly because I am using 32-bit linux.

EDIT: Since you said you are getting default value of option force_s3tc_enable overridden by environment error, try installing ttf-mscorefonts-installer by sudo apt-get install ttf-mscorefonts-installer. It might help.


As it's been mentioned in the error:

unknown filesystem type 'exfat'

It means that you don't have the exfat file system.

To install exfat, do:

sudo apt-get install exfat-fuse exfat-utils

You should now be able to mount your external HDD.

Also, you might need to reboot your PC for the changes to take effect.


How to avoid "Assuming drive cache: write through" message during restart?

What does the message: asking for cache data failed, assuming drive cache: write through mean?
The Linux block layer makes some assumptions about when writes are actually committed to disk. LSI RAID controller logical drives pretend to be SCSI disks, but the firmware and driver doesn't report whether the controller is in "write-through" mode or "write-back" mode. Without this information, the block layer assumes "write-through". This is safe, because the controller has a battery-backed cache.
LSI's engineers know that their driver should handle this better so you don't see this message. But it's not an error, and it doesn't affect the system.


system slows down after returning from sleep

Your problem is that you've got a "2gb RAM / Atom Z3735F / Ubuntu 20.04 machine". You should really be running Xubuntu or Lubuntu.

However, let's try enlarging your swap, and see if it helps.

If grep -i swap /etc/fstab returns this...

/swapfile    none    swap    sw      0   0

Then do this...

Note: Incorrect use of the dd command can cause data loss. Suggest copy/paste.

sudo swapoff -a           # turn off swap
sudo rm -i /swapfile      # remove old /swapfile

sudo dd if=/dev/zero of=/swapfile bs=1M count=4096

sudo chmod 600 /swapfile  # set proper file protections
sudo mkswap /swapfile     # init /swapfile
sudo swapon /swapfile     # turn on swap
free -h                   # confirm 2G RAM and 4G swap
reboot                    # reboot and verify operation


How to fix Conda "missing path to environment variable"?

I had the same issue but solved it by launching the IDE (PyCharm community in my case) from terminal via pycharm-communinity.
I found this solutions in this GitHub Issue comment.


You already have installed Ubuntu 11.04 but you haven’t liked the Unity. You want to try another window manager like KDE. So you can install Kubuntu, it comes with KDE.

To install Kubuntu, open a terminal and run:

sudo apt-get install kubuntu-desktop

During the installation, you will be asking about which display manager you want to leave as default. Choose kdm.

Now, if you want a full KDE installation that include multimedia, networking, graphics, education, games, system administration tools, and other artwork and utilities, still in the terminal, run:

sudo apt-get install kde-full

After that, restart your computer and in login screen, don`t forget to select KDE