Slice battery causing suspend and power issues on Lenovo X1

For your problem with black screens when resuming, I suggest you keep an eye on this bug. It's currently affecting me on my ThinkPad X200, and I'm using GNOME Shell as a workaround while the bug is being fixed.


Cannot use WiFi on Linux, Alienware 14 laptop

This adapter is supported by the 4.2 kernel. You can install in to Ubuntu 14.04 by running

sudo apt-get install linux-generic-lts-wily

Then reboot. You will need to have an updated firmware too. You can install the updated one by

sudo apt-get install linux-firmware

If that firmware does not enable the adapter, then install firmware from Ubuntu 15.10

wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.149.2_all.deb
sudo dpkg -i linux-firmware_1.149.2_all.deb


Duplex printing gives punched holes in wrong place

Found it.

Go to printer Printers, choose Printer Properties,
select Job Options and change Orientation: from Portrait to Reverse portrait (180 degrees).


Can my internet speed be higher than my HDD write speed?

When watching videos on the internet they will get buffered into your RAM. This is a lot faster than your HDD. I think that either your ISP or the server you are connecting to is causing the lower speed you recognize as it buffers a lot.


UNCLAIMED does not mean "not being used", it means the kernel has not addressed it. That is fine in systems that are designed to work without the operating system interfering with them.
A RAM controller and RAM are not the same thing.

Unless you have an actual problem that you can point at these being the issue, I really wouldn't worry about these. Most people have unclaimed devices in fully working systems. I know I do.


how to run wine as an independent software?

You can use wine via terminal

wine your_exe

with the full path to your exe.

Or also via context menu of your exe file in your file manager.

Installed Windows programs you can start usually via your Dash.


changing ownership of Read-only file system - i cant move, delete , rename any file

A Read-Only Filesystem generally occurs when something goes wrong and the system decides it's safest to go read-only.

The solution is to remount the system as read-write.

sudo mount -o remount,rw /partition/identifier /mount/point

You can find the mount point with this command:

mount -v | grep "^/" | awk '{print "\nPartition identifier: " $1  "\n Mountpoint: "  $3}'

You might need to unmount if already mounted.

Source: How do I remount a filesystem as read/write?


Lost Ubuntu partition after reinstalling Windows 7

Try testdisk it will recover your datas from deleted partition. Download testdisk from here and the step by step tutorial here
.


confusion of space allocation /home and /HOME

The default Linux file system is case sensitive. You have defined a mountpoint at /HOME when instead, you should have used /home. Therefore, the /HOME is simply not used, it is not your actual home directory, that is in /home/username which is completely separate from /HOME.

To fix this and use the 874G partition you have created as your actual home directory (in the Linux world, your home dir is referred to as $HOME (note the $) or ~/), you will need to follow these steps:

Create your home directory on /HOME:

sudo mkdir "/HOME/$USER"
sudo chown username "/HOME/$USER"

Copy everything from your current $HOME to this new directory.

mv ~/* ~/.* "/HOME/$USER"

Tell the system to mount the partition of /HOME in the right place, /home. For this, you will need to edit /etc/fstab:

sudo gedit /etc/fstab

That will bring up an editor window, you need to find the line that mounts /HOME, it will look something like this:

UUID=123-ABC    /HOME   ext4    rw,errors=remount-ro    0   0

Change /HOME to /home, leave everything else as it is.
Remove your home dir and reboot

sudo rmdir "/home/$USER"
sudo reboot


How to protect an NTFS external drive to be use both in Ubuntu and Windows?

One way of doing it:
installing TrueCrypt to both computers.

saving all the files on the external disc to a temporary space in one of your computers.

preparing the external disc as an encrypted container

assuming beginner's tutorial is read:

http://www.truecrypt.org/docs/tutorial

if you are experienced one:
 start truecrypt (either in linux or in windows)

create volume
create a volume within a partition drive
standard truecrypt volume
select device
and so on ...

if you are NOT experienced one:

create volume
create an encrypted file container
standard truecrypt volume
select file

and so on ...

hope to hear if there is any other way of doing it.


How can I have Skype run a command when I get a call?

A Hack-ish way to achieve this would be to find out the title of the window which appears when there is an incoming call and use wmctrl to check if such a window is present.

You can write a script and then use cron or your own logic to run this script at fixed intervals.

I don't know the format of Skype incoming call window's title, but the overall script could be something like this (if written in python)

#!/usr/bin/python
import subprocess

# Change below line according to skype window title
# You might need to use regex in case the title has usernames
command = r"wmctrl -xl | grep 'Skype - Incoming'"
output = system.exec_command(command, getOutput=True)

if output != "":
    # Play sound here
    pass


Why I can't change my ubuntu root password?

Run these commands:

sudo passwd root

[enter your user's password]
[enter the password you want]
[enter the same password]

And you're done.


How to call a number from command-line with Skype?

Very simple:

$> skype --help

Skype 4.3.0.37

Usage: skype [options]
Options:
  --dbpath=<path>       Specify an alternative path to store Skype data files.
                        Default: ~/.Skype
  --resources=<path>    Specify a path where Skype can find its resource files.
                        Default: /usr/share/skype
  --secondary           Start a secondary instance of Skype.
  --disable-api         Disable Skype Public API.
  --callto <nick>
  skype:<nick>?<action>
    [...]

Tested. It works. Not just with nicknames. Also with direct phone numbers:

$> skype --callto +494030001234

( this means: OPs main mistake was a colon instead of a space... )


A nice discussion between Raphael B. and Stefano Palazzo as to which method is recommended. However, neither says by whom. I, however, will give my recommendation, with no intention of being the generally correct answer for everybody.

I have always installed my own private version of Eclipse for a number of reasons:

It’s ridiculously simple.
The packaged version will always lag behind a bit, and I want the cutting edge. I also have to align with other people in my shop.
It allows me to have several Eclipse installations side-by-side, each with a different set of plugins, since it often is a bad idea to include every plugin under the sun (oh, an unintended pun) into one Eclipse.


no desktop on a user when i log the user into the system

By default, the useradd utility on most Linux systems does not assign a password for the created user. Without a password on the user, the user will be unable to login / have access to most of the functionality of the desktop.

To set a password for the user, you use the following command:

passwd <username>

Make sure to replace <username> with your actual username (without the angle brackets). After running this, you'll be prompted to enter a new password for the user. After setting a password for the user, you should be able to login as normal.

On the other hand, Ubuntu (like all Debian-based distros) comes with the adduser utility which is a user-friendly frontend to useradd. Simply running the following command is all you need:

adduser

You will be shown a series of prompts, which allow you to specify the settings for the new user (username, full name, etc.), and is preferred over useradd in modern Ubuntu versions, and unlike useradd, you don't have to manually set a password after; part of the setup will prompt you to set the password.


iproute2 and NetworkManager on Ubuntu15.04

you can do this by adding below line in /etc/network/interfaces

post-up route add default gw 192.168.1.1

or

post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1 dev eth0

add this at below side of interface definition like

auto eth0
iface eth0 inet static
        address 192.168.1.50
        netmask 255.255.255.0
        post-up route add -net 192.168.1.0 netmask 255.255.255.0 gw 192.168.1.1

or

using iproute2 you can do bellow steps:
open file /etc/iproute2/rt_tables and add 1      rt2 at the end it will look like :

# reserved values
#
255 local
254 main
253 default
0   unspec
# local
#1  inr.ruhep
 1      rt2

and open /etc/network/interfaces file and add

auto eth0
iface eth0 inet static
address 192.168.1.50
netmask 255.255.255.0
post-up ip route add 192.168.1.0/24 dev eth0 src 192.168.1.50 table rt2
post-up ip route add default via 192.168.1.1 dev eth0 table rt2
post-up ip rule add from 192.168.1.1 table rt2
post-up ip rule add to 192.168.1.1 table rt2

if you are using multiple interface then you can define static routing for all interface.
i hope it will help.


"Wifi is disabled by hardware switch" after being suspended

This systemd script which reloads the WiFi kernel module when resuming from suspend. It comes from this answer: Wifi available networks not showing up suddenly:

This script is written for iwlwifi` which is the common Intel driver name. If your's is different change that name below:

#!/bin/sh

# NAME: /lib/systemd/system-sleep/iwlwifi-reset
# DESC: Resets Intel WiFi which can be flakey after a long suspend.
# DATE: Apr 1, 2017. Modified August 30, 2017.

MYNAME=$0

exit

restart_wifi() {
    /usr/bin/logger $MYNAME 'restart_wifi BEGIN'
    /sbin/modprobe -v -r iwldvm # This removes iwlwifi too
    /sbin/modprobe -v iwlwifi   # This starts iwldvm too
#    systemctl restart NetworkManager.service
    /usr/bin/logger 'systemctl restart NetworkManager.service (SUPPRESSED)'
    /usr/bin/logger $MYNAME 'restart_wifi END'
}

/usr/bin/logger $MYNAME 'case=[' ${1}' ]'
case "${1}/${2}" in
    hibernate|suspend|pre*)
      ;;
    resume|thaw|post*)
      restart_wifi;;
esac

NOTE: Sometimes simply resetting network manager is all that is needed. In that case un-comment the line above by removing #. Then comment out the two lines above it by putting # at the beginning of those two lines.

You'll need to create this script, called iwlwifi-reset, with sudo powers and save it into the directory /lib/systemd/system-sleep.  Then mark it executable using:

chmod a+x /lib/systemd/system-sleep/iwlwifi-reset


Can we disable browsers from sharing workspaces?

Ubuntu desktop (based on Gnome Shell) uses a "Launch or Switch" paradigm. If you click a launcher in the dock, the program is started if it is not yet running. If the program is running already, you will switch to it, even if it is on another workspace.

Still, you can deliberately choose to launch a new instance instead of switching to an already running instance: hit the Ctrl key while clicking the launcher, or middle-click the launcher.

Yet, it is easy to change the behaviour to what you want

Open the terminal, and execute following command to change a Dock setting.

gsettings set org.gnome.shell.extensions.dash-to-dock isolate-workspaces true

Now, the system will behave like you prefer. The Dock will only show icons for programs running on the current workspace. It also will always show all your pinned applications, ready to be launched. Now also your Browser will launch on the new workspace, even if it is already running on another workspace.

To undo this setting, just reset the setting to its default:

gsettings reset org.gnome.shell.extensions.dash-to-dock isolate-workspaces


Why did Ubuntu fail, given that the installation was successful?

"repairing disk errors" does not mean the installation failed, it means on startup,  there are problems with your HDD.

Just let it run the repair which may take a while and then it should boot.


Email Contacts Calendar software with Google Sync

Ubuntu is shipped with Thunderbird as the default email program.  It had contacts (called Address Book) by default.  You can click on the Add-ons option to add your preferred Calendar.  Using calendar in the add-ons search field you'll find a number of calendars.  I believe the most popular one is Lighting.  While some of the others might also, Lightning functions seamlessly with the Google contacts (Provider for Google Calendar).

gContactSync will sync your address book with Google.

The Google sync components are for syncing with your mobile devices.

Thunderbird is a Mozilla application.  While it has many features and pluggins available.  It's a very lightweight application.


Moved root and swap directories, how can I reconfigure GRUB2?

You first need to identify your root and boot partitions.

Assuming your root partition is /dev/sda4 , and you do not haev a separate boot partition, we are going to mount your root partition, install grub, and update the grub menu.

# mount your root partition
sudo mount /dev/sda4 /mnt

# Mount your virtual file systems
for i in /dev /dev/pts /proc /sys; do sudo mount -B $i /mnt$i; done

# Install grub
sudo grub-install --boot-directory=/mnt/boot /dev/sda

# chroot , update, and then install grub
sudo chroot /mnt
update-grub
grub-install /dev/sda

To fix your swap, list your partitions

sudo blkid

Edit /mnt/etc/fstab with the correct swap uuid

# graphical
gksu gedit /mnt/etc/fstab

# command line
sudo -e /mnt/etc/fstab

Update your swap UUID

UUID=xxx-yyy-zzz  swap  swap  defaults  0  0

Change "xxx-yyy-zzz to your swap uuid ;)

reboot and all should be working.


Java, installation problem or issue of the noob?

For whatever reason the main repository is missing or your package information was deleted or never updated. Execute the following commands:

sudo apt-add-repository main
sudo apt-get update
sudo apt-get install oracle-java7-installer


How to fix plymouth (splash screen) in all Ubuntu releases!

Here is a solution to address the problem of no plymouth (splash screen) in Ubuntu after an nVidia proprietary driver installation. It doesn't matter what Ubuntu version you use, it should work anyway.

Open your terminal and type

sudo apt-get install v86d

Then

sudo -H gedit /etc/default/grub

Find this line

#GRUB_GFXMODE=640x480

and change for this one (of course choose your resolution)

GRUB_GFXMODE=1440x900
GRUB_GFXPAYLOAD_LINUX=keep

Note: You can try GRUB_GFXMODE=1440x900x24, but beware of specifying the color depth. You must specify a supported value. If does not work then rather delete it. More information in the manual.

Also note: older Nvidia graphics cards require the GRUB_GFXMODE property in the format <width>x<height>-<depth> (e.g. 1920x1200-24, but not 1920x1200x24).

Save file and type in terminal

echo FRAMEBUFFER=y | sudo tee /etc/initramfs-tools/conf.d/splash
sudo update-initramfs -u
sudo update-grub

It worked for me in all Ubuntu versions.
Give it a try :)


As CelticWarrior mentioned in the comments, ff you are going to remove Windows and install and retain Ubuntu only, you would best just run the LiveUSB and install Ubuntu using the Install option to use the Entire Disk.  The Installer will delete everything on the disk by automatically reformatting and creating the partitions that it will user.

Look at the Ubuntu Install Guide.

Notice the first option is Erase disk and install Ubuntu.  That is the one you would choose to have your computer automatically format and partition your hard drive.


Ubuntu 18.04 netplan.io how to prevent the creation of 2 default gateways

Just remove the gateway configuration from the eth0 interface.

Omit the line which says gateway4: 172.16.0.1.

You will still be able to reach hosts in the 172.16.x.y subnet through eth0, since it's directly connected there.

If you need to access other hosts in that network (for example, an intranet with private addresses in the RFC1918 ranges), then just add static routes to access those networks using the 172.16.0.1 gateway. See this reference for routing in Netplan, which should help you add static routes.

If you get your IPs through DHCP, it should be mostly the same... But then you need the DHCP server that hands you an IP on eth0 not to set any gateways... There doesn't seem to be a good way in Netplan to disable a gateway you receive from DHCP. (Though networkd can do that, see this comment on another answer for an attempt to address that.)


Can't find the "free space" in the partition table while installing ubuntu

You need to convert your dynamic partition to one logical partition. Then do this steps.

Download and Install EASEUS Partition Master Professional Edition
(my favorite app ;) )
Run EASEUS Partition Master then click Go to main screen option.
Here, select the partition which you want to install Ubuntu. In your case select 31.25GB unallocated partition and right-click on it and select Create Partition. Under the Create as drop-down, select Logical and click OK.
Click the Apply button at the top of EASEUS window (under view menu) then click Yes. This operation needs to restart your computer to completing
Finish

If you continue the Ubuntu installation from (USB/CD) you will see the unallocated space.


How to install WINE in 15.10 (error with dependencies)?

Can you try

sudo dpkg --add-architecture i386
sudo apt-get update

and try to install again? That should do.


Pictures folder disappeared from favorites in file browser

Take a look at this file:

$ cat ~/.config/user-dirs.dirs

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"

Set the directory for XDG_PICTURES_DIR to reflect your recent changes.


You must specify the absolute or relative path to the file. If you are running it from a terminal, and you are located in the file path, just run:

sudo dpkg -i ./wps-office_10.1.05672~a21.deb Note the ./

Otherwise, you could use:

sudo dpkg -i <path_to_file>/wps-office_10.1.05672~a21.deb where <path_to_file> could be something like /home/$USER/Documents

or

sudo dpkg -i ../../wps-office_10.1.05672~a21.deb if you are in a subfolder down two levels of the file folder.


Applications are launched too far left on the screen

I still don't know what caused this problem to happen in the first place, but these two answers were helpful in solving the problem:

17.04 How to set default window screen position

How can I start up an application with a pre-defined window size and position?


how to install wine windows program loader?

A general catch-all for install issues is apt install -f which should attempt to resolve all package dependencies and fix your issue.

this should have been a comment but I can't? Good luck


.sh command not working in a desktop launcher

Your script lacks read and execute permissions for user B. Do:

 chmod og+rx b.sh


I have tested two applications that worked well on Ubuntu 16.04 for creating QR codes:

If you want a simple command-line tool, I can recommend qrencode.

It takes an output file name and optionally an input string as command-line arguments and produces a PNG file with the QR code. If no input string is given as argument, it reads from standard input, so you can either type into the terminal or pipe another command's output into it. There are also some more advanced options.

Install it with sudo apt install qrencode.

The basic usage is qrencode -o "output-file.png" "Your text here".
For more information see man qrencode.

If you want a user-friendly GUI tool, you should try qtqr.

It offers you a clean user interface that allows you to select an input data type like e.g. URL, email address, phone number, WiFi credentials or plain text. You can easily select the pixel size, margin and error correction level and save in the formats PNG and SVG. It also allows you to scan and decode QR codes from image files or a webcam.

Install it with sudo apt install qtqr.

Now here's a screenshot showing how to create a QR code of my Ask Ubuntu profile URL with both tools (and using eog on the right to view the image created by qrencode, as it has no preview). Note that the created images are absolutely identical:


I usually use Midnight Commander to do such things. It's an extremely useful tool, one you couldn't live without ;)
Use sudo apt-get install mc to install it.
(Also, it's much safer to run Midnigh Commander via sudo than Nautilus)


My laptop doesn't run Ubuntu! Intel USB problem?

I have a different laptop Acer Aspire E5-573-P1NH also with "InsydeH20 Rev.5.0" system bios version 1.25. and I have the same problem. I have read here Ubuntu error message after GRUB " pci 0000:00:14:0: PCI INT A no GSI " that my laptops BIOS v1.37 will fix the problem but have not checked this yet.

This may be a general problem with early versions of this type of BIOS and you may be lucky and have a fixed version available. Have you updated your BIOS to its latest version?

Hope this helps.


Recently I've implemented DNS over TLS for home network (using AsusWRT-Merlin powered router). While exploring approaches to implement DoT for Linux workstations and servers (in the cloud - I mean someone else' computers lol) outside of home network, I found systemd-resolved as recommended by the DNS Privacy Project.

While @opinion-no9 provided a Ubuntu 18.04 specific solution (limited by the systemd version shipped with the LTS), I'd like to share a more generic and close-to-upstream one:

A bit of background - timeline for DNS over TLS support in systemd

236 DNSSEC support for RFC 8080 (ed25519 keys and signatures)
239 systemd-resolved now supports opportunistic DNS-over-TLS, Off by default
243 systemd-resolved gained support for a new strict DNS-over-TLS mode

  Oh NO! Ubuntu 18.04 LTS ships systemd 237...

UPDATE - 23 April 2020 Ubuntu 20.04 LTS which ships systemd 245 (without systemd-homed ;-).

Use DNS Over TLS (DoT) on generic Linux systems

So for generic Linux distro with relative close-to-upstream kernel, systemd, glibc, toolchain, GNU utils, etc

edit /etc/systemd/resolved.conf

[Resolve]
DNS=1.1.1.1 1.0.0.1 8.8.8.8
#FallbackDNS=1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
#Domains=
#LLMNR=yes
#MulticastDNS=yes
#DNSSEC=allow-downgrade
#DNSOverTLS=opportunistic
DNSSEC=yes
DNSOverTLS=yes
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

Ubuntu 20.04 specific resolved.conf

[Resolve]
DNS=1.1.1.1 1.0.0.1 8.8.8.8
FallbackDNS=1.1.1.1 8.8.8.10 8.8.8.8
#Domains=
#LLMNR=no
#MulticastDNS=no
DNSSEC=yes
DNSOverTLS=yes
#Cache=yes
#DNSStubListener=yes
#ReadEtcHosts=yes

Assume systemd-resolved is enabled, restart the service

systemctl restart systemd-resolved.service

Use local stub resolver

systemd-resolved provides a local DNS stub listener on IP address 127.0.0.53 on the local loopback interface, so to use the DNS over TLS capable stub resolver, we'll need to somehow manage /etc/resolv.conf and make sure 127.0.0.53 is used as nameserver.

  NOTE: systemd maintains /run/systemd/resolve/stub-resolv.conf for compatibility with traditional Linux programs. We can simply symlink to this file ;-)

ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

NOTE: For Arch Linux, I have to replace openresolvconf with systemd-resolvconf.

Done.

Validation

Generate DNS query, then check TCP connection to specified upstream DNS server via port 853, in the following example we explicitly used Cloudflare's 1.1.1.1.

root@netbook:/etc# uname -a
Linux netbook 5.4.5-arch1-1 #1 SMP PREEMPT Wed, 18 Dec 2019 19:48:51 +0000 x86_64 GNU/Linux

root@netbook:~#  kdig -d github.com
;; DEBUG: Querying for owner(github.com.), class(1), type(1), server(127.0.0.53), port(53), protocol(UDP)
;; ->>HEADER<<- opcode: QUERY; status: NOERROR; id: 55366
;; Flags: qr rd ra; QUERY: 1; ANSWER: 1; AUTHORITY: 0; ADDITIONAL: 0

;; QUESTION SECTION:
;; github.com.                  IN      A

;; ANSWER SECTION:
github.com.             58      IN      A       13.236.229.21

;; Received 44 B
;; Time 2019-12-21 22:55:13 AEDT
;; From 127.0.0.53@53(UDP) in 58.0 ms

root@netbook:~# ss -tuna | grep :853
tcp   ESTAB  0       0        192.168.1.150:50504         1.1.1.1:853
tcp   ESTAB  0       0        192.168.1.150:50506         1.1.1.1:853

Or, if you want to be simple and rough, use tcpdump ;-)

tcpdump -tttt -nn -XX -vv -i <interface> dst 1.1.1.1 and port 853

Conclusion

Last but not least: This is a generic guide to enable DNS over TLS on a Linux host, it is not specific to distro or Desktop Environment (as we haven't even touched NetworkManager or alternatives ;-). Adjustments may be needed for different distros and different DEs/WMs.

Reference

Personal DoT Implementation Notes
DNS Privacy Clients
Arch Wiki - systemd-resolved
systemd-resolved.service


Using sparse files in lieu of disks

If you want to play around with LVM without making changes to the partitions on your disks, yes, this can be done. Create a couple of sparse files that can serve as your "virtual disks." Then create the partitions on those files and setup loop devices using your disk images. From there, you can play around with LVM on the loop devices that point to your disk images.

Make your sparse files
Run the following in a terminal to create two sparse files. Sparse files always report that they are a predetermined, fixed size, but in reality, they initially use 0 bytes of disk space. As they are written to, they can  grow until either they reach their predetermined size or the disk containing them has no more space.

truncate -s 1T /tmp/disk1.img
truncate -s 1T /tmp/disk2.img

Create partitions on the disk images
Now you have two files that you can treat like disks. Use fdisk to partition these images. If you don't know how to use fdisk to create partitions, you can check out this tutorial or run the commands below which will create two partitions of 512G each on both disk images.

sudo sfdisk /tmp/disk1.img <<< "$(base64 -d <<< "bGFiZWw6IGRvcwpsYWJlbC1pZDogMHhkODdlMWQ1MwpkZXZpY2U6IC90bXAvZGlzazEuaW1nCnVuaXQ6IHNlY3RvcnMKCi90bXAvZGlzazEuaW1nMSA6IHN0YXJ0PSAgICAgICAgMjA0OCwgc2l6ZT0gIDEwNzM3NDE4MjQsIHR5cGU9ODMKL3RtcC9kaXNrMS5pbWcyIDogc3RhcnQ9ICAxMDczNzQzODcyLCBzaXplPSAgMTA3MzczOTc3NiwgdHlwZT04Mwo=")"
sudo sfdisk /tmp/disk2.img <<< "$(base64 -d <<< "bGFiZWw6IGRvcwpsYWJlbC1pZDogMHg4ZWMwYWYyZgpkZXZpY2U6IC90bXAvZGlzazIuaW1nCnVuaXQ6IHNlY3RvcnMKCi90bXAvZGlzazIuaW1nMSA6IHN0YXJ0PSAgICAgICAgMjA0OCwgc2l6ZT0gIDEwNzM3NDE4MjQsIHR5cGU9ODMKL3RtcC9kaXNrMi5pbWcyIDogc3RhcnQ9ICAxMDczNzQzODcyLCBzaXplPSAgMTA3MzczOTc3NiwgdHlwZT04Mwo=")"

Setup images on loop devices
Next we lets get our disk images connected to some loop devices so that we can work with the partitions. In a terminal, run the following commands (losetup -f returns the next available loop device)

sudo losetup -P $(losetup -f) /tmp/disk1.img
sudo losetup -P $(losetup -f) /tmp/disk2.img

Determine what devices our partitions are connected to
Now we need to figure out which loop devices point to our partitions. Run the following in a terminal:

sudo losetup -a | grep -P "disk[12].img | cut -f1 -d:"
Output

/dev/loop3
/dev/loop4

These are the loop devices of interest that we will look for in the output of the next command
sudo blkid
Output that corresponds to my loop devices

/dev/loop3: PTUUID="d87e1d53" PTTYPE="dos"
/dev/loop3p1: PARTUUID="d87e1d53-01"
/dev/loop3p2: PARTUUID="d87e1d53-02"
/dev/loop4: PTUUID="8ec0af2f" PTTYPE="dos"
/dev/loop4p1: PARTUUID="8ec0af2f-01"
/dev/loop4p2: PARTUUID="8ec0af2f-02"

So my disk1 partitions are at /dev/loop3p1 and /dev/loop3p2, and my disk2 partitions are at /dev/loop4p1 and /dev/loop4p2. You're probably good to go from here, but I'll continue with an example LVM configuration.

Example LVM setup
I'm only going to use disk1, partition 1 and disk2 partition 2 in my LVM configuration. From terminal run the following, replacing the paths to the loop devices as necessary:

Setup physical volumes: sudo pvcreate /dev/loop3p1 /dev/loop4p2
Setup volume group: vgcreate my_volume_group /dev/loop3p1 /dev/loop4p2
Setup a couple partitions:

Partition1: sudo lvcreate --name root --size 30G my_volume_group
Partition2: sudo lvcreate --name swap --size 4G my_volume_group
Partition3: sudo lvcreate --name home --extents +100%free my_volume_group

Now I have a single volume group with 1TB of space that is taken from 512G on disk1.img and 512G on disk2.img. This can be verified by running:

sudo pvs which outputs

PV           VG              Fmt  Attr PSize   PFree
/dev/loop3p1 my_volume_group lvm2 a--  512.00g    0
/dev/loop4p2 my_volume_group lvm2 a--  512.00g    0

sudo vgs which outputs

VG              #PV #LV #SN Attr   VSize    VFree
my_volume_group   2   3   0 wz--n- 1023.99g    0

sudo lvs which outputs

LV   VG              Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
home my_volume_group -wi-a----- 989.99g
root my_volume_group -wi-a-----  30.00g
swap my_volume_group -wi-a-----   4.00g


BEFORE YOU STARTED:

I will assume you have a backup of any Android setup / content.

As you are about to overwrite Android image with Ubuntu Touch, then you should first do a factory reset OR just re-image the device with Android (using the recovery method given).

NOTE: I have loaded both phablet and desktop images to various Nexus 7 devices (both 8GB and 16GB). I have had no issues with either the phablet-tool (automated) or command-line (manual) methods.


12.04 cd install failure. No options , simply splash screen forever

Hit ESC at startup, select your language (default is english), then hit F6. From the selections in F6 - enabled acpi=off and nomodeset. Then try booting.


I had the same problem in Xubuntu 19.10.

Try this:

Right-click on "Time panel", select Panel -> Panel Settings...
Show window Panel Settings, select bookmark "Items", in this menu select Time.
Double-click to "Time" or select "Time" and click the gear icon to show new window Time.
In this window is a "Local Time" textbox.
I am from Czech Republic and my time in Time panel is the same as your - wrong time
(local time -1 hour).
I incorrectly write to textbox "Local Time" only "Prague".
I fix this text to "Europe/Prague" and now, on "Time panel" it shows the  right value for time.


the output when I start firefox from Terminal

It always happens with me too.  They say it is a bug but to my experience, it doesn't  affect performance at all.
So you may ignore the message and continue using Firefox


Adding External USB Drive & Reboot Won't Mount Zpool

The normal way to do this is to add the devices to you zpool using their UUIDs or WWNs, which are available in /dev/disk/by-uuid and /dev/disk/by-id. This and more details about persistent naming for disks is available here.

To switch an existing pool over to the by-id method, try running:

sudo zpool export tank
sudo zpool import -d /dev/disk/by-id -a

The options tell import to search for devices in that directory, and keep searching until all devices have been checked whether they have ZFS data on them or not (even if there are multiple pools).


UFW not blocking traffic to microk8s cluster

I believe you're "fighting" against the internal Docker network used for the microk8s instancees.  I've come across different options, from setting up after rules for ufw to disabling the docker ip tables configuration.  The nicest setup in my opinion seems to be this: https://github.com/chaifeng/ufw-docker#how-to-do
Edit: it can also be inherent to NodePort, see per comment on SO: https://stackoverflow.com/questions/62772319/ufw-not-blocking-traffic-to-microk8s-cluster#comment112367622_62772319


How to install VLC 64-bit version in Ubuntu?

It looks like you have installed VLC via snap. Snap is self contained package. It doesn't use system binaries and it is different than apt.
If you install vlc via apt, you will be able to execute command shown in solution.


Can You Change or Control the Dual Boot Screen

Yes there is a way. It is called "gfx mode" where you could change the resolution of your graphical terminal. That "little screen" you were talking about is the Grub bootloader - and that runs in a terminal.

Since Grub runs in a very early stage, the value to insert depends on your hardware (namely the GPU). So I'd do the following steps:

Use a terminal to enter nano /etc/default/grub
Change the following line to GRUB_GFXMODE=640x480
Save the change and execute sudo update-grub

Reboot and you'll get a very coarse screen with a big font. Now you could check (and read) which resolutions you could enter instead by checking the vbeinfo. But this is explained here.
If you've got an NVIDIA graphics card, things could be different, but you didn't mention it.


Problems with sudo on Ubuntu Server 14.04.2 LTS

That is normal. User which you are logged in as is in the group sudoer.

Also, if you want, you can create root user - but it is not recommended. That will make a known target for crackers to attack your system.

Enabling

To actually enable root logins first you have to set a password for the root account and then unlock the locked root account. If you don't set a password for the root account the passwd command will return

passwd: unlocking the password would result in a passwordless account.

So, first execute in a terminal

sudo passwd root

you will prompted for a new Unix password. Write it twice(second for confirmation).

Then execute

sudo passwd -u root

to unlock the account. This should return

passwd: password expiry information changed


Managing a large collection of PDF files

Calibre and Mendeley would come to mind. Nr. 1 is in the official repositories, Nr. 2 available as a .deb package. Both are cross-platform and fulfill most of your requirements.

Another viable option might be Zotero. Here's a comparison to Mendeley.


Is it possible to install Ubuntu onto a computer where no other operating system exists?

That is possible. There is no reason you should have an operating system preinstalled in order to try live media (like a live CD or a live flash drive).


How make to nic bonding using curtin in maas

MAAS already supports configuring bonds. You dont have a need to send custom curtin preseed information, you can do the configuration you want in MAAS and it will handle it all automatically for you.

That said, make sure you are using the latest supported version of MAAS (2.3) with the latest images.


command to accept VirtualBox PUEL (for virtualbox-ext-pack installation)?

thanks to this solution for ttf-mscorefonts-installer and the hints in this question for steam i figured out the correct command for virtualbox-ext-pack:

echo virtualbox-ext-pack virtualbox-ext-pack/license select true | sudo debconf-set-selections


Skype user interface integration with Unity

There is little you can do about this, because Qt 4 does not yet have support for integrating with GTK+ 3.x. For this reason, Skype will look out of place until either Skype switches to another toolkit, or until Qt gets support for GTK+ 3.x themes, or until someone comes up with a program to get the colour scheme from GTK+ 3.x and apply it to Skype.


Beyond the Sword just run into a black screen, how can I fix it?

According to this report you should make some actions before Civilization IV:BsT work as appropriate.

Prerequisites

You must have installed winetricks package:

sudo apt-get install winetricks

You should have this native files msvcr71, msxml3, msxml3r.dll, mscoree.dll, streamci.dll, ddrawex.dll
Disable gameux
Install the patchs 1 2 and 3

Starting

You should run winetricks to install DirectX and other Windows libraries and fonts:

winetricks d3dx9* msxml3 msxml4 vcrun2003 quartz devenum corefonts lucida tahoma

Once you do so, you should be able to play the game.

Remember: it wasn't tested a full game until the end, nor all eras, nor the multiplayer function. Also, the version tested was Civilization IV plus WARLORDS and BEYOND THE SWORD expansion packs.


18.04 Remove spurious boot choice from boot menu

Remove the internal drive (HDD or SSD).

Boot from a LiveUSB and open a terminal.

Run sudo efibootmgr; efibootmgr will show a list of all the boot devices stored in EFI, and their current order in booting.  Find the bogus entry to delete from that list and its order number.

Run efibootmgr -b X -B where X is the number of the bogus device to delete. For example, if BOOT0006 was the third item in the Boot Order, found in the previous step, do efibootmgr -b 3 -B.

Shut down, reboot to see the boot order; the bogus entry should be gone. Then you can reinstall the HDD or SDD.


Have you tried using the command sudo do-release-upgrade ? I'd start with that.
Since you have an "old computer", you should probably stick to 16.04 LTS (available here : official Lubuntu Documentation)

You might find some answers here, too : How to Upgrade from 14.10 to 15.04


I found the error. My problem was that I had compiled ffmpeg and x264 before manualla and installed them. But I think that was not supported somehow.

After I uninstalled them and installed to official versions the problem disappeared and I was able to run "make" without errors.

Sorry for this question cuz the problem was selfmade.

Anyway thanks to all and esp. to Roland Taylor for editing my 1. Question here.

cu


Error while loading shared libraries php

From the comments...

libssl.so.1.0.2 doesn't exist, and php7.1 isn't supported, on Ubuntu 16.04.3 LTS. You got php7.1 installed by enabling the Unsupported Updates repository. Disable this repository, and uninstall php7.1.


Ubuntu 14.04 LTS - no sound control panel?

Click on the Sound icon on the unity bar
Select sound settings
Under the Output tab , you will see a list named Play Sound Through
There select  your desired output device
Hope this helps. If you have a different problem , please mention it.


Installation gets stuck after selecting option

After some frustration I have fixed my problem. All I needed to do was install an older driver (340) because the newer one had a bug. For those who are also in the same position I was in, I used this guide to install the driver.


ambiance-dark theme not working on ubuntu 16.04 LTS

add ppa to the repo as normal, do not update the repo. Go into system settings>software & updates>other software.

There you'll need to edit the ppa both main & source. Where you see Distribution, change it from 'Xenial' to 'Trusty'.

Now in terminal run,

sudo apt-get update && apt-get install ambience-dark

I tried & it worked.
Good luck


What is the meaning of `ls directory > something`

This command will generate a list of the folders and the files inside the slc folder and create a file named dates and enter there.

For example I have a folder named git and I have 3 folders there. If I go inside the git folder using terminal and enter the command:

ls ../git > dates.txt

It will create a text file in the same directory named dates.txt and enter all the name of the files and folders inside that directory in that file. This is what my dates.txt file looks like after I entered the command:

build-KE3600_APP-Desktop-Default
dates.txt
KE3600_APP
vlc


I had this problem and you end up having to do an sudo apt-get install mono-complete to get any of the plugins working.

Found the solution here:
http://www.maketecheasier.com/integrate-keepass-with-browser-in-ubuntu/


21.04 UEFI boot fails: Could not create MOKlistXRT: Out of resources

I got a similar error on Thinkpad T430 after upgrading to Ubuntu 21.04.
It affects several users, so I have reported the bug on launchpad:
https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1924605
One solution is to delete Mok* variables in /sys/firmware/efi/efivars. The files are immutable but even after using chattr -i and rm -rf commands they do not delete.


Which recent tablet/notebook convertible PCs run Ubuntu 14.04 LTS flawlessly?

Note that not all the compatible laptop/desktop are displayed in "Ubuntu Desktop certified hardware" the lists of components are very long, so you could choose a laptop/desktop by your budget an check if all its components are compatible with ubuntu.
You can browse here to check compatibility. Hope this help.


How to install monodevelop 5 on ubuntu 14.04?

Rather than building MonoDevelop from source, it is much better to follow the directions on the MonoDevelop website.

This guide should only be followed if you are both running Ubuntu 14.04 and you need MonoDevelop version 5.

If you're on Ubuntu 14.04 and you only need MonoDevelop 4, you can run sudo apt-get install monodevelop.

If you're on a version of Ubuntu newer than 14.04, you can install MonoDevelop 5 just by running sudo apt-get install monodevelop.

If you're on Ubuntu 14.04 and need version 5, run the following commands, one after the other.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
sudo apt-get update
sudo apt-get install monodevelop


I fixed the problem by installing the tested NVIDIA drivers for Ubuntu:

I can see the following details:

So, GeForce GT 750M /PCIe/SSE2 driver is installed.

BTW, I switched again on the open source driver. NVIDIA drivers had important issues (overheating and sometimes the entire screen was freezing).

After applying changes and rebooting Ubuntu started in low graphics mode. I pressed ALT + CTRL + F1. I deleted the following file:

 sudo rm /etc/X11/xorg.conf

Then I restarted the PC:

 sudo reboot

My machine uses again the open source driver and it works fine. If you don't have big issues with the open source driver, I really recommend not to switch on the closed source one.


Ubuntu will create all the partitions it needs, regardless of whether you decide to dual-boot with Windows 7 or not. The setup program will ask you if you want to dual-boot or simply wipe out Windows and install Ubuntu. If you're especially into all this stuff, you can still control the sizes of the partitions Ubuntu creates.


Kubuntu 13.04 fails to boot after software update

Disk was full. Cleaned, and fixed broken packages from advanced boot.


UI freezes very often after moving the home directory

Well, I can't say I truly solved the problem.
I reinstalled Unity. For a day it was fine but then it looked like it came back, but before I got the time make sure it was back, I installed Gnome Shell instead of Unity (for irrelevant reasons).
I can confirm that now (using Gnome Shell) I am not having the issues I experienced, so I assume reinstalling Unity in one or another way should work.


Unable to run Gephi 0.8.2 on Ubuntu 14.04 LTS 64-bit

Install Java 7 instead of Java 8 (uninstall Java 8), gephi seems to have some issue with Java 7.

Source


Please check whether your system supports hybrid suspend. In terminal, type

sudo pm-is-supported --suspend-hybrid && echo "Hybrid suspend is supported" || echo "Your system doesn't support hybrid suspend"

  If the output gets Hybrid suspend is supported, continue in terminal.

sudo nano /etc/pm/config.d/00-use-suspend-hybrid

Then paste the following code into the blank area using ctrl + shift + v.

if [ "$METHOD" = "suspend" ]; then
METHOD=suspend_hybrid
fi
PM_HIBERNATE_DELAY=900

  PM_HIBERNATE_DELAY stands for time in seconds until hibernation occurs.

Now save the file using ctrl + o and exit using ctrl + x.

Disable Windows fast startup in dual boot setup.

  Windows users will likely see complications with dual boot and virtualization. Furthermore, some users have even reported that power buttons on their keyboard will not work and fans in their PSs will continue spinning.

Full article

Since it's a kernel related thing, you can still change the kernel, to see if it works.

This answer may help you as well.


Try logging in to Ubuntu One in your browser and check that the email address is the same as you are typing it in the Ubuntu One desktop application.

If you get any more errors post a screenshot or type the exact error, it will help us diagnose the problem faster.


Add armhf as a suppoted architecture for guest KVM VMs (on a amd64 host)

I found a potential solution.

Install qemu-system-arm and on virt-manager, choose "qemu" for Virt Type (instead of "kvm" which on my setup is the default selection) and then under "Architecture" you will find the option "armv7l".

I have not tested it yet, but at least the option is now there, should work fine.

Is there a better way to accomplish this?


Ubuntu copy dialogue stops at the last moment for a long time

This is because many filesystems buffer and then when they flush they have to wait for the device to do the actual writing.... Which takes a while.

I don't know that there's a good solution so that you see the actual write speed and progress.


Well, I reinstalled a fresh Ubuntu 12.04 to get everything working again. I followed nVidia instructions here: http://docs.nvidia.com/cuda/

Replace sudo /etc/init.d/gdm stop with sudo service lightdm stop
Don't forget the --optimus option when calling the .run
When exporting to the path, be careful with versions, cuda-5.0 doesn't
exist if you install cuda 5.5 !
I did nothing with the /dev/nvidia* files. I did not understand that part but CUDA is working.

Check that CUDA is working with the example and it should work !


installing win7 x64 in VirtualBox - error driver device missing

I ran into this problem today, you probably already solved your problem, but I'm just adding my experience as it may help somebody else.

(I used a physical install CD and not an ISO file)

Open your VM settings
Go to Storage
Select the CD-ROM drive
Check Passthrough
Boot the VM with the Windows

This solved it for me, so it might be worth a shot.


I usually encounter this while playing some games in fullscreen via wine.

You can try Alt+Tab or Win+Tab to switch some windows, and then return to the game.

Also, you can try playing in emulated virtual desktop (check Graphics tab in winecfg). Works best with the same size of your screen and unchecked "Allow window manager to decorate the windows" option.

Also, check Wine HQ for possible bugs/solutions in your version of Dawn Of War.


netgear a6200 error on modprobe ndiswrapper

Okay, this took me long enough but I figured it out.

For the A6200 I downloaded the drivers directly from the NETGEAR site. There were other sites where people zipped up the necessary files themselves and I was having trouble with them.

1) I used wine to open and install the drivers and it hanged midway through the process. I killed it.

2) I navigated to /home/user/.wine/drive_c/program files (x86)/netgear/a6200/drivers. In there was bcmwlhigh5.inf.

3) I installed the driver via ndisgtk (sudo ndisgtk). I think I had to modprobe ndiswrapper but I can't tell if that helped. At any rate, I saw a blue light blink on the device which promptly went out.

Using iwconfig however showed that the device was detected. Through the network manager  I typed in the security code of my network and I got in.


How to scale up the UI of Spotify for 4K displays

There is a fairly stable workaround for this. This is discussed in the Spotify forum.
To scale the UI you can set a different scale factor at the application launch. So you want to edit the .desktop file Ubuntu uses to launch spotify to adopt a custom scale factor. As you've installed it from the snap store it will likely be located at /var/lib/snapd/desktop/applications/spotify_spotify.desktop. If not you can use find like this: sudo find / -type f -iname spotify.desktop.
Then you just have to edit the Exec directive of this file to include the --force-device-scale-factor=X option, where X is the scale factor multiplier:
Here I use vim for editing the file but nano or gedit can be used as well.
sudo vim /var/lib/snapd/desktop/applications/spotify_spotify.desktop

And then you change the Exec directive to include the option:
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify --force-device-scale-factor=2.5 %U

You save the file, close Spotify, and open it again: it should be scaled properly now.


According to this page you can set the users' login shell to /sbin/nologin and they will still be able to use port forwarding and other, non-shell authentication.

You may need to tweak your server configuration, see the linked page for more details.


HP Color LaserJet MFP M277dw: previews and prints in colour instead of grayscale

This is actually a workaround. If I add the existing printer HP Color LaserJet MFP M277dw once again as a new device and then claim that it is a Color LaserJet MFP M476, I obtain an interface enabling duplex printing and with a responsive colour/greyscale toggle. Not so for (some) other drivers of the same family, inclusive the very M277 as seen.

Also, it was interesting to observe that the driver for MFP 577 is still being recommended for a MFP M277 gadget. So one would be induced to oversee the driver for M277 that does exist, however glitchy, down the list.

In order to add a new printer (Ubuntu 14.04), go to System Settings -> Hardware/Printers and click on the Add button at the top left of the menu bar.

In my case the printer was already on and connected via the USB port. It might take a little time before the system scan the devices connected. Then the printer got recognized with its own true name. The rest is intuitive. The point of choice is a few steps later when you select the driver that actually works via the model name.


You can press F11, or you can use HUD (only on 12.04+): press Alt and type cheese.

You will see the menu of Cheese. Type full then click on Cheese > Full screen.


Why do I get an "Operation not permitted" error when running duplicity as sudo?

I receive this error because duplicity cannot chown the restored home folder /media/liamzebedee/X/home to its original owner root. When restoring to / this works.


Is it possible to open a pdf that requires Adobe Reader 8 without using acroread?

We can't get to the pdf in question directly and the page that offers it does not offer a direct link. That makes this question inconvenient for discussion.

The document in question is an Adobe LiveCycle Designer file, which in my opinion should not be labeled as a "PDF" file because it does not comply with the open standards for a PDF file. It is an XFA form document.

See here about the fact that XFA is not part of the open PDF standard, it is a proprietary Adobe hack that is now deprecated by ISO TC 171: https://en.wikipedia.org/wiki/Portable_Document_Format

My instinct is to tell Adobe to jump in the ocean and forget about their stupid format, but if you are determined, it appears the best options are to run Adobe Reader DC inside Wine (or similar)

https://unix.stackexchange.com/questions/265845/pdf-reader-that-supports-xfa-forms-while-adobe-reader-is-not-supported-in-recen

Or Use Adobe DC to convert that LiveCycle Designer file to a PDF:

https://uknowit.uwgb.edu/page.php?id=63187

However, this seems like a bad idea to me because we are forced back into a closed technology that Adobe owns and only Adobe can open.  It is not a legitimate PDF, if PDF is still supposed to mean "portable document format". Which this LiveDesigner file is not.


The path I used to put the extensions in is that:
~/snap/vlc/1049/.local/share/vlc/lua/extensions.

After that, to open the extension, you have two ways:

Open VLC ---> View ---> The extension name.
If VLC was already opened when you added the extension, then from Tools ---> Plugins and extensions ---> "Active Extensions" tab ---> Reload extensions. After clicking it, you should see the extension name added in that blank square above "Reload extensions" button. Now, you can open the extension like in the first method.


Yes, launch another shell:

alias foo="sh -c 'cd /dir; ./exec &'"

Or use a subshell:

alias foo="(cd /dir; ./exec &)"


Bring all windows of the same application to front on focus in Unity

Unity worked like this in its very first version! However, this quickly changed to the current behaviour, where only the last active window is being raised on clicking the icon in the dock. Unfortunately, this appears to be hard coded and there is no setting to change that.

Gnome Shell, which is now the default desktop environment of Ubuntu, may suit you better in that respect.

Pure Gnome Shell works exactly like that. Alt+tab brings all windows to the foreground. Clicking the icon in the dash, which in gnome shell is only visible from the overview, also raises all windows.
Current Ubuntu versions now use Gnome Shell as the desktop environment. Accordingly, Alt+tab now works like you describe: it brings all window of the application to the foreground. Unfortunately, the Ubuntu dock does not work like that, nor can it be configured as such.
An alternative options to have your dock icons permanently visible is to install the gnome extension Dash to Panel, which can be configured to raise all windows. However, this tends to look a lot like Windows...
Yet another option to have a permanent dock that works like you are looking for is to add an external dock. Plank is a lightweight dock that out of the box acts like you prefer: it raises all windows of the application.


Is The Nvidia Geforce 7300 LE Blacklisted?

I am running a GeForce 7300 too. Just select nvidia-173 drivers, not nvidia-current, and add UNITY_FORCE_START=1 in /etc/environment.
It works.


How to fix 'Kernel driver not accessible' in VirtualBox?

I had virtualization for CPU enabled in BIOS, however I disabled it, tried running the machine and it worked for a while then closed itself saying that I need to enable virtualization. I did that and, I have absolutely no idea why, it works great now! No errors, everything works fine. So I guess the solution is as follows: disable virtualization, try to run it, enable virtualization and then it all works.


Switched from nVidia to Radeon GPU. Now my screen is all garbled. How do I install the driver?

Instead of fighting with the ATI proprietary drivers (could never get them installed and working correctly), open the Ubuntu Software Center and search for "x.org ati". Works a charm for Radeon boards.


A 32-bit process won't use more that 4GB of memory, real or virtual.

Using PAE[*] allows the OS to use more than 4GB of RAM, but each process is still restricted to 4GB of virtual space.

If you want to use more RAM than this in the process you have to use a 64-bit CPU, a 64-bit OS and 64-bit apps (ie, Python interpreter).

If you want to stick to a 32-bit OS, then see if you can split your python process into several processes that each use under 4GB of RAM.

[*] IIRC all late 32-bit Ubuntu kernels include PAE support.


Program/Wrapper (how do you call it) to automate a certain script

You could use cron to schedule the call of your script, but cron can only run a script every minute. It can't go faster than this, so it is probably not fast enough for your use.

It sounds like a really bad idea to run every few milliseconds, but if that's what you really want you can run the script below in the background:

while true; do
    /path/to/your/script.sh
    sleep 0.01
done


Does KuaiPan Cloud Service provide encryption and how does it manage privacy?

Kuaipan communicates with the servers hosted at http://kuaipan.cn.

While Ubuntu's servers, hosted at http://one.ubuntu.com use 256-bit encryption, Kuaipan uses an unguarded internet connection. Using Kuaipan would be heck as scary for people who upload their personal data to the cloud.

While the promise of 1 TB does look alluring, do note that Kuaipan is hosted in mainland China, not Hong Kong. China's national internet censoring system, often dubbed as the Great Firewall of China, will have access to your data. Hong Kong and Macau, being SARs or Special Administrative Regions fall out of the censoring policy.

I'd suggest you use something like a VPN to hide your IP from Kuaipan, and not use that 1-2 TB to store sensitive data. Avoid making it your primary cloud service, and specially restrict it's access to your PC as long as their security encryption stays like this.

P.S. Just because Ubuntu Kylin is bundled with Kuaipan does not mean that Canonical endorses it. You are left to use Kuaipan at your own risk.

About encryption: A screenshot from Safari for iOS. The padlock with the omnibox displays that encryption is available.

Ubuntu One:

Kuaipan:

You can try this with any good browser and yet you'll fail to find any encryption on Kuaipan. Even if there is, it uses a certificate which is not verified by a global authority like VeriSign, Thawte, Entrust etc.


Bluetooth Low Energy on Ubuntu virtualized through VMWare Fusion Pro on Mac

In case anyone else is facing this, VMWare contacted me and said that they don't support BLE in Linux guests with a Mac host. If you have a Mac host, you can install the Bootcamp drivers and run Windows, but Linux users are out of luck.


How can I downgrade from python 3.6 to 2.7

You can have different environments with different versions of python: https://conda.io/docs/using/envs.html

You should do something similar to:

conda create --name NAME python=2.7

NAME is the name of the environment and 2.7 i the version. Then you can change between the environments.


How do I fix my Intel Graphics Update Tool?

The Intel® Graphics Update Tool adds the Intel's PPA. As mentioned here, in order to "trust" the Intel® Graphics Update Tool for Linux OS, you will need to add keys to Ubuntu's software package manager ("apt"). Ideally this should be done before running for the first time or upgrading from an earlier release. But can be done now and should work for the purpose if there are no other issues with your software sources.

In terminal please run the following commands:

wget --no-check-certificate https://download.01.org/gfx/RPM-GPG-KEY-ilg-4 -O - | \
sudo apt-key add -

Then the app itself is no longer needed. Do a full update and the new versions, if any, will be downloaded and installed:

sudo apt update
sudo apt full-upgrade


Synaptics is not installed or not in use

I think your laptop may have a FocalTech touchpad. This happens to me as well as I have an Asus UX303LN.

The reason is that current Linux kernel does not support FocalTech touchpad. You can see more detail here.

Currently, I'm using a patched kernel, which resolve this problem. But hoping the official kernel will be released soon.


FireFox in14.04 on a 32 bit mechine? It will not run any videos.

You need to install Flash player from the rpm fusion repository to play videos in your browser.

To get Flash up and running, open a new Terminal window (press Ctrl + Alt + T) and copy paste the following lines :

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

This will install pepper flash(google chrome's flash player) to firefox.

If Firefox was running when you installed it, you will have to restart Firefox for changes to take place.

If that doesn't work, copy paste the following :

sudo apt-get install ubuntu-restricted-extras
sudo apt-get update

Installing this package will pull in support for MP3 playback and decoding, support for various other audio formats (GStreamer plugins), Microsoft fonts, Flash plugin, LAME (to create compressed audio files), and DVD playback.


vlc crashes on startup: Qt: Session management error: Could not open network socket

I have the same problem with another program, and could not find an answer.
If somebody have the same problem:
for me it was a restriction by the router: ubuntu was connected to a FritzBox as guest - the FritzBox seems to block this connection.
As soon as I changed to a normal connection, the problem was solved!


Update to 16.10 (do-release-upgrade) fails due to not enough free disk space

Update after OPs comment

If moving /var/cache/apt to home doesn't help, check that your home partition has enough space. You can also try removing the extra icon themes you installed. A few icon themes can easily eat upto 1GB+ space these days.

Another option is removing older kernels you're not using. Use this question as a help How do I remove old kernel versions to clean up the boot menu?

/etc/apt is not too big a folder to gain you significant improvement on the disk size. On the other hand, You can try moving the /var/cache/apt folder instead to your home and symlinking it, because that one is used to download all those .deb files.

Using your same commands before, you can do this

sudo mv /var/cache/apt ~/.
sudo ln -s ~/apt /var/cache/apt

Of course, You need to remove the folder /var/cache/apt first after mv-ing.


Is it possible to simultaneously use TortoiseHG (for Mercurial) and RabbitVCS (for Git) in Caja with Cyrillic file-names?

We need to patch RabbitVCS files to remove all mentions of Mercurial.
For anyone interested there is a special PPA with patched packages.
To install them on Ubuntu 16.04 LTS or Ubuntu 18.04 LTS use:
sudo add-apt-repository ppa:nrbrtx/rabbitvcs-nohg
sudo apt-get update
sudo apt-get install rabbitvcs-core=0.16-1nohg~ppa1 rabbitvcs-cli=0.16-1nohg~ppa1

With these packages the error emblems will be removed:

and we can use both tools for repositories -

RabbitVCS menus for Git (and really for SVN with Bazaar);
TortoiseHG for Mercurial (even with Cyrillic names).

If you do not want to use patched packages anymore then remove them with:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:nrbrtx/rabbitvcs-nohg

Notes:

really it is a bug 1840082 in RabbitVCS Mercurial back-end. As the result the error emblems were shown and special log-file grows very fast.
this method was also tested on Ubuntu MATE 18.04 LTS - it works here too, but packages are not yet ready.


Free Photo editor software availablity in ubuntu

it depends on what you want to do; I mean you can use Shotwell Viewer that allows you to do a minimal set of modifications and comes with Ubuntu, or - if you need something more professional - you can install Gimp.


How to install Okular 20.12.0 on ubuntu 20.10?

You can install the latest okular version using flatpak. If you don't have installed flatpak, you can do so running the following commands:
sudo add-apt-repository ppa:alexlarsson/flatpak
sudo apt update
sudo apt install flatpak

Then to enable installing from flathub, run:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Now you can install okular (the latest version):
flatpak install flathub org.kde.okular

Enjoy it!


How to wipe /data on nexus 4 to install ubuntu-touch

You have several methods at your disposal to wipe your /data partition:

Through Android

Boot into Android normally.
Go into Settings > Backup & reset > Factory data reset
This will perform a Factory Reset which basically wipes /data and cache partitions, but keeps /system in tact.

Through Fastboot

Boot your device into bootloader mode: power-down your device, and reboot into the bootloader by holding the power button and the volume down button together for several seconds.
You can also reboot into bootloader mode via adb by executing the
following command (while your device is booted into Android, with USB Debugging turned on):

adb reboot-bootloader
Once you're in the bootloader, run the following fastboot command:

fastboot erase data

Through Recovery

Boot your device into bootloader mode (follow instructions above).
Once you're in the bootloader, use the volume buttons to select Recovery, and press the power button to reboot into recovery.
You can also reboot into recovery mode via adb by executing the
following command (while your device is booted into Android, with USB Debugging turned on):

adb reboot recovery
If you have the stock <3e> recovery or ClockworkMod, select wipe data/factory reset option. Use the volume buttons to navigate to it, and the power button to select it and start the wipe.
If you have TWRP, tap on Wipe, and select Factory Reset.

Good luck!


How to install gitolite3 on ubuntu server LTS 14

I got the solution to the problem. It seemed that git could not find the private keys to login, so I created ~/.ssh/config containing:

Host gitbox
    User git
    Hostname 192.168.0.103
    Port 22
    IdentityFile ~/.ssh/gitolite

Of course you need to change the credentials. Then gitbox is used for loggin in credentials.

 git clone gitbox:gitolite-admin

The problem is solved. Also please keep in mind for each new user, a new entry in this file will be created to link the key files.


How do I add libio to my session's PATH?

I kinda of agree adding /usr/lib to your path is kinda of weird but the correct way to do it would be from the terminal run export PATH=/usr/lib/:$PATH however that will only be good until you logout to make it persistent add that same line to your .bashrc file.  The first time you add it to your .bashrc you will have to logout and back in to make it take effect or source your file with the following command source .bashrc


Recover some data files after OS installation crash

The easiest way for you to recover the files would be to open a terminal (Ctrl+Alt+T) and running the command:

sudo nautilus

Now keep the terminal window open (otherwise the file browser will close) and you can access any area of the disk with that file window.

You can also likely recover your system by booting it into Recovery Mode by holding Shift during the initial boot of the PC to get the menu. You will be given multiple options like checking/repairing disk or fixing broken packages.


Possibility of recovering files from a dd zero-filled hard disk

As you can read here, it is impossible to recover data after you "zero filled" it.

There can be a chance of 56% to recover a single bit correctly, but since you had to recover 8bit to get only one byte, it is very unlikely to recover any data.


chmod just applies a different permission mask to a file. In this case, it just marks something as executable (assuming you have write permissions on it and it's a filesystem that supports exec).

It doesn't do anything other than that. If you want to execute it, you'd then run:

./expand_lapw


Special symbols are not displayed on TTY

I just copied the characters from your example and echoed them in a terminal window:

I guess TTYs do not have that much character support, so it could be a font issue.


To compile and use ClipGrab you need to do the following:

cd ~/Downloads
wget https://download.clipgrab.org/clipgrab-3.8.0.tar.gz
tar -xf clipgrab-3.8.0.tar.gz
cd clipgrab-3.8.0

then get all needed dependencies:

sudo apt-get install qt5-qmake qt5-default qtbase5-dev qtwebengine5-dev

then compile it

qmake clipgrab.pro && make

and use it

./clipgrab

Another option is to get ClipGrab from its PPA for 14.04 LTS, 16.04 LTS and 18.04 LTS:

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


Regular login-screen sometimes replaced by a nonfunctional white text on black login-screen

What I believe has happened is there is a singular missing file that supports the visual aspect of logging in. Your password not being accepted may have been a mistype, but there is certainly nothing wrong physically with your computer, otherwise it wouldn't even boot. Try installing a different display manager (like GDM) once you get logged in.

On a side note, the password issue of no moving cursor is normal. Those both happen on purpose in the terminal prompt and are for added security.


Convert a sequence of ppm images to avi video

You have several options available with the image file demuxer.

Using the sequence pattern

ffmpeg -framerate 25 -i "CS585Bats-FalseColor_frame%09d.ppm" output

You can change the start number with the -start_number input option.

Using the glob pattern

ffmpeg -pattern_type glob -framerate 25 -i "CS585Bats-FalseColor_frame*.ppm" output

If these are the only PPM files in the directory your glob pattern can be simpler:

ffmpeg -pattern_type glob -framerate 25 -i "*.ppm" output


First make sure you have paprefs and pavucontrol installed.

In paprefs, go to the Simultaneous Output tab and check the box here.  This will allow both you and Skype to hear the computer sounds.

Go into pavucontrol when connected to skype.  Go to the playback tab.  Play the sound you want to play, and the application will appear here.  Change its playback setting to the simultaneous output.

Go to the recording tab and when you want to send a sound effect, change it to record from the Monitor of an audio device that Skype is NOT currently playing to (and not Simultaneous).  If you have no other devices, you can create a virtual one with modprobe snd-dummy

You will have to switch the skype input back to mic to talk and there isn't a direct way to record from both the mic and the snd-dummy.  However you could run another application that would take your mic and output that to the snd-dummy channel like sox -d -d echo 0.8 0.88 1 0.4 which you could even use to change the pitch of your voice.

Make sure skype is not sending its output to Simultaneous or the channel you are recording from or it will generate feedback.  This can be troublesome if you are using a browser to do both generate sounds and record sounds.  In that case I usually have to open 2 different browsers to get the sound to not echo.


Output from 'ls' differs when in root mode

The sudo -i command gives you a shell as root, and you will be in the root user's home directory, not your own. As root is not generally a user you should use normally, only very few files will exist in the home directory for that user, particularly the skeleton directory structure for any new user.


Let me order two of your points:

In order to send a file by mail the mail client needs to be able to read the file.
But the file may not be viewed or accessed directly [except by the mail client?]

These two points conflict. Either you maker the file accessable and or you run the mail client with different rights. Note: You can do that from the same user account. The rights just need to be granted to the program reading that file, preferable in such a way that the original user account cannot also grant those rights to herself.

(E.g., you could create a group 'games; and make the file or the folder it is stored in only readable(r,x) by the group games. (Think of nethack and similar setups where the user cannot change or read the shared score files on their own. Note that you will need to change the file to something like  user:games and rwx to ---xxx---. Lastly you can combine this with set group ID on excution for the program which needs to be able to read the file).


brightness can not be controlled in sony vaio laptop

1.Open file sudo gedit /etc/default/grub
2.There will be something like: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash".
Change it to
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"

3.Save file
4.Run command
sudo update-grub

5.Reboot


It's a bug in gparted (to be precise, the wrapper around it, gparted-pkexec). If you run gparted-pkexec in the terminal, you'll see something like:

No protocol specified
No protocol specified

(gpartedbin:19659): Gtk-WARNING **: cannot open display: :0

Replace the contents of to use kdesudo instead of pkexec to work around this issue:

sudo tee /usr/bin/gparted-pkexec <<'EOF'
#!/bin/sh
kdesudo "/usr/sbin/gparted" "$@"
EOF

Update: this is a bug in PolicyKit combined with a condition in KDE ($XAUTHORITY is not set).


Conky moving back and forth, seemingly randomly

You would probably get better answers in Ubuntu Forums, Cafe, Conky sub section but I would start by commenting out line:

#override_utf8_locale yes

If that doesn't work I would change:

draw_shades yes
default_shade_color 000000

Lastly I would change:

minimum_size 200
maximum_width 400

If the last change fixes it but the size is wrong, tweak the values.

Other than that I can't see much difference between your broken Conky and my own Conky configuration which works fine (Ubuntu 14.04 and 16.04).

I did copy your TEXT section into my own and it paints okay without "moving back and forth". You wouldn't want my whole configuration though because it's ugly code of various experiments.


Permissions denied to owner, although it is set to 666 in .ssh directory

Steeldriver is right. On directory you need also x access flag to be able to list files inside.

Fixing the directory using chmod 700 ~/.ssh should help you to get into this (correct) state:

$ ls -ld ~/.ssh
drwx------. 2 user user 4096 Aug 26 10:37 /home/user/.ssh

Also you should fix your keys using chmod 600 ~/.ssh/id_rsa and chmod 644 ~/.ssh/*.pub to get this:

$ ls -l ~/.ssh/
-rw-------. 1 user user  1766 Mar  7  2014 id_rsa
-rw-r--r--. 1 user user   415 Mar  7  2014 id_rsa.pub


How can I rewrite lines in a txt file using grep [sed]?

grep is not suitable for such a task, because it is a search tool, but if I understand correctly the problem, you can use sed, as in the following example:

sed 's/^\([0-9]\+\) \(.*\)$/\1;\2;/' input-file >output-file

To preventively check that all lines conform to the above pattern, run the following command

sed -n '/^\([0-9]\+\) \(.*\)$/!p' input-file

that should return nothing.


While there are a number of methods for this (search "p2v" for some ideas), here is the way I use:

What you'll need

External Hard Disk
Bootable Clonezilla
CD
Enough disk space to contain the entire old OS (something like df -h | grep '^/dev/' should give you a general idea of how much space this is)

Steps

Boot from the Clonezilla CD
Save the current disk Here's a good walkthrough
Install the new OS on your computer
Install VirtualBox
Download a Clonezilla ISO
Create a new VM in VirtualBox with a similar configuration to your physical computer
Attach the Clonezilla ISO to the VM and boot from it.
Restore the image you took earlier to the VM


Need help recovering/saving a drive with bad sectors

Run the following in Ubuntu's terminal:

sudo mount /dev/sdxx /mnt
cd /mnt
for i in `find . -name *`
do
    if [[ -r $i ]]
    then
        echo "$i is ok!"
        cp -f "$i" "/path/to/different/disk/that/is/uncorrupted/"
    else
        echo "$i is not ok."

If it does say $i is not ok, you have no chance of recovering that folder.


Job for apache2.service failed because the control process exited with error code.

Here is the answer: https://askubuntu.com/a/1022319/850782

cd /etc/apache2
apache2ctl configtest

probably has some typo in some config file that you have created:

vi /etc/apache2/sites-enabled/yoursite.conf


Do you have a shell set for the gsa user?

You should not need to have the AllowedUsers line in there, by default anyone allowed to login should be able to ssh  in as well (well, aside from root).

On the ssh server what does 'getent passwd gsa' return?


Windows doesn't boot after installing Ubuntu. Returns to Grub menu

You installed grub2's boot loader to the PBR or partition boot sector of Windows. Windows has to have its boot code in its NTFS partition.

Fix for most, a few have other issues, better than windows fix in many cases as it also fixes other parameters:

This has instructions on using testdisk to repair the install of grub to the boot sector for windows from Ubuntu or Linux LiveCD.

[HowTo] Repair the bootsector of a Windows partition  - YannBuntu

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

You want to get to this screen:

http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step#NTFS_Boot_sector_recovery

http://ubuntuforums.org/showthread.php?t=1926510


Trackpad on Thinkpad W540 not working properly

Someone on github posted a clickpad configuration that works pretty well for the w540 model of Thinkpad.  I am using the configuration that was suggested here and am pretty happy with it.

I found the touchpad is too sensitive while typing.  So I also configured Ubuntu version 14.04 in the following way.  Go to:  System Settings -> Mouse & Touchpad with the following settings.  Touchpad Disable while typing is unchecked.

I created a Startup Application to disable the trackpad with different settings and it runs each time I start Ubuntu.

syndaemon -d -i 2 -K -R

The flags are: start as daemon, with idle time 2 seconds, ignore modifier keys, use XRecord.

Hope that helps.  If you find other settings for the configuration file or daemon please post them here.


The solution is to write export "PATH=/HOME/your_user/miniconda3/bin:$PATH" directly in the terminal.
The only problem is that we will have to export miniconda every time we enter the system, but it works normally.


Ubuntu 16.04 won't install on VirtualBox (14.04 works fine)

Switching video consoles solves the problem. When you see the graphics screen that you illustrate, hit:

control-alt-f1 followed by control-alt-f7

I've also seen one person using:

rightctrl-f1 followed by rightctrl-f7

update: since the user has changed the default Virtualbox hot key from rightctrl to leftcommand, this particular user would have to type leftcommand-f1 followed by leftcommand-f7.

Let us know which one works for you. Cheers, Al


Can I remove Compiz and still run Gnome desktop?

Compiz is a compositing window manager for the X Window System, using 3D graphics hardware to create fast compositing desktop effects for window management.

It's not crucial to have for Ubuntu to run if you plan on using gnome-classic.


How to prevent gnome-sound applet from automatically reducing mic volume?

This is a Skype "feature", you can disable it in the sound devices tab in the Skype settings panel.


How to uninstall ubuntu so that I've got an empty hard drive

Install linux (say ubuntu, linux mint etc that you like) on a pen drive, plug it into your pc, then turn on the pc. Boot into the linux on your pen drive (the steps vary from pc to pc, so google the steps for your pc). Once in, open gparted (or install it if it is not preinstalled and then open it), choose the ubuntu partition, mark it for deletion, and create a new partition (most probably ntfs partition for windows, please check it), and hit ok. That should give you the empty hard drive and do the trick.


I'm not sure whether this package can be controlled via a Python script, but "Blink" by Ag-Projects does at least use Python. Blink {checked to work with both 16.04 and 18.04} handles multiple SIP accounts, also those requiring a lot of configuration, and can be configured more than Linphone. To install it requires some typing. Links and docs at their site http://ag-projects.com/


You can try something like this:

gst-launch ximagesrc use-damage=0 ! video/x-raw-rgb,framerate=15/1 ! ffmpegcolorspace ! x264enc ! matroskamux ! filesink location="test.mkv"

Perhaps just the use-damage=0 parameter to ximagesrc will help.


Why are youtube videos playing without sound?

solved:
https://ubuntuforums.org/showthread.php?t=2369453

(sound profiles - pulseaudio volume control)
'configuration' tab,
turn profile hdmi 'off'
built in audio:
profile
analog stereo output
finally restart machine


It is an error with the hashsum. apt-get is geting a list with all hashes. If the hash in the list differs from the hash of the downloaded file, it won't be installed. That is very clever behavior.
Most common for this issue are broken proxys or internet related filter.

If it was just a hickup, try sudo apt-get clean, which will clear /var/lib/apt/lists/* and than try sudo apt-get update, again.
If this won't work, check your connection, if there is any device or service that is messing up with your connection.


First remove the old driver and bumblebee

sudo apt-get purge nvidia* bumblebee*

Now add this PPA and install the driver

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-352

Now reinstall bumblebee

sudo apt-get install bumblebee bumblebee-nvidia

Now just reboot

sudo reboot

This will ensure you have the latest driver and bumblebee installed.


What is the difference between the driver that comes with Ubuntu and Intel open source graphics driver?

what is the difference between the driver that comes with ubuntu and intel open source graphics driver ?

They are the same driver.  The benefit of the one included in Ubuntu is that it will have had an additional period of testing by Ubuntu and its users and will remain stable for the life of that Ubuntu release.  The benefit of obtaining it from Intel directly is that it will be a more recent version.

  installing intel driver will improve performance and reduce battery consumption considerably ?

Unlikely.  It's basically the same driver, the only differences will be as stated above; if it's a more recent version, then battery consumption may have improved, but there's also a small chance that it's worsened or that you may notice other issues.  There's no reason to install the driver from Intel unless dealing with specific problems it may solve.


How can I get a more recent Firefox in Ubuntu PowerPC?

Official Ubuntu packages

According to the Ubuntu package website, powerpc builds for the firefox package provide the following versions:

Ubuntu 12.04 provides Firefox 39.0.3
Ubuntu 14.04 provides Firefox 47.0
Ubuntu 16.04 provides Firefox 47.0

If you want to use the official Ubuntu packages, switch to 14.04 or 16.04 to get 47.0.


How to make Dash more friendly with commands

The difference is:

ALT+F2 DASH - Shows all commands including terminal ones and does not try to guess the command.

SUPER DASH - Shows only GUI programs and tries to guess what program you want to run depending of the amount you use them.

Got to this answer after testing for almost 2 days.


How do I increase the number of lines shown on the Ubuntu terminal window?

Click Edit→Profiles→Scrolling. Then increase the value under limit scrollback to: or untick it to allow scrolling through unlimited lines.

From comment by Kevin: Be careful with unchecking that option. If a program goes crazy and spews lots of data onto your terminal, you could have memory issues.


Telnet to port 22 of your VPS. If sshd is accepting connections, you should see something similar to the following:

$ telnet your.vps.foo 22
Trying 203.0.113.25...
Connected to your.vps.foo.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.0p1

Protocol mismatch.
Connection closed by foreign host.

If you aren't getting that response from the vps, you may have a firewall blocking the port, or a configuration problem in /etc/ssh/sshd_config.

man sshd_config explains how that file file works


How can I contribute to the LibreOffice dictionary?

Libreoffice is not developed by the Ubuntu development community. This is the place to go if you wish to get involved in the development of Libreoffice:

Get involved in Libreoffice

Also Libreoffice uses Hunspell as the spell-checker. You need to research how Hunspell creates dictionaries.

Regards.


Ubuntu not using full resolution of LCD after switching to Unity from Ubuntu Classic

Ah! I solved the problem by installing the latest driver by ATI/AMD.


Suspend from the command line and show Unity's lock screen in 14.04?

Since I figured out how to get the 14.04 lock screen, I just chained the dbus lock command with the suspend one:

sh -c "dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock && dbus-send --system --print-reply --dest=org.freedesktop.UPower /org/freedesktop/UPower org.freedesktop.UPower.Suspend"


Running a snap installed side-by-side/parallel to a Debian package?

The following command to start the snap version of vlc is easier to remember. Open the terminal and type:

snap run vlc

snap run <snap-package> also works with all snap packages generally.


How do I list word count in multiple files?

The syntax is wc -w [FILE]. If you don't use FILE but pipe in the output of ls work it will only count what it will read on stdin.

You need to pipe in the text itself:

cat *work* | wc -w

Alternative you could execute wc with find -exec. But be aware that this could show multiple "total" sums as find will call wc multiple times if there are lots of files.

find ./ -type f -name "*work*" -exec wc -w {} +


How does Command substitution, dig and +short work within this script?

So we take this line from the script:

ping -c 4 $(dig +short "$address" | head -1)

The shell will break it up for white space, substitute the variable and then see that it needs to run the command inside the $() first.  So it has to run this first:

dig +short "$address" | head -1

The double quotes around $address aren't strictly necessary, but they're a good habit to get into in case your data ends up with spaces in it the shell won't split it up for you.

So if I do this with $address="yahoo.com"....

$ dig +short yahoo.com | head -1
72.30.35.10

With the 72.30.35.10 as the output of the pipeline inside of the command substitution the line from the top becomes

ping -c 4 72.30.35.10

which pings the IP only 4 times before quitting as you've experienced when trying it.  Otherwise ping would run until you hit ctrl-c.


Use convert program (it is an executable installed as part of Imagemagick suite of tools):

convert "*.{png,jpeg}" -quality 100 outfile.pdf

In general case you can combine more files into one pdf file with including them inside {} and separate them with a single comma.

adding -quality VALUE to keep quality after conversion.

convert "*.{ext1,ext2,ext3,...}" -quality 100 outfile.pdf


VirtualBox 4.3 on Ubuntu 13.10 breaks Unity and Terminal

For me the root cause of this issue was installing VirtualBox Linux 13.04 i386 though I have Intel 64 bit setup. AfterI reinstalled Unity and then reinstalled with VirtualBox AMD64 it all worked.


I tried manually downloading openjdk-7-jre-headless_7u21-2.3.9-0ubuntu0.12.04.1_amd64.deb from http://us.archive.ubuntu.com/ubuntu/pool/universe/o/openjdk-7/ and the file (which is ~34MB) downloaded successfully. This was less than an hour after you asked your question. Try running:

sudo apt-get install openjdk-7-jre-headless


To show hidden files with nautilus press CTRL + H
To list all files in a Terminal type

ls -a


I managed to work around the issue my specifically ignoring server certificate verification for now in APT. By adding some custom configuration in /etc/apt/apt.conf.d.

In case of Gitlab:
Acquire::https::packages.gitlab.com::Verify-Peer "false";

For the Git issues I used the GIT_SSL_NO_VERIFY environment variable whenever accessing the repository.

It's not a solution per se, but this way I can at least keep using the repo's. :-)


increase the size of linux LVM disk partiton

You created a new partition, which is not what you want to do.. and you accepted fdisk's default start position, which is in the small space between sda1 and sda2.  You don't want a new partition at all; you want to resize the existing sda5.  You can do this using gparted.


Extend root partition (and optionally move), after getting rid of windows

The easiest way is to boot from LiveCD and use gparted.

Move sda3 left.
Extend sda4 left.
Move sda5 left.
Extend sda6 left.
Run in terminal

sudo mount /dev/sda6 /mnt
sudo chroot /mnt
sudo grub-install /dev/sda
exit

This way you will keep the NTFS partition sda3. But it is not recommended to keep NTFS partitions when you do not have Windows installed.

It is much better to backup all data from it and then remove it instead of moving.


If you're using a VGA connector,

the signal from the computer doesn't contain explicit information about the screen resolution, so the LCD monitor must make an educated guess about how to align the picture.

Some monitors don't do this step automatically, since it could be distracting if the alignment was changed unnecessarily. Check for a menu item or a physical button labeled to the effect of "Auto Adjust", which should force the monitor to align the current signal.


Why can't I install 10.04 on a system that already has 8.04?

Since the drive was part of a raid configuration at some time, you need to remove the RAID meta-data from the drive. I had to do this with a used drive I purchased. The procedure I followed erases the data on the drive. However, it does work. The raid meta-data should be towards the end of the drive space. This command erases the last 10GB of the drive when run as root, but you should back up your drive to preserve the data you do not want to lose:

Please replace /dev/??? with the correct drive, such as /dev/sda

sudo dd if=/dev/zero bs=1M seek=150000 skip=150000 of=/dev/???


How to create indented lists in libreoffice?

If Lorem is the present line, hit enter after that. Type ipsum, select the line and select bullets to be on. Now press TAB and see the magic of List getting indented and going into the sub level. Something like this.

Lorem

ipsum
dolor
sit

Use SHIFT+TAB to come back to the previous list level.


Remove First n Lines of a Large Text File

If you want to just view the lines from the 43rd on you can use

tail -n +43 dump.sql

The + sign is important - without it, tail will print the last 43 lines instead. Alternatively with 'sed'

sed 1,42d dump.sql

If you want to really delete the first 42 lines from the original file then you can make sed make the change inplace with the -i option

sed -i 1,42d dump.sql


This seems to be a bug with the kernel 4.13.0-26-generic. See the bug report here:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1743094?comments=all

The solution is to downgrade the kernel to 4.10.0-42-generic, but keep in mind that you'll lose the patch for Meltdown and some Spectre mitigations. The mainline kernels also fix the problem.


Ubuntu 13:10 - Downgrade php 5.5.3 to 5.4

My versions were a little different, but I have searched high and low for a method that wouldn't uninstall half my system (with laborious custom configurations) just because PHP auto-upgraded from 5.4.28 to 5.4.29, which broke Symfony projects for all our developers and QA.

Essentially, this happened overnight:

+ apt-get -y --force-yes -o Dpkg::Options::=--force-confdef upgrade
Reading package lists...
Building dependency tree...
Reading state information...
The following packages have been kept back:
  libspice-server1
The following packages will be upgraded:
  libapache2-mod-php5 php-pear php5 php5-cli php5-common php5-curl php5-gd
  php5-intl php5-ldap php5-mcrypt php5-mysql php5-readline
12 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 6,221 kB of archives.
After this operation, 9,216 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main libapache2-mod-php5 amd64 5.4.29-2+deb.sury.org~precise+1 [2,678
kB]

etc.

Notice that NO other packages got upgraded/changed. (So why when backstepping, would they need to be removed later?? Wrong.)

After giving up on all the conventional "proper" methods to keep stable dependencies,

Finally, I ran

aptitude versions php5

to see what was available.

Many packages appeared, but the one that seemed most core was php5-common:

Package php5-common:i386:
p   5.3.10-1ubuntu3                                                            precise                                                 500
p   5.3.10-1ubuntu3.11                                                         precise-security,precise-updates                        500
p   5.4.28-1~ppa1~precise                                                      precise                                                 500
p   5.4.29-2+deb.sury.org~precise+1                                            precise                                                 500

5.4.29-2+deb.sury.org~precise+1  was the new update this morning causing trouble:

5.4.28-1~ppa1~precise  is apparently what we need to downgrade to.
However, apt-get and synaptic insist on REMOVING many innocent and seemingly unrelated packages we NEED to keep in place untouched, that were NOT upgraded today, and do depend on SOME version of PHP, but not specifically 5.4.29-2+deb.sury.org~precise+1 suddenly.

No thanks!

aptitude install php5-common=5.4.28-1~ppa1~precise

run interactively at first gave me the same options. As I kept refusing, it kept offering more suggestions. Finally, around the 5th suggestion was this:

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

 Keep the following packages at their current version:

1)     php5-common [5.4.29-2+deb.sury.org~precise+1 (now, precise)]

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

  Remove the following packages:

1)      php5-readline

  Downgrade the following packages:

2)      libapache2-mod-php5 [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
3)      php-pear [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.12-1~ppa1~precise (precise)]
4)      php5-cli [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
5)      php5-curl [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
6)      php5-gd [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
7)      php5-intl [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
8)      php5-ldap [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
9)      php5-mcrypt [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]
10)     php5-mysql [5.4.29-2+deb.sury.org~precise+1 (now, precise) -> 5.4.28-1~ppa1~precise (precise)]

  Leave the following dependencies unresolved:

11)     php5-cli recommends php5-readline

That seemed good enough!  I could see about php5-readline manually later.

Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
  libapache2-mod-php5 php-pear php5-cli php5-common php5-curl php5-gd php5-intl php5-ldap php5-mcrypt php5-mysql
The following packages will be REMOVED:
  libonig2{u} libqdbm14{u} php5-readline{a}
0 packages upgraded, 0 newly installed, 10 downgraded, 3 to remove and 2 not upgraded.
Need to get 8,277 kB of archives. After unpacking 1,818 kB will be used.
Do you want to continue? [Y/n/?] Y
[100%] Writing extended state information

Now check the php version:  (php5-cli gets invoked)

php -i |less

phpinfo()
PHP Version => 5.4.28-1~ppa1~precise

 apt-cache policy php5-cli
php5-cli:
  Installed: 5.4.28-1~ppa1~precise
  Candidate: 5.4.29-2+deb.sury.org~precise+1
  Version table:
     5.4.29-2+deb.sury.org~precise+1 0
        500 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main amd64 Packages
 *** 5.4.28-1~ppa1~precise 0
        500 http://ppa.launchpad.net/nathan-renniewaldock/ppa/ubuntu/ precise/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.10-1ubuntu3.11 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
     5.3.10-1ubuntu3 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

Great!


Yes, still broken on Ubuntu 14.04, as I mentioned in this other answer. You can see the Ubuntu bug 1290847.

See my Gist on GitHub for more details and more links.


fatal: does not appear to be a git repository

With SSH URLs, relative paths start from your home directory, and it doesn't understand shell shortcuts like ~. So do:

git remote add origin ssh://user@example.com/git/example.com

if you want to use absolute paths, like /home/mario/git/example.com, use an extra leading slash:

git remote add origin ssh://user@example.com//home/mario/git/example.com


configuring network interface in /etc/network/interfaces prevent other interfaces to work properly through network manager

Even without the cable connected, your computer will assign that static address to enp7s0. Check the output of route -n and you will probably find out the the traffic in the range 192.168.0.X is routed through the enp7s0 interface.

You can fix the routing or you can turn down the cable interface if you are not using it with:

sudo ifconfig enp7s0 down

I think that it should fix the problem.


How to share internet connection from USB Wireless Broadband using wifi?

To re-broadcasting your internet via wireless you should have a Wireless ethernet card that supports Master  Mode.

Suggest you check with Dell Support (you must do this for they will ask for your Product Code) to see if the wireless card included with your Dell supports Master Mode. Their chat is at http://www.dell.com/learn/campaigns/chat-splitter-us

This askubuntu question cover both wired and mobile broadband, but from comments it seems to be outdated. This describes how to configure mobile broadband (via a USB dongle or other ppp based) then re-broadcasting this via wireless or wired ethernet.