Just run this (once) at terminal:

sudo sh -c 'printf "[SeatDefaults]\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'

You will no longer have 'Guest' as login option, on your next login.

To undo (restore Guest option), remove the file created:

sudo rm /usr/share/lightdm/lightdm.conf.d/50-no-guest.conf

Duplicate: How do I disable the guest session?


Everything broken after removal of Amazon Search

If you can't get to Terminal then you will need to create a Desktop Launcher for the application.

Locate usr/share/applications, find the Terminal app and then copy and paste it to the Desktop.

1 - Open Terminal

2 - Copy & Paste Command:

sudo apt-get install unity-scopes-home

3 - Press Enter

4 - Enter Your Password When Prompted, Press Enter Again

Unity Scopes Home will now be reinstalled.


You should be able to, without too much fuss. The /opt folder usually shouldn't contain critical system programs/files anyway. You just have to remount the /opt partition elsewhere then copy the files into the /opt folder in the main partition like so:

Make sure nothing is using anything in the /opt folder. You may use the command lsof | grep /opt to that end.
Use this to find your /opt partition name (skip if known).

mount -l | grep "/opt" | cut -d " " -f 1

Remount it elsewhere with this (substituting the correct partition identifier).

sudo mount -t ext4 /dev/<partition> /mnt

Make a /opt folder in your system drive.

sudo mkdir /opt

Copy the files from your original /opt partition to the new folder.

sudo cp -Ra /mnt /opt

Umount the /opt partition.

sudo umount /mnt

Check /etc/fstab for any references to /opt.

sudo gedit /etc/fstab

Find any lines with /opt in them and delete them completely.
Save then close the file.

References:

Filesystem Hierarchy Standard


Perhaps you may find the answer here on this previous question [My netbook freezes everytime i turn on WLAN on Ubuntu]


How to install screenlets on Ubuntu 19.04?

WARNING: Usually the method below is not recommended at all, but you can continue if you really want to get ScreenLets installed on your system.

We need to add Ubuntu 16.04 LTS repositories to the system:

cat << EOF | sudo tee /etc/apt/sources.list.d/xenial.list
deb http://archive.ubuntu.com/ubuntu xenial main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-updates main universe multiverse restricted
deb http://archive.ubuntu.com/ubuntu xenial-security main universe multiverse restricted
EOF

Then we need to install LibPNG 1.2 from linuxuprising PPA (as the regular deb-based method does not work):

sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt install libpng12-0

Then we need to add ScreenLets PPA:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 94E58C34A8670E8C
sudo add-apt-repository "deb http://ppa.launchpad.net/screenlets/ppa/ubuntu xenial main"

And finally we will be allowed to install ScreenLets:

sudo apt-get install screenlets-pack-all

and enjoy.


How do I install photofilmstrip on Ubuntu 16.04?

It is because the development of the app stopped along time back. See https://apps.ubuntu.com/cat/applications/precise/photofilmstrip/ It is available only upto Ubuntu 13.10 So if you are using a higher version you will not be able to install the app

However if you still want to install it, you can download the .deb installer pack from https://sourceforge.net/projects/photostoryx/ But remember that you will not get any apt-get update for it


"google-chrome " downloads the file instead of opening it

The original answer:

The browser itself cannot run PHP code. You need a web server to interpret a PHP file as web page, that can be displayed through the browser.

If it is a .html file, it will be displayed. Try to create simple HTML file as next and call it index.html, for example:

    <title>This is title</title>
    Hello world!

Then run:

google-chrome index.html

Something more, if you type google-chrome ind and then press Tab the rest part of the file name (ex.html) will be autocomplete. But if it is index.php the autocompletion will not work.

More detailed answer:

The browsers their-self cannot run PHP code. Mainly they work with HTML and some scripting languages as JS. That we see in the browser's window is a result of the interaction between the web server on the one hand and the client's web browser on the other hand.

The PHP code is executed onto the server side and there must be installed interpretation program - so called php. Within Ubuntu, with installed php, if we have a simple PHP scenario, to display it into the browser's window we don't need a web server:

Let's assume we have this file:

$ cat index.php

<?php
    echo "\n";
    echo "\t<title>This is title</title>\n";
    echo "\tHello world!\n";
    echo "\n";
?>

The output of its interpretation is:

$ php index.php

    <title>This is title</title>
    Hello world!

So, we can redirect the output to a new file and then we can run this new file via the browser:

php index.php > index.html && chromium-browser index.html &

* In my case it is chromium-browser instead of google-chrome.
The result will be:

Partly related topic: How can i display php/html code output into terminal not browser?


all generic file diff tools compare files as a sequence of bytes or text, this means if you open a file (e.g .doc) in a text editor and do not understand what it contains, then the diff of such files in such a tool will also not be understandable

generic diff tool work best with text file formats (.txt, .html, .sh, .py, etc). binary formats are unusually application specific and cannot be handled by such a generic diff tool

if you want to compare the contents of .odt or .doc files, converter them first to .txt text files, and compare the text


Unity Dash Application search results - some icons appear as blank page icons

Install unity-tweak-tool and select a different icon theme.  Choosing the "Default" theme should resolve the issue.

There are some themes that don't have any configured icons.

$ sudo apt-get install unity-tweak-tool

Actually upon further investigation I'm noticing that the "Default" icon configuration may be missing some icons in some of the default themes. These are a few that are more likely to be complete:

Humanity
Humanity-dark
Ubuntu-icon-theme
Ubuntu-mono-dark


If it says "Secure Boot Failure", then I would suggest disabling Secure Boot in the BIOS. This will be different depending on your motherboard's firmware. I.E: American Megatrends, Dell, etc..

For creating an Ubuntu bootable USB I would recommend a tool called unetbootin, which writes files to the USB, as long as it is formatted in FAT32. It shouldn't overwrite personal files, it just copies the contents of the ISO to the USB and it's SYSLINUX boot files.

Other tools like DD are better because they copy the raw data as blocks, but this means overwriting the partition-table, partition(s) and their size(s), filesystem(s) and personal data.

Also, if you want to install Ubuntu onto your USB, you can either:

Load Ubuntu on USB/DVD 2, to install as a regular Ubuntu install onto the target USB.
Create a live USB with storage persistence using unetbootin, where the desktop and system files reset after reboot and are loaded into RAM, but the user's home folder is read-write and permanent storage. NOTE: YOU CANNOT INSTALL ANY PROGRAMS OR UPDATES.

I recommend option 1, because that's the official method and you can update the system, install your own programs and you're not just limited to read-write in your home folder.

Also persistent storage is limited to 4GB on unetbootin.


How should I free up space in /boot to install latest kernal

my /boot partition was 100% full.
and I had previously attempted to install latest-linux kernal but its dependency was unmet because no space in /boot.
so first I removed linux-4.4-latest
sudo apt purge linux-4.4-latest
this got me rid of umet dependency error making way to execute the below purge commands successfully
the I ran sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -vuname -r` to find out what more can be removed

some old linux-kernel

then I ran sudo apt purge old-linux-kernel
this made extra space then I finally ran
sudo apt autoremove

which got rid of few more kbs of data and I was able to update to latest linux kernal.


Thanx @exore, I solved the issue with

sudo setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))

The problem was, I believe, a manual installation of node.js. It comes as default on Ubuntu's last version but I didn't knew that and I installed it again through terminal.

You can go here for the entire discussion.

https://gist.github.com/firstdoit/6389682

Regards,


Cannot remove /snap directory even after removing snapd

I found it.
sudo apt autoremove --purge snapd

Note: autoremove is optional. It removes the dependencies which were explicitly required for snapd, and this will free up some space.


Wordpress "301 Moved Permanently" Problem

I solved it!

Just edited wp-config.php and theme's function.php to use 8080 port

thanks


It sounds to me like your bootable usb may be corrupt, though I have heard rumors of a username prompt being presented at startup. This seems to be unique to 14.04, so I suggest you either create a new bootable usb with the Startup Disk Creator and a fresh 14.04 iso, or try installing a newer version, such as 15.04, to see if it's unique to that version, or if it's something to do with your computer, which I doubt. If you have a usb optical drive, I'd suggest trying that first with the install dvd you have, but it sounds like you don't possess one.

It would also be helpful if you provide the install log from your original install attempt, if possible.

Best of luck!


How is the Ubuntu Startup Disk Creator deciding which iso files to accept as input?

Kudos @ubfan1 :-)

I looked into the Python code. At first it looked overwhelming, but soon I found a function that looked promising:

In the file /usr/lib/python3/dist-packages/usbcreator/backends/udisks/backend.py there is

def _is_casper_cd(self, filename):
    for search in ['/.disk/info', '/.disk/mini-info']:
        cmd = ['isoinfo', '-J', '-i', filename, '-x', search]
        try:
            output = misc.popen(cmd, stderr=None)
            if output:
                return output
        except misc.USBCreatorProcessException:
            # TODO evand 2009-07-26: Error dialog.
            logging.error('Could not extract .disk/info.')
    return None

which indicates that the Startup Disk Creator is checking for the content of the files /.disk/info and  /.disk/mini-info.

These are present in Ubuntu, Debian and many but not all respins. The funny thing is that the difference between Debian 10.2 and Kali is a trailing line feed. I checked with Debian 8.8. It contains a newline and is accepted by the Startup Disk Creator.

sudodus@bionic64 /media/multimed-2/CD/debian $ sudo mount -o loop debian-live-8.8.0-amd64-standard.iso /mnt/lp1
mount: /mnt/lp1: VARNING: enhet skrivskyddad, monterad som endast läsbar.
sudodus@bionic64 /media/multimed-2/CD/debian $ cat /mnt/lp1/.disk/info
Debian GNU/Linux 8 "Jessie" - Official Snapshot amd64 LIVE/INSTALL Binary 20170506-14:26
sudodus@bionic64 /media/multimed-2/CD/debian $ sudo mount -o loop debian-live-10.2.0-amd64-standard.iso /mnt/lp2
mount: /mnt/lp2: VARNING: enhet skrivskyddad, monterad som endast läsbar.
sudodus@bionic64 /media/multimed-2/CD/debian $ cat /mnt/lp2/.disk/info
Official Debian GNU/Linux Live 10.2.0 standard 2019-11-16T10:15sudodus@bionic64 /media/multimed-2/CD/debian $

So it seems that I have found a bug. The Startup Disk Creator does not accept an iso file unless there is a trailing newline character in the file /.disk/info or  /.disk/mini-info.

Edit: I reported the bug

Bug #1860411: The Startup Disk Creator is glitchy when I try to use non-Ubuntu iso files

Please help raising the heat by marking that This bug affects you.


Try calling a cat a cat, i.e. if you want to start MySql, you may get it to work like so:

sudo service mysql start

... instead of:

sudo service myql start

Credits: stumblebee, as per this comment below the question ...


Try rebooting. If it's still offline after the reboot, press the wifi button once more and restart again.

I had a similar issue with this on my dv5.


Can I remove a category from the Dash-home

In order to disable for example the searches from the internet, you can use this code:

 V=`/usr/bin/lsb_release -rs`; if [ $V \< 12.10 ]; then echo "Good news! Your version of Ubuntu doesn't invade your privacy."; else gsettings set com.canonical.Unity.Lenses remote-content-search none; if [ $V \< 13.10 ]; then sudo apt-get remove -y unity-lens-shopping; else gsettings set com.canonical.Unity.Lenses disabled-scopes "['more_suggestions-amazon.scope', 'more_suggestions-u1ms.scope', 'more_suggestions-populartracks.scope', 'music-musicstore.scope', 'more_suggestions-ebay.scope', 'more_suggestions-ubuntushop.scope', 'more_suggestions-skimlinks.scope']"; fi; if ! grep -q productsearch.ubuntu.com /etc/hosts; then echo -e "\n127.0.0.1 productsearch.ubuntu.com" | sudo tee -a /etc/hosts >/dev/null; fi; echo "All done. Enjoy your privacy."; fi

Just copy the code into a terminal, press enter and Type your password. This code is from fixubuntu will Turn off "Remote Search" and block connections to Ubuntu's ad server.


Sadly, some machines wil keep resetting the boot order -- even if not running Windows, even if you set an admin password.  On those, you may have to play games with renaming the bootloader, like boot-repair does, or just use the efi boot menu to select the boot device each time. ---

I don't think wubi is a working option anymore, so avoid it. What machine do you have, they all have individual quirks.  When you say you cannot select USB, what do you mean?  Do you get the efi menu of devices to boot, and don't see usb in the list?  How did you create the USB?  Did you md5sum hashcheck the downloaded iso file, and did you burn the CD as slowly as possible, and media check it afterward?


Which upstart jobs are optional/unnecessary that I can eliminate by renaming from xx.conf to xx.skip

"Must run" depend on you needs. For example, I consider cron a must-have because otherwise I will not have log file rotation. And periodic updates check.

But if you don't even want logs, and plan to check updates manually, your case is different.

So basically the only correct answer is "it depends". Depends on how you want your system behave and on your use case.

Try to disable services one by one (see @muru comment though --- do not rename the upstart files, add a file with .override extension with just the manual command in it) and see if the system works for you. Or ask specifically what a service is doing (after researching a bit) and which are the effects of disabling it.

BTW, before doing it, be sure to know how to undo things without a graphic interface using recovery mode; the basics are well explained in How do I reset a lost administrative password?


GNU GRUB Version 2.02 beta 2-9 while booting from USB

I'll refer to that prompt as a 'grub rescue' crash.  You can use the grub commands with steps provided in this answer: https://unix.stackexchange.com/a/148042/81664

I have used those steps in the past and it works.  However, I usually use a different set of steps that also works.  The steps below that I'm using involves updating grub and reinstalling grub.

The reinstalling will incidentally repair and problem glitches in the original install that is causing the crash.  The update with find all installed OSes and add them to the boot menu.

You can most likely remedy this by manually installing grub on your desired HD.

Boot to a live try Ubuntu session, then run the following at a terminal prompt:

a) sudo mount /dev/sdaX /mnt # Make "sdaX" the partition that has Ubuntu install (i.e. /dev/sda2)
b) for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt/$i"; done
c) sudo chroot /mnt
d) update-grub
e) if no errors skip this "e" section
     grub-install /dev/sdX (sdX is the hard drive that has linux installed (i.e. /dev/sda)
     update-grub 5) Reboot the system

After you have performed the manual steps be sure to set your computer bios to have your desired boot drive as the default boot device.


missing '/usr/share/plymouth/themes/details': No such file or directory when upgrading packages

You have to reinstall the corresponding packages with

sudo apt-get install --reinstall \
$(dpkg -S /usr/share/plymouth/themes/details | awk '{print $1}' | sort -u | sed "s/://")

and also reinstall all packages mentioned in the output of

dpkg -S /usr/share/plymouth/


Backing up your home directory should be sufficient to keep your personal data.  If for some reason you have please files in other areas on your file system apart from it's defaults, it's something you may have continuously specified, you should back that up also.

Upgrading on Ubuntu is failrly safe.  But it's possible that you can incur some problems from coming back from so far.  I don't think it will take you all the way from 8.10 to 14.0, it'll upgrade you in steps... first to 9.x, 10.x, 11.x etc.  So it will take a while to get up to 14.04.

Before stating your upgrade, try to insure you have the latest updates for the version that you're running by running:

$ sudo apt-get upgrade
$ sudo apt-get update
$ sudo apt-get upgrade

And reboot if the system prompts you.

If the upgrade fails you can always perform a full install, just don't choose the format option.  It'll prompt you that your nomral /etc /bin /sbin (and other system directories) will be removed and recreated.  Your /home directory will not be removed.

By the way, there are significant changes from 8.10 to 14.04 in that many of your configuration preference might not be supported on the new OS.  You might consider starting a fresh home directory and systematically bringing your documents and other personal files from your home directory backup to your new home directory.


The error message suggest a network error or your package list is out of date.

First try

sudo apt-get update

sudo apt-get upgrade

If that does not work, try another mirror close to your location.

Mirrors listed here : https://launchpad.net/ubuntu/+archivemirrors


You can create a PLOP - CD that allows you to boot from USB even if your Bios doesn't support it. Here is some more information.

Wubi.exe supports to run Ubuntu after Windows has already been booted. As the comments say, that is probably not what you really want and I assume you did try this as a secondary solution.


How to determine the correct nvidia proprietary driver for my GPU?

command:

lspci -k | grep -EA3 'VGA|3D|Display'

on my computer it gives:

$ lspci -k | grep -EA3 'VGA|3D|Display'
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2)
Subsystem: ASUSTeK Computer Inc. GT218 [GeForce 210]
Kernel driver in use: nouveau
Kernel modules: nvidiafb, nouveau


Main Drive is not showing in the Ubuntu Simple Install

Installing Ubuntu alongside Windows Boot Manager is a "dual boot" (two operating systems side-by-side).
If that's your goal, here's a link on askUbuntu weighing the Pros & Cons of dual-booting w/Windows.
If that's not your goal, and you're instead looking to install a fresh copy of Ubuntu that wipes everything else away and starts clean over the old system, then you'd select "erase disk and install Ubuntu".  This erases Windows and installs Ubuntu, and from there you can partition the operating system (Ubuntu) onto your SSD and keep your HDD available for data storage.


No makefile error after running ./configure yet there is clearly a makefile in the dir

It seems that you are solving problems on source code level while all necessary development stuff is pre-compiled in deb-package form.
So you can install build tools by:
sudo apt-get install build-essential bison libbison-dev

Other development stuff may be found using search on https://packages.ubuntu.com - provide name of package and dev suffix to sort out the things. Next install the package by using APT - something like sudo apt-get install name-dev.


Ubuntu don't boot after updating Windows (Dual-boot)

When installing Windows it scans through all HDDs looking for bootable partition. When it finds it - then format it. Linux partitions, such as ext4 it sees as unformatted and format them too. Partitions such as swap, root, etc.
If you want to have a dual-boot system - you should first install Windows, and second install Ubuntu or any other Linux. And it is better to have physically separate HDDs for Linux and for Windows to be able to unplug Linux when you are updating or reinstalling Windows.

4 partitions or separate HDDs:

swap - capacity is identical to your physical memory size (for desktop, or 1/2 of physical memory size for server).
root or / - capacity see your system minimal requirements.
Windows or C:\\ - capacity see your system minimal requirements.
home or /home - capacity is up to you so that you may fit all your applications (or all remaining disk space).

What you can do now?

Try to boot from Live Ubuntu to rescue your files.
Reinstall Ubuntu.


Are your proxy settings correct?
Check it from

System Settings>Network>Network proxy


if

duplicity collection-status "file:///media/user/2bhd/backup/"

does not return any valid backup chains, then your backup is corrupted unfortunately.

..ede/duply.net


unable to connect to internet -- networking config not set up

Check your network interfaces with: cat  /etc/network/interfaces

It should look like something like this:

The loopback network interface
auto lo
iface lo inet loopback

The primary network interface
auto eth0
iface eth0 inet dhcp

sudo service network-manager restart
sudo ifconfig eth0 up
sudo dhclient eth0

Now your connection should be fine.


You need to setup repositories from where you can download software in maximum bandwidth.
Here is how:

Unity(DASH_board) > software and updates > Ubuntu Software > Download From > Other > Choose Best Server > OK > OK.

Reload cache and try again downloading software.

On the other hand, you can also use download manager in Ubuntu "uget". You can download it from Ubuntu software center.


Problems with wired network on acer aspire 1410

it is probably a problem with your network manager. can you give the output of both of these:

cat /etc/NetworkManager/NetworkManager.conf
cat /etc/network/interfaces


Where is the default location of ssl certs?

/var/spool/... is definitly not a place to expect certificates. In linux they are usually below /etc/ssl/certs


How to get to the GRUB menu at boot-time using serial console?

Not a perfect solution, but editing the configuration using a live USB fixed the problem.

To avoid this problem in the future, the grub configuration is fixed to display the boot menu.

The boot time for servers are so long anyways, so adding 10 seconds of grub menu is worth it when things are not working.

Here is the fixed /etc/default/grub config:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
# Kernel console on both serial and kvm/local console
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 rootdelay=60"
# Show grub menu on both serial and kvm/local console
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"


18.04 nvidia instalation Quadro K2200 black screen

The following worked:

sudo nano /etc/gdm3/custom.conf

then remove the comment (# symbol) from the line that says

WaylandEnable=false

and reboot the system


Where does shotwell store its config files?

Shotwell 0.12.3 and earlier ->  ~/.shotwell

Shotwell 0.13.0 or later -> ~/.local/share/shotwell

Shotwell's FAQ page has much more detail and a better explanation of how to migrate to a new hard drive.


How to make localhost as first match host name for shared ip(127.0.0.1)?

Remove this line:

127.0.0.1       arul-pc

And add this line:

localhost       arul-pc


How to compile and configure zen 4.2 from source code?

You can check in the ((https://wiki.xenproject.org wiki/Compiling_Xen_From_Source)).
1)   I want to update the following file but It has some problem.It's not   opening
   Updated /sbin/installkernel on Linux
   CONFIG_XEN_DOM0=y
   CONFIG_XEN_PRIVILEGED_GUEST=y

2) I want to check the .config file by using cat .config but it also not exists


Rahul, I'm sorry to say, but I think you already have the right OS installed. I have the same Acer Aspire One ZG5, upgraded to 1.5gb RAM. When support for WinXP was stopped, I removed it from mine and installed Ubuntu 14.04 32bit. It does take time to open applications, and it lags when streaming video(especially on sites that have advertisements). This Acer Aspire is a limited and slow computer when compared to newer technologies. But there is something about this laptop that I love. I can't explain it. I am using it right now to write this. I still use it for watching videos, Netflix, Youtube(with some lag), and everything else even though I have other options. I also bought an extended battery for mine as well. I hope you enjoy yours as much as I enjoy mine. If I find out any ways to speed it up I'll spread the word.


Why skype doesn't launch in Ubuntu 16.4?

Run the following commands :

1- sudo wget https://repo.skype.com/latest/skypeforlinux-64.deb

2- sudo dpkg -i skypeforlinux-64.deb

3-sudo apt-get install -f 4- skypeforlinux –


How to troubleshoot Quickly packaging failures

Use package command to build a local package, specifying the --verbose option. This will give you the full output of the underlying tools Quickly invokes to create your package. Run it as such on your project folder:

quickly package --verbose

Another command that might help:

python setup.py build

Common issues

Modules with syntax errors will cause the package build to fail
The share, release and submitubuntu commands require a properly set up Launchpad account, with an SSH key and a PPA
You'll need a GPG key to sign your package
If you don't specify a PPA name as a parameter to the packaging command, or if you haven't set it with the quickly configure ppa, Quickly will assume it is called ppa. So if your PPA is named differently, make sure to tell it to Quickly in either of the two ways above. Learn more about how Quickly gets the PPA name.

Non-Quickly build

The Quickly packaging commands overwrite the packaging control files every time they are run. In some occasions, and if you know what you are doing, you might want or need to modify them without Quickly overwriting them. In those cases you can:

Do the required changes to the packaging control files
Run debuild -S in your source tree to build a local source package
Run dput ppa:yourusername/ppa ../projectname_*_source.changes to upload the local source package to your remote PPA in Launchpad
Check whether your PPA is building the package or wait for the e-mail from Launchpad to indicate success or failure


Find the list of immediate next directory from the given location for reaching a destination file?

Get second field of a string with awk:
$ echo 'given-location/alpha/beta/gamma/foo.log' | awk -F/ '{print $2}'
alpha

awk command options used
-F/ : specify '/' as fields separator char
$2  : second field


If you are running Ubuntu 32-bit, run this on Terminal:

sudo apt-get -y install gstreamer0.10-pitfdll gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse

If you are running Ubuntu 64-bit, run this on Terminal:

sudo apt-get -y install gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse


Good way to run Java and Eclipse from a ramdisk

I came across some articles the other day while investigating my own /tmpfs projects

Refer to:

http://prezi.com/xgwyp3reqanc/ubuntu-debian-ramdisk/

&

http://blog.normation.com/2010/07/27/set-up-eclipse-workspace-in-ram/


how do I listen to an mp3 I uploaded to Ubuntu One?

If you have a music streaming account it should just work: all the music in your account that is in supported formats should appear in the music streaming app on your phone. This does not include music that is in folders that have been shared with you. It's possible your music is appearing under "Unknown Artist", if we've had problems reading the metadata from it. Other than that, it should just be there. Please contact support if it isn't there (or if it's "Unknown", really).

If you don't have a streaming subscription, you can't stream music.


Yes.

The flavors have the same Ubuntu base, but with a different desktop. Ubuntu 18.04 LTS desktop provides the GNOME desktop, Kubuntu is the same base but with GNOME replaced by KDE (along with GNOME software being replaced by KDE software).

Drivers (or kernel modules in linux talk) are well lower in the software stack (close to the kernel) where both Ubuntu/Kubuntu/Lubuntu/Xubuntu/Ubuntu-MATE/Ubuntu-Budgie/Ubuntu-Studio/Ubuntu-Kylin all have the same Ubuntu base.


Easy way to create password protected/lock folder in ubuntu without any hard work

sudo apt-get install cryptkeeper

Once the program is installed you need to run

 gsettings set com.canonical.Unity.Panel systray-whitelist

in a terminal. This makes it so the icon becomes visible in the top tray. It is possible to get the program to load without this command by right clicking on cryptkeeper and selecting lauch, and it will let you create a folder and everything, but you cannot unmount it because it wont show as a mounted drive in the key in the top panel, so you MUST run the command first. After you ran the command go to dash and type out

 Cryptkeeper

and open.

From there you will get a key icon in your top panel. Select New Encrypted Folder and you will get a popup. Fill out the name of the encrypted folder at the top, and choose a directory to keep it in. When done, press the forward button in the lower left.

Now you are prompted for your password. After you fill out twice, again press the forward button in the lower left corner.

After a moment a new window will open and this is your encrypted directory.

When you need to unmount the directory, just click the key in the top panel and take the check mark off of (just click) the encrypted drive you wish to un-mount.

And when your ready to use it again, just click the same key, select the encrypted directory you wish to mount (it will be listed) and then you will be prompted for your password

Once the password is entered the directory will open and you will have access to it. Again, to close it, just click it in the key in the top corner and your all set.

For some reason my screenshot tool would not capture a picture of the icon, but this is what the program looks like once you click on the key icon.

If you ever need to delete a directory you just need to right click the key icon, select edit, click directory you want to delete and press delete. You can also change the password and I think file name from here as well.


Instead of assigning those long commands, I wrote a script that takes options and do the things I want. I then assigned keyboard shortcuts for the script with different options. works like a charm.

btw, I am doing this because the vlc global hotkeys don't work at all -- how did this get past testing??? As a workaround, I configured vlc to take remote commands from a socket of my choice.


How do I add this unallocated space to my Ubuntu partition using GParted?

GParted doesn't allow you to modify partitions when they are active. Boot from a LiveUSB and launch GParted from there, it should work.


Grub shows "lsb_release -i -s 2 ..." instead of "Ubuntu"

After some update and upgrade the problem disappear. Alternatively, you can re-configure all packages and prompt "new" instead of keep old configuration.

here the example,

sudo dpkg-reconfigure -a


Difference between daily and normal version of vlc

vlc version 2.2.2-5ubuntu0.16.04.4 has passed the tests for Ubuntu.

I don't know the details about vlc's daily version, but usually the daily version of some software means that it is the bleeding edge version, and still needs testing.

So if you enjoy testing, you can try the daily version, but if you want a reliable tool you should use the version from Ubuntu's repositories, now "2.2.2-5ubuntu0.16.04.4".


curl-config error during installation of package

I used this command to install all the dependencies

sudo apt-get build-dep <package>

For my situation, it is

sudo apt-get build-dep curl


Radeon 6950 not detected by "additional drivers" on 16.04

The one thing that had been stated even before 16.04 was released was that it would not support the fglrx driver for ATI/AMD adapters.  If you want to keep using 16.04 you have to use the open source drivers.


I'm not sure who wrote that, but foo-devel is a seen in RHEL and RHEL-based distros. Debian and family use foo-dev or libfoo-dev. So these commands are all flawed:

sudo apt-get install python-devel numpy
sudo apt-get install gcc gcc-c++

sudo apt-get install gtk2-devel
sudo apt-get install libv4l-devel
sudo apt-get install ffmpeg-devel
sudo apt-get install gstreamer-plugins-base-devel

sudo apt-get install libpng-devel
sudo apt-get install libjpeg-turbo-devel
sudo apt-get install jasper-devel
sudo apt-get install openexr-devel
sudo apt-get install libtiff-devel
sudo apt-get install libwebp-devel

For most of these, you can look up the corresponding packages. I checked some, at least these are ambiguous:

libgstreamer-plugins-base{1.0,0.1}-dev
libpng{12,16}-dev

It's not exactly clear which of these versions the author intended to use.
Since there are ambiguities here, I suggest looking for a different guide.


GIMP clone tool CTRL+CLICK doesn't work when ubuntu show mouse position is selected

Solved, when "show mouse position on Control" uncommented under system configuration.


Can I Install Digikam without installing most of KDE?

apt-get --no-install-recommends install digikam provides a slightly better outlook:

0 upgraded, 82 newly installed, 0 to remove and 0 not upgraded.
Need to get 69.6 MB of archives.
After this operation, 211 MB of additional disk space will be used.

It still includes MySQL but Konqueror and Dolphin aren't in the list.


TeXstudio installation problem on Ubuntu 18.04.2 LTS using PPA

You need to run
sudo apt remove texstudio-doc

that fixes the issue.


Resume from suspend does not work on ASUS K501UX running Ubuntu 16.10

I got the same Bug, I need to reboot manually my laptop after it enter in Stand-by mode.

I got an Asus K501UQ.
I meet this bug after I switch my Graphic driver to Nvidia GeForce 940MX/PCIe/SSE2 and update Ubuntu 16.10.

Nvidia drivers
Known Issues with this release:
* Resuming from suspend may not be reliable on GeForce GTX 9xx boards in some configurations.


Edimax EW-7622UMn wireless installation Ubuntu 14.04

Try with installing common Wifi drivers in Ubuntu

sudo apt-get install build-essential libssl-dev linux-headers-`uname -r` linux-firmware-nonfree


Local network speed issues, 12.04.01/smb/cifs

Disk performance and network performance are different beasts. iperf measures network performance, ie, data speed over LAN. Since there are no disk reads (and, specially, writes) involved, performance is expected to be many times greater than any file copy. That explains the 70MB/s vs 10MB/s (or 3) difference.

As for "samba vs cifs": first of all, you may have noticed that their performance is "similar", at least in order of magnitude. One is "only" 3x slower, not 20x. And the reason is cifs is implemented by the kernel itself, natively, thus much faster than any other fuse-like, user space mount.

Good news is: you can use cifs to mount devices with the SMB protocol, so your shares are available to windows users. This way you get the best of both worlds: compatibility and speed.

An amazing guide from samba.org itself is this: CIFS Users Guide. You may also read their great wiki

That said, a wireless file copy speed of 10MB/s is, from my point of view, very nice.


How to prevent a process from being killed?

Why would it be killed off?

Because it's not automatic that something is killed. Once you answer that, and explain why something would be selected for destruction, you might be able to come up with a solution.

Given you're talking about Rails' rake command, I'm guessing that this is a process running on a server. That you're worried about it being killed suggests it's being killed by the server host for using too many resources. In cases like this, there aren't (nor should there be) ways of stopping your process for being killed.

If you have a resource-expensive task, buy more resources. Use your own server time. Or come to an arrangement with the host that allows you to run it on their dime.


Application Menu - Gnome Tweaks - Toggle On & Off Reverse Function. Ubuntu 18.04

The "Application menu" is a global menu for an application, that by default is displayed on the Gnome topbar for the application that is in the foreground. Gnome applications such as Files, Calendar, Software, etc. display several options there. For other applications, the menu usually contains the "quit" option only.

Turning off the application menu in Gnome Tweaks removes it from the top bar of gnome shell. By default, it will now be included as an extra icon in the top bar of applications that use client side decorations, such as the gnome applications (Files, System Monitor, ...) and others (e.g. Shotwell).

Whether and where it is available in the top bar of gnome applications or not is determined by the dconf setting org.gnome.desktop.wm.preferences button-layout. By default in Ubuntu 18.04, this is set to 'appmenu:minimize,maximize,close'. The string "appmenu" stands for the application menu. Removing that string will prevent that application menu from ever being displayed in the top bar.

In future gnome shell versions, the application menu may be removed from the Gnome top bar.


Have a look here and here. Should be a good starting point. And of course, the usual advise applies: Have you made sure your fan is "clean" enough (dust etc.)?


Projector is not detected by Ubuntu desktop

Open "monitors" using unity and press "detect monitor" to discover the newly added monitor to detect.

Connection is done using usb so use lsusb to cheek the connection.


Ubuntu Server HTTP redirect to other server?

If I understood right, your both machines are behind a router, but first is in the DMZ, and you want to open the second one to the web too?

If that is the case, you can use port forwarding option of your router and forward external port (8080 for example) to internal port (IP of the machine, port 8080).

Also, if you added first one to DMZ just for the sake of one port, you should remove it from DMZ and just forward the one that you need.


{14.04} No boot graphics (Not a problem just annoying)

Press c on grub to get in the console and then enter videoinfo.

Note down the highest resolution and color depth available. E.g 1920x1080x32.
Load ubuntu and enter in the terminal:

sudo nano /etc/default/grub

Find this line #GRUB_GFXMODE=640x480 and add the following:

GRUB_GFXMODE=1920x1080x32
GRUB_GFXPAYLOAD_LINUX=keep

(Add your own resolution and color depth). Save it, exit and enter in the terminal:

echo "FRAMEBUFFER=y" | sudo tee -a /etc/initramfs-tools/conf.d/splash
sudo update-grub2
sudo update-initramfs -u -k all


What is the reason behind apt-get's W: Duplicate sources.list entry?

And yet, apt-get explicitly tells the user You may want to run apt-get update to correct these problems, even though in multiple posts on Ask Ubuntu the error actually appears when people do try to run apt-get update.

But that's not the only place this error is seen. It so happens that most people do tend to run apt-get update after making changes to the sources, which is perfectly fine, but this can also happen with other apt operations:

$ sudo vim /etc/apt/sources.list
[sudo] password for muru:
$ sudo apt install vim-gnome
Reading package lists... Done
Building dependency tree
Reading state information... Done
vim-gnome is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 328 not upgraded.
W: Duplicate sources.list entry http://jp.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages (/var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-amd64_Packages)
W: Duplicate sources.list entry http://jp.archive.ubuntu.com/ubuntu/ trusty/main i386 Packages (/var/lib/apt/lists/jp.archive.ubuntu.com_ubuntu_dists_trusty_main_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

And the problem here is the two warnings are somewhat independently generated.

W: You may want to run apt-get update to correct these problems is printed when any error happens while building the apt cache. It's a catch-all generic solution: the code that prints this doesn't know (or care) which error happened, but I'd say that it's reasonable to assume for most errors that could happen when building the cache, fetching a fresh package list might well be the solution. (Think of all the apt problems we have seen because someone ran apt-get install or apt-get upgrade without running apt-get update.)

But, the developers know that it's not a great suggestion. See apt-pkg/cachefile.cc:

/* This sux, remove it someday */
if (_error->PendingError() == true)
   _error->Warning(_("You may want to run apt-get update to correct these problems"));

(As always, patches should be welcome.)

  So is there any particular reason why apt-get doesn't resolve these automatically?

Because, IMHO, this is always the result of PEBCAK. add-apt-repository is smart enough not to add duplicate entries. So, this error always happens when someone edits the sources manually. And since humans have an infinite potential for creating interesting errors, it's not safe to have it automatically corrected.


Why so many files relating to grub (/etc/grub.d/, /etc/default/grub, /boot/grub2/grub.cfg)? What is the purpose of each?

/etc/default/grub is where you can set simple options for many GRUB settings. It is parsed as a shell script.

/etc/grub.d contains shell scripts which generate GRUB configuration (based on settings on /etc/default/grub). update-grub (aka grub-mkconfig) runs these scripts to generate actual GRUB configuration.

/boot/grub2/grub.cfg is where the generated configuration is saved for GRUB to use.

Ordinarily, for setting GRUB options, you edit /etc/default/grub. If you need to generate additional GRUB entries or alter the entries generated, then add or change scripts in /etc/grub.d. Don't manually edit /boot/grub2/grub.cfg.


How to change launcher icon path of an installed application

Run locate .desktop | grep pycharm
Open the found pycharm.desktop such as gksudo gedit /path/to/.desktop
Edit the Exec=<...> line with the new absolute path to the pycharm.sh executable and save the changes.


Server 18.04 | Daily server connection issues

One possibility is IP address collision: Someone connects a laptop with the same fixed address of a critical server in some time interval.  I have had that problem several times in my University network. Using the arping utility from another server in the same VLAN showed two MAC addresses responding to the same IP, then using the switches admin interface hunted down the physical port used by the culprit and disabled it in the corresponding office switch. Then the user came to report the 'I have no internet' problem ;)


Is this because of the USB or its size?

USB. That machine has 3 2.0 USB ports. Those are slow.

  Everything else too seems rather slow - e.g. saving files, starting/closing applications... . Will I see an improvement in performance if I install a replacement hard drive?

Yes. Most definitely.

  Is there some way I can avoid this?

You probably want to install another sftp program. There are a lot of them but filezilla is pretty good.


MAAS 2.6.0 import already deployed machine

My way to get this done was to add the machines was the following:

Add the Machines the regular way by doing the enlist and commission steps.
They will not touch your installed system but gather information about the machine that MAAS needs to handle them.

Now the dirty part:

On the MAAS region controller run:

DON'T RUN THIS BLINDLY BUT UPDATE THE WHERE CLAUSE:

sudo -u postgres psql
postgres=# \c maasdb

UPDATE maasserver_node SET status='6',netboot='f',bios_boot_method='pxe',osystem='centos',distro_series='centos70',owner_id='3' WHERE hostname != <name of your controller in single quotes>;

Status 6 means Deployed.
It's not very nice but it solved my problem.
As soon as I enable the maas-dhcpd and the systems boot they don't anymore go into enlistment or commissioning.

It is a good idea to deploy another system that is very similar to the ones you want to import.
To get an idea about how other systems records look do a:

SELECT * FROM maaserver_node;

I don't know whether this is the most minimal update command you can run but it solved my problem.

Tested with MAAS 2.6.0 running on Ubuntu 20.04.


These sound like two completely different problems. IMO, you should create two separate pieces of software, one for each of them. (If there isn't yet something to do so).

To see whether something was installed, you can monitor the file /var/log/dpkg.log. It will contain any dpkg events, for installation, removing, configuring, etc. The lines in there look like:

2015-06-04 12:57:15 status installed numlockx:amd64 1.2-5

You will, however, run into a problem, if the system is not using an English locale. Also, this does not cover manual package installations, e.g. when installing something to /usr/local/ or /opt/. It is practically impossible to watch all methods of software installation.

For watching which programs are being run by a user, you can monitor the process list, obtainable with ps -u <username>.


Screen sharing is impossible since upgrade to 20.04

If you use X11, it should work out of the box.
If you use wayland you have to use pipewire 0.3 to be able to share your screen.
Unfortunately, only 0.2 is present on 20.04, so you have to backport it from hirsute and compile xdg-desktop-portal and mutter with it.
To build packages more easily you can use the image provided by screencast-pipewire-focal that already contains patches.


Why Default Applications Do Not Have .tex Editor in Ubuntu 14.04?

How to set a default application for random file extensions

Do a right click on a single file and select Properties from the context menu.
In the properties window select the tab Open with
Select an application and choose Set as default


Try running from terminal the following,

sudo /etc/acpi/sleep.sh


phpmyadmin fatal error calling undefined function mb_strpos

mb_strpos is not a default function in core PHP, it's contained in the mbstring extension.  You can easily install it with sudo apt install php-mbstring


Can I install an Ubuntu app from remote laptop?

Yes this can be done. You can download the .deb file when you are at laptop 1, use the SSH file system (sshfs) to connect to your second laptop, then just copy from one to the other in Nautilus or whatever file browser you use. This can also be done if you installed the software on laptop 1 and the .deb is still in the cache folder (/var/cache/apt/archives). Just copy it from there to laptop 2 if you have ssh access to it, again using sshfs.

To use sshfs, it is similar to ssh in some regards. Switch -p for non-standard port numbers is just the same as ssh, otherwise the standard port 22 is used. Also, -C for compression over slow connections works.

Imagine Joe Bloggs has an account on both laptops. He has downloaded a .deb to laptop 1. He can copy it to laptop 2 using sshfs, then install this file when he gets home. Sitting at laptop 1 he has to do the following:

Make an empty folder in his home directory of laptop 1, perhaps called copies.
Type at the terminal: sshfs [-p oddportnumber] -C joebloggs@internetaddressoflaptop2: ~/copies
(Note the colon at the end of the laptop 2 address, and the space between that and the tilde.)
This mounts the home directory of joebloggs on laptop 2 inside the folder called copies on laptop 1 using ssh over the Internet.
Now copy the .deb file into the folder called "copies" in laptop 1 and it is actually copying via ssh to the home folder in laptop 2.
To unmount you have to type fusermount -u ~/copies

I hope this is what you were looking for.


GRUB2 shows Windows 7 or Windows Recovery Environment instead of Windows 10

Update:  I just performed a clean install of Xubuntu 14.04 and the entries to the file that is listed below were already there.  Looks like the GRUB Team has now included the update.  I will leave this here for anyone that might stumble across this without the update on their system yet.

Update #2:  If you create an Ubuntu 14.04 LiveUSB with at least a 1GB Persistent file on it, this file location is the same and the persistent file will allow the changes that are made to stay.  This file should only be modified after booting the system to the USB drive in Try Ubuntu boot.

The reason why it still shows Windows 7 or Windows Recovery Environment instead of Windows 10 is that the file /usr/lib/os-probes/mounted/20microsoft does not contain the label for Windows 10, so during the os-prober detection of the OS it falls back to Windows 7 or Windows Recovery Environment.

To correct this, you need to make the following changes to the following file (I am going to put gedit as the editor, but use what you want):

sudo gedit /usr/lib/os-probes/mounted/20microsoft

NOTE:  You should always make a backup of a file before modifying it!

if item_in_dir -q bootmgr "$2"; then
        # there might be different boot directories in different case as:
        # boot Boot BOOT
        for boot in $(item_in_dir boot "$2"); do
                bcd=$(item_in_dir bcd "$2/$boot")
                if [ -n "$bcd" ]; then
                        if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then
                                long="Windows 10 (loader)"
                        elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
                                long="Windows 8 (loader)"
                        elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
                                long="Windows 7 (loader)"

the changes above are changing the line if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then to elif grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then, and adding if grep -qs "W.i.n.d.o.w.s. .1.0" "$2/$boot/$bcd"; then and long="Windows 10 (loader)" above that line and saving it.

Once saved, then running os-prober now looks like this:

terrance@terrance-ubuntu:~$ sudo os-prober
[sudo] password for terrance:
/dev/sdf1:Windows 10 (loader):Windows:chain

then running update-grub2 it will now make the updates to your /boot/grub/grub.cfg permanent anytime you get a kernel update so it will show the correct version of Windows now (example below):

terrance@terrance-ubuntu:~$ sudo update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.19.0-26-generic
Found initrd image: /boot/initrd.img-3.19.0-26-generic
Found linux image: /boot/vmlinuz-3.13.0-58-generic
Found initrd image: /boot/initrd.img-3.13.0-58-generic
Found linux image: /boot/vmlinuz-3.13.0-57-generic
Found initrd image: /boot/initrd.img-3.13.0-57-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 10 (loader) on /dev/sdf1
done

Hope this helps!


How to change the name of media device from terminal

man -k label | grep -E 'file|volume'

should print the names of a few relevant shell commands.
Check out the man pages.
You will probably need to prepended with sudo as you attempt to run any of them.

NOTE:
rename - renames multiple files
rm - remove files or directories
mv - move files


how to export folder specific environment variables?

If using the bash shell, add to your .bash_profile:

mycd(){
        builtin cd "$@"
        case $PWD in
        */proj1*)  export JAVA_HOME=/a ;;
        */proj2*)  export JAVA_HOME=/b ;;
        esac
}
alias cd=mycd

Then when you type cd ... it will run mycd in which you can do stuff.
It starts by calling the real built-in cd.

You need to start a new interactive bash to see the effect, of course.


Rhythmbox: How to normalize song volumes?

There is a replaygain plugin in rhythmbox:

Go to Tools >> plugins, check ReplayGain

(be sure to have the package rhythmbox-plugins installed)


Find locking process with ps -eaf | grep mysql and comment if the command returns results. Kill the locking process with sudo kill -9 <locking-process-number> and then run sudo apt purge mysql-server and try sudo apt install mysql-server again.


How do I write to my Macintosh HD partition?

A similar question was asked and answered on Superuser How to mount a HFS partition in Ubuntu as Read/Write

Can you follow the answer there and let us know if it solves your problem?


How can I tell the version of a package which will be installed before I install it?

Use apt-cache policy:

$ apt-cache policy gitlab-ce
gitlab-ce:
  Installed: 8.6.1-ce.0
  Candidate: 8.7.0-ce.0
  Version table:
     8.7.0-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.7-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.6-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.5-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.4-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.3-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.6.2-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
 *** 8.6.1-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
        100 /var/lib/dpkg/status
     8.6.0-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.5.11-ce.1 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages
     8.5.10-ce.0 0
        500 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu/ trusty/main amd64 Packages

The version listed as the Candidate will be picked. The current version (if any) will be listed as Installed and marked with the asterisks.


Maximum number of lenses displayable in Ubuntu 12.10?

I haven't heard of an existing limitation. I have seen screenshots of Dash screens with every available lens displayed, so I think you can install at least 10-15 lenses without running into problems.


Network Interfaces Do Not Function When Ubuntu Is Installed On An Asus 'Striker Extreme' Motherboard

Answers to this question are no longer verifiable: the motherboard died entirely a few weeks after the question was posted. So it's now impossible to accept an answer.


Detect Palm on a Ubuntu Lenovo ThinkPad Lenovo Laptop with a Synaptics touchpad

For anyone looking - the workaround I found was setting AreaRightEdge to 80% of the total. This means that motions, clicks, etc initiated on the right most 20% will be ignored but still leaves the entire touchpad usable as long as a movement is initiated elsewhere (i.e. the middle).

Run this to list out your settings:

synclient -l

For me I got

LeftEdge = 1574
RightEdge = 5368
...

I set AreaRightEdge using the following command

synclient AreaRightEdge=4500

You can use evtest to get a realtime position of your finger to determine the right placement. This solved all my palm detection and phantom movement issues.


Ubuntu 12.04 /Windows7 dual boot with ssd and hdd - partitioning & setup

After installation of systems I've created partition labelled as MyData on 500GB HDD(systems are on SSD)formated as ext4. I've made it with GParted and whole hdd is one big partition.
Then I've created mount point in /mnt/MyData and added owner and permissions with these commands:

sudo mkdir /mnt/MyData (creates mountpoint)

sudo chown -R user:user /mnt/MyData (adds owner - replace user with your user name)

sudo chmod -R 766 /mnt/MyData (adds permissions)
Next, in Terminal we need to put command sudo blkid to find out disk UUID.
Then edit /etc/fstab with command: sudo gedit /etc/fstab and put this line in it:

UUID=xxxxx(your disk id) /mnt/MyData ext4 auto,users,rw,relatime 0 2

Save file and run sudo mount -a (everything is good when no errors appear)
Copy all folders you want from /home to /mnt/MyData or create them manually.
Open Terminal in /home and move temporally each folder with this command:

mv Music oldMusic (do this with all folders you want)
Final step - create symbolic links from /home directory folders to your HDD folders   with this command:

ln -s (creates symlinks)

for example:

ln -s /mnt/MyData/Music

Do this with each folder you want. After this delete all folder named as old from your /home directory.

For example:

oldMusic

After this every file that we put to folders in /home directory lands on HDD so we don't force SDD to make read/write operations.

All Credits goes to oldfred:

ubuntuforums
ubuntuforums


GRUB (when configured correctly) will give you a passphrase prompt used to unlock the second-stage boot loader. The last few steps here show you how to do this.
I suggest copying everything off and doing this, and then restoring needed files from backup.


arm-none-linux-gnueabi-gcc: permission denied error

got the problem solved.
Need to install ia32libs.
Use following command to install ia32libs.

sudo apt-get install ia32-libs

if fails then run this Command:

sudo apt-get -f install


How to fix "operating system not found" after spilling water over the computer and using boot-repair?

It seems like your hard drive might have been damaged by some of the water. This could have messed with the main boot files in Ubuntu to the point where they are unrecognisable/recoverable.

Try booting up with the live CD, and see of you can access your documents etc. from your hard drive, and then back them all up (to a portable hard drive or flash drive) and do a fresh install. This will prevent any future corruption issues (hopefully) and allow you to boot into a fresh system with which you can restore your backed up data.

Probably not what you wanted to hear, but I hope it helps.


Yes you can, but I would instead suggest providing the Linux container with its own IP address or port instead. This would be more secure and scale better.

If you still want to stay the course of logging into the host first, here is a method,

Setup SSH Server on the Linux Container
On host as that user, generate private key and public key
Create same user and place public key on Linux Container
Modify user's profile to automatically execute SSH into LXC


If you have 2.4GHz wireless working but 5GHz wireless is not being detected at all, then it's most likely a configuration issue depending on the router.
So go to your router's Wireless settings for 5GHz, and set it as per following:
(1) Mode: AC Only
(2) Channel: 140
(3) Channel width: 20 MHz

Apply changes.

Note-1: Wireless Channel can be any between supported range of your wireless adapter but keep the Channel width to 20 MHz, and Mode to AC only.
Note-2: You can find out the channels supported by your wireless adapter by: iwlist chan.
Now you may need to reboot router after the above, which depends on the make/model of your router.
If it was a case of router configuration, you would now have a working 5GHz wireless.


Thunar not authorized to acces mounted volumes

Check if polkit-gnome is installed, if it isn't install it.

In the fluxbox startup script add the folowing lines:

# Polkit agent:
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &

Also make sure all volumes you want mounted are in /etc/fstab.

After reboot you should be authorized to access mounted volumes


Cannot install Ubunt 14.04.3 LTS frpm USB or CD

I also got this in my New Hp Lap.

So what I do is,

In choose menu(installing Path selector), Go to Something Else
And remove your ext partition (using - left side bottom of screen) and make different partion for
SWAP
and then create your disk with your values
then select all your drives and click install

  Note : This will install in largest partion which you create.
  And I just did that

(Image from google)

after something else Screen


How to kill the process that 'sudo kill -9' can't kill without reboot?

A few points:

killall only takes process names so your syntax there was incorrect.
[bracketed] processes are kernel threads which aren't going to respond to being killed by a userspace program like kill.
Something like mount is waiting for the kernel to respond. It should mount and then close. The only time it hangs is when the mount can't go through, AFAIK. Consider using -v in your mount options to see the exact problem.

I think you want to try sudo umount -f /media/634bad56-5543-40fe-843b-cd31f4a95dba_ and if that doesn't work: sudo umount -l /media/634bad56-5543-40fe-843b-cd31f4a95dba_. I would hope the kernel would see the unmount and would stop the previous mount operation.

Also if this is a mount from your /etc/fstab, you might want to consider using UUIDs instead of "/dev/sdxn" devices which can change name between boots.


Menu bar in Nautilus, Ubuntu Software Center and Terminal, not global menu bar

Maybe a bit too late but if other user encountered this issue like me, jut issue the command

sudo killall lightdm

Try to login and it will fix the problem. Another is uninstalling compiz config settings manager.


From the discussion in the comments, to resolve the graphics problem on the wubi install

First,  after the computer boots, type ctrl-alt-f2 and log in. If you are unable to do that, boot to recovery mode and drop to a shell ("netroot" in the recovery menu).

See also How to connect to internet from recovery mode?

You then install the nvidia driver

sudo apt-get update
sudo apt-get install nvidia-current

And reboot.

If needed, to adjust your resolution, use nvidia-setings

gksu nvidia-settings


For the question you asked your comment (I think it is what you want to do), you can run these commands:

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update
sudo apt-get install vlc


In the 20.04 installer, Full Disk Encryption requires LVM to be enabled and available in the installation steps.  This is not super straightforward, but is not very difficult to set up either.
When you get to the installation selection of erase disk or such you'll see something like this:

Choose "Advanced Features" - a new box will open with advanced features.
Select LVM and Encryption like so:

Hit "OK" then "Install Now" on the original screen where you selected the installation type.
This next window sets your security key for the LVM/LUKS setup:

Set your password/key for decryption and hit "Install Now".  The next window will look something like this, and you will want to hit "Continue" to install and make changes to the filesystem:

Installation continues as normal and expected after this.
Happy FDE Encryption Fun!


Please follow below steps to install oracle java:

Download the latest Java SE SDK version.

http://www.oracle.com/technetwork/java/javase/downloads/index.html
Untar the Archive:

tar -xzvf /root/jdk-7u17-linux-x64.tar.gz
mv jdk1.7.0_17 /opt
cd /opt/jdk1.7.0_17

This step registers the downloaded version of Java as an alternative, and switches it to be used as the default:

update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_17/bin/java 1
update-alternatives --install /usr/bin/javac javac /opt/jdk1.7.0_17/bin/javac 1
update-alternatives --install /usr/lib/mozilla/plugins/libjavaplugin.so mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so 1
update-alternatives --set java /opt/jdk1.7.0_17/bin/java
update-alternatives --set javac /opt/jdk1.7.0_17/bin/javac
update-alternatives --set mozilla-javaplugin.so /opt/jdk1.7.0_17/jre/lib/amd64/libnpjp2.so

Test

To check the version of Java you are now running

java -version

To check the browser plugin browse to http://www.java.com/ and click “Do I have Java?”


Are you just trying to share files with the Windows guest?  Have you configured Virtualbox for sharing the directories, in "Devices => Shared Folders?"  That is necessary for the guest to see the shared directories, although there may be other ways to set up the network.  Then, if it doesn't work, you may need to install Samba on Ubuntu - I'm not sure if it's installed by default or not.

For more information on configuring the samba server on the host, you can take a look at this article.  Usually, all you need to do is edit /etc/samba/smb.conf to add the name of the computer and the network, which defaults to "Workgroup", but should match the name of the windows network.  These two lines in [global] are the ones that set it:

   workgroup = workgroup-name
   netbios name = server-name


I would start by investigating whether using Ubuntu standard Guest account would suit your needs regarding preventing users from installing stuff/modifying configs etc. So your machines would have a password-protected admin account to install/configure things and a password-less Guest account for your users.

For restricting Internet access I'd use Dans Guardian.


ROS on 15.10 (is there a way to install packages for 14.04?)

Yes it is possible to install Ros in Ubuntu 15.10. Indigo is not officially supported on Ubuntu Wily. Unresolvable dependencies are exactly the kind of issue you run into then. You could attempt to install a full stack from-source using a chroot. How to install ros-indigo from sources in a chroot?

Hope it helps.


How do I change extensions of different file types

for IF in *.* ; do OF="${IF%.*}.txt" ; mv -n $IF $OF ; done


How to install sqlite SQLite 3.7.11 on Ubuntu 12.04

3.7.11 is from an unsupported release. Look at https://launchpad.net/ubuntu/+source/sqlite3 and you can see 3.8.5-2ubuntu1 is the latest and you can download it from there and install it with software center.

3.8.5 can be downloaded from the sqlite.org website.


I was able to find this by some googling:

current=`uname -r` && uninstall="" && for version in `dpkg -l linux-image* | grep ii | awk '{ print $2}'`; do if [[ "$version" < "linux-image-$current" ]]; then uninstall=$uninstall" $version"; fi; done && sudo apt-get purge $uninstall -y && sudo update-grub2

It removes old kernels and updates grub. This solved my problem.


You need to be root user to access /etc!

There are 2 ways to get superuser rights:

gain root privileges by executing sudo <command>
or switch to root shell and run command there: su or sudo su

Both ways require entering your admin password, so be sure that you are local admin.


16.04 Stuck at login (amd radeon gpu) tried all the methods

When I had this issue, it was because my system partition was full. Removing around 150 MB didn't do the trick, so I made the partition bigger with the live USB stick.


Why does installing tomcat6 require creating a soft link to /usr/share/java?

Installing Tomcat using:

sudo apt-get install tomcat6

should install and start up Tomcat as a service just fine. The service can be started and stopped using:

sudo /etc/init.d/tomcat6 start
sudo /etc/init.d/tomcat6 stop

You can verify if the service is running by viewing http://localhost:8080/, either using a browser or from the command line:

curl http://localhost:8080/

If this is not working out of the box for you then something is either odd about how your machine is set up, or about how you are trying to run the Tomcat service.

If you are trying to run Tomcat in any way other than using the /etc/init.d/tomcat6 script, you are likely to run into complications. There are two environmental variables that define where the Tomcat distribution and files are located; CATALINA_HOME and CATALINA_BASE. For a vanilla installation of the package, these will end up being set automatically by the init.d script to:

CATALINA_HOME=/usr/share/tomcat6
CATALINA_BASE=/var/lib/tomcat6

If you are trying to run Tomcat in some other other way, it is possible that these variables are not set correctly which could result in the error you are describing.

The packaged Tomcat server is designed to be used for running Tomcat as a background service on a server, and as such should really only be started and stopped using the init.d script. If you are trying to run Tomcat on a development machine (eg, from an IDE such as Eclipise), then you will find that the way the package installs Tomcat is unsuitable, and you should instead be installing a private instance either using the instructions in the server manual or by downloading it directly from the Tomcat website and extracting it manually.


That is the default behaviour of Ubuntu 12.10.  During Ubuntu installation, simply select the option "Install alongside Windows" and Ubuntu will leave your windows partition alone and prompt you which OS to use on your next boot.


Cannot tether Canon EOS digital camera to Ubuntu 18.04

"Wi-Fi/NFC" should be set to Disable on the camera.


How to reset the language of the package descriptions

I have done some tests, and I can say that the locale variable that determine the APT behavior about translations to download is LC_MESSAGES, as expected.

In fact, if you do the following commands:

export LC_MESSAGES=en_US.UTF-8
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get update

you should come up to english translations only.

To permanently have that variable set to english, you should put the lines

export LC_MESSAGES=en_US.UTF-8

in your ~/.profile.

Take also into account that modifying that variable could influence the behavior of other applications too, because they use that setting to decide with which language to talk to the user. If you want to have package description in english without modifying the LC_MESSAGES variable, you can create a file in the /etc/apt/apt.conf.d/ directory, say you name it 20language, and put the following content in it

Acquire::Languages "en";

after done that, and before updating the repository cache, remove the old cache with

sudo rm -rf /var/lib/apt/lists/*


Pidgin will allow you to use almost any instant messaging protocol, which includes but not limits to GTalk and Windows Live Messenger. However, you may miss some WLM and/or GTalk functions/abilities.

Good luck!


Unable to restart nginx via systemd because it's already running

sudo killall apache2

To solve Job for nginx.service failed because the control process exited with error code. See systemctl status nginx.service and journalctl -xe for details.


sudo apt-get remove does not remove config files

Use sudo apt-get purge <program> instead, to remove config files as well.


Backup Drive Issue: Seagate backup plus 1TB in not getting detected

I also had the same screen when I put it in the USB 2.0 but when I plugged it into the USB 3.0 port then it would be detected and you can see it with lsusb.


When a file / dir has special characters and won't delete, you can try to remove it using it's inode number more information on inodes in ext3.

To do so,

open a terminal window.
Change directory cd to the location of the files or directories with the "special characters".
Run

ls -lbdRi *
1312883 drwxrwxr-x 2 me me 4096 Aug 31 11:49 special-character`

Note the "inode" number (Here 1312883)
Then run a find and remove on that "inode"

 find . -inum 1312883 -exec rm -rf {} \;
 find: ``./special-character': No such file or directory

and then to make sure that is has gone.

 ls -lbdRi *
 ls: cannot access *: No such file or directory

I hope that this helps.


gray screen problem with disappearing menu in Ubuntu 18.04

My solution to the gray screen is to change the xstartup file to this:

#!/bin/bash
env -i /bin/sh -c "export PATH=$PATH;
              export XAUTHORITY=$XAUTHORITY;
              export DISPLAY=$DISPLAY;
              export HOME=$HOME;
              export LOGNAME=$LOGNAME;
              export USER=$USER;
              /usr/bin/xfce4-session"

But the terminal icon in the vncviewer does not work. Have to find and execute the xfce4-terminal.


FFMPEG permission denied trying to covert video

First, run the following commands to fix the file not found error:
sudo apt update
sudo apt install libdrm-common

Whenever you get a file not found error, you can use apt-file to try and locate the package that provides the needed file.
sudo apt update
sudo apt install apt-file
sudo apt-file update
apt-file search /usr/share/libdrm/amdgpu.ids

It might take a while but it should return the following:
libdrm-common: /usr/share/libdrm/amdgpu.ids

This is how I determined which package to install.

Next, it appears you don't have write permission on your mounted directory.
You can either remount the mounted filesystem with write permissions or you can copy the .avi file to your user's $HOME directory before you execute ffmpeg.
For example, you can copy the file to your user's Desktop directory:
cp /mnt/Data/Videos/192.168.1.2_Street_main_20210522141323_141716-5fnd662.avi $HOME/Desktop

and then run ffmpeg from there:
ffmpeg -i ~/Desktop/192.168.1.2_Street_main_20210522141323_141716-5fnd662.avi -ss 1 -t 95 ~/Desktop/192.168.1.2_Street_main_20210522141323_141716-5fnd662.mp4

If you still get a permission denied error, you can change ownership of the file:
sudo chown $USER:$USER ~/Desktop/192.168.1.2_Street_main_20210522141323_141716-5fnd662.avi

and then try again:
ffmpeg -i ~/Desktop/192.168.1.2_Street_main_20210522141323_141716-5fnd662.avi -ss 1 -t 95 ~/Desktop/192.168.1.2_Street_main_20210522141323_141716-5fnd662.mp4


How do I connect to WPA2 Enterprise wireless networks on 18.04 without breaking regular wireless connections?

I've just found the solution and it was the stupidest thing. Apparently GNOME Network Manager (The one I was using) loads credentials into memory when you input them. When it connects to enterprise networks, it will fail when it tries to read the credentials off the boot drive, and act as though the credentials are wrong because it didn't input any. The solution? Open "Connection Settings", then edit the connection, but don't do anything. Immediately close out of the connection editor and it will save your credentials properly. Then reconnect, input them again when prompted, and it will connect without issue.


second hard drive, encrypted (LUKS, but mounts separately)

You could use eCryptFS and make a private folder on the second drive, it could decrypt automatically as you log in (see ecryptfs-setup-private and this other answer about a different ~/.Private (use a link).

But the second drive's partition would have to be mounted already. Having it in /etc/fstab should mount it automatically at boot time (unless the "noauto" option is present).

Or you could just click on the partition's name in most file managers after logging in to mount it, but then the eCryptFS private folder wouldn't be automatically decrypted/mounted on login, and you'd have to call ecryptfs-mount-private yourself and probably re-type your login passphrase, or the wrapping passphrase.


The best solution that worked for me (in Ubuntu 16.04LTS) is to change the value of wifi.powersave located in /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf from 3 (enabled) to 2 (disabled).

This effectively makes the effects of sudo iwconfig <interface> power off permanent.

Source: Power management for wireless unable to turn off in Xubunu 15.04 Vivid


I guess the terminal keyboard is set to default settings, meaning the US keyboard, and you use some special keys in your password. Use a picture of the US keyboard end enter your password.

Link to Pics of US Keyboard

Update: Just comes to my mind....

Try to boot an older kernel in 'Advanced options for Ubuntu', if there is one available (press left < shift > key right after your computers BIOS/UEFI screen, if you don't see the GRUB boot menu). Your system may boot normally then.

To configure your console keyboard, once logged in...

Changing TTY keyboard layout on a server?


Is it possible to make bootable USB for Ubuntu Touch?

The Ubuntu Touch system isn'ẗ designed for PCs yet. Currently, it supports phones and tablets. Hopefully, some time this year, it'll get support for a desktop interface as well. I'd imagine some time after that, we'll get images for PCs.

Of course, Ubuntu Desktop currently supports touch screens, if that's what you're after.


Yes, # in front of a line in cron comments it out.

It will also comment out anything following it if it's part way through a line.

You do NOT need to restart cron to make changed crontabs take effect, otherwise any user that changed their own crontab would need root access to restart cron to make their own crontab take effect.

What you DO need is for cron to re-read your crontab, which you can do in various ways.
The safe way to edit your crontab is to do list it into a file with:

crontab -l > my.crontab

Then edit the file (in this case: my.crontab) and then load the file back into cron:

crontab ./my.crontab

If it's only a small edit that you're making, you can do it inline with:

crontab -e

which will open your crontab in the editor you have set in your $EDITOR environment variable.

Both of these methods will check the syntax of your crontab, load it, and get cron to re-read it. Where you get into trouble is when you try editing the crontab file directly on disk and then don't do anything to tell cron to re-read it.


Deja-Dup Backup Failed - Invalid data - SHA 1 hash mismatch for file

I have had this problem recently myself. I have not found an 'ideal' solution. The safest option is to discard the faulty backup and start a new one, as you mention in your comment.

Other answers to similar problems suggest workarounds for restoring files by using previous backups or ignoring the files in the corrupted volume, but this is clearly sub-optimal, not to say fiddly to achieve in practice. However, this does not help a failed backup.

Trying to force a full backup of the files in the failed volume is counter-productive, because the next incremental backup is huge, covering all the other files; you might as well delete the failed backup and start again.

I did find a way to implement a patch of the failed part of the backup. Here is the recipe:

Find the affected files by noting the volume number, and then check against the volume number in the manifest file.
Touch the affected files (touch -m /name/of/file).
Do an incremental backup.

The incremental backup will contain the affected file(s), plus any others that changed in the interim, and the SHA1 error is no longer reported...  except by verification (see below).

I tested this using duplicity directly rather than the deja-dup gui, because it enabled me to have a bit more control, and to do additional things like verify the backup (duplicity verify /target/directory url:///for/backup/archive). It does not remove the original SHA1 problem, but mitigates it by providing a way to restore the files in the presumably corrupted backup volume(s).

By the same token, I think if you are serious about backups, you need to forget deja-dup and use duplicity directly instead, because backups without verification aren't worth anything. I discovered that the hard way, having used deja-dup for almost two years, before a failed backup made me realize that actually my backup schedule was a house built on sand; when I checked the external drive I had been using, about 5% of all the backup files were unreadable. Since then, I have found that using shell scripts with duplicity isn't so hard, and once it is set up it is very easy.


TCP retransmission to one server, only on ubuntu

Try to set less MTU on your interface:

sudo ifconfig eth1 mtu 1492

I had the same problem and MTU size change allowed to fix this.


Fixed it!

Change the relative path to an absolute path in your pyqt4 designer code.

for example, change from:

icon.addPixmap(QtGui.QPixmap(_fromUtf8("../liumimages/path3194.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)

to:

icon.addPixmap(QtGui.QPixmap(_fromUtf8("/home/ikt/code/yaum/liumimages/path3194.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)

Done!


Error processing archive while trying to upgrade

You have two ways:

1) Clean way is to remove conflicting package:

sudo apt remove crda
sudo apt upgrade

2) Unclean way is to force overwriting:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb
sudo apt upgrade

If it helps, upvote https://askubuntu.com/a/176132/486734 and https://askubuntu.com/a/433510/486734, once you have enough reputation.


bash - can shellcode be made from a bash script?

You can use programs from metasploit to generate shellcode.

Here's an example using msfpayload to do so:

http://www.hacking-tutorial.com/tips-and-trick/generate-a-shellcode-using-msfpayload-metasploit-command-line-instance/


How to run a terminal command after login (in Ubuntu Touch)

Ok, I found a way to to do that. I will post it here, maybe someone else want it too.

First, in /home/phablet/Documents, I created a file called myfile.sh with this content:

#!/bin/sh
gsettings set com.canonical.Unity8 usage-mode Windowed
exit 0

After that, I created another file in /home/phablet/.config/upstart called jobi.conf (didn't thought about a better name) with this content:

description "my script"
start on started msyncd
exec /home/phablet/Documents/myfile.sh

After that, I just restarted to test it, and it worked.


Which user agent string does the Web browser on mobile devices have

The current default UA string is of the following form:

Mozilla/5.0 (Ubuntu; <formFactor>) WebKit/<webkitVersion>

where <formFactor> is one of Mobile, Tablet or Desktop, and <webkitVersion> is the version of WebKit rendering engine (currently 537.21).

So on a phone, the current default UA string is:

Mozilla/5.0 (Ubuntu; Mobile) WebKit/537.21

This default UA string is deliberately short, the rationale is based on Mozilla’s B2G UA string research.

A number of websites and web applications are known not to play well with this default UA (web sites these days do a lot of crazily complicated server-side UA parsing to infer platform capabilities and serve customized content accordingly).

To overcome those issues, the Ubuntu Touch browser embeds an override mechanism that allows overriding the default UA for a given domain name (usually adding an Android token gets us the right content, although it often comes at the price of annoying prompts to install native android applications, which of course doesn’t apply to the platform).
This mechanism is a short-term workaround.
The proper long-term solution is evangelism, whereby users and developers get in touch with website authors to request that their pages and applications recognize our default UA string and serve adequate content.

Note that in a near future we’ll be switching from QtWebKit to Oxide (a thin layer on top of the Chromium Content API) for the rendering engine, meaning the rendering and capabilities will be virtually the same as Chrome’s. To reflect this and to enhance compatibility with existing websites, we will need to update the default UA string (it will be closer to Chrome’s default UA on devices).


solved

Thanks Tony Lancer.

I reinstalled pulseaudio with :

sudo apt-get install --reinstall pulseaudio

My sound is working now.

If I use pulseaudio now I get:

E: [pulseaudio] pid.c: Daemon already running.
E: [pulseaudio] main.c: Ha fallado pa_pid_file_create().

Do not know if that's a problem.

Thanks


Move files that are different to another folder

Assuming you have a directory structure like:

music
  |- source
      |- foobar
      |- spamegg
      |- ...
  |- dest

and you need to move all .mp3 files under any level of subdirectories of music/source/ to music/dest/ only if the file not already present in music/dest/.

If that so, running all commands below from music/ directory:

Create an array containing all .mp3 files under music/source, recursive operation:

shopt -s globstar  ## Enables recursive search
source_files=( source/**/*.mp3 )

Do the same with the music/dest/ directory and strip off the directory portion from file names:

dest_files=( dest/**/*.mp3 )
dest_files=( ${dest_files[@]} )

Iterate over the source files and check if the file already exist in the destination, if not mv the file to music/dest/:

for i in "${source_files[@]}"; do [[ ! ${dest_files[@]} =~ ${i##*/} ]] && \
         echo mv -i "$i" dest/; done

echo is for doi9ng the dry-run, if satisfied, just remove echo:

for i in "${source_files[@]}"; do [[ ! ${dest_files[@]} =~ ${i##*/} ]] && \
         mv -i "$i" dest/; done

Scripted form:

#!/usr/bin/env bash
shopt -s globstar
source_files=( source/**/*.mp3 )
dest_files=( dest/**/*.mp3 )
dest_files=( ${dest_files[@]} )
for i in "${source_files[@]}"; do [[ ! ${dest_files[@]} =~ ${i##*/} ]] && \
     mv -i "$i" dest/; done

You can obviously use absolute paths, change the relevant paths to meet you need.

Caveats:

All source and destination .mp3 files are put into arrays, needs bit of extra memory, should not be a problem on modern systems
The membership test takes time, again should not be noticeable on modern systems

Example:

music$ tree
.
├── dest
│   ├── 1.mp3
│   ├── 2.mp3
│   ├── 3.mp3
│   ├── 7.mp3
│   ├── 8.mp3
│   └── 9.mp3
└── source
    ├── bar
    │   ├── 10.mp3
    │   ├── 6.mp3
    │   ├── 7.mp3
    │   ├── 8.mp3
    │   └── 9.mp3
    └── foo
        ├── 1.mp3
        ├── 2.mp3
        ├── 3.mp3
        ├── 4.mp3
        └── 5.mp3

music$ shopt -s globstar

music$ source_files=( source/**/*.mp3 )

music$ dest_files=( dest/**/*.mp3 )

music$ dest_files=( ${dest_files[@]} )

music$ for i in "${source_files[@]}"; do [[ ! ${dest_files[@]} =~ ${i##*/} ]] && echo mv "$i" dest/; done
mv source/bar/10.mp3 dest/
mv source/bar/6.mp3 dest/
mv source/foo/4.mp3 dest/
mv source/foo/5.mp3 dest/

music$ for i in "${source_files[@]}"; do [[ ! ${dest_files[@]} =~ ${i##*/} ]] && mv "$i" dest/; done

music$ tree
.
├── dest
│   ├── 10.mp3
│   ├── 1.mp3
│   ├── 2.mp3
│   ├── 3.mp3
│   ├── 4.mp3
│   ├── 5.mp3
│   ├── 6.mp3
│   ├── 7.mp3
│   ├── 8.mp3
│   └── 9.mp3
└── source
    ├── bar
    │   ├── 7.mp3
    │   ├── 8.mp3
    │   └── 9.mp3
    └── foo
        ├── 1.mp3
        ├── 2.mp3
        └── 3.mp3


How can I exclude an application from Dash search?

To move the Steam Launcher out of /usr/share/applications, and place it into /opt, use the following command:

sudo mv /usr/share/applications/steam.desktop /opt/

The launcher should still work if you navigate to /opt and doubleclick it. An update of Steam will probably put a new launcher into /usr/share/applications.

For more info on what mv does, see man mv.


See all the file selection panels that read (None)? I think you need to set the client user credentials before you can finalize the VPN connection configuration.


Thunderbird in 18.04: "Configuration could not be verified - is the username or password wrong?"

Do you enable 2FA on your email account? If you enabled 2FA you need to recreate a new "app specified password" from your email provider ex. gmail


I had the same problem this morning.

This guys answer fixed it for me.

http://www.failover.co/blog/plesk-11-bind9-and-ubuntu-12-04-apparmor-problems


From .bashrc file in your home directory, we have these aliases:

# some more ls aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

la is just an alias of ls with just the -A option.

From man ls

ls -alF

   -a, --all
          do not ignore entries starting with .

   -l     use a long listing format

   -F, --classify
          append indicator (one of */=>@|) to entries

ls -A

   -A, --almost-all
          do not list implied . and ..


How to repair corrupted fat32 sd card superblock

I had the same problem while preparing to boot my raspberry pi. Therefore, I copied the Image- file (raspbian) via dd command on the SD- Card. However, I forgot one significant detail: Before using the above mentioned command I did not unmount the directory I wrote the files to (i. e. the directory of the SD- Card), so there was still a mount-point to the SD- directory while writing the image-file via dd command. As a consequence I received the same error-message when I tried opening the files on the SD- Card. Maybe the FAT32- partition is broken and your data is lost. Sorry to say, but I had to format my SD- Card, write the image file to the SD- Card again (before I did that I unmounted the directory to which I wrote) and as a consequence I could access the data and it worked out well. If you have any further questions please let me know.


Installing cursors is really simple.

Install Tweak Tool with Software Centre or type commands:

$ sudo apt-get install gnome-tweak-tool

next you should copy folder with downloaded cursor theme.
to do, you need be root:

$ sudo nautilus

navigate to your downloads folder and look for archive with cursor,
open archive and copy folder into /usr/share/icons

you are done, now start tweak tool to change your cursor:

$ gnome-tweak-tool


Replaced Window7(4drives) with Ubuntu13.04(empty) Lost all data, TestDisk did not help

As a lot of people, you deleted all the NTFS partitions with this options. See all this answers to people that asked here as you:

Did replacing Windows with Ubuntu completely remove Windows?

Replaced Windows 7, but where did my old files go?

How can I recover my data after replacing Windows with Ubuntu?

How do I recover my accidentally lost Windows partitions after installing Ubuntu?

I only did this search in Ask Ubuntu: https://askubuntu.com/search?q=windows+7+replace

Hope you recover your files.


How can I specify a custom icon for different folders in Unity?

The most basic version of a .desktop file to open a directory:

[Desktop Entry]
Name=Files
Exec=nautilus /path/to/your/directory
Icon=/path/to/your/icon
Type=Application

So the type still should to be set to Type=Application.

You can make a .desktop file do anything, just by setting the right command in the Exec= line. The command to open a folder with nautilus is

nautilus /path/to/folder

Look inside the file /usr/share/applications/nautilus.desktop. It says:

Type=Application

and

Exec=nautilus --new-window %U

Note

Be aware of the fact that the starter is not your folder, like the starter to your script is not your script, it only contains the command to open it.

Alternative

Having said that, there is a much easier way to give a folder another icon:

right click on the folder > properties
click on the icon
browse to the icon of your choice, set it

Done:


Python reinstallation --enable-unicode=ucs4 and lxml undefined symbol: PyUnicodeUCS2_DecodeLatin1

I solved it.

I deleted manually the directory containing the python dist which causes the error.

sudo rm -R /usr/local/lib/python2.7

Then I reinstalled python, scrapy and django manually from a source.


How to completely reinstall gnome-terminal?

Install dconf-editor to reset the value for a custom command that you defined in your profile.

In dconf-editor, you will find the setting in a folder for your profile. The folder has a random name so will be different for everyone and looks like

org.gnome.Terminal.Legacy.Profile:/org/gnome/terminal/legacy/profiles:/:a4dcd4ae-1231-4f8k-b439-d804a4d674c2/

In that folder, you will find a setting custom-command. Click it and in the new screen that appears, turn the "default" swith on. The value should now revert to ''. If not, then delete the contents in "Custom value" (which in your case should read "reset").


Ubuntu 18.04.3 64bits not booting after restart

Here's are the updates for your Nvidia video card, and your BIOS.

NVIDIA:

Install version 430.09 of their driver.

https://www.geforce.com/drivers

BIOS:

You have BIOS version BHCN21WW. Current is BHCN35WW.

https://pcsupport.lenovo.com/us/en/products/laptops-and-netbooks/legion-series/legion-y540-17irh-pg0/downloads/ds539700

Note: Backup your important data before a BIOS update.

Note: Lenovo may be able to update itself from within the current BIOS

Note: Watch this video on how to do this without Windows... https://www.youtube.com/watch?v=WqDUCfU-e-A


What type of Ubuntu can be installed on my netbook?


Your MySQL server is not configured for access over the network, which is the default, for security reasons. Please see the help in the configuration file to configure the service for access through the network.

The reason the game server does not see the MySQL server is that the game server tries to access the database over the network; it does not try localhost. If you did mysql -h [ip-address] -u root -p you would not get a connection either. See here.


Ubuntu 16.04 - Wi-fi , IP is on a network different than my gateway

Finally managed to figure it out, feeling pretty dumb.

nmcli device

gave as result: wlp2s0 Unmanaged.

Either:

sudo nmcli device set wlp2s0 managed yes
sudo nmcli device set wlp2s0 managed on
sudo nmcli device set wlp2s0 managed true

I don't know which one did the trick, but it works now.


Build Cronjob File Timestamp Statement With Local Timezone Shift

Did some experimenting with the date command from within the root crontab. From what I observed the date command run from crontab does not recognize all of the Timezone designations listed at:

en.wikipedia.org/wiki/List_of_tz_database_time_zones

Rewriting the cited command in the original post with a UTC based timezone designator as opposed to the Country/City format designator.

*/15 * * * * /usr/bin/wget --convert-links --output-document=/home/user/Firefox/News-Headlines-$(TZ=UTC4 date +\%Y-\%m-\%d_\%H:\%M:\%S).html www.news.tld

NOTE: Whether GMT or UTC is used the results are the same.

Results in the following timestamped file name timestamped for -4 UTC, despite use of the timezone designator UTC4 = UTC +4.

# date
Tue Apr 11 18:34:36 UTC 2017

News-Headlines-2017-04-11_14:34:36.html

While this solution does work, it is not understood why using timezone designator UTC4 = UTC +4 results in a UTC -4 timestamp.

Experiment

Using the UTC -4 designator results in the opposite:

$ wget --convert-links --output-document=/home/mark/Downloads/Firefox/FoxNews-Headlines-$(TZ=UTC-4 date +\%Y-\%m-\%d_\%H:\%M:\%S).html www.foxnews.com

# date
Tue Apr 11 18:50:08 UTC 2017

News-Headlines-2017-04-11_22:50:08.html

This timestamp is 4 hours ahead of UTC with a UTC-4 = UTC -4 .  It is not understood why using timezone designator UTC-4 = UTC -4 results in a UTC +4 timestamp.


Alt+F10 to maximise window in 12.04 with gnome-classic no effects?

Navigate to Applications > System Tools > Preferences > Control Center >> Keyboard >>> Shortcuts (Tab) and choose 'Windows'. Now click on 'Maximize Window' and press 'Alt+F10' to set the shortcut.

There are a lot of useful shortcuts that can be set here including 'Alt+F4' for 'Close window', 'Alt+F9' for 'Minimize window', 'Super+D' (Super stands for the Windows key on most keyboards) for Navigation > 'Hide all normal windows' for Show Desktop and finally 'Alt+Tab' for Navigation > 'Switch Applications'.


Your lightdm is corrupt probably.
Press Ctrl + Alt + F1 to enter the CLI mode and log into it.
you can try
sudo dpkg --configure -a
If it doesn't work, sudo apt-get install gdm and set it as your default manager (more of a workaround)


Getting all the bugs associated with a user using launchpadlib

Launchpad itself uses in-process Python APIs, not the web API. However, you can use the searchTasks() web API

lp.people['lifeless'].searchTasks()

would find all bugs related to me, for instance.


How to enable multitouch for touchpad and touchscreen on ThinkPad X1 Carbon 3rd gen?

Touchegg works for me -- however apparently not on Firefox or Chrome, only on Chromium, do the multi-touch gestures work for me (out-of-the-box).

On Chromium, I can one-finger drag (on-screen touch, not touchpad), two finger scroll (touchpad), pinch and zoom (on-screen touch).

See: Firefox bug, https://askubuntu.com/a/664898/67349

To fix chrome, I had to follow both answers at Chrome + Touchscreen + Unity (14.04)

First,

Navigate to chrome://flags/#touch-events and
set Enable touch events Mac, Windows, Linux, Chrome OS to enabled.
I also set "Enable pinch scale. Windows, Linux, Chrome OS" to enabled (instead of default).

Second, I needed to start google chrome and tell it which device.

$ xinput list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ ELAN Touchscreen                          id=9    [slave  pointer  (2)]
$ google chrome --touch-devices=2

My Setup

ubuntu 14.04
lenovo 2nd gen x1.
Chromium: Version 43.0.2357.130 Ubuntu 14.04 (64-bit)
Chrome: Version 43.0.2357.134 (64-bit)
Firefox: 40.0

My ~/.config/touchegg/touchegg.conf if it's useful:
http://pastebin.com/qGexA1gB


I have a larger screen attached to my laptop

I have this, too, with my laptop. Here it suffices to just move the mouse and the 2nd screen goes out of sleep.


Grub can't find device on boot resulting in Grub Rescue

Most likely your problem is that the grub you are running is the old one on the HDD, instead of the new one on SDD. Check that the BIOS boot order has the SDD before the HDD.  If that order is not available, install grub again to the HDD.


Ubuntu 14.10 showing less space in "home" folder than it should

Open a terminal window (Ctrl+Alt+T) and run df -h. The -h comes from human readable, to print sizes to traditional size unit.
For me for example above command print:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda6        14G  4.3G  8.9G  33% /
udev            989M  4.0K  989M   1% /dev
tmpfs           399M  864K  398M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            998M  752K  997M   1% /run/shm
none            100M   36K  100M   1% /run/user
/dev/sda1       183M   87M   86M  51% /boot
/dev/sda7       168G   46G  114G  29% /home

That because is a partition. The canonical way to find folder size is (-s for summary):

du -hs /home/myusername

BTW, if you need to make some free space the best way I found is to use ncdu (ncurses disk usage viewer) which it is like a Disk Usage Analyzer (baobab) alternative for command line.


How to setup selendroid in ubuntu 14.04? Cannot execute selendroid script. ANDROID_HOME not found error shown in eclipse console

Did you try echo $PATH? Type this command on your terminal(I am using Ubuntu 16.0.4). After that, you should find Android SDK directory included like:

/home/<your-username>/Android/Sdk/tools:...

If so is the case, then your ANDROID_HOME has been set correctly otherwise it needs to be set. Set the android home variable once again and check if it appears in the result.