Tried switching to KDE, but certain things look wrong

The Kubuntu is using the kubuntu-firefox-installer /1/ whitch is installing the firefox-kde-support /2/. Without the KDE integration the Firefox is using native (GTK ?) dialogs.

Do you have the firefox-kde-support installed ?

(1) (Kubuntu 11.10) http://packages.ubuntu.com/oneiric/kubuntu-firefox-installer

Description: Mozilla Firefox installer for Kubuntu
Enables easy installation of Mozilla Firefox on Kubuntu, via a graphical user
interface and menu entry.

(2) (Kubuntu 11.10) http://packages.ubuntu.com/oneiric/firefox-kde-support

Description: Integration of Mozilla Firefox with KDE
 This is a helper application that allows Mozilla Firefox to use
 KDE file dialogs, file associations, protocol handlers and
 other KDE integration features.

Very old way: http://kde-look.org/content/show.php?content=13967


Will Ubuntu 11.10 use the GNOME 3 system settings?

It already does:

gnome-control-center:
  Installed: 1:3.0.2-1ubuntu4
  Candidate: 1:3.0.2-1ubuntu4
  Version table:
     1:3.0.2-1ubuntu4 0
        500 http://archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages


How can I disable LLMNR in systemd-resolved?

There's a general LLMNR setting and a per link LLMNR setting
There's the LLMNR setting in systemd-resolved and there's also the per-link LLMNR setting in systemd-networkd.
The setting you're looking at in the systemd-resolve --status output is actually the one from systemd-networkd. Except that, if you're not running systemd-networkd, it will STILL show LLMNR setting: yes.
The default setting will show something like this:
Link 2 (ens3)
      Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
       LLMNR setting: yes

It also means systemd-resolved will be taking requests on UDP port 5355 (the LLMNR port), on these interfaces.
Changing resolved.conf file will change "Current Scopes:" line
If you disable it by setting LLMNR=no in resolved.conf and restarting systemd-resolved, then you get:
Link 2 (ens3)
      Current Scopes: DNS
       LLMNR setting: yes

You can see that the scope changed from DNS LLMNR/IPv4 LLMNR/IPv6 to just DNS. So it will use DNS only and will no longer take requests on UDP port 5355.
Changing *.network file will change "LLMNR setting:" line
If you're also using systemd-networkd, you can further disable LLMNR on that interface, by setting LLMNR=no in the [Network] section of the *.network file for that interface.
For example:
# /etc/systemd/network/90-ens3-nollmnr.network
[Match]
Name=ens3

[Network]
LLMNR=no

After setting that and restarting systemd-networkd, the output of systemd-resolve --status will include:
Link 2 (ens3)
      Current Scopes: DNS
       LLMNR setting: no

Summary
So, in short, LLMNR setting: yes just means that it wasn't explicitly disabled on that interface. And it can only be disabled on that interface if it's being managed by systemd-networkd. If you disable it through resolved itself, it will essentially have the same effect, but it will only show in the list of current scopes, and not really under LLMNR setting.
NOTE: Some pointers to the code showing that LLMNR=yes is the default setting here and here.


Failed to install latest virtualbox 5.2.10 on ubuntu 18.04

I finally figured out that apt provides 5.2.10 but oracle's latest is 5.2.12.

So I added the key and repository to apt. Then installed virtualbox-5.2 package. It works.

Not ideal, because there's all sorts of stuff that now wants to remove it and install virtualbox instead, and I need to remember to disallow that every time.

But at least it works. Once 5.2 is in the apt repos, I guess I can switch back.


Well, here is an answer, but it does require use of terminal. The only way you will get better is if you actually use Terminal ;)

First, find the packages you want to delete using

dpkg -l

Find the package. For example, I want to delete OpenArena. I just do

sudo apt-get --purge remove openarena

Sudo will ask for a password, so enter that in, and the program will be deleted in a short amount of time.

Remember that this is all case-sensitive, so be careful!

They also have package-specific names, so using dpkg -l will definitely help you, as they display package name on there.

More on removing apps through terminal here

If this really seems confusing, then I would suggest going to Synaptic and removing your package there, since it is way less buggy than Ubuntu Software Center. You might have to install it, and this will require use of Terminal. Just type in to your terminal window

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install synaptic

Hope this helps.


Two possibilities in vim:

search and replace in the visual selection: choose a visual selection (v from normal mode), and then use:

  :'<,'>s/1/3/g

you will notice that if you press ":" from visual mode the :'<,'> will appear automatically so you have just to type the search and replace command;
(my preferred one) edit in vim, and when on a number in normal mode, CTRL-A will increment it, CTRL-X will decrement it --- that's one of the most useful shortcut in vim...


How to I prevent Ubuntu from kernel version upgrade and notification?

Thank You Mikewhatever for clarifying I needed to use package hold.
I used this post as a reference and ran command :

uname -r

to find my Kernel Version.
It gave output:

4.10.0-27-generic

Then I ran command:

sudo apt-mark hold 4.10.0-27-generic

and it gave output:

linux-cloud-tools-4.10.0-27-generic set on hold.
linux-headers-4.10.0-27-generic set on hold.
linux-image-4.10.0-27-generic set on hold.
linux-image-extra-4.10.0-27-generic set on hold.
linux-signed-image-4.10.0-27-generic set on hold.
linux-tools-4.10.0-27-generic set on hold.

I believe this should be what I wanted to accomplish.


I have had my laptop give me ethernet status before wifi status also. Is wifi just a little further down? I had to think & look twice! :)


how to remove GRUB after removing the linux?

Assuming you have deleted all the partitions linux was in (if you haven't you can do it from windows later) you will need to make the windows bootloader the standard, the easiest way of doing this is with windows itself, you should make a new windows recovery usb, and then use it to repair the bootloader.
You should boot your system from the recovery usb (the way to do this depends on your particular system) and then do the following:

Click on the Repair your Computer link at the bottom of the Install Now screen.
Click on Troubleshoot
Select Command Prompt
Enter the following three commands in turn, following each by pressing the Enter key:

    bootrec /fixmbr
    bootrec /fixboot
    bootrec /rebuildbcd

Restart the PC with the installation media removed to check if the repair worked

source: https://www.dell.com/support/article/es-uy/sln300987/how-to-repair-the-efi-bootloader-on-a-gpt-hdd-for-windows-7-8-8-1-and-10-on-your-dell-pc?lang=en


You can upgrade without external storage following this tutorial:
https://ubuntu.com/blog/how-to-upgrade-from-ubuntu-18-04-lts-to-20-04-lts-today
If you want clean wipe, you need to boot installer from external storage.


How do I find all custom-created symbolic links in the entire system?

find . -user "$USER" -type l

Lists all symlinks under the current dir and subdirs created by your user. This also means created by a program your user (you) started, but if you can remember creating the listed symlink it should be fine. Verify the last access time if unsure. If you also want to follow the links, pass -L.


How do I determine what version of Thunderbird is running on my Ubuntu 16.4.1?

Simple. Fire up a terminal with CTRL+ALT+T and run the following command:

thunderbird --version

The output I got was:

(process:3718): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed
 Thunderbird 38.4.0

So you can see my system has Thunderbird version 38.4.0.

Alternatively, a GUI way is to open Thunderbird and go Help > About Thunderbird. I get this window, which shows the version:


I wanted to make duel boot. I had GRUB/Boot problem. I repaired boot using Boot-Repair tool. But In OS selcetion, there is only Ubuntu no Windows 8

You should run from terminal

sudo update-grub

The grub will read the both OS installed on you harddisk


HP zbook studio G5 not adjustable brightness 18.04 gnome

Bios Upgrade:HP Firmware Pack (Q71)
    01.08.00 Rev.A  18.9 MB Aug 14, 2019

Nvidia Driver upgrade from 390 -> 430 (using ubuntu 18.04 proprieraty drivers)

Resolved my issues with instability/crashes AND brightness buttons


How to fix pip after running it with sudo?

By running pip as root ("with sudo"), you've had pip save information, as root, somewhere in your $HOME directory tree. This is a disadvantage of using sudo.

You can find all the files under $HOME that are not owned by you with:

sudo find $HOME \! -user $USER -print | xargs ls -ld

And, if you want to change them all back to your ownership:

sudo find $HOME \! -user $USER -print | xargs sudo chown $(id -u):$(id -g)

will do it.


Seemingly duplicate trusted GPG keys in /etc/apt/trusted.gpg.d

These files are left-overs from before and after your upgrade: verify these with the same files in /etc/apt/sources.list.d and look which files in that directory contain any meaningful data.

The empty files in sources.list.d and their counterparts in trusted.gpg.d can be safely deleted.


How do I replace linuxmint with 16.04 LTS with flashdrive?

You can do it according to this link, help.ubuntu.com/community/mkusb.

mkusb works in and with all current Ubuntu versions and desktop flavours.


How to inject two form answers from inline command execution (shell)

I think that the only way you will be able to do this is by setting the environment inside the remote command string ex.

ssh -o StrictHostKeyChecking=no admin@10.12.50.254 'SVN_USER=foo SVN_PASSWORD=bar sh /base/myscript.sh appname'

Although SSH provides a SendEnv option that in principle allows you to pass environment settings from local to remote, that relies on a corresponding AllowEnv setting in the remote sshd_config file: at least in the Ubuntu, the defaults only permit locale-related environment settings i.e.

SendEnv LANG LC_*

and

AcceptEnv LANG LC_*


Copy differences between two dirs to a a new dir?

If I understand you correctly, you want to compare files in two directories and copy the files with different contents to a third directory. I don't see a way to do that with just one command (unless you write your own script or function). But one of the strong points of the bash shell is that you can chain commands, using the output of one command as the input of the next.

First, you can use diff as usual:

diff -q dir1/ dir2/

That will give you an output along the lines of

Files dir1/file2.txt and dir2/file2.txt differ
Files dir1/file3.txt and dir2/file3.txt differ

Now, you need to extract the file paths from that output. You could use a number of commands to do that, cut, grep, sed, awk or others. I'll use awk in this example and extract the files from dir2:

diff -q dir1 dir2 | awk -n '{ print $4 }'

The output of this pipeline would be something like

dir2/file2.txt
dir2/file3.txt

That output can now be fed to xargs as follows:

diff -q dir1 dir2 | awk -n '{ print $4 }' | xargs -d '\n' -I {} cp {} target-dir/

Please note that this method only works when the differing files exist in both directories. If there's a file that only exists in one of the two directories, diffs output will be different, which will make cutting the filename out fail. Also, the file names must not contain any spaces, because that would trip up the cutting as well.


Redirect all requests to https://www. using Apache on Ubuntu 18.04

Solution found: There's an own file for HTTPS/SSL/433 at /etc/apache2/sites-available/000-default.conf.
After I added the following code in /etc/apache2/sites-available/000-default.conf, everything is working as expected now:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


How to authenticate a startup disk image?

ldlinux.sys is for booting Linux from MSDOS formatted floppy disks. Modern Ubuntu images (like 14.04) do not use ldlinux.sys. Instead they use isolinux.bin which is part of the El Torito Boot image of the ubuntu.iso.  To dump the El Torito header do:

$  xorriso -indev ubuntu-14.04-desktop-amd64.iso -toc
xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project.

xorriso : NOTE : Loading ISO image tree from LBA 0
xorriso : UPDATE : 507 nodes read in 1 seconds
xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
Drive current: -indev 'ubuntu-14.04-desktop-amd64.iso'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Boot record  : El Torito , ISOLINUX isohybrid MBR pointing to boot image
Media summary: 1 session, 493568 data blocks,  964m data, 11.2g free
Volume id    : 'Ubuntu 14.04 LTS amd64'
Drive current: -indev 'ubuntu-14.04-desktop-amd64.iso'
Drive type   : vendor 'YOYODYNE' product 'WARP DRIVE' revision 'FX01'
Media current: stdio file, overwriteable
Media status : is written , is appendable
Media blocks : 493568 readable , 5895012 writable , 6388580 overall
Boot record  : El Torito , ISOLINUX isohybrid MBR pointing to boot image
Boot catalog : '/isolinux/boot.cat'
Boot image   : '/isolinux/isolinux.bin' , boot_info_table=on
Boot image   : '/boot/grub/efi.img' , platform_id=0xEF
TOC layout   : Idx ,  sbsector ,       Size , Volume Id
ISO session  :   1 ,         0 ,    493568s , Ubuntu 14.04 LTS amd64
Media summary: 1 session, 493568 data blocks,  964m data, 11.2g free
Media nwa    : 493568s

If you modify any of this boot structure, the checksum (SHA256) of the ubuntu.iso would be different. You can get the SHA256SUMS, SHA256SUMS.gpg, and the ubuntu.iso from releases.ubuntu.com. You can verify a USB flash image on a USB drive by using dd to write the image, and then reading it back and comparing it to the original:

# checksum downloaded image (check this matches the published hash)
$ sha256sum ubuntu-14.04-desktop-amd64.iso
cab6b0458601520242eb0337ccc9797bf20ad08bf5b23926f354198928191da5  ubuntu-14.04-desktop-amd64.iso

# write image to USB flash
$ dd if=ubuntu-14.04-desktop-amd64.iso of=/dev/sdb

# read image from USB flash and checksum it
$ /bin/ls -l ubuntu-14.04-desktop-amd64.iso
-rw-r--r-- 1 user user 1010827264 Apr 17 10:51 ubuntu-14.04-desktop-amd64.iso
$ dd if=/dev/sdb bs=512 count=1974272 | sha256sum
1974272+0 records in
1974272+0 records out
cab6b0458601520242eb0337ccc9797bf20ad08bf5b23926f354198928191da5  -
1010827264 bytes (1.0 GB) copied, 34.1066 s, 29.6 MB/s

dd makes an exact binary copy, so you can easily compare original image to the image on the drive. You will need to specify an exact length to read back from the USB drive, otherwise the checksum will be different.

If you use a different tool (not dd) to write to the USB drive, then it might write different binary data, and you will need to generate your own checksum by writing using your tool, and then reading the drive with dd. If you do not trust a single PC, but trust several, then you will have to recreate your image on several PCs, and ensure the image generates the same checksum on all.

If you assume that the computer that you use to download the image and write the USB has been compromised, then you can never trust anything that it does. It could report that the checksum was fine, and that the image had not been tampered with - but you could never trust it, because it had already been compromised. Researchers have managed to develop systems that can infect EFI firmware, and thus survive a full format wipe of the hard drive, and at the same time report that Secure Boot is enabled and working fine, even though the system has been entirely subverted. Once a system has been compromised, you can never fully ensure that it has been cleaned. Hence why the NSA has a program in place to redirect, intercept and compromise target systems whilst still in the hands of a courier, before being delivered to the customer.


Kubuntu: Chrome and Firefox Tab and bookmarks fonts are really tiny

I know this is an old question but I came across it when looking for an answer to a similar problem; tiny font sizes in browser tabs and in program menus.
The solution I found (for Kubuntu 16.04 anyway) was in the System Settings > Fonts. At the bottom of the page is an option to Force fonts DPI: with an option to increase or decrease the number (default is 72 or 96). I increased mine up to 168 to get 16pt fonts to look about normal on a screen with a resolution of 2560 x 1440. Hit apply and restart applications to see if that fixes it.


NFS hangs on resume from suspend [after Wily update]

I hit the same issue (hanging after resume).  Though the OP didn't say, I assume he is mounting /home over NFS.

The hang seems to be specific to NFSv4.  Using NFSv3 works.  In this case you also need "nolock" (otherwise it will hang when trying to log into a GUI session).

So your fstab entry should look like this:

server:/home /home   nfs     vers=3,nolock   0   0


These errors often arise due to bad profile configuration. Rename the profile folder using the following cmd:

 cd ~/.config && mv libreoffice libreoffice.old

New profile is generated automatically...

Source: link


Snappy install is not a Debian package manager but is like Google play and apple's App Store, if there is no app to deploy then somebody needs to make it. See how to create snappy apps for more details but the gist is to put your code and all its dependencies in a directory, add a meta subdirectory with a package.yaml and do snappy build directory. This will create a snap. Afterwards you test with snappy remote and finally you upload it to the store hence snappy install works.


Instead of DBUS_BUS_SESSION I should have used DBUS_BUS_SYSTEM, as interface org.freedesktop.UPower doesn't send signals in session scope.

As simple as that.


Ubuntu  a lot of errors which are most of the time not a problem. Just don't worry about them until you see something strange. Those errors are automatically corrected by Ubuntu.


By default, Zoom automatically adjusts the size of the UI elements. If your Zoom has very large buttons, it probably detects your screen resolution wrong. This can be the case in multi screen environments or high resolution screens. In this case you can disable the automatic scaling in the config (though afaik not from the GUI) and set a specific scale factor instead:

exit Zoom (i.e. close everything, including the tray button)
open ~/.config/zoomus.conf
change the autoScale setting to autoScale=false
(optionally) change the setting for scaleFactor. Small buttons would for instance be displayed with scaleFactor=1, bigger ones with scaleFactor=2.
restart Zoom. The settings should then take effect.


Ubuntu 16.4 , need i386 libGL.so.1 I think (but not for Steam)

The answer here is making it work

Missing libGL.so.1 when trying to launch Steam

This installs the 32-bit graphics libraries that are needed.

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


How to install Ubuntu 13.04 if I don't know how to rezise my partitions?

if you need to do advanced partitioning I suggest using gparted to handle that then just use the something else option in the installer and just tell it what to use each partition for

less than 2.9GB is too small to install ubuntu in it entirety to, it is fine for a part of it,
this video covers advanced partitioning:
http://www.youtube.com/watch?v=2sPGEwqoXA0

If you are trying to dualboot with windows you need to resize windows to make room (defrag windows 1st, unless you are using a ssd)


The default setting for touchpads on Kubuntu does not allow tapping to be accepted as clicking. Since your touchpad does not have buttons, you'll have to use the keyboard and go to the touchpad settings and enable this function manually.

I'd suggest connecting a mouse temporarily just to enable the setting above and disconnecting it afterwards.


Cannot login by GUI, startx starts for root only

The comment from link in question helped.

At the login screen, press control+alt+F3.
Login
sudo rm .Xauthority
sudo rm .ICEauthority
sudo reboot

Looks like running X as root makes the .Xauthority and .ICEauthority files owned by root as described in linked post.


Not as such. But, since Linux is open source you may download the kernel source and configure it any way you like, build it, and boot.


I hate the three horizontal bars on top. Any idea on how to reduce or merge them like ubuntu 16?

You can turn off the titlebar in Firefox.

Press the Alt key and select View -> Toolbars -> Customize

Unselect Title Bar at the bottom of the page

Enjoy no Title Bar


Upgrade interrupted, can I get network access in recovery mode?

Very strange issue.
I needed to add:
nameserver 8.8.8.8 to /etc/resolv.conf
after running:
sudo dpkg-reconfigure resolvconf and restarting the network manager with:
service network-manager restart

Not sure if I fixed it accidentally another way, but this is what fixed this very specific and strange issue. I still can't get to the login screen but that is a separate issue.


Rackspace clouds are directly supported by Juju 2.0+

For information about adding credentials, see:

https://jujucharms.com/docs/2.0/help-rackspace


ATI Driver not working after system update?

Jockey re-downloads everything on every driver re-install as far as I know.

Use jockey to remove the driver, reboot, re-install the driver also through jockey, and you should be fixed.

This is a common problem for people that compile the latest ATI driver themselves.  If you did that, you need to remove all the self-compiled components so that jockey and the jockey installed amdcccle appear first in your search path and just work.


Give external USB (ext4) drive a short name

Give the filesystem on your disk a label with the e2label command. For example: if your filesystem is on /dev/hdc1, run sudo e2label /dev/hdc1 my_external_hd. I think you may need to unmount the filesystem with sudo umount /media/a1f2e5f6-a9bc-dd2a-c2c9-1f48c39b39ee before this will work.

To find out what device your mounted filesystem is on, the command mount will give you a list.


How do I gain permission to move and see files in in an Ubuntu installation from a live USB?

Root is the owner of the mountpoint, and you (anonymous user of live session) have no permission there. You can gain elevated permissions by using sudo. I usually do this task with the cp command, but to use the file browser to move the files, open a terminal by typing ctrl+alt+T and type:

sudo -i
nautilus

Find the files you want and move/copy them to the desired location

When done, close the Nautilus window and type exit in the terminal to drop privileges.


What's the fairest way to monitor total CPU time - per user?

Sounds like you need process accounting.

http://www.faqs.org/docs/Linux-mini/Process-Accounting.html

On Ubuntu, the process accounting tools are in the acct package

To get a per-user report, run

sa -m


If you want to make some file executable you should use

chmod +x <path_to_your_file>

However here you are executing a .jar file.  so you  can also  execute it with the help of java like this

java -jar  <path_to_your_jar_file>


I know why now. It has to do with the command below.

$ sudo systemctl status tomcat

It is supposed to be

$ sudo systemctl status tomcat8

Thanks


USB sticks and video devices not recognized

Ok, I just solved my own problem: I installed the latest package updates, did a reboot and now my usb sticks and video devices are recognized.
Not sure what was happening exactly but problem solved.


tail -F -n0 file.txt

Man page about -n:

   -n, --lines=K
          output the last K lines, instead of the last 10; or use -n +K to
          output lines starting with the Kth


boot options disappear after installing windows in UEFI mode?

As suggeted by @mchild in the comments, you need to use correct version of Ubuntu live image. If it doesn't work follow below steps to fix the issue.

You can enable to boot into both UEFI and Legacy BIOS from firmware settings. Many computers with UEFI firmware will allow you to enable a legacy BIOS compatibility mode. In this mode, the UEFI firmware functions as a standard BIOS instead of UEFI firmware.

However, I recommend reinstalling Ubuntu as UEFI.

Uninstall Ubuntu

Make a backup of your /home first. Even if it is in a separate partition, make a backup. You may need to delete this partition too as you may run into issues with MBR and GPT as Ubuntu was installed from Legacy BIOS. But you can have a try without changing it...
To uninstall Ubuntu, boot into Windows and delete your Ubuntu partitions (They will not have a file system name).

If you are planning to install Ubuntu using Something else option leave the free space as it is. If you will use the Install alongside Windows option, extend the Windows partition so that it takes up the free space too.

Repair Windows boot loader. See How to Repair Windows Bootloader Problems for instructions.

This will also help How to Uninstall a Linux Dual-Boot System From Your Computer

Install Ubuntu

This is really straightforward really. You have already installed Ubuntu once so you know how it is done.

This time just do what you did before but make sure that UEFI is the only boot option enabled in Firmware settings.
Boot into your bootable USB but make sure you boot into the UEFI version. There may be two (these may have different names. Look for one that starts with UEFI-).
If you have booted into UEFI you will see the Install alongside Windows option. If you can see this you can either chose it or chose the Something else option. If you don't see it you haven't selected the UEFI option.
Make sure that after installing, Ubuntu is 1st in boot sequence in firmware options.


Can I swap the CapsLock key and the left Ctrl key in the remmina RDP session?

Install AutoHotKey on Windows 10, create a .ahk file with the following contents:
Capslock::Control

Add that file to the startup folder (type shell:startup on Windows Run dialog box).


How do I install QEMU 3.0 on Ubuntu 18.04?

It seems that we need to compile QEMU 3.0.0 manually.

At first we remove version installed from official repository (if any):

sudo apt-get purge "qemu*"
sudo apt-get autoremove

We should start by installing its build-dependencies - at first enable Source Code repositories in Software and Updates (software-properties-gtk) and then:

sudo apt-get build-dep qemu

Then download it, configure and compile:

cd ~/Downloads
wget https://download.qemu.org/qemu-3.0.0.tar.xz
tar -xf qemu-3.0.0.tar.xz
cd qemu-3.0.0/
./configure
make

and then use checkinstall:

sudo apt-get install checkinstall
sudo checkinstall make install
sudo apt-get install ./*.deb

if you want to remove it - remove its packages as usual.

And as the result you will have QEMU 3.0.0 installed

$ qemu-system-x86_64 --version
QEMU emulator version 3.0.0
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers


Command to display an arbitrary message if a particular file exists

Use this simple Bash one-liner:

if [ -e FILENAME ] ; then echo Yes ; fi

The -e check evaluates to true if FILENAME exists, no matter what it is (file, directory, link, device, ...).

If you only want to check regular files, use -f instead, as @Arronical said.


What's the best practice for setting up Steam on a second hard disk?

Steam supports external library folders that allow you to setup game install folders on multiple drives, and then when you install a game you can choose which Steam Library Folder to install it to. With this functionality you don't need to use any magic to accomplish what you want.


software center not showing openmpi and other essential packages

You can install it via the command line.  Need to open terminal CTRL+ALT+F1, and there you just:

  sudo apt-get install openmpi-common

You can do the same for any other library package.  As indicated in one of the comments, libraries not always show in the Ubuntu Software Center (USC).

If you prefer to use a GUI you can always install synaptic through the USC and then just use that to install the packages.


How to prevent battery charging unless dips below 95%? on an Asus U31SD-XH51

For my model, U31SD-XH51, I simply added "acip_backlight=vendor" to grub and update it.  It actually fixing all backlight problem for me.  No longer I need to mess with /etc/rc.local or LMT(laptop-mode-tools).  If anyone got a U-series, please follow the steps below and give it a shot.

sudo gedit /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
sudo update-grub

Best of all, the battery charging concern I am having is fixed as well.  Now, it won't charge unless dips below 95%.


The first what you can do is, fix the broken dependencies

sudo apt-get install -f

The output of apt-cache policy gconf-service gconf2 says, the needed version 3.2.6-3 of gconf-service is a vaild installation candidate. If the previous command has not solved the problem, run

sudo apt-get install gconf-service=3.2.6-3

But my suggestion is, remove the Kali repositories from your system and don't play with Kali without knowing what you're doing:

find /etc/apt -type f -name '*.list' -exec sed -i '/sana/d' {} \;
sudo apt-get update
sudo apt-get install -f


Unfortunately the correct answer doesn't solve your problem.

Currently X.org is not able to split graphics to two different video cards.  A long time ago there used to be a way to do this using Xinerama, however only the proprietary drivers still support Xinerama.  IOW, you can't do this if one of the GPUs is Intel Graphics.

Now, you can get this to work if you use two NVIDIA cards using -nvidia and Xinerama (or perhaps TwinView).  And maybe two AMD cards using -fglrx.

However, my recommendation would be to buy a new NVIDIA card that has two outputs on it, and connect your two monitors to that.  Then you can run either -nvidia or -nouveau and it should give good performance and be stable.

Of course, it would be nice if the configuration you're attempting worked.  There are some efforts upstream to rearchitect X to allow it, but this is still in the development stages and may be a year or two.  But if you are looking for something to spend some time on as a hobby and aren't afraid of breaking your system, you could experiment with the upstream codebases and supply them with feedback.


ubuntu: facing problem in installing compass

Install compass with the package manager.

ruby-compass is in the universe repository, so make sure you have a

deb http://<your-server>/ubuntu/ <your-ubuntu-version> universe

line in your /etc/apt/sources.list

Next run:

sudo apt-get update; apt-get install ruby-compass

See also https://help.ubuntu.com/community/Repositories/Ubuntu


Unable to create a wireless hotspot menu not showing

From what is see from your screen-shots, you have your wireless connection off, you have to turn it on before making it a Hotspot.
Creating a Wi-Fi Hotspot from setting only worked in Ubuntu gnome for me. but there is another way to do it.

Go to a terminal by pressing ctrl+alt+T and copy past this into it:
sudo apt-get install kde-nm-connection-editor

after install open the KDE connection editor from the dash, or by pressing alt+f2 and run kde-nm-connection-editor to launch it.

Click the Add button and choose Wireless (shared) from the list.

Type in a name, ssid, and select Access Point mode and set up a password under the Wireless Security tab and click OK.

click Network Manager applet on Unity panel and then choose Connect to Hidden Wi-Fi network, choose the connection you created in the previous step and click the Connect button.

Now go to your phone and most see your hotspot ssid there!
Enjoy!  :-)
NOTE: you mad need to press fn+alt+f2 to run the command, depending in your BIOS setting.


How to install VMware Horizion Client with a CAC card reader for Ubuntu 16.04 LTS?

These steps are for the implementation of a user needing to use a CAC device to log into a VDI via VMWare Horizion Client. Also, these directions are written for the installation of VMWare Horizion Client 4.5.0 in an Ubuntu 16.04 LTS base OS.

Install the following from Synaptic or Software Manager

CoolKey
pcsc-lite
pcsc-ccid
perl-pcsc
pcsc-tools

After these items are installed, connect your CAC Card reader device to your PC
In a terminal window run the following command to ensure that your PC recognize your CAC card

pcsc_scan

After you verify that the PC is reading your CAC card, press Ctrl+C and close the window.
Download the VMWare Horizion Client. Ensure you select the most current version.
After you download install the following packages run:

sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev v4l-utils pulseaudio

Now create symlinks to the latest versions

sudo ln -s libudev.so.1.6.4 /lib/x86_64-linux-gnu/libudev.so.0
sudo ln -s libffi.so.6 /usr/lib/x86_64-linux-gnu/libffi.so.5

Install the VMWare Horizion Client

cd ~/Downloads/
chmod +x VMware-Horizon-Client-4.5.0-5650368.x64.bundle
sudo ./VMware-Horizon-Client-4.5.0-5650368.x64.bundle

I selected the following options: Client Drive Redirection, USB Redirection
Make the following changes below to enable your CAC card reader to be recognized by the VMWare Horizion Client

sudo mkdir -p /usr/lib/vmware/view/pkcs11

Now create symlink for the CAC Card to be regonized by the client

sudo ln -s /usr/lib/pkcs11/libcoolkeypk11.so /usr/lib/vmware/view/pkcs11/libgtop11dotnet.so


What is an kernel update with "Bump ABI"?

First off, you are not looking at the changelog for the linux kernel.  You are looking at the meta package, which is a package that depends on the latest kernel.  You probably want something like: http://changelogs.ubuntu.com/changelogs/pool/main/l/linux-image-2.6.35-28-generic/linux-image-2.6.35-28-generic_2.6.35-28.50/changelog

The purpose of this meta-package is to transition the user through these ABI bumps.

I hold the same view as you on the ABI and the kernel.  Practically speaking, an ABI bump means that all the modules need to be rebuilt against the updated kernel.

My understanding is also in line with Roland, in that an ABI bump does not mean new features, just critical fixes and security updates.


How to find out the terminal command of an application?

Most default applications will have a .desktop file located in /usr/share/applications.

To find out about the corresponding terminal command that will be run when launching one of these applications open the file browser Nautilus and right click on the application's icon to select Properties in the context menu. This will give you all details you need (shown here for System Settings that will run gnome-control-center -overview)


Expire Account

Let the account expire to disallowing a user from logging in from any source including ssh:

# disallow peter from logging in
sudo usermod --expiredate 1 peter

This is how you can reenable that account:

# set expiration date of peter to Never
sudo usermod --expiredate "" peter

Lock a Password

To disable / lock the password of user account use below command. This will not disallow ssh-access on Ubuntu. This prepends a ! to the password hash so that no password will match it anymore.

# take away peters password
sudo passwd -l peter

To unlock him:

# give peter back his password
sudo passwd -u peter

Expire a Password

This command seems to differ across platforms. On Ubuntu, expiring a password will command the user to make up a new one once he logs in. This is not suitable for disabling an account.

# make peter think of a new password on login
sudo passwd -e  YYYY-MM-DD peter


Install on Second Hard Drive with startup boot option?

How it works

Each partitioned disk contain one small block called MBR. It resides at the beginning of the disk.

Now, the OS inserts their code to MBR to load their own bootloader.
Windows does same, Linux does same.

They insert a small code pointing to actual location of bootloader. Like in Linux, This MBR contains Stage1 of GRUB (GRUB is a bootloader used in Linux) which loads a larger executable Stage2 that may located in other partition.

If you install Windows, and then Linux, GRUB Stage1 sits in MBR. Now other part of GRUB (the actual bootloader) contains the Windows bootloader location. Now when you select Windows from GRUB menu, Windows starts to load. This is called chain loading (GRUB loads first, then GRUB loads the Windows bootloader based on selection).

Coming back to your question

In your case, you have two MBR (because you have 2 hard disks).

Therefore, you have two options:

Easiest Option

Create a partition on 2nd disk.
Install Ubuntu on that partition & install GRUB on 2nd disk's MBR not on first disk's MBR. Be careful here. See below image (just for demo purpose), you need to do everything in (probably) sdb.
You select your already created sdb partition, edit, assign mount point /, and file system type ext4
Select boot loader location as sdb , not sda (see red colored section)

Once done, reboot and you will be booted to Windows 7.

It happens because, your boot disk priority says to boot from first hard disk (Where we didn't change anything).

So open BIOS, change boot disk priority so that the disk containing Ubuntu comes first.

This time, GRUB will be loaded. And you can boot either OS.
Remove the disk, Windows 7 will boot directly.
Again plugin the 2nd disk, verify boot order from BIOS so that 2nd disk comes first. You can now boot any OS again.

Another Option

You can modify Windows bootloader also to load Ubuntu from 2nd disk. It is a bit harder, and since you don't want to touch Windows 7 at all, I am not recommending it.

Note: All tutorials available here talks about adding Ubuntu from same disk but different partition. I have not done it for across devices, you may need to adopt accordingly.

Here is a tough guide to do so.

There is a great GUI tool to edit boot loader called EasyBCD (It is free for personal use). Their guide about setting up Ubuntu using Windows bootloader.

You can have more resource on it Easy BCD Help: Dual boot Win7 and Ubuntu 11.10 -- "Add new Entry" for Ubuntu

I strongly recommend using GRUB as bootloader, as it is more flexible. May be you can set Windows as default boot option AND/OR reduce timeout value.


As mentioned here in answer #6 https://answers.launchpad.net/ubuntu/+question/249516

sudo apt-get --purge remove tlp

That will uninstall the TLP package and remove all configurartions


How to produce MathType equations in a MS Word document under Ubuntu?

I am not familiar with MathType. If you are searching for a way to integrate LaTex formated formulas in your document using LibreOffice, TexMaths is the way to go. See here for more extensive documentation: http://roland65.free.fr/texmaths/


If you right-click in the panel and select "Panel Settings", on the "Geometry" tab, there is a "Monitor" selection box. This allows you to choose which monitor the panel displays on, and also has an "All" option, which will stretch it across multiple displays. There doesn't appear to be a way (in this settings UI) to duplicate it on every display, but this covers most use cases.


From https://ubuntu.com/kernel

The easiest way to determine the kernel you’re running is to type cat
/proc/version_signature on the terminal. For example:
$ cat /proc/version_signature
Ubuntu 5.4.0-12.15-generic 5.4.8
This output provides important information about the kernel:
Canonical adds "Ubuntu"
Ubuntu kernel-release = 5.4.0-12.15-generic
    kernel version is 5.4, which is identical to upstream stable kernel version
    .0 is an obsolete parameter left over from older upstream kernel version naming practices
    -12 application binary interface (ABI) bump for this kernel
    .15 upload number for this kernel
    -generic is kernel flavour parameter, where -generic is the default Ubuntu kernel flavour
Mainline kernel-version = 5.4.8


How to install pygobject-3.0 in Ubuntu for compiling a project with meson?

For this you're going to want:
sudo apt install python-gi-dev

How to find the package name
(based on a comment by @N0rbert)

Go to packages.ubuntu.com
Select the radio button packages that contain files whose names contain the keyword
Search for pygobject-3.0 in contents of packages

It will show you the package.


You gave access to user2 to the specific sub-folder: /home/tools/domains/domain.tools.com/public_html/storage/users

I assume that the reason you failed to access that folder by user2 is that user2 can't access some folders in the upper level of the folder hierarchy.

One possible way to solve it, might be added the x (change directory) permission to all directories above that folder to all users.

As user tools (or as root by using sudo) you can give the x permission on all directory (e.g.):

chmod +x /home/tools
chmod +x /home/tools/domains
chmod +x /home/tools/domains/domain.tools.com
chmod +x /home/tools/domains/domain.tools.com/public_html
chmod +x /home/tools/domains/domain.tools.com/public_html/storage
chmod +x /home/tools/domains/domain.tools.com/public_html/storage/users


On dual boot installation (Ubuntu + Windows 10), disabling "Turn on fast startup" in Windows resolved the problem for me. It's well hidden in Windows:

In Power Options Windows settings
Select Choose what the power buttons do menu option on left
Click Change settings that are currently unavailable link
Uncheck Turn on fast startup (recommended) option


Ubuntu hangs on purple boot screen 17.04

Unplug all other usb devices with the exception of the keyboard. Some low-end usb chargers and hubs could be causing issues.


Can't Install RTL8188eus Ubuntu 18.10 File during Installation Show error

If it is showing as 8188FTV and working then the device might not be RTL8188EUS and actually RTL8188FTV.

Here is the link which will correctly install. I have tested myself. (git should be installed before this.) You can use mobile data with usb-tethering option for this. Not large files.

git clone https://github.com/ulli-kroll/rtl8188fu

Need to make one change in the rtl8188fu/Makefile at line no. 445. Replace "$(MODULE_NAME)" with "rtl8188fu".

Then simply follow the given instructions, i.e.:

cd rtl8188fu
make
sudo make install

That's all.


Use gpg2 without GUI asking for passphrase

Change the option pinentry-program in ~/.gnupg/gpg-agent.conf to whatever (console) pinentry client you prefer, eg. pinentry-curses (install it if necessary).

pinentry-program /usr/bin/pinentry-curses


How to Disable Touchpad tap in Toshiba Tecra R850 in Oneiric - it is recognized as a PS/2 mouse

Ha! found it eventually on Ubuntu forums. You'd think this would be fixed in the kernel by now...

I found this and worked for me - at this site http://ubuntuforums.org/showthread.php?p=11478976

I downloaded and installed the driver indicated from here: http://people.canonical.com/~sforshee/alps-touchpad/psmouse-alps-0.10/psmouse-alps-dkms_0.10_all.deb

After installation and restart it works the way it is supposed to.


The GET, HEAD and POST commands on your system are likely symbolic links to /usr/bin/lwp-request, and are provided as part of LWP - The World-Wide Web library for Perl (installable on Ubuntu as the libwww-perl package):

$ dpkg -L libwww-perl | grep '/bin/'
/usr/bin/lwp-download
/usr/bin/lwp-dump
/usr/bin/lwp-mirror
/usr/bin/lwp-request
/usr/bin/GET
/usr/bin/HEAD
/usr/bin/POST

The simple answer to your question is that lwp-request does not currently implement the other methods.


Internet drops download for a few seconds every 30 or so seconds

Install a vendor driver for this chipset by running

wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.042.00-2_all.deb
sudo apt install dkms
sudo dpkg -i r8168-dkms_8.042.00-2_all.deb


configure generates a Makefile and often other files, such as config.cache. The contents of these files is based on the options you pass to configure and on observing your system. For example, many programs have optional components, and configure looks for the dependencies of each component and generates a makefile that only builds the components for which you have all the dependencies.

If you run configure and then change your system configuration, you should do make distclean first (if the program follows the usual conventions), to remove the makefile and configure's cache. Running configure again typically works when you want to pass it different arguments, but not when it's cached observations about your system.

Regarding libraries, the configure stage looks at what you have from a source compatibility point of view. If libfoo2 is source-compatible with libfoo3 but not with libfoo1, and you have libfoo2, then the resulting makefile will work build a binary linked against libfoo2 or a binary linked against libfoo3 but not a binary linked against libfoo1 (compilation would fail due to the source-level incompatibility).

When the executable is compiled and linked, the version requirement becomes more precise: the resulting executable needs a binary-compatible library (same ABI, not just same API).

Executables don't hard-code full paths to libraries; they hard-code names of libraries (-l argument to the linker) and sometimes a runtime library search path (-rpath) that comes in addition to the default search path of the target system. Finding the libraries at run time is the job of the dynamic linker.

I recommend playing a little with ldd and strace. ldd shows the libraries required by an executable and where the system would find them. strace shows all the system calls that happen when a program is loaded; the first few come from the dynamic linker that loads the required libraries. Here are a few experiments whose results you should try to understand.

ldd /bin/true
strace /bin/true
perl -pe 's/libc\.so/libc.zz/' </bin/true >broken
chmod +x broken
ldd ./broken
strace ./broken
ln -s /lib/libc.so.6 libc.zz.6
LD_LIBRARY_PATH=. strace ./broken

Summarizing the answers to your specific questions:

configure hard-codes source compatibility issues. The make step hard-codes binary compatibility issues. Library locations are determined at run time.
If only the location of the library has changed, the dynamic linker will typically find it (if you have a library installed in a non-standard location, pass the LD_LIBRARY_PATH environment variable). If you have only a different version of the library, then it's not the same library; you need to either get a library with the ABI version that your program is compiled against, or compile your program against the ABI version for which you have the library installed.
configure determines the build configuration from what you have on your system and the arguments you pass. make builds the executable and other bits. make install copies the bits into place; only this stage might require elevated permissions (if you don't already have permission to write to the target directory, which you would e.g. if you were installing into your home directory).
configure overwrites the makefile, but just re-running configure doesn't start from scratch because it keeps a cache.


Syndaemon not working any more in Ubuntu 14.04

You need to disable the same option in System Settings -> Mouse.

It starts syndaemon with other options and they conflict.


Starting Ubuntu gives no screen on external graphics and no GUI on internal

First activate the external NVIDIA graphics, then install the proprietary NVIDIA drivers.

Highlight the Ubuntu entry in the GRUB boot menu and press the E key.
Add nouveau.modeset=0 to the end of the linux line - press F10 to boot.

On login screen press Ctrl+Alt+F1 - enter user name and password - then execute :

sudo apt-get update
sudo apt-get install nvidia-352
sudo reboot

Note :
In case it does not work with nouveau.modeset=0 - try it again with nomodeset.
In case it still does not work, install the drivers with activated internal card and activate
the dedicated NVIDIA GEFORCE GTX 970 graphics adapter after the installation in BIOS.


I'm trying to do also some tuning with xkb and I can figure out a workaround.
You can map a multimedia shortcut to the CapsLock

key <CAPS> { [ XF86ApplicationRight ] };

You have a pretty big list of supported shortcuts, just pick one..

Then you can map the CapsLock to perform switching application (ie. switching to next opened windows in one press without displaying an overlay)
It also works with regular cycling windows however it seems to only toggle the last windows.

I think that cycling windows needs a shortcut that have a modifier key in order to keep the list of opened windows (the thumbnails overlay) and then to allow cycling to the desired window.

But this is a workaround that actually works.  In most distro the shortcut settings for this is under Windows Manager settings.


Switch from mirrored to extended displays

If you are a Gnome 3 user, the hotkey was Super+P

You can use the hotkey combination to switch back, or go to Settings->Displays to reconfigure your setup.


You can start gnome-settings-daemon as part of your Awesome start up process. I usually invoke it manually when needed.

Add this to your ~/.config/awesome/rc.lua file:
   awful.util.spawn_with_shell("gnome-settings-daemon")

… if you want to run it on startup. For me, at least, this was a lot easier than any other method I've tried.


Why do I have to use sudo if I am the only user?

you are not the superuser

root is the superuser

you have the ability to temporarily become root using sudo

By only elevating privileges explicitly and temporarily this way, you avoid accidents (such as deleting important system files) and make it harder for certain types of malware to take control of your system.


gir1.2-launchpad-integration-3.0 repository support has been discontinued

Though you can install using debian installer

gir1.2-launchpad-integration-3.0_0.1.56_amd64.deb
 gir1.2-launchpad-integration-3.0_0.1.56_i386.deb

It has dependencies which needs to be met that can also be downloaded

(1) liblaunchpad-integration-common

(2) liblaunchpad-integration-3.0

64-bit version
32-bit version

Start from installing liblaunchpad-integration-common

sudo dpkg -i liblaunchpad-integration-common_0.1.56.1_all.deb

Then install liblaunchpad-integration-3.0

sudo dpkg -i liblaunchpad-integration-3.0-1_0.1.56_amd64.deb

Finally install gir1.2-launchpad-integration-3.0

sudo dpkg -i gir1.2-launchpad-integration-3.0_0.1.56_amd64.deb

Et Volia! you are done.


Find out which packages were removed by sudo apt autoremove with the help of the logfiles /var/log/apt/history*:

cd /var/log/apt
zgrep autoremove history.log*

Output should be similar to

history.log.3.gz:Commandline: apt autoremove
history.log.5.gz:Commandline: apt autoremove
history.log.5.gz:Commandline: apt autoremove
history.log.6.gz:Commandline: apt autoremove
history.log.6.gz:Commandline: apt autoremove
history.log.8.gz:Commandline: apt autoremove

This means the file history.log.8.gz (and the others) contains details about the apt autoremove command. Now do

zless history.log.8.gz

Find the "offending" section; type /autoremove to search for it or simply hit PgDn a few times until you find it. The logfile won't be that large. You should find a section similar to this one:

Start-Date: 2018-06-08  21:34:40
Commandline: apt autoremove
Requested-By: pduck (1001)
Remove: linux-image-4.13.0-39-generic:amd64 (4.13.0-39.44), linux-signed-image-4.13.0-39-generic:amd64 (4.13.0-39.44), linux-signed-image-4.13.0-38-generic:amd64 (4.13.0-38.43), linux-image-extra-4.13.0-38-generic:amd64 (4.13.0-38.43), linux-image-extra-4.13.0-39-generic:amd64 (4.13.0-39.44), libisns0:amd64 (0.97-2), linux-headers-4.13.0-38:amd64 (4.13.0-38.43), linux-headers-4.13.0-39:amd64 (4.13.0-39.44), linux-headers-4.13.0-39-generic:amd64 (4.13.0-39.44), linux-headers-4.13.0-38-generic:amd64 (4.13.0-38.43), linux-image-4.13.0-38-generic:amd64 (4.13.0-38.43)
End-Date: 2018-06-08  21:35:08

This means user pduck issued apt autoremove at 2018-06-08  21:34:40 and the listed packages were removed. The command completed at 2018-06-08  21:35:08. Note that this example doesn't show an "offending" process, it's just for illustration. You need to find the autoremove command in your logfiles that removed the packages you are talking about.

You can also issue

zgrep -A2 autoremove history.log*

to include two lines after the matching line (autoremove), i.e. also show the Remove:... lines. Maybe that's easier for identifying the "offending" section.

Now that you have a list of removed packages you can reinstall them via apt install.


Ctrl + Alt + D ( Under SystemSettings -> Hardware -> Keyboard -> KeyboardShortcuts -> Navigation -> HideAllNormalWindows is the answer for the show desktop shortcut atleast. I still haven't found any way to put an icon on the panel though.


This is because mysql user does not have permissions to access your datadir. Please execute the below command to fix the issue :

sudo chown -R mysql:mysql /var/lib/mysql

Note : I am assuming that your datadir is /var/lib/mysql.


How to debug grayed out VPN connection in Network Manager?

Try installing network-manager-openvpn and network-manager-vpnc and linux-pptp.

sudo apt-get install network-manager-vpnc network-manager-openvpn linux-pptp

I know it's PPTP but it can't hurt to try this.

If that doesn't work, try this:

Backup /etc/network/interfaces to /etc/network/interfaces.original.
Delete all lines from /etc/network/interfaces not including the string "lo" (leaving two lines, probably the first two, beginning auto and iface).
Reboot.

Hope this works for ya!

From http://ubuntuforums.org/showthread.php?t=974882


Boot to the install CD. You can ten in the partitioner delete all of your partitions and create an NEW one for Ubuntu. A recovery CD may not work unless you create a blank NTFS partition in the beginning of the drive with gparted(See software center). If it is an install CD, easy.


Find and Rename recursively in folders, subfolders and multiple files

A bash script:

Create a new file find_and_rename and add the following lines:

version with replace

#!/bin/bash
shopt -s globstar
for f in **/*png; do
    pngnq -vf -s1 "$f"

    # Uncomment the line below for a test run
    # rename -v -n 's/^(.*)\-nq8(.*)/$1$2/' "$f"

    # Comment the line below out for a test run
    rename -v 's/^(.*)\-nq8(.*)/$1$2/' "$f"

    optipng -o7 "$f"
done

version with mv

#!/bin/bash
shopt -s globstar
for f in **/*png; do
    pngnq -vf -s1 "$f"

    # Uncomment the line below for a test run
    # echo "$f  => ${f//-nq8/}"

    # Comment the line below out for a test run
    mv "$f" "${f//-nq8/}"

    optipng -o7 "$f"
done

Make the file executable with:

chmod +x find_and_rename

Go into your folder ImagesFolder.

Start the script in this folder with.

<path_to_script>/find_and_rename

Example (without pngnq and optipng

$ find . -type f -name "*.png"
./Image-nq8.png
./sub/Image-nq8.png
./Image2-nq8.png

$ ./find_and_rename
Image2-nq8.png renamed as Image2.png
Image-nq8.png renamed as Image.png
sub/Image-nq8.png renamed as sub/Image.png

$ find . -type f -name "*.png"
./Image2.png
./sub/Image.png
./Image.png


Spaces in file and directory names in Ubuntu can cause problems for the shell, like bash (zsh,ash,sh,fish etc.)

Try :

cd "/media/removable/USB Drive"

You can also install Midnight Commander, which is a great file manager for text console, and does not have these problems with spaces.

sudo apt-get install mc

Midnight Commander can extract zip and tar files by pressing the  key on such a file, and then use the copy (F5) command inside mc.

https://apps.ubuntu.com/cat/applications/mc


Linux file manager similar to Windows File Explorer (directory tree + file list)?

One you can try is xfe (X File Explorer).
sudo apt update
sudo apt install xfe


Ubuntu Touch - Dekko crashes when I try to open it

Try to backup these folders:

~/.local/share/dekko.dekkoproject/
~/.config/dekko.dekkoproject/
~/.cache/dekko.dekkoproject/

Then delete them. All your account data will be cleared. Add the accounts again (perhaps creating a new backup after adding the second account would be wise). If the problem persists, try varying different things like the order in which you add the accounts so that you would know what makes Dekko crash: the number of accounts or the particular account. It wouldn't help you, but it might be useful for the developers when they will fix this bug. You might be able to contact them by IRC (#dekko on Freenode), but I believe that it should be done after submitting a bug to their bugtracker.


Disable python versions for certain users without uninstalling python

chown the non-public version(s) to a specif group, make it executable only by that group (chmod 754 ...), and add the allowed users to that group.

But keep in mind that there are system utilities that rely on specific python versions, so you will likely break something: in my Ubuntu 16.04, /usr/bin contains 106 files with a python.* shebang, of which 47 have a python3 shebang.


kubuntu 16.04 how to reinstall kde/plasma over the top of lxde

If I understood correctly, what you are asking is how to remove lxde components completely. Assuming you installed it by sudo apt install lxde (or you chose the lxde metapackage from your ubuntu software center) the packages installed are listed here: http://packages.ubuntu.com/xenial/lxde (including the recommendations). So to remove all the packages execute this command:

sudo apt autoremove --purge lxde galculator gpicview leafpad lxappearance lxappearance-dconf lxde-common lxde-core lxde-icon-theme lxinput lxrandr lxsession-edit lxterminal xarchiver openbox lxmusic lxpolkit

You must choose the recommendations you want to remove yourself from the link above (like clipit, deluge, evince-gtk and others) because some of them would probably be pre-installed.


Prevent gnome-terminal from changing directory when creating a new tab or window

I  get it work by setting a custome command in profile settings, command tab.

From top menu: Edit -> Profile Preference.

Then command tab, check the Run custom command instead of my shell and set /bin/bash as your custom command.

To run the default shell instead of bash use:

/bin/sh -c '`/usr/bin/getent passwd $USER | cut -d: -f7`'

instead /bin/bash as your custom command.

I'm not sure what is the cause of problem, However I thing each time you create a new tab gnome-terminal forks your current instance, so it's going to inherit your old tab's working directory, but when you set a custom command it's going to create a new instance each time.

Thats only what I think is happening here.


If you want to do in an easy and quick way, follow these steps:

Navigate to the directory you want to share, for example: cd /home/user/Videos
Type the following: python -m SimpleHTTPServer. You should see a message saying Serving HTTP on 0.0.0.0 port 8000 ..., 8000 being the default http port (you can specify it as a parameter in the command at the end)
Test your configuration by typing http://127.0.0.1:8000 in your browser. You should see a list of files in there.
Find your IP address (for example, 192.168.1.1) and use that as your external address with the :8000 appended to it.
To terminate the server, hit CTRL+C.

.


How to migrate Tomboy Notes from a previous installation?

Firstly you should set the synchronization options of tomboy choosing synchronize to local folder.

Then store your the folder with  removable hardware (you can also synchronize to dropbox).
Set the tomboy synchronization path again  after you reinstall your system to restore your notes.

I've done it before.


You'd need to run it on an emulator such as PlayOnLinux. You can see a similar thread regarding NFS on Linux here.

Here is a Youtube video indicating how to play the game on Linux.

If you want, we can expand on how to use PlayOnLinux if unsure.


Can not restart dnsmasq due to " configuration syntax check   [fail]"

dnsmasq can be configured by editing the file

 /etc/dnsmasq.conf

dhcp config file:

/etc/dhcp3/dhclient.conf


NTFS partitions mount as root instead of user as set in /etc/fstab

This may help. Mount your ntfs partition with these options:
rw,nosuid,nodev,allow_other,default_permissions

For example in /etc/fstab

UUID=E4E6B30CE6B2DDCC  /media/Bowles  ntfs-3g rw,nosuid,nodev,allow_other,default_permissions,umask=022  0  0


How to overwrite an icon for Nautilus with ~/.icons?

Uhm, changing the directory name 48 to 48x48 is working. I don't know why that difference :O


1) I can't sync the music with my iPad because DBVersion 5 is not supported in any way by Ubuntu.

2) It didn't appeared because there were problems between Virtualbox and the USB port.


Trying to install Korean (hangul) input - Lubuntu 14.04

There should be a little flag or initials on the right side of the LxPanel.  Right click it and choose "Keyboard Layout Handler" Settings.  Uncheck Keep system Layouts (under Advanced setxkbmap Options).  Then add Korean and place it where you want it (using the up and down arrows.)  Before you close the window, make sure you re-check Keep system Layouts.  Then you can close the window.  It will not take effect until the next session.


Can't mount ntfs disk with the certain set of permissions (root's ones)

Follow the below.

We'll unmount the partition, just in case.

sudo umount /media/win_disk

We'll delete the mount point and recreate it to make sure that it has the correct permissions.

sudo rm -r /media/win_disk
sudo mkdir /media/win_disk

Open up your /etc/fstab, delete the line that you added, and add this line instead:

/dev/sda2    /media/win_disk    ntfs-3g     rw,auto,user,exec,nls=utf8,umask=003,gid=46,uid=1000    0    0

This will:

auto: automount the partition.
rw: mount it as read-write.
user: allow users to mount/unmount it.
uid=1000: make the user with user ID 1000 as the owner of everything in the partition.
gid=46: make the group plugdev as the group owner (don't mind this).
umask=003: make everything under the partition have the permissions -rwxrwxr--.

All of this basically means that you will be the owner, and you'll have rwx permissions for everything. It will also automount the partition when you reboot the machine. If you don't want it to automount, just change auto to noauto.

  Note: see that uid=1000? You need to change that to be your user ID. It is most probably 1000, but just to be sure, do the command id and look at the number after uid=###(your_username). If that number is not 1000, then change uid= to be that number.

Save the file and close it, then do

sudo mount -a

You should not get an error, and you should find your partition mounted. If you get an error, do not restart your machine and tell us what the error is.

For more information about fstab and its options, visit the Fstab Ubuntu help page.


My MacBook Pro does not show Ubuntu USB while holding Alt/Option Key

I had a similar issue when I followed the steps from Ubuntu's site. It worked right away when I used UNetbootin for OSX.


Depending on your preference, you could try the command line utility nmap, or its GUI-based counterpart Zenmap for device discovery (among others).


Yes, you can.
Assuming every file has just a md5 file in the same directory with just a appending .md5, create a script file (e. g. md5check.sh) with following content:

#!/bin/bash
echo "Building file list..."
$ALLFLS="$(find)"
echo "Checking all files..."
for word in $ALLFLS; do
    if [[ $(cat "$word.md5") == $(md5sum -b "$word") ]]; then
        echo "$word OK"
    else
        echo "MD5 wrong for $word"
        exit
    fi
done
echo "All files correct!"

This checks if every file. Please report if it worked. (Make sure you have changed the directory to your hard drive before executing the script and make sure you have chmod +x it)

Edit:

You can also check this page.


Install Ubuntu into multi partioned in single hard disk

All installations deal in partitions.  When installing Ubuntu you have three options.  The first two options is to allow Ubuntu to use some automatic configurations.  The third option "Other" will allow you to specify the partition to use.  If you specify a partition, the partition(s) that you specify will be the only one(s) that will be affected.


For a work machine then you should certainly consider sticking with the Ubuntu 10.04 LTS (Long Term Support) release which will get point releases and bug fixes. I wouldn't put my work machine on 10.10 unless working on fixing Ubuntu was my work.

For your unbootable problem, you can install or you can provide a dmesg log to a bug report so the problem can be prevented in future:

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


It appears the  fans inside the computer are not PWM or Pulse-width modulation.

Common cooling fans used in computers use standardized connectors with two to four pins.

PWM use a 4 pin connector and can be controlled by software.

The first two pins are always used to deliver power to the fan motor.

3 pin connectors don't have PWM 3-pin fan speed is controlled by voltage.


How to use middle mouse button (or center click) to scroll in Okular?

Okular's maintainer has previously implied there are no plans to change the current behavior as stated on the bugs.kde.org page linked below. Some people that are not satisfied with that have provided patches at the bottom of the bugs.kde.org page linked below that will change Okular's default behavior of zooming while holding the middle mouse button to scrolling: https://bugs.kde.org/show_bug.cgi?id=219121

Perhaps the patch from November of 2013 (from the link above) will help your situation. You can apply the patch to the source of Okular then compile a version that works the way you want. If the patch is for a version of Okular that is too different then you could study the patch and find which code needs to be changed manually. You may find Kompare to be useful for applying patches and comparing source files. Just Google Kompare for more info.

There is good information on compiling Okular instead of installing from binary packages on this page: https://okular.kde.org/download.php


I had the same issue and figured out why it happens. The fix is quite simple.

When you choose a picture from your home directory, you as set as the owner of this picture (check with ls -al).

Lightdm uses its own user and must be allowed to read the image from your home directory. To avoid black screens, make sure that "other users" have read permission.

you can use this command to fix the rights:

chmod 644 /home/path/to/the/image.jpg

6 = I can read and write the image
4 = Others can read the image

Regards,

Obibann.


Run:

sudo apt-get install libwxbase3.0-0 libwxbase3.0-0-dbg libwxbase3.0-0-dev

This should install libwbxbase.so


Why can't I run update-manager-d to upgrade?

You're looking for update-manager -d (note the space).  update-manager is the name of the program, d is an option flag.

You indicate options with a dash (update-manager -d) when they are a single letter (which most are), and you indicate them with a double dash (update-manager --devel-release) when they are a word.  Often, both forms are available for common options for a program.  Run man <program-name> for more details on the program's available options.


Error when installing Scribes text editor in Ubuntu 18.04 LTS

Easy way

Simple hacky way is to install Scribes 0.4 build 910 from Ubuntu 14.04 LTS repository:

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/python-support/python-support_1.0.15_all.deb
sudo apt install ./python-support_1.0.15_all.deb

wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gnome-python-extras/python-gtkspell_2.25.3-13_amd64.deb
sudo apt install ./python-gtkspell_2.25.3-13_amd64.deb

wget http://mirrors.kernel.org/ubuntu/pool/universe/s/scribes/scribes_0.4~r910-0ubuntu2_all.deb
sudo apt install ./scribes_0.4~r910-0ubuntu2_all.deb

and then use it:

Note: this version is not too old as official site has build 954.

Harder way

Download and install two deb-packages as written above:

cd ~/Downloads
wget http://mirrors.kernel.org/ubuntu/pool/universe/p/python-support/python-support_1.0.15_all.deb
sudo apt install ./python-support_1.0.15_all.deb

wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gnome-python-extras/python-gtkspell_2.25.3-13_amd64.deb
sudo apt install ./python-gtkspell_2.25.3-13_amd64.deb

Then install development packages:

sudo apt install build-essential intltool gnome-doc-utils \
pkg-config bzr python-gtksourceview2 rarian-compat python-glade2

Then download source code from Bazaar repository, compile and install the application:

bzr branch lp:scribes
cd scribes
./configure
make
sudo make install

and use it:


How to repackage an app that is open-source (warzone 2100) and put on software centre

There is already a PPA for the beta version of warzone2100, to install and use the latests unstable version of the game use these commands

sudo add-apt-repository ppa:littel-jo/warzone-dev
sudo apt-get update
sudo apt-get install warzone2100

Other then that you can learn how to package and application and prepare for launchpad here.


You can use gparted software, it has a graphical interface and it is very easy to understand and perform the operations.

$ sudo apt-get install gparted

Obs: Partition changes can cause data loss, be careful with the operations performed.


You could use samba client which is installed in Ubuntu by default to access on Terminal. Connecting from the command line is similar to a ftp connection.

List public SMB shares with:

smbclient -L //server -U user

Connect to a SMB share with:

smbclient //server/share -U user

And then enter the password.

You can connect directly with:

smbclient //server/share -U user%password

  Your password will show on the screen (less secure).

Once connected, you will get a prompt that looks like this :

smb: \>

Type help at the prompt for a list of available commands.


How to remove microcode firmware for intel cpus from intel-microcode

You need to disable Secure Boot in BIOS to get your Wi-Fi working.

Microcode is irrelevant.


Move 10 digit number to the beginning of file name

Using mmv to rename files with wildcard matching:

$ touch 'HOLZHEAUSER GAS UNIT_ 2_4246932863_2.pdf'
$ mmv '*_ ?_*_?.*' '#3_#1_#2_#4.#u5'

$ ls
'4246932863_HOLZHEAUSER GAS UNIT_2_2.PDF'


Can't change Startup Applications Preferences "Could not save /home/USER/.config/autostart/sideportrait.sh.desktop file"

I experienced the same issue and found that owner of ~/.config/autostart is root. Thus sudo chown $USER:$USER ~/.config/autostart resolved this problem.


Is there a way I can record when the stderr is printed to a log file?

Excellent question, I didn't know how to pipe stderr but I found the answer here.

Then, when you've got your stderr piped, you can just replace every beginning of line (^) by the message you want. Here I called the date command to display the time.

php someFile.php 2>&1 >> stdout.txt | sed "s/^/`date +'Error received the %d:%m:%y at %H:%M:%S : '`/" >> stderr.txt


How to revert libdrm without causing dependency issues?

Solved it. I had to mark packages for upgrade in a specific order so as to trigger the fewest possible number of broken dependencies, then unmark those that had been triggered in the correct order (and some of them simultaneously, i.e. wine and wine:i386 which depend on each other). The machine hasn't been up for long enough to know whether I've resolved my issue, but this is definitely the best idea I've had so far!


Will Unity 2D hide the launcher when windows are maximized?

This is now implemented in Unity 2D for Natty. I encourage you to try it out using our daily PPA:

https://launchpad.net/~unity-2d-team/+archive/unity-2d-daily

References:

How do I install and switch to the Unity 2D desktop?
What are PPAs and how do I use them?


How do I change the speed of the slideshow in gThumb?

Open gThumb preferences, under "Viewer" section you'll find the option.


Why can't I easily open .py files with IDLE using right click?

I found an answer that worked for me here:
http://ubuntuforums.org/showthread.php?t=1801149

enter the following in terminal:

gksudo gedit /usr/share/applications/idle-python2.7.desktop

Add the following to the file:

  MimeType=text/x-python;

Save and close that file, and enter the following in terminal:

gksudo gedit /usr/share/applications/mimeinfo.cache

Search for "text/x-python=" in the file, or add it if not there, and add the following to the end of it:

  idle-python2.7.desktop;

Worked for me! Cheers.


/, /home and swap partition sizes when using multiple drives

The swap being twice your ram rule is from the days of 4-32 MB of ram.  If you have at least 1 GB of ram, 1x swap is more than enough.  Most people recommend not bothering with swap at all if you have at least 4 GB of ram, at least if you don't intend to hibernate.  The minimum required size for / is 6 GB.  10 gives a little breathing room to install a few applications, but 20 would be better.  There also is little reason to bother keeping / and /home separate, so I suggest just sticking with one large partition and the default ext4 filesystem.

If you have two identical drives, you may want to use the alternate installer and create a raid0 ( stripe ) array to use them both and get better performance.


Cannot Do Anything With apt-get - broken dependencies with kmod. What do?

You have module-init-tools:i386 installed where module-init-tools (amd64) should be installed instead. Probably you got from a previous PPA, because I can't find this version 3.16-1ubuntu2 in the official repository.

Another point module-init-tools is a transient package for kmod, they should have same version installed, otherwise you get a conflict.

Force to remove module-init-tools:i386 even it has some depandants

sudo dpkg --remove --force-depends module-init-tools:i386

Install its amd64 component instead

sudo apt-get install module-init-tools

Run APT fix to check if any thing missing

sudo apt-get -f install


Limit bandwidth usage of "do-release-upgrade -d"

I placed the following, slightly modified from this answer, into /etc/apt/apt.conf and then ran do-release-upgrade -d.

Acquire
{
   Queue-mode "access";
   http
   {
      Dl-Limit "50";
   };
};

The upgrade proceeded at ~50Kb/s.


Black screen after upgrading from 13.04 to 13.10

It's a kernel bug, as reported here:

https://bbs.archlinux.org/viewtopic.php?id=167463

Quick solution is to switch to BIOS mode instead of UEFI mode.
= Disable Secure Boot and enable "Launch CSM".

You can peruse the Archlinux thread above if you want a more permanent fix and you feel like patching the kernel yourself.  I don't consider myself technically good enough to do that safely (or quickly), so I'm putting up with running in BIOS mode for now and waiting until another Kernel is released.


You're using Ubuntu 12.04, in Ubuntu 15.04 it's the 1.2.3 version.


Your problem was related to .ssh

If this directory containing your personal key, is read AND writeable to anyone else then the user, the system sees this as a security breach and ssh stops working.

Always make sure that,
the folder has chmod 700

Always make sure that your personal *.key is only readable by the user.

Here this is what it should look like

The folder has a chmod 700, the private key id_rsa a 600, public key and known_hosts has a 644

drwx------   5 s1mmel  staff   160B Dec 11 15:24 .
drwx------+ 46 s1mmel  staff   1.4K Jan 22 11:53 ..
-rw-------   1 s1mmel  staff   3.3K Dec 11 15:15 id_rsa
-rw-r--r--   1 s1mmel  staff   745B Dec 11 15:15 id_rsa.pub
-rw-r--r--   1 s1mmel  staff   889B Jan 16 18:20 known_hosts


ssh-add permanently a key without asking passphrase

There is no way to add a key with passphrase permanently. The encrypted key is stored in the memory of ssh-agent, which is not persistent across the reboots.

The keys in default location or the keys mentioned in ~/.ssh/config (without passphrase) do not need to be added to the agent. The ssh will pick them up automatically.


How to record desktop with audio on ffmpeg

The order of option placement matters. You need to move -f x11grab before the appropriate -i:

ffmpeg -y -f alsa -i hw:0 -f x11grab -framerate 30 -video_size 1600x900 -i :0.0+0,0 -c:v libx264 -pix_fmt yuv420p -qp 0 -preset ultrafast moetoVideo.avi


Hide icons encrypted file system partitions in Nautilus

Here is the related item in Ubuntu Brainstorm.

For me it looks like there's no 100% working solution at the moment.


Download entire Ubuntu One folders from the web client?

use firefox, flashgot and uget, or any download manager that you like that is capable of handling large files, pausing and resuming, never use the built in download manager of any browser, it will damage your files


What should I do before changing graphics card?

Have a cup of tea.
But seriously, that's about all you want to do and you don't even need to do that before you rip it out.
Any old-config issues can be resolved fairly swiftly when the new graphics card is in. If you have issues,

Get to a terminal any way you can (login if it boots to terminal, or try a TTY via ControlAltF1, or if all else fails, hold shift on reboot and enter the recovery console.
Remove old driver packages
Nuke /etc/X11/xorg.conf from lower orbit.

These are things you can do before changing but it makes very little difference.


I have been plowing the internet for days over this issue. Had similar setup and problems. I chanced upon here about using DRI_PRIME=1 before any commands to use your dedicated GPU. So I tried

export $DRI_PRIME=1

and this worked. So I added a line it in /etc/environment,
DRI_PRIME=1
, rebooted and now System Details shows my AMD card as default.

Caveat: I think this disables the Integrated Graphics and changes your system to just make use your dedicated GPU only


Thinkpad 440p Trackpad: several problems

ArchLinux user here. I own a Thinkpad x260, with physical buttons, but i wanted to remove the 'two invisible buttons' at the bottom of my trackpad.

My solution went trought this program:

synclient

Use this to see all configurable options:

synclient -l

More information for Ubuntu users here:

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


Okular supports PDF annotations.
To save the highliting/annotations directly in the PDF document, choose "File" -> "Save as..." and create a new PDF which will contain your edits.
How to edit in Okular
You can choose Tools > Reviews to get other options like adding

pop-ups notes
inline notes
freehand line drawing
highlighter
stamp and other features.

Edit: Inkscape supports PDF editing (one page at a time) and most people seem not to be aware of this so I'm adding it to the answer.


KDE Plasma - Does not give the extension in "Create New" menu

KDE and the XDG templates

A bug report: Bug 191632 - It should be easier to add a template to "Create New..." menu (e.g. look into ~/Templates) - https://bugs.kde.org/show_bug.cgi?id=191632

...and the fix: [KIO] Add support for XDG_TEMPLATES_DIR in KNewFileMenu - https://cgit.kde.org/kio.git/commit/?id=de5ab5e74b4c5a6ce482af8ded7b7b60966d20bb

Older versions

The KDE4 and the KF5 (pre the kio fix) are using the /usr/share/templates/ and the $HOME/.local/share/templates/.

Example

Adding the 'File Text.txt' option to the Dolphin and the Plasma 'Create New' context menus.

Making $HOME/.local/share/templates/TextFile2.desktop:

[Desktop Entry]

Name=Text File.txt

Comment=Enter text filename:

Type=Link
URL=.source/TextFile2.txt
Icon=text-plain

and

Copying the /usr/share/templates/.source/TextFile.txt to the $HOME/.local/share/templates/.source/TextFile2.txt. It is an empty file.

Both the Dolphin and the Plasma have new 'Create New' context menus:


There's only one file there listed as Linux 64-bit, so I assume that's what you downloaded. That's a .tar.gz file. Move or copy the file to its own folder. To unzip it, browse to that folder in a terminal, then:

tar -zxvf kprano*.tar.gz

For this particular file there's nothing else to be done since it contains binary programs ready to run. ls will list the files. Run them with ./<filename>

The zip file above it is similar, containing demo html apps ready to run. Once it's in the folder you want, unzip it with unzip kprano*.zip


The error says that there is no main method in the jar file. Not all jar archives are supposed to be executed. Some are libraries, some don't come with a main method on another purpose.

An example of latter is the Minecraft client, which seems to be related to your question. It purposely doesn't have a main method as a rudimentary piracy protection. For it to start, it needs a launcher, which connects to the Mojang server, thereby starting a game session, which is then handed over to the client by calling some method in it.

So if your file - I'll ignore the naming - is a Minecraft client, you need the launcher to run it.

If it is the other way around, and your archive is a Minecraft launcher, you need to tell it where the Minecraft client is located (~/.minecraft/versions/<version>/<version>.jar), maybe by adding it to the PATH environment, maybe by giving it as an argument to the command.

If it is a Minecraft mod, you should have installation instructions along with it.


Using 64 bit machine, core i7 5500u, ubuntu 14.04 LTS shows only 2 cores

Your CPU the Intel Core i7 5500U has 2 cores 4 threads by design.

The number of threads also are referred to as "virtual cores".

To see that your CPU performs hyperthreading see ht in the flags section from dmidecode. To work appropriately it needs to be set to enabled in your BIOS.


Have you looked into man tar for clues?!

  NAME
    tar — The GNU version of the tar archiving utility

  SYNOPSIS
     tar [-] A --catenate --concatenate | c --create | d --diff --compare |
           --delete | r --append | t --list | --test-label | u --update | x
           --extract --get [options] [pathname ...]

  DESCRIPTION
     Tar stores and extracts files from a tape or disk archive.

 The first argument to tar should be a function; either one of the letters
 Acdrtux, or one of the long function names.  A function letter need not be
 prefixed with ``-'', and may be combined with other single-letter options.
 A long function name must be prefixed with --.  Some options take a param‐
 eter; with the single-letter form these must be given as separate argu‐
 ments.  With the long form, they may be given by appending =value to the
 option.


sysctl: cannot stat /proc/sys/net/ipv6/conf/all/send_redirects: No such file or directory

That means you have ipv6 or even send redirects disabled somewhere (probably in Networkmanager). Enable it and the file gets created and you can then alter it.

Altering /etc/sysctl.conf yourself is also possible.

net.ipv6.conf.all.send_redirects

is the setting. 1 is active, 0 is inactive.


How to mount LUKS encrypted drive of old system with same VGname

The new system was relatively low value (some setup effort, but nothing hard to replace), so I decided to mess with that instead.

I booted from USB (using the mint install system), and did the following (where `sdb5 is the encrypted partition that houses the lvm data for my new system)

cryptsetup luksOpen /dev/sdb5 newdisk
vgimportclone /dev/mapper/newdisk
pvscan
vgscan
lvscan

I'm not sure that those scans are actually necessary, but i did them, and then I looked around with pvdisplay, vgdisplay and lvdisplay.  All looks fine.

I tried re-booting at this point, which didn't work.  Grub couldn't find the disk, and complained with a message like this one.

I booted back into the installer, and fixed up the references to /dev/mapper/mint--vg-root and /dev/mapper/mint--vg-swap in /etc/grub/grub.cfg and /etc/fstab.

The system boots, and I can now mount the old drive using the GUI tools (nemo), albeit it's a tad inelegant, with an error displayed from the attempt to mount the encrypted partition, after which the unecrypted one is available to mount.

So, it seems OK.  I've greped for mint--vg in /etc and /boot, and found nothing else to fix up.  I'll add more info here if I come across anything else that needs fixing up.


Using "rrsync" with sudo on destination machine

Have you thought of trying to use a NFS with rights given to a certain user? I guess more information about the security of the destination and the current server would be helpful in finding another solution... or maybe understanding your current rsync solution a little better. I am confused on why you think the ssh key would be password protected. If you are root and root is running rsync... then you can access any file... including any ssh key you have.


Why do I see different result using files vs sudo nautilus?

When you run nautilus as a normal user, it shows the user's Home directory that is /home/$USER.
When you run it with sudo is shows the home directory of root user that is /root.
Never run nautilus with sudo. It creates temporary files owned by root that can cause some trouble in the future.
You can use terminal commands to do file operations that require sudo, or install Midnight Commander mc for that purpose that can be run with sudo.
If it is too difficult to use CLI, then at least run it this way:
sudo -H nautilus


Ubuntu one on samsung galaxi mini2: i can see my folders but not the files inside!

I had a similar problem with my Galaxy SII...this previous post helped:
http://ubuntuforums.org/showthread.php?t=1881883


Getting "pangoxft library not found" error when configuring wxWidgets

Had to

sudo apt install libpango1.0-dev


In a terminal enter:
apt depends libx265-dev

You should see something like:
libx265-dev
  Depends: libx265-179 (= 3.2.1-1build1)
  Suggests: libx265-doc

The number after Depends: libx265- is the version number which should be ≥ 68.


Normalize .ogg audio files with the command line

Finally, I've found the package normalize-audio which provides the tool normalize-ogg.
So I just had to run :

for audio_file in *.ogg; do
    normalize-ogg $audio_file;
done


python simpleHTTPServer woking only with local machine

SimpleHTTPServer by default binds to the ip address 0.0.0.0. This is a special address meaning in effect "any address". If it were to bind to for example localhost or 127.0.0.1, you could only connect to it from the local machine, because 127.0.0.1 belongs to the loopback device. But with 0.0.0.0, the server's binding to lo, eth0 and any other network devices you might have.

So, your little server should be reachable from other machines in your network. That it is not indicates that something (other than your little server) prohibits it, maybe a firewall. You could check the state of port 8000 with nmap from another machine (you might need to install nmap). Say your little server is running on ip 192.168.0.1, the other machine is 192.168.2.101. Then you'd do from 192.168.2.101

nmap -p 8000 192.168.0.1

The output should be something like

PORT     STATE SERVICE
8000/tcp open  http-alt

If the state is "open", the port is reachable and there's something listening there, so your little server should be reachable.

If the state is "closed", the port is reachable, but there's nothing listening there. In that case, maybe your server has terminated or you mixed up ip or port numbers.

If the state is "filtered", there's some kind of ip filtering firewall at play that keeps you from accessing your little server.


Capturing ONLY desktop audio with ffmpeg

pavucontrol

Install pavucontrol.
Start recording with ffmpeg (see example commands below).
Start pavucontrol.
Go to the Recording tab and you'll find ffmpeg or Lavf56.15.102 (or similar) listed there.
Change audio capture from Internal Audio Analog Stereo to Monitor of Internal Audio Analog Stereo.

Now it should record system and application audio instead of the microphone.

This setting will be remembered. The next time you want to capture with ffmpeg, it will automatically start recording system audio. If you want to revert this, use pavucontrol again to change back to microphone input.

The text above was adapted from HOWTO: Screencasting on Linux.

example ffmpeg commands

audio only

ffmpeg -f pulse -i default output.wav

with screen capture

ffmpeg -f x11grab -video_size 1360x768 -framerate 30 -i :0.0 -f pulse -i default -preset ultrafast -crf 18 -pix_fmt yuv420p out.mkv


It might be, because iwconfig uses the deprecated WEXT API and your kernel has no support for it enabled. Use the iw tool instead.

Btw, ifconfig is also deprecated for iproute2 (ip link), but the underlying ioctl ABI that it uses is still around.


Change the skype launcher from skype to bash -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype'.


After upgrade to 18.04 Openvpn doesnt work anymore

Permission chmod issues maybe?

When I upgraded to 18.04, my vpn client stopped working but I just installed network-manager-openvpn and network-manager-openvpn-gnome via terminal and it allows me to just pick openvpn config files and it connects from there.

Maybe this will be a possible workaround for you if it is not permissions related.

EDIT:
I looked up what you said and came to the openvpn forums with an apparent work around.
https://forums.openvpn.net/viewtopic.php?t=23979


Installing graphics driver for Ubuntu 16.04

There are open source graphic drivers available for Ubuntu.
By default Ubuntu uses the open source video driver Nouveau for your NVIDIA graphics card.
An alternative to Nouveau are the NVIDIA drivers, which are developed by NVIDIA. Nvidia xserver.

You will be notified to install additional drivers. If you aren't notified about additional drivers, you can do it yourserlf:

Go to Software & Updates -> Additional Drivers

Once the drivers are downloaded and installed, reboot your computer.


Here is the bug report. You might try the solution offered by comment 90

All you need to do is download the file attached to the comment and replace your current C:\wubildr with it.

Also, of note from post 91:

  Please make sure that when you boot the line "insmod ntfs" is commented out or disable it by pressing "e" at the grub boot menu and edit the entry before proceeding.


For every package the license is described in the file /usr/share/doc/PACKAGENAME/copyright (where PACKAGENAME is the name of the package.

Most of the files for the Ambiance theme are in the folder /usr/share/themes/Ambiance/.
We can use dpkg to find the package that folder belongs to:

$ dpkg -S /usr/share/themes/Ambiance
light-themes: /usr/share/themes/Ambiance

So the package is light-themes and the license is in /usr/share/doc/light-themes/copyright: It's basically CC-BY-SA-3.0 with exceptions for trademarks, logos etc. There are some contact addresses, too.


According to your comment, you solve the problem by manually issuing rmmod iwldvm && modprobe iwldvm. In order to get it to work automatically after a resume, you need to create a script.

I will adapt the instructions posted in this answer to suit your needs. Run:

gksu gedit /etc/pm/sleep.d/20_fix_wifi

Add the following content:

case "${1}" in
    resume|thaw)
        rmmod iwldvm && modprobe iwldvm
;;
esac

Save the file and reboot. Try to suspend and resume to see if it works.


Logitech Unifying Receiver not recognized through Belkin KVM switch, Ubuntu 16.04

After about 3 hours of fiddling with the kvm switch and moving port cables, etc etc...the unifying receiver is again recognized, and all is working again.
I was just about to do a firmware upgrade on the Belkin KVM Soho switch, and it started working on another port...yeah! I did learn to install and use the Solaar utility along the way, so I picked up a little knowledge there as well.


What kind of scheduling algorithms are used in 15.04? Is it possible to change it?

Process scheduler

A process scheduler handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

Since kernel 2.6.23 (that would be as of Hardy 8.04 LTS) Completely Fair Scheduler (CFS) based on "Rotating Staircase Deadline". Overview from kernel.org:

  CFS stands for "Completely Fair Scheduler," and is the new "desktop" process
  scheduler implemented by Ingo Molnar and merged in Linux 2.6.23.  It is the
  replacement for the previous vanilla scheduler's SCHED_OTHER interactivity
  code.

  80% of CFS's design can be summed up in a single sentence: CFS basically models
  an "ideal, precise multi-tasking CPU" on real hardware.

  "Ideal multi-tasking CPU" is a (non-existent  :-)) CPU that has 100% physical
  power and which can run each task at precise equal speed, in parallel, each at
  1/nr_running speed.  For example: if there are 2 tasks running, then it runs
  each at 50% physical power --- i.e., actually in parallel.

  On real hardware, we can run only a single task at once, so we have to
  introduce the concept of "virtual runtime."  The virtual runtime of a task
  specifies when its next timeslice would start execution on the ideal
  multi-tasking CPU described above.  In practice, the virtual runtime of a task
  is its actual runtime normalized to the total number of running tasks.

Kernel 2.4: O(n) scheduler; there is no Ubuntu release with that kernel.
Kernel 2.6.0 to 2.6.22: O(1) scheduler. Warty 4.10 (1st release) used 2.6.8. Gutsy 7.10 was the last one that used 2.6.22 or lower.

I/O scheduler

Input/output scheduling is the method that operating system uses to decide in which order block I/O operations will be submitted to storage volumes.

Phoronix article on scheduling: Linux 3.16: Deadline I/O Scheduler Generally Leads With A SSD.

You can change the I/O scheduler by appending the option "elevator=" to "GRUB_CMDLINE_LINUX_DEFAULT=" in grub.

for using Completely Fair Queuing that would be "elevator=cfq".
"elevator=deadline" for Deadline I/O
"elevator=noop" for Noop

It is probably easier (assuming sda and deadline) to do it like this though:

To show the list of available schedulers:

cat /sys/block/sda/queue/scheduler

And to alter a scheduler (can be done on the fly):

echo deadline > /sys/block/sda/queue/scheduler

From  kernel/git/torvalds/linux.git

You can check what is being used with (assuming sda as primairy):

cat /sys/block/sda/queue/scheduler


Up arrow and .bash_history have different commands, so where does the up arrow get its data?

The ~/.bash_history file is only updated when you close/exit from the terminal. While you are in the terminal you can browse backwards in commands which was entered in that session. So if you exit from that terminal session your history will be updated with the missing command.

Also if you put a space at the beginning of a line, before the command, that command won't be saved in the history. This is a good practice if you issue a command which you don't want to be included in the history.


Unable to install and run App/Panel Indicator in Ubuntu 14.04

You are missing:

A .desktop file to be installed in /usr/share/applications/ for Dash/App Menu listing/launching.

An icon to be installed in /usr/share/icons/ for this .desktop launcher.
Another little bit different .desktop file to be installed in /etc/xdg/autostart/ for session autostart.

XD I will not give you examples! You know why?

Update to fix OP modifications:

hn-indicator/debian/install missing the binary indicator file, com'n it is the heart of this package :). Source path wrong, you don't have a src/ folder. Plus a typo in icon name .ong→.png.

hn-indicator.desktop /usr/share/applications/
hackernews.png /usr/share/icons/
hn /usr/bin/

hn-indicator/hn-indicator.desktop wrong launching command Exec=application

Exec=/usr/bin/hn

Missing shebang #!

As header of hn

#!/usr/bin/python2


How to boot without monitor with 12.04 on a PowerPC (yaboot)

I came across this issue as well, and I've spent nearly 2 hours online searching for solutions. You were on the right track, yaboot is the right place to look at. However, there are some more to do before we get rid of that useless monitor.

I found an email conversation, which resolves our problem. I am not too sure if you've resolved yours, but for the benefit of others, I will repost the solution and link here. (Just because Google thinks there is a solution here...)

Link: http://comments.gmane.org/gmane.linux.ports.ppc.embedded/34058

In case the link expires, here is the copy-and-paste:

Credit goes to: Romain Goyet wrote on 24 Mar 2010 11:32

Hi there,

  Here's a summary about "how to boot a PowerMac G5 without a screen
attached". As many people have noticed, default yaboot install won't
boot unless a screen is attached.

  Actually, the workaround is really simple. Thing is, that's the
"ofboot.b" script that messes things up. This script is a "bridge",
that actually either starts yaboot or let you boot off of a CD. I
don't know what's the point, since OpenFirmware already lets you boot
off of the CD by pressing C on boot…

  So basically, to boot headless, all you have to do is to tell
OpenFirmware to boot straight off the yaboot binary, and to skip the
ofboot.b
Just boot into OpenFirmware (Command-Option-O-F), and type :
setenv boot-device hd:2,yaboot (where 2 is the number of the partition
containing yaboot)
boot

And here you go, you can unplug that useless monitor

References :
http://saintaardvarkthecarpeted.com/blog/archive/2005/02/THE_WINE_OF_BOOT.html
http://grub.enbug.org/TestingOnPowerPC

By the way, as of writing this, grub2 on PPC from debian gives a "out
of memory" issue. Known bug.
_______________________________________________
Linuxppc-dev mailing list


ASCII screensaver for the command-line or a TUI?

Pipes.sh
The classic screensaver in ASCII.

Usage :
wget https://raw.githubusercontent.com/pipeseroni/pipes.sh/master/pipes.sh
chmod +x pipes.sh
./pipes.sh

Installation :
git clone https://github.com/pipeseroni/pipes.sh.git
cd pipes.sh
sudo make install

Options :
 -t #

Type of pipes. Refer to the documentation to see them all.
-f [20-100]

Framerate.
-s [5-15]

Probability of a straight fitting.
-r LIMIT

Reset after x characters, 0 if no limit.
-R

Random starting point.
-B

No bold effect.
-C

No color.

Refer to the documentation for more information.


VLC pixelated after installing NVIDIA driver

One possible solution is to disable Hardware acceleration in the vlc preferences:

Tools > Preferences > Input / Codecs > Codecs  > Hardware Accelerated decoding > Disable

Screenshot here:


after reinstall ubuntu 12.04 stuck after login screen (not at login screen) showing colourful screen?

I encountered the same problem also and i noticed it was a problem with the graphics card because after that i installed Ubuntu Server and it installed perfectly fine without a problem. But i would also advise you to check if you are installing the correct version