How can I check disk space used in a partition using the terminal in Ubuntu 12.04 LTS?

The su command is completely irrelevant. The disk usage is the same for all users. Anyway, some relevant commands and their output on my system are:

terdon@oregano ~ $ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda7              68G   23G   43G  35% /
udev                   10M     0   10M   0% /dev
tmpfs                 800M  1.6M  798M   1% /run
tmpfs                 5.0M     0  5.0M   0% /run/lock
tmpfs                 3.2G   12M  3.2G   1% /run/shm
/dev/sda6             290G  256G   20G  94% /home
tmpfs                 3.2G  992K  3.2G   1% /tmp
none                  4.0K     0  4.0K   0% /sys/fs/cgroup
/dev/sdc1             466G  379G   88G  82% /media/terdon/Iomega_HDD

For a specific partition:

terdon@oregano ~ $ df -h /dev/sda7
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7              68G   23G   43G  35% /

Alternatively, though this only lists the size, not the %used:

terdon@oregano ~ $ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0  39.2M  0 part
├─sda2   8:2    0  14.7G  0 part
├─sda3   8:3    0  78.1G  0 part
├─sda4   8:4    0     1K  0 part
├─sda5   8:5    0     2G  0 part
├─sda6   8:6    0 294.4G  0 part /home
├─sda7   8:7    0  68.7G  0 part /
└─sda8   8:8    0   7.8G  0 part [SWAP]
sdc      8:32   0 465.8G  0 disk
└─sdc1   8:33   0 465.8G  0 part /media/terdon/Iomega_HDD
sr0     11:0    1  1024M  0 rom

Conversely, you can use the du command to print directory size which will give you the disk usage of a partition if you run it on a partition's mountpoint: du -xsch /home for example. The -x option will "skip directories on different file systems," which is helpful if you have other mount points nested below the partition's mount point (typically /).


I have the same problem, but I've found a more-or-less working solution, I post it here so maybe someone could improve it.

It works with xsane, not with iscan.

What happens is that it takes a lot to start and the preview window shows up blank.

So:

I've added in the file /etc/sane.d/epkowa.conf the line

usb 0x04b8 0x0131

where the codes are taken from lsusb
(I know very little about udev rules) I've added a file /etc/udev/rules.d/80-epson.rules

ATTRS{idVendor}=="04b8",ATTRS{idProduct}=="0131",ENV{libsane_matched}="yes"

ENV{libsane_matched}=="yes",RUN+="/bin/setfacl -m g:scanner:rw $env{DEVNAME}"
my user is clearly in the group scanner.

And I launch xsane with a LIBRARY_PATH (modifying ld.so.conf.d messes up everything)

LD_LIBRARY_PATH=/usr/lib/sane xsane

So after some  time (200 secs) an xsane dialog windows pops up, I choose the third line (the one with the name of the scanner):

Finally xsane starts, sometimes with a uncomplete preview window (blank with no button or frame to set), but it works.

Hope it helps.


Where does `resolvconf` gets the IPs of DNS servers from?

Resolvconf generates /etc/resolv.conf using files in /etc/resolvconf/resolv.conf.d/ in the order: head, base, tail.  The head file is almost always present and contains just the warning message about generated files. The base file may also be present, but is empty by default. There might be a tail file, and this is likely the culprit in your case given that the rogue entry appears at the end.


Windows won't recognize formatted partition on Ubuntu (FAT32 and NTFS)

This is a Windows issue, not an Ubuntu one. Nevertheless the reason is simple: Windows cannot see past the first partition on USB drives.

Here's how to do it correctly:

backup the drive and erase it
create a first partition (it doesn't need to be "on the left" of the drive, it just needs to be the first you create)
format it as exFAT, NTFS or other convenient file system
add the other Linux-only partitions

In this way, you get an advantage: Windows won't see the Linux partitions at all. I did this on a live USB key that needed a Windows part and it worked perfectly.


You could use scp, the documentation for this can be found here, an example command might be

scp -r /home/user/helloworld.txt user@MACHINE.IP.ADDRESS:/home/user/

If you are using SCP outside of your home directory you may need to prefix the command with sudo to obtain proper permissions to transfer the file.

Hope this helps!

edit

You may be asked about

The authenticity of host '192.168.2.15 (192.168.2.15)' can't betablished.
ECDSA key fingerprint is ***some long number (fingerprint) ***. Are you sure you want to continue connecting (yes/no)?

Each host has a key pair and you should check the fingerprint when connecting to ensure you're not being MITMed. (Shout out @GNP - Thanks)


You have to check "Allow other users to control your desktop" in remote ubuntu, if by browsing directories, you mean being able to click on remote machine by using your mouse.

Otherwise, You'll have to use other options like ftp to browse remote files.


lxc-create runs without errors, the zfs filesystem is created, but the container is not created

I need to add --lxcpath=/lxc to every lxc command :(

root@Ubuntu-1604-xenial-64-minimal ~ # sudo lxc-ls --lxcpath=/lxc --fancy
NAME STATE   AUTOSTART GROUPS IPV4 IPV6
u1   STOPPED 0         -      -    -

I fixed this with:

echo "lxc.lxcpath = /lxc" > /etc/lxc/lxc.conf


Where are error messages of failed application starts?

This question is probably a duplicate of:

capture stdout and stderr of all GUI programs?

There are two answers there:

Check the contents of ~/.xsession-errors log and,
Redirect output when calling command: command >~/log/command.out.log 2>~/log/command.err.log

Also if the process ID is known look at it's file descriptor 1 for stdout and 2 for stderr. This is described in detail in Unix & Linux:

Where does the output from an application started from the window manager go?

To briefly summarize the top-voted answer:

lsof -p1234 | awk '$4 ~ /^[12][^0-9]/'
ls -l /proc/1234/fd/[12]

Of course the most common method is to simply call the GUI from the command line and your terminal window will show warning and error messages:

$ zenity --info --text "Hello World"
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.


The problem is actually Windows and not Linux. Microsoft wrote their system to try and hijack the computer as a whole from any other operating systems. Multiple windows updates (I'm guessing you have automatic updates turned on for windows?) will try to kill the GRUB bootloader.

Although there are software ways around this (such as reinstalling Ubuntu), my personal suggestion for avoiding this continually is to add a second internal harddrive to your computer. (This is much better for system stability anyway! One harddrive for each operating system, and one "documents and media" hard drive where you store your files, pictures, movies, etc. This usually ensures that if something dies horribly, you won't be completely lost, especially as any big errors to happen will USUALLY happen on the operating system's harddrive.) Then, you can avoid GRUB and windows overrides entirely but just hitting your computers bios "boot device menu" key when booting and just change which drive you're using.


The super key is closing the terminal. :-) That, or the power button on your computer.

Each of the key combinations Ctrl+c, Ctrl+x, Ctrl+z, and Ctrl+d does a different thing.

Ctrl+c : generates an interrupt signal (SIGINT).
Ctrl+x : I'm not sure what this does.
Ctrl+z : suspend the process, allowing it to be resumed at a later point (SIGSTOP).
Ctrl+d : sends an end-of-file (EOF) character.

Each process is at liberty to interpret these signals as they see fit. Hence, there is some heterogeneity in the response.

A more generic way to terminate a process would be to kill it with a SIGKILL signal, the most aggressive way, which is which (I think) is the same as closing the terminal window. It's better to attempt Ctrl+d and Ctrl+c first though, because these are signals that the process can anticipate, allowing it to end in a predictable and safer way.

Check the manual page with man 7 signal.


USB ports not working on Gigabyte 990XA-UD3 (except USB 3)

I found a solution on Manjaro forum, so I'd though I'd share it with you, as it universal for Linux, and applicable to Ubuntu.

This is a known problem with many Gigabyte boards, it seems they don't give a damn about Linux.

This is a post-install fix:

Enable XHCI and EHCI and IOMMU in BIOS setup.

Edit /etc/default/grub, find the line that says GRUB_CMDLINE_LINUX= and add "amd_iommu=on iommu=pt" to the rest of the parameters there. Update the grub by running sudo update-grub (or sudo grub-mkconfig -o /boot/grub/grub.cfg, which is the same thing).

Reboot. With a little luck USB 1 & 2 ports should now work properAy.

Alternatively, I've been also recommended to try "iommu=soft" as a boot parameter. I have not tried that, because the above worked.


Writing to mysql database in Ubuntu Server 12.04 LTS

first create mysql database: databasename

create mysql table with 2 text fields for IP and MAC:

#!/bin/bash

sed  's/atPhysAddress\[10\]\[//g' arp.txt | sed 's/\]\ \"/\|/g' | sed 's/\ \"/\|/g'> /tmp/arp.new

mysql -uroot -ppassword  databasename <<EOF
load data infile '/tmp/arp.new'
into table tablename
fields terminated by '|'
escaped by '\\\'
lines terminated by '\n';
EOF


Using terminal, go to the folder where the application is installed and type:

ldd ./name_of_the_application

This should present you with a list of all the required libraries for the application and their location or "not found" if they were not found.

If any are displayed as not found, installing them should solve your problem.  It's likely you at least have libqxcb missing.

More information on dependencies for Qt applications on Linux can be found here


How do I get a Canon MG, MP and MX series USB printer working?

Posting on behalf of the OP:

Having messed around as described in thread below, this is what it boils down to:

Most printer and scanner drivers (MG,MP and MX series) are easily found in Ubuntu Software Center.

first add a PPA:

sudo add-apt-repository ppa:michael-gruz/canon
sudo apt-get update

Open software center:

Search for: "Canon cnijfilter", in list; pick driver for your printer series and "Canon Scangear", in list; pick driver for your scanner series

Both will install in a snap.

Afterwards, go to system settings/printers and add your printer. Note: Scanning as of now (nov.2011) works from Gimp only, which is actually okay. Printer may show as 'not mounted', but still works.

This PPA doesn't yet contain drivers for the MG5300 series, see this question to set it up manually:

Installation of drivers for Canon MG5300 series fails…


Sending files from Win8 PC to Ubuntu14.04 Laptop

An easy cross-platform open source GUI tool for sharing files over your local LAN is NitroShare

Simply install the program on the two computers in question and a representation of each machine will show up on the other's desktop. You can then drag and drop files onto the representation to send them to that machine. You'll have to accept the files on the recipient machine but it's possible to configure auto-accepting of files from machines you designate as trusted.

To install on Ubuntu:

sudo add-apt-repository ppa:george-edison55/nitroshare-dev
sudo apt-get update
sudo apt-get install nitroshare

Another option would be to install Dropbox or BTSync on both machines. These programs are cross-platform and allow you to share folders over your LAN or over the internet.


Ubuntu not showing progress bar while installing

Check in Gnome Disks and see the first partion (ex. sda1) if it's showing there are less space like (23gb free (17.6% full)) it means it's installing


By default, who is allowed to gain root privileges with pkexec?

By default, it's the members of the sudo group, and the root user, by virtue of these files in /etc/polkit/localauthority.conf.d/:

$ tail /etc/polkit-1/localauthority.conf.d/*
==> /etc/polkit-1/localauthority.conf.d/50-localauthority.conf <==
# Configuration file for the PolicyKit Local Authority.
#
# DO NOT EDIT THIS FILE, it will be overwritten on update.
#
# See the pklocalauthority(8) man page for more information
# about configuring the Local Authority.
#

[Configuration]
AdminIdentities=unix-user:0

==> /etc/polkit-1/localauthority.conf.d/51-ubuntu-admin.conf <==
[Configuration]
AdminIdentities=unix-group:sudo;unix-group:admin

The first file grants access to UID 0 (root), and the second to the groups sudo and admin. admin isn't really used on Ubuntu, but sudo is, and it's the group used to grant access to sudo as well.


Partition Concerns - Installing Ubuntu 12.04 on New Laptop

You will need to use the 64 bit version of current versions of Ubuntu and from the UEFI menu boot the flash drive in UEFI mode. That way it will install in UEFI mode.
Systems need Windows  fast start up (hibernation) and UEFI/BIOS fast boot quick boot UEFI settings. Vital for some systems.
Use Windows Disk Tools to shrink Windows main partition, but not to create any new partitions, if installing on same drive. Reboot after shrink so it can run its repairs to its new size.
Backup efi(ESP) partition and Windows partition before Install of Ubuntu. Only one efi partition per hard drive.

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

https://wiki.archlinux.org/index.php/UEFI

Installing on a Pre-Installed Windows 8 System (UEFI Supported)

How do I install Ubuntu alongside a pre-installed Windows with UEFI?

Only MBR(msdos) partitioning has the 4 primary partition limit, but allows additional logical partitions in one primary that is an extended partition.

With UEFI you have gpt(GUID) partitioning which has a initial limit of 128 partitions (but you can even add more).

Edit:
Did not know specs on your specific system, but with the 24GB SSD, you probably have an Ultrabook. That uses Intel SRT with RAID. You have to undo the RAID to let Ubuntu install and can then re-implement it. You also have dual video which may also give video issues after the install until you install bumblebee. Can you set to boot with just nVidia or just Intel video?

Other users have posted this:

[QUOTE]Disable the RAID, it was using the Intel rapid management thingy and telling it to disable the acceleration or the use of the SSD. If you have a different system, just disable the RAID system then install Ubuntu. Once installed you can then re-enable it.
sudo dmraid -E -r /dev/sda
sudo dmraid -E -r /dev/sdb[/QUOTE]
[QUOTE]You will need to use the dmraid command prior to running the Ubuntu Installer so that it will be able to see the partitions on the drive because otherwise with the raid metadata in place it will see the drive as part of a raid set and ignore its partitions.[/QUOTE]


You may need to switch the cards. Right now you have the 1GB cards on bank0 and bank2, with the 2GB cards on bank1 and bank3.

Check with your manufacturer. According to

http://h20331.www2.hp.com/Hpsub/downloads/Mini_WP_Z800_memory.pdf

and

https://superuser.com/a/107753/317065

You may need to put the two 2GB cards on bank0 and bank2 instead.

Alternatively, according to here there may be a BIOS setting under chipset configuration > internal graphics for frame buffer location. In that post, the user changed the setting from above 4GB to below 4GB and problem was solved.


How can i recover a raw ISO file to a partition?

Maybe there's a problem with the MBR on your device (sdc), try testdisk and maybe it will be able to fix it on sdc? Or, sdc itself might have some physical errors, personally I've had some problems with usb flash memory (sd cards, thumbdrives) and multiple partitions.

Or maybe there's a problem with the partition backup (hbcd.iso), try

fsck.msdos -n /var/isos/hbcd.iso

and see if it likes the fat32 partition or not. (-n makes no changes, just to check)

Or First, to just get the data, directly mounting the hbcd.iso file should work if it's a good fat32 filesystem, then you could copy everything out of it without playing with sdc at all. Testdisk can copy the files out of it directly too and may work better if there's some problems with it (run testdisk hbcd.iso). Something like this should work:

mount -o loop,ro hbcd.iso [somedir]

And if mounting & testdisk can't read the filesystem then photorec (part of the testdisk package) can carve the data out of hbcd.iso, but it probably won't keep any original filenames. I think sleuthkit should have some good data carving tools, maybe even testdisk/photorec.

Don't forget the data recovery rule: MAKE A BACKUP COPY AND PLAY WITH IT FIRST!
Otherwise some small typo or a naughty program could erase everything, so backup that hbcd.iso.


Sound lag in VLC after I resume from a paused movie

Most likely, your videos are poorly encoded.

This doesn't happen with all videos in my experience.  It has to do with there being a large chunk of audio/video data without key-frames or re-syncs of audio and video.

I've seen it occur, but when it happens in VLC it is most often a poorly encoded video.

In order to fix it, re-encode the video with the h264/aac presets, and it should be fine.


ConnMan not detecting already existing wireless network

Its worth trying alternative network managers such as the standard Gnome Network Manager or WiCD - both of which are available in the software centre application.

Assuming you try WiCD, you will find that there is no application indicator to directly control the application.

However, you could create a desktop launcher (right click the desktop) and type in the command

wicd-client -n

You could then drag that launcher into the main Icon Dock on the left-hand side of the screen.

Alternatively you could try whitelisting the WiCD application itself so that it could be controlled from its "app indicator" icon in the top-panel as per the AU question and answer:

n.b. I recommend using the dconf-editor answer not the "all" answer


18.04 Xorg 100% CPU black screen of death

I think here this post already have discussed solution to your problem as he also have no response to CTRL+ALT+F1. I am copy paste as it is. Please refer post Black screen at boot after Nvidia driver installation on Ubuntu 18.04.2 LTS for more detail:

I'm posting an answer to my question as I managed to solve the problem (thanks to the AskUbuntu community). This may not be a completely generic answer, but I will explain the steps which I followed in case it helps someone else. Here's how I did it:

1. Connecting to a terminal

I followed the instructions to edit the commands before booting, namely replacing quiet splash with nomodeset and then pressing F10 or Ctrl+X to boot (instructions are provided here). After I booted, I pressed Ctrl+Alt+F1, Ctrl+Alt+F6 and Ctrl+Alt+F7 repeatedly one after the other. After several tries (had to reboot and retry several times), I eventually got a terminal with ultra low resolution where I had to enter my login and password, which I did.

2. Uninstalling the wrong Nvidia driver

I used the command provided by Marmayogi to uninstall the incorrect Nvidia driver:

sudo apt-get purge nvidia*

The next time I rebooted Ubuntu, I was able to access the login page and GUI in ultra low resolution, like before I installed the wrong Nvidia driver.

3. Installing the correct Nvidia driver

Here I followed the instructions provided by Marmayogi in his comment to my question, except for the installation command of the Nvidia driver which was incorrect as it has changed (see the answer by Kerry Kobashi in this post for details):

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-driver-410 (this is the new command, also check version number of driver first!)
Reboot.

After rebooting the GUI was in a normal resolution (except GRUB which was still in low resolution, but it's less of a problem). To check that everything went well, I issued the following command: lsmod | grep nvidia, and there was output, so the installation was successful.

Here I am want to stress out that you need to check which version of the Nvidia driver you need (i.e. which is compatible with your graphics card). You can check on the Nvidia website which products are supported by each driver (the latest one is usually the best if you have a recent graphics card). Not doing so and blindly following instructions in another post which did not specify this is what led me to having all these problems in the first place (unfortunately, this point is too often ignored in a lot of posts I've seen on the subject). Also when choosing the version, I read somewhere that you only need to write the main version (don't bother about the number after the point, so if latest driver is 418.56, just write 418).


18.04 MATE Workspace names hiding window icons

Let's start with four workspaces example - Coding (1), Browsing (2), Office (3), Auxilary (4):

with Show workspace names in switcher checked it do not show application windows and icons.

For me it seems that we can use possible workaround - see hints on mouse over Workspace Switcher applet. With Show workspace names in switcher unchecked you will see application icons and hints on mouse over:

Also workspace names will be shown after right click on window title in MATE Panel:

Notes:
1. I have checked Workspace Switcher 2.32.1 in Ubuntu 11.04, its functionality is the same. So this behavior is inherited by MATE from GNOME.
2. From my personal point of view this Workspace Switcher is more intuitive and user friendly than GNOME Shell. On GNOME 2.32 I have set-up 2x5 grid of workspaces and after some practice did not have any problems with its numbering and naming after remembering.


There must have been something completely going wrong.
There is no Ubuntu operating system to be seen on the disk.
The installation setup of your disk is not configured properly.

You really should reinstall Ubuntu.
I try to make it as easy as possible :

Boot from Ubuntu installation media.
Select 'Try Ubuntu without installing'.

Open GParted and delete all partitions.
Right-click the partitions - select delete.
Click on Apply to complete the deletion.

Create a new partition - format it with fat32 - I suggest a size of about 100 MB.
Create a new partition - format it with swap - I suggest a size matching your RAM.
Create a new partition - format it with ext4 - I suggest to use the rest of free space.

On the desktop click Install Ubuntu - choose Something else.
Select the ext4 partition you had created for Ubuntu before.
Select / as mount point and ext4 file system for formatting.


How to assign free space to only Ubuntu running machine?

Note: I wouldn't have set up sda4 as fat32, but rather NTFS. You may decide to change this at a later time.
Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.
The use of an extended partition (sda3) makes this a little difficult. I'll outline the easiest way first, and we can add more to the procedure if we have to.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower part of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot the a Ubuntu Live DVD/USB
start gparted
disable swap on sda5
assuming that sda1 is empty, use gparted to delete sda1
resize sda3 all the way to the left
move sda6 all the way to the left
resize sda6 all the way to the right
click the Apply button
reboot the computer


Can't locally edit files in samba share, but windows client can? (Ubuntu 18.10)

You created a guest accessible Samba Usershare. When the guest user on Windows accesses that share a line in /etc/samba/smb.conf is invoked:
map to guest = Bad User

A "Bad User" is one in which the user name and password that is passed by Windows is not contained in the samba password database. A guest user will not be in the samba password database so it will be "mapped" to the default guest user in Samba which is the user "nobody".

The easiest way to resolve this issue if to add a line to /etc/samba/smb.conf - right under the workgroup = WORKGROUPline - that forces the guest user to look like you for these shares:

force user = binarybyte

Then restart smbd:

sudo service smbd restart

The Windows guest user will now appear to be you for your samba shares. Any new file or folder added by Windows will save with owner = binarybyte not nobody.


Copy the content/file to all subdirectory in a directory using terminal

How to put a file in the current working directory in all subfolders (and maybe their subfolders, depending on what you want to do)

This will put the file in all of the subfolders, but not their subfolders:

for d in */; do cp water.txt "$d"; done

This will put the file water.txt (change all instances of water.txt to the filename you want to copy) in all the subfolders and their subfolders

for i in ./* # iterate over all files in current dir
do
    if [ -d "$i" ] # if it's a directory
    then
        cp water.txt "$i" # copy water.txt into it
    fi
done

Info from this linuxquestions thread


Efficiently finding the first file (in the lexicographical sense) among multiple directories

I don't think you can make it much faster as you need to first get the output of find which is the longest operation and only then pipe it through sort and head.

And if you're even considering putting some code together to make it run faster, I think the improvement (if any) over using find would be negligible when compared to the amount of time required to write it and make it more efficient than find.

Unless this is something you do regularly and the dataset is huge (thousands isn't that many), I wouldn't spend my time on it if I were you.


Something went wrong while displaying this webpage. Error code: SIGSEGV

The problem doesn't occur in Firefox, and it isn't solved by logging out and logging back in again. It could be caused by one of the extensions that is installed in Chrome.  Disable your Chrome extensions one by one until you isolate the extension that is causing the problem, and then re-enable all of the other installed Chrome extensions except for that one.
If that doesn't work try signing out of Facebook in Chrome, and then sign back in again with your Facebook password.


Drives fail on one PC setup, but works flawlessly on another

I replaced the PSU and now it works great again.


Bash error: Nesting 'if .. elif' inside 'for .. in' construct

You're missing either a semicolon or a newline before do.
Both of the following scripts will work.

IFS=$'\n'
for line in `more extensions.txt` ; do
        if  grep '[219..223]' ${line:96:4} ; then
                echo "1"
        else
                echo "2"
        fi
done

IFS=$'\n'
for line in `more extensions.txt`
do
        if  grep '[219..223]' ${line:96:4} ; then
                echo "1"
        else
                echo "2"
        fi
done

Note: Your script is also missing a shebang. It's better practice to include one in the first line of your script.
This allows you to call your script using ./script.sh if the file's executable bit is set, in addition to sh script.sh or bash script.sh


How to get dual boot (Ubuntu/Windows) option enabled?

In your case, the following should be sufficient:

Boot Ubuntu with both drives installed.
Open Terminal and issue the command:

sudo update-grub

Enter your password and check it detects Windows apart from Ubuntu itself.
You can reboot and choose Windows in the GRUB menu.

However, this might not work if you installed both systems in a different mode (BIOS or UEFI). Anyway, a boot menu provided by the firmware can do the same work as the GRUB menu would.


How does the OpenVPN service start connections by default?

Because openvpn uses a mix of SysV and systemd scripts.

TL;DR

This behavior can be configured in the /etc/default/openvpn. Here is an extract of the file provided by the openvpn package:

...
# Start only these VPNs automatically via init script.
# Allowed values are "all", "none" or space separated list of
# names of the VPNs. If empty, "all" is assumed.
# The VPN name refers to the VPN configutation file name.
# i.e. "home" would be /etc/openvpn/home.conf
#
# If you're running systemd, changing this variable will
# require running "systemctl daemon-reload" followed by
# a restart of the openvpn service (if you removed entries
# you may have to stop those manually)
#
#AUTOSTART="all"
#AUTOSTART="none"
#AUTOSTART="home office"
...

So AUTOSTART is not set, and so all .conf files from the /etc/openvpn directory are started at boot.

Using the modern systemd way

Set AUTOSTART="none" in /etc/default/openvpn
sudo systemctl daemon-reload

Now you can use systemctl to manage your openvpn connections, the service are named after the configuration files like this:

/etc/openvpn/ABC.conf -> openvpn@ABC.service

/etc/openvpn/XYZ.conf -> openvpn@XYZ.service

And so on...

Examples

So if you want to start the XYZ openvpn connection, the command should be:

sudo systemctl start openvpn@XYZ

To enable this connection on startup :

sudo systemctl enable openvpn@XYZ

To get the status of this connection :

sudo systemctl status openvpn@XYZ


Starting the GUI terminal with specific variables

If I understand your question correctly, what you want is having gnome-terminal behave like a virtual console as far as rc scripts are concerned.

That should be achieved by configuring it to run the shell as a login one.

  Edit → Profile Preferences → Title and Command → Run command as login shell


Apart from partition format problems, normally you have nothing to do: just plug in the disk, use it with Nautilus, check the mount points in Disks for use in Terminal.  Maybe you found old posts with more complicated procedures.  If the disk does not mount automatically, the odds are it has a serious problem.


pdflatex can't compile after 14.04 upgrade

The files seems to be included in texlive-lang-other- Install the package and it should work fine.

E.g. via $ sudo apt-get install texlive-lang-other


Canon ImageRUNNER 2530 printing problems

There is a Brightq driver available for linux and I would reccomend installing it https://www.usa.canon.com/internet/portal/us/home/support/details/copiers-mfps-fax-machines/multifunction-copiers/imagerunner-2530?subtab=downloads-drivers


According to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758660
saslauthd stops functioning after some amount of logins (successful and/or failed).

You don't need to restart the whole server, the following is enough: service saslauthd restart

You can put that into a crontab. If a lot of logins originate from the same, malicious IP you can drop request from that IP in the firewall to make saslauthd last longer, e.g. iptables -A INPUT -s 185.29.11.6 -j DROP


You really shouldn't have partitioned your hard drive that way. You partition it that way when you'll have a few system files and applications accessible to all users on one small partition (/) and per-user data on the other very large partition (/home). In other words, it's for standard desktop use.

You have a MySQL server that stores huge database files, which don't fit anywhere in that scheme. In other words, you have a server that's not run by a particular real user, not purely a standard desktop.

You should probably repartition, either to merge the / and /home partitions (the best option to avoid this sort of thing) or to increase the proportion allocated to the / partition.

With that out of the way, use BleachBit.

Use BleachBit from the Universe repository:

Turn off MySQL

Open up a terminal (press Ctrl+Alt+T) and run the following:

sudo service mysql stop

Free up some space by removing unneeded and still-packed software and by removing archived log files:

Open up a terminal and run the following:

sudo -i
apt-get autoremove --purge
apt-get autoclean
apt-get clean
rm -rf /var/cache/apt/archives/*
find /var/log -name '*.gz' -delete

Turn on the Universe repository through Synaptic Package Manager

Open Synaptic Package Manager.
Settings menu > Repositories.
Make sure Community-maintained free and open-source software (universe) is checked.
Click Close.
Exit Synaptic Package Manager.

Fix things because you're using an unsupported release (12.10)

Only follow this section if you're using a release that's so old that it's no longer supported.
Open up a terminal and run the following:

sudo nano /etc/apt/sources.list

Replace everything that has the pattern http://whatever/ubuntu with http://old-releases.ubuntu.com/ubuntu.
Press Ctrl+O, Ctrl+X to save and exit.

Install BleachBit

Open up a terminal and run the following:

sudo -i
apt-get update
apt-get install bleachbit

Run BleachBit as root

Open the applications menu (press Alt+F1).
System Tools menu > BleachBit (as root).
Clean a bunch of stuff.

Turn on MySQL

Open up a terminal and run the following:

sudo service mysql start


Check cpu load and memory utilization on server.May be due to high cpu load/memory.You are facing this problem.You can use free uptime vmstat top and others tools to figure it out and also check tail -40 /var/log/auth.log for more info.


How to install Ubuntu 14.04.3 on built-in eMMC flash?

In my experience, eMMC storage devices are poorly supported in Linux. I've got an ASUS P100T that's virtually useless with Ubuntu (I've tried through Vivid) because of similar I/O errors and other problems on its eMMC storage. Sometimes such problems get cleared up with newer kernels, so you might try with Wily, which has the most up-to-date kernel of any Ubuntu release at the moment. Along those lines, it's not clear if you used 14.04 GA (which has a 3.13-series kernel) or one of the more recent point releases, which have more recent kernels. 14.04.3 uses the same kernel as 15.04.

The specs for your device say that it has a bay for a 2.5-inch SSD or HDD. I'm guessing that's a conventional SATA device, although I've not dug too deeply into the specs. My guess is that you'd have much better luck if you plug in such a disk and install to it rather than to the eMMC device.


Git produces output in realtime to a file but I'm unable to echo it out in realtime directly in a while loop

This is a very interesting question and I had to experiment for a while, but the answer is actually super simple!

How does git's progress output work? It shows a single status line with a progress percentage and updates it all the time until it finished. It does that by not printing a line feed \n but a carriage return \r character at the end of the progress line, which causes the output cursor to jump back to the beginning of the line again, ready to overwrite the last written line again with an updated value.

You can observe this by piping git's output through cat -A, which does not interpret invisible characters but shows them, so that e.g. \r becomes ^M and line breaks additionally get denoted with a $:

Cloning into 'MyRepository'...$
remote: Counting objects: 2317, done.        $
Receiving objects:   0% (1/2317)   ^MReceiving objects:   1% (24/2317)   ^MReceiving objects:   2% (47/2317)   ^MReceiving objects:   3% (70/2317)   ^MReceiving objects:   4% (93/2317)   ^MReceiving objects:   5% (116/2317)
[...]

Now why does this affect read? It's obvious, as help read says (extract, emphasis mine):

Read a line from the standard input and split it into fields.

read waits for line breaks (\n) before it finishes. The output of git did not contain any line breaks during the progress display, hence read did not finish. Only after the progress display was completed and git really printed the next line, read took in all the output, including all intermediate states and carriage returns and you echoed it inside your loop. If you pipe the echo or done through cat -A as well, you see the same output full of ^Ms, like above.

What you can do to allow read to capture all the intermediate progress lines is to translate all carriage returns into real line breaks, by piping the stuff through tr \\r \\n. That way each state gets printed on a new line instead of overwriting the previous line.

So, the complete loop you used could look like this:

git clone --progress http://someRepo 2>&1 | tr \\r \\n |
    while read -r line ; do
        echo "bypassed: ${line}"
    done

On my system, the output shown in terminal by this solution is still not totally fluent and stutters a bit, but I was not able to improve that any further. At least you now have the real "progress" output.


You must burn the iso image specifically as an install cdrom, not as data cdrom.
https://help.ubuntu.com/community/BootFromCD
https://help.ubuntu.com/community/BurningIsoHowto


How do I enable the "multiverse" repository?

Another option available for newer releases of Ubuntu:

sudo apt-add-repository multiverse && sudo apt-get update

From the man page:

Examples:
  apt-add-repository 'deb http://myserver/path/to/repo stable myrepo'
  apt-add-repository 'http://myserver/path/to/repo myrepo'
  apt-add-repository 'https://packages.medibuntu.org free non-free'
  apt-add-repository http://extras.ubuntu.com/ubuntu
  apt-add-repository ppa:user/repository
  apt-add-repository multiverse


Has anyone achieved to embed an interactive 3D model into a PDF with Ubuntu?

Don't know much about this, but from what I've found, looks like you can. First you have to convert your 3D object to Universal 3D format(.u3d) and then use TexLive to embed that object into Tex file, finally you have to compile it to PDF with the help of a package called movie15.
Here is a tool/tutorial for exporting to u3d and embedding it to PDF. MeshLab can also be used for converting to u3d.


How to install hacker evolution duality games on Ubuntu 14.04?

That game is not free (though the complete bundle is currently 5.59 euro) and it is available on Steam.

So install Steam and installing Hacker evolution can be done from inside the Steam software where it will guide you through the payment and the installation part.

The Hacker Bundle has all the add-ons listed with a link to Steam.


Transferring music ratings from rhythmbox to gmusicbrowser

Done for gmusicbrowser.

Here's how I did it finally!

first clean up rhythmbox database using custom written XSLT style sheets. I can provide additional information on request (off-topic in this question).
export playlists from rhythmbox (it happened to be pls format, others would have probably worked, too). I had playlists for "rating >=3 stars", same for 4 and 5.
launch gmusicbrowser
have it import all existing music, show it
click on one line in the grid showing titles, press Ctrl-A select all
right-click and choose "Edit rating" then choose a default rating (I set it to "no star")
import "rating >=3 stars" in gmusicbrowser
click on one line in the grid showing titles, press Ctrl-A select all
right-click and choose "Edit rating" then choose 3 stars rating
do the same for the playlists "rating >=4 stars" and 5.

Then I recreated the filters and sort orders.

This uses the capability of gmusicbrowser to allow batch edit rating, something rhythmbox cannot do.

I could not do that in Clementine. See Transferring ratings and playlists from Rhythmbox to Clementine for details, but probably for another reason.


Thinkpad X201 battery sometimes shows 2% for a few hours

The only thing you can do is to replace the battery. Because the battery itself is the source of the erroneous state of charge readings.


How do I allow only one user to su to another account?

su is not meant to do that -- sudo is.

Open /etc/sudoers.d/custom and write the following:

user-a ALL=(user-b:user-b) NOPASSWD:ALL

Which means: whenever user-a executes sudo -u user-b (or any other variant), let him go without asking for password.


Ubuntu 19.04 .bash_profile doesn't exists

Is it normal that there is no .bash_profile?

Yes it is - the default files copied from /etc/skel during account creation by adduser are:

$ ls -A /etc/skel
.bash_logout  .bashrc  .config  .kshrc  .mkshrc  .profile  Templates

As you can see, there is a default .bash_logout but no default .bash_profile.

  Is it good if I create it manually?

Yes that's fine - be aware that if you do so, it will be read in preference to the ~/.profile file - from the INVOCATION section of man bash:

   When bash is invoked as an interactive login shell, or as a  non-inter‐
   active  shell with the --login option, it first reads and executes com‐
   mands from the file /etc/profile, if that file exists.   After  reading
   that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
   in that order, and reads and executes commands from the first one  that
   exists  and  is  readable.  The --noprofile option may be used when the
   shell is started to inhibit this behavior.

so you may wish to source ~/.profile from the new ~/.bash_profile in order to maintain any functionality that it provides.


I'd say, file a bug against xserver-xorg-video-radeon in Launchpad.


How do I get TP-Link Archer T1U USB wireless dongle working?

I got this wireless adapter working on Ubuntu with kernel 4.4.

I added a driver to my PPA. It can be installed by

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt update
sudo apt install mt7610u-dkms


Ubuntu 14.04 LTS Dual boot problem with windows 7

Answered by Terrance in comments of original poster.

When installing Ubuntu along side of Windows or vice versa a bootloader, mainly Grub is installed. If after running updates you can no longer see your other operating systems try the following:

You will want to run the following command:

sudo update-grub

This command will basically update the grub configuration, and since Ubuntu installs OS-prober with Grub it will search automatically for any other OS's installed on the hard disk while updating.

Once you run this command, reboot and you should see the additional OS in the list of boot options. This method would work with Windows either being installed as primary or as a secondary OS.


Can't get to the installation screen, keeps rebooting

There's a launchpad bug about Ubuntu booting with the laptop backlight off; that might be the problem you're seeing.


try this command in your terminal

sudo chown -R $USER:$USER /path/to/myAppFolder

this is duplicate of this question Change folder permissions and ownership


How do I reset Lubuntu fonts? Fonts are messed up everywhere

I managed to fix it myself.
Go to Preferences => KDE System Settings => Fonts => Then Click Defaults
And reboot
If you're still having the problem then, try this:
Go to Preferences => KDE System Settings => Fonts => Font Manage => Then delete or disable Emoji One and EmojiOne Color fonts. Then reboot.


Samba share does not ask for credentials from Windows Client

I did some digging around on the Internet and I found that this worked for me. Just add this line anywhere in your smb.conf. I put it right before my shares. I figured it doesn't matter, then I rebooted the whole server, most likely only have to do Samba but I like to be sure settings take into effect:

[global]
admin users = root, smbadmin, [continue to list your Samba users you want to add to admins]
security = user


How to safely remove Ubuntu 12.04 from a dual-boot installation with Windows XP?

You do not need to remove an old install of Ubuntu before installing anther distro, you also don't need to re-install Windows bootloader and definitely you don't need to resize Windows partition to take up the space previously occupied by Ubuntu.

Just boot from Kubuntu/Lubuntu LiveCD/USB, choose "Other" when it asks you whether you want to install instead of Windows or alongside Windows and manually choose the partition(s) previously used by the previous Ubuntu install.

Make sure you're ticked "Format partition", which will re-format the partition, removing all the data from it.


In a terminal you can use amixer to ask for the volume. For example my Master volume:

user@srv % amixer get Master
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum
  Playback channels: Mono
  Limits: Playback 0 - 31
  Mono: Playback 21 [68%] [-15.00dB] [on]

To get a visual feedback use notify-send (from libnotify-bin):

user@srv % notify-send "volume" "$(amixer get Master | grep dB | sed 's/\(^[a-z0-9 :]\+\[\|\[\|\]\)//gi')"


ps inside crontab is not seeing a running process

What you need is a lock file and check for this lock file. If it is there end the script otherwise start it.
An example command would be shlock.

DESCRIPTION
Shlock  tries to create a lock file named name and write the process ID pid into it.  If the file already exists, shlock will read the  process ID  from  the file and test to see if the process is currently running. If the process exists, then the file will not be created. Shlock exits with a zero status if it was able to create the lock file, or non-zero if the file refers to currently-active process.


This post solved my problem, as easy as establishing the npm registry with

 npm config set registry http://registry.npmjs.org/

Anyway, thanks!


Error using imageMagick's mogrify "delegate failed"

The error message suggests that your input file isn't a JPEG but a WebP file.

To handle WebP files ImageMagick needs the program dwebp from the package webp. Install that package, for example by using

sudo apt-get install webp


How to enter the Default Keyring password via the command line?

Thanks to python-gnomekeyring, this is relatively easy:

python -c "import gnomekeyring;gnomekeyring.unlock_sync(None, 'my password');"

Or as a proper script:

#!/usr/bin/env python
import gnomekeyring
gnomekeyring.unlock_sync(None, 'my password');

I think you don't need to install the package. But it can't hurt to try.

Keep in mind that storing your password on your hard disk is an immense security risk. You should be using this instead:

#!/usr/bin/env python

import gnomekeyring
import getpass

gnomekeyring.unlock_sync(None, getpass.getpass('Password: '));

You can save this script, for example, as unlock-keyring.py and then do the following:

sudo mv unlock-keyring.py /usr/bin/unlock-keyring
sudo chmod a+x /usr/bin/unlock-keyring

From then, you can always just type unlock-keyring and be prompted for a password. Don't do this with the version that contains your password.

You can replace None with the name of your keyring, e.g. 'session', if you want to unlock one that isn't the default.

I'm having a hard time testing this properly, so please let me know if it doesn't work and I'll take a look at it right away. Also let me know if it does work :-)


HOw to learn Ubuntu 17.04 desktop version?

Really the best way to learn is just read plenty of different resources. If you are unsure what you are doing before doing it, look it up first. There's a good chance others have asked the same questions as you in the past.

The Ubuntu wiki is of course a great place to start https://wiki.ubuntu.com/Home


open startup applications preferences on Lubuntu 14.04

Startup Applications are found here...

Start Menu → Preferences → Default applications for LXSession →
AutoStart.


Finding PPAs / Getting a modern GNU make on 18.04

make 4.2.1-1.2 utility for directing compilation .deb files for Ubuntu 18.10 can be downloaded from the official Ubuntu website. make 4.2.1-1.2 requires libc6 >=2.27 which is installed by default in Ubuntu 18.04 and later. The information given in your question shows that you are using either Ubuntu 18.04 or Ubuntu 16.04. If you need more up-to-date packages and are running Ubuntu 16.04, you should consider upgrading Ubuntu 16.04 to the latest LTS release, Ubuntu 18.04.

I had no luck searching for make 4.2 at the Personal Package Archives for Ubuntu website as instructed to by How to search for an official PPA?.

amd64 (64-bit)
i386     (32-bit)

To install make_4.2.1-1.2_amd64.deb or make_4.2.1-1.2_i386.deb double-click it to open it for installation in Ubuntu Software.


Do the leds illuminate at all? Some place there is a device that controls those lights.

How you might interface with that device, depends what it is, and how it is connected. Might it be a usb interface? or on some proprietary bus? or maybe its a serial connection?  I would start by trying to ID the device that drives the LEDs. You might try  looking at the output of:
sudo dmidecode
and or:
sudo lshw
or:
sudo lsusb

perhaps youll see an intuitively named category that makes sense describing the device in dmidecode, such as "lights", "controller", or "LEDs". Or maybe something else describes the MotherBoard LED lighting system.  Once you ID the device that drives the lights, it will be easier to know how to control that hardware.

I see that there is an interface for LED string lights... are you using those lights or is that hardware you have? The LEDs look like neopixels, which include an integrated driver, and run as a serial connections. If that is correct, you could control the lights by writing a program that defines the total number of LEDs, then sends colour, brightness, addressing, and timing info to the LEDS.

Try to ID the hardware that drives the LEDs, and Ill try to assist further.
Alternatively, post output from dmidecode, lshw, and lsusb.


How to setup ksystemlog to open any *.log file by default?

Ok, solved this, hope it will help someone.
Since ksystemlog limitation is that it is able to open only a pre-defined files, I decided to copy the log to a temporary file and define ksystemlog to always open this file.

This is how it's done:

1) create a bash script (called it alog.sh):

#!/bin/bash
cp $1 /home/(user)/tmp.log
ksystemlog

2) add a desktop entry:

[Desktop Entry]
Terminal=false
Name=klogger
Exec=alog.sh %u
Type=Application
Icon=gnome-panel-launcher
MimeType=text/x-log;

3) set "open with" the .desktop above script

4) in ksystemlog settings select an option to always start with the above tmp.log


Xubuntu Toshiba Satellite Pro L350 graphical glitches

There was some problem in the graphic acceleration of XFCE with this computer.

The solution was to disable compositing that gives you many effects like transparency and shadows

Go to: Applications -> Settings -> XFCE Settings Manager
Remove the check from Enable compositing effects

More information here:

Are there 3D effects on Xubuntu? (hardware-accelerated graphics)


How do I install Ubuntu in command-line mode from the Live CD?

Sorry, that's not possible if you only have the Ubuntu Desktop LiveCD; this is because the LiveCD does not contain the actual .deb packages but instead contains the compressed image of a full Ubuntu install, which is simply unpacked to your hard disk when you install it.

To install a CLI version, you will need the Server or Alternate CDs, or use the minimal "net install" CD.


Instance with Canonical Livepatch Service requires restart

Here you can find a lengthy FAQ about ubuntu live patch:
http://blog.dustinkirkland.com/2016/10/canonical-livepatch.html
I copied the questions which are of interest for you:

Q: What kinds of updates will be provided by the Canonical Livepatch Service?
A: The Canonical Livepatch Service is intended to address high and critical severity Linux kernel security vulnerabilities, as identified by Ubuntu Security Notices and the CVE database. Note that there are some limitations to the kernel livepatch technology -- some Linux kernel code paths cannot be safely patched while running. We will do our best to supply Canonical Livepatches for high and critical vulnerabilities in a timely fashion whenever possible. There may be occasions when the traditional kernel upgrade and reboot might still be necessary. We’ll communicate that clearly through the usual mechanisms -- USNs, Landscape, Desktop Notifications, Byobu, /etc/motd, etc.
Q: What about non-security bug fixes, stability, performance, or hardware enablement updates?
A: Canonical will continue to provide Linux kernel updates addressing bugs, stability issues, performance problems, and hardware compatibility on our usual cadence -- about every 3 weeks. These updates can be easily applied using ‘sudo apt update; sudo apt upgrade -y’, using the Desktop “Software Updates” application, or Landscape systems management. These standard (non-security) updates will still require a reboot, as they always have.


The problem is usually not with the ISO or with the USB creator but with the BIOS itself.

To fix this problem, go to Bios Boot Menu and search for USB Mass Storage Emulation type.

Change Default: Auto to All Fixed Disc or something similar.


My screen doesn't turn off when VLC is open

1.

check for,

Tools => Preferences => Show All => Video => Disable screensaver

if you want to enable screen saver uncheck it.

Tools => Preferences => Show All => Advanced => Inhibit the power management daemon during playback

uncheck this to make monitor turn of while playing in vlc.

2.

try this script for respective options

#!/bin/bash

xset -dpms #do not allow turn off
xset s off #do not allow screen saver

xset dpms #Allow turn off if not work then try -dpms
xset s on #Allow screen saver
exit


Creating Virtual Box desktop with Linux on my mac

It is asking where your Ubuntu ISO is. If you have not downloaded it:

32-bit Ubuntu 16.04: http://releases.ubuntu.com/16.04/ubuntu-16.04-desktop-i386.iso

64-bit Ubuntu 16.04: http://releases.ubuntu.com/16.04/ubuntu-16.04-desktop-amd64.iso

Then select the file. :)


Created wifi network not showing on other devices

Did you use the 'Create New Wi-Fi Network' option in the context menu of network-manager? For some reason, that option is a little bugged. I've not been able to get it working either.

Anyway, I managed to share my ethernet network connection via WiFi to other devices using this method:

Click on network-manager and then on 'Edit Connections'
Create a new WiFi connection and give it an SSID, e.g. WiFi Hotspot.
Switch to the 'Wi-Fi Security' tab, choose WPA & WPA2 Personal, and give your hotspot a password.
Switch to the IPv4 tab and change the method to 'Shared to other computers' option.
Save and close the connection settings window, and try connecting to your hotspot on your other device(s). It should work and give them internet access through your computer.


gnome-screenshot taking shots randomly, also affecting Google Sheets

Your Prt Sc key (or whatever it is labelled on your keyboard) is most likely faulty. When gnome-screenshot is installed, that key initiates a screenshot and is not propagated to applications. When it is uninstalled, the key press is ultimately propagated to Google Sheets which results in clearing and editing the selected cell. When pressed continously, it will also prevent you from navigating in nautilus' location bar and immediately close taskbar menus.

To confirm this, install evtest, run sudo evtest in a terminal and select your keyboard. Leave it running. As soon as the problem occurs, don't press any key and switch to the terminal. There will be lines containing KEY_SYSRQ.

The obvious solution is of course replacing the keyboard. However, if it is a builtin laptop keyboard, that may not be an option.

As a workaround, you can remap the key's scancode to a key that usually has no effect, like unknown. I have written instructions for this here. Keep in mind, though, that you won't have a SysRq key then, unless you remap another key (maybe one you never use) to SysRq. This won't prevent the faulty key from sending X key events and it will still interfere with nautilus (but not the taskbar).

Another workaround would be disabling the whole keyboard using xinput --disable [id] where [id] is the device's id you can obtain with xinput list. You'll then have to use an external keyboard, but the faulty key's events are not propagated beyond the X server and won't interfere with applications.


Want to install Kodi 16.1 on Ubuntu 16.04, NOT Version 17

Kodi 17 has just been released. There are many things to iron out, others to improve and, of course, icons/themes and other eye-candy as well as many addons will need to be updated for the new version. This should be expected for any new major version.

That said, installing the old version, Kodi 16.1 is easy. However, you need to uninstall Kodi and remove the stable PPA before installing the 16.1 version.

sudo apt install ppa-purge
sudo ppa-purge ppa:team-xbmc/ppa

Now add the PPA for the old version and install:

sudo apt-add-repository ppa:team-xbmc/kodi-old
sudo apt update
sudo apt install kodi


That happens if zoom desktop client is not running. Make sure zoom client is running and zoom applet is being shown. Then, clicking on the link should give you the following window

Click on remember my choice


Quick solution: Open a terminal and run gsettings set org.gnome.nautilus.preferences show-hidden-files false

Slow solution:

Install dconf-tools via your favourite means (for example, running sudo apt install dconf-tools from the terminal)
Open a terminal and run dconf-editor
In the left hand panel, navigate to “org -> gnome -> nautilus -> preferences”
In the right hand panel, find the "show-hidden-files" option, and change the value to False


How to increase the size of apps interface

It's pobably to late for an answer but if you want to increase the interface size for spotify for everytime you start it you have to add some text to the launcher file of spotify. Depending on how you installed it the location of the "Starter" can vary. But what stas the same is the line you have to add:
--force-device-scale-factor=2

so that part has to go between the spotify and the %U like this:
[Desktop Entry]

X-SnapInstanceName=spotify

Type=Application

Name=Spotify

GenericName=Music Player

Icon=/snap/spotify/43/usr/share/spotify/icons/spotify-linux-128.png

Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/spotify_spotify.desktop /snap/bin/spotify --force-device-scale-factor=2 %U

Terminal=false

MimeType=x-scheme-handler/spotify;

Categories=Audio;Music;Player;AudioVideo;

StartupWMClass=spotify


I solved adding -f at the end (which prevent the daemon from exiting):
ExecStart=/usr/sbin/snmpd -Lsd -Lf /dev/null -I -smux,mteTrigger,mteTriggerConf -p /run/snmpd.pid udp:161,udp6:161 -f


PHP Code Returning the same datetime every time on server with ubuntu

Pablo welcome to Ask Ubuntu!
This Stack Exchange is designed for questions specifically about Ubuntu, for questions regarding programming like PHP, I suggest you try over at Stack Overflow in future.

Regardless, you're time format is incorrect.

h refers to the month, since we're in december, it's showing you 12.

Minutes are formatting as i

so $var = date('h:i:s', mktime()); will get you the results you need.

See the official documentation here for further info.


Can unity-webapps make the target refresh?

I don't think reloading a webpage without direct command from user is a good idea. Imagine yourself reading something then suddenly browser reloads the page.

Better approach would be getting massage count from API or something, or requesting another page once in a while (via ajax) and fetching message-count and others from there.

update:

because webapp userscript is just normal javascript attached to special pages from the browser, you can request pages via ajax as discussed here. Obviously you can skip the parts for IE6 and 7 in the code.

I'm not sure if you can use jQuery or not because your script might be loaded before everything else and it is not used in tutorials. I don't think depending on jQuery would be good idea anyway.


software updater not updating ubuntu 13.04

Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo apt-get update && sudo apt-get upgrade

Once its done, run Update Manager to install the updates again. It should work now.


How to remove weather indicator for one user?

I went to /etc/xdg/autostart and found an "NoDisplay=true" entry in indicator-weather.destkop file. After this key being commented on (with #) the weather indicator was shown in "startup applications" (and menus). So, it can be checked/uncheck by user settings.

Resolved with your help. Thanks.


aspell - Error No word lists can be found for the language

Use --lang flag:

aspell --lang=en_US -c file.pdf

or:

LANG=en_US aspell -c file.pdf

From man aspell:

  --lang=<string>, -l <string>
                          Language  to  use.  It follows the same format of the LANG environmental variable on most systems.  It consists of the two letter ISO 639 language code
                and an optional two letter ISO 3166 country code after a dash or underscore.  The default value is based on the value of the LC_MESSAGES locale.


Ubuntu 13.04 on 2013 15" Macbook Pro Retina Display with Apple 27" Thunderbolt Display

was looking to get this thunderbolt display to work for a long time. couldn't get it to work. Will sound absurd, however I went to passwords and keys, removed the Login key (capital L) and created a new one called 'login' (small l).
Now everything (thunderbolt display included) works like a charm... hope that helps.


How to detect which init script starts zram?

Try this (adapting the initrd location):
$ mkdir /tmp/x
$ cd /tmp/x
$ zcat /boot/initrd.img-3.8.0-31-generic | cpio -i
$ grep -lR zram .
./scripts/init-top/compcache
./lib/modules/3.8.0-31-generic/kernel/drivers/staging/zram/zram.ko
./lib/modules/3.8.0-31-generic/modules.dep
./lib/modules/3.8.0-31-generic/modules.dep.bin
./lib/modules/3.8.0-31-generic/modules.order
./sbin/compcache-enable
./etc/udev/rules.d/80-compcache.rules

The second last is the culprit, the last one shows the calling parameters. The script /etc/init/zram-config.conf wants to make one zram device per core, the one above is making a single one with 50%.
I can confirm that the last sector is bad in /dev/zram, probably an off-by-1 bug. A system with zram and the default settings will crash when it tries to use that sector. The options I see:

Add swapoff /dev/zram0 to /etc/rc.local (Most basic).

Blacklist zram (But will this unload it first? Because it's loaded in the initial ramdrive).
Otherwise, if you want to use the zram, you must add -c to the relevant mkswap, and hope for the best, i.e., that everything works apart from the last sector. Reference: this post

Add the -c to sbin/compcache-enable from inside the initrd image and repack (lost with kernel upgrades).

Add -c to /etc/init/zram-config.conf. You also need a swapoff and rmmod before its modprobe, because the zram is already set when it runs, so setting the size will fail.

I chose 3 for now, but dmesg is still polluted with those Buffer I/O errors. I'll be watching for crashes, now at least I know where they come from.


How to access internet on laptop from Blackberry 9300 curve mobile using Bluetooth connection

You cannot establish an Internet Connection using Bluetooth. You can try it with the so called "tethering".

If you already knew it, but don't know if your Blackberry phone will support it, then check it on the web if possible. (Which is, the most probable thing to do when you don't know about something.)

I had also found something interesting on the web. Check: tether.com.


How do I enter a directory on a different hard drive using cd in the terminal?

lsblk as well as mount show a list of all mounted (block) devices and their mountpoint, i. e. the access point to the device's content. To change to this directory, in a terminal do:

cd /path/to/dir

To set a default directory for every new terminal session, just add this line to the .bashrc file in your home directory. The following command does this automatically, you just need to enter the right path after cd:

echo 'cd /path/to/dir' >> ~/.bashrc


I was having the same problem, this worked for me after a lot of struggle and research, restart ubuntu and at login screen press ctrl+alt+F1 and login using your account this will take you to a terminal
First, remove all the nvidia packages by:

sudo apt-get purge nvidia-*
sudo reboot

Again press ctrl+alt+F1 at login screen
Then, Install nvidia packages by:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo ubuntu-drivers autoinstall
sudo reboot

Next, time you boot you will get a black screen instead of login most probably if not you are done.
If you get a black screen, press ctrl+alt+F1 again and do the following:

cd /etc/X11

check whether there's a file of xorg.conf by:

ls | grep xorg.conf

It should be xorg.conf and not xorg.conf.*
If not present do the following:

sudo nvidia-xconfig

Now edit the file as follows:

sudo nano xorg.conf

Under the Section Device, Identifier intel change Driver from "intel" to "modesetting"
i.e: from

Driver "intel"

to

Driver "modesetting"

Now save the file and exit nano and do the following.

sudo chattr +i xorg.conf
sudo reboot

I hope this solves your problem, if there are any queries let my know. Thank You!

These links helped in the answers:

Idea of changing driver to modesetting from intel

2.Modern way to install nvidia drivers


If you use --hidedegreesymbol option and the A goes away, then it's probably because the degree symbol is being incorrectly converted to/from utf8.

OTOH if you use --hideunits and the A goes away, then it's likely a bug in the system.

Either way you should report the issue to the conkyForecast creator Kaivalagi to try and get a fix. Because either way it's hard to use.


What task to select in tasksel during lubuntu alternate install to get a default system

Yes, the Lubuntu Desktop task is all that is required. If you loot at /usr/share/tasksel/ubuntu-tasks.desc:

Task: lubuntu-desktop
Section: user
Description: Lubuntu Desktop
 This task provides the Lubuntu (Ubuntu LXDE environment).
Key:
 lubuntu-desktop
Packages: task-fields

In Ubuntu, each of the major flavour has a -desktop package named after it. Starting from an installation of ubuntu-standard or ubuntu-minimal,  installing the -desktop package is all that's needed to get the corresponding flavour setup. In this case, you can see that this task installs the lubuntu-desktop package, which is exactly what you need.

If a default Lubuntu installation comes with a Samba server or a print server, then lubuntu-desktop will depend on these directly or indirectly. So you do not need to select these tasks unless you explicitly want to install them.


I lose the image when start installation of ubuntu 11.10

Did you MD5 test the .iso image before you burned it to CD/DVD or wrote it to the USB flash drive? If not, please do that now. If that doesn't check out, you'll have to redownload the .iso image, MD5 test the new image, and (assuming the new one checks out) burn a new disc or write it to the USB flash drive again.

Did you verify that the live CD/DVD/USB was written correctly and is readable by the machine on which you're installing? To do that, boot from it, and immediately when you see the person and keyboard icons at the bottom center of the screen, press Spacebar, select your language, and select "Check disc for defects". (This goes for USB flash drives as well as CD's and DVD's.) If that doesn't check out, you'll have to burn a new disc or re-write the .iso image to the USB flash drive (and run this test on it again).

If the installation medium checks out as described above and you still have this problem, it can most often be solved by using the nomodeset boot option. After installing, you'll probably need to specify nomodeset when booting the system, and then make the setting permanent (all of which is detailed in that forum thread). However, it is possible that after installing you may be able to enable different video drivers in Additional Drivers to fix the problem, as well.

If the above advice does not help, please edit your question to include the make and model of your video card.


In your blacklist.conf change blacklist videodev to install videodev /bin/false
update-initramfs -u
reboot

For more details see Kernel Modules Blacklisting on the Arch Wiki:

  Blacklisting

  Blacklisting, in the context of kernel modules, is a mechanism to
  prevent the kernel module from loading. This could be useful if, for
  example, the associated hardware is not needed, or if loading that
  module causes problems: for instance there may be two kernel modules
  that try to control the same piece of hardware, and loading them
  together would result in a conflict.

  Some modules are loaded as part of the initramfs. mkinitcpio -M will
  print out all automatically detected modules: to prevent the initramfs
  from loading some of those modules, blacklist them in
  /etc/modprobe.d/modprobe.conf. Running mkinitcpio -v will list all
  modules pulled in by the various hooks (e.g. filesystems hook, block
  hook, etc.). Remember to add that .conf file to the FILES section in
  /etc/mkinitcpio.conf, if you have not done so already, and rebuild the
  initramfs once you have blacklisted the modules, and reboot
  afterwards.

  Using files in /etc/modprobe.d/

  Create a .conf file inside /etc/modprobe.d/ and append a line for each
  module you want to blacklist, using the blacklist keyword. If for
  example you want to prevent the pcspkr module from loading:

/etc/modprobe.d/nobeep.conf

# Do not load the 'pcspkr' module on boot.
blacklist pcspkr

  Note: The blacklist command will blacklist a module so that it will
  not be loaded automatically, but the module may be loaded if another
  non-blacklisted module depends on it or if it is loaded manually.

  However, there is a workaround for this behaviour; the install command
  instructs modprobe to run a custom command instead of inserting the
  module in the kernel as normal, so you can force the module to always
  fail loading with:

/etc/modprobe.d/blacklist.conf

...
install module_name /bin/false
...

  This will effectively blacklist that module and any other that depends
  on it.


Touchegg Setup issues on Ubuntu Gnome 14.04 - Macbookpro 11,1

it does work with Ubuntu Gnome 14.04, not Unity.

In unity, by default, you won't get 3 and 4 finger gestures using touchegg (they are reserved). You can try the workaround in the blog you mention but I can't tell if it still works in Ubuntu 14.04. 1 and 2 finger gestures should still be possible to manage using touchegg.

  only when terminal is open

You have to launch a touchegg daemon. Alternatively to the instructions you followed, in Ubuntu you can add it graphically in the Startup Applications manager (included in the OS, you don't have to install it). Open it and add the following element:

Name: touchegg
Command: /usr/bin/touchegg
Comment: Launch touchegg

and restart your session.

To edit your gestures easily, you can use a GUI. The official one is in touchegg's download list and there's also the alternative project Touchégg-GCE mentioned in the site's wiki, although I've had some issues with it: elements disappear from the list when trying to add/modify them.


I've found the solution !
Basically the Bash binaries were deleted from my computer.

i've used : http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd

to try to get access to root and i've found out that there was no bash

--fixed


This works:

clear

echo "Your filesystem is threatned, files should be moved in order to guarantee safety!!!!"

while read file; do
    if [[ -f "$file" ]]; then
        echo "File is safe to secure"
        break
    else
        echo "Too late, we lost the file, safe another!"
    fi
done

echo "Time is running out, we must secure this file inmidiately, quick give me a safe location!"

while read path; do
    if [ -d "$path" ]; then
        echo "the location is secure! Move the file!"
        break
    else
        echo "Either the file or the safehouse is corrupt, quick try again!"
    fi
done

You need to add break statements to exit the loop when a valid file/path is found. Also, don't use CAPITALS for variable names.


This doesn't always work, but going into the Linux console mentioned by Jay (ctrl+alt+F1), and moving/deleting .Xauthority in your home directory (example: /home/arpan/.Xauthority) may help.

I've had this problem on my own computer, and it fixed it.  However, this same problem arose on another computer, and this did not resolve the problem.


You can use stock Gnome in Ubuntu.  You can install it from the command line:

  sudo apt-get install ubuntu-gnome-desktop

But, I think it may be an older version.

Mate is the development continuation of Gnome 2.

Installing Ubuntu Mate then Gnome will result in the same Gnome being installed as installing stock Ubuntu then Gnome.


I found out the problem. The file /etc/default/tomcat8 was corrupted.
It had some junk characters. I removed the erroneous characters and fixed the file and removed tomcat8 entirely and reinstalled tomcat8 successfully.

Even installing VirtualBox (which failed earlier due to tomcat8 errors) was successfull.

Thanks everyone for your help.


Load average high on only one of 16 HP workstations

When top does not identify CPU usage or I/O wait as the source of the load average, then typically it is a task or tasks in uninterruptible sleep (one task in your case). Identify them with this command:

ps -e -o state,pid,cmd | grep ^D

vmstat can also be used, but only to give the number of tasks in uninterruptible sleep. Example:

doug@doug-64:~$ vmstat
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
0  0    168  69980 124836 2525672    0    0   252    29    1    0  0  0 99  0

where tasks in uninterruptible sleep are under the "b" column under "procs".

It would be highly unusual to observe any constant non-zero number in the "r" column (processes waiting for run time) without also observing CPU usage and or I/O wait. In the two examples below, one is for an unloaded system and one is for a loaded system.

doug@s15:~/cse$ vmstat 10 10
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
 1  0  99072 3302096 415420 7927960    0    0     2     9    4    0  2  0 98  0  0
 0  0  99072 3302320 415420 7927960    0    0     0     4   68  160  0  0 100  0  0
 0  0  99072 3302304 415420 7927960    0    0     0     9   62  132  0  0 100  0  0
 0  0  99072 3302064 415420 7927960    0    0     0     0   63  138  0  0 100  0  0
 0  0  99072 3302040 415420 7927960    0    0     0    12   66  155  0  0 100  0  0
 0  0  99072 3302024 415420 7927960    0    0     0    16   90  150  1  0 99  0  0
 0  0  99072 3302008 415420 7927960    0    0     0     6   61  131  0  0 100  0  0
 0  0  99072 3301868 415424 7927960    0    0     0     5   72  167  0  0 100  0  0
 0  0  99072 3301852 415432 7927956    0    0     0    13   66  145  0  0 100  0  0
 0  0  99072 3301836 415432 7927960    0    0     0    12   63  133  0  0 100  0  0

doug@s15:~/temp$ vmstat 10 10
procs -----------memory---------- ---swap-- -----io---- -system-- ------cpu-----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st
13  0  99072 1271288 415992 9952884    0    0     2     9    4    0  2  0 98  0  0
13  0  99072 1271304 415992 9952884    0    0     0     0 2670 1198 99  0  1  0  0
13  0  99072 1270932 415996 9952884    0    0     0    12 2696 1240 99  0  1  0  0
13  0  99072 1270916 415996 9952884    0    0     0     1 2662 1166 99  0  1  0  0
13  0  99072 1270800 416000 9952884    0    0     0     1 2666 1205 99  0  1  0  0
13  0  99072 1270636 416004 9952884    0    0     0    18 2720 1264 99  0  1  0  0
13  0  99072 1270644 416004 9952884    0    0     0     3 2670 1170 99  0  1  0  0
13  0  99072 1270520 416004 9952884    0    0     0     0 2673 1218 99  0  1  0  0
14  0  99072 1269116 416008 9952888    0    0     0    14 2692 1250 99  0  1  0  0
14  0  99072 1271140 416008 9952888    0    0     0     1 2662 1168 99  0  1  0  0

doug@s15:~/temp$ uptime
 14:46:47 up 12 days, 22:23,  4 users,  load average: 12.59, 12.15, 8.31

If some sort of hung process in the queue is suspected, try this to identify:

ps -e -o state,pid,cmd | grep -v "ps -e -o" | grep ^R

Example (where I have 3 heavy processes running, properly):

doug@s15:~/temp$ ps -e -o state,pid,cmd | grep -v "ps -e -o" | grep ^R

R  9827 ../c/consume 90.000000 50.000000 100.000000
R  9828 ../c/consume 90.000000 50.000000 100.000000
R  9829 ../c/consume 90.000000 50.000000 100.000000

Do the command a few times to help identify the real culprit, as there may well be spurious real processes running.

The last thing to try is to just look at the entire list of threads for any anomalies. Example:

doug@s15:~/ubuntu-help$ ps -e -o state,pid,cmd
S   PID CMD
S     1 /sbin/init
S     2 [kthreadd]
...
S 17579 [kworker/u16:0]
R 17613 ps -e -o state,pid,cmd
S 22071 [kworker/0:0]

Where anything other than "S" or "R" in the first column is of interest. Perhaps filter the list with:

ps -e -o state,pid,cmd | grep -v ^S


Update: for native touchscreen support (non chroot), I have posted on my google+ page on how I enabled the touchscreen

https://plus.google.com/114358706658341629084/posts/Q9B4DiqWZ5E

If you use crouton to install/run Ubuntu 13.10, the touchscreen will work fine on the c720p. This is because it uses chroot and thus executes under the same kernel provided by ChromeOS.

I am running the Cinnamon desktop and have about 1.2 GB of RAM free after I start Ubuntu cinnamon and cairo-dock. You can easily toggle back and forth from ChromeOS at any time. Swap is on by default, so you get an extra 2GB of slow RAM there if you need it.

1) download and reference crouton to get it installed. It is just a binary, but it is best to read the readme here before you get started.

https://github.com/dnschneid/crouton

2) I used the following crouton command to install saucy with Cinnamon, Chrome and some other packages.

sudo sh -e ~/Downloads/crouton -r saucy -t gtk-extra,cinnamon,audio,core,chrome,cli-extra,keyboard

3) To start the Ubuntu desktop crouton has installed:

sudo startcinnamon

4) Managing packages will need to be done with the command line apt or you can install synaptic like I did.

sudo apt-get install synaptic

To run use:

sudo synaptic

(Not sure why apps don't request sudo properly when launched from the cinnamon GUI menu. I just installed this last night and don't have it all figured out yet!)


PHP not printing correctly after 17.04 -> 17.10 upgrade

Examining /etc/apache2/mods-available/ there are files:
php7.0.conf, php7.0.load, php7.1.conf and php7.1.load .

Examining /etc/apache2/mods-enabled/ :
there is no php*

So $ sudo a2enmod php7.1.conf gives:
Error: module php7.1.conf does not exist!
[Why ???]

$ sudo a2enmod php7.1.load gives:
Enabling module php7.1
To activate the new configuration, you need to run:
systemctl restart apache2

$ sudo systemctl restart apache2
$

And it works!
I would be interested to know exactly why.


Trying to install R 3.6.1, but having issue in ubuntu

You're trying to install 19.04 (disco) version of r-base whilst you're using 18.04 (bionic), that's why it throws an errors.

You have to remove the disco repository.

sudo add-apt-repository --remove 'deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/'

Then replace it with bionic which is compatible with your current system.

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base

Source


Back up Evolution mail (settings, messages and attachments)

Evolution uses (3) folders for storing its data/config:

$HOME/.cache/evolution
$HOME/.config/evolution
$HOME/.local/share/evolution

A simple tar command should do this trick:

tar cvpzf evolution_backup.tar.gz $HOME/.cache/evolution $HOME/.config/evolution $HOME/.local/share/evolution

You can probably skip the cache directory, as it should get rebuilt automatically.


Ubuntu 20.04 seems slower then 18.04 on my desktop

The difference between Ubuntu 18.04 and Ubuntu 20.4 is enourmous. You need to choose what is best for your PC, as one will work better depending on your hardware. For older PCs 18.04 is recommended. The best you can do is switch the driver for the video card or the video card itself, at least for inexperienced users. This is done from the "Activities -> Software & Updates -> Additional drivers". If a driver is available for your video card. Otherwise you will see nothing in this menu. You have to wait a little, because sometimes the driver list is loaded slowly.


I've come to the same issue very recently (this week or the previous). What has been working for me is combination of @richbl s answer somewhere just here around, @morhook answer in this thread and my own answer in this one. I post it all here to have it in one place.

What I did to make the hibernation work again on my ASUS U36SD running Xubuntu 16.10 "Yakkety Yak":

Stop using sudo pm-hibernate - it is not working any more.
Modify the /etc/default/grub so that the GRUB_CMDLINE_LINUX_DEFAULT variable contains also pci=nomsi resume=UUID=XXXXXXXX, where XXXXXXXX is the UUID of the swap partition. To determine the UUID of your swap, use:

lsblk -o name,fstype,uuid

Full example here:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pci=nomsi resume=UUID=d30170d7-b3a2-38c5-a386-541a6d0013c7"

Update the new grub configuration:

sudo update-grub

Create a new file com.ubuntu.enable-hibernate.pkla in /etc/polkit-1/localauthority/50-local.d/:

sudo nano /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla

and fill it with this content:

[Re-enable hibernate by default in upower]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=yes

[Re-enable hibernate by default in logind]
Identity=unix-user:*
Action=org.freedesktop.login1.hibernate;org.freedesktop.login1.hibernate-multiple-sessions
ResultActive=yes

If you are using encryption, you must tweak it a little bit more - it is well described here.
Reboot the computer.
You should now be able to see the hibernate option in the poweroff menu and it should work.


How do I make my Dell XPS 13 Developer Edition touchpad work correctly in 18.04?

I had the same problem (xps13, update to 18.04) and did the same as in Synaptic touchpad on laptop not working:

sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps


I don't think the binary nVidia driver provides this sort of functionality, and it would have to be provided by the driver.  I'm not familiar enough with the binary driver to rule this out, though.

The open-source nouveau drivers do send a signal on monitor hotplug, and that's caught by GNOME, so things should Just Work™ with them.


Why did /usr/lib/php5/sessionclean run 50 times simultaneously on my 14.04 system?

Yes, the lsof checks the all filesystems for open files, so this is likely the course.  You should probably use 'soft' option on your NFS mount if that might happen often.


Is it better to use the Ubuntu supplied ATI drivers or the drivers direct from AMD?

The current ATI drivers present on the Ubuntu repos are buggy and have performance issues.

11.8 will run Unity poorly and will refuse to run Gnome Shell and 11.9 will not be much better in terms of performance and will run Gnome Shell poorly.

I strongly recommend installing any of the ATI driver from version 11.10 up.

There is a post that explains how to install, remove and restore drivers.

Install, remove, restore ATI drivers in Ubuntu

Since your card is on the supported hardware list I see no reason why you should be running the outdated drivers in the repos.


Fastest Net Card Option in Virtualbox with Ubuntu

These all behave very differently -- I don't think you should choose one over another because of speed. I suggest you use NAT. This will make your VM look like just another application on your host machine. The other possibility is Bridged Adapter, but that will require the VM to acquire it's own IP address which may be a problem in some environments.


No hard drive how can i install this tool/os?

If your systems BIOS/UEFI does not recognise that hard drive, chances are low that you can recover anything with ubuntu.

What you can try is to enter your systems BIOS/UEFI, load the defauls, save and exit, then shut down your system, unplug power, then unplug data and power cord from your hard drive, wait ten minutes, replug power to the system, boot it with an ubuntu live cd/usb, replug power cord to your hard drive and then replug data cord as last.

If it gets recognised then you can maybe get off some data from your drive.


Centrino Wireless-N 1000 takes forever to connect and keeps asking for password

try to tune the buffer size

sudo echo 83886080 > /proc/sys/net/core/wmem_max


I solved the problem using the instructions in: http://seanelvidge.com/2017/01/install-g77-on-ubuntu-14-04/ as follows:

sudo find /usr/ -name "crti.o"
gedit ~/.bashrc

then adding to the end of the file

LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LIBRARY_PATH
export LIBRARY_PATH

save and close then

source ~/.bashrc


What Terminal command will dump all Gconf keys and values? ie the ones seen in gconf-editor

To list all keys and values:

gconftool-2  --recursive-list /

To list all keys and values in xml format:

gconftool-2  --dump /

See man gconftool-2 for more info.


Dual monitor with different resolutions problem

Are you trying to have two displays or use the external as your primary monitor?

I think when two monitors are plugged in and they share the desktop (duplicate display) it will limit the display to the smallest resolution. try splitting the displays then adjusting the resolution of your external to what you need. and make sure you boot with it already plugged in.


Access boot priority menu
The boot priority settings are often found under the Boot tab of the computer's BIOS/UEFI utility. The BIOS/UEFI utility can be accessed by pressing the key which is shown on the manufacturer's splash screen when booting. This is the F12 key on many computers. The keys to press, such as F12, F2, Del or Esc, differ on computers from different manufacturers. When grub bootloader is installed it does not change the key which is used to access the BIOS/UEFI utility.
There is a table of keys used to access the BIOS/UEFI setup utility grouped by manufacturer and computer model at this answer.
Access GRUB menu
Immediately after the BIOS/UEFI splash screen during boot, with BIOS, quickly press and hold the Shift key, which will bring up a GNU GRUB menu screen. With UEFI press (perhaps several times) the Esc key to get to the GNU GRUB menu screen. Sometimes the manufacturer's splash screen is a part of the Windows bootloader, so when you power up the machine it goes straight to the GNU GRUB menu screen, and then pressing Shift is unnecessary.


How to use IPtables for load balancing in gateway

WARNING: READ THROUGH FIRST BEFORE EXECUTING

DISCLAIMER: Untested

Prerequisites:

Install the iptables persistent package

sudo apt-get install iptables-persistent

Backup your existing iptables rules:

sudo iptables-save > ~/iptables-export

Restore:

sudo iptables-restore < ~/iptables-export

Flush the former iptables rules:

sudo iptables -F && sudo iptables -t nat -F && sudo iptables -t mangle -F && sudo iptables -X && sudo iptables -t nat -X && sudo iptables -t mangle -X

Steps:

Add a new "route table" using this command from your terminal to handle the packets from one of the NIC's:

sudo bash -c 'echo "1 rt2" >> /etc/iproute2/rt_tables'

Enable ipv4 forwarding

sudo sysctl net.ipv4.ip_forward=1
sudo sysctl -p

Add filter that allows "masquwerading"

sudo iptables -t nat -A PREROUTING -i enp4s5f1 -p tcp --dport 80 -j DNAT --to-destination 192.168.2.90
sudo iptables -t nat -A PREROUTING -i enp4s5f0 -p tcp --dport 80 -j DNAT --to-destination 192.168.2.90

sudo iptables -t nat -A POSTROUTING -o ens2 -j MASQUERADE
sudo netfilter-persistent save
sudo netfilter-persistent reload

Edit the /etc/network/interfaces file and add the configuration for the
second NIC, but ofcourse make a copy of the old one,

sudo cp /etc/network/interfaces /etc/network/interfaces.bkup:

iface enp4s5f1 inet static
    address <YOUR_NIC_ADD>/24
    netmask 255.255.255.0
    post-up ip route add 192.168.10.0/24 dev enp4s5f1 src 192.168.10.33 table rt2
    post-up ip route add default via 192.168.10.1 dev enp4s5f1 table rt2
    post-up ip rule add from 192.168.10.33/32 table rt2
    post-up ip rule add to 192.168.10.33/32 table rt2

Restart network manager:

sudo  systemctl restart NetworkManager.service

Add iptable rules:

sudo iptables -t nat -A PREROUTING -i enp4s5f0 -m state --state NEW -m statistic --mode nth
 --every 5 --packet 0 -j DNAT --to-destination 192.168.2.26

sudo iptables -t nat -A PREROUTING -i enp4s5f0 -m state --state NEW -m statistic --mode nth
 --every 4 --packet 0 -j DNAT --to-destination 192.168.2.27

sudo iptables -t nat -A PREROUTING -i enp4s5f0 -m state --state NEW -m statistic --mode nth
 --every 3 --packet 0 -j DNAT --to-destination 192.168.2.28

sudo iptables -t nat -A PREROUTING -i enp4s5f0 -m state --state NEW -m statistic --mode nth
 --every 2 --packet 0 -j DNAT --to-destination 192.168.2.29

sudo iptables -t nat -A PREROUTING -i enp4s5f0 --to-destination 192.168.2.30

=====================================

    sudo iptables -t nat -A PREROUTING -i enp4s5f1 -m state --state NEW -m statistic --mode nth
     --every 5 --packet 0 -j DNAT --to-destination 192.168.2.21

    sudo iptables -t nat -A PREROUTING -i enp4s5f1 -m state --state NEW -m statistic --mode nth
     --every 4 --packet 0 -j DNAT --to-destination 192.168.2.22

    sudo iptables -t nat -A PREROUTING -i enp4s5f1 -m state --state NEW -m statistic --mode nth
     --every 3 --packet 0 -j DNAT --to-destination 192.168.2.23

    sudo iptables -t nat -A PREROUTING -i enp4s5f1 -m state --state NEW -m statistic --mode nth
     --every 2 --packet 0 -j DNAT --to-destination 192.168.2.24

    sudo iptables -t nat -A PREROUTING -i enp4s5f1 -j DNAT --to-destination 192.168.2.25

    sudo netfilter-persistent save
    sudo netfilter-persistent reload

Source:

https://scalingo.com/articles/2018/04/20/iptables.html

https://www.webair.com/community/simple-stateful-load-balancer-with-iptables-and-nat/

http://ipset.netfilter.org/iptables-extensions.man.html

https://www.linuxquestions.org/linux/answers/Networking/Spanning_Multiple_DSLs

How to save rules of the iptables?

https://linuxconfig.org/how-to-restart-network-on-ubuntu-16-04-xenial-xerus-linux


Convert images into PDF without ImageMagick hacks

sudo apt install img2pdf
img2pdf -o document.pdf picture.jpg

lossless conversion of raster images to pdf

Multipage:
img2pdf -o document.pdf page1.jpg page2.jpg


how to make startup application to open the folder or inode/directory after booting?

you need to edit your /etc/fstab file in order too mount the external hard drive partition on boot.
To do this type the following:

You need to get the UUID of your external hdd, type:

sudo blkid /dev/sda4

copy the line UUID="some-long-number"

now unmount the disk and make a folder to mount it in the future:

sudo umount /dev/sda4

then:

sudo mkdir /media/almacén

now type:

sudo nano /etc/fstab

and go to the end of the page using your arrow keys.

now copy&paste the following

#external hard drive almacén was on /dev/sda4 at the time of writing.
UUID=some-long-number  /media/almacén       auto        defaults        0     2

where UUID=some-long-number is the UUID you got from the 'blkid' command earlier
 (BUT WITHOUT THE " " )

Shutdown your computer, plug the external hdd back in and restart.
Your drive partition 'almacén' should now be mounted on '/media/almacén' on login.


Input delay when using two keyboards under Ubuntu 18.04 (Xorg)

After being annoyed by this bug for a long time, i started digging and found a workaround. The bug is only present when i'm using certain keyboard layouts ("Portugues (Brasil)") and was not present when i changed the layout to US and language to English (need to set them both to English).

After some digging i found out the culprit is the ScrollLock key and that can be fixed by editing the layout file, which in my case is found at /usr/share/X11/xkb/symbols/br. The only modification i did was to remove or comment the line: modifier_map Mod3 { Scroll_Lock };
After that, set the language and layout back to Portugues (Brasil) and the problem was gone!

PS: I tried this on Fedora, but i believe it will work on Ubuntu.


Game Console Emulators (Nintendo, Super Nintendo, Sega Genesis, Nintendo 64, Gameboy...)

In the repository there are emulators for lots of different game consoles.

DGen  (Sega Genesis/MegaDrive).
FCE Ultra  (Nintendo 8-bit emulator).
FCEUX  (Another Nintendo 8-bit emulator).
MAME  (Multiple Arcade Machine Emulator).
Mupen64plus  (Nintendo 64 emulator).
PCSX  (PlayStation emulator).
PCSX-Reloaded  (Another PlayStation emulator, fork of pscx).
ZSNES  (Super Nintendo emulator)
VisualBoyAdvance  (Gameboy Advance emulator)
DeSmuME  (Nintendo DS emulator)
gngb  (Game Boy Color emulator)
Yabause  (Sega Saturn emulator)

There are also other emulators and compatibility layers for computers and systems, such as Wine , DOS, Amiga , Atari, Commodore .


Thunderbird: Show mails from sender - easy and fast

To search all emails in all folders, sent to or from a particular email address:

Right click on an email address and select "Copy Email Address"
Right click on the [Search... <Ctrl+K>] box  select Paste, then Enter or just type CtrlK, CtrlV, and Enter

However, you might not like Thunderbird's default search results view.

If you prefer the view when you click on "Open email as list", shown below

then the best solution is to install a Thunderbird plugin, which will make this the default.

From the menu select Tools > Add-ons
Type "search as" into the search box
Click the install button next to Search as list 3.0
Restart Thunderbird


Try going into CompizConfig Settings Manager and searching for workarounds.

Click on the only result:

then scroll down to the bottom and select the Force full screen redraws (buffer swap) on repaint check box:

Close CompizConfig and reboot and see if this helps.

This resolved a screen flicker I was having with my NVIDIA GTX 750 Ti, it's a known bug with NVIDIA drivers that's been around since 8.04.

I also did a blog post that goes over the entire process in more detail and provides some links.


Makefile 42: recipe for target 'util.o' failed

If you try this example you will see that the exit function is defined in #include

#include <stdio.h>
#include <stdlib.h>

int main () {
   printf("Start of the program....\n");

   printf("Exiting the program....\n");
   exit(0);

   printf("End of the program....\n");

   return(0);
}

The file util.cc, which gives error does not contain the inclusion of StdLib of C.
That's why the error.

The mistake was mentioned by Zanna in the previous comment.
In any case, ask the author, as he did to compile it. Since the 2003 publication, it seems that it worked for him.


WOW!

H264 is a high quality video codec but (as you refer), it makes "heavy" size video files.

I am not sure if your question is related to a GUI or Command Line task. But, assumming that you are using "Transmaggedon" I will write this considering the options for GUI applications.

In my case, I prefer the usage of "Mobile Media Converter" which works pretty fine in 32bit systems (both Ubuntu and MS based systems). And the creators have already released a 64 bit version nowadays.

What you wish is to make smaller size video files. Which can be done by changing the "video bit rate", which will give you the best quality, according to the video bit rate you request. In example: a 40MB video file (uncompressed, AVI) will fit in a 5MB video file (any codec) if you use a 800kbps video bit rate. But -of course- it may harm the quality.

I strongly suggest you to perform some testing using the Mobile Media Converter, which can be reached (.deb) by clicking the next link:

http://www.miksoft.net/mobileMediaConverter.htm

After installing, just drop any video files (preferably small for the test) into the drag and drop area, then open the Advanced options by clicking a small arrow that is placed at the very right of the window, below the "browse" button. "[ ... ]"

Next, click in "Advanced" and you will have all the options that you need in order to transcode your video and make small and good quality transcodification.

Remember: The higher video bit rate is, you will have better quality but the file size will become "heavier".

BTW: You can also transcode videos by using a non linear editing system, such as "Kdenlive" (http://www.kdenlive.org/) or "Openshot" (http://www.openshotvideo.com/) and many more. A non linear editing system will also be useful to edit the video (trim, crop, add text and more).

Good luck!

Here is a screenshot for you to see a few options of Mobile Media Converter in action.


Screen or tmux may be what you're looking for, preserving sessions alive independently from SSH.


How to find the command of an installed application?

If the installed application has installed a menu option, then right-click the menu at the top of the screen and choose Edit Menus.  If you are using Natty, type "alacarte" in the terminal

Navigate to the menu option and choose the Properties button - you'll then see the command to launch your application.


You need to execute second sudo as a argument to first sudo. It will looks like this:

#!/usr/bin/env bash
sudo -i -u user2 /bin/bash <<EOF
#commands here will be executed as user=user2
while IFS='' read -r i || [[ -n "$i" ]]; do
  echo "$i"
  sudo -u user3 script.sh "$i"
  echo "----------------"
done </tmp/hostlist
EOF

Testing:

$ echo 111 >/tmp/hostlist
$ echo 222 >>/tmp/hostlist
$ echo 333 >>/tmp/hostlist
$ ./loophosts
111
----------------
222
----------------
333
----------------