If you want an image to have any transparency you'll need to save it as a PNG. Jpegs don't support transparency.

Under your save as menu either change the file extension to .png or select png from the file type drop down menu as shown.


Ubuntu hangs after clicking shutdown button in menu bar

Found a solution. The culprit was the Caffeine GNOME Shell extension. Uninstalling that returned the shutdown behavior to normal.


Thunderbird only loads "inbox"? How about the other folders that already exists?

You need to select and right click on the folder and select Properties

and then Check the option When getting new messages for this account, always check this folder


Windows 10 update on dual boot, can't boot into ubuntu

Open terminal in Windows 10 (Administrator Mode)

Type bcdedit /set {bootmgr} "path\EFI\ubuntu\grubx64.efi"

Reboot. See if this helps?


My TP-Link TG-3269 I not been recognized on Ubuntu 18 and 16

I got it!

Today I was trying again to make my Wired Network turn on on Ubuntu, so I just take off the yellow cable of the network, and put again, so I realized that the LEDs of the card turn on again and the system recognize it, but just for one second,so I open the network options and let it on screen to see whats happening, so I take the cable off and put again and still connected until now! \o/

Here's the magic:

I really don't know what happens, but just works, I think that this post will not help another peoples to fix their problems, but I will let this post on...


Unable to start ubuntu after install Nvidia-driver DKMS failed

Problem solved after remove and reinstall the nvidia driver, using sudo apt-get purge nvidia* and sudo ubuntu-drivers autoinstall
And make sure you have solved nvidia dependencies.


How do I use the "no border" option in Compiz?

Through compiz there is problem: Enabling the Window decoration disable the Unity. If you don't want to use Unity (Replace it with Cinnamon or something else), and then use Window decoration in CCSM and remove 'any' Decoration Window.('any' is for applying decoration to all the windows).

If you want to use Unity then there is workaround or you can say its the way unity handle things. Unity handle window decoration through themes. So any change that has to be made in decoration has to be done through themes. Either you can make changes in the default theme which you are using or make a new theme by copying theme with other name.

cp -R /usr/share/themes/your_current_theme/ ~/.themes/your_new_themename

after this- Go to new theme -->gtk 3.0 ---> apps ---> unity.css

Open this and change -UnityDecoration-extents: 28px 0 0 0;

according to your need. For no border- change 28px 0 0 0 to 0 0 0 0.
Save the file.
For you new theme to use you need to download unity-tweak-tool

sudo apt-get install unity-tweak-tool

There you go to theme option and select your theme.

Theme change process is user based so you need to only log-out and log in to see the effects.

Source:How to set borders around windows in 14.04?


Release file for http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease is not valid yet

Make sure that the system clock is set to UTC, and is within a few minutes of UTC.


Processor frequency gets reduced and doesn't recover

This sounds like one of the two following bugs:

thermald incompatibility with the firmware/microcode.  Purge the thermald package, and do a full power cycle (power off+power on) on the system.
Regression caused when the processor microcode is updated.  Update the system firmware to the latest available (to get a newer microcode installed when the system is powered up), and ensure you have the latest intel-microcode package installed, i.e. ensure you have at least version 3.20160714.1 of the intel-microcode package.  Download and install it manually if you have to, I don't believe Ubuntu has propagated that update to all versions of their distribution yet.

References:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=815990

https://bugs.launchpad.net/ubuntu/+source/thermald/+bug/1480349


That was not a good idea to upgrade from this ppa.
You can try to fix it by

sudo apt-get install ppa-purge
sudo ppa-purge ppa:xorg-edgers/ppa

but there is no guarantee that all installed stuff is removed correctly.


How does the apt-get purge command work?

Yes, there are such files. In particular, *.list, *.postrm , and *.conffiles, which are all stored in /var/lib/dpkg/info directory.

The .postrm files are post-remove scripts, that run after a package is removed. Those scripts are responsibility of the package maintainers, and each script is tailored to the specific package. If you examine  /var/lib/dpkg/info/usb-modeswitch-data.postrm for example , you will see something like this:

#!/bin/sh
set -e
# Automatically added by dh_installdeb
dpkg-maintscript-helper rm_conffile "/etc/usb_modeswitch.d/230d:0001" 20101222-3 -- "$@"
# End automatically added section

There's also *.list and *.conffiles files, which are basically lists. gnome-terminal.list, for example, will list all files and directories created when gnome-terminal was installed. The *.list files are very useful for determining what installed what.  *.conffiles list all the config files for a package. For instance, while xterm.list gives all the files , `xterm.conffiles* gives only conffiles. In other words, the contents of conffile will also be present in list file.

$ cat /var/lib/dpkg/info/xterm.conffiles
/etc/X11/app-defaults/XTerm
/etc/X11/app-defaults/KOI8RXTerm-color
/etc/X11/app-defaults/XTerm-color
/etc/X11/app-defaults/UXTerm-color
/etc/X11/app-defaults/UXTerm
/etc/X11/app-defaults/KOI8RXTerm

I don't quite know how   *.conffiles work. My assumption is that the post-removal scripts take priority, and apt-get just uses those *.conffiles to double check that files listed there were removed.

As @A.B. properly reminded me, there are also *.prerm files, some of which do remove the .conf files, but not necessarily, for instance the one for xpdf app was removing the files in /etc/xpdf/includes directory


Trying to install nasm on my ubuntu 14.04 LTS but it get error

run the following commands in an open terminal:

sudo apt-get clean
sudo apt-get remove nasm-rdoff
sudo apt-get install nasm

If it gives you trouble, run this instead:

sudo apt-get clean
sudo dpkg -r nasm-rdoff
sudo apt-get install nasm

It looks like nasm provides RDOFF tools so nasm-rdoff is probably not needed.

http://www.nasm.us/doc/nasmdoc7.html#section-7.13


How do I remove those numbers from Kubuntu's task manager?

Short answer: I afraid you can't remove only <2> or <3> from appearing. There has to be a way to distinguish windows.

There is a workaround which I like and that is to use an alternate task manager which is available by default on a normal Kubuntu 18.04 system.

First, I see what you see with the default task manager with three Google Chrome windows:

With the default task manager, there is a way to collapse the three separate entries into one. See the answer by cipricus for more detail:

I prefer the alternate task manager widget* known as the Icons-only Task Manager:

*Note: to access the available widgets, click on the ☰ icon usually located at the right-end or bottom of your panel.

I also prefer a vertical panel and the images below are with a vertical panel:

Icons-only Task Manager with one Google Chrome window

Icons-only Task Manager with three Google Chrome windows

Notice the little green circle with a white plus-sign next to the Google Chrome icon. That indicates the presence of more than one window open for a particular program. The three entries to the right of the Google Chrome icon are there because I single left-clicked on the icon. I can then select the window I want to maximize (or whatever). Otherwise, those entries are not visible.


"Booting in Insecure Mode" message after 8/28/2017 GRUB2 update

The Easy Response

This message is displayed by the Shim (shimx64.efi) program as a way to tell you that the computer is booting with Secure Boot unavailable or disabled. It is not an error message and it does not indicate a problem -- unless of course you thought you were booting with Secure Boot enabled, which is presumably why the message is displayed in the first place.

The saying "if it ain't broke, don't fix it" applies in this case. Nothing is broken. At worst, it's a superfluous boot message that you can safely ignore. You can do so and nothing bad will happen. This is the safest and easiest approach to dealing with what is, fundamentally, not a problem.

If You Really Must Change It

If you're seriously annoyed by the message, you can remove it by bypassing Shim and booting GRUB directly. Be aware, though, that doing so means you will not be able to enable Secure Boot, should you decide you want to use it -- at least, not without reconfiguring the computer to boot through Shim. There's also a smallish risk of creating new problems, up to and including rendering your computer unbootable.

To bypass Shim, you must use the efibootmgr tool, or something equivalent in another OS. The procedure is:

Boot to Ubuntu
Open a Terminal window.
Type sudo efibootmgr -v. This will show you all your current boot entries. One of them will be called ubuntu and will reference shimx64.efi. There may be a second ubuntu entry that references grubx64.efi.
If you see a second boot entry that references grubx64.efi, you can change the BootOrder line by using the -o option to efibootmgr. This option sets a new boot order. Note the number of the grubx64.efi entry and pass it as the first option to -o, with the existing BootOrder entries filling out the rest. For instance, if your current BootOrder is 0007,000A,0000,0003 and the grubx64.efi entry is Boot0003, you'd type sudo efibootmgr -o 0003,0007,000A,0000.
If, OTOH, there is no existing grubx64.efi entry, you must create a new one with a command like sudo efibootmgr -c -d /dev/sda -p 2 -l \\EFI\\ubuntu\\grubx64.efi -L ubuntu, but change /dev/sda to the disk device on which your EFI System Partition (ESP) resides and change 2 (of -p 2) to refer to the ESP's partition number. Typing df /boot/efi will show you where your ESP is.
Reboot and hope it works.

Note that it's possible for the preceding procedure to render your computer unbootable, particularly if you need to create a new boot entry -- a typo can create an invalid entry, which will be ignored at best or lead to a boot failure at worst. This outcome isn't very likely, but you shouldn't dismiss the possibility entirely.

If this procedure confuses you, or if the risk of rendering your computer unbootable concerns you, please re-read the earlier part of my answer and reconsider making this change.

Note that the same task can be achieved in some computers' firmware (but the user interface varies), in an EFI shell by using its bcfg command, or in Windows by using the third-party EasyUEFI tool. If you're dual-booting with Windows, this last option is likely to be much easier than using efibootmgr in Ubuntu -- at least, if there's an existing direct-boot option for GRUB. If not, then adding such an option won't be much easier or safer using EasyUEFI than using efibootmgr.


steeldriver properly mentioned in the comments that for your specific purpose, it's better to use pkill -f , since filtering output of ps via grep has downside of grep command itself appearing  on the ps list.  By contrast, ,pkill doeesn't do that and performs cleanly.

As for general case where you'd want to run any command if a positional parameter to it is blank, there's two ways to approach it. One, save to variable and check if variable is not empty:

var=$(ps aux | grep '[p]ostgres'|awk '{print $2}')
if ! [ "x$var" = "x"  ]; then
    sudo kill "$var"
fi

The other way is via xargs and --no-run-if-empty (or short-hand -r):

ps aux | grep '[p]ostgres'|awk '{print $2}' | xargs --no-run-if-empty kill


Deleting the lock file is not a good idea, its there for a reason.

This typically means that there is still a process that holds the lock - any of synaptic, dpkg, apt-get.

What you can do is to run ps ax | grep <insert process name> and try to kill which show up.

Verify again if it is killed, if not use kill -9 <proc name>

Another easy solution is to simply restart.


Huge mouse cursor arrow after installing Nvidia drivers

I got the same problem and in the end, I just switched from lightdm to gdm and that fixed it.

sudo dpkg-reconfigure gdm

then reboot.


How do I add a Windows Live account to Empathy?

Try adding it through the "MSN" option with your username being "user@live.com".

Screenshot:


How to implement Libreoffice icon style via the terminal command line?

The icon styles are in /usr/share/libreoffice/share/config

$ ls -1
images_breeze_dark.zip
images_breeze_svg.zip
images_breeze.zip
images_colibre.zip
images_helpimg.zip
images_tango.zip
$

LibreOffice stores most user-set values in ~/.config/libreoffice/4/user/registrymodifications.xcu.

The icon names used in ~/.config/libreoffice/4/user/registrymodifications.xcu exclude images_ and .zip and aren't exactly the same as those seen in the Tools > Options > View > Icon style dropdown.

Currently, I'm using breeze_dark:

$ grep -i breeze registrymodifications.xcu
<item oor:path="/org.openoffice.Office.Common/Misc"><prop oor:name="SymbolStyle" oor:op="fuse"><value>breeze_dark</value></prop></item>
$

So if I want use colibre instead, , I would run

sed -ie 's/breeze_dark/colibre'

Caution: you need to run the sed command only after ensuring that no LibreOffice process is running.

The process is the same in LibreOffice 6.3.1 as it is in LibreOffice 6.0.7.


I don't think just copy/pasting the files containing the databases would work well. Your best option would be dumping the databases in .sql files and then restoring them when you install the system. It could be easily done with a web interface like phpmyadmin.

Also, when you copy the apache2 and /srv/www you may have to restore the privileges and owner (usually, files under www belong to www-data user and group).

Another thing, if you're going to do a fresh install, make sure you create separated partitions for /srv/www or /var/www (in the latest version, files are stored under /var/www/html)so the next time you can do an clean upgrade or even install without losing  your server files.


How may I burn srt subtitles to video with avconv?

Why subtitles filter is missing

Libav tends to ignore features from FFmpeg, so avconv and their counterfeit "ffmpeg" (removed as of 14.04) do not support libass, and therefore does not support the subtitles video filter among many other filters.

How to fix

You have several options to get the real ffmpeg from FFmpeg:

Download a ffmpeg binary - The easiest option.
Compile - Allows full customization.
Use mc3man's PPA - For 14.04 users
Upgrade your Ubuntu - FFmpeg returned in 15.04

Usage

Hardsubs

This will "burn" the subtitles into the video, but of course requires that the video be re-encoded:

ffmpeg -i video.mkv -vf subtitles=subtitle.srt -codec:a copy output.mkv

Filters require re-encoding. See the FFmpeg H.264 Encoding Guide for encoding suggestions.
Since you probably do not want to re-encode the audio this example just stream copies (re-muxes) it.

Softsubs

Consists of a susbtitle stream that is muxed into the file. Any player worth using will allow you to turn the subtitles on and off and choose from other subtitle streams that may be present. Does not require any re-encoding.

ffmpeg -i video.mkv -i subtitle.srt -codec copy -map 0 output.mkv


As you are using very new GPU hardware, it is recommended to use the very latest stable drivers.

Install the latest stable NVIDIA drivers supporting GTX850 from the Proprietary GPU drivers PPA.

Open a terminal and execute :

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

To switch between intel and nvidia graphics - open NVIDIA X Server Settings -> Prime Profiles.

So when you want to use only the integrated card switch to intel - logout and back in - that's it !


How to dual boot Mac OS X and Ubuntu without rEFIt

I too am a OS X/Ubuntu User. Yes you can choose to hold Option (At least on my system) on start up, or you can go the route I took and install rEFInd (A newer version of the abandoned rEFIt), though rEFIt still functions fine (With a few outdated icons) and is easier to install. I'd recommend rEFIt or rEFInd personally, but if you really want to you can choose to just hold Option down on start up :)

Ubuntu 12.10 and OS X 10.8.2 W/ rEFInd on a Early 2011 MBP (My Setup)


From the terminal try running the following command to see what it does:

idle-python2.7

The command opens a new window of the IDLE (using Python-2.7) Integrated Development Environment for Python. idle-python2.7 is just an application, so it is safe to remove IDLE (using Python-2.7) from Ubuntu Software or from the terminal by typing:

sudo apt-get remove idle-python2.7


Installing Ubuntu onto externally mounted internal hard-drive

Logically, yes it will work and this is the secret power of Linux, since most drivers will be bundeled within the Kernel itself, then you'll not face much problems when moving some bootable storage device to another PC.

But you may face some problem mainly in two parts, the Video Card and the Wireless, so you have to install their drivers yourself such as
NVIDIA cards.


Command for deny whole 91.0.0.0/8 network is

 sudo ufw deny from 91.0.0.0/8

when you list rules

 sudo ufw status

you will see

To                         Action      From
--                         ------      ----
...
Anywhere                   DENY        91.0.0.0/8

This will deny any traffic from ip's witch start with 91.x.x.x
But I recommend to use smaller network ranges for deny traffic.
Based on your address list

sudo ufw deny from 91.200.12.0/24
sudo ufw deny from 91.213.126.0/24
sudo ufw deny from 91.207.7.0/24

UFW can not create rule based on logical names aka domains, but you can add rule using iptables in chain ufw-user-input

sudo iptables -A ufw-user-input --src vhoster.org -j DROP

this will deny traffic from whole domain vhoster.org ip's
To list this rules use command

sudo iptables -L


How to run a shell script _before_ systemd-udevd runs?

To answer the immediate question, you may simply write a .service unit that has a Before= ordering dependency on systemd-udevd.service:

[Unit]
Before=systemd-udevd.service

Be aware that systemd-udevd.service starts during early boot, so you will need to use DefaultDependencies=no as well and list any actually required dependencies by hand. Otherwise, you will get an ordering loop.

Throwing it all together, the unit can look something like this:

# /etc/systemd/system/udev-nvidia-hack.service
[Unit]
DefaultDependencies=no
Before=systemd-udevd.service
RequiresMountsFor=/lib/udev /etc/udev /path/to/script

[Service]
Type=oneshot
ExecStart=/path/to/script.sh

[Install]
WantedBy=sysinit.target

However, you will have a much better solution in examining the 71-nvidia.rules file as to why it ever affects the system when there are no matching devices to be found.


PPC Macs can't boot from USB; you will need to know your way around OpenFirmware.

The only bootloader I have used for PPC ("New-World" Macs) is yaboot and it seems to run from a USB stick. seems to require its own partition on a Linux-only system.

Edit: See the better answer elsewhere in this thread. That's a bit of work, though, and you still need to burn a CD to copy from.


You could use gparted. Install by opening a terminal by pressing Ctrl+Alt+T and typing:

sudo apt-get install gparted

If you would insist on using the disk utility:

sudo apt-get install gnome-disk-utility

Sorry for the short answer, but that's all. ;)


Why can't chrome "load plugin" for YouTube? (Which I assume is adobe flash player)

Despite claims that the latest update has fixed things ...

  The Stable channel has been updated to 24.0.1312.68 for Linux. This build contains the fix for Pepper Flash.

people may still be seeing the "can't load plug-in" error.

One workaround is to disable the Pepper Flash and use Adobe's if it's available. The Chrome browser will "see" the Adobe NPAPI Flash plug-in if it exists in ~/.mozilla/plugins.

For people who have installed Chromium as well, along with its goodies, the Flash plug-in will be in /usr/lib/flashplugin-installer/libflashplayer.so. So just copy it from there to ~/.mozilla/plugins.

In the long term, Adobe's policy is to not develop Flash for Linux anymore. And so the latest Flash will be the Pepper Flash which comes with Chrome. Unfortunately, it's still highly "experimental".

Edit: A way to still use Pepper Flash is described here:

Start Chrome
In chrome://plugins, enable Pepper Flash in case you disabled it (as suggested above)
Close the Chrome browser
Open a file manager and enable viewing of hidden files and folders (Ctrl+H)
Either delete the ~/.config/google-chrome/PepperFlash folder or rename it to something else.
Restart Chrome. Now Pepper Flash should work.

Further edit 20130208: Version 24.0.1312.69 worked out of the box for me and didn't need the "delete the ~/.config/google-chrome/PepperFlash folder" hack.


Ubuntu Logs off on shutdown, Proper shutdown/restart too doesnt work

Google translated answer:

  Friend I am having the same problem, had to restart with the command sudo reboot

Original answer:

Amigo estou com o mesmo problema, tive que reinicaiar com o comando sudo reboot


Some basics: .bashrc is for interactive non-login shell, while ~/.bash_profile is for interactive login-shell.

For

Interactive non-login shell, initialization order: System wide bashrc (SYS_BASHRC) default /etc/bash.bashrc => ~/.bashrc
Interactive login shell, initialization order: /etc/profile [^sysconfdir] => ~/.bash_profile => ~/.bash_login => ~/.profile.

Ubuntu by default uses ~/.profile to load ~/.bashrc, if ~/.bash_profile exists, ~/.profile and ~/.bashrc will NOT be loaded at shell initialization.

So make sure you don't have a ~/.bash_profile, put what you want in ~/.profile and ~/.bashrc.


how to fix connectivity problems with arduino board on ubuntu 16.04

There's a number of things to try here. Since you don't specify what exact board you are using, the following are some general hints, either one of those or none may help:

Make sure you are using a known-good USB cable and USB port. USB 3.0 ports often don't work well with those boards.

Verify how to put your board in bootloader mode. Sometimes Arduino IDE doesn't do it automatically.

Also, depending on how the board is designed, it may switch ports when going into the bootloader.

Make sure your user is allowed to write to the port by setting up appropriate udev rules and permissions - see here  for general hints or here for a particular board, but which may be adaptable to others.

Try removing modemmanager as explained here, it may interfere with the communication as well.


Is there an Ubuntu version of Windows' 'System Refresh' option?

From https://help.ubuntu.com/community/UbuntuReinstallation

  Since Hardy it is possible to reinstall Ubuntu without losing the
  content of the /home folder (the folder that contains program
  settings, internet bookmarks, emails and all your documents, music,
  videos and other user files). This can be done even if /home is not on
  a separate partition (which is the case by default if you did not
  manually separate it when installing Ubuntu originally).

From the installer you get the option to reinstall.
If I remember correctly the installer states  documents, music etc will be kept, software will be kept where possible and system wide settings will be cleared.


How to change highlight color of windows on taskbar in KDE Plasma 5?

Various colors can be changed via System Settings.

Under Workspace Theme, make a note of the themes that are active in Look and Feel and Desktop Theme.
Go back to the opening screen of System Settings and click on Colors.
Under Application Color Scheme, click on the name of the scheme you have as active in Look and Feel.
Below the list of themes, click Edit Scheme.
Ensuring that you haven't changed the Color set from Common Colors, scroll down till you come to Hover Decoration.
Click on the existing color to open a color chooser palette. Here, select the color you want and click Okay.
Click Apply and Save. At this point, to avoid overwriting the original scheme, give another name for your scheme.
Close the window.
Now, click on the scheme you created and then click Apply once again. That's important!

Note that:

you haven't really changed the entire scheme. Your changes are stored in a small file in ~/.local/share/color-schemes with the scheme name you gave earlier and a .color suffix.
more than one visual aspect may be affected by the change you make. It will not be limited to just the taskbar.

As you get more familiar with things you can make many more changes to suit your visual needs.


Headphones not working in ubuntu 13.06 - mac laptop

Go to System Settings=>Sound.  It should default to the output tab.  Inspect the window titled "Play Sound Through".  If you have two devices, one of the options should have "Headphones" in the description.  Be sure to plug in your headphones before you launch sound.  To the right you will see "Settings for Headphones" if your system is recognizing the headphones.

My Lenovo has both Speakers and Headphones options in the output section, My Asus has only Builtin Sound output, but recognized my headphones.  On my iMac I have both options Builtin Speakers and Headphones.  I think it depends on the sound card in your system.

You may want to consider searching for additional drivers in System Settings=>Software and Updates, click on the "Additional Drivers" tab and search for drivers.

Hope I haven't retraced your steps and that this will help.


How to get a random number within a range in command line?

shuf -i 1-100 -n 1 # for range of 1-100 inclusively, output one line

or in the general case

shuf -i LO-HI -n 1

Replace LO with an integer that is the lower limit of the range, and replace HI with an integer that is the upper limit.

To pick a random file from files named something like:

file0.jpg
file1.jpg
file2.jpg
file3.jpg

Run the following command to output a random file from file0.jpg to file3.jpg:

echo "file$(shuf -i 0-3 -n 1).jpg"


How to turn the Red Light (infrared or optical sound output light) off?

Mute the "S/PDIF" control in alsamixer and then run sudo alsactl store to make this persist across reboots.


To personalize the settings of Mozilla family use profiles. Here how to use different profiles.

And if you want where exactly profiles are stored, They are in ~/.thunderbird/<Profile name>/ as mozilla messaging support says. Of course in fact the profile is stored in
~/.thunderbird/<some characters>.<Profile name>/. they are some random 8 characters before the profile name which thunderbird chooses. you can access the profile folder by just use cd ~/.thunderbird/*<Profile name>/.

If you just want to know where is the executable file of Thunderbird. use the command whereis thunderbird.


Where and how to report bugs with Gnome Snaps from Canonical?

You can use snap info to find out where to place a bug report, in this case we get:

~$ snap info gnome-characters
name:      gnome-characters
summary:   A character map application
publisher: Canonical✓
contact:   https://bugs.launchpad.net/ubuntu/+source/gnome-characters/+bugs?field.tag=snap
license:   GPL-3.0+
description: |
  Characters is a simple utility application to find and
  insert unusual characters.
snap-id: qJcS3UjpF9AMJKWAiKwA5EWbm0y6Uduw
channels:
  stable:    v3.32.1+git1.2050bba 2019-05-01 (258) 15MB -
  candidate: v3.32.1+git1.2050bba 2019-05-01 (258) 15MB -
  beta:      ↑
  edge:      v3.32.0+git9.4424d0f 2019-05-08 (260) 15MB -

So https://bugs.launchpad.net/ubuntu/+source/gnome-characters/+bugs?field.tag=snap is where you can file your bug report.


How can I configure my Android tablet to output sound to a remote Pulseaudio instance?

It is indeed not as easy a task to perform, at least not as easy as having another pulseaudio server runnning on android (which to my knowledge is not possible).

We may have two options:

Run a streaming app such as VLC direct on the Android device
Run a remote application to control your music player that runs on the Ubuntu box

Remuco
Tesla

Considering the net congestion from audio streams, and the somewhat limited CPU power of a tablet PC I'd propably go for the Remote apps. Bote remote apps need an MPRIS capapble music player for operation. However then you may not have access to the music stored on the tablet.


Disk (be it a spinning disk or a solid-state disk) storage space is made up of logical sectors, which are numbered from zero to some large number. In Linux, this complete space is seen for example as /dev/sda.

In most cases the disk contais a partition table, which divides this space into contiguous portions named partitions. (Some operating systems and software programs prefer the term "disk label" instead of partition table.) Even if you want to use all the space as one unbroken chunk it is still recommended to place a partition table on the disk, even if it describes only one partition; this is because most software expects disks to contain partition tables. Continuing the example, the partitions will be seen in Linux as /dev/sda1, /dev/sda2 etc.

There two kinds of partition tables in widespread use, one named MBR (for Master Boot Record) and the other GPT (for GUID Partition Table; a GUID is a Globally Unique IDentifier).

Boot disks which are used for booting systems in BIOS mode (sometimes seen as "legacy mode" in system configuration screens) must use the MBR partitioning scheme.
Boot disks which are used for booting systems in UEFI mode must use the GPT partitioning scheme.
Data disks up to 2 TB capacity can use either MBR or GPT, at the pleasure of the administrators.
Data disks of more than 2 TB must use the GPT partitioning scheme (because the MBR partition table cannot reliably describe partitions beyond the 2 TB limit).

Deleting a partition means deleting an entry in the partition table. (Actually, the entry is not really deleted, because partition tables have a fixed size; the entry is marked as unusued.)

When you delete a partition which used to contain a bootable operating system you must tell the boot loader to stop trying to boot it. In Linux you use update-grub for this purpose. If the system boots in UEFI mode then you must also tell the UEFI firmware to stop trying to boot the now deleted partition; how you do this depends on the specific computer system you have.

Remember that partitions are contiguous portions of disk space. When you delete a partition you can immediately allocate its space to its neighbour on the left, because all that neighbour has to do is to update its ending boundary. If you want to allocate the space to the neighbour on the right then you must use a specialized utility able to move the existing data, because space in a partition is addressed starting from zero.

For example, suppose we have four partitions occupying the disk space like this:

+-----------+-----------+-----------+-----------+
| /dev/sda1 | /dev/sda2 | /dev/sda4 | /dev/sda3 |
+-----------+-----------+-----------+-----------+

(Note that the partition numbers are not in order; this is intentional, in order to show that there is no necessary relationship between the position of the partitions on disk and their number.)

Suppose we delete partition 2. The disk space becomes:

+-----------+-----------+-----------+-----------+
| /dev/sda1 | (Unused)  | /dev/sda4 | /dev/sda3 |
+-----------+-----------+-----------+-----------+

We can extend /dev/sda1 into the unused space; this is easy and immediate.
If we want to allocate the disk space to /dev/sda4 then we must move /dev/sda4 into the unused space; this takes time and requires specialized software.
If we want to allocate the disk space to /dev/sda3 then we must first move /dev/sda4 without changing its size, and then move /dev/sda3 into the new space.


How to install Scid 4.6.2 in Ubuntu 14.04?

In Ubuntu, .exe files are not executable. These are Windows executables.

To install this, press Ctrl+Alt+T to go to a terminal and type:

sudo apt-get install scid

for further information, look here


You can not mount two things in the same directory.  To be more precise, the most recently mounted one will be the one that shows up, and whatever files were there before will be hidden underneath and not accessible while the second one is still mounted.

Either mount the raid10 in its own directory, such as /home/yourname/raid10, or if you want to actually move the home directory there, then mount it somewhere else, such as under /media or /mnt, and run sudo cp -ax /home /path/to/drive to copy everything in /home to the new drive, then rename the old home directory with sudo mv /home /oldhome, and finally edit /etc/fstab with sudo gedit /etc/fstab and change the mount point to the new drive.  You can look up the UUID of the new drive with the sudo blkid command.  After a reboot, it should be using the new drive, which you can verify with the df command, and you can safely remove the old home dir.


Ubuntu 20.04 only prints partial pdf's sometimes

My guess is these files are somehow defective and the Adobe Reader in Windows and Mac is more forgiving than the Ubuntu Document Viewer. A workaround is to create a new PDF file that does not inherit this problem.
A Workaround

Open the document that does not print properly in the default
Document Viewer also known as Evince.
Click the Printer icon in the hamburger menu, and select Print to File

Make sure the format is set to PDF ("Second" above) and give it a
file name you want ("Third" above).
Click the green Print button on the top right to create a copy
of the PDF file.
Open the newly created copy of the PDF and print it as you normally
would.

Hope this helps


Commands can produce output on stdout or stderr.  The commands that you tried redirected only stdout.  Under bash, you can redirect the output from both streams at once using:

command &>test.txt &

Or

command &>/dev/null &

If you are using a POSIX shell, then you need to do the redirection in steps:

command >test.txt 2>&1 &

>test.txt redirects stdout to the file test.txt.  Because stderr is file handle 2, the effect of 2>&1 is to redirect stderr to wherever stdout, denoted by &1 is currently going.


Why does the script list directories starting with uppercase first, and all-lowercase second?

The shell sorts them according to the locale you've set. In particular it's the LC_COLLATE variable that controls how strings are sorted. In your case, it sorts uppercase characters before lowercase characters like in the POSIX or C locale (i.e. sorted by the ascii values of the characters).

$ mkdir Dokumenty dosgames Dropbox Muzyka learning_linux
$ LC_COLLATE=en_US.utf-8; echo */
Dokumenty/ dosgames/ Dropbox/ learning_linux/ Muzyka/
$ LC_COLLATE=C; echo */
Dokumenty/ Dropbox/ Muzyka/ dosgames/ learning_linux/


EXT4 drives getting corrupted with "Windows Reserved" Partition

I ended up finding a drive that had about 18 of the 20 years worth of data on it in my closet and restored that way, I didn't put too much on it in the last 2 years.
What windows does to drives it cant identify is unacceptable, there should be interaction with the user before adding boot partitions. I didn't have this issue with NTFS drives on the system. Shame on Microsoft. What happened to me shouldn't happen.
Recovering individual files, especially media files, from EXT4 is not pretty.
Partial files and corruption all over the place.
I was lucky I didn't throw out or reformat all of my old drives or I would have been totally screwed. I only lost a little bit.


Is the default 512 byte physical sector size appropriate for SSD disks under Linux?

In the old days, 512 byte sectors was the norm for disks. The system used to read/write sectors only one sector at a time, and that was the best that the old hard drives could do.

Now, with modern drives being so dense, and so fast, and so smart, reading/writing sectors only one sector at a time really slows down total throughput.

The trick was... how do you speed up total throughput, but still maintain compatibility with old/standard disk subsystems? You create a 4096 block size that are made up of eight 512 byte physical sectors. 4096 is now the minimum read/write transfer to/from the disk, but it's handed off in compatible 512 byte chucks to the OS.

This means that even if the system only needs one 512 byte sector of information, the drive reads eight 512 byte sectors to get it. If however, the system needs the next seven sectors, it's already read them, so no disk I/O needs to occur... hence a speed increase in total throughput.

Modern operating systems can fully take advantage of native 4K block sizes of modern drives.


Use rsync instead of cp:

rsync -Rr ./Desktop/ ./Desktop/sub/

Let's test it out:

$ cd /tmp
$ mkdir -p Desktop/sub
$ touch Desktop/a-file
$ ls -F Desktop
a-file sub/
$ cp ./Desktop ./Desktop/sub
cp: cannot copy a directory, './Desktop', into itself, './Desktop/sub/Desktop'

However rsync will work fine:

$ rsync -Rr ./Desktop/ ./Desktop/sub/
$ ls -F Desktop/sub/
Desktop/


12.04=>14.04 or 16.04 Broken Upgrade (not sure which upgrade rev.)

Upgrading to new version of OS from an existing OS is called a "dirty upgrade," and in my experience this almost never works 100%. Most likely is your graphics driver isn't loading properly. There's 2 things you can do:

if you want to fiddle with it, from GRUB select Advanced Options and then recovery. From the menu that opens, you can select network and then root shell, this will allow you to run upgrade commands (sudo apt-get update then sudo apt-get upgrade), will allow you to poke at your system (lshw -C display, etc) and will allow you to install new drivers and such.
if you just want to get your system fixed and working again, backup your data (using the root shell from above), download and burn a 14.04 or 16.04 (your choice) iso, burn it to a DVD or USB key, then wipe your drive or partition and do a clean install.


Where does openssh-server get the "Last Login" information from?

There is database in /var/log/lastlog (binary AFAIK). See the manual page for lastlog(8). The file should be updated by the PAM module pam_lastlog(8).

There might be some difference in what Ubuntu version you are using (I don't have this file, nor the message in my 15.10).


Can't using Netbeans 10.0 after installing from repository on Ubuntu 18.04

Check that the java platform was correctly configured when you installed Netbeans.

In my case, during the installation process, there was a box for entering the path to the Java SDK, which defaulted to /usr (which is probably wrong). I failed to check that, and ended up having a wrongly configured JDK.

You can check this by going to Tools > Java Platforms in Netbeans. If the JDK platform says something like "Error: the specified folder does not contain a Java platform" then that's your problem.

In order to fix this you can either reinstall netbeans (and pick the correct path this time)

OR

Edit the config file (exit netbeans first), in my case:

nano ~/netbeans-11.2/netbeans/etc/netbeans.conf

find the line with netbeans_jdkhome= and edit the path. Example:

netbeans_jdkhome="/usr/lib/jvm/java-11-openjdk-amd64"

save the file, and start Netbeans. With luck, it should work now.


Are there dedicated folders for user made sources and libraries/modules?

Normally, you put the sources wherever you want.

If you plan to distribute your project via binary packages or repository, you should think in integrating it with the normal filesystem structure (i.e. binaries in /usr/bin, libraries in /usr/lib, data files in /usr/share...).

If the users are supposed to compile themselves the program, it (was?) an honored Unix tradition to install the project under /usr/local (/usr/local/bin,  /usr/local/lib, /usr/local/share)...

There are some "standards' which are more or less followed: the Filesystem Hierarchy Standard (FHS), or somewhere in the Freedesktop pages (e.g XDG Base Directory Specification).


Use sed to rename files in multiple directories?

There are a few issues here. First of all, your files are not in /00101234/, / is the root directory, kinda like Windows's C:. Your files are in ~/Desktop/images/00101234/ which means /home/yourUserName/Desktop/images/ (where yourUserName is your user name). The easiest way to deal with this, therefore, is to use relative paths. For example, consider this file:

/dir1/dir2/file

That's the absolute path to file. But if you are inside the dir1 directory, you can use a path that's relative to your current location: dir2/file.

With this in mind, let's have another look at your csv file:

/00101234/1101.jpg,/Jewellery/ALittleThankYouTeacher1101.jpg

These are relative paths. You can deal with this in two ways:

Move into the ~/Desktop/images directory and use the paths as they are.
Convert them to absolute paths.

I will focus on 2 since it is less likely to break. This command will not actually do anything, but it will print out the list of actions to be performed (run this from the directory containing your csv file and change yourCsv.csv to the actual name of your file):

while IFS=, read -r old new; do
    echo mv "~/Desktop/images${old}" "~/Desktop/images/Jewlery${new}"
done < yourCsv.csv

On my system, using the file you provided, this prints:

mv ~/Desktop/images/00101234/1101.jpg ~/Desktop/images/Jewlery/Jewellery/ALittleThankYouTeacher1101.jpg
mv ~/Desktop/images/00101234/1102.jpg ~/Desktop/images/Jewlery/Jewellery/ALittleThinkingOfYou1102.jpg
mv ~/Desktop/images/00101234/1155.jpg ~/Desktop/images/Jewlery/Jewellery/ALittleDreamcatcher1155.jpg
mv ~/Desktop/images/00101234/1203.jpg ~/Desktop/images/Jewlery/Jewellery/ALittleLuckyElephant1203.jpg

If that prints what you want, then we're ready to go. Remove the echo (that just means "print this", so removing it will cause the loop to execute the mv command instead of just printing it).

However, and this is important, your csv is probably a bit different. I am assuming you created it in Windows, which means it will have different line endings. So, to be on the safe side, you want to run this:

tr -d '\r' < yourCsv.csv | while IFS=, read -r old new; do
    mv "~/Desktop/images${old}" "~/Desktop/images/Jewlery${new}"
done < yourCsv.csv

Of course, I strongly recommend that you first make a backup of all of these files just in case something goes wrong.


Castis' answer did not quite fix the issue for me, even after a full restart, on Ubuntu 16.04. After editing /etc/login.defs to change UID_MIN and GID_MIN from 1000 to 500, I could use adduser to create new accounts with low UIDs, but my old account (with UID 502) was still not being shown.

It seems that AccountsService was caching the fact that it once thought this was a system account. To fix this, I had to manually edit:
/var/lib/AccountsService/users/<username>.

In the [User] section, I had to change
SystemAccount=true to SystemAccount=false

After restarting the AccountsService daemon (sudo service accounts-daemon restart) my username reappeared in the System Settings->User Accounts GUI.

Notably, this was an account that was carried over from a previous install of 14.04, and had had its uid manually changed.


Why XMLHttpRequest send only "server connection established" in readyState attribut?

Try changing the following line:

xhr.open("GET", "http://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=munich");

...to:

xhr.open("GET", "http://api.flickr.com/services/feeds/photos_public.gne?format=json&nojsoncallback=1&tags=munich", true);

Note the true argument given to the async parameter. There's a good chance the synchronous nature of your call is causing major issues.


The steps below resolved my issues:

Download NVIDIA-Linux-x86_64-384.98.run from the Nvidia site.
cd /home/your-user/Downloads
chmod +x NVIDIA-Linux-x86_64-384.98.run
./NVIDIA-Linux-x86_64-384.98.run you might need to run as sudo
After the steps above I had some window flickering that was resolved with: Previous frame seems to flicker in any type of window


Compile PHP by source. Stuck at phar.phar

You dont need to implement difficult compilation methods. You can install php 5.5 by using ppa:ondrej/php5 repository.

sudo add-apt-repository ppa:ondrej/php5

sudo apt-get update

sudo apt-get install <NEEDED PACKAGE1> <NEEDED PACKAGE2>


Resolving lower Bash script issue through shopt command

If you run a Bash script with the Bourne shell (sh), the shebang (#!/bin/bash) gets ignored, so sh runs the script, not bash. You need to run the script like this:

bash _myscript.sh


Is there a GUI for scheduling and executing SMART self-tests in the background in 18.04?

This answer is about notification.
As far I know the modern Ubuntu includes smartd.service (from smartmontools):

$ systemctl status smartd.service
* smartd.service - Self Monitoring and Reporting Technology (SMART) Daemon
   Loaded: loaded (/lib/systemd/system/smartd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-07-31 17:27:05 MSK; 2 days ago
     Docs: man:smartd(8)
           man:smartd.conf(5)
 Main PID: 1044 (smartd)
   CGroup: /system.slice/smartd.service
           `-1044 /usr/sbin/smartd -n

Aug 02 17:57:05 user-pc smartd[1044]: Device: /dev/sda [SAT], SMART Usage Attribute: 190 Airflow_Temperature_Cel changed from 60 to 58

There is a GUI notifier dependent on smartmontools. It is named smart-notifier. Below is its description:

  Description-en: graphical hard disk health status notifier
  A graphical notifier for smartmontools which attempts to show messages from
  the smartd disk monitoring daemon to the user. Currently only for gtk.

From its man smart-notifier :

  DESCRIPTION
  This manual page documents briefly the smart-notifier.

  smart-notifier  is  a  dbus  service/client pair. If run without options, it starts a dbus service and listens formessages send by the client (normally  started  from  a  script  in /etc/smartd/run.d). This messages are then displayed on the screen of the user running the service. This program is designed to be added to the session of the user.

It should inform you about attribute changes. But some scripting may be needed.


Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.

Method 1: By using pv

Install pv and put it between input / output only dd commands.

Note: you cannot use it when you already started dd.

From the package description:

  pv - Pipe Viewer - is a terminal-based tool for monitoring the
  progress of data through a pipeline. It can be inserted into any
  normal pipeline between two processes to give a visual indication of
  how quickly data is passing through, how long it has taken, how near
  to completion it is, and an estimate of how long it will be until
  completion.

Installation

sudo apt-get install pv

Example

dd if=/dev/urandom | pv | dd of=/dev/null

Output

1,74MB 0:00:09 [ 198kB/s] [      <=>                               ]

You could specify the approximate size with the --size if you want a time estimation.

Example Assuming a 2GB disk being copied from /dev/sdb

Command without pv would be:

sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096

Command with pv:

sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096

Output:

440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19

Other uses

You can of course use pv directly to pipe the output to stdout:

pv /home/user/bigfile.iso | md5sum

Output

50,2MB 0:00:06 [8,66MB/s] [=======>         ] 49% ETA 0:00:06

Note that in this case, pv recognizes the size automatically.

Method 2: New status option added to dd (GNU Coreutils 8.24+)

dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:

Example

dd if=/dev/urandom of=/dev/null status=progress

Output

462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s


i have an issue with low graphic mod at the booting, can you help me please?

Have you tried removing all the fglrx stuff like other posts suggest? Your machine should run with the standard generic drivers. Once that works you can try to reinstall the fancy stuff.


ubuntu server: can't access apache hosted pages after changing ip

I don't really get WHY this happened... I mean, I WAS using the server without a problem before I took it to the new place and changed its IP.

Anyway, I allowed port 80 (that was running Apache) and this was the solution to the problem.

It is worth mentioning that even before allowing this, I had (and still do) port 22 and 5432 open for PostgreSQL and SSH.

Just allowing the Apache port did the trick.

What made me do this was, when I disabled the firewall, everything was fine. So this gave me the clue that the firewall was the cause.

Also it is worth mentioning that before explicitly allowing port 80, when I tried to connect to PGMyAdmin, it would give me an error about some SSL problem. But this was misleading (at least to me).

Hope someone else finds this useful.


I need specific help installing ubuntu onto my computer

Sorry. I figured out what I was doing wrong.

1) I didn't understand that the entire folder was to be treated as one file.

2) I wasn't burning the iso file to the disk properly, I didn't realize that I needed to download a program so that I could burn to the disk as an image.

3) Once I got the disk made properly, everything went smoothly from there. Sorry for wasting everyone's time, please disregard this question. Thank you to everyone who responded.


Ubuntu 16.04 poor wifi signal and high battery usage

I had the same thing on my Lenovo G570. After upgrade to Ubuntu 16.04 (from Ubuntu 12.04) I noticed that Wi-Fi signal became very flaky.

I fixed the issue by enabling proprietary driver for my wireless adapter (see the screenshot below)


Does this do what you expect?

gnome-session-quit --power-off

Alternatively there are some other options to gnome-session-quit.


"Unexpected Error interacting with provider: 403 FORBIDDEN" error when trying to bootstrap

There is a fix in precise-proposed, enable this in your /etc/apt/sources.list:

How do I add the "proposed" repository?

And then:

sudo apt-get update
sudo apt-get upgrade

and then restart MAAS with

sudo /etc/init.d/maas restart

this will solve your issue.


First Boot into ubuntu and update the grub .

sudo update-grub

Then restart and loginto windows

Cheers


Try to reinstall skype by using these instructions. I recommend you this because i also installed skype on my computer using this method, and it's working fine on mine Ubuntu 14.04.


Can't access the factory recovery after installing ubuntu

I'm not sure if this will help but I noticed a "Dell recovery" package in the Software Center. There's a review comment that it doesn't work with 11.10 but that might be a case of pilot error. In the Software Center page for the Dell package there's a "Developer Site Link" that goes to linux.dell.com. Perhaps you can find help that way.


How to create Ubuntu graphic C programs without Gtk?

Here's a simple way with calling external program - zenity. This way your command-line C code is now a GUI app by virtue of using zenity's simple input popup dialog, although this method isn't particularly secure.

#include <unistd.h>
#include <stdio.h>

int main(){
    FILE *zenity;
    char answer[getpagesize()];

    if ((zenity = popen("zenity --entry","r")) != NULL){

        fgets(answer,sizeof(answer),zenity);
        printf("User's answer:%s\n",answer);
        exit(0);
    }
    // we get here if above check failed
    perror("zenity exited with non-zero exit code");

    return 0;
}


How to adjust touchpad sensitivity on HP Spectre under Ubuntu 16.10

for my Spectre 13 the following settings made the touchpad usable:

xinput set-prop 10 'Synaptics Off' 0
xinput set-prop 10 "Synaptics Finger" 50 50 255
xinput set-prop 10 "Synaptics Noise Cancellation" 40 40
xinput set-prop 10 "Synaptics Palm Detection" 1
xinput set-prop 10 "Synaptics Gestures" 0


Mouse wheel scrolling ignores first scroll

This is a known bug happens when using Gnome+Xorg. I have the same problem in gnome 3.32 Arch running natively.

For the time being you can switch to wayland to solve the problem.

I heard that libinput may be the cause but after switching to evdev  the problem was still there.


How do I remove desktop couch as a dependency on my application?

Go to your init.py file and comment out the following:

preferences.update(default_preferences)
preferences.db_connect()
preferences.load()
preferences.save()

And remove preferences in the following line:

from yourProject_lib import set_up_logging, preferences, get_version

That should do it.


How to obtain a white background for vim (not gvim)?

See:

https://stackoverflow.com/questions/1117526/vim-background

The lightest background possible is a light gray.

:highlight Normal ctermfg=blue ctermbg=gray


Ubuntu 17.10 / Gnome 3: firefox'  shortcuts stopped working

Okay, I got it solved (very easily in the end!), following https://github.com/lestcape/Gnome-Global-AppMenu/pull/50#issuecomment-317187954 :

Right click inside the menu
In the popup menu left click in configure...
Scroll to the box Main Menu
Click inside the "Alt" shortcut, in the option keyboard shortcut to open and close the menu
Hit Backspace key (to delete the current shortcut).

This changes the overlayKey globally, so it also makes the shortcuts for example in nautilus also working again.


Here is a bash script that does that:

Note: This script does not work if any of the file names contain spaces.

#! /bin/bash

# Only go through the directories in the current directory.
for dir in $(find ./ -type d)
do
    # Remove the first two characters.
    # Initially, $dir = "./directory_name".
    # After this step, $dir = "directory_name".
    dir="${dir:2}"

    # Skip if $dir is empty. Only happens when $dir = "./" initially.
    if [ ! $dir ]
    then
        continue
    fi

    # Go through all the files in the directory.
    for file in $(ls -d $dir/*)
    do
        # Replace / with _
        # For example, if $file = "dir/filename", then $new_file = "dir_filename"
        # where $dir = dir
        new_file="${file/\//_}"

        # Move the file.
        mv $file $new_file
    done

    # Remove the directory.
    rm -rf $dir
done

Copy-paste the script in a file.
Make it executable using

chmod +x file_name

Move the script to the destination directory. In your case this should be inside Folder/.
Run the script using ./file_name.


How does landscape calculate memory usage?

In Landscape

landscape-sysinfo actually gets its data directly from /proc/meminfo:

dpb@helo:~$ cat /proc/meminfo |egrep 'MemTotal:|Active:'
MemTotal:       12286760 kB
Active:          3794832 kB
dpb@helo:~$

The calculation of "Memory Usage" in this case would be:

((MemTotal - Active) / MemTotal) * 100

You can see these calculations in:

/usr/share/pyshared/landscape/sysinfo/memory.py
/usr/share/pyshared/landscape/lib/sysstats.py

gets its data directly from /proc/meminfo:

In free

The free utility also gets its data directly from /proc/meminfo:

Mem

total: MemTotal
used: MemTotal - MemFree
free: MemFree
buffers: Buffers
cached: Cached

Buffers/cache

used: MemTotal - MemFree - Buffers - Cached
free: MemFree + Buffers + Cached

Swap

total: SwapTotal
used: SwapTotal - SwapFree
free: SwapFree

Total

total: MemTotal + SwapTotal
used: MemTotal - MemFree + SwapTotal - SwapFree
free: MemFree + SwapFree

Corrected cached -- lzap


How to play back multiple videos, stopping after each one?

In Movie Player (Totem), I could not find a preference or plugin to achieve this.

In VLC Media Player:

Select Tools > Preferences
Select the Interface tab (default tab)
At the bottom of the Interface options, in the Playlist section, tick "Pause on the last frame of a video"
Click Save
Start playing the first video
It will pause once it reaches the end
To move on to the next video, hit n (next).
If you need to go back, hit p (previous).


1.Go to New Tab Homepage add-on page. There is Add to Firefox button. Right Click on it and click Save Link As. Save the link in xpi format.
 2.Now extract the just downloaded xpi file into a folder(say newtabhome).
 3.Now open newtabhome>chrome>content>tabhomepage.js in your favorite editor. Comment out this piece of code(Lines 60-64):

if (gURLBar)
  setTimeout(function() {
    // if page is about:blank select() works just like focus, two birds one stone
    gURLBar.select();
  }, 0);

4.Next type this command inside newtabhome directory:
zip -r newtabhome.xpi *
 5.Open the newly created newtabhome.xpi file with Firefox and install the hacked add-on.

Shortcut(Might NOT work):
Download this add-on. For installing, just open the file with firefox. Source


SpamAssassin: Can't locate Mail/SpamAssassin/Bayes.pm

I tracked down the problem to line

require Mail::SpamAssassin::Bayes;

in /usr/share/perl5/Mail/SpamAssassin.pm. The module cannot be loaded here.

However, when copying the same line to the top of the file (where others requires are), everything works fine. The same line I copied to the top of files: /usr/share/perl5/Mail/SpamAssassin/BayesStore.pm and /usr/share/perl5/Mail/SpamAssassin/Plugin/Bayes.pm

Similarly, I added require Mail::SpamAssassin::BayesStore::DBM; to top of /usr/share/perl5/Mail/SpamAssassin/Plugin/Bayes.pm.

This fixed the problem for me.


You can type the command at grub rescue:

grub-install /dev/sda

This will install grub automatically to first hard disk boot. If you want to install grub on another hard disk just change "sda" to the approiate partition.

For example:

grub-install /dev/sdb

This depends on you on which hard disk MBR you want to have grub. its much better to have grub on both the hard disks no matter whichever boots.

Quit the grub rescue mode and reboot the machine.


Go to the appearance settings and increase the system font size.


Can't install some packages. Depends: x but x is to be installed

Force the downgrade of libssl1.0.0

sudo apt-get install libssl1.0.0=1.0.1f-1ubuntu2

The installed version 1.0.1f-1ubuntu2.8 blocks the installation of libssl-dev

And you should update your machine urgently. The curent version is 1.0.1f-1ubuntu2.15

Open Software & Updates and mark trusty-security and trusty-updates

After that

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

And no, sudo apt-get dist-upgrade doesn't install Vivid.


pandas 0.24.2 not getting installed in virtual environment without sudo

Pandas in a virtual environment does not require any global packages. Everything that is required is installed inside the virtual environment by pip including all dependencies. Also your /home/ubuntu/.virtualenvs/my-project/lib/python3.8/site-packages package location shows that pandas has been installed globally by pip3 outside the virtual environment, the same as would be the case if you had not activated the virtual environment with source bin/activate first.
Either you didn't activate your virtual environment before trying to install packages in it or your virtual environment is trashed. If activating the Python virtual environment doesn't help, then delete the virtual environment and create a new one from scratch. This time you will get the latest version of pip3 installed in the virtual environment by default, and you should be able to install Python packages in it with pip3 without using sudo.


Just installed 14.04 LTS, all apt-get attempts fail, why?

I'm answering my question, thanks to the comments posted...
The problem was that I am working behind a proxy, and while I had the http_proxy shell variable set and also had set the proxy in Network->NetworkProxy, apparently apt really wants to be told about this in the /etc/apt/apt.conf file.

After adding a line similar to this...

Acquire::http::proxy "http://proxy_url_here:proxy_port/";

to /etc/apt.apt.conf, things worked much better.


'GLIBC_2.25' not found on Ubuntu (Windows Subsystem for Linux)

Now this answer is presumably going to come a bit late, but let me try to give you some technical background of what you ran into here and possible ways to fix it.
For starters, what was commented about is true. The glibc is the C runtime which is central to a Ubuntu system. However, other distros choose other runtimes and a program could also opt to statically link a runtime that is more liberally licensed (musl-libc comes to mind). The latter method has its limitations as well, though.
As a rule of thumb you can run the software that was built on your system. This is perfectly fine for a system such as certain BSDs or Gentoo Linux, but it starts to become an issue for pre-packaged distros like Debian and Ubuntu.
System calls
Your kernel provides a number of system calls. A certain subset of these is standardized some will be specific to your system, i.e. GNU/Linux in this case.
Most system calls - such as "open a file" - have a direct counterpart in your C runtime, but the C runtime often will provide additional stuff on top (e.g. facilities for dynamic linking ...).
C runtime
The glibc is a so-called shared object. Other systems call it dynamic library or dynamically linked library. The goal is largely the same, although implementation and functionality differ.
The term shared object refers to the fact that the object code ("library functions") is shared across processes in your system.
Another advantage is that only this one library needs to be updated instead of each and every application that was statically linked with a particular version of the library.
And proprietary software (i.e. that which isn't FLOSS) has the licensing issue because of certain "issues" the glibc license brings for someone unwilling to disclose its source code. Now this is evidently not the issue with your code, since you could go ahead and build your own.
Missing symbols
The error you encountered:
/lib/x86_64-linux-gnu/libc.so.6: version 'GLIBC_2.25' not found

is one that I often jokingly confront people with who are complaining about "DLL hell" on Windows. Linux isn't better and the conventional linkers give you little control of the symbols you link against.
Alright, let's get our hands dirty a little. Make sure you have binutils installed (apt install binutils) and I'll assume that you have the standard Bash shell installed and that it can be found in /bin/bash.
We're going to start with the following invocation (instead of readelf, objdump would also work, but it has its own command line arguments):
readelf --dyn-syms /bin/bash|grep -P '\WUND\W'

What it does is to list all dynamic symbols from the Bash binary and then limit the output to those items which are undefined (UND). This will give us the list of functions Bash uses from glibc. We can further refine this by removing all entries that refer to the GLIBC_2.2.5 version by appending grep -v 'GLIBC_2\.2\.5':
$ readelf --dyn-syms /bin/bash|grep -P '\WUND\W'|grep -v 'GLIBC_2\.2\.5'
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     2: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_toupper_loc@GLIBC_2.3 (3)
     3: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tgetflag@NCURSES_TINFO_5.0.19991023 (4)
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __snprintf_chk@GLIBC_2.3.4 (5)
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __vfprintf_chk@GLIBC_2.3.4 (5)
    20: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTab
    22: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tgetent@NCURSES_TINFO_5.0.19991023 (4)
    25: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tputs@NCURSES_TINFO_5.0.19991023 (4)
    37: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND faccessat@GLIBC_2.4 (6)
    50: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tgoto@NCURSES_TINFO_5.0.19991023 (4)
    60: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND eaccess@GLIBC_2.4 (6)
    63: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (6)
    72: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __fdelt_chk@GLIBC_2.15 (7)
    80: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tgetnum@NCURSES_TINFO_5.0.19991023 (4)
    98: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND tgetstr@NCURSES_TINFO_5.0.19991023 (4)
   101: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __asprintf_chk@GLIBC_2.8 (8)
   104: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __memmove_chk@GLIBC_2.3.4 (5)
   106: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __memcpy_chk@GLIBC_2.3.4 (5)
   108: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
   114: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (9)
   138: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND regexec@GLIBC_2.3.4 (5)
   145: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __vsnprintf_chk@GLIBC_2.3.4 (5)
   147: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __strncpy_chk@GLIBC_2.3.4 (5)
   153: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __strcpy_chk@GLIBC_2.3.4 (5)
   157: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __printf_chk@GLIBC_2.3.4 (5)
   160: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __longjmp_chk@GLIBC_2.11 (11)
   195: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __fprintf_chk@GLIBC_2.3.4 (5)
   198: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
   215: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_tolower_loc@GLIBC_2.3 (3)
   216: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __ctype_b_loc@GLIBC_2.3 (3)
   219: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __sprintf_chk@GLIBC_2.3.4 (5)

The 2.2.5 version was the first to support x86-64 as an architecture, which is why we're not interested in it. The first available version will never pose an issue.
However, if you want this Bash binary on a system with "only" glibc 2.14 it would not work, because __fdelt_chk@GLIBC_2.15 requires at least version 2.15.

Interlude: symbol versioning
The @GLIBC_2.3.4 (etc.) suffix on the symbol names describe version
ranges (also see here). This
enables an ELF shared object to support multiple versions of a symbol.
As an example a function foo() may have taken 2 arguments in version
1.0 of the library but 3 in the 2.x version range. The fact that software dynamically linking to these symbols contains the symbol
version, means that it will always be linked to the appropriate
version of a function.
However, the downside is what you encountered. Software linked on a
system with a newer glibc (or really any other library also using
symbol versioning) won't run on your (older) system if one of the
symbols used would require a newer library version than is available
on your system.
The classical method to "overcome" this issue was always by building
on a system that was old enough to provide a low enough common
denominator as far as library versions were concerned. This even
allowed you to some extent to run a binary built on one distro to run
on a range of others. The downside is/was that this means older
compiler, older toolchain, older libraries (because there are more
libraries than just the C runtime).
Certain alternatives exist (see below), but they all require that you
analyze exactly what it is you want. For example statically linking to
musl-libc - which comes at more liberal licensing terms - won't work
if your program offers a plugin interface and exchanges buffers with
the plugins ... dynamically linking to the same C runtime is important
in such a case. Besides, musl-libc and glibc can interfere with each
other in the same process because of sbrk.

Possible solutions to your conundrum

Run your software inside a VM on a more modern distro version which satisfies the library dependencies out of the box. Because the VM lets you run any kernel you desire, this will even work for software requiring very modern system calls.
Run your software inside a chroot jail or a container (similar to the VM theme above, but here you could run into issues if the code running inside makes use of newer system calls not available on your host kernel, LXD 4.0 attempts to mitigate this issue by providing stubs for these system calls).
Use an AppImage (someone needs to take care that the stub of the AppImage is as backwards compatible as possible, though.
Use a snap package.

More involved solutions, or if you are a developer

Offer a newer glibc version alongside the old one. Since this is a daemon there's a chance something gets to start it. Whether it is systemd or good old SysV init, you should be able to set LD_LIBRARY_PATH to point it to your updated glibc.
If you were the maintainer of said software, this approach would provide a viable alternative. What it does is to instruct the linker to choose an earlier version of the same symbol instead of the newest (picking the newest is the default).

This is a variation on the above approach.
This provides some more details on how to investigate the matter yourself.
This shows how to investigate the symbol version ranges required by a binary and the answer sheds some further light on the matter.

So far the most nuanced explanation is this one. The new memcpy as of glibc 2.14 is a GNU_IFUNC, which means that once at runtime the most efficient version (e.g. optimized for a particular processor model!) will be picked. That's opposed to the classic way of simply providing a direct reference to the function (to be relocated). The main takeaway from this is that you can't just tinker with the symbol name in this particular case.

This is another explanation by the same user.

If you're actually interested in the internal workings of linkers you can grab a book on the subject matter or refer to Ian Lance Taylors excellent article series of which you can find an overview here.


The driver is not in the linux kernel for that device id.  See Launchpad bug 1265714:

https://bugs.launchpad.net/xf86-input-wacom/+bug/1265714


How can I automatically kill a process when it's memory use exceeds a specific limit?

While there could be a point in setting limits proactively, let's answer OP's question :-)

Make an Upstart script in /etc/init/skype-killer.conf. Replace skype with Skype's binary name if its not skype, and replace 500000 (as in 500000 kB = 500 M) with the limit in kB's you wish to enforce for Skype virtual memory size and 30 with the number of seconds between checks.

This job will start on startup and keep running checking for skype memory usage. After you have copied this to /etc/init with sudo, do sudo start skype-killer to get it going, or reboot system. If you wish to revise memory usage, edit the skype-killer.conf and do sudo stop skype-killer; sudo start skype-killer.

start on startup
stop on shutdown

script
  while /bin/true; do
    if $(pidof skype); then
      test $(cat /proc/`pidof skype`/status | grep "VmSize:" | sed -re s,VmSize:\\s+,, | cut -d" " -f1) -gt 500000 && killall skype
    fi
    sleep 30
  done
end script


Can I download a file from a package without installing it?

If you don't want to use the graphical file-roller as suggested in another answer, there are some other options:

Install the debian-goodies package, and run debmany nvidia-96; this will present a dialog of documentation files in the package, and you can press Enter to view any one of them.
(Lower-level:) Download the .deb file using whatever method you prefer, and run dpkg --fsys-tarfile foo.deb | tar xO ./usr/share/doc/nvidia-96/README.txt.gz (the leading dot after tar xO is required).


Amazon Basics USB Ethernet adapter loses connection after ~24 hours

Well, whatever the problem was, it seems to have been fixed after upgrading to Ubuntu 17.10.  Haven't noticed any issues with the adapter since then.


What's the standard way to provide configuration options for a daemon?

It really depends on how complicated you want to get.

Two options main options.

Accept command-line options. For a standard daemon, these would be put into the init.d script for system configuration.
Your own conf file inside of /etc/yourDaemon. In this case, there is typically a command-line option to specify the location of the configuration file, and would, by default, be put in /etc/yourDaemon/blah.conf

I recommend libconfuse.
http://www.nongnu.org/confuse/


Ubuntu 12.04 startup after installation needs USB

The problem did not happen when creating the USB stick, but during the installation. It seems that the installer installed the bootmanager on your USB stick instead of putting it on your hard disk.

I am now performing a test installation on my laptop and I noticed that when I select custom installation, the installer will select by default to install the bootmanager on the USB stick, so maybe it's doing it also when selecting the other types of installation.

Which kind of installation did you choose?


With ffmpeg

I think you should do this with ffmpeg.

To install, type these lines in terminal:

sudo apt install ffmpeg

now you have ffmpeg installed, you can convert webm to mp4 by this command:

ffmpeg -i input_filename.webm output_filename.mp4

Let's say you have your sample.webm file in your downloads folder and you want to generate the output to the same folder. You run this command:

ffmpeg -i ~/Downloads/sample.webm -qscale 0 ~/Downloads/sample.mp4

If you don't want to type this long command every time in your terminal you can create a little bash function to do it for you.

In terminal type nano ~/.bashrc scroll down to the bottom and insert:

webmTOmp4 () {
  ffmpeg -i "$1".webm -qscale 0 "$1".mp4
}
mp4TOmp3 () {
  ffmpeg -i "$1".mp4 "$1".mp3
}

Now you can do: mp4TOmp3 GENUINE\ -\ Thleilaxu-k8hrEbXURzg and the script will convert and save your new file with the same name to the same folder.


Remote desktop/remote display viewer for Ubuntu Touch devices?

Well, there is a partial solution - in the sense of you can view the screen, but not control it from the mouse. I noticed it by running phablet-screenshot in debug mode, which reports that it uses a program mirscreencast on the phone.

There is a bit more about it in https://wiki.ubuntu.com/Touch/ScreenRecording, however, the most convenient command line I found on ... Youtube:

Realtime screencasting from Ubuntu Phone - mirscreencast to computer desktop in real time. - YouTube

  Starting transmission (on device):

mirscreencast -m /run/mir_socket --stdout --cap-interval 1 -s 270 480 | gzip -c | nc 192.168.0.5 1234

  Receiving transmission (on desktop PC):

nc -l -p 1234 | gzip -dc | mplayer -demuxer rawvideo -rawvideo w=270:h=480:format=rgba -

Also, there is https://github.com/ycheng/mir-vnc-server - kinda experimental, I managed to get it to compile on 14.04 phone and run, and can connect through a VNC client, but I cannot get a realtime update of screen (only the first frame is shown, and no mouse is updated); here are my notes - unfortunately, not totally complete, but gives an idea:

# in 64-bit Ubuntu 14.04:
# (/path/to/docker is general storage dir)
git clone https://github.com/ycheng/mir-vnc-server.git /path/to/docker/mir-vnc-server_git
sudo docker pull z3ntu/ubuntu-touch-build-env
sudo service docker start
sudo docker run -vit /path/to/docker/:/var/ubuntu_touch z3ntu/ubuntu-touch-build-env /bin/bash

sudo apt-get install gcc-arm-linux-gnueabi binutils-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabihf
sudo apt-get install libvncserver-dev # else dummyvncserver.c:3:21: fatal error: rfb/rfb.h: No such file or directory
sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include/  # else /usr/include/zlib.h:34:19: fatal error: zconf.h: No such file or directory
sudo apt-get install libmirclient-dev # else fatal error: mir_toolkit/mir_client_library.h: No such file or directory
sudo apt-get install libgles2-mesa-dev # else fatal error: EGL/egl.h: No such file or directory

# because of ..../arm-linux-gnueabi/bin/ld: cannot find -lvncserver:
apt-get source libvncserver0

apt-get source zlib1g
cd zlib-1.2.8.dfsg/
./configure
CC=arm-linux-gnueabi-gcc make
# should get: ./libz.so.1.2.8: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, ...
cp -a *.so* /path/to/docker/libvncserver-0.9.9+dfsg/
cd ..

cd libvncserver-0.9.9+dfsg
aclocal
autoconf
autoheader
automake --add-missing
# ld: cannot find -lgcrypt, -lgnutls, -lws2_32; so:
# in configure, comment out 'LIBS="$LIBS -lws2_32"', and then:
LD_LIBRARY_PATH=${PWD} ./configure --host=arm-linux-gnueabi --without-gcrypt --without-gnutls
cd libvncserver/
CC=arm-linux-gnueabi-gcc make CFLAGS+="-DLIBVNCSERVER_HAVE_GETTIMEOFDAY -DLIBVNCSERVER_HAVE_LIBZ"
# should get: libvncserver/.libs/libvncserver.so.0.0.0: ELF 32-bit LSB  shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, ...
cp libvncserver/.libs/* /path/to/docker/mir-vnc-server_git/

cd /path/to/docker/mir-vnc-server_git/
LD_LIBRARY_PATH=${PWD} CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabihf-g++ make

# here got stuck, and went on phone instead:
# http://askubuntu.com/questions/600065/consequences-of-using-apt-get-in-ubuntu-touch
# phablet-config writable-image
# more-less repeated the procedure above, but on the phone - possibly with some changes in Makefile and/or source files (unfortunately, lost)
# final linking command for executable had to be issued manually, it was:
g++ mirvncserver.o -o mirvncserver -L/usr/lib/arm-linux-gnueabihf -lpthread -lmircommon -lmirclient -lmirprotobuf -lEGL -lboost_program_options -lxcb-glx -lGLESv2 -lmirserver -lvncserver

# run like this - in a phone terminal shell:
# -s 270 480: WARNING: Width (270) is not a multiple of 4. VncViewer has problems with that.
./mirvncserver -m /run/mir_socket --cap-interval 2 -s 268 480

# then on desktop - use the IP address of the phone on the local network:
xvnc4viewer 192.168.XXX.YYY


Try opening up the Ubuntu Software Center, finding Rhythmbox and installing it. If Software Center says it's already installed, you can open up a terminal and type the following:

gksudo apt-get -y install --reinstall rhythmbox

And then put in your admin password (almost always required to install things) and let it run. When it's done re-installing rhythmbox, check and see if it's available again.


Hey buddies I used these commands and it solved my issue:

mysql -uroot -p -hlocalhost
sudo service mysql restart
mysql -u root -p

Hope it should relieve you the agony


How to install LibreOffice in Ubuntu 12.10 4.03.deb?

Just add the libre office repository. In terminal:

sudo add-apt-repository ppa:libreoffice/ppa

then:

sudo apt-get update && sudo apt-get -y dist-upgrade

Then your libreoffice will be updated. If you didn't have install it yet, just go to Software Center and install it.

Hope this helps you :)


Npm can't find module "semver" error in Ubuntu 19.04

Found a similar question here and the answer worked.

sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* ~/.npm
sudo rm -rf /usr/local/lib/node*
sudo rm -rf /usr/local/bin/node*
sudo rm -rf /usr/local/include/node*

sudo apt-get purge nodejs npm
sudo apt autoremove

Download the latest tar.xz NodeJS file from https://nodejs.org/en/download/

tar -xf node-v#.#.#-linux-x64.tar.xz
sudo mv node-v#.#.#-linux-x64/bin/* /usr/local/bin/
sudo mv node-v#.#.#-linux-x64/lib/node_modules/ /usr/local/lib/

Where #.#.# is the version you downloaded.

Verify installation using

node -v
npm -v


Please append --no-validate flag to skip gpg validation:

lxc-create -t ubuntu -n pavan -- --no-validate

Refer https://github.com/lxc/lxc/blob/master/templates/lxc-download.in#L240


If you use Wayland (Ubuntu 17.10) and latest version (v8.11.0.4) of skypeforlinux screen sharing is not working.

In order to have screen sharing working you can switch to Xorg as explained here.

Otherwise you can use Google Hangout, where you can even share windows.


what can we do with libre office presentation

you can use it to prepare a presentation?

to ask a girl out,
to go for a job opening,
to sell something,
to ...

Usually, it is used to breakdown and logically summarize/organize the points you want to make and to show it on an overhead screen, large tv or projector. usually used as a support tool when presenting an idea, or item to a group of people.

the presentations prepared have a dimension suitable for a projector/tv/screen, with nice effects on the slides (though I don't use the effects much as it looks non-professional). you go through to the next slide with a click or keyboard arrows or space bar when in presentation mode (F5 I think).


key-shortcut accessible command-history (in gnome-terminal) for irssi sessions needed!

Possibly - I'm not certain what you are asking. Press Ctrl+r and type the start of the command, and it should appear there. You can then use the arrow keys to edit it.


Fix bootloader after removing Ubuntu from a dual boot system?

What boot manager appears? The Windows boot manager? If so, you can try the one of the following methods. (The first one is probably easier.)

Basically, you need to tell the Windows Boot Manager to boot the Windows Boot Loader by default (unless it's already doing this), and then tell the Windows Boot Manager to stop displaying the boot menu.

Please note that if you make a mistake during this process, you may no longer be able to boot into Windows. If this happens, your best bet may be to boot into a Windows disc and use the recovery options there. Especially in the case that you were using Method 2, you can even open a command prompt from the disc and try using BCDEdit again.

Method 1: Control Panel Options

Open the Control Panel (Start -> Control Panel)
Go to "System and Security"
Go to "System"
Go to "Advanced System Settings"
Go to the "Advanced" tab
Under "Startup and Recovery", click "Settings"
Under "System Startup" -> "Default operating system", choose something like "Windows 8"
Uncheck the option "Time to display list of operating systems". You'll notice that the number of seconds changes to 0.

I found some of the information for Method 1 here: How to change Windows 7 Boot manager options to start the OS automatically?

Method 2: BCDEdit

BCDEdit is a built-in utility in Windows Vista, 7, & 8 that you should also be able to use to solve your problem.

1) Make sure Windows is your default boot entry.

In Windows, open a command prompt. (e.g. Hold the Windows key and press R.
In the "Run" window that appears, type cmd and press Enter.)
In the command prompt, run the command bcdedit to display current boot information. There should be an entry called "Windows Boot Loader" (NOT "Windows Boot Manager"!) followed by a line with "identifier" and a long string of characters enclosed by { }. This string is the GUID (or just "id" or "identifier") of that boot entry.
Run the command BCDEdit /default id, where where you replace id with the long identifier of the Windows boot entry, to make that boot loader the default one.

2) Skip the boot menu so you no longer see it.

Use the following BCDEdit command to skip the boot menu so you don't see it:
bcdedit /timeout 0.
In this command, 0 is actually the number of seconds the Windows  to display the boot selection screen.

I found some of the information for Method 2 here:

BCDEdit Command-Line Options

Changing the Default Boot Entry


Given an MD5 hash find the libc it corresponds to

Download all the versions of the files, and check their contents. There is file called md5sums, containing md5sum.

7e94b12ee1619d53abd5cbbfb7bb3cca  usr/lib/gconv/ISO-2022-JP.so

You can find the packages here:
http://packages.ubuntu.com/search?keywords=libc6


Classicmenu indicator revert old icon after update to 0.08

The classicmenu-indicator has a configuration option for this.

Open a terminal and enter this command:

mkdir $HOME/.config/classicmenu-indicator/ && gedit $HOME/.config/classicmenu-indicator/config

This will open the text editor with the config file, that is most probably empty.
Copypaste the following lines:

[config]
my_icon = start-here

Save it, restart the indicator and there you go.


Skype on 64 bit has non default mouse cursor theme

To fix Skype's non-default mouse cursor theme on Ubuntu 13.04 64-bit,

Firstly you have to enable MultiArch by running (in a terminal window) the command:

sudo dpkg --add-architecture i386

Then refresh apt repository list by typing:

sudo apt-get update

And finally you have to install the following package:

sudo apt-get install libxcursor1:i386


It's a bug (bugzilla.gnome.org, bugs.launchpad.net. As far as I know there is no way to fix this (without fixing it in the Nautilus source code).


How do I batch rename a specific file inside multiple zip archives via the command line?

This technique won't rename the file, but add a lowercase version of the .DIZ file. Hopefully it will be good enough for your purposes.

This takes advantage of zip's "add by default" functionality, in which if you specify an existing zip file, it will add files to it. So if you do:

zip doom.zip file_id.diz

and doom.zip exists, it will just add the file_id.diz file to the existing contents.

This is to be run in the directory where your zip files reside:

for i in  *zip; do rm FILE_ID.DIZ;  unzip "$i" FILE_ID.DIZ; mv FILE_ID.DIZ file_id.diz; zip -d "$i" FILE_ID.DIZ; zip "$i" file_id.diz; done

Note that for best results, none of the .zip file names should contain spaces.

You can also put this in a file, say, rename.sh (and it looks nicer and easier to understand this way):

#!/bin/bash
for i in  *zip; do
   rm FILE_ID.DIZ
   unzip "$i" FILE_ID.DIZ
   mv FILE_ID.DIZ file_id.diz
   zip -d "$i" FILE_ID.DIZ
   zip "$i" file_id.diz
done

then you can run by saying, e.g. bash rename.sh


How can I open specific ports for my Apache server?

You can take a look at binding Apache to specific ports here.

I assume you're aware that you don't normally choose the port from which you're sending data, unless this is in a response to an already established connection.

For example, to make the server accept connections on both port 80 and port 8000, on all interfaces, use:

Listen 80
Listen 8000

To make the server accept connections on port 80 for one interface, and port 8000 on another, use

Listen 192.0.2.1:80
Listen 192.0.2.5:8000


Sharing files between Ubuntu and Windows VM

First thing you need to do is install Install Guest Additions.  Click on Devices --> Install Guest Additions

Once installed, click on settings --> Shared Folders, and add a folder(s) you want to share.  See images below.


you need to make sure SSH access is enabled on the pc you are trying to reach.
Try to follow this tutorial!
http://ubuntuhandbook.org/index.php/2014/04/enable-ssh-ubuntu-14-04-trusty-tahr/

About the PS I don't understand what you want to do...
With ipython/jupyter you can configure the powerful PC to act as server and expose the notebook, by doing this you can use its resources  using only your browser

Take a look here
http://jupyter-notebook.readthedocs.io/en/latest/public_server.html


Because you asked for an alternative, texlive-full (2015.20150625-1ubuntu1) is in the Wily repositories.

Upgrade to Wily and install texlive-full:

sudo apt-get install texlive-full

Remove your manually installed version

rm -r ~/.local/texlive

and correct the PATH in your .bashrc:

Because you have added the PATH with

echo export PATH=\"$(echo ~/.local/texlive/*/bin/):\$PATH\" >> ~/.bashrc

remove the entry with the command

sed -i '/.local\/texlive/d' ~/.bashrc


Partial Upgrade removes signed GRUB EFI and breaks Secure Boot

I believe this is the same problem I filed a bug report on earlier today.  It has been fixed and once I manually updated grub-efi-amd64-signed all is well.

A similar problem reported in June was claimed to be a "process escape"...apparently it escaped again.


installing drivers to kubuntu without internet

You can find the nvidia driver nvidia-common-updates as .deb (debian install package) HERE, choose 64 or 32 bit, put on a USB double click in KUbuntu to install.

Same for the WIFI driver, from research I believe this to be the one from the repo or "additional drivers" for your USB, go HERE, choose your Ubuntu version from the bottom, go down to "Binary packages built by this source" and choose "broadcom-sta-common", you need to get the latest (release) version, download is on the right.


I have read that power management is not something the Linux Kernel is very good at (but they are working on to improve it).

That being said, a drop from 5.5 hours to 3 hours is, I would say, "normal".

Take for example. My laptop can run for 2 hours on Windows (pathetic, I know), but when I switched to Ubuntu, the battery lasts for barely 1 hour.


Uninstalling VMware horizon client issue

Either the executable doesn't have the "execute bit" set (fix with chmod +x VMware-Horizon-Client-2006-8.0.0-16522670.x64.bundle) or the partition it's on is mounted with noexec (check with mount).


mount.cifs for mounting NAS unit not working on 17.10

Never mind. Solved.

"cifs troubleshooting" turned out to be the magic words for Google, rather than "mount verbosity" etc.

# modprobe cifs
# echo 7 > /proc/fs/cifs/cifsFYI
# mount... etc.
# dmesg

Gave me:

CIFS VFS: Dialect not supported by server. Consider specifying
vers=1.0 or vers=2.1 on mount for accessing older servers

And adding "vers=2.1" to the options fixed it.


Cannot find runtime 'node' on PATH. in Visual Studio Code running installed on Ubuntu 18.04

After alot of searching I resolved this issue myself by following these two steps:

I opened the Integrated terminal and type command which node. In my case it responded with /home/user/.nvm/versions/node/v10.7.0/bin/node
Then I added an attribute "runtimeExecutable" in launch.json file and to its value I passed the path received by entering command mentioned in step one. like this
"runtimeExecutable": "/home/user/.nvm/versions/node/v10.7.0/bin/node",

Screenshot of launch.json file after adding "runtimeExecutable" in configurations

After following these two steps, I added break point and started debugging. It started debugging.


rsyslogd answer your needs.

how-to-setup-remote-system-logging-with-rsyslog-on-ubuntu-14-04-lts

  By default, there is an instance of rsyslog that runs inside every
  new Ubuntu installation. The rsyslog tool takes care of receiving
  all the log message from the kernel and operating system applications
  and distributing them over files in /var/log.

  However, rsyslog can do much more than that which includes logging
  into a remote server. This can be extremely useful for aggregating
  logs across a large fleet of servers or when it is not possible to
  write logs on disk.

  In this tutorial, we’re going to install rsyslog on a remote machine
  so we can ship logs to, redirect all logging to that remote server.
  Installing rsyslog on Remote Server

  You will need a copy of rsyslog running on a remote machine which
  will be receiving the logs from your existing server. It’s best that
  you have this in a remote location. The reason being that if this
  server crashes at the same time as your server crashes, you won’t be
  able to get any logs to troubleshoot any issues.

  Assuming that you’re using Ubuntu on the remote machine, you’ll
  already be running rsyslog. If not, you can install it by following
  the instructions provided inside the rsyslog website.

  Once it’s installed, you will need to make sure that it listens on a
  port which we will send logs to. The default port is 514 which we’ll
  keep. You will need to edit the file /etc/rsyslog.conf and uncomment
  the following lines:

# provides UDP syslog reception
#$ModLoad imudp
#$UDPServerRun 514

# provides TCP syslog reception
#$ModLoad imtcp
#$InputTCPServerRun 514

  After uncommenting the lines, it should look like the following:

# provides UDP syslog reception
$ModLoad imudp
$UDPServerRun 514

# provides TCP syslog reception
$ModLoad imtcp
$InputTCPServerRun 514

  Once that’s done, you can now restart the rsyslog service by running
  the command service rsyslog restart. Your rsyslog instance is now
  ready to recieve logs from remote hosts. Setting Up rsyslog on Local
  Server

  This process is extremely easy. All you need to do is tell the
  existing rsyslog instance on your server to ship logs to your remote
  server. It’s as easy as creating a file inside the /etc/rsyslog.d
  folder called 10-rsyslog.conf. Inside that file, all you need to put
  is

*.*   @remote.server:514

  Once you write that file, restart the rsyslog service by running
  service rsyslog restart and your logs will now start being shipped
  to your remote server. You can verify that by logging into the remote
  server and checking the log folder, you’ll find that you now have logs
  labeled with the hostname of the client server.


Problems with network connection: "sudo: unable to resolve host (none)"

Please, enter this line into the terminal:

nano /etc/hostname

And tell me what it says :)


Restore Pop Up Window in OpenOffice won't go away

I will assume you are using the newer libreoffice. For openoffice the procedure will be similar, but the names and directories will be different.

It sounds like some setting kept in one of the hidden files used by libreoffice is troubling the program. More specifically the software knows about a document which it needs to recover but has trouble doing.

libreoffice puts settings in a directory libreoffice, which sits in .config in your user's directory.
if you start a terminal and issue ls .config/libreoffice you should see some result (on my computer i get a directory named 3).

By issuing the command mv ~/.config/libreoffice ~/.config/libreoffice_BAK and then restarting libreoffice, libreoffice should start with a clean slate and at least should allow you to use it.

PS. for openoffice i believe the settings directory may be located in ~/.openoffice but this could also be ~/.config/openoffice


What is the meaning of this error: "Problem accessing file status"?

Looks like you need some special (root) permission to compile a code. In Linux most of the time you need to be root when doing some special task, such as changing permission(s) of the system file, changing owner of the file, and to copy, move or remove any file from the Linux system directories located inside root path (/) etc.

So you need root permissions to compile your code as,

sudo gcc -o Output Hello.c

or

sudo g++ -o Output Hello.c

*After executing above command you need to enter your root password.


How do you type @ on a French Canadian keyboard

Most likely AltGr-0 as reported in this Wikipedia article on AZERTY layout. Or if that doesn't work try AltGr-2, It's for Canadian French QWERTY based


Automatically enter input in command line

There is a command created specifically for that case: yes

$ yes | ./script

What this does is connect the output of yes to the input of ./script. So when ./script asks for user input it will instead get the output of yes. The output of yes is an endless stream of y followed by a newline. So basically as if the user is entering y for every question of ./script.

If you want to say no (n) instead of yes (y) you can do it like this:

$ yes n | ./script

Note that some tools have an option to always asume yes as answer. See here for example: Bypass the yes/no prompt in 'apt-get upgrade'

Other methods to enter input:

If you know exactly how many y your script is expecting you can do it like this:

$ printf 'y\ny\ny\n' | ./script

The newlines (\n) are the enter keys.

Using printf instead of yes you have more fine grained control of input:

$ printf 'yes\nno\nmaybe\n' | ./script

Note that in some rare cases the command does not require the user to press enter after the character. in that case leave the newlines out:

$ printf 'yyy' | ./script

For sake of completeness you can also use a here document:

$ ./script << EOF
y
y
y
EOF

Or if your shell supports it a here string:

$ ./script <<< "y
y
y
"

Or you can create a file with one input per line:

$ ./script < inputfile

If the command is sufficiently complex and the methods above no longer suffice then you can use expect.

Here is an example of a super simple expect script:

spawn ./script
expect "are you sure?"
send "yes\r"
expect "are you really sure?"
send "YES!\r"
expect eof

Technical nitpick:

The hypothetical command invocation you gave in your question does not work:

$ ./script < echo 'yyyyyyyyyyyyyy'
bash: echo: No such file or directory

This is because the shell grammar allows a redirect operator anywhere in the command line. As far as the shell is concerned your hypothetical command line is the same as this line:

$ ./script 'yyyyyyyyyyyyyy' < echo
bash: echo: No such file or directory

That means ./script will be called with the argument 'yyyyyyyyyyyyyy' and the stdin will get input from a file named echo. And bash complains since the file does not exists.


How to install ubuntu server on HP 819185-421 proliant microserver?

Regarding your intention there are two issues:

Ubuntu server is not a live cd/live usb. Thus you need a harddisk to install ubuntu server.
To bring the ubuntu server iso on usb, use dd. (All other tools failed with the server edition when I did it):

  dd if=ubuntu-14.04.5-server-amd64.iso of=/dev/sdc && sync

(adapt iso file name and usb device appropriately)

If you insist in doing a test ride, you can use the ubuntu desktop edition. This is a live cd/live usb. (can be created with dd as stated above, or other tools)

Hint: Why aren't you using ubuntu server 16.04LTS?

It has long term support too and is newer (=support for more hardware)

How much disk space is needed?

Ubuntu Server 16.04LTS takes about 2.2GB space in its default installation. (Ubuntu + SSH server)


I have installed Zorin 9.1 and I press CTRL + ALT + PRINT keys and take a beautiful screenshot. I have shortcuts into start // control panel // keyboard // shortcuts.

If you can not then: You must have installed gnome-screenshot that you can search in the software center of Ubuntu, i take always screenshots with this program because it have a time (waiting in seconds) for take a screenshot.


Ethernet does not connect when WiFi is enabled

Try executing this command

echo on | sudo tee /sys/class/net/eth0/device/power/control

it usually solves all ethernet-related issues


Get variables from php file to bash sh script

Using GNU grep if available, you can do this

grep -Po "(?<='dbname' => ).*(?=,)" file

In your script:

DATABASE=$(grep -Po "(?<='dbname' => ).*(?=,)" $FILE_NAME)
DATABASE_HOST=$(grep -Po "(?<='host' => ).*(?=,)" $FILE_NAME)
DATABASE_PASS=$(grep -Po "(?<='password' => ).*(?=,)" $FILE_NAME)
DATABASE_USER=$(grep -Po "(?<='username' => ).*(?=,)" $FILE_NAME)

With the -P option you activate Perl-like regular expressions.

With the -o option you get only the captured string, not the whole line.

Basically this happens:

(?<=<string starts with>)<capture this string>(?=<string ends with>)