snd_hda_intel 0000:00:1f.3: failed to add i915 component master (-19)

i found this: http://www.starmate.fr/i915-component-master/ (french)

it's look like a bios option to active for Asus motherboard.

Advance -> Advance \ Systems Agent (SA) Configuration -> Configuration graphique > Multi-GPU dedicace Monitor

it's solve the problem for me ;)


Might be helpful for someone: I ran into this issue on our CI regularly.

Just execute the following:

sudo apt-get remove -y --purge man-db

The command removes the man-db package completely, which in our case on CI, was completely useless anyway.


That's a bug in the libjack-jackd2-0 package, version 1.9.8~dfsg.2-1precise1 (which isn't a version ever published in Ubuntu, must have come from somewhere else). It claims to be Multi-Arch: same, but that file differs between architectures.

You can almost certainly safely delete /usr/share/doc/libjack-jackd2-0/buildinfo.gz, after which APT should be happy:

sudo rm /usr/share/doc/libjack-jackd2-0/buildinfo.gz

https://bugs.launchpad.net/ubuntu/+source/jackd2/+bug/999665
Are PPA's safe to add to my system and what are some "red flags" to watch out for?


The symbol for the beginning of a line is ^. So, to print all lines whose first character is a (, you would want to match ^(:

grep

grep '^(' file

sed

sed -n '/^(/p' file


Amarok 2.9.0 does not recognize CD drive Kubuntu 18.04

It's a bug in Amarok itself, which was already reported.

You can track its progress here: https://bugs.kde.org/show_bug.cgi?id=378183

They seem to know what causes it, but it's not mentioned there at the moment.


I recommend opening the video in a media player to find the time where you want to split it. Then you can use ffmpeg with the following script. It does not re-encode the video.
#!/bin/bash

# Split Video Script
# Usage: script_name file_name split-point
# Example: split_video_script bugs_bunny.mp4 31:23
# Instructions:
# 1. Type the name of your script (if it is already added to ~/bin and marked as executable).
# 2. Type the file name including path to it if necessary.
# 3. Type the time where you want to split the video. It goes in minutes:seconds

# Get length in seconds
length=$(echo "$2" | awk -F: '{print ($1 * 60) + $2}')

# Get filename without extension
fname="${1%.*}"

# First half
ffmpeg -i "${fname}.mp4" -c copy -t "$length" "${fname}1.mp4"

# Second half
ffmpeg -i "${fname}.mp4" -c copy -ss "$length" "${fname}2.mp4"

Update: I recently needed to update this script because of an issue with the second half. So, now I have to process the second half of it. You would add in the parameters that are specific to your original video. You can use mediainfo, ffprobe or ffmpeg -i to find the needed information about your original video.
#!/bin/bash

if [ -z "$1" ]; then
    echo "Usage: $0 file-name"
    exit 1
fi

read -p "Enter time to split video (hh:mm:ss.mmm) " split_time

ext="${1##*.}"
fname="${1%.*}"

# First half
ffmpeg -i "$1" -c copy -t "$split_time" -c:s copy "${fname}1.${ext}"

# Second half
ffmpeg -ss "$split_time" -i "$1" -c:v libx264 -crf 17 -preset veryfast -r 30 -s 1920x1080 -c:a aac -ac 2 -b:a 256k -ar 44100 -pix_fmt yuv420p -movflags faststart -c:s copy "${fname}2.${ext}"


Do you have Supervisor installed? If no do this first:

sudo apt-get install supervisor

Once this has completed, the supervisor daemon should already be started, as the prebuilt packages come with an init script that will also ensure the Supervisor is restarted after a system reboot. You can ensure this is the case by running:

sudo service supervisor restart

Now you can read the link here for more information about installing Plumi.

Edit:
More information can be found here.


How can I add custom '.desktop' application launchers to Ubuntu Dock?

Create a .desktop file (or, copy if you already have one ready), say my-chrome.desktop, in your ~/.local/share/applications/ directory.
You may add the following lines to it for a simple, bare-minimum .desktop launcher
[Desktop Entry]
Name=My Chrome
Comment=Chrome my profile
Exec=google-chrome --profile-directory=Default
Icon=google-chrome
Type=Application
Terminal=false

The keys are as described below

Name= Specific name of the application (For this particular example, I used "My Chrome" to avoid confusion with the already existing Google Chrome launcher. You can use any other name.)
Comment= A short description of the application
Exec= The command to execute in order to launch the application
Icon= Icon for the application (You can use an icon provided by your icon theme or an absolute path to an image file.)

Click 'Activities' or 'Show Applications' and search for "My Chrome" (application name as per the Name key). It should appear.

Right click on it and select 'add to favourites'.
If right clicking on application icon in dock doesn't show "Add to favourites" option, search for the application in Activities screen, and then drag it across to the dock (suggested by Legolas).

If nothing works, see this Q&A: Cannot add custom launcher to Ubuntu Dock (Add to Favorites)


16.04 - openJDK 7 - Minecraft Won't Launch

Starting with the 1.12 update, Minecraft started requiring Java 8. Make sure you have the latest version of Java installed on your computer as this may be the problem.


This message is not asking for the python libraries themselves, it's asking for the headers to link against them. You can install then with:

sudo apt-get install python-dev

You are probably lacking some other dependencies.


Wireless card isnt working with Ubuntu 14.04 VirtualBox Guest OS

If you want to be able to have Linux work with the actual hardware on your OS, you want to boot to a Live USB or actually install Ubuntu to the hard drive, as VirtualBox doesn't pass the wireless adapter hardware information to the guest OS.  It doesn't do that because the guest shouldn't be the one to control the wireless adapter of the host, in an idea setup.  As the Windows 7 host which is running VirtualBox accesses the wireless adapter, the network adapter on the guest OS (in this case, Ubuntu) is virtual and does not control your wireless adapter.  Essentially, unless you're running an oddball configuration, VirtualBox runs everything that it runs as guests through virtual network adapters which eventually go out through the active network connection on the host OS.  That's effectively like this:

Some explanation:

All the VirtualBox guest VMs in a typical setup go through the VBox network interfaces.  To that end, you can have multiple virtual interfaces on a guest which then in turn each access a different virtual network interface.  This can be used to have a firewall or gateway box between some VMs and the host OS adapter on the way out to the internet.
VirtualBox Virtual Network Interfaces are essentially network adapters that exist virtually.  They don't physically exist, but exist as part of VBox.  Each VBox interface typically has its own subnet of addresses, and they typically don't communicate between each other, except in advanced setups.  These are exposed to the Virtual Machines, when the VM is set up to have a network interface connected to one of these virtual network interfaces.  The host hardware is not exposed/shown to the guest OSes as a result, only these virtual interfaces.
VBox Bridged is connected (virtually, aka 'bridged') to one individual interface and your guest effectively has access to the hardware interface that is hooked up to the Bridged connection and can use that network interface as if it were its own and a separate connection, so rather than an internal IP address.  This does not, however, disclose the type of 'host' network interface in use, whether ethernet or wifi, so it just appears as an 'ethernet connection' to the guest OS, because it still goes through a virtual network interface.
VBox NAT runs your data through one or more active host OS Network interfaces.  To that end, your guest OS gets a private internal IP address that works only within the VirtualBox network.  You can then specify port forwarding rules (NAT rules) which can allow for your computer and a specific port to be reached and then forwarded to the internal guest OS.
VBox Virtual Network indicates a virtual network adapter which can be its own segregated network.  Typically you can use this to isolate internal networks, or you can run a VM as a 'gateway' (or 'firewall', such as a pfSense instance), and then use the Virtual Network as all the guest OSes that run through that virtual 'gateway'.  This is advanced though.  (Most simple VM setups will just use the NAT or Bridged setups)

Typically, these network interfaces aren't set up to go right to the hardware on the host, but you can create multiple "bridged" connections in theory and each virtual network adapter would then be bridged differently with a different hardware interface on the host OS, but that's an atypical setup.

Note that an alternative way to get a wifi adapter onto the guest VM is to get an external USB wifi adapter, and connect it to the VM via USB Passthrough, but that can be tricky and painful to configure at times in some hosts, and varies a little from host-to-host (which is why I do not detail it here).


VM Gaming via GPU Passthrough without a dedicated monitor?

2021 Edit: try Looking Glass, it's been around for a few years now and people are having great, low latency results (i.e., usable for gaming).
Original 2016 response:
I don't think this is currently possible. The most sensible I've seen is plugging both GPU cards into the same monitor, and using that monitor's input switching features when you want to flip between your host and your guest.


did you install the non free nvidia drivers or are you using the opensource drivers?  the non free drivers can be a pain with multiple monitors.  I have a 2nd display rotated 90 degrees and it gets to be painfull some times due to limitations in the drivers.

assuming you have installed non free and the config utility it should show in the system > administration menu. I am using the "classic" interface not sure on unity.

lsmod | grep nv  should return nvidia  for non free.


As first it is already installed this is what your machine is telling you, simply run:

skype &

From a terminal:

after you have seen that this is there go back and fix your /etc/apt/sources.list by

sudo nano /etc/apt/sources.list

There fnd the lines you added with the wrong path with cannical in it and remove them, after that simply undo the # in front of the lines where it is called right canonical. Save and exit.

After that run:

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


Linux without graphical OS but with graphical resources

I think you can get what you want using a Tiling Window Manager, like i3 or xmonad. There are other minimalistic window managers with similar functionality. i3 and xmonad are both in Ubuntu repositories, so they are easy to install, and then you can select them in your login screen.


Follow the instruction on the ROS Wiki. If the problem persist, remove all index files and re-run the update:

$ sudo rm -rf /var/lib/apt/lists/*
$ sudo apt-get update && sudo apt-get install --yes ros-kinetic-desktop-full

If you look at the repository, the packages you are missing, are listed in the package file. So there must be something wrong with the index.


How do I configure Postfix to prioritize users over aliases?

Apparently I didn't search well enough.

To do this, create a virtual-cancel.cf file in /etc/postfix with the following information:

user = <DATABASE_USER>
password = <DATABASE_PASSWORD>
hosts = <DATABASE_HOST>
dbname = <DATABASE_SCHEMA>
query = SELECT email from <USERS_TABLE> WHERE email='%s'

Then, in your main.cf file, add your virtual-cancel.cf file before your standard alias mapping:

virtual_alias_maps = mysql:/etc/postfix/virtual-cancel.cf, mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Lastly, restart Postfix, and enjoy everything working.


Update 2021-04-23
For the latest Ubuntu 20.04 LTS (focal fossa) the below actions are not needed, the package filemanager-actions is located in universe pocket. See fresh answer.
Update 2018-05-31
Daniel Marynicz has created PPA for Ubuntu 18.04 LTS with Nautilus, Caja and Nemo-enabled packages. You can install them as usual:
sudo add-apt-repository ppa:daniel-marynicz/filemanager-actions

sudo apt-get install filemanager-actions-nautilus-extension # Nautilus
sudo apt-get install filemanager-actions-caja-extension # Caja
sudo apt-get install filemanager-actions-nemo-extension # Nemo

sudo apt-get install filemanager-actions* # simply all filemanagers

After installation you can launch fma-config-tool.

Initial consideration of the problem:
Modern version of Nautilus Actions (nautilus-actions package in trusty (14.04 LTS), xenial (16.04 LTS), artful (17.10)) are named as FileManager Actions (filemanager-actions package, it is not yet packaged in Debian and Ubuntu - see at repology.org).
If you do not want to compile packages by yourself - use links in the end of this answer.
So we can try to compile this package locally:

Install dependencies
 sudo apt-get install build-essential gnome-doc-utils intltool \
 libnautilus-extension-dev uuid-dev libxml2-dev libgtop2-dev rarian-compat

Note: if you need to support all three file-managers you should install two additional packages before compilation with sudo apt-get install libnemo-extension-dev libcaja-extension-dev.

Download, extract, configure, make (otherwise, if you prefer the easy way: use the deb file from links at the end of answer)
 cd ~/Downloads
 wget https://download.gnome.org/sources/filemanager-actions/3.4/filemanager-actions-3.4.tar.xz
 tar -xf filemanager-actions-3.4.tar.xz
 cd filemanager-actions-3.4
 ./configure
 make -j5

Install package

Here standard way is to use
   sudo make install

but this will not create deb-package (but you can remove fma with sudo make uninstall);

so using checkinstall is better:
   sudo apt-get install checkinstall
   sudo checkinstall make install
   sudo apt-get install ./filemanager-actions_3.4-1_amd64.deb

After installation you will get new executable named  fma-config-tool, its window is named FileManager-Actions Configuration Tool and  looks like:

Below is the link to compiled package:

only Nautilus support - download filemanager-actions_3.4-1_amd64.deb-package.


How can I SSH into another computer over USB?

It is possible over serial.
Add a "serial over usb" cable to both machines. Then both machines have a serial port. Connect these two ports with a null modem cable.
If the ssh server-side is listening on its serial port, the client can ssh via tty1. (if com port on client is 1.)
If one ore more machines already have a serial port its easier and the null-modem-cable might be the only thing you need.


Parsing a Text to only see specific data

awk '
  # ignore lines with "none:" or "player:" in $(NF-2)
  $(NF-2) ~ /^(none|player):$/ {
    next   # read next line
  }

  {
    # remove dots from $2 in every line
    gsub(/\./,"",$2)
  }

  /\|Hitem:/ {
    # if it has "|Hitem:" in $2, remove everything
    # before and after the colons
    sub(/.+\|Hitem:/,"",$2)
    sub(/:.+/,"",$2)
    print $2,$(NF-2)
    next   # read next line
  }

  {
    print $2,$(NF-2)
  }
' your_file.txt

Line 380 has Selected player:  (GUID: 6873)]. You have to decide what to do with such lines (ignore them? print the GUID instead?).


"Pointers" with $ Syntax in /etc/environment

I didn't find much documentation on /etc/environment, but the reason things don't work the way you expect is that it's "not a script file", and thus is not processed by the shell, so referencing a previously-defined variable doesn't work. This explains the behaviour you're seeing.

You're better off defining these kinds of environment variables in your home, in .profile or .bashrc, or if you need them for all users, in /etc/profile.d or /etc/bash.bashrc.

There's some pretty extensive documentation on setting environment variables here, and it points to either .profile or .bashrc as the preferred place to put this stuff.


Can't delete folder even with all permission and sudo

Deleted this file following this tutorial. You would need to boot into your windows system for this
From the tutorial:
Copy and paste the commands given below in the command prompt window and execute the commands one by one.
takeown /F X:\FULL_PATH_TO_FOLDER

takeown /F X:\FULL_PATH_TO_FOLDER /r /d y

icacls X:\FULL_PATH_TO_FOLDER /grant Administrators:F

icacls X:\FULL_PATH_TO_FOLDER /grant Administrators:F /t

I am still intrigued by how I couldn't delete a file even with Sudo and all permissions and whether this is a possible bug in Linux.


Give Group Read/Write Access to /home directory

You can change the directory permissions by doing chmod 777 /directory this will allow everyone in every group and all other people to read, write, and execute.


How to customize window borders and controls?

Install gnome-tweak-tool

sudo apt-get install gnome-tweak-tool

Download the theme from Gnome-art(make sure that it is gtk3 theme)
Extract the theme and copy it to the .themes(.icons for icon themes) folder in your home folder (It is hidden by default press ctrl+h to see it
open advanced settings from unity dash
Move to 'Theme' option on the left sidebar. You can now change the Window theme,icon theme and gtk theme from there  by changing the options in the dropdown list


My swap isn't working. I think I messed it up

Have you tried the gnome disk utility on the left choose /dev/mapper/cryptswap1 and on the right bellow should be a play sign click to mount partition.


How to run openssh-server compiled from source

I guess, you must have found the answer by now.
but if not then run the following:

# sudo /usr/local/sbin/sshd

In some distributions, the sshd file will be located elsewhere, e.g., /usr/sbin/sshd

This will start the openssh server with default settings, but in a few cases it will show an error:

privilege separation user sshd does not exist

To resolve this error, run the following commands before compiling OpenSSH:

sudo install -v -m700 -d /var/lib/sshd
sudo chown -v root:sys /var/lib/sshd
sudo groupadd sshd
sudo useradd  -c 'sshd PrivSep' -d /var/lib/sshd -g sshd -s /bin/false -u 50 sshd


There were some last minute bugs which delayed the release.  Look for the 14.04.1  release on Thurs and Fri (maybe next week if lucky).  Better to get the LTS release right than cause problems.


It is reasonably straightforward to toggle this setting from the clock settings. (Note: I realise that you have already followed this path but best to check.)

Follow this path:

Click on the clock > Time & date settings... > Clock

And from here select 12 hour time as illustrated in this screenshot:

If this is not enough and the clock is still not obeying your needs try running the following commands:

Reinstall the clock

sudo apt-get --reinstall install indicator-datetime

Reconfigure the date/time

sudo dpkg-reconfigure --frontend noninteractive tzdata

Reset the 'unity-panel-service'

killall unity-panel-service

And this may be enough to reload the offending clock and tweak it into obeying your preferred settings..

Note: These tips will have no effect if your current locale does not support AM/PM as Gunnar Hjalmarsson has pointed out...

References:

https://askubuntu.com/a/399178/57576


I had to install automake instead of aclocal directly with 11.10.

Example:

sudo apt-get install autotools-dev
sudo apt-get install automake


Unable to connect to basic ubuntu ssh server with password authentication - permission denied publickey

I had this issue trying to connect from mint 20.04 to an ubuntu 20.04 server. The sshd_config was set up just as you descried on the server.
If you try ssh -v user@hostname you may see it trying a bunch of authentication keys, even though they are not in the config and you're not using the -i at the command line. It keeps trying different keys it finds until the server gets annoyed and closes out the connection.
In this case, try disabling public key authentication on the client (temporarily, one-shot at the command line):
ssh user@servername -o PubkeyAuthentication=no

After doing this, it prompted for a password and successfully logged in. I was also able to use sshpass -pMYPASSWORD ssh user@servername
Example output:
$ sshpass -p<password> ssh -v  <user>@<servername>
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
debug1: Reading configuration data /home/<user>/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to <servername> [<servername>] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/<user>/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.2p1 Ubuntu-4
debug1: match: OpenSSH_8.2p1 Ubuntu-4 pat OpenSSH* compat 0x04000000
debug1: Authenticating to <servername>:22 as '<user>'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:r2Ra44NtKxs4WPYKroLMETpd2ebGxUwiKuJdCLqX3fM
debug1: Host '<servername>' is known and matches the ECDSA host key.
debug1: Found key in /home/<user>/.ssh/known_hosts:33
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:Yxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx0 /home/<user>/.ssh/<privatekey>
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxk <user>@MacBook-Pro.fritz.box
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:4xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxg root@MacBook-Pro.fritz.box
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:qxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxg right@<user>-<computername>-Mint
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:zxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxM right@right-<computername>
debug1: Authentications that can continue: publickey,password
debug1: Offering public key: RSA SHA256:vxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxc root@unite
Received disconnect from <servername> port 22:2: Too many authentication failures
Disconnected from <servername> port 22


How to recover the lost data in ubuntu 14.04.

Yes, there is an app names "testdisk". You can directly start it from terminal by typind sudo testdisk or photorec. If it isn't installed then you can install it by "sudo apt-get install testdisk".


Why can't flowcharts or mathematical equations created in Microsoft Office and saved in .docx format be opened by LibreOffice?

A quick, stupid (but works!) solution is to open a hotmail account, if you don't already have one, and send the file to yourself.
Hotmail allows you to view the file online, and edit it!

I don't want to support hotmail, GMAIL does the same think, but because Microsoft owns hotmail, it is logical that hotmail will be able to handle docx and such formats more efficiently!


Yes, Canonical (the company behind Ubuntu) is no longer developing for phones and tablets. In addition, in Ubuntu 18.04 LTS, the default desktop shell will switch from Unity 7 to GNOME Shell. Development on Unity 8, Mir and phone/desktop convergence will come to an end. Existing phone and desktop releases will be supported for their normal lifecycle.

This was officially announced in a post from Mark Shuttleworth, founder of Ubuntu and Canonical, on the Ubuntu website: https://insights.ubuntu.com/2017/04/05/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence/

Since these are free software projects, someone else can take over development and maintenance. Right now (April 2017) these communities are looking into it:

UBports, porting what used to be "Ubuntu Touch" to multiple mobile devices
yunit, continuing development of Unity 8, with a desktop focus
and there is possible collaboration between the two

...at this stage the discussion is mostly technical and it is yet to be seen if these communities have enough resources for long-term development.


When will Octave 4.0 be added to the software center?

It is already available, for 15.10 and 16.04. As for 14.04, you'll have to request a backport; nobody has requested one yet.


You can run a NAT/Firewall software like Firestarter on the LAPTOP (install from the software center).

Another solution without running anything is to do the NAT manually with iptables on NAT Table postrouting using Masquerade on your wi-fi interface. See rule below:

-A POSTROUTING -o wlan0 -j MASQUERADE

and you will need to enable ip forwarding with:

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

or make it permanent with:

sudo nano /etc/sysctl.conf

Modify the line:
net.ipv4.ip_forward=1

Apply:
sudo sysctl -p /etc/sysctl.conf

Verify:
cat /proc/sys/net/ipv4/ip_forward

Should show 1


How to remove software of unable to find?

I just looked at the two and for:

Jack, there were two options use the apt-get or the tar ball to install. In the case of the latter you simply remove it from the installation folder using sudo rm -f /path/to/executable and for the former use the command sudo apt-get purge jack,
For the QjacCtl you installed using [sudo] make install from a directory so go there and run [sudo] make uninstall to remove it from where it was installed. This option should be used as it will locate all the connected files and remove them if you manually remove using sudo rm -rf then you have to find any such files and remove them yourself.


16.04 - Slow login, no wallpaper, missing image icons in taskbar

I can't say I'm certain of the root cause here, but just re-updating everything seems to have gotten things back to normal.

sudo apt-get update
sudo apt-get upgrade
sudo apt autoremove
sudo reboot

My best guess based on the logs is that something went terribly wrong while updating the window manager to unity (7.4.0+16.04.20160906-0ubuntu1) that at the very least caused a bunch of the built-in assets to go missing.  Another upgrade fixed the install.


Ubuntu 20.04 Radiance theme - menu separators not showing

Found a solution :)
I noted that Ambiance theme has these separators, while Radiance theme doesn't. By comparing the gtk-3.20/gtk-widgets.css files in both themes I found that it's enough to comment out the line border:none in the following fragment to get the separators back:
menu separator {
    margin-left: 5px;
    margin-right: 5px;
    border: none;
    color: @dark_bg_color;
}

However, the separators have a very light colour and are hardly visible, so additionally I made them a bit darker by changing 0.99 to 0.8 in the next fragment:
menu separator {
    border-color: shade (@dark_bg_color, 0.99);
    border-bottom-color: alpha (shade (@dark_bg_color, 1.26), 0.5);
    border-right-color: alpha (shade (@dark_bg_color, 1.26), 0.5);
}

That basically solves the issue.


Configuration of Libinput on New Dell XPS 13 16.04 LTS

I have installed Libinput-gestures following this guide. A simple workspace switch/overview with a 3 finger gesture swiping left/right (switch) or up/down (overview) can be set up with adding the following four lines:

    gesture swipe left      3 _internal ws_up
    gesture swipe right     3 _internal ws_down
    gesture swipe up        3 xdotool key ctrl+alt+Up
    gesture swipe down      3 xdotool key ctrl+alt+Down

I'll try to figure out how to enable your asked features. Then, hopefully, i will call you again. Don't forget to open the config file with root privileges:

    sudo nano ~/.config/libinput-gestures.conf

After editing the file, stop and start the gesture service:

    libinput-gestures-setup stop
    libinput-gestures-setup start

Hope it works! ;)


ubuntu 14.04 + gnome 3.10 + gnome-shell restart

You can create a shell script available within your path, maybe call it r.sh.

That script should call the gnome-shell --replace command, and then the commands you use to fix your display config.

You might need to wait a couple of seconds before running those commands in order to wait for the replace to succeed.

EDIT:

The script might be something along the lines of this:

#!/bin/bash
gnome-shell --replace
sleep 2
fix-your-display-commands


Touchpad stops responding after closing laptop lid

I am having the same problem.(Acer HELIOS 300)

My device is same SYNA7DB5:00 06CB:CD41 Touchpad, after closing the lid, after a few minutes or suspend. Touchpad stops working. Restart solves it but again happens.

My input from /proc/bus/input/devices

I: Bus=0018 Vendor=06cb Product=cd41 Version=0100
N: Name="SYNA7DB5:00 06CB:CD41 Touchpad"
P: Phys=i2c-SYNA7DB5:00
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-9/i2c-SYNA7DB5:00/0018:06CB:CD41.0005/input/input34
U: Uniq=
H: Handlers=mouse1 event17
B: PROP=5
B: EV=1b
B: KEY=e520 10000 0 0 0 0
B: ABS=2e0800000000003
B: MSC=20

I searched around and found this website,
where the comment 22 having to command :

$ sudo rmmod i2c_hid
$ sudo modprobe i2c_hid

after running these commands the touchpad starts working again (temporarily).
But after the next closing lid, the issue starts again


How to create a system image on ubuntu 16.04 LTS with current applications installed?

You may want to try using CloneZilla.

  Clonezilla is a partition and disk imaging/cloning program similar to True Image® or Norton Ghost®. It helps you to do system deployment, bare metal backup and recovery.

  Two types of Clonezilla are available, Clonezilla live and Clonezilla
  SE (server edition). Clonezilla live is suitable for single machine
  backup and restore. While Clonezilla SE is for massive deployment, it
  can clone many (40 plus!) computers simultaneously.

  Clonezilla saves and restores only used blocks in the hard disk. This
  increases the clone efficiency. With some high-end hardware in a
  42-node cluster, a multicast restoring at rate 8 GB/min was reported.

Copied from CloneZilla main page

In order to install CloneZilla, you will have to enable Universe repository:

sudo add-apt-repository universe

Then, install CloneZilla:

sudo apt update
sudo apt install clonezilla

Tutorial for CloneZilla can be found here


I had the same problem and I didn't found any solution on google.
So, I switch to EqualX -> http://equalx.sourceforge.net/index.html

Its a good alternative...
Cheers,


How to write vertical sentences in libre office writer?

Open writer, and click on Format --> Character

Then go to the Position Tab, and Click on 270 degrees

And text will be vertical


No sound on Ubuntu after plugging in HDMI but aplay works and system sound works

Try to walk through Sound troubleshooting procedure . I'd try step 6 first. Install pavucontrol and look maybe you have some applications muted. Also try changing audio device back and forth.


Bash script to delete folders older than 30 days, but omit 1st and 15th

To exclude matches based on the directory name's datetime string, you could add

! \( -name '????-15-??*' -o -name '????-30-??*' \)

or

-not \( -name '????-15-??*' -o -name '????-30-??*' \)

to the find command.

If you really want to base it on the timestamp, then the only way I can think to do that is something like (note I'm using mtime here since your touch commands don't seem to modify the ctime on my system: change %Td to %Cd for ctime):

find dir -type d -mtime +30 -printf '%Td\t%p\0' |
    while read -rd '' day dir; do
      case "$day" in
        15|30) ;;
        *) echo rm -rf -- "$dir";;
      esac
    done


Unable to access drive with installed ubuntu on dual boot system

If you've picked an existing partition to install a new OS on, then it will have overwritten that partition & put all it's own files there. This means that the partition has been, in effect, removed & replaced, and formatted, and data written to it.

The old partition most likely had data stored toward the beginning of it; depending on your luck, historical usage, and amount of space used, it is possible that some data might have survived even this treatment! If there wasn't much prior use of the drive then you're likely out of luck by now.

The odds of getting much back are thin; however, if there was important stuff there, you could try the following:

Reboot from a live system, ie CD or USB.
Download a forensic tool such as testdisk, or foremost - I use foremost, and the other question referenced above, used testdisk, so I'll talk about foremost:

Run this, using a partition other than the target to store found data - an external drive is good - with the target as your old 'F' drive.

Type in foremost -o /path_to_destination_storage -i /dev/sda4, replacing sda4 with the correct designation for your old 'F' drive.
This will produce a mess of randomly named files, classed by type, representing the files it found and recognised including the "blank" parts of the drive which not not be as blank as expected!

You can then set about playing found media, viewing pictures, searching text files, to see if you got anything back.


What free Remote Desktop (server) solutions are there?

I'm using right now FreeNx in production, and in the past our company has been a NoMachine customer. We use FreeNX on the server and the proprietary but free NoMachine client on the desktops (both Ubuntu and Windows).

The relationship isn't complex, NoMachine had a proprietary product (free as in beer up to 3 users) but releases the back-end stuff as open source. FreeNx is build with this back-end and is always somewhat less polished, and a couple of versions behind the NoMachine server. NoMachine has announced on December 21th 2010 that the next version it's NX technology (NxServer 4) will be close source only.

x2go was another company that build a open source product based on NoMachine open source libs.

Finally, Google has released NeatX, a complete independent implementation of the NX protocol. It's far from complete but usable, and totally open source.

So, recap you needs:

Security: They all are SSH connections. Tick.
Efficiency: Right now I'm tunnelling Windows RDP sessions in NX and having better speeds than naked RDP. Tick.
Free-ness as in speech. FreeNX, NeatNX, tick. NxServer. Fail.
Free-ness as in beer: NxServer up to 3 users
Ease of use: NxServer is very easy to setup and administer. Others are worse on the server side. FreeNx is on the official repos.
Cross-OS client: I haven't found a decent Andriod client. Great clients for all main desktop OSes and a java-based one that can be embeded on a web.
Cross-Os server: Nope. NxServer can tunnel RDP sessions, but doesn't work on windows.
Independent and shared sessions: Tick.


Will installing wine will allow the hackers to hack into my Ubuntu computer just like what happens in Windows?

Possible, but unlikely.

Ubuntu is not a Windows clone: There is no registry. The system calls are very different. The networking stacks are not similar. Permissions don't work the same way.

Windows malware written to exploit Windows vulnerabilities simply won't work on a Linux system. The binary might not even run - Wine is not a complete Windows syscall set.

For malware to work on Linux, it must be written for Linux. It must use Linux-specific exploits to gain permission to do anything useful. Since Ubuntu's desktop share is currently around 1%-2%, and since most gamers have little of value to steal, poisoning Windows games with Ubuntu malware seems likely to be a complicated waste of time.


In reply to Gravity, 13.04 is no longer in beta, release was last month.  In answer to your question it does sound like the USB stick wasn't created properly.

This link (same one as provided by Gravity) has much of the information you need on how to create those disks, whether it's USB stick or optical media.

http://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install

When booting the netbook up I believe F11 brings up the boot menu.  Be sure you select the USB stick to boot from.


Ubuntu on a USB stick - mount options to reduce writes

I have made a lot of installed systems into USB flash drives, and I think such systems can work quite well. You have found some mount options, that I have not found (and not used). I am looking forward to future reports from you :-)

See this link about my systems, and the tweaks that I suggest,

help.ubuntu.com/community/Installation/UEFI-and-BIOS#Final_system_tweaks

I think it is important to get a fast USB 3 flash drive (and I think there are better drives for this purpose than the Ultra Fit),

help.ubuntu.com/community/Installation/FromUSBStick#Notes_about_speed

I think that the lifetime of good USB pendrives is rather good now, but still, it is important to backup all important files at regular intervals.

An alternative is a persistent live drive with a casper-rw partiiton, and if you wish you can add a home-rw partition,

help.ubuntu.com/community/mkusb/persistent

A persistent live drive is more portable, but cannot be updated and upgraded like an installed system (the kernel and drivers cannot be upgraded). But an installed system is often portable enough.


How can I speed up boot it is unresponsive for a long time after the Desktop is presented?

Turns out there were six swap partitions on my little Lenovo.  I found the fix here.


Samba Shares Ubuntu 12.04 and Win 7 Home Network

I might be able to help with part of this.

When prompted with a username/password for the Windows share, it's asking for your Windows username and password. If you don't have a password set, you'll have to set one.


Set HDMI sound output automatically on connect/disconnect

For the benefit of people who stumble upon this question - Salem's solution almost worked for me in 13.04, I ended up gathering bits and pieces from all around the web, I think the deal breaker for me was the lack of the environment variable PULSE_SERVER

Here is my full solution, which is basically repeating Salem's solution with the few missing pieces. I also redid it as a shell script (despite my love for Python) because I was afraid at first that my Python script is running into import path issues:

(same as Salem's answer) Create a file /etc/udev/rules.d/hdmi_sound.rules as root with the content:

SUBSYSTEM=="drm", ACTION=="change", RUN+="/usr/local/bin/hdmi_sound_toggle"

Create a file /usr/local/bin/hdmi_sound_toggle as root with the content:

#!/bin/sh
USER_NAME=`who | grep "(:0)" | cut -f 1 -d ' '`
USER_ID=`id -u $USER_NAME`
HDMI_STATUS=`cat /sys/class/drm/card0/*HDMI*/status`

export PULSE_SERVER="unix:/run/user/"$USER_ID"/pulse/native"

if [ $HDMI_STATUS = "connected" ]
then
    sudo -u $USER_NAME pactl --server $PULSE_SERVER set-card-profile 0 output:hdmi-stereo+input:analog-stereo
else
    sudo -u $USER_NAME pactl --server $PULSE_SERVER set-card-profile 0 output:analog-stereo+input:analog-stereo
fi

Then make it executable with chmod 0755 /usr/local/bin/hdmi_sound_toggle

I tried to make this script as generic as possible, but you still might need to change some lines, such as the HDMI_STATUS file path or the profiles used. You can see a list of profiles by running pactl list cards and looking under Profiles.

Note that the script failed for me when I removed the keyword "export" when setting PULSE_SERVER, I think pactl is looking for the env variable

Don't forget to reload your udev rules: sudo udevadm control --reload-rules

Update this script is updated for 14.04. Before that, you would use USER_NAME instead of USER_ID everywhere


ubuntu libraries, libgc.so.2: cannot open shared object file: No such file or directory

The repo has libgc1c2 on my system too. If you are aware of differences between to versions can you try creating symlink of libgc.so.1 as libgc.so.2
If you find source code for libgc.so.2 you can compile it on your system and deploy to library path


.desktop error “There was an error launching the application”

Make it like:

Exec=sh -c 'cd "/home/twitch/.wine/drive_c/Program Files (x86)/Doom64" && wine DOOM64.EXE'

Alternatively, you can make a script and call the script from the Exec= line. The command line parser for .desktop files is much more primitive than your bash terminal prompt, and only supports parsing a single command and its arguments.


Why does Ubuntu go on disconnection fits?

I agree with James. Test that Ubuntu is the issue before blaming it.

Stick another known-to-work system on the network (eg another Ubuntu machine, a smartphone, Windows PC or Mac). You may have done this already but you haven't said as much.
If James is right, high-peer-connection bittorrent traffic is great for knocking over a faulty router with memory issues (or just a bad one). You can do it legally too, just download Ubuntu over bittorrent a few times.
Rarely (happened once to me since I started playing with WiFi) a particular network card and router just won't get along. Try another network card if Ubuntu was working fine before (and other systems work)


Figured it out. WPA authentication works with other routers, just not the router I have at home. To be clear...

WPA with other routers works.
WPA with my home router works using Windows.
WPA with my home router works with other Ubuntu systems.
Only trouble is with Ubuntu's Atheros firmware and this particular router.

Odd, but easy to fix. It's an old router anyway. :)


14.04 update: kernel crypto interface not available

I just ran into the same issue after a kernel update to 3.13.0-83-generic.  It appears to be bug with that kernel version reported on 3/16/16:

cryptsetup tcryptOpen doesn't work anymore

My temporary fix was to revert back to the previously installed kernel version.

Confirm current version:

$ uname -r
3.13.0-83-generic

Remove 3.13.0-83 version:

$ sudo apt-get purge linux-image-3.13.0-83-generic

Reboot your machine and confirm version:

$ uname -r
3.13.0-79-generic

Kernel 3.13.0-79-generic works for me and no longer get any error messages with cryptsetup.

Since you appear to be on a much newer version 3.19.0-56 you may need to somehow get to 3.19.0-51 which one of the commentators in the bug indicates it was still working "fine".

Instead of downgrading, you may try booting into that specific version via grub and setting it as your default.


You'll have to use a LiveDVD/USB to fix this. If you have another computer, download a copy of Ubuntu and burn it to your media of choice. Boot from that LiveMedia on the broken computer. Don't choose install when prompted, choose "Try before installing." You should be greeted with an Ubuntu desktop after some time. Open the file browser, open your hard drive, go to /home/, and rename your user folder back to its original name.

You said in a comment that you don't like your username, and that's why you renamed the folder. That isn't how it works. Read this for info on how to change your username.

If you need further help, just comment :).


You should try these command:

1. cd /usr/local/wolfram/mathematica/9.0/systemfiles/libraries/linux-x86-64

2. sudo mv libz.so.1 libz.so.1.old

3. sudo ln -s /lib/x86_64-linux-gnu/libz.so.1

from https://www.linuxquestions.org/questions/bodhi-92/mathematica-installation-tip-%60zlib_1-2-9%27-not-found-4175639130/


Not using newer kernel version - Any real problems with it?

3.13 is the kernel version for Ubuntu 14.04 LTS and will be supported until April 2019.  Ubuntu 14.04.2 comes with 3.16 which only has an 18 month support from Feb 2015.  So, you shouldn't have any problems staying with kernel 3.13.


How to Install Ubuntu Touch on Nexus 4 using Mac OS X?

A good option is to use virtualbox (open-source), install a fresh Saucy Salamander on it, and then, install Ubuntu-touch on your nexus 4.


Apparently snap is the problem here.  The Singleton* files are located at
/home/${USER}/snap/chromium/common/chromium/Singleton*


There's a big header at the top of that section titled "If you are running ubuntu core." Judging from your prompt (user0001@laptop) I'm guessing that's actually not the case for you.
The classic snap is only to obtain a "classic" developer environment on Ubuntu Core, which is completely snap-based (e.g. no apt, no debs, etc.). In your case, I'm guessing you're already running on a "classic" (i.e. not snap-based) distribution, in which case you don't need the classic snap, and can simply move on to the next step.
In fact, the beginning of that section says pretty much just that:

Ubuntu Core is not a traditional Linux distribution: there is no "apt", the system is read-only. How can you develop and build snap in such an environment then? We have a special snap for this!
Enter the "classic" snap. This snap will get us into a chroot, where we have a traditional Ubuntu distribution. We can there install more packages, change files projects and run snapcraft to build our snap. The home directory is shared between the container and ubuntu core. We can thus build a snap, then, outside of the classic snap, install and test it.


Sixaxis (PS3 Controller) doesn't work correctly connected with Bluetooth

I happen to also have a sixaxis controller, and originally had your same problem.

When the device is plugged in USB mode, it behaves as expected, and most games will recognize it as the correct device. On Bluetooth, it works under a different spec, which most games don't support very well on Linux.

The basic problem here is that when the controller is on USB, it is registered to the Linux kernel as a HID device with all it's codes such as product and manufacturer IDs. This allows games to quickly and accurately identify the controller and load it's configs.

When you connect it via bluetooth, whichever bluetooth driver you are using attempts to connect the device as a HID via the Xserver or userspace desktop manager. This obscures much of the information about the device from the game or application, and since Linux support is commonly left in the dust compared to Windows, the game devs or engine don't spend the time to add this level of compatibility since it's not very well standardized.

The Fix/Workaround:

Easy:
Since the "joystick" to the game is now a virtual device instead of a USB one, they will be recognized as completely different devices. If the game supports it, you could add the custom config with the remapped controls to the game.

Medium:
You can remap the joystick controls via a handy gui, perhaps jstest-gtk, jscalibrator or jscal may work. You could also try other non-official tools to remap the joystick, although I have yet to find any which work perfectly over bluetooth.

Difficult:
The xboxdrv could be used to remap the controller to Xbox, though this solution probably isn't the easiest.
Another solution would be to look into other Bluetooth drivers (though I don't recommend this) that have better support. Personally, I've found the program blueman to be extremely useful without having to reinstall bluetooth drivers.

Hope my experience helps.


How can I make Eclipse work (bash permission)?

I see a little error in that procedure.

Show the output of

ls -l /usr/bin/eclipse

if it is not executable, do

sudo chmod +x /usr/bin/eclipse

Il gives an error of unquoted string, edit it

sudo nano /usr/bin/eclipse

and add a double quote at end of "$@, that should read "$@"


arithmetic expression: expecting primary

It makes no sense (to me at least) to start a subshell within a shell function - particularly not a sh shell inside .bashrc

Instead, you could just do

opa(){
    xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * $1 / 100)))
}

If you want to supply a default value, you can do so using the ${parameter:-word} or ${parameter-word} syntax (depending on whether you want the default to take effect when $1 is undefined or empty, or only when it is undefined)

BashGuide: Parameter Expansion

i.e.

opa(){
    xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * ${1:-60} / 100)))
}

If you really want to use a sh -c '...' subshell, you'd need to pass $1 from the parent bash shell into the child sh shell

opa(){
    sh -c 'xprop -f _NET_WM_WINDOW_OPACITY 32c -set _NET_WM_WINDOW_OPACITY $(printf 0x%x $((0xffffffff * $1 / 100)))' sh "${1:-60}"
}


The dual-monitor settings ignored when using XFCE

Follow instructions here to update to Xfce 4.12., which will provide a new minimal display settings window, and options for dual monitor, which were not present in Xfce display manager in older versions.


This solved my problem:

Go to System Settings >> Fonts
Enable Force fonts DPI
Change the setting to your liking (in my case: 96)
Reboot


You can selectively hide Unity indicators with the Indicator plugin.  Right click on the indicator plugin and select Properties.  You can toggle the Unity indicators independently, and completely disable application indicators in the same way.

Please let me know if this helps.


How to install Ubuntu Desktop on XFS or BRTFS using automatic partitioning?

Well, there is a bit of a weird way to do this.

If you want to automatically create the swap EFI boot partitions and bootloader, install with ext4.

Boot back into the installer then you can do something more simple of deleting the ext4 partition create an xfs or btrfs partition format it click next and then the install will just go on.

It will reuse the existing swap partition don't worry about it saying that it will format the swap partition as that is parts of ram it just does not want to use currently.

If it is a fresh install then you do not have any data you will lose this way but do not do this on a partition you have things you want to keep as that data will be lost.

The gist here is use automatic to set all that stuff up then ubiquity will reuse what you already have with manual partitioning and you are just changing one partition and reinstalling twice.


You can use sudo losetup /dev/loop0 to see what file the loopback device is attached to, then you can increase its size with, for example, sudo dd if=/dev/zero bs=1MiB of=/path/to/file conv=notrunc oflag=append count=xxx where xxx is the number of MiB you want to add.  After that, sudo losetup -c /dev/loop0 and sudo resize2fs /dev/loop0 should make the new space available for use.


If your partition table is not corrputed, use super grub disk to boot into windows and compare checksums of the iso. If nothing is wrong with your iso, edit the ques. with every specific detail of your computer and check for supported hardware on ubuntu and linux kernel website.

If the installer messed up your partition table (backups, backups, where are you), try restoring it with a tool like TestDisk, there are alot of howtos on the web to help you.

If, luckily, you made backups before the installation (the whole disk backups that even backup your mbr and partition table), just restore the backups and try again (with a new iso?).

But, as you said, you have important stuff on there, use your liveCD to boot into a live (not installation) environment and get your stuff out of there first (that is if your partition table is intact)

Finally, before you try again, MAKE BACKUPS? You must understand how important they are and remember to make them before messing around risky stuff and there are enough websites to teach you how to do that.

Hope I helped :)


Ubuntu's stopped playing music/video files & Youtube

Solved!
This is what worked:

killall pulseaudio; rm -r ~/.config/pulse/*

Wait a little, then

pulseaudio -k

Then restart. Ta-dah!
Now how to mark this "solved"...


Is it possible to install LiveUSB persistent on NTFS or ext4?

Ubuntu can be installed persistently on flash drives and has been shown to work on 64GB Sandisk and 16GB Kingston flash drives.

To do this, burn a live/install Ubuntu image to a DVD. Boot the DVD with the flash drive plugged in and begin the standard Ubuntu installation process, targeting the flash drive with the following partitions:

A boot partition /boot, with about 250MB (ext4)
A root partition /root, with at least 2GB (ext4)
A swap partition /swap, with at least 2GB (format must be swap, not ext4)
A home partition /home, with the remaining space (ext4)

Also be aware that ext4 is a journaling filesystem and care must be taken when using removable drives. See Here for more information.


Ubuntu 18.04 vim-gtk with python2 support

I don't find any available lib package from public source.
Therefore, try to build from source, really an easy way if you follow the instructions in the following links:

GitHub: Building Vim from source
GitHub: Vim


Why does pinging work when you've shut down your Apache2 webserver?

Ping requests are not handled by a web server - only http requests are. Ping requests are handled by the kernel, so you don't need a web server to answer a ping.


How do you select a graphics driver on a headless box?

OK, after installing a bunch of X stuff (apt-get install xubuntu-desktop xfce4 -y), I was able to run software-properties-gtk and foward it over the X connection.  It showed that the proprietary driver actually was already in use.

If anyone knows an easier way to tell which driver is in use, I'd appreciate that.


Finding an old command in the shell history

History is what you are looking for.

Run history to get a list of the last 1000 commands, or run:

history | grep command_to_search

to search some pattern within the history generated list, for example:

history | grep apt

To search any apt related command, note that grep does not anchor your pattern to either end of the string, so no wildcards needed in most cases.

The history list is generated from the last 1000 commands (by default) stored in ~/.bash_history (which stores the last 2000 by default), and such file gets only updated whenever you exit your Bash session cleanly. That means, all commands from your current session will not be in that file until you close your terminal. They will also not be written if you kill the shell process.

Therefore, the command history (2000 last commands) can also be found at ~/.bash_history, by either:

less ~/.bash_history or, e.g. gedit ~/.bash_history
Opening Nautilus, Ctrl+h, and searching for the .bash_history file.

Both history and ~/.bash_history behavior can be changed by adding or modifying the options in ~/.bashrc, these are a few examples:

Append export HISTCONTROL=ignoreboth:erasedups or modify the existing HISTCONTROL line,  to remove duplicate commands, i.e. if one runs echo Hello immediately after echo Hello, only one will appear in bash_history.
Modify HISTSIZE=1000 to extend or reduce the amount of commands shown with history
Modify HISTFILESIZE=2000 to extend or reduce the amount of commands stored in bash_history. Set HISTFILESIZE=-1 for unlimited.
Append HISTFILE=/path/to/file to save the history somewhere else.

Sources and further reading:

Bash man pages

Credit to comments from Byte Commander


How to create bootable Backup (ubuntu) From Virtual box

The steps below describes how to create the bootable backup ISO of your VM.  You'll have the ISO.  If just having the backup is all needed. You can disregard the references to transferring the ISO image to a new drive.

The target drive has to be as least the size of the source drive.  The size doesn't matter as long as it's not smaller.  If it's smaller the transfer will fail.

These are the steps needed:

Create ISO image from VirtualMachine's HD
Copy the ISO to the physical Drive
Fix the integrity of the physical drive or partition

Creating the ISO image from the VM's HD

$ VBoxManage clonehd ["source vdi pathname"] ["target iso pathname"] --format RAW

The pathnames will be replaced with something similar to:

Source VDI:    "~/VirtualBox VMs/Ubuntu 16.04 LTS"
Target ISO:    "~/isoimages/ubuntu-16.04lts.iso"

The quotes are only needed if you have spaces in the pathname.  Don't include the brackets.

Now place that ISO image to the new target drive (using the example source and destination above):

$ sudo dd if="~/isoimages/ubuntu-16.04lts.iso" of=[/dev/sdc] bs=4M status=progress

In the command above the /dev/sdc is new target drive that you are transferring the VM drive to.  Don't include the brackets in the command.

Very Important!  The dd command is a lowlevel command that will not perform normal safeguards.  If you make a mistake and run it on an unintended drive, it'll be overwritten.  You lose the current data on the drive.  So be very careful with the of= command.

Now run Gparted on the new target drive.  Use this to resize the partitions to accommodate for the difference in drive size.

I perform these steps often in having a default installation for fresh Ubuntu Installs for clients machines.


Try updating the firmware. It looks like the latest for your e158 is 11.609.18.01.158 as of this date available here: http://huaweifirmwares.com/download/e158-firmware-update_11-609-18-01-158/. Failing that I've found that contacting the manufacturer is often helpful.

http://www.huawei.com/ilink/us/about-huawei/contact-us/index.htm


Ubuntu 16 LTS and Asus Xonar DS don't work sound

I have the same problem. This is a bug of the driver. It can be solved by disconnecting cable of front panel from soundcard. Or, you need to insert the headphones in the front panel input.


18.04 fresh install login loop, no mouse, slow keyboard input, geForce gtx 1060

I switched primary graphics card to the integrated gpu and was able to boot. From here I was able to install proprietary nVidia drivers.

After switching back to nVidia card everything working great.


Clearsigned file error when attempting to update packages

Remove problematic lists by
sudo rm -r /var/lib/apt/lists/*

and then retry with
sudo apt update


Open GL Lib Freeglut3 is not installing on my system.Gives the error unable to locate package freeglut3-dev

First, run the following command to enable the "Universe" repository:

sudo add-apt-repository universe

Next, update apt and install freeglut3-dev by running the following commands:

sudo apt update
sudo apt install freeglut3-dev


When will PHP 7.0.30 be available in official repositories?

The way the Security Team for Ubuntu prefers to do updates is to patch the issue in the current version, rather than do a full version update.

Therefore, PHP 7.0.30 will most likely never land in Ubuntu Xenial's repositories.  This doesn't mean the security fixes won't be included though.

The Security team usually prefers to do individual patches for the individual CVEs against the existing version.  This takes some time, but they do eventually produce packages which have the fixes.

I've checked with my contacts on the Security Team and they have confirmed that the PHP fixes for the recent security issues which prompted the release of 7.0.30 and interim versions are in the pipeline for 'fixing', though they cannot guarantee an exact ETA for the release of the patches.


can Ijust replace /dev/ptmx, /dev/pts/* and fix the terminal issue after deleting one of these files?

We can see that /dev/pts is a speudo file system:

$ mount |grep 'on /dev/pts'
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)

What this means is that there's no place on your harddrive where these files are. They are virtual files that represent something in the operating system.

I doubt that somebody has thought of implementing the creation of new files as the operating system.

I would bet that simply restarting the machine will reset the operating system back to the normal state, and these "files" will appear again.


Connecting to OpenVPN 2 factor via network manager

It looks like support for two-factor authentication has been added to the network-manager-openvpn plugin as of version 1.2.10, released on May 17, 2017. (mentioned as support for dynamic challenge-response protocol in the NEWS file and the corresponding commit, and tracked by this issue)

However, it doesn't look like that version is available on any Ubuntu release currently, and I can't seem to find an up-to-date PPA for it, so you'll likely have to build it yourself in order to get it working.

In the meantime, you can use the openvpn command-line client; it will actually ask you for the 2FA code interactively, if your .ovpn file is set up correctly.


Revelation 0.5.0 has been available for just a week now, which I guess is why it didn't make it into Ubuntu 20.04 / Mint 20. The developers have been doing a lot of work on it, mainly for a new Python version I believe. I had it working and opening my wallet on a fresh Mint 20 install last night.
The source is available here https://revelation.olasagasti.info/download.php
you need to unpack into a download folder, then to build it dependencies need to be installed:-
sudo aptitude install libgtk-3-dev python-gi-dev libpwquality-dev python3-pwquality

You can then do the usual
./configure

make

sudo make install

Unfortunately there appears to be a bug in the current Ubuntu/Mint 20 install so I contacted the Revelation maintainer to ask how to get it to work. The answer I received was to start it from a terminal using
PYTHONPATH=/usr/local/lib/python3.8/site-packages/ revelation

which works for me. I asked for further advice from the Ubuntu list. I don't have the Mint 20 computer here but when I can get to it again I'll try adding the PYTHONPATH to /etc/environment. Hopefully Revelation will then start up properly from the graphical start menu.
BTW I know nothing about Python. These days I just do a little C/C++ programming for hobby purposes for myself.


Skins for VLC Media Player don't work in Lubuntu 14.04

My wife had a similar problem after upgrading Lubuntu to 14.04 on her laptop. Under Lubuntu 13.10, she had all the skins (available for download from VLC's website) to choose from and changed skins frequently. I have no idea which skin was being used when Lubuntu was upgraded, but interestingly, the VLC icon that flashed on LXPanel for a moment was the "santa-hatted" one from Christmas. Subsequent times my wife tried again to start VLC from a desktop shortcut (5 different shortcuts to playlists we'd set up for her months ago) and got nothing. VLC wouldn't start.

There is probably a faster or easier solution for this/these problem(s); but the following is what I did to fix VLC back up to the way it was for her before:

To work with the files as root (as PCManFM no longer includes the option in a drop-down), go to Menu --> Accessories --> LXTerminal (or Ctrl+T) and type: gksu pcmanfm
Provide your password, then go to View --> Show Hidden (or Ctrl+H)
Double-click the .config folder, select (single-click) the vlc folder inside, hit Shift+Del and confirm (Enter or click the "Yes" button) you want to permanently delete the vlc folder.
Click the back icon "<" and double-click the .local folder, then double-click the share folder inside and select (single-click) the vlc folder inside, hit Shift+Del and Enter
View files (change from Places) as Directory Tree, navigate to /usr/share, select (single-click) that vlc folder, hit Shift+Del and Enter
"X" out of PCManFM and back in LXTerminal, type: sudo apt-get remove vlc
Leave everything else it suggests that you also remove and just remove the one vlc package. As soon as it is done removing VLC, type: sudo apt-get update && sudo apt-get install vlc
"X" out of LXTerminal and go to (your default) Web Browser, type in http://www.videolan.org/vlc/skins.php and click the "here" hyperlink where you see "Download all the skins at once here (37MiB)."
Click the radio button to Save File and Enter (or click the "Okay" button).
Go to File Manager (PCManFM), double-click the Downloads folder, right-click (F12) vlc-skins.zip and choose "Extract Here" from the drop-down menu. Scroll down to find the (probably still-selected) vlc-skins.zip file and hit Shift+Del and Enter to delete it.
Click one of the skins, then hit Ctrl+A to select all, right-click (F12) one of them and choose "Cut" from the drop-down menu.
Click the back icon "<" and double-click the .local folder, double-click the share folder inside and double-click the vlc folder in that. Right-click (F12) in an empty space, choose "Create New... --> Folder" and name it skins2
Double-click to enter the skins2 folder you just made, right-click (F12) an empty space and choose "Paste" from the drop-down menu.
Right-click (F12) one of the skins and choose "Copy Path(s)" from the drop-down menu.
Go to Menu --> Sound & Video --> VLC media player
Go to Tools --> Preferences (or Ctrl+P) and under Interface Settings, Look & Feel; select the radio button for "Use custom skin."
Click in the "Skin resource file" text box and right-click (F12) or Ctrl+V to paste. Enter, or click the "Save" button.
Go to Media --> Quit (or Ctrl+Q). Go back to Menu --> Sound & Video --> VLC media player

The skin you copied the path to should be on VLC now (and changeable) and whatever files, playlists and/or shortcuts you had set up before to work with VLC should work again as well.


404 Not Found - can't access login page after upgrade to ownCloud 9

There is a tracker for this issue at https://github.com/owncloud/core/issues/22970 .

The workaround for the moment is editing the file /var/www/owncloud/.htaccess and commenting out the line

RewriteRule .* index.php [PT,E=PATH_INFO:$1]

like so

# RewriteRule .* index.php [PT,E=PATH_INFO:$1]

Save and from the command line do sudo service apache2 restart.

I would appreciate anyone's time explaining to me what that line is meant to do.


create empty files using touch command from words contained in a test.txt file

Does this work for you?

while IFS= read -r i; do
  touch "$i".txt
done < <(head -20 filename.txt)


terminal shuts down immediately after 17.10 upgrade

The problem was with tmux getting screwed up.  I'm still not sure what happened to it, but I shouldn't be surprised as I was not using the one from the package manager.  I used a GUI text editor to disable the line in my .zshrc that started tmux.  (Even this was tricky because the GUI file browser hides dot files. Fortunately the GNOME GUI text editor let me type in the file name.)  The terminal now works fine but with no tmux (which I am sure I will now be able to fix).


You need to change your server to main server in Software and updates. Then, run the following commands

sudo apt-get update
sudo apt-get install ns2 nam xgraph


iptables is working with UTC time not your local time.

Try the following formula:

iptables -I FORWARD -s 192.168.0.56 --match time --weekdays Mon,Tue,Wed,Thu,Fri --timestart $(date -u -d @$(date "+%s" -d "09:00") +%H:%M) --timestop $(date -u -d @$(date "+%s" -d "10:00") +%H:%M) -j ACCEPT

This converts your local start and end time to UTC before handing it over to iptables.

Of course you can replace start time 09:00 and end time 10:00 by any other time.


How to compile the current VLC version (2.2.4) on Ubuntu 12.04?

I had similar problem and this worked for me:

% cd contrib
% mkdir native
% cd native
% ../bootstrap
% make

Everything else you may need is in here: https://wiki.videolan.org/UnixCompile/

If this doesn't work - check your dependencies.


How can I recursively copy files by file extension?

You can simply use -exec option of find command

find . -iname '*.acc' -exec cp {} <dest folder> \;


How to open a window in background without letting it get the focus?


4G Cradle Wimax & Huawei M358 modem Drivers

From Venezuela I tested 3 types of Huawei and one type of 4G in Ubuntu 12.04. I can verify that they work out of the box. Typically in Ubuntu there is no need to install 99% of the drivers for most devices. In this case, just to test them out, I connected them to the USB port. Ubuntu detected them correctly and even configured them automatically. I had internet in a couple of seconds after that.

I also have the same M358 you mention and it works correctly. Again in the 12.04 version since it is the one I am using (Don`t know what version you have or if it works on previous versions).

For the Wimax part, it is in my understanding that Ubuntu has had support for Wimax for several versions. Since 10.04 (2 years ago) I think.

You can test this out by first updating your version of Ubuntu to the latest and then connecting your Modem via USB. The network manager icon in the top right should start changing and begin configuring your device.

ESPANOL

Hola Miguel, desde Venezuela te puedo decir que probe 3 tipos de Huawei y uno en 4G. los probe en Ubuntu 12.04. Pude verificar que funcionaron perfectamente sin tener que instalar o configurar algo adicional. Tipicamente en Ubuntu, en el 99% de las veces, no tendras que instalar ningun tipo de drviers o realizar configuraciones complicadas. En este caso simplemente conecte via USB el modem y Ubuntu me lo detecto y configuro automaticamente. Tuve internet luego de un par de segundos. Todo perfecto.

Yo tambien tengo el M358 que mencionas y trabaja perfectamente. Claro vuelvo a mencionar, en la 12.04 ya que no se que version utilizas o si funcionaria en una version anterior de Ubuntu.

Por la parte de WiMax, tengo entendido que Ubuntu ha soportado esta tecnologia desde hace unas versiones atras. Creo que desde la 10.04 si no me equivoco.

Puedes probar esto simplemente actualizando Ubuntu y luego conectando tu modem via usb. El icono del network manager en la parte superior derecha deberia cambiar y comenzar a configurar tu modem.


adjust brightness without reboot and in console?

xrandr -q | grep " connected"

Type that to find out the first block of text it spits out, which is your display.

Use that with the next command:

xrandr --output VGA1 --brightness 0.7

Go get it back to original brightness:

xrandr --output VGA1 --brightness 1


Which Ubuntu version is better? LTS or recently released version?

I have recently update to Ubuntu Mate 15.04 (old dual core 2.2Ghz 2Mb RAM x86 architecture). I have had a few issues with some applications, such as the Clementine music player related to codecs (not having the right ones and an easy fix). I also use the 64-bit version on a more recent laptop (dual boot with Windows 10), and no problems there. On both machines, faster speeds were noticed and I have had no stability related problems.

If you want to have a more stable version, I think LTS might be better, especially if you do not wish to update again soon (possibly). But that is the only advantage with LTS I can think of.


Certain windows are not opening in the last position/size I used them at

Further to what David said, you can use CCSM to play with this behavior.

In the 'Place Windows' plug-in option you can pick from a range of options. I've found 'smart' preserves the majority of my settings.

This is especially true if you've got a dual monitor setup; i found i needed to use 'place across all outputs' to get my expected behavior.

I think Unity defaults to attempting to maximize applications, however. At least, that's what I've found.


You need to tap the alt-key for it to become visible. Pressing and holding alt the way you've done in the past will have the same consequences as it has in the past. That's the goal. It isn't intended to replace, but to supplement.


Install script with restart and continue

In that case you create a file where you store your last command.
And create a script that checks if the file exists and contains a line.
If so, the last time your script has run and the it must compleet.

When the file doesn't exists or is empty, do nothin. When the file contains a command, run the follow up command.

# Determine if last_command.txt exists
if [ -f last_command.txt ]; then
    # Extract the last line out of the file
    last_command=$(head -n 1 last_command.txt)

    # Check if last_command is set, that is the next command has to be executed.
    if [ ! -z $last_command ]; then
        # Excecute the next command.
    fi
else
   # Do nothing.
fi

Place the next line before the reboot command.

# Writes <Last command> to last_command.txt. Care for proper permissions!
echo "<Last command>" > last_command.txt

reboot


Handle Doc/Docx Templates on a headless server to produce PDFs preferably without using OpenOffice.org

To my knowledge there is no application that can do this without some dependency from Libre Office.

However you don't need to install the whole office suite when only performing commandline conversions.

You can try if the tool unoconv  meets your needs. It has python and python-uno as a dependency. The latter will also install libreoffice-core as a dependency but not the whole office suite.


Software Updater quits before updating software

As out of my comments the solution that worked for you is to disable ppas that you have added before an upgrade to newer version.

As stated if you're trying to upgrade to 14.04 some of the packages and ppas can be no longer available in 14.04 they have been stopped in developing or replaced with others that 14.04 requires. The best is to disable all those ppas that you have added to Software & Updates in System Settings you can find that for example:

Unmark ppas corresponding to Launchpad and then run do-release-upgrade -c -d there you'll be listed with possible actions to upgrade. And if you need some of those packages from those ppas that you have disabled you can check it in Launchpad for example this ppa as you can see its developing has been stopped since 12.10 version of Ubuntu though you can still run it in Ubuntu 14.04 you just have to find another ppa with current package like this one or install it manually from .deb file.


The R packages are usually compiled on the Linux system.

So we need to install some development tools:

sudo apt-get install build-essential pkg-config r-base-dev

and development Ubuntu packages for compilation of mentioned R packages:

sudo apt-get install libxml2-dev libssl-dev libcurl4-openssl-dev

Then you can run R session and install package to it:

 $ R
 > install.packages('tidyverse')
 ...
 * DONE (tidyverse)

Note: this method was tested on Ubuntu 16.04 LTS and 18.04 LTS as you have not specified your Ubuntu version.


How to install Google Drive on Ubuntu 14.04?

Updated 9/15/2015 Due to Google's changing API you might be having problem during installation of Grive. So the site I was referencing have also changed their tutorial for installing Grive2.

You can find new tutorial on this new link: How to install Google Drive Grive2 on Ubuntu

To install Grive2 in Ubuntu, Linux Mint and derivatives by using the main WebUpd8 PPA, use the following commands:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install grive

Yes, It is true that there isn't a native google drive client for linux yet, so you couldn't get app on Software Center. And ways to install in 12.04 and 14.04 are somewhat different.

Old outdated reference Tutorial How to install Google Drive on Ubuntu 14.04


I also have the same problem. I did a lot of research, but I have not found a solution for me. Instead, for many people, this was the solution:

Open Terminal
Type sudo vim /etc/default/keyboard
The values within the file should be as follows:

XKBMODEL="pc105"
XKBLAYOUT="it"
XKBVARIANT=""
XKBOPTIONS=""

XKBLAYOUT is the code of your keyboard layout. Type man xkeyboard-config for shows the codes for keyboard model and layout.
exit

Reboot and check. I hope this is the right solution for you too ;)


The error was due to low storage, after access the machine via live Ubuntu usb freed up some storage and now its working.


Will 11.10 have Kernel 3.1 when it hits stable release or not?

You can check the current status of the included kernel at

http://packages.ubuntu.com/oneiric/linux-image and/or
https://wiki.ubuntu.com/KernelTeam/ReleaseStatus/Oneiric .

Since oneiric is scheduled to be released in less than a week, it will likely come with a 3.0 kernel. If you want to install 3.1, you can do so from the kernel team's ppa.


Loading LADSPA plugin not working (Module load failed.)

There where two errors in my command:

Original command:

pacmd load-module module-ladspa-sink sink_name=ladspa-sink master=alsa_output.pci-0000_00_10.1.analog-stereo plugin=sc4m_1916 label=SC4mono control=0,100,400,0,0,3.25,0,0,0
Module load failed.

Label changed to sc4m:

pacmd load-module module-ladspa-sink sink_name=ladspa-sink master=alsa_output.pci-0000_00_10.1.analog-stereo plugin=sc4m_1916 label=sc4m control=0,100,400,0,0,3.25,0,0,0
Module load failed.

Control values changed:

pacmd load-module module-ladspa-sink sink_name=ladspa-sink master=alsa_output.pci-0000_00_10.1.analog-stereo plugin=sc4m_1916 label=SC4mono control=1,1.5,401,-30,20,5,12
Module load failed.

Label and control values changed – success:

pacmd load-module module-ladspa-sink sink_name=ladspa-sink master=alsa_output.pci-0000_00_10.1.analog-stereo plugin=sc4m_1916 label=sc4m control=1,1.5,401,-30,20,5,12

Change summary:

label=sc4m
control=1,1.5,401,-30,20,5,12

The correct labels for the steve harris plugins (http://plugin.org.uk/ladspa-swh/docs/ladspa-swh.html) seem to be the first part within the parenthesis next to the plugin name.

The control values must also be carefully chosen.


How can I transfer photo's from my Kodak camera that normally would use KODAK EASYSHARE Software?

I use rapid-photo-downloader for my canon and nikon cameras. I think it supports kodak too.

photographic workflow


Rename localhost folder. Gives empty screen

Try to add correct port in /etc/apache2/ports.conf


Normal wallpaper not appearing; only getting greeter ("welcome") wallpaper

I'm not sure this constitutes an "answer" -- but in the midst of doing some routine work (Evince was the active program at that moment, but several others were also open), the problem cleared. I have now re-set the wallpaper back to the spanning "Urnersee Panorama" crop (noted in OP's question), and it is displaying in all its glory.

So this is quite mysterious. One doesn't like "mysterious" when it comes to computer settings, so if anyone can shed light on the phenomenon, that would still be a help.

Update And just as mysteriously, the non-spanning glitch is back. As I said, "One doesn't like 'mysterious' when it comes to computer settings..."! Hopefully this time around it will "clear" soon, too. But it shouldn't happen at all. Something isn't "clearing" on the way to a stable system, perhaps?


Does MaaS 1.2 have a built-in tftp server?

The new MaaS on Ubuntu 12.10 doesn't need tftp server. It uses a python/twisted based tftp server, which I believe is far more efficient. Hence, you don't need to install anything else. And it doesn't need configuration as well.

The tftp related files are stored in /var/lib/maas/tftp folder.

And the kernel option changes if required, can be done in kernel_opts.py file found in
/usr/share/pyshared/provisioningserver/ folder.

Hope you find this useful.


LibreOffice does not do two-sided printing on HP OfficeJet Pro 7740

In Libre Office Click on File > Printer Settings

In the pop up dialogue box click Properties

On the Paper tab check that "Duplex" is set to Long Edge (Standard)

On the Device tab under options in the left column, check that "Duplexer Installed" = Installed

On the **Device tab check that "Printer Language Type" = PostScript (Level from driver)

Click "Ok" and the document you are working in should print double sided.


Error while loading shared libraries: libtcmalloc_minimal.so.4?

The library is provided by the libtcmalloc-minimal4 package which is available in repositories for 16.04 (and 16.10).

The game requires the 32-bit version of the library it seems (clue found in this GitHub issue) so if you're running a 64-bit system and haven't got any 32-bit packages, you'll need to run:

sudo dpkg --add-architecture i386

and then install with the :i386 suffix:

sudo apt install libtcmalloc-minimal4:i386


Here was another answer, but it's been a month since author deleted it. Let's write a new one.
Hopefully, someday someone will create a PPA with latest libinput. Until then, here are instructions on building a latest libinput package yourself.
It is easy, instructions below are mainly taken from here, and the tip about meson is taken from deleted answer. I also assume you don't need to generate docs, so I don't install dependencies for them and disable them in meson call. It's also important for --prefix to be usr in meson-configuration line, so libraries are installed to standard locations.
Step1: install build depenendencies
Hopefully I didn't miss any, but feel free to comment if I did.
$ sudo apt install -y git ninja-build
$ sudo apt build-dep libinput

You'll also need meson. It is in Ubuntu repo, however in the next command I install it with pip. The reason is: due to Ubuntu mostly providing ancient software there's a possibility their meson version will be too old to be able to build libinput. ATM Ubuntu 18.04 is known to have this problem, but I assume with time it may happen to other releases as well.
$ sudo apt install python3-pip
$ sudo pip3 install meson

Step2: clone and build libinput
$ git clone https://gitlab.freedesktop.org/libinput/libinput
$ cd libinput
$ meson --prefix=/usr -Ddocumentation=false build/
$ ninja -C build/

Step3: create libinput package and install
Though easiest way of installing built libinput is running ninja -C build install, but I strongly discourage that unless you know what you're doing (you will get untracked files all over your system that may get overwritten on system update, and depending on situation may even break libinput completely).
Instead, use this script I've written to assemble a package.
$ wget https://gist.githubusercontent.com/Hi-Angel/45030ab89a2378b42511612cbe48d247/raw/package-deb-libinput.sh
[…]
$ bash ./package-deb-libinput.sh  build/
[…]
dpkg-deb: building package 'libinput-git' in 'libinput_1.15.3-212-g60edbd2d.deb'.

You can see the name of the new package in the script output, so all that is left is to install it (note: the ./ part in the path is needed for apt to correctly interpret argument as a local file):
$ sudo apt install -y ./build/libinput_1.15.3-212-g60edbd2d.deb

To make use of installed libinput you need to restart graphics session (for example, reboot).

Reverting to older libinput
May you wish to get back the distro-provided libinput, just install libinput10 package (it will replace libinput-git):
$ apt install -y libinput10

Appendix
In case something happens to github gist, here's the current content of the script:
#!/bin/bash
set -e

if [ "$#" -ne 1 ]; then
    echo "Wrong number of parameters.
Usage: $(basename $0) build_dir"
    exit 1
fi

MESON_BUILD_ROOT=$(readlink -f $1)
PACKAGE_VERSION=$(grep -Po 'LIBINPUT_GIT_VERSION.*"\K.+(?=")' "$MESON_BUILD_ROOT"/libinput-git-version.h)
PKG_DIR="$MESON_BUILD_ROOT"/deb
mkdir -p $PKG_DIR/DEBIAN/
cat > $PKG_DIR/DEBIAN/control <<- END_OF_TEXT
PACKAGE: libinput-git
Version: $PACKAGE_VERSION
Architecture: amd64
Maintainer: Mystique Packager
Description: input device management and event handling library
Depends: libevdev2, libmtdev1, libudev1, libwacom2
Conflicts: libinput10, libinput-bin, libinput-dev, libinput-tools
Provides:  libinput10, libinput-bin, libinput-dev, libinput-tools
Homepage: https://gitlab.freedesktop.org/libinput/libinput
END_OF_TEXT

cd "$MESON_BUILD_ROOT"
DESTDIR=$PKG_DIR ninja install
fakeroot dpkg-deb --build $PKG_DIR/ libinput_$PACKAGE_VERSION.deb


After installing  Rabbit VCS,you have to reboot your ubuntu, lubuntu,xubuntu, than you can't find any new icon on the applications menu to start it. Instead of it. you can able to find the SVN on your  Nautilus File manager.

Just open your  file manager and move to any directory and right click there.

The RabbitVCS options are there for you.

If Thunar is not installed on your machine. No Problem it will work on your machine itself. So linux core have packages for the Thunar.

If you need editor, you can install  gedit,otherwise left it without installing it.


How to set up a very secure file server for home backup that is not available to the internet?

Well, first you should be behind a router and if your router is properly configured you can not reach the server from outside ("the internet").

Otherwise, use your firewall. UFW is an easy to use front end to iptables

sudo ufw default deny
sudo ufw allow from 192.168.0.0/24

change "192.168.0.0/24" you your netmask.

See

http://blog.bodhizazen.com/linux/firewall-ubuntu-servers/

http://bodhizazen.com/Tutorials/iptables

Also look at securing your server (IMO you should rsync over ssh)

http://bodhizazen.com/Tutorials/SSH_security


Unable to open PHP files on Linux platform on Ubuntu

Please check the file permissions. You might not have the permission to read the file. You can use the chmod command to change permissions. You may also check the chown command. Once you have set the permissions correctly you should be able to open files using a text editor.

To open the file using localhost/worm/data.php, firstly make sure permissions are set properly to the files. The other thing to consider is to check if apache and php are installed or not. If they are not installed check the Apache Documentation.


how can i delete my hard drive and format to NTFS

Check the installation of ntfs-3g

sudo apt-get install ntfs-3g

Open a terminal and identify your drive:

lsblk

Sample output:

sdc      8:32   1   7,5G  0 disk
└─sdc1   8:33   1   7,5G  0 part /media/user/BAFC-91D9

Then unmount the device

sudo umount /dev/<your_device_and_partition>

in my case

sudo umount /dev/sdc1

and format with

sudo mkfs.ntfs /dev/<your_device_and_partition>

in my case

sudo mkfs.ntfs /dev/sdc1

Or simply install Windows. The hard disk is automatically formatted.


Shorter way to apt-get install php7.0-{some modules}

As @Videonauth suggested, you can use apt-get install php7.* but that will install all packages whose names contain php7. To install those whose names starts with php7, use apt-get install '^php7. *. To instal only those on your list, you can use brace expansion. The format is almost what you already tried: braces but a comma-separated list:

$ echo foo{a,b,c}
fooa foob fooc

Therefore:

$ echo php7.0-{fpm,mbstring,mcrypt,phpdbg,dev,curl,sqlite3,json,gd,cli}
php7.0-fpm php7.0-mbstring php7.0-mcrypt php7.0-phpdbg php7.0-dev php7.0-curl php7.0-sqlite3 php7.0-json php7.0-gd php7.0-cli

So, you could run:

sudo apt-get install php7.0-{fpm,mbstring,mcrypt,phpdbg,dev,curl,sqlite3,json,gd,cli}


Top bar margin is displayed wrong after update to 20.04

I had the same problem after updating from 18.04. Changing the GNOME Shell theme solved the problem. You will need to install:

GNOME Tweak Tool

sudo apt-get install gnome-tweak-tool

User Theme extension

Then just download any gnome shell theme (Arc Theme worked for me) and choose it in the tweak tool. Hope this helps.


Ricoh MPC3300 printing sheet per sheet on Ubuntu 14.04

Installed new drivers (PPD) from :
http://www.openprinting.org/download/PPD/Ricoh/PXL/

Used the PXL.
Ricoh Aficio MP C3300 PXL

Go to Printers - right mouse click - properties - Make and Model - Select the downloaded ppd


How to create a rotation animation using shell script?

Use that script:

#!/bin/bash

chars="/-\|"

while :; do
  for (( i=0; i<${#chars}; i++ )); do
    sleep 0.5
    echo -en "${chars:$i:1}" "\r"
  done
done

The while loop runs infinite. The for loop runs trough each character of the string given in $chars. echo prints the character, with a carriage return \r, but without linebreak -n. -e forces echo to interpret escape sequences such as \r.
There's a delay of 0.5 seconds between each change.


Hmmm... probably @A.B. is right. But I had a CRT where the problem was really the gamma (the curve applied to the luminosity to make it linear to the eye). You can try to play with the curve values. So:

Find the name of your device:

[romano:~] % xrandr --current
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 32767 x 32767
VGA1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm
   1920x1080      60.0*+
   1680x1050      60.0
   1280x1024      75.0     60.0
   1152x864       75.0
   1024x768       75.1     60.0
   800x600        75.0     60.3
   640x480        75.0     60.0
   720x400        70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)
HDMI2 disconnected (normal left inverted right x axis y axis)
DP2 disconnected (normal left inverted right x axis y axis)
VIRTUAL1 disconnected (normal left inverted right x axis y axis)

it's VGA1 for me... play with this command:

[romano:~] % xrandr --output VGA1 --brightness 1.5

if this is a mess (in my LCD all goes mostly white ;-) --- can't show with a screenshot because the shot is ok --- pixels are still the same), go back with

[romano:~] % xrandr --output VGA1 --brightness 1.0

(It is not a bad idea to have it ready on another terminal so that  you can execute it blindly). You can also have a look at --gamma for finer control. From xrandr manual:

   --gamma red:green:blue
          Set the specified floating point values as gamma  correction  on
          the crtc currently attached to this output. Note that you cannot
          get two different values for cloned outputs (i.e.:  which  share
          the  same  crtc)  and  that  switching an output to another crtc
          doesn't change the crtc gamma corrections at all.

   --brightness brightness
          Multiply the gamma values on the crtc currently attached to  the
          output  to specified floating value. Useful for overly bright or
          overly dim outputs.  However, this is a software only  modifica‐
          tion,  if  your  hardware  has  support  to  actually change the
          brightness, you will probably prefer to use xbacklight.

Default values probably are --gamma 1.0:1.0:1.0 --brightness 1.0, but you can check with xrandr --verbose.


Suspend writes the info to RAM (memory) & still uses power: drive(s), cpu and the moniter(s) are powered off.The RAM modules are placed in self refresh mode and the CPU is powered off. The chipset is responsible for using the standby power to stay on enough to reactivate the main power supply when a button is pressed

and if you want to know what hibernate is:

  Hibernate writes info to hard drive then powers laptop off.
  Hibernate is resumed by pressing the power button.

So in terms of optimising battery life hibernate is better, but can take as much time as powering off, suspend is quicker but still uses power.

And in your question concerning hdd life. You should be able to drive over bumpy roads because the disk drive stops spinning.


Is it possible to use Juju to install Openstack from local unsigned repository?

Use the following code if a debian repository needs to be added.

You will need to import the charmhelpers python library into your charm. If the charmhelpers directory is under the hooks/ directory add the following code to your install hook.

from charmhelpers.fetch import configure_sources
configure_sources(update=True)

You will also be required to add two configs into your config.yaml

install_sources:
  default: 'ppa:<custom-ppa>/stable'
  type: string
  description: Provide the install source URL.
install_keys:
  default: null
  type: string
  description: Provide the respective keys of the install sources.

You can pass configs as follows in your config.yaml:

charm-name:
  install_sources: "deb https://stub:key@private.example.com/ubuntu trusty main"

Deploy add the --config flag when deploying the charm:

juju deploy --config config.yaml charm-name

The install_sources value can be a URL or sources.list entry, as supported by: add-apt-repository. Examples:

"ppa:charmers/example"
"deb https://stub:key@private.example.com/ubuntu trusty main"
'proposed:' may be used to enable the standard 'proposed' pocket for the release.
'cloud:' may be used to activate official cloud archive pockets, such
as 'cloud:icehouse'
'distro' may be used as a noop


USB drive auto-mounted by user but gets write permissions for root only

A possible reason could be that you formatted/created the storage disk with a tool with root privilege and so the file-system created was owned by the root.
Let's have a look at the o/p of your ls commands:
$ ls -ld /media/adam/WDPassport2T
drwxr-xr-x 4 root root 4096 Jan 15 16:57 /media/adam/WDPassport2T
$ ls -l /media/adam/WDPassport2T
total 20
drwxr-xr-x 2 root root 4096 Jan 15 16:57 backuppc
drwx------ 2 root root 16384 Jan 15 15:37 lost+found

The file-system is owned by the root, as indicated by ls -ld for your mount WDPassport2T and the permission string drwxr-xr-x shows the owner root has the RW permissions while, the members of group root along with the world/others will only have R-permission.
To solve you could change the permissions with chmod or just change the ownership recursively, and this is what I've shown below:
sudo chown <username>:<groupname> -R /path/to/target

which in your case would be:
sudo chown adam:adam -R /media/adam/WDPassport2T/

Now if you need, you may also set the permissions with chmod:
find /media/adam/WDPassport2T/ -type f -execdir chmod 666 -Rv {} +

(which gives owner, group and the world RW permissions for all the files in the target.)
find /media/adam/WDPassport2T/ -type d -execdir chmod 777 -Rv {} +

(which gives owner, group and the world RWX permissions for all the directories in the target.)
Reference:
Official Ubuntu Documentation: File Permissions


i mount my hdd's in:
/etc/fstab

my root filesystem

UUID=84a8ae47-0504-4b4a-9911-2612c4186ac7 /               ext4    errors=remount-ro 0       1

my ext4 hdd

UUID=623643e8-f7ef-4edc-9c83-7b13c89b002d   /media/Shared   ext4    defaults    0   0

my ntfs hdd

UUID=2EB81EA6B81E6D19  /media/Storage  ntfs-3g  defaults,windows_names,locale=en_US.utf8  0 0

How do I avoid the "S to Skip" message on boot?
states that you should add "nobootwait" to the line with "nosuid,nodev..."


Why are my 32bit OpenGL libraries pointing to mesa instead of nvidia, and how do I fix it?

Option 1: Try running sudo ldconfig in a terminal. Reboot and try.

Option 2: If this doesn't sort it, you will have to manually add the directory of the NVidia libs (/usr/lib32) to the ldconfig configuration file (/etc/ld.so.conf.d/libc.conf) and then re-run ldconfig (as root of course)

EDIT: I would make a copy of libc.conf before changing it.


Start synaptic and search for the kernel id you want.  I could not find 4.4.0-77 so I used 4.4.0-78 for this example.  Select the 4 packages shown for your kernel.

Install them, then reboot.  Hold left shift to get the grub menu if you don't have it displayed by default.  Select Advanced Options for Ubuntu from the grub menu and select the kernel you want.

FYI, in general, it is a good idea to keep at least the last old kernel around, in case stuff like this happens.


ssh config depending on interactive mode

You can alias ssh if using a non-interactive shell as follows in your ~/.bashrc file:

    if [ -z "$PS1" ]; then
        alias ssh='ssh -F ~/.ssh/config-non-interactive'
    fi

... then copy the non-interactive configuration you'd like to use to ~/.ssh/config-non-interactive and you should be set.


Go to:
System Settings -> Keyboard -> Layout -> Add
Then select:

Language: Portuguese
Layout: Portuguese (Brazilian)


Boot into a Live-USB Ubuntu OS and follow the steps outlined in the website you posted. That will get you a terminal to work from.

Please click edit and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our channel to you. All facts about your system should go in the Question with edit –


Accidentally deleted /usr/bin/python3.5, cannot reinstall

I fixed it.

Find all dependencies:

dpkg -l | grep python3.5

Remove all of them:

apt-get --purge remove libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib python3.5 python3.5-dev python3.5-minimal

Reinstall

apt-get install python3.5-dev


Ubuntu 20.04 Desktop - Only suspend after 10 minutes on battery

Yes, you can do it

Go to settings → Power → automatic suspend and change the time

:))


I get Authentication is needed to run `/usr/bin/dropbox' as the super user

Find where your dropbox executable is using the following command:

which dropbox

This will show you the actual filepath of the dropbox executable file. In most cases, it will be /usr/bin/dropbox. Open it with your preferred editor:

sudo vi /usr/bin/dropbox

Find the following line and change

PARENT_DIR = os.path.expanduser("/var/lib/dropbox")

to

PARENT_DIR = os.path.expanduser("~")

This will direct Dropbox to access your Home folder for the config files. Save and restart dropbox:

dropbox start -i

Further explanations