How to make Windows guest running on qemu/kvm obtain IP address from physical router with DHCP server?

There is a native bridge (virbr0) that is installed with the QEMU/KVM environment.  It is used for NAT (Network Address Translation) connections to your local subnet.
This should be sufficient for managing your IP camera.  Your XP VM would only need its own IP on the net if other systems will be contacting it.
But in either case you should start with the NAT bridge to keep things simple until you are certain your XP VM is configured correctly. It almost certainly is not!
You can test for the presence of the Virtual Bridge on your host system by:
virsh net-dumpxml default

If it is present, you should be able to select it for use by your XP VM in virt-manager by setting Network source to "Virtual Network 'default':NAT" as shown:

Check your XP for a working network driver.  If the following picture is familiar...

you need a driver disk! I recommend Red Hat's virtio driver.

Download the latest virtio drivers ISO (https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.185-2/virtio-win.iso last I checked).
Attach the ISO to your XP VM and boot it!
At "Find new hardware"/connect to Window Update, decline (NO).
Select "Install from specific location"/Next
Select "Search removable media"/Next
At Hardware Installation/Red Hat Virtio Ethernet Adapter", Select "Continue Anyway".
Open a command prompt window and ping your IP camera (it may take a few seconds for the adapter to come up).

Add a comment if you still want the full bridge.  I use networkd/Netplan exclusively in my environment but I could pound out a Network-Manager solution, I think.


The torrent file is actually shared by just sending them the .torrent that your client created.
However, after creating the .torrent you'd need to upload it to a tracker or specify a tracker when creating the .torrent, alternatively have your client broadcast via DHT. Otherwise there is no way for your client to be part of a swarm that other clients could pick up.

If you're looking for a CLI torrent client, I'd suggest transmission-cli which is quite basic and should get the job done. deluged is personal favorite and handles large numbers of torrents quite nicely.


Multiple R installations... lost overview

most probably tcl libraries will be present in your /home/user/miniconda2/lib folder. so set your env variables in your ~/.bashrc file.

export TCL_LIBRARY="/home/palashkulshreshtha/Documents/anaconda3/lib/tcl8.5"
export TK_LIBRARY="/home/palashkulshreshtha/Documents/anaconda3/lib/tk8.5"

make sure your tcl8.5 and tk8.5 directories are present.
This solved the problem for me as then conda will look into above directories for init.tcl and other requirements.


Don't remember PGP passphrase until end of session

Settings for Seahorse are in 'gsettings': gpg-cache-method and gpg-cache-ttl. Answered here.

If you preffer, you could also have 'gpg-agent' manage the keys, check this.


I had a similar problem yesterday.
As Tomasz suggested it can possibly be a problem with the kernel you should reboot your pc and try to boot with a different kernel. That may help you.

How to boot with a different Kernel

When your computer starts if you have two or more operating systems you should see a screen like this (if you don't hold press shif or esc keys at the very start of your computer)

Select Advanced options for Ubuntu

Now you probably will see two or more different kernels:

  Select an older version, remember which one you choose, you may need to try this more than once

Once you boot with a different kernel you may be able to use your network do a sudo apt-get update and sudo apt-get upgrade and sudo apt-get dist-upgrade and restart your computer to see if now you can boot without choosing the kernel.

That worked for me.

If you want more detailed tutorial you can read this howtogeek article


Black Screen after fresh install of ubuntu 16.04

It seems that the problem behind this is the proprietary Nvidia drivers , try again a new installation only this time go to Nvidia page and download from them the latest drivers and install them.

If this doesn't work ether i am afraid that you have to use the free-open-source drives (which is not a bad thing to do btw) since we can't make any changes to the Nvidia proprietary drivers, only the company who is behind this can make changes BUT the alternative choices you got is:

1. You can try other distros such as Xubuntu maybe the proprietary drivers will work better there, AGAIN it depends from the Nvidia company if they gonna work ok NOT from the free-open-source community.

2. Stay with the free-open-source drivers until Nvidia make an updated version of their drivers by checking their page very often.

3. Wait with the free-open-source drives until someone else answers to this question because i don't use the unity UI.


Can't connect with Remmina, I think my firewall is blocking it and I don't know what to allow in order to connect

On my systems I connect through port 5900.

Assuming you use ufw as your firewall, you can open this port using the command  sudo ufw allow 5900.


Show locations of duplicate lines across multiple files

TL;DR

You can do something like this:

file_expr="*.txt"; sort $file_expr | sed 's/^\s*//; s/\s*$//; /^\s*$/d' | uniq -d | while read dup_line; do grep -Hn "^\s*$dup_line\s*$" $file_expr; done| sort -t: -k3 -k1,2 | awk -F: '{ file=$1; line=$2; $1=$2=""; gsub(/(^[ \t]+)|([ \t]+$)/,"",$0); if (prev != "" && prev != $0) printf ("\n"); printf ("\033[0;33m%s (line %s)\033[0m: %s\n", file, line, $0); prev=$0; }'

Result:

a.txt (line 3): 11
a.txt (line 8): 11
b.txt (line 8): 11

a.txt (line 7): 55
b.txt (line 3): 55

Change the content of the variable file_expr to change the files affected

Explanation

I used the sed command to trim all trailing and leading whitespaces and remove empty lines, making the uniq -d get only the lines which are REALLY duplicate...

Then i loop over the duplicate lines (printed one for every match) and i grep them into the files using the flags -n (print file and line) and -H (always show the filename). The expression ^\s*$dup_line\s*$ into the grep make it match the whole line (so that for example "qwerty11uiop" doesn't match).

As you can see it works both using file globbing...

file_expr="*.txt"; sort $file_expr | sed 's/^\s*//; s/\s*$//; /^\s*$/d' | uniq -d | while read dup_line; do grep -Hn "^\s*$dup_line\s*$" $file_expr; done

Result:

a.txt:3:11
a.txt:8:11
b.txt:8:11
a.txt:7:55
b.txt:3:55

... and literal file names..

file_expr="a.txt b.txt"; sort $file_expr | sed 's/^\s*//; s/\s*$//; /^\s*$/d' | uniq -d | while read dup_line; do grep -Hn "^\s*$dup_line\s*$" $file_expr; done

Result:

a.txt:3:11
a.txt:8:11
b.txt:8:11
a.txt:7:55
b.txt:3:55

Little Tweaks

I then played around a little to make it visually more comfortable... Like this:

file_expr="a.txt b.txt"; sort $file_expr | sed 's/^\s*//; s/\s*$//; /^\s*$/d' | uniq -d | while read dup_line; do grep -Hn "^\s*$dup_line\s*$" $file_expr; done| sort -t: -k3 -k1,2 | awk -F: '{ file=$1; line=$2; $1=$2=""; gsub(/(^[ \t]+)|([ \t]+$)/,"",$0); if (prev != "" && prev != $0) printf ("\n"); printf ("\033[0;33m%s (line %s)\033[0m: %s\n", file, line, $0); prev=$0; }'

Result:

a.txt (line 3): 11
a.txt (line 8): 11
b.txt (line 8): 11

a.txt (line 7): 55
b.txt (line 3): 55

In this last view everything is more "human" and the duplicates are grouped together first by result and then by file (you can see that the results in a.txt are all together), so it's easier to understand..

The file name and the line now are yellow (\033[0;33m) to distinguish from the text in the actual line in case of multiline (excuse the word-pun) duplicates


Found a way, just use:

resize2fs <image_name> <size><K/M/G>


Kate only shows up when I search for it, not in the application launcher (Plasma 5.21.4)


File copy fails over Ubuntu Gateway using NAT

I prefer to be very specific with interfaces and flow directions. Suggest this:

sudo iptables -F FORWARD
sudo iptables -A FORWARD -o eth1 -i eth0 -j ACCEPT
sudo iptables -A FORWARD -i eth1 -o eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE


I don't think this is a problem with your sudoers file. There are other reports of a similar bug in the debian bugtracker.


How do I get the names in my icon theme for use with pythons appindicator module?

Simple:

import gtk

icon_theme = gtk.icon_theme_get_default()
print icon_theme.list_icons()

The output of which is a tuple of all the icon names:

('input-gaming', 'gnome-aorta', 'stock_bottom', 'config-language', ...)

See also: gtk.IconTheme.list_icons in the pygtk docs

If you'd like to get your icon as a GtkPixbuf, you can use the load_icon method:

>>> icon_theme.load_icon("gtk-execute", 48, 0)
<gtk.gdk.Pixbuf object at 0xb737443c (GdkPixbuf at 0x907bf38)>

If you want a filename instead, you can use the lookup_icon method:

>>> icon_theme.lookup_icon("gtk-execute", 48, 0).get_filename()
/usr/share/icons/Humanity/actions/48/gtk-execute.svg

Where 48 is the size of the desired icon (see also: get_icon_sizes).


As @George Udosen wrote, in default Ubuntu repository is OpenJDK. If you want to have Oracle version, you can install them from this ppa: https://launchpad.net/~webupd8team/+archive/ubuntu/java/


Can I make a Bootable USB with an ISO something other than a LIVE ISO?

Erm? You made an "ISO" with dd of an existing installation from a harddrive to use it with UNetbootin for setting up Ubuntu on an external drive?

That's one step too much and a very crude workaround: xkcd.com/763/

UNebootin is intended to be used with ISO images for optical media. If you dd something from your harddrive that's an image too, but not for optical media, and not what UNetbootin expects.

To install Ubuntu on external media like USB pendrives or external HDDs/SSDs, just choose this device during installation as a traget device (including the bootloader location) and the installer will set up everything for you.

Alternatively you can use dd to copy an existing installation to another device and install the bootloader on the device, but I would rather recommend copying of the files in the filesystem (use cp -a or rsync -a) instead of copying the entire filesystem and changing the UUIDs. This way you don't accidentally end up with the same UUID on multiple devices, which may get you into trouble. Also writing to certain types of storage with dd is harmful.

Related questions

How can I repair grub? (How to get Ubuntu back after installing Windows?) – General answer mostly for setting up MBR-booting (old way for BIOS machines).
Is it still possible to install Ubuntu to an external harddrive with UEFI? – Instructions for setting up UEFI-booting or MBR-booting on GPT and MBR partition tables. (And also for Macs.)

To extend on why UNetbootin is not to be used with harddisk dump images: Live ISO images usually contain an image inside of the image which contains the Live environment and a special (non-standard) configuration to boot up this image from optical read only media. UNetbootin is a workaround to use these ISO images with USB storage devices. Actually you are using a workaround (UNetbootin) of a workaround (bootable system on optical read only media) and you where just trying to add another workaround on top (create an "ISO" to use it with UNetbootin).


nova-api service shuts down automatically

I know its late to answer but posting as it might help others.
I had the same problem and I found out while installing nova-network and nova-api-metadata , nova-api package is getting uninstalled which was strange.
After reinstalling nova-api package problem solved.

( Ubuntu 14.04 , openstack kilo version )


ext4 includes the journal and extents already, so specifying those options is redundant.   You want the journal because it protects ext3 and ext4 from corruption on an unclean shutdown.


You could write it as

sudo ufw default deny & sudo ufw allow ssh & sudo ufw allow http & sudo ufw allow https & sudo ufw allow 53/tcp & sudo ufw allow 53/udp & sudo ufw allow from any port 68 to any port 67 proto udp

seperating the commands by &.

Anyway more beautiful would be writing a script
E.g. in ~/setUp_UFW.sh

#!/bin/bash

sudo ufw default deny l
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 53/tcp
sudo ufw allow 53/udp
sudo ufw allow from any port 68 to any port 67 proto udp

Make the script executable

chmod +x ~/setUp_UFW.sh

than everytime you just go

~/setUp_UFW.sh

to set it up.
(You will be asked for the sudo password when the script sees sudo the first time.)


Ubuntu Touch how to detect If the application is closed

The close event in QML seems to be a recent addition (Qt 5.1) so only 14.04 which provides Qt 5.2 will be able to catch such event with this kind of handler:

import QtQuick 2.1
import QtQuick.Window 2.1

Window {
    onClosing: {
        console.log("Bye")
    }
}

Alternatively you can also use onVisibleChanged signal handler.

Sources:

https://bugreports.qt-project.org/browse/QTBUG-31019
https://codereview.qt-project.org/#change,55457


This is still a problem which is being looked at by upstream developers.  See

https://bugs.launchpad.net/ubuntu/+source/empathy/+bug/459851

You already have one workaround.  Another is to highlight text and press your middle mouse button (or the scroll wheel) to paste it somewhere else.  You don't have to take any action to 'copy' it.  That is a standard function in most Ubuntu apps.

You have to note that there may be problems copying text which contain emoticons as icons.


Using bash to find file and duplicate with new name?

Run this command: find Music -name album.jpg -print0 | while read -r -d $'\0' x; do cp "$x" "${x%/*}/folder.jpg"; done

Details:

-print0, -r, and -d $'\0' together ensure that paths that contain whitespace don't get mangled
${x%/*} means remove the last / and everything that follows it from $x (e.g., /foo/bar/album.jpg becomes /foo/bar)


Android App Shortcuts Appear even after Uninstalling Anbox

Go to your ~/.local/share/applications/ directory. You should find .desktop files associated to these Android apps somewhere.

Remove these .desktop files, corresponding application launchers should also be removed.


How can I make ssh-copy-id use a port other than 22?

I use this command, note the quotes:

ssh-copy-id -i ~/.ssh/id_dsa.pub "user@host -p 6842"


Problem connecting to ssh server that is behind another ssh server in nautilus

If your first SSH server (my.server.com) supports TCP Port Forwarding, you can forward a port on your local system (localhost) to my.server2.com via my.server.com:

ssh -fNL 2022:my.server2.com:22 myUser@my.server.com

This will forward port 2022 on localhost to port 22 on my.server2.com. Then you can connect directly to the second server:

ssh myUser2@localhost:2022

In Nautilus, you can connect using ssh://myUser2@localhost:2022.

The -fN flags send SSH to the background, and creates a problem in closing it. There are three ways out:

Autoclose

ssh -fNL 2022:my.server2.com:22 myUser@my.server.com sleep 10

Now connect using Nautilus before the sleep command finishes executing (10 seconds). The connection will be kept alive as long as Nautilus is connected. When done, disconnect from Nautilus and the connection will be stopped.

Let the command wait for input

ssh -tL 2022:my.server2.com:22 myUser@my.server.com 'read -p"Press Enter to exit: "'

The read command will wait for input. Press Enter when you're done to close the connection.

Look up the connection process and kill it

pgrep -fa fNL

This will show you all processes which have fNL in the command line (there should only be your SSH connection process).
Either kill the PID of the right process if there are more than one, or use pkill if there is only one process:
    pkill -f fNL
This is pretty much the only option for connections that have already been established using -fN.

Run no command, and exit as usual

ssh -L 2022:my.server2.com:22 myUser@my.server.com

This will open a normal shell, from which you can exit as you normally do.


The problem is that you selected to use LVM (Logical Volume Management) when you installed Ubuntu. It provides to functionality to easily resize your Ubuntu partitions. THEORETICALLY! I tried that too on my first install and I found it not so easy.

Well, first of all it creates one large partition with all the space you gave to Ubuntu. Inside this partition it "installs"(?) the LVM which somehow emulates logical volumes (=virtual partitions inside the large one). Now those partitions can be easily resized or whatever within the LVM container using the right tools.

BUT to gParted it looks like the whole partition is full because all space is reserved for the LVM. Therefore: no free space, no resizing the partition.

However, it is somehow possible to do that, according to the answers here.
They either install the GUI tool system-config-lvm or another answer suggests to do the following:

  In this example we shrink a partition from 10G to 9G:

  First, we unmount. umount /dev/vg_blah/lv_blah
  Check the file system. e2fsck -f /dev/vg_blah/lv_blah
  Resize the file system. resize2fs -p /dev/vg_blah/lv_blah 9G
  Reduce the size of the logical volume. lvreduce -L -1G /dev/vg_blah/lv_blah
  Shrink the volume group if desired. vgreduce vg_blah /dev/sdxy

Please VISIT the original post! All quoted commands are from there I did neither find them out nor test them.


How to find the first thousand bytes of an image file using ddtools

The basic command structure is as follows:

dd if=<source> of=<target> bs=<byte size> ("USUALLY" some power of 2, and usually not less than 512 bytes (ie, 512, 1024, 2048, 4096, 8192, 16384, but can be any reasonable whole integer value.) skip= seek= conv=<conversion>

Source is the data being read. Target is where the data gets written.

Example

dd if=<source> of=<destination> bs=1024 count=1

you have more example here


Does LibreOffice calc have a rounding bug in sum()?

What you're seeing is binary conversion error.  Those numbers are, at some intermediate point, stored in binary form in processor and/or RAM, and converted back to decimal for comparison (or converted to binary for comparison)  That introduces a difference in the last few decimals that can be represented by (most likely) a 32-bit signed float value.  It's not an error in Libre Office Calc, as such; rather its an inherent limitation in doing decimal arithmetic on a binary machine.


Unable to install missing video and audio plugins

Go to the software center -> edit -> software sources and check all boxes. I think the one you need is multiverse, but just to be sure, enable all.
Then do sudo apt-get update (unless it updates automatically), now the package should be able to be located.


Does a package installed from repository in 14.04 work after upgrading to 16.04? Do the updates work too?

I'll try my best to answer this:

What happens when a package is installed using a repository in Ubuntu
14.04 and the distribution is upgraded to 16.04?
Does the package remain functional or can it break (assuming the
package maintainers do not yet support 16.04)

The package will remain functional unless the new version 16.04 upgraded some dependencies (like libraries) that now causes the package to break or have weird behavior.

What happens during the update/upgrade process if the package does not
have Ubuntu 16.04 repositories?

If you try to update that package but the new version does not exist on any of your repositories, then the package will not be updated.

What if the package repository exists for Ubuntu 16.04 can it be
updated/upgraded as normal or are there additional steps involved such
as manual updating the sources list?

Usually it can be normally updated, unless the new version brings some new specific steps you have to do (like new dependencies that are not on the official repositories and such).


As much as I don't like to give up I have decided to go with a 5.1 DAC and get on with things.  As of this writing is on order; tested with a 2.0/2.1 unit and works.


Rezising Linux Partition which contains the ubuntu OS in 14.04 LTS

You should realize that partitions can be safely expanded only to the right side (i.e bottom part). Any attempt to resize it to the left firstly should have consumed a lot of time and secondly and inevitably destroy the grub. Instead of chrooting and installing the grub, i can suggest you a simpler method.

Live boot and open you /dev/sda7 partition in the file manager. Then, close it and open terminal and type the command.

sudo /media/ubuntu/disk-uuid/usr/sbin/grub-install /dev/sda --boot-directory=/media/ubuntu/disk-uuid/boot/

You don't need to do update-grub as your grub config files are already in the boot directory.

P.S- Note that you need to hit the tab key to get the uuid and then continue. I hope you know the right use of tab key before you proceed.


Here are some posts where people confirmed they have installed Ubuntu on this machine.

Has anyone successfully installed ubuntu on a Lenovo Y410P
Unable to install Ubuntu on Lenovo Y500

There are no big issues can be seen so far, so it's recommended to be aware of Dual Boot approaches and follow these threads generally:

Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported)
How can I install Windows after I've installed Ubuntu?
Installing Ubuntu 13.10 alongside Windows 8.1
How can I install Ubuntu without removing Windows?
Why don't I have the option ''Install Ubuntu alongside with them''
Ubuntu install and dual Boot with Windows 8 UEFI
Ubuntu 13.10 installer/live fails to boot from DVD/USB on UEFI
Install Ubuntu next to Windows 8 (UEFI dual boot)
Windows 8 removes Grub as default boot manager
Windows 8 deletes GRUB when booting


Getting ubuntu 12.10 and windows 8 to work correctly dualboot. Configuring GRUB

It's not 100% clear to me how your system is installed. My suspicion is that you've got a BIOS/legacy-mode Ubuntu install and an EFI-mode Windows install. It could be that something else is going on, though. Running the Boot Info Script and posting a link to the RESULTS.txt file that it produces will give us details about how everything's set up, which would help in proceeding without guesswork.

That said, and proceeding on my initial guess, you could try this:

Reconfigure your boot order to boot Linux.
In Linux, type sudo parted -l and look for a FAT partition with a "boot" flag set. If I'm right, this is your EFI System Partition (ESP). If you're not certain you've found an ESP, stop here and post that Boot Info Script output.
Mount your ESP at /boot/efi, as in sudo mount /dev/sda1 /boot/efi if your ESP is /dev/sda1. (You may need to create this mount point first, as in sudo mkdir /boot/efi.)
Back up your ESP. Copying its files to a convenient location or creating a tarball of the /boot/efi directory should do the trick.
Download the Debian-package version of my rEFInd boot manager.
Install the rEFInd package. Double-clicking it in a file manager may do the trick, or you could type sudo dpkg -i refind_0.6.6-1_amd64.deb (adjusting the filename as necessary if I release a new version before you read this).

With any luck, when you reboot you should see rEFInd, which should enable you to boot either Windows or Ubuntu without the help of GRUB. In a worst-case scenario, the computer won't boot any longer, which is why I had you make a backup of your ESP -- you should be able to use an emergency disc to restore everything to get it booting again.


How to migrate from ext2 to ext4 when my filesystem is encrypted (LUKS)?

I would do the following:

Back up all of your data no matter what you decide to do
Boot to live CD
sudo bash
tune2fs -O extents,uninit_bg,dir_index,has_journal /dev/sda? The sda may be hd or
something differant and the ? is the partition number.
e2fsck -pf /dev/sda?
sudo mount -t ext4 /dev/sda1 /mnt  Check for errors.
edit the fstab on the root of the drive where the LUKS partition is to reflect the change in partition type.
update-grub

The LUKS encrypted filesystem exists inside the ext2 partition, thus the migrating from one partition type to another should not matter as far as the data within as long as nothing goes wrong. Hence the backup. It is like taking the water in one glass and moving it to another as long as the proccess is comleted without error, the water should be the same in both amount and purity.


Kubuntu - 19.10 - Suspends instead of shutting down when closing lid immediately after chosing "Shut down"

In Kubuntu 19.10, in the "Energy Savings" setup, there are three places where you can set the machine to suspend when the lid is closed (because there are three tabs: on AC, on battery, and on low battery). You have to check all three.


Installing latest version of GNU Octave when I have already installed other version

For uninstalling GNU Octave you can run this command:

sudo apt purge octave

But you don't need to remove and then install latest version of Octave.

You can easily upgrade that package with this commands:

sudo add-apt-repository ppa:octave/stable
sudo apt update
sudo apt install octave

These commands upgrade Octave to latest stable version of this software (with no need to remove current version).


How to install, select and use different keyboard layouts of the same language in Lubuntu?

In order to install different languages that are to be used by the system, Lubuntu has the Ubuntu Default Language Manager.

This should be easily accessed through the Preferences>Language Support. Check here to see if the application is installed.
/usr/bin/gnome-language-selector

Chosen Language

 Regional Support
If you do not see nor can confirm the application is installed then open a terminal and install it by using the following command sudo apt-get install language-selector-gnome
Once installed you will have access to all the major Language/Regional formats
The maintainer is ubuntu-devel-discuss@lists.ubuntu.com

In order to chose between different types of keyboard for the same language -
Be sure Keyboard Layout Handler is visible in the LXPanel. If not, right click on the lxpanel, "Add/remove panel items" and add it. Then edit it. If it is already visible, right click on it and select "Keyboard Layout Handler" Settings.

Then click "Add"

*Another alternative would be KDE
sudo apt-get install language-selector-kde

I would advise you that this also brings a lot of other (maybe unwanted) dependencies.


Xubuntu how to check used and free disk space

as simple as df -h command, sample output below

Filesystem                    Size  Used Avail Use% Mounted on
/dev/mapper/xubuntu--vg-root  290G  5.3G  270G   2% /
none                          4.0K     0  4.0K   0% /sys/fs/cgroup
udev                          1.9G  4.0K  1.9G   1% /dev
tmpfs                         375M  916K  374M   1% /run
none                          5.0M  4.0K  5.0M   1% /run/lock
none                          1.9G  700K  1.9G   1% /run/shm
none                          100M   32K  100M   1% /run/user
/dev/sda1                     228M   45M  172M  21% /boot


Open office writter unsaved warning are gone in newer version

Ah it's funny, I noticed that there is actually a warning , the save icon is an arrow, blue for save, red for unsaved. It is a very small detail, I liked it better with the * beside the title.


I don't like the new GNOME

Me too, use mate. =)

Mate is a fork of "the classic gnome".

https://wiki.ubuntuusers.de/MATE/

http://news.tecmint.com/install-mate-1-14-in-ubuntu-mate-16-04-xenial-xerus/

BTW plain debian does not need an external repo for this...


Do all my files, Office, and Outlook transition when I install Ubuntu?

It depends on how you install Ubuntu. If you format your hard drive and then install Ubuntu, nothing will remain of your Windows installation.

However, if you install Ubuntu alongside Windows, then you will be able to access all of your files (such as photos and videos) from Ubuntu.

This doesn't necessarily mean that you'll be able to open all of your documents, however! LibreOffice (or OpenOffice, depending on which one you prefer) can open most (if not all) files made with Microsoft Office. One should still always test out opening their documents in LibreOffice before completely deleting Windows and Office, just to be safe.

As to Outlook, the answer is that, though it is not done automatically, it is possible to import your settings and mail from Outlook, into Ubuntu's mail client, named Thunderbird. For instructions on how to do so, read the article mentionned in the following paragraph.

I highly recommend that you read this WikiHow article for detailed steps that will help to get you up and running with Ubuntu. It explains in a very detailed fashion how to make the jump from Windows to Ubuntu. It deals with Office and Outlook alternatives and how to set them up, and also mentions a ton of other software you may end up finding useful.


How can I toggle between single and dual monitor setup?

Have you tried using xrandr?  I have three tiny executable scripts which I access with hotkeys.  These switch between 1) laptop screen only, 2) monitor only 3) extended desktop across both.  You might need to adjust them for your own uses.

#!/bin/bash
xrandr --output LVDS1 --auto --output VGA1 --off

#!/bin/bash
xrandr --output LVDS1 --off --output VGA1 --auto

#!/bin/bash
xrandr --output VGA1 --primary --output LVDS1 --auto --left-of VGA1


SSH login, how to set keys to user accounts

You have to copy the ssh public keys to each user account. Otherwise, the keys will only work for your account.

~/.ssh/authorized_keys
Lists the public keys (DSA/ECDSA/RSA) that can be used for logging in as this user.

So, every user that will use the keys to log in, needs their respective keys in each users ~/.ssh/authorized_keys.
Related

https://security.stackexchange.com/q/34216/27973
https://apple.stackexchange.com/q/21959
How to use multiple ssh keys with different accounts and hosts


You should add "playonlinux" repository's public key:

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -

after that run :

sudo apt update

from playonlinux download page.


Firefox consuming wildly inordinate amount of CPU

This LKML thread describes a kernel issue that appeared due to the 2012 leap second insertion (1 Jul 2012). I don't know exactly what they're talking about, but it seems that the clock update didn't do some internal bookkeeping, with the result being that some synchronization calls weren't resulting in the ordinary process blocking that they'd cause. Thus, some user-mode processes that rely on the kernel service were just spinning the CPU endlessly.

The fix, however, is extremely simple:

sudo date -s "`date`"

Immediately after doing that — and I did nothing else — the Firefox process calmed down. I could see the sharp "cliff" on my CPU monitor.


In Ubuntu 14.04 open the terminal and type:

sudo apt-get update
sudo apt-get install wine1.6 winetricks

wine1.6 is still installable in Ubuntu 20.04, but in Ubuntu 18.04 and later wine-stable is a newer version than wine1.6 and in Ubuntu 16.04 and later wine-development is an even newer version than wine-stable.

If you want to install Wine 1.7 from the Wine Team PPA in 14.04 instead of Wine 1.6 run the following commands:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get install wine1.7 winetricks

Wine 1.7 (wine1.7) from the Wine Team PPA was updated a few days ago.

winetricks (optional) is a shell script that can be used to download and install various redistributable libraries that may be needed for some programs to work in Wine.


Ubuntu server 19.04 internet connection problem

Using the netplan command is the new way to configure networking in more recent versions of Ubuntu. Please try setting your IP settings manually with it and see if the issue persists.

https://www.linux.com/tutorials/how-use-netplan-network-configuration-tool-linux/
You can find the explanation within this source. If using netplan try results in a error, try to run netplan --debug generate

It is pretty precise with its indentations, so don't use tabs and only use spaces to markup the netplan.

Here is another StackExchange topic about its configuration:

Need example netplan yaml for static ip


Eclipse app icon not showing in switcher (alt+tab)

Open the .desktop file associated with Eclipse. Add the following line to the file and save the file:

StartupWMClass=Eclipse


Unfortunately, as an end-user you can only "read" and "write" (also reset) the array that dictates the list of favourite apps by using dconf/gsettings. For example, as mentioned here, you can get the value by running

gsettings get org.gnome.shell favorite-apps

and write a new value by a suitable gsettings set command. There is no straightforward way to append to the array, you can only overwrite.

But you can combine these two and have a custom command. You need to know the name of the .desktop launcher associated to the application you want to add to the favourites first. Let's say it is appname.desktop. Then you can run the following to add the application associated to appname.desktop to the favourites:

gsettings set org.gnome.shell favorite-apps "$(gsettings get org.gnome.shell favorite-apps | sed s/.$//), 'appname.desktop']"


I'm no expert as I never had Nvidia GPUs, but have you tried this?

sudo apt-get install ppa-purge
sudo ppa-purge ppa:mj-casalogic/bumblebee
sudo ppa-purge ppa:mj-casalogic/ironhide
sudo apt-get purge bumblebee ironhide nvidia-current
sudo add-apt-repository ppa:ubuntu-x-swat/x-update
sudo add-apt-repository ppa:bumblebee/stable
sudo apt-get update
sudo apt-get install bumblebee-nvidia
sudo usermod -a -G bumblebee $USER
sudo reboot now

These are some instructions I found in the ppa for the Bumblebee Project.
Good luck! ;)


In 12.04, you could try gnome-screensaver-commands -d, to deactivate it.

(This is outdated as of 14.04)


20.04 black screen on boot, when system has been shut down for a while

I figured out that the boot-repair tool solved my problem:
sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair && boot-repair


Why isn't Grub2 using custom resolution?

When you set the mode, try to also include the bit depth in /etc/default/grub, e.g.:

GRUB_GFXMODE=1600x900x24

Also add this line:

GRUB_GFXPAYLOAD_LINUX=keep

Run sudo update-grub, reboot and let us know if it worked.


How to deploy a charm to a specific machine in Amulet?

If your use case requires more than 1 machine, i.e. you are testing a service that must be stood up on a different machine from its dependent services:

On the machine you manage your infrastructure with juju:

sudo pip install juju-deployerizer

Export your environment, including the location of all services/units:

juju deployerizer --environment <your environment> --include-placement -o <your export file.yaml>

Edit your export file, make sure to follow the format specified in the docs:
http://pythonhosted.org/juju-deployer/config.html#placement

Some things to note: only 0 is recognized as a machine Id. If your testing  environment calls for more than one machine: designate 1 service to be deployed without to: specification, then use that service name in the to: specification for all the other services/units needed on the new machine.

The default output of juju-deployerizer does not currently (05/2015) add the series information to the output, so just add it manually under the deployment name in your export file:

test:
    series: 'trusty'
    ...

Use the following to load your export file in the set up class method of your amulet test:

cls.deployment.load_bundle_file(bundle_file='<path to your export file.yaml>')

Proceed with the amulet tests as you normally would after that.


Can I install Ubuntu 32 bit in a 64 bit machine?

In general you can install 32 bit Ubuntu on a 64 bit machine.

There is one exception.

If you have a machine preinstalled with Windows 8, you cannot easily install 32 bit Ubuntu.

Options

Install virtual box in Windows and install 32 bit Ubuntu in it.
Remove Windows. Change UEFI to BIOS legacy mode. Install Ubuntu.
Remove Windows. Change UEFI to BIOS legacy mode. Reinstall Windows. Install Ubuntu side by side.

Hope this helps


Dual boot and the files /boot/grub/grub.cfg -- which one is used?

It's not quite clear from your question but I believe:

Assuming we have two physical disks, it'll depend on where BIOS/UEFI is looking. Otherwise known as the boot order. This is slightly different with UEFI because the installer talks directly to the system to install its shim, but you could have two systems with two separate UEFI shims installed. The order is decided by the system at boot.
Assuming two partitions on one physical disk with BIOS, it'll depend on who wrote to the MBR (master boot record, beginning portion of the disk) last (at install, or since you ran install-grub). They can overwrite each other if you reinstall grub. update-grub should only update the local configuration.
Assuming two partitions, one physical disk, UEFI, both should be able to co-exist peacefully. You'll get a pick of order at boot at the system level, and each bootloader might know about the other one but they aren't competing for one MBR.


Keyboard shortcuts not working in 12.04?

I finally managed to get my shortcuts back, including the ones with Super.
1) Map the Super key
In System Settings / Keyboard / Typing tab / Layout Settings link (at the bottom) / Layouts tab / Options button / "Alt/Win key behaviour", choose Meta is mapped to Left Win key.
2) Desktop Shortcuts (such as "Show Desktop")
a) install dconf-tools: sudo apt-get install dconf-tools
b) run dconf-editor, go to /org/gnome/desktop/wm/keybindings and change the values you want to change. I set my shortcuts like in Windows:

panel-run-dialog is the run command, I set it to ['&lt;Super&gt;R']
show-desktop is to show the desktop, I set it to ['&lt;Super&gt;M']

3) Other Shortcuts (such as "Launch Terminal")
a) In System Settings / Keyboard / Shortcuts tab / Custom Shortcuts, Add (with the '+' button) all the shortcuts you want and set their accelerator. If you want to use the Super key here, you should use the Super here but it won't work yet
b) run gconf-editor (with a 'g', not a 'd' like 2.a), go to /desktop/gnome/keybindings and for each shortcut that uses Super, change Super to Mod4
That's it!


Problems using ShanWan usb wireless controller Ubuntu 17.10

Pressing the home button on the controller to light up two of the red LEDs seams to fix it for me. You can press it again to revert to previous behavior.


How to install firmware for my 04ca:2012 Broadcom bluetooth adapter

This is a new device. Download this driver

Open it with Archive Manager, then extract folder

drivers/DP_Bluetooth_16123/Broadcom/FORCED/8110x64/12.0.1.1011

There you will see bcbtums.inf file and firmware hex files.

The firmware for your 04ca:2012 adapter is BCM43142A0_001.001.011.0311.0339.hex.

Convert it to BCM.hcd using hex2hcd and copy it to /lib/firmware/brcm.

Generally speaking you can find Windows drivers for new BT adapters by internet search. In your case I found this driver by vid_04ca&pid_2012.


maybe it would be better chowning and chmodding (sorry for those two new word!) recursively? (chown -R root:root /lib ...)

@Jobin: why 751? /lib files and subdirectories aren't in 755?

Cheers,

Silvia


cant access internet via mobile broadband

Does it show connected in the status bar as well? Sometimes, mobile broadband shows connection established but takes a little time to start working.

Try ifconfig and ping in a command line to check if things are working fine. A little hint in this thread Enable mobile broadband not working

I hope your data package is not expired ;-)


mHouses, you are my hero.
I spent 4 hours yesterday trying to install pecl_http-1.7.6 on my 32 bit ubuntu 14.04 with no avail.
Your instructions worked perfect for me, too.

all I had to do was changing your

"./configure -with-oci8=shared,instantclient,$ORACLE_HOME"

to a simple

"./configure"

Thanks a lot for sharing your knowledge


Install Ubuntu 14.04 from bootable USB: Could not find kernel image: /isolinux/isolinux.cfg

Have you tried to create your bootable usb key under windows with LinuxLive USB Creator http://www.linuxliveusb.com/fr/home ?

If you are only on linux, try to Download you linux iso and follow this procedure

Type

fdisk -l

Find your usb key path (for exemple /dev/sdd here)

Flash your key with the iso. (It will erase everything without confirmation, please double check every parameters).

sudo dd if=path/to/your/iso/linux.iso of=/dev/sdd bs=4096

Please wait carefully the end of the process.
Now you got a bootable usb key with your iso.

Best regards


You can tweak these via the .desktop files (mostly) in the /usr/share/applications/ folder and you need Root/Admin priviledges for this purpose.

For instance, if you're sure, they are duplicate and this is the one you don't want, you can open the file unity-control-center.desktop there, and -as a safer method- merely add the line Hidden=true and/or NoDisplay=true instead of deleting it.


How to solve Bad Configuration Option: UseDNS?

That is a server option, not a client one. It should be set in the machine you are connecting to (the server) and not on the machine you are connecting from (the client). Also, it needs to be in /etc/ssh/sshd_config and not /etc/ssh/ssh_config. The former is the configuration file used when the machine is acting as a server (receiving connections) and the latter when the machine is a client (connecting to another machine).

Mind you, I very much doubt this will make any difference in the connection times you're seeing, but you may as well try it.


Error during graphic driver installation

Try sudo apt-get install gcc linux-headers-3.8.0-19-generic then install drivers.

For further help, see What is the correct way to install ATI Catalyst Video Drivers (fglrx)?


Upgraded Ubuntu to 14.04, can't login to my account & don't know the password of root

Boot from ubuntu cd, mount your root partition, chroot into root partition an change your passwords.
1 boot live cd
2 open terminal
3 sudo -s
4 mount /dev/sda1 /mnt , if sda1 is your root partition.
5 chroot /mnt
6 passwd root
New password
New password
7 passwd youruser
New password
New password
8 exit
9 umount /mnt
10 reboot


I have found myself with the same problem. I solved by removing by hand the slack package, which is just some admin tool.

If your are on the directory you downloaded the package, this should do the work:

sudo apt-get remove slack && sudo dpkg -i slack-desktop-2.1.2-amd64.deb

Have below my full log:

xino@xinopc:~/Descargas$ sudo dpkg -i slack-desktop-2.1.2-amd64.deb
[sudo] password for xino:
(Leyendo la base de datos ... 255115 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar slack-desktop-2.1.2-amd64.deb ...
Desempaquetando slack-desktop (2.1.2) ...
dpkg: error al procesar el archivo slack-desktop-2.1.2-amd64.deb (--install):
intentando sobreescribir `/usr/share/doc/slack/copyright', que está también en el paquete slack 0.15.2-7
dpkg-deb: error: el subproceso copiado fue terminado por la señal (Tubería rota)
Se encontraron errores al procesar:
slack-desktop-2.1.2-amd64.deb
xino@xinopc:~/Descargas$ sudo apt-get remove slack
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
  libappindicator1 libindicator7
Utilice «sudo apt autoremove» para eliminarlos.
Los siguientes paquetes se ELIMINARÁN:
  slack
0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 0 no actualizados.
Se liberarán 174 kB después de esta operación.
¿Desea continuar? [S/n] s
(Leyendo la base de datos ... 255114 ficheros o directorios instalados actualmente.)
Desinstalando slack (0.15.2-7) ...
Procesando disparadores para man-db (2.7.5-1) ...
xino@xinopc:~/Descargas$ sudo dpkg -i slack-desktop-2.1.2-amd64.deb
[sudo] password for xino:
(Leyendo la base de datos ... 255091 ficheros o directorios instalados actualmente.)
Preparando para desempaquetar slack-desktop-2.1.2-amd64.deb ...
Desempaquetando slack-desktop (2.1.2) ...
Configurando slack-desktop (2.1.2) ...
Procesando disparadores para gnome-menus (3.13.3-6ubuntu3.1) ...
Procesando disparadores para desktop-file-utils (0.22-1ubuntu5) ...
Procesando disparadores para mime-support (3.59ubuntu1) ...


Type arrows by copy/pasting the following Unicode characters:

arrows ↑ ↓ ← →
diagonal arrows ↖ ↗ ↘  ↙

The keyboard HTML entity character codes are: &uarr; &darr; &larr; &rarr;
HTML entities for mdash and ndash (for long dashes): &mdash; &ndash;
HTML entities for less than and greater than characters: &lt; &gt;


Enabling relative Tracking mode on wacom tablet - Ubuntu 18

First you need to figure out the ID of your Wacom Stylus. You can see the IDs of all your devices with
xsetwacom --list devices

Then use that ID to set the Mode to Relative for your stylus:
xsetwacom ---set $STYLUS_ID Mode "Relative"

And here's a one-liner that does all that for you:
STYLUS_ID=$(xinput list | grep Wacom | grep stylus | sed -e 's/.*id=\([0-9]\+\).*/\1/g') &&
  xsetwacom ---set $STYLUS_ID Mode "Relative"


Not only the user but also the group can bet set, look into the following

 GID_MIN                  1000
 GID_MAX                 60000
# System accounts
SYS_GID_MIN               100
SYS_GID_MAX               499


How to move flash video window to the primary display?

This problem is unsovled since ages. The only halfway acceptable workaround (for Chrome/Chromium-users at least) is to install Maximize Flash and then to open Chrome/Chromium-fullscreen-mode via [F11].


Unable to upgrade ubuntu 18.04, Error Could not download the upgrades

Find the line in /etc/apt/sources.list that has http://ny-mirrors.evowise.com/ubuntu/pool/main/m/mozjs52/libmozjs-52-0_52.9.1-0ubuntu0.18.04.1_amd64.deb in it and comment it out by preceding it with a # character. This line is preventing your system from being upgraded from Ubuntu 16.04 to Ubuntu 18.04.

Open /etc/apt/sources.list for editing in nano text editor.

sudo nano /etc/apt/sources.list

Press the keyboard combination Ctrl+O and after that press Enter to save the changes in sources.list.

Press the keyboard combination Ctrl+X to exit nano.

Then run this two commands to update the latest list of software.

sudo apt update


Difference between gnome-screensaver-command -a and gnome-screensaver-command -l

I think that depends on the gnome-screensaver settings.

If you set your gnome screensaver not to lock the screen, than the -a option will not lock the screen.
If you set your gnome screensaver to lock the screen, then -a will lock it; this is the default setting in Ubuntu as far as I remember.
Option -l, however, will always lock it.


Trying to search for multiple file extensions in command line

Due to the way that find evaluates logical tests, you likely need to group the -name tests using [escaped] parentheses to get the desired behavior:

find /etc \( -name "*.txt" -o -name "*.log" \) -type f -mtime +7 -exec echo {} \;

I'm assuming you're using echo as a placeholder for some other -exec action that you wish to perform, otherwise you could simply use

find /etc \( -name "*.txt" -o -name "*.log" \) -type f -mtime +7 -print


You can install it manually by downloading packages from Ubuntu 16.04 LTS repository:
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glipper/glipper_2.4-6_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/liba/libappindicator/libappindicator1_12.10.1+16.04.20170215-0ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/multiarch-support_2.23-0ubuntu11.2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/liba/libappindicator/python-appindicator_12.10.1+16.04.20170215-0ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/g/gnome-python/python-gconf_2.28.1+dfsg-1.1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/p/pygtk/python-gtk2_2.24.0-4ubuntu1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/k/keybinder/python-keybinder_0.3.1-1_amd64.deb

sudo apt-get install ./glipper_2.4-6_all.deb ./python-appindicator_12.10.1+16.04.20170215-0ubuntu1_amd64.deb ./python-gconf_2.28.1+dfsg-1.1_amd64.deb ./python-gtk2_2.24.0-4ubuntu1_amd64.deb ./python-keybinder_0.3.1-1_amd64.deb ./libappindicator1_12.10.1+16.04.20170215-0ubuntu1_amd64.deb ./multiarch-support_2.23-0ubuntu11.2_amd64.deb

and then launch with glipper. Confirmed to work normally at least on Ubuntu MATE 20.04 LTS.


I actually just installed the MATE Desktop Environment, and it works fine if Unity is already installed. You obviously can't use them at the same time, but they can both be installed.


New Laptop stopped booting after a good week

Did some further searches and found the solution. Apparently uswsusp sometimes causes this problem when /home is encrypted. The solution was to boot into a live-system, mount /home as root and uninstall uswsusp. A step-by-step solution can be found here:

  After installing a fresh Ubuntu 13.04 I noticed the laptop would no
  longer hibernate when the lid was closed.

  I installed the hibernate package (apt-get install hibernate) and
  then ran sudo hibernate

  This resulted in a laptop that would not boot. initramfs issue that
  could not be circumvented through recovery mode:

resume: libcrypt version:
resume: could not stat the resume device file /dev/dm-0
Please type in the full path name to try again or press ENTER to boot the system:

  Pressing enter does nothing, the only keystroke that works is
  ctrl+alt+del

  So after some googling this is what I tried:

  Boot into ubuntu live cd/usb – the same one I used to install ubuntu earlier today
  Mount my system and chroot into it:

mkdir /mnt/temp/
mount /dev/sda1 /mnt/temp/
cp /etc/resolv.conf /mnt/temp/etc/resolv.conf
chroot /mnt/temp/
mount /proc
#optional commands: not sure what caused the issue
apt-get purge uswsusp
apt-get purge hibernate
dpkg-reconfigure initramfs-tools

  Reboot the live cd and see if that works.

If needed, replace /dev/sda1 with the partition with Ubuntu's root filesystem inside it.


cifs, smb - Can't mount (permission denied) or navigate shared folder

I'm pretty sure I ran into this exact same problem today on Ubuntu 16.10 I tried all the suggestions in this thread several times, I could mount the exact same share using Windows Server 2016 and I could browse it using smbclient (smbclient -U brainstrust //WINBOX01/shared).  I even tried an external credentials file.

I ended up stumbling on a fix - although I'd created a local user for the share on the Windows box, it was also joined to a domain.  Basically setting the domain to be the local machine -o domain=WINBOX01 fixed my problem instantly, so leaving a comment here in the hope that its useful to someone out there.

The complete minimal command I used was:

sudo mount.cifs -v //WINBOX01/shared /home/geoff/winbox01  --verbose -o user=brainstrust,password=topsecret,domain=WINBOX01


How to improve performance of VirtualBox when UNITY_LOW_GFX_MODE is not working?

Especially on a low end machine such as mine (Athlon dual core, GForce 210) running Ubuntu with Unity and Compiz enabled is quite a challenge and may result in a rather slow and sluggish experience.
Virtual machine settings
To improve this I gave the following settings to the virtual machine:

enable VT-x/AMD-V, Nested Paging

2 CPU (from dual core host) with an execution cap at 90% to ensure host operability

2048 Base Memory

256 MB Video Memory
  VBoxManage modifyvm "Name of VM" --vram 256

3D Acceleration enabled

Guest Additions installed

Remove desktop effects
Then I observed a very slow animation for windows and menus. This animations did more harm than use in my virtual machine. Below is three methods how to disable them to get a smoother experience in Virtual Box:
Disable animations with Unity Tweak Tool or Gnome Tweak Tool
With both tools we can disable desktop animations:

GNOME tweak tool

Unity tweak tool
Compiz Config Settings Manager
As this is a virtual machine with the option to make a snapshot before you do harmful things to your OS you may probably safely runs ccsm to disable Compiz effects:

Do not disable windows decoration above

Dconf Editor
Lastly here is how to do it with dconf-editor:

Browse to org.compiz.profiles.default.core and remove the following from active profiles:
  'animations' 'fade'

Browse to org.compiz.profiles.unity.core and remove the following from active profiles:
  'animations'

Unfortunately I have found no way to disable the Dash animation, which still will be rather slow.
GNOME Session Flashback
In the likely case you are still not happy with the overall speed of the desktop you may consider installing the GNOME Session Flashback, which will let you log into  GNOME Flashback (Compiz or Metacity) with a lean and fast desktop reminiscent of 10.04, but with all the upgraded applications, and the recent kernel:

Login 16.04

Login > 17.10


Only 32 bit distros are working on a 64 bit Intel Atom CPU, what could the problem be?

The vendor disabled 64-bit support.

There is a bios with 64-bit support in this topic. Good luck with flashing it.


How can I suspend/hibernate from command line?

Traditionally ubuntu supported a fairly blunt method of suspend and hibernate. Neither would integrate well with other apps and sometimes not even work on some machines. This new method doesn't require root and notifies all applications listening for power events.
Systemd Method
Starting with Ubuntu 16.04, systemctl call must be used (See Suspend command in Ubuntu 16.04)
systemctl suspend

and
systemctl hibernate

New Method (obsolete)
Obsolete circa Ubuntu 16.04; use systemctl instead, as above.
See the answer here on this page from Adam Paetznick regarding the use of dbus. Ideally you would create a ~/bin/suspend shortcut/script that makes the use of this action easy.
For use over ssh, you should modify policykit rules as outlined by Peter V. Mørch
Old Method
According to the Ubuntu Forum you can use the following commands:
pmi action suspend

and
pmi action hibernate

This requires that you install the powermanagement-interface package (not tested).
sudo apt-get install powermanagement-interface
I have also found the commands sudo pm-suspend and sudo pm-hibernate to work on my netbook.


How to repair broken package dependencies

Can you please try the following:

sudo dpkg --add-architecture i386
sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
sudo apt -f install


This is because keytouch is not in the Utopic repositories, as stated by @ethanbmnz in comments. To install keytouch, you can either install the deb package for keytouch (with sudo dpkg -i PACKAGE.deb, where PACKAGE.deb is the filename of the package) or compile it from source then install it.

Source and Debian packages can be found at http://keytouch.sourceforge.net/dl-keytouch.php. It appears the packaged version is of an older version, so if there's anything present in the newer versions of keytouch that you need, I would recommend that you compile it from source.


How to add commands to be run before a systemd-controlled system service?

One solution that I found but don't really like:

Copy the package's service file to a new name: cp /lib/systemd/system/$servicename.service /lib/systemd/system/$servicename-my.service.
Edit the new service file: add ExecStartPre=... next to the ExecStart: sed -i "s_^ExecStart=_ExecStartPre=/bin/mkdir -p /var/log/$servicename\nExecStart=_" /lib/systemd/system/$servicename-my.service
Disable the old service, enable the new one: systemctl stop $servicename; systemctl disable $servicename; systemctl enable $servicename-my; systemctl start $servicename-my.

The main reason I don't like this solution is needing a file outside of /etc, which would be considered “cruft” by the corresponding tools.

Also, not extensively tested.

Edit1:

Correction: by documentation it should be possible to put the modified service file in /etc/systemd/system/ without renaming it. Will test later.

Another tangentially related problem: PermissionsStartOnly=yes might not work correctly.


Wireless card only starts to work if I boot into Windows

Is there an on/off button for your wireless?  If so, try pressing that in Ubuntu. It might be off by default when it boots into Ubuntu.


there is this PPA repository for aurora builds if is fine for you.
You can do:

sudo add-apt-repository ppa:ubuntu-mozilla-daily/firefox-aurora
sudo apt-get update


Unable to install android studio ubuntu 17.10

Your repository ppa:paolorotolo/android-studio does not contain packages for Ubuntu 17.10 Artful.
Remove it with sudo ppa-purge ppa:paolorotolo/android-studio and/or sudo apt-add-repository -r ppa:paolorotolo/android-studio
then add other PPA (Ubuntu Make) and install package from it
sudo add-apt-repository ppa:lyzardking/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
umake android

the last command will install Android Studio to your home folder with corresponding shortcuts.


So, I whipped something up quickly as a weekend project.
Does this look useful?


I have no information on what is causing your sound device continuously switching between headphones and speakers but there is a way to prevent it. If you use this method you will have to manually switch sound device between headphones and speakers when you need them.
To override automatic sound device switching:

edit the file /etc/pulse/default.pa
find the line load-module module-switch-on-port-available
insert a # at the beginning of the line to disable automatic port switching
save the file and reboot.


Can't run Google Earth with Ironhide - libGL.so.1 wrong elf class

Google Earth is 32-bit.

On Ubuntu Oneiric and later, there is a different method to install 32-bit libraries. For libGL.so:

sudo apt-get install libgl1-mesa-glx:i386

I recommend Bumblebee over Ironhide, see Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


Yes, it is ok to sell them.  However, a seller must provide full source code for the components covered under a license of that type.  Link.  Proprietary software, if it qualifies, doesn't have to provide full source code but most of the components that they would be selling would be free and open source software so they would have to provide source on demand.  And with the source you can compile it yourself.

Also, Red Hat sells RHEL and provides "source code" that has had all their patches merged into it without providing details of what specific patches were merged.  That is within the letter of the GNU license but is not in the spirit.  They also only provide source to their distribution, no binaries so if you want RHEL without paying for a license you either compile it all yourself or use a clone like CentOS.


Can't access by name when setting static IP

Your client machine always connects to the server using an IP address. When you ask it to connect using a machine name, it internally converts the name to an IP address using some service. A variety of name->IP conversion services exist, and you're probably relying on DNS (Domain Name System) in your case. Other options are WINS, MDNS, LLMNR, ... Your client machine probably uses your network/WiFi router (or router/modem combo unit) as the DNS server, which uses information from DHCP requests to create a local name->IP mapping table, which it uses to respond to some of the DNS requests made by your client machine.

What happens when you have DHCP enabled on the server is:

When the server needs to get its own IP address, it sends a DHCP request to the DHCP server; typically to your WiFi router or router+modem.
The DHCP request includes the name of the machine making the DHCP request.
The DHCP server assigns an IP to the machine, and records the IP/name pair in an internal database.
The DHCP server sends back the IP to the server for it to use.
Whenever another system asks for the IP associated with the server's name using the DNS protocol, the DNS server first consults the local database created by the DHCP server, and provides an answer from that if there is a matching entry (otherwise it continues to query the Internet at large).

When you use a static IP address, the DHCP request is never made, so the DHCP/DNS server never get an opportunity to add the relevant entry into the local name/IP database.

As mentioned in one of the comments, you can probably use servername.local as the name instead of servername, and it will work (this uses MDNS). Linux and I think Mac clients support this, but Windows doesn't unless you've installed non-default software that supports this protocol (e.g. Apple's Bonjour software stack).

Since I see UNC paths (those starting with \) in your questions, I assume your client machine is Windows, and you're running Samba on the server. In this case, you can tell Samba to act as a WINS server. WINS is another name->IP mapping protocol. I think your client machines will just find the WINS server and automatically start querying it for name lookups, at least for the Windows/Samba file-sharing protocol. If not, you may need to either:
 - Enable a WINS server on your router, and tell Samba to register with it, or
 - Configure your router's DHCP server to tell clients about the WINS server running on your file server.


How (if possible) to change modification date of folder to past?

I don't know about reverting to the previous modification date, but you can certainly set it to an arbitrary date: touch -t or touch -d. Check man touch for the format to use, and choose between -t or -d.

For example, to set the last modification time on a directory called Downloads to 5th December 2016 at 12:30 you'd use:

touch -t 201612051230 Downloads


To temporary disable colors for ls use

\ls

or use

dir

For a permanent change you have to delete the alias for ls. In my case the alias is defined as

% alias ls
ls='ls --color=tty'

Therefore overwrite the alias in e.g. your .bashrc

alias ls='ls --color=never'

The "sneaky way is ;)

Open gnome-terminal
Edit your profile settings via

Edit > Profile Preferences
Open the tab Colors
Customize your colors


How do I make an application think it is running from desktop server (e.g gdm3)?

Your question, "How can I run a Graphical User Interface (GUI) program in a non-GUI environment?" can't be done. The program depends on the GUI to open windows, etc.

If you had said which program, maybe someone could suggest a Command Line Interface (CLI) equivalent.

If there is another X windows display available (and where you want the program's output to be displayed) on localhost, or even on your LAN, read man xhost.


Cannot enroll keys due to Shim IEFI Key Management not showing up after reboot

There are several ways you can proceed, but they might not all work equally well, depending on your hardware and needs:

Some EFIs provide an option to launch arbitrary programs. You can use this feature to launch MokManager (MokManager.efi or mmx64.efi in the same directory that holds shimx64.efi and grubx64.efi). This is likely to be the most direct approach, but this EFI feature is relatively rare, and even if it's present, there's no standardization on where it's located in the EFI's menu system, so you'll have to go looking for it.
Prepare a USB flash drive with a FAT filesystem, create an EFI/BOOT directory on that drive, and copy some files from the /boot/efi/EFI/ubuntu directory to the EFI/BOOT directory on the USB flash drive: Copy shimx64.efi and rename it to bootx64.efi in its new location and copy MokManager.efi or mmx64.efi without renaming it. (Your Ubuntu probably has mmx64.efi, but I don't recall when it was renamed.) You can then boot to the USB flash drive, which should launch MokManager.
You can use an EFI shell program to do the job. Some EFIs have such a program built-in, but this is just as rare as the ability to launch arbitrary programs. If yours doesn't have such a feature, you can download one from the Internet -- see this Arch Linux wiki page for some pointers. Put the program on a FAT USB flash drive, named EFI/BOOT/bootx64.efi. You should then be able to boot the USB flash drive into the shell and use it to run MokManager. Note, however, that you'll need to temporarily disable Secure Boot to run the EFI shell. You'll also need to learn enough of the EFI shell to navigate to the MokManager binary and run it. (This shell is similar to a DOS or Windows command prompt. The Arch wiki provides some tips on how to use it.)
You can boot using my rEFInd boot manager on a USB flash drive or CD-R. This should give you an icon to launch MokManager, or at least an EFI shell. As with launching an EFI shell directly, you'll need to temporarily disable Secure Boot for this option to work.
You can install rEFInd to your hard disk by using the PPA or Debian package. When you reboot, MokManager should launch, enabling you to enroll rEFInd's keys and your own keys. This is a drastic method, since it will leave rEFInd in control of your boot process. Thus, unless you're sure you want to switch to rEFInd as your main boot manager, this is not a good option. I mention it only for completeness.

I'd try the options in more-or-less this order, although you can use your own judgment and skip something if you don't like the way it sounds or know it won't work.


How can I dualboot Ubuntu 17.04 with Lubuntu (to extend battery life)?

You really don't need a separate install with shared partitions and whatnot.
If you have already installed Ubuntu, what you would need is to install lubuntu-core and because many dependencies are shared with Ubuntu's regular DE, this won't install a lot of extra packages, just the core Lubuntu packages, like pcmanfm (actually, this is the only noticeable addition). From a terminal you would type in:

sudo apt-get install lubuntu-core

Otherwise, there are plenty guides out there and even answers on this site that show you how to install Ubuntu alongside another system, for example, see How can I install Ubuntu 'alongside' Lubuntu?


Not consistent Libre Calc formula results

As an example, start out with an empty spreadsheet.  Select cells E9 through H12 and go to Format -> Cells.  Specify currency and press OK.

Now in E9 through F12 enter the following values.

E       F
~~~~~~  ~~~~~~
        $44,44
$33,33

$33,33  $44,44

Finally, enter the following formula in H9 and then drag down to H12.

=IF(ISNUMBER(F9),F9,IF(ISNUMBER(E9),E9,""))

The result in column H:

$44,44
$33,33

$44,44


Black screen after installing graphic drivers

I did this night before last with 15.04.
I followed these instructions: http://www.allaboutlinux.eu/remove-nouveau-and-install-nvidia-driver-in-ubuntu-15-04/

Specifically notice the bit about the extra build packages and disabling the nouveau driver.

To recover from where you are you can:
1) boot into recovery root shell and mount -o remount,rw / to be able to make changes.
2) Then do a NVIDIA-Linux-xxx-xxx.xx.run --uninstall and reboot which should get you back to a workable state.


Well, it appears that no driver for your fingerprint reader is installed.
Use the console and type 'lspci' and 'lsusb' to find out the type of fingerprint reader installed (look for 'fingerprint reader' or something similar in both outputs). Following that you can google for a linux driver for this type of reader to find out which package has to be installed. Then the GUI should work as expected.


How to set iphone tethering interface as default gateway

I have done the exact thing you are wanting on my laptop only using a droidX running on android but the basis is the same.  What you have to do is set up a bridge between your two interfaces so that they can share a single internet connection based on whichever one becomes active.  This is done by utilizing the bridge_ports option that is part of the bridge-utils package in ubuntu.  I have provided a link to show you how this is done in a few easy steps.

First install the bridge-utils PPA using the following command"

sudo apt-get install bridge-utils

Then follow this link to assist you in setting it up by modifying your /etc/network/interfaces file
http://manpages.ubuntu.com/manpages/lucid/en/man5/bridge-utils-interfaces.5.html


Performance tuning - multiple swap partitions? (command-line)

At boot mountall commands calls the swapon utility.

The swapon manpage says :

Calls to swapon normally occur in the system boot scripts making all swap devices available, so that the  paging  and swapping activity is interleaved across several devices and files.

As pages are interleaved across different devices one can assume that different swap spaces on different devices would performs better (like a RAID 0) than a single swap space on a single device.

My opinion is that tuning swap access is pointless, as when you got to a point where swap access is a critical resource, your system is almost unusable, disk access is  1000x slower than memory access.

Better tune the memory usage by removing unnecessary daemons, checking software parameters....

You should find useful informations on memory footprint here:
http://linux-mm.org/LinuxMMDocumentation


How to upgrade to ubuntu 18.04 version from 16.04 using terminal

You can use Update Manager or the shell.
Both will offer to update you only to the next LTS of Ubuntu. They won't offer to skip releases.
To prepare for a release-upgrade:

Return your system to as close to stock condition as possible.
If you have added PPAs or non-Ubuntu sources, remove them and uninstall the packages that came from those sources.

Upgrade your system on the old release: sudo apt update and sudo apt upgrade.
If you have held broken packages, packages not upgraded, or ANY error message, then stop. Seek help in AskUbuntu before proceeding. Release-upgrading a broken system rarely fixes the problem, and often makes things worse.

(Optional) Backup your data and prepare an Ubuntu install USB stick.
This step provides insurance from unexpected problems. If you are inexperienced in data recovery, have limited recovery resources on hand, or have a history of package/upgrade problems, then definitely take a few minutes to do this step!

Launch the upgrade process using Update Manager or do-release-upgrade


How to set compose key to pause in 13.10?

I had the same problem and lost a couple of hours trying to resolve it.

I found a solution, based on what can be found here:

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

This is what you need to do:

In the terminal type:

sudo gedit /etc/default/keyboard

After typing your administrator's password, the text editor will open. Find the line that reads:

XKBOPTIONS=""

Enter the desired key value between the quotation marks. In my case it was compose:lwin – to map the left Windows key as compose. In your case it should be: compose:paus. So the line should look like this

XKBOPTIONS="compose:paus"

A list of possible options can be found when you type

grep "compose:" /usr/share/X11/xkb/rules/base.lst

in the terminal.
Log out, log in again – should work just fine.

(PS: Why they turned off the possibility to customize this easily in the system settings, still remains an unresolved problem.)


Using Groups

Like Trevor said, you can make a group, and give that group read, write, and execute, permission to that folder.

To create a group:

sudo groupadd groupname

You can use anything in the place of groupname, just remember what it is!
Next, let's create a folder in /share

sudo mkdir /share

Set that folder's group to the created one, and well as set permissions

sudo chgrp groupname /share
sudo chmod 775 /share

Remeber to change groupname to the one your created!
You can see that we change the permissions of /share to 775, here's a explaination of what that means.

7 in the first position, this gives the owner of the folder, read (lists files in folder), write (create/delete files in folder), and execute (be able to cd into that folder). In our case the owner of the folder is root.

7 in the second position, this gives the folder's group, read, write, and execute permission. In our case the folder's group is groupname or whatever you set it to.

5 in the final position, this gives the the public (whoever can logon to the system), read, and execute permission. This allows them to cd into folder and list the files using ls or a similar command. If you want to prevent others from cd'ing into the folder you can use 0 instead of 5, meaning they get no permissions.

To add a user to a group, so that can use the group permissions, we can use:

sudo usermod -a -G groupname [username]

Be sure to change groupname and [username] to their correct values.

Note: a user may only be in one primary group, but multiple secondary groups. The command I provided adds another secondary group to the user specified.

Using ACLs

A alternate solutions, which I think is more complex is to use ACLs (or Access Control Lists).
This allows you to grant specific permissions to specific users without the use of groups or changing owners. For this to work the file system must be mounted with the acl option.

Preparing to use ACL

Firstly, we must check if the drive is already mounted as ACL. Because we the folder is in the /share is in the root (/) partition, we must ensure that the root partition is already mounted with the acl option.

Note: The /home is not always inside the root partition, the /home folder can be it's own partition. This also applies to other partitions.

To determine if a partition has ACL enabled, we can use the mount command.

mount -l

For me, this is on the first line.

/dev/sda5 on / type ext4 (rw,errors=remount-ro)

We can see that the partition /dev/sda5 is mounted at /. Yours may not be on the first line, like mine. It may be on the second, third, but it should be mounted at /, because that's where our /share is.

Now, we will need to determine if we have the acl option.

tune2fs -l [partition path]

From my output of mount -l you can see that my partition path is /dev/sda5, yours may be different.

From running the command we will get something similar to this:

tune2fs 1.42.9 (4-Feb-2014)
Filesystem volume name:   <none>
Last mounted on:          /
Filesystem UUID:          5e7b3dcf-cda0-4a74-ab0e-67c9ce8ab044
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent flex_bg sparse_super large_file huge_file uninit_bg dir_nlink extra_isize
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
~cut off to save space~

On the default mount options line, we can see that we have acl enabled. If you don't have acl enabled, you can use Google find out how to do that.

Now, like the method with groups, you will need to create the folder:

sudo mkdir /share

One last thing, we must set the folder to 700, so only root (and people granted access by ACL) can access the folder:

sudo chmod 700 /share

Now we can set the access control.
Note: setting the permissions, without using acl, and instead using chmod, will cause acl permissions to be reset.

Setting ACL permissions

It's a bit simpler now, if you want to set permission for a user, you can use

sudo setfacl -m "u:[username]:rwx" /share

This will grant [username] rwx (read, write, execute) permissions. The sudo is required only because /share is owned by root.

For a group use:

sudo setfacl -m "g:[groupname]:rwx" /share

For a other/public (only includes people who are able to logon to the system) use:

sudo setfacl -m "o:rwx" /share

Note: you can swap rwx out for others like rx for read/execute only.
Note: if you pass a -d option while using setfacl (setfacl -d -m "u:...), this will set the default ACL value for the folder. This will cause any NEW files added to the folder to automatically have the permissions you applied.


I don't use Skype - I want to stop the pop-up

If you want to get rid of it, do this:
Click on Ubuntu Software (the A in a shopping bag)
Afterward, click on "Installed".
Then, simply find Skype and delete it.


How can I boot to upstart failsafe mode?

Jay, failsafe mode isn't all that interesting. With Ubuntu 10.04 - 11.04, the system would boot into "multi user" mode before all "static" network connections were available. This is fine for a laptop or desktop, because NetworkManager manages connections in a way where most GUI programs are ready to have their network connection gone. But for servers, this is unacceptable, as some of the network services require there to be a specific network configuration before they start.

The failsafe mode is just a way to get the system to continue booting, even if these network interfaces are not available. Its essentially a timeout after 2 minutes of waiting, nothing more.


getting error when instaling adobe media server 5.0.3 on ubuntu 13.04

There is a discuss on this topic here.

First remove the existing libcap installation:

sudo dpkg -r libcap2:amd64

Download older libcap:

wget http://archive.ubuntu.com/ubuntu/pool/main/libc/libcap2/libcap2_2.17-2 ubuntu1.1_amd64.deb

Install libcap:

sudo dpkg -i libcap2_2.17-2ubuntu1.1_amd64.deb

Download libnspr4 library:

wget http://security.ubuntu.com/ubuntu/pool/main/n/nspr/libnspr4_4.8.9-1ubu ntu3_amd64.deb

Install libnspr:

sudo dpkg -i libnspr4_4.8.9-1ubuntu3_amd64.deb

Edit the installAMS and replace exit_no_libcap with exit_no_libcap-dev and exit_wrong_libcap with exit_wrong_libcap-dev.


Installing Matlab 2012a (32-bit) in Ubuntu 12.04 LTS java problem

I use matlab too, if this problem with LD_LIBRARY_PATH, maybe this can help u.

export LD_LIBRARY_PATH="/usr/local/MATLAB/R2011a/runtime/glnx86:/usr/local/MATLAB/R2011a/bin/glnx86:/usr/local/MATLAB/R2011a/sys/java/jre/glnx86/jre/lib/i386/client":$LD_LIBRARY_PATH

export LD_LIBRARY_PATH and reinstall,


Are there any way to see how much space is used for Ubuntu?

Command line

df -h

Example:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        46G  5,5G   38G  13% /
none            4,0K     0  4,0K   0% /sys/fs/cgroup
udev            2,0G  4,0K  2,0G   1% /dev
tmpfs           404M  1,3M  403M   1% /run
none            5,0M     0  5,0M   0% /run/lock
none            2,0G   23M  2,0G   2% /run/shm
none            100M   40K  100M   1% /run/user
/dev/sda6        23G  275M   22G   2% /home
/dev/sda7       289G   63M  274G   1% /data

Desktop

Search in dash for "system" and choose "system monitor":


How can I change brightness through terminal

adding to what Michał Šrajer says in some cases the brightness may be controlled from /sys/class/backlight/acpi_video0/brightness as is the case with my dell vostro 3400 and  my the brightness range is 0-15. You may have to look for other folder in /sys/class if the same path as mine doesnot exit.


There can be many causes why that happened but here are a couple of things you can try.

Login into tty with your user (Ctrl + Alt + F1)
Type sudo chmod -R ug+rwx /home/[username]  and try logging in (return using Ctrl + Alt + F7)

That should change .Xauthority permissions to yourself.

If that doesn't work try sudo chmod a+wt /tmp

If none of the above works you can try:

dpkg-reconfigure lightdm
Reinstall Ubuntu


CD-Drive don't work after installing ubuntu 14.04 LTS

I had the same problem. The solution is to install udftools. Open terminal (Ctrl+Alt+T) and then type:

$ sudo apt-get install udftools


How to Enable Brightness Buttons when acpi_osi of Grub not enough in 16.04 of Zenbook?

Add the option acpi_osi without value in the parameter GRUB_CMDLINE_LINUX_DEFAULT of your /etc/default/grub file, like in the body

# guillaume-desclaux https://ubuntuforums.org/showthread.php?t=2243162
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi="

Edit /usr/share/X11/xorg.conf.d/20-intel.conf and add the following there

# http://askubuntu.com/a/536618/25388
Section "Device"
        Identifier "card0"
        Driver "intel"
        Option "Backlight" "intel_backlight"
        BusID "PCI:0:2:0"
EndSection

Run sudo update-grub.

Output: brightness control works as expected now.


Restore Windows 8.1 from Restore Drive - Ubuntu

No you can not. A recovery drive will help you troubleshooting not reinstalling. Please take a full backup on an external hard drive or I recommend you to install Ubuntu alongside windows in dual boot.


Alternative to iTunes for syncing with iPhone?

Amarok and, if I recall correctly, Banshee, have some level of support for syncing music with iPhone. Note that I haven't tried Amarok, and it's been a long time since I used Banshee, so I can't comment on the functionality or stability.


Is there any software for running Direct connect hub on LAN?

You can use linuxdcpp.

  Direct connect is a peer-to-peer (P2P) file-sharing protocol. Clients
  connect to a central hub where they can view a list of clients or
  users connected to them. Users can search for files and download them
  from other clients, as well as chat with other users.

  The most popular Windows client implementing this protocol currently
  is DC++. LinuxDC++ is a Linux port of DC++. Though it is primarily
  aimed at Linux, it has been shown to work on other Unix-based
  operating systems as well.1

To  install linuxdcpp get it from the Ubuntu Software Center, or by clicking below.

1Source:Ubuntu Apps Directory

Update: To make a new DC Hub, you can use Open DC Hub. The page has all the necessary information, and should probably do fine.


slow boot boot 19.10 (tried almost everything)

As described in this answer:

What does NetworkManager-wait-online.service do?

A considerable amount of your boot time can be saved with the command:

sudo systemctl disable NetworkManager-wait-online.service


mkdir /home/$(whoami)/.steam/ubuntu12_32/steam-runtime

worked great for me

Fixed:

$ mkdir /home/$(whoami)/.steam/ubuntu12_32/steam-runtime
$ steam
Running Steam on ubuntu 19.04 64-bit
STEAM_RUNTIME is enabled automatically


How can I launch multiple instances of Totem since 11.10?

Yes, there is. But as doug mentioned you need to change some lines of code.

If you are running ubuntu quantal you can use my ppa. I build a totem version which includes that --no-existing-session command.

You can find packages here:

https://launchpad.net/~qos/+archive/totem


How to tell what applications are accessing the hard drive and how frequently?


Short: look here
It seems, init splash is not itself to blame.
Looking longer at the problem I saw, systemd-journald process also had peaks in CPU Usage.
Checking journalctl it was packed full with this:
systemd[1]: apport-autoreport.service: Start request repeated too quickly.
systemd[1]: apport-autoreport.service: Failed with result 'start-limit-hit'.
systemd[1]: Failed to start Process error reports when automatic reporting is enabled.

And that's a problem that is already solved and worked for me as well.
But why htop associated this with init splash? Well that's another question.


Using ssh private key login to automatically decrypt encrypted file systems without password prompt

This is not possible without either extending the SSH protocol, or implementing some other custom protocol.

First of all, the SSH private key is never made available to the system you are logging in to.  Instead, your system signs a challenge with the private key and sends the signed challenge back to the remote system.  Since the remote system has the public key on record, it can verify the signature and be satisfied that you hold the private key.

If you use an SSH agent, then it is possible to give the remote host limited access to your private keys by forwarding the agent connection (an act that has some risk: if the remote host has been compromised, they could use the forwarded agent connection to break into other systems you have access to).  But again, this doesn't help since instead of revealing the private key, the SSH agent instead offers an interface for signing data provided by the client.

There was an option in the abandoned Secure Shell Authentication Agent Protocol Internet Draft to allow clients to ask the agent to decrypt some provided data, but that is not implemented by either the OpenSSH or Gnome Keyring implementations of the protocol.  And even if it was, this would involve the remote system revealing the eCryptFS passphrase to a remote system, which has its own security considerations.

As you can see, it isn't a particularly simple problem, and would be difficult to just bolt onto the side of the existing utilities.

If you were happy to store the remote system's passphrase locally, then you might be able to write a script that would decrypt it and pipe it to ssh remotehost ecryptfs-add-passphrase - or similar, which should then allow the encrypted directory to mount.


New hard drive is read-only and root-only access, how can I get full access to it?

Where is your partition mounted? Find that, open a terminal, and change to the directory that contains it. Then type the command ls -l. This will show you who owns the mount point and therefore all the files under it. If it's root, you can change it so that you own it by typing sudo chown [yourusername]:[yourusername] [the mountpoint] It will ask you for your password, type it in, you will not see anything as you type. This has helped me in similar situations.


Short answer... generalization...
In the old days, with small capacity, slow hard disk drives:
logical sector = physical sector = IO block = 512 bytes
In current days, with high capacity, fast hard/SSD disk drives:
logical sector = physical sector = 512 bytes, IO block = 4096
Drives with IO block size of 4096 are called "Advanced Format" drives. Any read request will always read 1 block minimum (or 8 sectors). This way, sector 1 is ready to process, and sector 2-8 are ready, if need be, without a slow disk read for the next block(s). This speeds up overall data transfers, and keeps block numbers at a manageable number.


when i close my laptop lid my secund screen requiers password when set to do nothing

You have to disable the Lock feature in the Brightness and Lock tool, otherwise it's default to lock your system when you close the lid (turn the screen off).


Can I install a 2nd Ubuntu next to preexisting Win7 + Ubuntu Wubi installation?

That is entirely possible without destroying anything.


Change of default applications during upgrade

I always setup a second user on a new system.
Then I log into that new user account to see what changes there are in comparison to my old user account which kept my settings (including my defaults!).
Sometimes it's quite nice to see some changes for the good.

After that you get two options:

change some settings in your old account to get some of the new goodies by working through the settings folders of your applications and conf-files in your home directory.
or you use the new account and copy the settings folders and conf-files of the few applications you want to keep with their configurations and settings into the new home directory. (Obviously you have to do this as superuser via "sudo" and change the owner of those settings folders afterwards recursivly to the name of the new user/group.)

That way I always get the new concepts and my custom configuration within the brandnew system.


How do I get a Huawei E1550 dongle working?

I found a topic in the german Ubuntu Users Wiki describing your problem. They suggest commenting out a range of lines in /etc/ppp/options:

lcp-echo-interval 30         # range start
...
lcp-echo-failure 4           # range end

From my experience with different dongles and Ubuntu versions I would like to propose another solution:

Buy a MiFi or Huawei E5, those are mobile hotspots providing internet access for 3 to 5 devices at the same time. Everything that needs to be configured will be done on the hotspot and you simply connect via WiFi or USB.
If your notebook is equipped with a SIM slot and antennas buy an internal modem card, I never had issues with that.


Ubuntu 18.04 Gnome shell quadrant tiling

I ended up going with gTile as it works perfectly for my case.


Connection to WiFi network with my Asus x205TA

I've got this device too. We need a kernel from 4* series, and both of these files in the right location for WiFi to work:

/lib/firmware/brcm/brcmfmac43340-sdio.bin
/lib/firmware/brcm/brcmfmac43340-sdio.txt

Step 1
In the past we could only get the .bin from Android, but it's now in the Linux firmware repository (and it's already in the installation with 16.04, so you can skip to step 2 if you already have brcmfmac43340.sdio.bin in the right place - I think you do from your question). If you need to get it you can do this:

sudo apt-get install git
git clone git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git

and copy the file over from the created directory to the right place

sudo cp linux-firmware/brcm/brcmfmac43340-sdio.bin lib/firmware/brcm/brcmfmac43340-sdio.bin

you might want to delete the cloned directory after that, as it is quite big.

Step 2
Now the other file, which is already in the system but needs to be copied to the right place:

sudo cp /sys/firmware/efi/efivars/nvram-74b00bd9-805a-4d61-b51f-43268123d113 /lib/firmware/brcm/brcmfmac43340-sdio.txt

(If this throws a no such file... you may need to mount the directory temporarily:

mount -t efivars efivars /sys/firmware/efi/efivars

and try again)

Wi-Fi works after reboot :)

Note: you may find that the system hangs at end of boot after doing this & you have to hard reset. If this happens keep trying to boot - you will get in eventually. You can fix this by blacklisting the btsdio module (Bluetooth doesn't work anyway). Create a file and open to edit:

sudo nano /etc/modprobe.d/blacklist-btsdio.conf

Write this text in the file:

blacklist btsdio

Save and exit.

I should note that the same procedure works for F205TA


Not tested, but I would try something like

ps -eocomm=,etimes= | awk '$1 ~ /ffmpeg/ && $2 > 1800 {c++} END {print c}'


How to get a full size of directory without listing the files/dir within?

The -s option for du will give you an output which is just the summary, so swap your command to:

du -sh /path/to/directory


You missed a part in the installation. This adds a fingerprint:

wget -O - https://qgis.org/downloads/qgis-2019.gpg.key | gpg --import
gpg --fingerprint 51F523511C7028C3
sudo gpg --export --armor 51F523511C7028C3 | apt-key add -

(The 2018 key is no longer valid. I did not find a 2020 key yet but the 2019 one will be valid) Then do

sudo apt update
sudo apt install qgis qgis-plugin-grass


Tar is uninstalled, how is it possible to reinstall it?

You can run a live-cd of your ubuntu distro version to copy tar from live distro to your hard drive.

Boot from CD (or usb)
Mount your hard drive to /mnt : (if your hard drive is /dev/sdb1)

mount /dev/sda1 /mnt

Copy /bin/tar to /mnt/bin/tar

cp /bin/tar /mnt/bin/tar

If it's not enough, you can try to copy others tar related files.  You can list them with dpkg  :

$ dpkg -L tar
/bin
/bin/tar
/usr
/usr/sbin
/usr/sbin/tarcat
/usr/sbin/rmt-tar
/usr/share
/usr/share/doc
/usr/share/doc/tar
/usr/share/doc/tar/changelog.Debian.gz
/usr/share/doc/tar/copyright
/usr/share/doc/tar/NEWS.Debian.gz
/usr/share/doc/tar/NEWS.gz
/usr/share/doc/tar/README.Debian
/usr/share/doc/tar/THANKS.gz
/usr/share/doc/tar/AUTHORS
/usr/share/man
/usr/share/man/man8
/usr/share/man/man8/rmt-tar.8.gz
/usr/share/man/man1
/usr/share/man/man1/tarcat.1.gz
/usr/share/man/man1/tar.1.gz
/usr/lib
/usr/lib/tar
/usr/lib/mime
/usr/lib/mime/packages
/usr/lib/mime/packages/tar
/etc
/etc/rmt


18.04 Screen blanks after several hours, machine still running, all I get is a cursor

I speculate that dbus-pm is not compatible to nvidia proprietary driver

try the following

sudo nano /etc/default/acpi-support

modify the line as follow

#SUSPEND_METHODS="dbus-pm dbus-hal pm-utils"
SUSPEND_METHODS="dbus-hal pm-utils"

then
    sudo /etc/init.d/acpid restart


I had a similar problem with the font size of the file manager content windows after connecting my laptop to an external display, messing with screen resolution, then disconnecting it.  To restore proper font proportions, I ran the fc-cache command in a terminal, then logged out and back in (using the gui menu, not just sourcing my .profile from the terminal).

fc-cache -rv

That fixed the font size for me.


How to generate sha1 hashes of a whole dvd?

Use find

find /path/to/DVD -exec sha1sum {} + > text.file


How to prevent systemd suspend from stopping any service with a dont-sleep.service

I have been trying to prevent Ubuntu 16.04 from sleeping during a remote backup (rsync running over ssh using backuppc).  I have implemented your solution above and so far it seems to be working for me.

To answer your question, at the same time as the dont-sleep runs I see in syslog that NetworkManager disconnects the network then re-connects it (which in my case takes about 12 seconds).  As ssh is pretty robust and seems not to care about small network interruptions like that, this doesn't seem to hinder my backup, though it is clearly not ideal.

At the moment I assume the reason the network disconnects it is because all processes for sleeping are run in parallel, which is explained in the man pages for systemd-suspend:

  executables in this directory are executed in parallel, and execution
  of the action is not continued until all executables have finished.

http://manpages.ubuntu.com/manpages/zesty/man8/systemd-suspend.service.8.html

If this is the case, then there would seem to be no hope to guarantee to be the first process and to stop the sleep actions before any other sleep processes have started to run (without modification to systemd to specifically support that at least).


According to your error message you did not install either mininet or virtualbox-guest-x11 but rather you tried to install a nonexistent package called mininet/virtualbox-guest-x11. The correct command to install them both from the terminal is:

sudo apt-get install mininet virtualbox-guest-x11

...or you can also install them both from the Ubuntu Software Center.


How to stop dhcp discover messages after dhcp release?

You can find the PID of the DHCP Client with pgrep. Read man pgrep. You can kill (send a signal to) by name with pkill. man pkill.


Using serial wacom Artpad II drawing tablet with unpatched Artful 17.10

Providing inputattach with the -w8001 option tells it to try and set up the tablet for use with the kernel's "wacom_w8001" driver. This is likely the incorrect driver for your particular tablet since I believe it is only compatible with the serial digitizers/touchscreens found in tablet PCs. You likely need to pass the -wacom_iv option to inputattach instead. This will try to make use of the "wacom_serial4" kernel driver. I'm not sure if that driver supports the ArtPad II either, but it does have a suspicious-looking case to handle "MODEL_DIGITIZER_II" UD hardware...

You might contact the author (Julian Squires) of the wacom_serial4 driver for more information: you can find some contact info at the top of the driver source: http://elixir.free-electrons.com/linux/latest/source/drivers/input/tablet/wacom_serial4.c


FakeFlashFraud (f3) - what are the different types of counterfeits?

They are documented where the rest of the f3 docs are:

  The line “Bad news: The device `/dev/sdb’ is a counterfeit of type
  limbo” summarizes the results presented below this line. The types of
  drives are good, damaged (seriously failing), limbo (the most common
  type of fake drives), wraparound (a rare, if existing at all, type of
  fake drives), and chain (a rare type of fake drives). If you ever find
  wraparound and chain drives, please consider donating them to my
  collection.


Better Way to Convert Partition From Ext4 to Ext2? (including encrypted home)

That's pretty much it; you have to reformat to downgrade from ext4 to ext2.  I'm not sure why you copied the home directory though.


How to upgrade glade 3.8 to glade 3.13 higher

First remove glade with apt-get:

sudo apt-get remove glade

Download the last version of glade here.

Extract it somewhere, then just read the INSTALL file.


Cannot boot my computer. Hard Drive is not recognized by BIOS

If you have a CD/DVD of your Windows (The clean solution) :

Boot from Windows CD/DVD and choose “Repair” when it shows up.
Choose Command Prompt on the resulting screen and run the following
two commands:

bootrec /fixmbr

bootrec /fixboot
Remove the CD/DVD and you should boot straight into Windows


Ubuntu server 14.04 LTS black screen after grub

I encountered the same problem(I also use Asus H170-PRO and 14.04.3 LTS) and solved it by adding nomodeset to the boot parameter. The following post helped me.

How do I set 'nomodeset' after I've already installed Ubuntu?


ng serve opens editor instead of loading local URL

This is the terminal editor on the 'ng' alias.
Uninstall it with:

sudo apt purge ng-common ng-latin

And then install Angular CLI (assuming you have npm installed) with

sudo npm install -g @angular/cli

If you don't have npm installed have a look here


It's a waste of money to do that. 192 KHz, 24-bit FLAC files are lossless and very high quality, so get a 256GB USB 3.0 flash drive and copy/paste the FLAC files to a USB flash drive instead. FLAC files on USB flash drives produce a cleaner sound than DVDs without the DVD audio haze. A 192 KHz, 24-bit FLAC file also sounds better than a prerecorded audio CD when played in the same Blu-ray player. And unlike most DVDs USB flash drives are rewriteable without any loss in audio quality.

Keep the flash drive plugged in all the time in the Blu-ray's USB port so you can listen to the music that you copied onto the flash drive by using the Blu-ray player's remote control to navigate on-screen to the selected music file.


How do I change the GTK theme to those found on the page given in the description?

i guess if it is supported by your desktop you can easily run nautilus with admin rights:

gksu nautilus

then just go to usr/share/themes folder and unzip files you have downloaded from site.
Use gnome-tweak-tool ot ubuntu tweak to chose themes
or you can add webupd8theme repository by

sudo apt-add-repository ppa:webupd8team/themes && sudo apt-get update

and install themes via synaptic package manager -just search for themes. https://launchpad.net/~webupd8team/+archive/themes


External monitor shows part of primary monitor on screen

Installing arandr and opening it showed the overlapping displays, I was able to move them and export a shell script that fixes it.