List (Head) packages available from specific ppa by command-line

I've written a function that grabs the Packages list for the repo that would be used on the current release/architecture. It's fairly simple and could be written as a single line... It would just be a very unwieldy line.

function lsppa {
    # expects one argument in the form of ppa:nilarimogard/webupd8

    USAGE="lsppa <ppa:user/ppaname>"

    if [[ "$#" != "1" || ! "$1"  == *"ppa"* ]]; then
      echo "$USAGE"
      return
    fi

    REPO="${1/ppa:/}"
    CODE="$(lsb_release -cs)"
    ARCH="$(dpkg --print-architecture)"
    URL="http://ppa.launchpad.net/$REPO/ubuntu/dists/$CODE/main/binary-$ARCH/Packages"

    awk '/^Package:/ {print $2}' <(wget -qO- "$URL")
}

So after you paste that into a terminal, you can call it like lsppa ppa:nilarimogard/webupd8 and it returns a list as ordered by the packages list.

In this case it might be non-alphabetical and could even contain duplicates (different versions) so you might  (you could pass it through sort -u if you want to call:

lsppa ppa:nilarimogard/webupd8 | sort -u | less


Ubuntu 20.04 Graphics freezes for 1-2 seconds every 5 seconds

TL;DR:
Problem may be caused by the top bar. I solved the issue by installing gnome-tweaks.
$ sudo apt install gnome-tweaks

I was experiencing your problem until a few minutes ago. My experience was visually identical to your recorded screencasts - my computer regularly became unresponsive except for the mouse cursor.
I managed to entirely solve the problem by installing gnome-tweaks. I didn't even have to open the application.
I was unsure at first why this solved the problem, so I investigated further. Turns out that I can recreate the freezing problem by opening the gnome-tweaks app, navigating to "Top Bar", and then enabling Seconds under Clock. The issue is similar to experiences in this thread, where the top bar may freeze the OS when it updates.
I have a feeling my solution may not fix your issue, unfortunately. Your screencasts show a top bar clock without seconds already. However, I do notice that your top bar does include Skype in all of your recorded screencasts. The next time that you experience the problem, I would exit Skype to see if it's the cause of the issue.
Hopefully this helps.


Installing theme, Problems with icons ubuntu 12.10

I had a similar problem with Moka icons. I had to adjust the permissions for the files before copying them in /usr/share/icons, but then, even though the permissions were ok, i also had to copy the icon folder to .icon also. Try doing everything i posted, and see if it works.


I fixed the problem.
Temporarily give the partition 20gb using gparted or kde partition manager.
gparted is better for me.
start the usb disk and open a terminal
CTRL + ALT  + T

start the installer manually with -b parameter to exclude the grub install
ubiquity -b

Install into your 20gb drive using the normal or manual option.
You should only be doing this with the minimal installation option and intentions to keep a lean system.
Before booting your new system (which you cannot do anyway), load up your main Linux system and restore your drive to 12gb using gparted.  You will get warnings that your system might not boot, but since it is not added to the grub startup menu yet, it does not matter.  It is also a secondary system you have not used yet anyway.  Go ahead.
While in your main system type the following in terminal.
sudo udpate-grub

You can now restart and your new partition will be seen in the grub startup menu.  Boot your new installation and do whatever you want accordingly.


How do i view and access my windows 7 laptop from my ubuntu desktop?

The graphics card connectors are just outputs for the video signal. You can only plug a monitor (or any display) to them.

You can't use them as inputs for another source (eg: another computer), let alone take over the mouse and keyboard.

You have the following options:

Buy a KVM switch. It lets you switch one keyboard/video/mouse between multiple computers
Remote desktop with VNC, so you can always keep a window to your other PC
Invest in a router/access-point and go with synergy (if it doesn't work with the laptop in hotspot mode)
If your monitor has multiple inputs, connect the two computers to the monitor and switch from one another


I can't print in the draft mode with my HP Deskjet 1660

When will hplip support ubuntu 12.10?
Here is one of the answers:

Hi,
Ubuntu 12.10 will be supported in our next release of HPLIP which migh happen in couple of weeks time or so.
As a temporary workaround, please

Download HPLIP-3.12.10a (e.g to ~/Downloads)
Open Terminal and go to ~/Downloads/hplip-3.12.10a
Open ~/Downloads/hplip-3.12.10a/installer/distros.dat and then replace "12.04" with "12.10"
./install.py (this will start the auto installer)

=> Reconfigure print queue with the commands in the terminal mentioned below.
=> system-config-printer (remove all print queues)
=> su -c "hp-plugin" (This will download right plugin)
=> hp-setup (It should not be run in a root mode. This command is adding print queue, make sure you select ppd name having "-ps" or "hpcups" substring)
=> Try printing now.

Sanjay Kumar (sanjay-kumar14)


Trying to find files beggining with a number

find . -type f -regex ".*/[0-9]*"

The regex is done on the whole path so you need to include the .*/.
sudo find / -type f -regex ".*/[0-9]*"

if you want it for the whole filesystem.


I noticed that the package was in the /app-install/ library, so I used the Upgrade command, everything was installed and I was able to login.

sudo apt-get upgrade steam -f


"Could not get screen information" error

I found the culprit. It's a gnome bug or intentional design by gnome developers.

It doesn't communicate with compiz.

So

mutter --replace

fixed it.

For more info :

https://bugzilla.redhat.com/show_bug.cgi?id=1040062


Problem with connecting mobile broadband in Ubuntu 14.04

Solution that works for me:

First stop modemmanager by sudo stop modemmanager.
Then plug net-setter & wait for 20-30 seconds.
Then start modemmanager by sudo start modemmanager

Now when modem (net-setter) detected ; it is stable hence, after connecting, I get stable connection until disconnect or unplugged!

But it is not permanent solution as I have to follow above method each time to get stable connection. So, any other solution will be appreciated.

Note that : Directly restart modemmanager by sudo restart modemmanager not helpful for me.

Additional info: Actually there is no need to start/stop service network-manager entirely. Only go for modemmanager.


I cannot install java from the software center

Try opening a Terminal window (Ctrl+Alt+T) and running:

sudo apt-get update

You are trying to download version openjdk-7-jre_7u15-2.3.7-0ubuntu1~12.10_amd64.deb, but when you check here LINK, closest available version is openjdk-7-jre_7u15-2.3.7-0ubuntu1~12.10.1_amd64.deb, so it looks like you have to refresh apt package list. I hope this helps.


I would install it on a USB device. It's really easy to do, using the instructions at http://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install (instructions for DVD are listed there as well)

Translation (Google Translate)

Vorrei installarlo su un dispositivo USB. E 'davvero facile da fare, seguendo le istruzioni a http://www.ubuntu.com/download/desktop/try-ubuntu-before-you-install (istruzioni per il DVD sono elencati anche lì


Shotwell uses the correct date in events but the wrong one in the Pictures folder

This was a known issue and was fixed in Shotwell 0.11.

Bug report is here:
http://redmine.yorba.org/issues/3427


df only cares about (mounted) filesystem, not any raw disk/partition.

If you follow the standard procedure to make a raw disk available to be used by userspace processes i.e. partition the device /dev/sda, and then format them using desired filesystem, and mount the filesystems, then the filesystems would obviously be shown by df.


Open a Terminal (click Dash and search "terminal") and type the command

sudo fdisk -l

If you see a NTFS partition, that will be your Windows partition. It should also then show up in gparted or the included disk utility, from there you "should" be able to mount it and access your files.

Is there is a slight chance you erased it when you installed 12.04?


First of all make sure that /home is accessible by sftp group (because by default it isn't).

If the sftp group doesn't work, make sure you're actually logging in with a key, you can first confirm it by using ssh from the terminal (or putty on windows)
ssh -vvv login@hostname.com

by default, as long as you're not using root account, you should be able to login without any issues.

the most interesting keys for basic setup are usually:
- PubkeyAuthentication to be able to login with keys (also needs UsePAM yes)
- PermitRootLogin if you want to login with root account
- PasswordAuthentication to allow/disallow using password auth


I had the same problem yesterday.

Use this command.
Open terminal using ctrl+alt+T and run this command :-

amixer -c 0 -- sset Master -24dB

You should be able to hear then.


The information on the following page was very helpful when I had a failing disk recently:

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

In short, you will need enough space to store an image of the entire file system and then make a copy with ddrescue.  This program will continue reading from the disk in the presence of errors, and retry failed reads.

Once you've got an image of the file system, you can then use other tools to recover your files without them failing due to read errors.


What is this strange shell? I want to desinstall but don't know its name

That is the byobu which is a terminal enhancement that is installed.  More information about it can be found here.

To remove byobu from your system, type in the following at a terminal window:

sudo apt-get remove byobu


Ubuntu 13.04 doesnt want to start upgrade

You can start an upgrade using update-manager -c or --check-dist-upgrades:

  -c, --check-dist-upgrades                              Check if a new Ubuntu release is available


Create a file with the the .desktop extension and make it contain something along the lines.

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=mspaint
GenericName=Microsoft Paint
Comment=Microsoft Paint
Type=Application
Terminal=false
Categories=
Exec=/media/Windows/WINDOWS/system32/mspaint.exe
Icon=/usr/share/pixmaps/apple-green.png
Path=


Choose "something else".
Select your sda5 as your / partition (mount point) and click to format it.
Select sda6 partition to be used as swap.

That will install Ubuntu the same way it was installed before.


How do I reset the network stack as if from a reboot?

What seems to be working so far is:

sudo modprobe -r wl
sudo modprobe wl
sudo service network-manager restart

I don't know if this is a full-stack restart, but it seems to do the trick in my case

various cryptic commands that helped in discovering this sequence were:

iwconfig
nm-tool
ip link
sudo lshw -C network
lspci
sudo service networking restart


The following instructions for installing the latest ALSA packages via the DKMS .deb installer worked for me on the Acer 5520.

https://wiki.ubuntu.com/Audio/UpgradingAlsa/DKMS

Oneiric 11.10


What does "--no-nvram" do while installing grub?

With BIOS, the motherboard stores the order of physical devices to boot from in non-volatile memory (NVRAM) so it survives a reboot. This ensures when you turn the machine on the motherboard still boots devices in the order you (or the factory) configured it to. The BIOS will then try executing the MBR in the first logical block address (LBA) of each device until one of them works. If you manually select a device to boot during startup it will do as you ask and attempt booting from the first LBA of that device instead.
Assuming a disk is formatted with GPT, when the motherboard uses UEFI booting the MBR doesn't need to contain a bootloader (or anything for that matter). Instead, the disk contains an EFI System Partition (ESP) which is essentially a FAT-formatted partition containing bootloader code stored in files. The FAT filesystem may also contain other files needed by the bootloader (e.g. logos and backgrounds used by a splash screen during the boot process).
For UEFI booting on a UEFI motherboard it is assumed the disk is part of the system so when you grub-install, part of that installation process should be placing an entry into the motherboard's NVRAM containing the path of the bootloader within the ESP (see section 3.5.1 Boot via the Simple File Protocol of the UEFI spec). This entry can then be set to the default, or just presented as an option. For more information on EFI Boot Loaders I strongly advise reading Rod Smith's Managing EFI Boot Loaders for Linux.
For a device which is not normally attached to a motherboard (i.e. USB hard disk) it does not make sense to store this entry in the motherboard's NVRAM as the device might not be there during most boots. I believe the --no-nvram option tells the grub-installer not to modify the motherboard's NVRAM for this purpose.
Furthermore, if a motherboard is instructed to boot from a removable device for which it has no boot entry in its NVRAM, UEFI defines a default path for it to try booting from (see section 3.5.1.1 Removable Media Boot Behavior of the UEFI spec). The path, relative to the root of the ESP is \EFI\BOOT\BOOT{architecture}.EFI with the following {architecture}s.

32-bit → IA32
x64 → x64
Itanium architecture → IA64
AArch32 architecture → ARM
AArch64 architecture → AA64

I believe the --removable option tells the grub-installer to use this path, rather than its preferred path is probably necessary if not modifying the motherboard's NVRAM otherwise one would need to manually specify the bootloader after manually selecting the removable device.
Note: I say "believe" above because I haven't tested this.
Edit:
I realise none of this explains why your motherboard won't allow GRUB to modify its entries. But hopefully that explains why that switch helps. The error message you provided suggests all of the motherboard's boot entries have been populated and, quite reasonably, it isn't appropriate for grub-install to decide which of your boot entries to overwrite. You could try using efibootmgr to display your boot entries and delete some that you don't need. Rod Smith's answer to this question should show you how.


According to dpkg -S libGLU.so.1, you need to install either ia32-libs or libglu1-mesa package:

$ dpkg -S libGLU.so.1
ia32-libs: /usr/lib32/libGLU.so.1
ia32-libs: /usr/lib32/libGLU.so.1.3.070701
libglu1-mesa: /usr/lib/libGLU.so.1.3.070701
libglu1-mesa: /usr/lib/libGLU.so.1

I'd recommend you to go with libglu1-mesa, because ia32-libs is combined library package, and it's quite a big.

In other words:

sudo apt-get install libglu1-mesa


Ubuntu 16.04 Installed on RAID 0 with mdadm followed by boot repair still fails to boot

I had a similar problem. When booting check the boot order (f8 or f10 my memory is a bit flaky). I found that the boot order had changed from the drive with the OS to one of the Raid drives. I have my OS on a separate disk from the raid array. if it has changed, you will need to change to the drive that the OS is on.
Good luck


I discovered that my daughter had accidentally turned off the touchpad! A nice little feature, a discrete little button, on this old laptop that's persistent from one session to the next.

So... there's one solution. Kind of like plugging in ones computer... :-/


Citrix - Unable to use Skype for Business audio on Ubuntu 16.04 LTS

Go to /opt/Citrix/ICAClient/utils/ and run:sudo ./hdxcheck.sh

You will get a summary of the HDX pre-reqs and that will also show you what you need to install.  Likely you are missing the gstreamer0.10-plugins-base and gstreamer0.10-tools.

You can check those two with: dpkg --status gstreamer0.10-plugins-base gstreamer0.10-tools | egrep "Package|Version|Status"


Uninstall bumblebee first and install the following:

sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime


Create CMYK PDF from Inkscape SVG with 100% Magenta "cutkontur"

Just follow the guide in

https://www.klaasnotfound.com/2016/06/05/creating-cmyk-prepress-pdfs-with-inkscape-and-scribus/

Save in Inkscape
Set Color Management in Scribus
Open File
Edit Colors
Convert Magenta to CMYK pure Magenta and set the color name "cutkontur"


Are the default keyboard shortcuts changeable and does the shortcut help change accordingly

Keyboard shortcuts are changeable but the shortcut keys showing in the keyboard shortcut overlay are not dynamic. Meaning that if you change the shortcuts, the change will not be reflected in the overlay.

All of the keyboard shortcuts are currently hardcoded in Unity and any change in the default set of keyboard shortcuts will then have to be updated in the overlay.

If I am not wrong, you can modify the shortcut overlay by editing the source file

plugins/unityshell/src/unityshell.cpp

and then manually compiling Unity.

Can I modify unity keyboard shortcut overlay?


Are the advantages of having /home on a separate partition actually advantages?

In your home partition are all your settings files and personal files stored. The hidden settings files can be shown in Nautilus by pressing Ctrl+h. So when reinstalling Ubuntu, with a separate home partition, you will keep your Firefox settings, text editor settings, ssh keys, photos, documents, etc. But yes, you will need to reinstall the actual programs.

Another advantage may be that you have a small SSD (60 GB perhaps) for the OS, and then you can have your home partition on a separate, larger mechanical HDD, where the speed isn't as essential and space is more needed.


Making multiple pendrives bootable, using command-line

the dd command can pipe its output do several devices in one run through tee like discribed here:

https://joshhead.wordpress.com/2011/08/04/multiple-output-files-with-dd-utility/

TLDR!:

sudo su
dd if=inputfileimage.bin | tee >(dd of=/dev/sdc) | dd of=/dev/sdh

would write the file "inputfileimage.bin" to the devices sdc and sdh in a root console...

be carefull - dd won't ask if you really chose the right devices - you must be sure that in this example sdc and sdh should be completely wiped!


Do I remove install disk whenasked to restart

If you do not want to change the boot order in Bios, i.e. you keep DVD as the first, so YES, remove the installation media. However next time you turn your machine on with any bootable media inserted it will load from the DVD/CD.


The following steps will remove a given kernel along with its drivers drivers, and lets the package manager know that you don’t want it again if you do an update. You should remove the specific broken kernel and it’s headers, don’t remove the super package linux-generic this is the package that Ubuntu uses to upgrade the kernel and headers when they become available. If you remove it you wont get kernel updates automatically and will have to specifically run apt-get to get them.

Open Terminal (if it’s not already open)
List the available kernels:
dpkg -l | grep linux-image

Remove the kernel(s) you don’t want:
sudo apt-get purge linux-image-5.8.0-53-generic

Remove the headers as well:
sudo apt-get purge linux-headers-5.8.0-53-generic

Reboot

On reboot, hold Shift down during boot and confirm that the broken kernel is not a choice in the grub advanced settings.
Because you haven't removed the linux-generic package itself, Ubuntu will still attempt to get a new kernel when one is available, just not the one you specifically purged.
Thats all there is to it


So after removing all of the drivers and cleaning out dkms, I went into my router.  I had both the 2.4GHz and 5GHz bands hidden.  I left the 2.4GHz band hidden but unhid the 5GHz band.  I rebuilt the driver and it worked like a charm.


Ubuntu 14.04 NVidia proprietry 346 drivers

sudo apt-get install nvidia-346 nvidia-settings nvidia-prime
sudo reboot

Finally. This works for me after 2 days searching.

ThinkPad W530
Ubuntu 15.04
K1000M


Cannot connect to internet with ubuntu 11.10 wired connection

dhclient is responsible for DHCP. Since, it runs forever, you couldn't get an IP address; hence, no connection.

For more information, use man dhclient.

Since, the problem is now resolved, there could be some problem in you NIC or the configuration of your old NIC.


Apache2 not loading PHP 8.0.5 - returns php as text not executing

If you uninstalled PHP 7.x after installing PHP 8.0, then there was probably a bit of overlap that has taken out your PHP 8.0 installation. A slight re-install might be in order.
Try this:
sudo apt install --reinstall php8.0 libapache2-mod-php8.0
sudo a2enconf php8.0-fpm
sudo service apache2 restart

That will re-load PHP 8.0, ensure the modules are in place and intact, enable the FastCGI Process Manager, then restart Apache. Generally, this is the process that people need to follow when a similar issue happens with PHP7.x.
Following up ...
The AH01079: failed to make connection to backend: httpd-UDS is sometimes caused by a bum service that needs to be restarted. I don't use PHP8.0, so can't guess at the name of the service, but you can list all services running on your system like this:
sudo service --status-all

This will give you a list of services with a [-] to signify it's inactive, and [+] to mean it's running. You will want to look for a service that looks something like php80-php-fpm and restart it:
sudo service php80-php-fpm restart

This may resolve the issue.
If Contending with a Proxy Issue ...
On occasion there may be an issue if using proxy_fcgi and the send buffers do not fill one frame of data. This can be worked around by editing the Apache configuration for the affected site to include this:
<IfModule proxy_module>
    ProxyPassMatch ^(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1
</IfModule>

<IfModule mod_deflate.c>
    SetOutputFilter DEFLATE

    # Don't compress images
    SetEnvIfNoCase Request_URI \.(?:gif|jpeg|jpg|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    Header append Vary User-Agent env=!dont-vary
</IfModule>

Hopefully this resolves the final issue.


Open the terminal and type:

sudo apt update
sudo apt install aptitude
sudo apt --fix-broken install
cd /var/cache/apt/archives/
sudo rm texlive-music_2017.20180305-2_all.deb texlive-latex-base-doc_2017.20180305-1_all.deb
sudo aptitude install -f texlive-latex-base-doc texlive-music


How am I suddenly using property driver?

This option comes with ubuntu 15.04. Its nothing so serious and yes you can disable it without breaking anything but my advice is to keep it enabled as it makes your pc a bit faster.


From man ps, section Standard Format Specifiers:

nwchan     WCHAN     address of the kernel function where the process
                     is sleeping (use wchan if you want the kernel
                     function name).  Running tasks will display a
                     dash ('-') in this column.
wchan      WCHAN     name of the kernel function in which the process
                     is sleeping, a "-" if the process is running, or
                     a "*" if the process is multi-threaded and ps is
                     not displaying threads.

As can be seen, they are the kernel functions currently being used by the process. Further:

-n namelist
      Set namelist file.  Identical to N.  The namelist file is needed
      for a proper WCHAN display, and must match the current Linux
      kernel exactly for correct output.  Without this option, the
      default search path for the namelist is:

              $PS_SYSMAP
              $PS_SYSTEM_MAP
              /proc/*/wchan
              /boot/System.map-$(uname -r)
              /boot/System.map
              /lib/modules/$(uname -r)/System.map
              /usr/src/linux/System.map
              /System.map

You can inspect /boot/System.map-$(uname -r) on Ubuntu for a list of functions:

$ sudo head /boot/System.map-$(uname -r)
0000000000000000 D __per_cpu_start
0000000000000000 D irq_stack_union
0000000000000000 A xen_irq_disable_direct_reloc
0000000000000000 A xen_save_fl_direct_reloc
00000000000001e0 A kexec_control_code_size
0000000000004000 d exception_stacks
0000000000009000 D gdt_page
000000000000a000 D espfix_waddr
000000000000a008 D espfix_stack
000000000000a020 D cpu_info


Cron utilizes two, quite independent sets of crontab files.

One of them is public (system-wide), located in /etc. It includes /etc/crontab and the files in /etc/cron.d.
The file you linked looks much like the default /etc/crontab. If you have got this contents in your /etc/crontab file, keep it.
The other includes a private file for each user. Their actual location is /var/spool/cron/crontabs but this folder is not accessible by normal means. These crontab files shall be accessed and modified using the crontab command.
A user’s crontab (including root, accessed using sudo crontab <option>) does not exist by default. When you issue crontab -e and have no crontab file for given user, the command brings a template with no scheduled commands, just descriptive comments. The file is saved only if you modify the template.
To reset this one to the default state (i.e. remove it), use the command:

crontab -r


Is it possible to verify grub installation without rebooting?

I don't think you can just check whether this will works or not before trying to do it, but instead you can get a preview of your GRUB instantly so you can be sure that your new configuration is loaded correctly in GRUB.

This could be achieved using a tool called grub-emu.

man grub-emu

NAME
       grub-emu - GRUB emulator

SYNOPSIS
       grub-emu [OPTION]...

DESCRIPTION
       GRUB emulator.

       -r, --root-device=DEV
              use DEV as the root device [default=guessed]

       -m, --device-map=FILE
              use FILE as the device map [default=/boot/grub/device.map]

       -d, --directory=DIR
              use GRUB files in the directory DIR [default=/boot/grub]

       -v, --verbose
              print verbose messages

Easily install grub-emu using command line:

sudo apt-get install grub-emu

To run it just use terminal to run this command:

grub-emu


You can add as many slashes as you want after each other at any position. It doesn't change anything.

You also can add ./ as often as you want because "." is the link from every directory to itself.

This and other acrobatics even work when you're saving files. I often will save files with names like "/tmp/a.png". The last time was about 4 minutes ago.

Try it with the address bar of your browser on any page. Same thing.


some questions related to ubuntu app showdown

Hi I think most questions can be answered here.
http://developer.ubuntu.com/showdown/rules/ and http://developer.ubuntu.com/showdown/

I think should be submitted as different questions but I'll try to answer.

  For development i have to use quickly but can i use third party libraries for GUI or other work i think i will need it for eg. pyside

My understanding is that it has to be availble through ubuntu repo. Quickly makes this easy. pyside might be there.

  The first and second winner will get laptop + mobile too right or not the mobile

My understanding is that you get both if you get first or second prize.


Sorry , java templates are not yet available for quickly . If you are interested you can create java template quickly and share with us


I have had a similar issue and solved it by assigning a system custom shortcut (to any program/url, can be konsole or vim) under Settings > Workspace > Shortcuts > Custom Shortcuts to alt+1 and then deleting it.


October 28, 2018 Update

For dkms support of nVidia, bbswitch and virtual box compiling use:

sudo apt install libelf-dev

To circumvent newer linux-header installation errors download: libssl1.1

Download the newer kernels you want and your ~/Downloads should look like this:

$ ll *.deb
-rw-rw-r-- 1 rick rick  1128420 Oct 28 08:33 libssl1.1_1.1.0g-2ubuntu4.1_amd64.deb
-rw-rw-r-- 1 rick rick 10741128 Oct 28 08:05 linux-headers-4.14.78-041478_4.14.78-041478.201810200529_all.deb
-rw-rw-r-- 1 rick rick  1052200 Oct 28 08:05 linux-headers-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb
-rw-rw-r-- 1 rick rick  8243552 Oct 28 08:05 linux-image-unsigned-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb
-rw-rw-r-- 1 rick rick 47559380 Oct 28 08:06 linux-modules-4.14.78-041478-generic_4.14.78-041478.201810200529_amd64.deb

Now you should be able to successfully install:

sudo dpkg -i *.deb

Original Answer

Kernels 4.14.xx, 4.16.xx and 4.17.rc(xx) all share the same bug over this last week; April 24-30, 2018.

I just tried 4.14.38 tonight and it exhibits the same errors as 4.14.36 and 4.14.37 as documented in this bug report.

In my case tonight the errors are:

$ sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-4.14.38-041438.
(Reading database ... 641792 files and directories currently installed.)
Preparing to unpack linux-headers-4.14.38-041438_4.14.38-041438.201804300419_all.deb ...
Unpacking linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-headers-4.14.38-041438-generic.
Preparing to unpack linux-headers-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-headers-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-image-unsigned-4.14.38-041438-generic.
Preparing to unpack linux-image-unsigned-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Selecting previously unselected package linux-modules-4.14.38-041438-generic.
Preparing to unpack linux-modules-4.14.38-041438-generic_4.14.38-041438.201804300419_amd64.deb ...
Unpacking linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Setting up linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
dpkg: dependency problems prevent configuration of linux-headers-4.14.38-041438-generic:
 linux-headers-4.14.38-041438-generic depends on libssl1.1 (>= 1.1.0); however:
  Package libssl1.1 is not installed.

dpkg: error processing package linux-headers-4.14.38-041438-generic (--install):
 dependency problems - leaving unconfigured
Setting up linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--install):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 linux-headers-4.14.38-041438-generic
 linux-image-unsigned-4.14.38-041438-generic

To fix errors I tried sudo apt install -f but it won't fix it plus causes a "crash report":

Using sudo rm-kernels I removed 4.14.38 as much as I could:

This time around only the headers were successfully removed:

The following packages will be REMOVED:
  linux-headers-4.14.38-041438*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
1 not fully installed or removed.
After this operation, 74.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 665813 files and directories currently installed.)
Removing linux-headers-4.14.38-041438 (4.14.38-041438.201804300419) ...
Setting up linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: 50: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postinst: linux-update-symlinks: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--configure):
 subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
 linux-image-unsigned-4.14.38-041438-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Now let's see what is left over:

$ apt list | grep 4.14.36

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

linux-image-unsigned-4.14.36-041436-generic/now 4.14.36-041436.201804240906 amd64 [residual-config]

Let's try to remove it:

$ sudo apt remove linux-modules-4.14.38-041438-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-unsigned-4.14.38-041438-generic linux-modules-4.14.38-041438-generic
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
After this operation, 296 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 641771 files and directories currently installed.)
Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: 11: /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm: linux-check-removal: not found
dpkg: error processing package linux-image-unsigned-4.14.38-041438-generic (--remove):
 subprocess installed pre-removal script returned error exit status 127
dpkg: linux-modules-4.14.38-041438-generic: dependency problems, but removing anyway as you requested:
 linux-image-unsigned-4.14.38-041438-generic depends on linux-modules-4.14.38-041438-generic.

Removing linux-modules-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
Errors were encountered while processing:
 linux-image-unsigned-4.14.38-041438-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Edit the file /var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.prerm:

#!/bin/sh
set -e

version=4.14.38-041438-generic
image_path=/boot/vmlinuz-$version
    (... SNIP ...)

Just below the first line #!/bin/sh insert a new line:

exit 0

Save the file and rerun the failed command:

$ sudo apt remove linux-image-unsigned-4.14.38-041438-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-unsigned-4.14.38-041438-generic
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 8,663 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 635588 files and directories currently installed.)
Removing linux-image-unsigned-4.14.38-041438-generic (4.14.38-041438.201804300419) ...
/var/lib/dpkg/info/linux-image-unsigned-4.14.38-041438-generic.postrm ... removing pending trigger
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.14.38-041438-generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background: /home/rick/Pictures/1600x900/19.jpg
Found background image: /home/rick/Pictures/1600x900/19.jpg
Found linux image: /boot/vmlinuz-4.14.34-041434-generic
Found initrd image: /boot/initrd.img-4.14.34-041434-generic
Found linux image: /boot/vmlinuz-4.14.31-041431-generic
Found initrd image: /boot/initrd.img-4.14.31-041431-generic
Found linux image: /boot/vmlinuz-4.14.30-041430-generic
Found initrd image: /boot/initrd.img-4.14.30-041430-generic
Found linux image: /boot/vmlinuz-4.14.27-041427-generic
Found initrd image: /boot/initrd.img-4.14.27-041427-generic
Found linux image: /boot/vmlinuz-4.14.15-041415-generic
Found initrd image: /boot/initrd.img-4.14.15-041415-generic
Found linux image: /boot/vmlinuz-4.14.10-041410-generic
Found initrd image: /boot/initrd.img-4.14.10-041410-generic
Found linux image: /boot/vmlinuz-4.14.4-041404-generic
Found initrd image: /boot/initrd.img-4.14.4-041404-generic
Found linux image: /boot/vmlinuz-4.14.2-041402-generic
Found initrd image: /boot/initrd.img-4.14.2-041402-generic
Found linux image: /boot/vmlinuz-4.13.9-041309-generic
Found initrd image: /boot/initrd.img-4.13.9-041309-generic
Found linux image: /boot/vmlinuz-4.10.0-42-generic
Found initrd image: /boot/initrd.img-4.10.0-42-generic
Found linux image: /boot/vmlinuz-4.9.77-040977-generic
Found initrd image: /boot/initrd.img-4.9.77-040977-generic
Found linux image: /boot/vmlinuz-4.4.0-104-generic
Found initrd image: /boot/initrd.img-4.4.0-104-generic
Found linux image: /boot/vmlinuz-4.4.0-103-generic
Found initrd image: /boot/initrd.img-4.4.0-103-generic
Found linux image: /boot/vmlinuz-3.16.53-031653-generic
Found initrd image: /boot/initrd.img-3.16.53-031653-generic
Found Windows Boot Manager on /dev/nvme0n1p2@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 18.04 LTS (18.04) on /dev/nvme0n1p8
Found Windows Boot Manager on /dev/sda1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for EFI firmware configuration
done

Double check everything is ok:

$ sudo apt install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  bbswitch-dkms dkms gdm libjansson4 libxnvctrl0 linux-gcp-tools-4.10.0-1008
  linux-gcp-tools-4.10.0-1009 linux-headers-4.4.0-103 linux-headers-4.4.0-103-generic
  linux-image-4.4.0-103-generic linux-image-extra-4.4.0-103-generic
  linux-tools-4.10.0-1008-gcp linux-tools-4.10.0-1009-gcp nvidia-prime nvidia-settings
  python-compizconfig python-pyudev screen-resolution-extra
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.


Cannot run executable file - SPAZ installer

I think that it's just a permission matter, just run this command:

chmod +x spaz-linux-humblebundle-09182012-bin

and then again:

./spaz-linux-humblebundle-09182012-bin


nvidia driver not working after system update

This worked for me:

$ sudo apt install --reinstall nvidia-driver-435
$ sudo apt install --reinstall nvidia-dkms-435

If a different driver number is used, replace 435 with it. I don't know if the first step is strictly necessary, but I performed it anyway.


how to install gerix on ubuntu 12.04 using backtrack repositories?

Open the terminal under Ubuntu 12.10/12.04/11.10 or older and run the following commands to add the BackTrack repository:

wget -q http://all.repository.backtrack-linux.org/backtrack.gpg -O- | sudo apt-key add -
sudo sh -c "echo 'deb http://all.repository.backtrack-linux.org revolution main microverse non-free testing' >> /etc/apt/sources.list"
sudo apt-get update
sudo apt-get upgrade

To check if the repository is added correctly, you can try to install this BackTrack package:

sudo apt-get install backtrack-wallpapers

Or you can search BackTrack applications from Ubuntu Software Center.
Last step is install Gerix:

sudo apt-get install gerix-wifi-cracker-ng

Don't forget run gerix as root.

sudo /usr/share/gerix-wifi-cracker-ng/gerix.py

Have fun using Gerix.

I tested this steps with success on 12.04 64bit.

Source:
How To Add The BackTrack Repository To Ubuntu 12.10/12.04/11.10


Change default terminal back to Bash in VS Code

Try the following steps:

In the VSC application open File>Preferences>Settings. Or press Ctrl+,;
At this point you can browse the settings, or type terminal.integrated.shell.linux in the search bar;
As value of the field Terminal > Integrated > Shell:Linux fill /bin/bash. Then restart the application.

Or, probably better, search for /bin/zsh and replace it with /bin/bash.


okay now open files then on the left side you'll find option "computer" click it
now navigate to usr > share > vlc > http > and now you need to press ctrl + h to show the hidden files (files starting with . are hidden) and open it.


I hope these shortcuts are useful

Ctrl+Shift+C : copy
Ctrl+Shift+V : paste
Shift+Insert : paste (In some cases, I can't paste data stored in clipboard from Intellij or Netbeans IDE)
Use this tool for copying to clipboard: xclip


Can't install Ubuntu; PC keeps booting to Windows using USB

There are many possibilities for PC keeps booting to Windows :

Check your first boot option in BIOS set to USB
Make sure you format your USB properly
Check if your ios missing something

I like to suggest you to make bootable CD and try again if still want to try with USB try this...

Make bootable USB with UNetbootin (its very simple or see this http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows).
Go to BIOS and set USB for first boot.
After second step when PC going to restart after black screen keep pressing F8 till black or blue screen will appear.
You can see option on screen like Try ubutnu, install ubuntu and etc...
Enter on Try ubuntu
It takes aprox 5 min to start (Just wait do not press anything)
One you reach on desktop you can try environment or just click Install Ubuntu icon on desktop.

Here you get how to install Ubuntu http://www.ubuntu.com/download/desktop/install-ubuntu-desktop


Webcams not working on a Dell Latitude 5285

Actually, it seems this functionality depends on a new intel driver which will be included in linux-4.16:
https://www.mail-archive.com/linux-media@vger.kernel.org/msg122619.html


Is it possible to increase the laptop's sound beyond of the standard-limit

I have this possibility. Matigo mentioned that it may depend on one's soundcard.
This is how it looks like in the standard settings app (alsamixer visible for comparison):

The problem with it is how distorted the sound becomes.
The result is comparable to the effect that's called "clipping", or "square signal".
It's unnatural, absolutely un-enjoyable, but most importantly I have the feeling that it amortizes the physical speaker units incredibly fast. It's like it's ripping them apart.
So, except for when I take a screenshot of it for using it in an AskUbuntu answer, I keep this option disabled.


Apparently the Ubuntu Steam client has a fixable bug where it is asking for way too much DNS information.  See here for fix

http://steamcommunity.com/app/221410/discussions/2/616189106498372437/


Need To Rotate Logs From Virtual Hosts on Ubuntu VPS

Apache has its own rotatelog script. From the manual:
The command and options for rotatelog are:
rotatelogs [ -l ] [ -f ] logfile rotationtime|filesizeM [ offset ]

where the options are ...

-l: Causes the use of local time rather than GMT as the base for the interval or for strftime(3) formatting with size-based rotation. Note that using -l in an environment which changes the GMT offset (such as for BST or DST) can lead to unpredictable results!
-f:  Causes the logfile to be opened immediately, as soon as rotatelogs starts, instead of waiting for the first logfile entry to be read (for non-busy sites, there may be a substantial delay between when the server is started and when the first request is handled, meaning that the associated logfile does not "exist" until then, which causes problems from some automated logging tools). Available in version 2.2.9 and later.
logfile:  The path plus basename of the logfile. If logfile includes any '%' characters, it is treated as a format string for strftime(3). Otherwise, the suffix .nnnnnnnnnn is automatically added and is the time in seconds. Both formats compute the start time from the beginning of the current period. For example, if a rotation time of 86400 is specified, the hour, minute, and second fields created from the strftime(3) format will all be zero, referring to the beginning of the current 24-hour period (midnight). When using strftime(3) filename formatting, be sure the log file format has enough granularity to produce a different file name each time the logs are rotated. Otherwise rotation will overwrite the same file instead of starting a new one. For example, if logfile was /var/logs/errorlog.%Y-%m-%d with log rotation at 5 megabytes, but 5 megabytes was reached twice in the same day, the same log file name would be produced and log rotation would keep writing to the same file.
rotationtime: The time between log file rotations in seconds. The rotation occurs at the beginning of this interval. For example, if the rotation time is 3600, the log file will be rotated at the beginning of every hour; if the rotation time is 86400, the log file will be rotated every night at midnight. (If no data is logged during an interval, no file will be created.)
filesizeM:     The maximum file size in megabytes followed by the letter M to specify size rather than time.
offset    The number of minutes offset from UTC. If omitted, zero is assumed and UTC is used. For example, to use local time in the zone UTC -5 hours, specify a value of -300 for this argument. In most cases, -l should be used instead of specifying an offset.

Examples:
CustomLog "|bin/rotatelogs /var/logs/logfile 86400" common

This creates the files /var/logs/logfile.nnnn where nnnn is the system time at which the log nominally starts (this time will always be a multiple of the rotation time, so you can synchronize cron scripts with it). At the end of each rotation time (here after 24 hours) a new log is started.
CustomLog "|bin/rotatelogs -l /var/logs/logfile.%Y.%m.%d 86400" common

This creates the files /var/logs/logfile.yyyy.mm.dd where yyyy is the year, mm is the month, and dd is the day of the month. Logging will switch to a new file every day at midnight, local time.
CustomLog "|bin/rotatelogs /var/logs/logfile 5M" common

This configuration will rotate the logfile whenever it reaches a size of 5 megabytes.
ErrorLog "|bin/rotatelogs /var/logs/errorlog.%Y-%m-%d-%H_%M_%S 5M"

This configuration will rotate the error logfile whenever it reaches a size of 5 megabytes, and the suffix to the logfile name will be created of the form errorlog.YYYY-mm-dd-HH_MM_SS.
CustomLog "|bin/rotatelogs -t /var/logs/logfile 86400" common

This creates the file /var/logs/logfile, truncating the file at startup and then truncating the file once per day. It is expected in this scenario that a separate process (such as tail) would process the file in real time.
You can put these commands in the conf file.


Looks like a known bug on Launchpad.

According to the thread, the current fix is to...

Open terminal (Ctrl+Alt+T)
Type the following three commands to reset the volume/mute keys on your keyboard...

gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-up
gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-down
gsettings reset org.gnome.settings-daemon.plugins.media-keys volume-mute

It worked for me, hope it works for you too.


Ubuntu 12.10 and VMware Workstation 9: RAM caching causes severe performance drops

Set swappiness to 0 is NOT recommended in Production environment, especially for a host that runs multiple virtual machines. I've seen weird issues on servers and my own workstations, with swappiness set to 0, changing it to 5 or higher value makes it normal again, just don't set it to zero, unless you are 100% sure what you are doing and the consequence, workaround.

I don't trust the GNOME System Monitor. Normally use free, vmstat or dstat.

free Available system memory = free + buffers + cached, or + buffers/cache in free output.
vmstat is mainly used to monitor page (swap) out/in. You need to troubleshoot if lots of page out/in happen.
dstat is more advanced than vmstat

Have you tried to check VMware Workstation known issues? Make sure you run the latest version: 9.0.1?

Linux memory management:

http://www.linuxatemyram.com/

https://serverfault.com/questions/449296/why-is-linux-reporting-free-memory-strangely


Microphone not set to input device Ubuntu 20.04

I think you might have gnome-alsamixer installed.
I had it installed in Ubuntu 18.04, and when I upgraded to 20 I started having similar issues. I removed it using sudo apt-get autoremove gnome-alsamixer and it resolved most audio issues for me.
PulseAudio (pavucontrol) also didn't work for me until I removed alsamixer.
I still occasionally have to switch audio devices using pavucontrol instead of through Settings but it's better than it not working recognizing devices at all.


The Live CD has its own filesystem, /etc/fstab on the Live CD is not equal to the fstab file on your system. The Live CD is the right tool for this job.

First, mount your Ubuntu partition in a mount point:

sudo mount /dev/sda5 /mnt

Next, start editing the file:

sudo nano /mnt/etc/fstab

Navigate to the line containing the swap and press Ctrl + K to delete the line. Enter the following line in its place:

UUID=1993033c-a261-4506-8520-2b5ff9fd9a60 none            swap    sw              0       0

Save the changes by pressing Ctrl + X, followed by Y and Enter


Hours later figured out why the compose key was ignored for the one user. Still don't know why it went from one keystroke to two, but the inability to use it at all was my main reason for posting this question.

dconf had an override value for /org/gnome/settings-daemon/peripherals/numlock-state. Resetting this made compose key work. Why that matters is a mystery to me!! But somehow it magically fixed the problem.

Brought back unpleasant memories of the evil Windows system registry and regedit. sigh


Ubuntu 13.04 64bit - Wi-Fi not detecting any networks

long time since I had this kind of problem.
YOu can get it propably running by ndiswrapper but first you need to kill any module accesing it
post here your lsmod

rough idea is to kill not working module, find ini file and some libs from your driver
copy it into your home directory from USB key

ndiswrapper -i <your inifile from windows driver of the same architecture as distro>
sudo modprobe -r <your not working wifi driver>
sudo modprobe ndiswrapper

but after you disable card and then you may need to kill module so send outcome of

lsmod


Live CD boot: SQUASHFS error: unable to read xattr id index table

You write, you can mount the squashfs from a fully booted system, but you cannot mount it when booting. This suggests, that you are missing a Kernel module in your initramdrive.

During boot, only modules from the initrd images are available.

In the running system you can issue lsmod to view a list of loaded modules. When mounting the squash image the kernel should be forced to load some additional driver modules. Issuing lsmod before and after the mount, you should be able to see what modules were loaded during the mount.

Enter those modules into /etc/initramfs-tools/modules and rebuild your initrd using update-initramfs -u.


Run the following commands:

sudo apt-get update
sudo apt-get upgrade -y

Then reboot

Make sure the update-manager-core is installed

sudo apt-get install update-manager-core -y

After this issue the following command:

sudo do-release-upgrade

If the command says that there is no new release available and you still want to go ahead with the upgrade to the development release, you can use the the -d option. So enter this into terminal:

sudo do-release-upgrade -d

You should be asked to continue with the upgrade. Follow the prompts and you should upgrade to 20.04!


Ubuntu Audio Static Distortion [Intel 82801AA-ICH]

I believe I found an answer, for me. As it turns out, the issue seems to have been being caused by Virtualbox. Its sound setting was set to AC97. And That needed to be changed to IntelHD Audio. (The ability to do this will be grayed out if the Guest Operating System is still running).

Shut down the guest Linux OS. then use the Virtualbox Manager > Settings > Audio > and the drop down box to change the device to IntelHD Audio.

Then restart your Linux Guest, open alsamixer in a Terminal. At this point it will put a pop up noting the audio device has changed and will initialize the settings for the IntelHD Audio as device 0 (without having to use F6).

Then while in alsamixer, set your mixer settings as you would prefer. Then open a second Terminal. in that terminal type sudo su  (to get root privileges) then your password. Then do "alsactl store" to save your alsamixer settings. Then close both terminals and restart your computer.

Now if you need to restore your saved Settings, in Terminal:
sudo alsactl restore 0

I can't believe it took me this long to sort something this simple.


Switch sound input when microphone is connected

Could this indicator help out a little bit?

https://launchpad.net/~yktooo/+archive/ubuntu/ppa

Max.


If it is anything like 12.04, you must unlock the window first by clicking on the LOCK icon in the upper right corner and entering your password when prompted.  I have long felt the method was needlessly cryptic and I would have hoped they'd have fixed the issue by 14.04.


Ubuntu 14.04 Share files with Samsung Tablet

Would you be OK doing this another way ? I installed airdroid on all my android devices, its a free app. Simply run airdroid and connect to your android device via the wifi. File transfer both ways, as well as control of your contacts, sms etc. I have never looked back.


cannot log in to all account except guest after mounting new partition

This may help:

Use Ctrl-Alt-F2

Log in using your admin account.

Use usermod -d NEW_HOME to specify your home directory if it's moved.

I did funny things to my setup and moved my home partition/user, i also needed to chown and chgrp to my home directory to assign it back to my 'new' user

Using the Ctrl-Alt-F2 will hopefully give you enough control over your system to fix it.


Gnome Software tries to run on non-admin account

Ok. I have been doing lots of research into the options for this. There is an autostart file in /etc/xdg/autostart which launches the gnome-software comand.
(gnome-software-service.desktop)

[Desktop Entry]
Type=Application
Name=GNOME Software
Exec=/usr/bin/gnome-software --gapplication-service
OnlyShowIn=GNOME;Unity;
NoDisplay=true
X-Ubuntu-Gettext-Domain=gnome-software

I couldnt find a way to edit this file to only run inside my admin account. Instead, I have copied the file into my non-admin users under ~/.config/autostart/ and edited the file to read "NotShownIn=Gnome;Unity;".

The autostart file in your home directory is meant to over-ride the system-wide one in /etc. I will report back if this is successful.


Configuring multiple DNS name servers on 18.04 server

I can confirm the issue with 18.04.1 LTS and netplan as I am experiencing it myself with a different workaround.

The Setup:
I have two 18.04.1 LTS servers that are configured more or less identically. One server hosts applications and is internet accessible. The other is a data server behind the firewall that only the application server can access.

The Network:
I have a static environment with two DNS servers. (Windows OS). For added redundancy I use 8.8.8.8 in the event of internal DNS failure.

The Situation:
Some of my apps resolve via hostname and not IP address. A few times a day the apps will crash or throw errors because they cannot resolve the hostname. If I run netplan apply it works for a bit.

Even though I have 8.8.8.8 third in the list I believe that netplan is eventually ignoring my local DNS servers in favor of google and never checking internal DNS if it cannot resolve a host name against the primary DNS.

The Workaround:
When I added my local hostname to my public DNS record (I know big no no) without reapplying netplan I was able to get my application server to resolve without issue.

Ultimately I believe their is a nameserver preference or "permanent" nameserver failure issue with netplan as implemented in Ubuntu 18.04.1 LTS


Ubuntu 16.04 systemd user service anomaly

It might be even better:

  The systemd user instance is started after the first login of a user
  and killed after the last session of the user is closed. Sometimes it
  may be useful to start it right after boot, and keep the systemd user
  instance running after the last session closes, for instance to have
  some user process running without any open session. Lingering is used
  to that effect. Use the following command to enable lingering for
  specific user:

# loginctl enable-linger username

https://wiki.archlinux.org/index.php/Systemd/User


Ubuntu One is a sync service, not a bckup service. When you add files from 4 coumputers to Ubuntu One:

Do you use the same user-id (lets call the user-id "LRBellmore") and password to configure the Ubuntu One app in all the computers? I am talking about Ubuntu One user-id.
Do you copy the files in the "Ubuntu One" folder in your home folder,
or upload the files using the web interface?

If the answer to Question 1 is yes, it may take sometime, but files from computer A will show up in computer B, C, and D if:

1) the same user remains logged in, on the other computers (B, C, and D)

2) Internet is working, and

3) Ubuntu One is running in them.

As for what happens if a computer fails, depends on how the computer fails.

If the user "LRBellmore" is logged into the computer A and Ubuntu One app is running (as it should) and some malware (or a toddler) deletes files from a synced folder like "Ubuntu One" folder. The app will send this information to the server and the corresponding file will be deleted from the server. When "LRBellmore" logs on to computer B, and connects to the Internet, the file will be deleted from computer B.

If the computer A has a second user (Lets call him "EvilTwin"), and EvilTwin logs into EvilTwin's account and somehow manages to delete files from a synced folder like "Ubuntu One" folder of "LRBellmore," then the files will not be deleted from the Ubuntu One server at that time, as "LRBellmore" was not logged in at that time and the Ubuntu One was not running with "LRBellmore" credential. However, when "LRBellmore" logs into the computer and connects to the Internet, The Ubuntu One app will notice that files are gone and will sync those changes to the server, and eventually to the other computers.

If the computer was turned off and falls in a swimming pool, then the user "LRBellmore" was not logged in and the Ubuntu One app was not running. So no information was sent to the server. So no file in the server will be deleted. When the user "LRBellmore" logs on to the computer B, the file will continue to exist there as well.

If the computer was booted from a Live CD and reformatted, the user "LRBellmore" was not logged in and the Ubuntu One app was not running. So the file will remain in the server and in computer B, C and D.

The same principle holds for dual-boot Windows and Ubuntu, on the same computer. Once the files are synced to the server from the Windows boot, you have to boot Ubuntu and log-in to your account so that the files can sync between the server and the Ubuntu's local "Ubuntu One" folder. If you delete the Windows partition while booted from LiveCD or Ubuntu in the other partition of your hard drive, Ubuntu One will not be able to sync with the Windows part of the computer and no files will be deleted.

Hope this helps


Is there some way to get a more usable file chooser dialog?

Quite frankly you can't "enable" it (file preview). It is an application specific feature, which most developers don't seem to bother with. You will notice that in some applications, (for example the GIMP) you will get image previews, but for the most part you won't see any.
As for other features like creating/deleting folders, these have (for some reason) not been implemented.
Update:
In Gnome 3.18, renaming and deleting folders will now be possible from the file manager, though some of the other outstanding features are not yet known to be in development at this time. Seems there is some hope for common sense out of the Gnome camp.


you can follow this step:

open terminal
change directory to sac-101.6a-linux_x86_64.tar.gz
sudo tar -zxvf sac-101.6a-linux_x86_64.tar.gz -C /usr/local/
open readme
gedit ~/.bashrc
after that scroll until the end, then copy this script:

export SACHOME=/usr/local/sac
source /usr/local/sac/bin/sacinit.sh
export PATH="/usr/local/sac/bin:$PATH"

finally, open back terminal and type:

. ~/.bashrc


TL;DR: http_proxy environment variable works for at least 2.92.
For versions 1.4.x and older see configuration options here or below.

Citation from transmission wiki page:

  Transmission uses the libcurl library for http- and https-based tracker announces and scrapes. Transmission doesn't support proxies, but libcurl itself honors a handful of environment variables to customize its proxy behavior.

relevant variables start here here. And in CURLOPT_PROXY description there is this:

  libcurl respects the proxy environment variables named http_proxy,
  ftp_proxy, sftp_proxy etc. If set, libcurl will use the specified
  proxy for that URL scheme. So for a "FTP://" URL, the ftp_proxy is
  considered. all_proxy is used if no protocol specific proxy was set.

I run transmission-daemon using systemd, so I just add line

  Environment=http_proxy=http://proxy_url:proxy_port

to service configuration using

  sudo systemctl edit transmission-daemon.service

and all worked.

I have transmission-daemon 2.92. Can't say for sure for older version, but according to this wiki page you should use this parameters for transmission 1.4.x or older:

proxy-authentication String
proxy-authentication-required: Boolean (default = 0)
proxy-port: Number (default = 80)
proxy-server: String
proxy-server-enabled: Boolean (default = 0)
proxy-type: Number (0 = HTTP, 1 = SOCKS4, 2 = SOCKS5, default = 0)
proxy-username: String


I think that you messed around with sudo where you should not have done and therefore the owner of some folders in your home directory are wrong.

If my guess is correct, simply executing the command

sudo chown -R $USER: ~

from a terminal (open one with Ctrl+Alt+T) on your own account should fix it.

Otherwise please edit your question and add the output of the terminal command

ls -la ~/.config/google-chrome


When a fork bomb occurs is it the ram or the hard drive that gets depleted and crashes the entire pc?

The classic fork bomb, meaning a process that duplicates itself exponentially, will use up two resources: the CPU and the process table.  The CPU, because each of these processes need timeslices to run, and the process table because suddenly there is an explosion of processes.

"Resource hogging", can refer to any computing resource.  It doesn't have to be a fork bomb.  For example, if you have a dd running and it uses up all I/O bandwidth to your disks and your machine becomes unbearably slow due to high load, you could technically say that dd is being a resource hog.
Same can be said for any program that tries to take up RAM (Example: "Chrome is a resource hog, it eats RAM for breakfast") or disk space, or any limited resource on your computer.

Now, finally: causing your system to crash is really just the very rare case.  Your system will get slow, and in the case of memory starvation the OOM Killer (Out of memory killer) may cause mayhem.  An outright crash, however, is really the exception.


What are all these "Untitled Window" icons in launcher and how do I get rid of them?

This icons belong to sensors Conky on right side of your desktop.


Why doesn't grep -r also look in subdirectories when I search with a glob?

You can see what's happening here by setting the shell into debug mode using set -x

$ set -x
$ grep -r "washer" /home/steeldriver/backup/*.*
+ grep --color=auto -r washer /home/steeldriver/backup/great.txt
washer

i.e. the shell is expanding *.* and matching the single file great.txt - so grep searches that single file.

If you want to recursively search the whole directory, just give the directory as the argument:

$ grep -r "washer" /home/steeldriver/backup/
+ grep --color=auto -r washer /home/steeldriver/backup/
/home/steeldriver/backup/aaa/info.txt:washer
/home/steeldriver/backup/great.txt:washer

(You can turn debug mode off again using set +x)


No gedit Text Size Plugin in Ubuntu 18.04

The gedit plugins should be installed

Find available plugins:

apt-cache search gedit-plugin-*

Install the text-size plugin:

sudo apt install gedit-plugin-text-size


perl install DBD::mysql failed on ubuntu 20.04

after some google searching it turns out that what I needed to do to resolve this issue was the following
sudo apt-get install libmysqlclient-dev
Now my Perl based mysql scripts seem to be working just fine.


Which languages are available in Live DVD version?

Many languages are available on a DVD edition (not CD) of Ubuntu. You have to check the manifest of the version you want.

For example, for Ubuntu 12.04.2 64bit, the manifest is here.

When you open the page, click the search button of your browser (Firefox=F3) and write:language-pack, then click on Highlight all and you will see which languages are available on the DVD.

Page with all available Ubuntu releases.


Lubuntu 14.04.1 Fresh Install Won't Boot: runaway loop, USB

So, I found a way to get things booted: downgrade the kernel.

The kernel that came with 14.04.1 was 3.13.0-32-generic. The kernel that worked was 3.13.0-24-generic. It is available in the repositories.

How to get it?

Boot from a LiveCD/flash drive and open a terminal.

Now, we need to load ourselves into the computer's new, non-functional OS:

sudo mount /dev/sda1 /mnt
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt

After the final command all commands you type are now executed as though you had actually booted up the computer. This is handy, because it means we can use:

sudo apt-get update
sudo apt-get upgrade

To grab the latest packages and install them.

We can think downgrade the kernel with:

sudo apt-get install linux-image-3.13.0-24-generic
sudo apt-get install linux-image-extra-3.13.0-24-generic

We can then be sure that GRUB is updated using:

sudo update-grub

If initramfs complains about things, you may need to run:

sudo update-initramfs

But this is unlikely.

After installing the kernel and updating grub, reboot.

Start-up will probably fail again by showing a blank screen or one with a single blinking cursor in the upper left. Ctrl+Alt+Delete to restart a second time.

Now, the GRUB menu will show. Head to Advanced Options for Ubuntu, and boot into the older kernel. After this, things booted just fine for me.


How do I edit a system file when I am root user but I receive "you are not in the sudoers file"?

you can do this with root login (no sudo)

in your terminal you should simply input su -
it will ask you the root password, not the erfan's one

after that edit your file


Ubuntu One's file sync service is synchronization, and not remote file storage. This means the client will download everything in a folder to the machine you choose to synchronize that folder to, rather than creating a mount point to a remote server.

If you've accepted a share from someone, you can open the Ubuntu One control panel and in the Folders tab of the interface, the folders which are shared to you will be listed. You can simply check the folder in question to enable synchronizing it to your computer, and all the files in that folder that was shared to you, will start downloading.


How can I determine which fonts are installed from the command line, and what is the easiest way to install more?

The best and simplest way is to use console command (this command should be available for all ubuntu-based distributions) :

fc-list

Example output (stripped) :

/usr/share/fonts/truetype/lato/Lato-Medium.ttf: Lato,Lato Medium:style=Medium,Regular
/usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf: Tlwg Typo:style=Bold
/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: Lato,Lato Semibold:style=Semibold Italic,Italic
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/noto/NotoSansThai-Regular.ttf: Noto Sans Thai:style=Regular
...

From MAN :

fc-list - list available fonts

To check all available options use MAN (manual): man fc-list


Will Ubuntu point releases include a new Linux kernel?

12.04.2 includes Kernel 3.5 along with a newer Xorg, as part of the hardware enablement package, which is available here:

https://wiki.ubuntu.com/Kernel/LTSEnablementStack

Do note that the Ubuntu image ISOs are also updated to use the new stack, so if you are doing new installations and want to keep the released 12.04 stack, you need to install from the older ISOs. These kernel upgrades are also not offered as part of normal upgrades, so there's no need to worry that you'll be upgraded from one major kernel version to the other. See the wiki page for more information.

The 3.2 kernel released with 12.04 will continue to be maintained for the life time (5 years) of precise. (and also Debian Wheezy)

Also, Ubuntu will generally work with mainline kernels. Binary builds are provided by the kernel team. https://wiki.ubuntu.com/Kernel/MainlineBuilds

This is a new policy. The decision to have such a updated kernel and Xorg was decided at the 2012 Ubuntu Developer Summit (UDS) in Oakland.

The most exciting feature about 3.5 (IMHO), Seccomp2, is part of the Precise 3.2 kernel.

http://packages.qa.dev.stgraber.org/qatracker/milestones/223/builds/16265/downloads
http://packages.qa.dev.stgraber.org/qatracker/milestones/223/builds/16265/testcases/1301/results


Can Juju interact with already installed Openstack service?

This would probably be more of a OpenStack charm question. With that said I do not think the charms (specifically cinder/swift) support connecting to an existing storage cluster.

I recommend filing bugs for the services you're interested in incorporating existing infrastructure with a Juju deployment.

Cinder: https://bugs.launchpad.net/charms/+source/cinder

Swift: https://bugs.launchpad.net/charms/+source/swift-proxy


Installing broken package phatch that worked on 15.10

I had the same issue after I updated to 16.04
Here I found a fix, which worked for me!
https://bugs.launchpad.net/phatch/+bug/1538906/comments/4


Why is /var/log/auth.log.1 smaller than auth.log

Yes and no:

Yes, auth.log gets renamed to auth.log.1
No, auth.log.1 is not necessarily smaller than auth.log as it depends on the usage of the machine.

E.G.: On my machine:

ll /var/log/auth*
-rw-r----- 1 syslog adm 209K Nov 30 17:55 /var/log/auth.log
-rw-r----- 1 syslog adm 304K Nov 25 17:08 /var/log/auth.log.1
-rw-r----- 1 syslog adm  27K Nov 18 09:20 /var/log/auth.log.2.gz
-rw-r----- 1 syslog adm  16K Nov 11 07:35 /var/log/auth.log.3.gz
-rw-r----- 1 syslog adm  19K Nov  5 07:35 /var/log/auth.log.4.gz

However, the other (older) logs get compressed so they're indeed smaller.


How to manage service relations in Juju at fine grained unit level?

It sounds to me like you want the two appservers to be uniquely bound to unique database servers. This would mean that they are really two separate services. This might make sense then:

juju deploy mysql app1-db
juju deploy app app1
juju deploy mysql app2-db
juju deploy app app2
juju add-relation app1-db app1
juju add-relation app2-db app2

This will make it so app1 and app2 are both independent (even though they have the same charm), which I THINK is what you want. If you want them both to be load balanced from the same haproxy:

juju deploy haproxy app-reverse-proxy
juju add-relation app1 app-reverse-proxy
juju add-relation app2 app-reverse-proxy

Note that older versions of haproxy couldn't handle this (before charm revision 23).

Here is the bug which tracked the fix:

https://bugs.launchpad.net/charms/+source/haproxy/+bug/1029078


Iptables rule do not drop all packets [UDP Filter]

The solution was simply to block that port in external firewall not from iptables. By blocking it in the external firewall the flooder now can't reach my VPS. You need to contact your support telling them to block source port "27015" UDP and they will do.

iptables not full effective but we can give it rating about 96 %.

Thanks for Doug Smythies he try helping me :)


This turned out to be the HP DV6 Pavillion Laptop I used at the time with AMD Display drivers, my eyes since recovered after swapping laptops.


What is the easiest way to merge / and /home?

I don't think there's an easier way. You need to copy the data from one partition to the other. You need to delete the old home partition and resize the root partition. That cannot be done on a running system, so a live CD or USB seems like as good as it gets.

Boot the live CD/USB.
Mount the root partition to /mnt/root.
Mount the home partition to /mnt/oldhome.
Copy the data using rsync:

sudo rsync -avz --hard-links --numeric-ids /mnt/oldhome/ /mnt/root/home

Open /mnt/root/etc/fstab and delete the entry for your home partition.
Unmount the root and home partition and reboot the system. If everything works as expected you can reboot again into the live system and then:
Open Gparted.
Delete the old home partition, resize the root partition.

That should be it.


How to create a unity launcher that does file-monitoring?

The following works:

Create 2 files: mylauncher.desktop and mylauncher.py with contents as given below.
Make mylauncher.desktop an executable.
Add mylauncher.desktop to unity's launcher.
Edit Foldernames and Folderlocations in mylauncher.py as necessary.
Run python mylauncher.py in the background. You'll have to add this to one of your start-up scripts.

Source: https://wiki.ubuntu.com/Unity/LauncherAPI

Contents of mylauncher.desktop:

[Desktop Entry]
Name=My Launcher
Comment=A,B,C if A else D,E,F
Exec=nautilus %U
Icon=nautilus
Terminal=false
StartupNotify=true
Type=Application
OnlyShowIn=GNOME;Unity;
Actions=;

Contents of mylauncher.py:

updateinterval = 1 #Update interval in seconds. Set it to a +ve integer.
#In Foldernames and Folderlocations, spaces shouldn't be preceded by \.
Foldernames = ["A", "B", "C", "D", "E", "F"]
Folderlocations = ["/home/prasanth/A", "/home/prasanth/B", "/home/prasanth/C", "/home/prasanth/D", "/home/prasanth/E", "/home/prasanth/F"]
#####################################

from gi.repository import Unity, Gio, GObject, Dbusmenu
import os, subprocess

def nautilusopen(junk1, junk2, location): #Function that opens `location` in nautilus. Equivalent to `nautilus location` in bash.
    subprocess.Popen(['nautilus', "%s" % location])

launcher = Unity.LauncherEntry.get_for_desktop_id("mylauncher.desktop") #You won't have to modify this, except if you rename `mylauncher.desktop`

#Code block A: This code block builds 6 quicklist entries, 3 for when A is found and 3 for when it isn't
QLentries = [Dbusmenu.Menuitem.new() for i in Foldernames]
for i in xrange(6):
    QLentries[i].property_set(Dbusmenu.MENUITEM_PROP_LABEL, "Goto %s" % Foldernames[i])
    QLentries[i].connect("item-activated", nautilusopen, Folderlocations[i])
    QLentries[i].property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
################

#Code block B: This code block creates 2 quicklists 1 for when A is found and 1 for when it isn't. Then it adds the first 3 quicklist entries to QLifA and the next 3 to QLifnotA
QLifA = Dbusmenu.Menuitem.new() #Quicklist if A is found
QLifnotA = Dbusmenu.Menuitem.new() #Quicklist if A is not found.
for i in xrange(3):
    QLifA.child_append(QLentries[i])
for i in xrange(3, 6):
    QLifnotA.child_append(QLentries[i])
################

#The rest of the code simply monitors the file system for A's existence and switches appropriately between QLifA and QLifnotA
prevState = None
def updateql():
    global prevState
    currentState = 'A' if os.path.exists(Folderlocations[0]) else 'notA' #currentState is 'A' if Folderlocations[0] (which is /home/prasanth/A) exists, 'notA' otherwise
    if currentState != prevState:
        if currentState == 'A':
            launcher.set_property("quicklist", QLifA)
        else:
            launcher.set_property("quicklist", QLifnotA)
        prevState = currentState
    return True

#GObject.timeout_add_seconds(updateinterval, updateql)
#mainloop = GObject.MainLoop()
#mainloop.run()

#If the 3-line commented block above worked as expected, the remainder of this script would be unnecessary. Unfortunately, it doesn't.
import signal
def alarmhandler(signum, frame):
    raise Exception('Alarm has rung')
signal.signal(signal.SIGALRM, alarmhandler)

mainloop = GObject.MainLoop()

while True:
    try:
        updateql()
        signal.alarm(updateinterval)
        mainloop.run()
    except KeyboardInterrupt:
        continue

EDIT: Use the following as mylauncher.py for the purpose mentioned in comments. Modifying to suit your needs should be straight forward and in case it isn't mention it in the comments.

from gi.repository import Unity, Gio, GObject, Dbusmenu
import os, subprocess

updateinterval = 1 #Update interval in seconds. Set it to a +ve integer.

#Quicklist entries if already mounted:
ifMountedEntry1text = """Unmount A""" #Text shown in the quicklist menu for this entry.
ifMountedEntry1command = """unmount A""" #Bash command to execute when entry 1 is clicked. Doubt if `unmount A` will work. Modify appropriately.

ifMountedEntry2text = """Open A""" #Maybe you'll want to open A directly from the launcher. Included just so you get a hang of how this works.
ifMountedEntry2command = """nautilus A"""
#Extend as required.

#Quicklist entries if not already mounted:
ifnotMountedEntry1text = """Mount A"""
ifnotMountedEntry1command = """mount A""" #Again modify `mount A` appropriately.
#Extend as required.

#My old file monitoring should work. But in case you want to change the criteria for modifying quicklists, it is better to do the following:
filemonitoringcommand = """if [ -d /folder/to/monitor/ ]; then echo True; else echo False; fi;""" #<Bash command>/<location to script> which prints 'True' if A is mounted, 'False' otherwise.
#####################

def systemcall(junk1, junk2, command):
    os.system(command)

launcher = Unity.LauncherEntry.get_for_desktop_id("mylauncher.desktop") #You won't have to modify this, except if you rename `mylauncher.desktop`

#Quicklist if already mounted:
QLifMounted = Dbusmenu.Menuitem.new()

ifMountedEntry1 = Dbusmenu.Menuitem.new()
ifMountedEntry1.property_set(Dbusmenu.MENUITEM_PROP_LABEL, ifMountedEntry1text) #Sets the text shown in the quicklist menu for this entry.
ifMountedEntry1.connect("item-activated", systemcall, ifMountedEntry1command) #Sets the corresponding bash command.
ifMountedEntry1.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
QLifMounted.child_append(ifMountedEntry1) #Adds the first entry to the quicklist

ifMountedEntry2 = Dbusmenu.Menuitem.new()
ifMountedEntry2.property_set(Dbusmenu.MENUITEM_PROP_LABEL, ifMountedEntry2text)
ifMountedEntry2.connect("item-activated", systemcall, ifMountedEntry2command)
ifMountedEntry2.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
QLifMounted.child_append(ifMountedEntry2)
#Extend as required.

#Quicklist if not already mounted:
QLifnotMounted = Dbusmenu.Menuitem.new()

ifnotMountedEntry1 = Dbusmenu.Menuitem.new()
ifnotMountedEntry1.property_set(Dbusmenu.MENUITEM_PROP_LABEL, ifnotMountedEntry1text)
ifnotMountedEntry1.connect("item-activated", systemcall, ifnotMountedEntry1command)
ifnotMountedEntry1.property_set_bool(Dbusmenu.MENUITEM_PROP_VISIBLE, True)
QLifnotMounted.child_append(ifnotMountedEntry1)
#Extend as required.

#The rest of the code uses `filemonitoringcommand` to monitor the filesystem and dynamically modifies (or rather switches between) quicklists.
prevState = None
def updateql():
    global prevState
    currentState = 'True' in os.popen(filemonitoringcommand).read()
    if currentState != prevState:
        if currentState == True:
            launcher.set_property("quicklist", QLifMounted) #If already mounted, sets QLifMounted as the quicklist.
        else:
            launcher.set_property("quicklist", QLifnotMounted) #Otherwise sets QLifnotMounted as the quicklist.
        prevState = currentState
    return True

#GObject.timeout_add_seconds(updateinterval, updateql)
#mainloop = GObject.MainLoop()
#mainloop.run()

#If the 3-line commented block above worked as expected, the remainder of this script would be unnecessary. Unfortunately, it doesn't.
import signal
def alarmhandler(signum, frame):
    raise Exception('Alarm has rung')
signal.signal(signal.SIGALRM, alarmhandler)

mainloop = GObject.MainLoop()

while True:
    try:
        updateql()
        signal.alarm(updateinterval)
        mainloop.run()
    except KeyboardInterrupt:
        continue


Can't adjust keyboard backlight on Asus ROG Strix G Laptop

If this link doesn't work try this one.

After downloading and extracting it to the home folder
run these

cd rogauracore-retool
autoreconf -i
./configure
make
sudo make install

Hope it works for you!!

To control

Usage:

sudo rogauracore COMMAND ARGUMENTS

Supported commands and usage:

single_static COLOR
single_breathing COLOR1 [COLOR2] [SPEED]
single_pulsing COLOR SPEED
single_colorcycle SPEED
multi_static COLOR1 COLOR2 COLOR3 COLOR4
multi_breathing COLOR1 COLOR2 COLOR3 COLOR4 SPEED
rainbow [SPEED]
brightness BRIGHTNESS

red         lime        turquoise   blue        magenta     hotPink
orange      green       cyan        indigo      pink        white
yellow      teal        skyBlue     violet      deepPink    black

COLOR argument(s) should be given as color names, or hex values like ff0000.
SPEED argument should be given as slow, medium, or fast, or integers 1 - 3.
BRIGHTNESS values should be given as off, low, medium, high, or integers 0 - 3.


Password Problem Can't find a solution that works?

Boot into a live CD/DVD/USB of Ubuntu.

Open up a terminal by pressing Ctrl+Alt +T and type in

chnage /dev/sda1 to your partition.

sudo mount /dev/sda1 /mnt

then type in this command.

sudo chroot /mnt

You can now use the passwd command to reset a password.

sudo passwd <user name>

that should change your password.

LiveCdRecovery


how to reduce size of an image from 31.1 kb to between 15kb - 20 kb

Use Gimp's 'Save for Web' plugin. You can download and install it manually, or just add the gimp-plugin-registry package from the Software Center which includes it (and many more).

Once installed, you just open the image in Gimp, select File -> Save for Web then play with the output settings until you have what you want. There are two tabs on the left. One is for image quality, one is for image size. You can even output the image in a different image format. As you make changes, the output file size (shown below the picture) updates. I use this plugin constantly and highly recommend it.

For me, the only problem is that with very large images it sometimes won't launch. If I resize down from say 100MB to a 10MB image size, it works fine.


Display flicker on movies, websites, animation on Ubuntu 13.10 / nVidia restricted driver

Finally I found the problem.

First, sudo apt-get install nvidia-settings because it isn't installed by default anymore. Then start it from the terminal, because it isn't added to the application menu anymore. Then disable flipping, whatever that is.

The fix works immediately when you remove the check from the box, no need to reboot.


What wireless network adapters are likely to work straight out of the box?

These links should help you find the one you're seeking:

https://help.ubuntu.com/community/WifiDocs/WirelessCardsSupported
http://www.linuxwireless.org/en/users/Devices/


Auth Log shows successful login from disabled user accounts

If i comment out one of my user in /etc/passwd and try to login with it, the auth.log sais:

Sep 24 14:23:08 myhost sshd[1178]: Invalid user Xuser from 1.2.3.4
Sep 24 14:23:08 myhost sshd[1178]: input_userauth_request: invalid user Xuser [preauth]
Sep 24 14:23:11 myhost sshd[1178]: pam_unix(sshd:auth): check pass; user unknown
Sep 24 14:23:11 myhost sshd[1178]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=remotehost.co.x

Manual edit of /etc/passwd and shadow is not recommended btw, do instead usermod -L Xuser instead. usermod -U Xuser unlocks the disbled account.

One possible scene i can think of is there is another user directory installed where the same users exists too. I mean something like LDAP or NIS/YP.


Because what you are installing is under a proprietary EULA, apt wants you to confirm that you know what you are subjecting yourself to.

Just hit <Tab> and you should see that  button highlighted. Then hit <Enter>. You should be fine.


How do I find what kernel module is behind a network interface?

On the command line run

sudo lshw -C network

For every network interface you'll get a section starting with *-network. Every section hast a logical name: line that contains the interface name and a configuration: line that contain the driver and some other information.


In my case these commands helped:

sudo apt-get install --reinstall libwpg-0.3-3
sudo apt-get install --reinstall libwpd-0.10

I found them thanks post:

  https://bugs.launchpad.net/inkscape/+bug/1639300

where recommended is the following iteration:

1) Find lacking library

ldd $(which inkscape) | grep "not found"

2) Find package containing this library

3) Install with flag --reinstall.


You can add a task-bar

Ctrl+Alt+t opens a terminal, then

sudo apt-get install tint2

reference

tint2 website

Looking for cool configurations?


Gnome settings

Actualy it should be possible to disable it by setting:

gsettings set org.gnome.settings-daemon.plugins.power active false

but for some reason it doesn't work anymore.

GNOME Shell extensions

However, there are GNOME Shell extensions that you may try to workaround it.

Icon Hider - may help you remove parts of gnome panel, but the battery icon is probably a part of aggregateMenu, so removing it will also remove whole power/settings menu
Extend Panel Menu - but with this exention you can split aggregateMenu into separate icons and then use extension's setting to disable one of them

Edit: beware, I found one of these extensions conflicting with my Ubuntu setup. I had to remove them because my Gnome desktop wasn't loading (I had only black screen with just cursor on it). In case it happens switch to anoher TTY, log in and type:

cd .local/share
mv gnome-shell gnome-shell.bak

then reboot

Pretending you are not on laptop

There's a APT package called laptop-detect.

  This package provides a simple shell script which attempts to determine whether it is being run on a laptop (or similar portable machine). It is mainly useful for installers.

While runing this script in debug mode:

laptop-detect -D

it brings the idea of tricking GNOME that you're not on a laptop.

It might be useful if you want to work on AC-only, with i.e. disassembled battery.

I won't tell you how to do this, but you might want to try to figure it out on your own, based on laptop-detect output.

One thing is for example /sbin/modprobe battery. So first step will be to blacklist this module with modprobe config.

Another thing is /sys/devices/virtual/dmi/id/chassis_type, but it's more tricky, because it's related to Linux kernel and changing this value may even require changing its source code somwhere in drivers/firmware/dmi-id.c. It's rather something for hardcore linux users ;)

Other places related to laptop battery (for the sake of google-searches):

/sys/class/power_supply
/proc/acpi/battery
/proc/apm


ffmpeg -i input.ogg -strict experimental -acodec aac output.aac

you can find ffmpeg in the official repository.


Google Chrome - Rendering Yellow Fonts with Green Border on HDMI Screen

Thanks to @Alvin Liang I was able to remove the weird green border, by just turning off colour management for the display.

Settings → Devices → Colour or Device Colour Profiles

Then restart Chrome for the updated setting to take effect.


Which version of the Intel Graphics Updater did you download? There are two most recent; v2.0.4 and v2.0.2. You want to be using v2.0.2 for Ubuntu 16.04, so if you have downloaded v2.0.4 that may be your issue.

v2.0.4 has been compiled for Ubuntu 16.10 whereas v2.0.2 has been compiled for Ubuntu 16.04. 16.04 does not have the libpackagekit-glib2-18 package in its repositories, so v2.0.2 is the latest supported version for 16.04.


There is a program for windows called easy bcd.

Install it when running windows and the proceed a described in the following link:

Download Easy BCD for window

How to Use BCD

I think this will help you to Insert ubuntu OS next of the windows7 in boot order.


Backing up hard drive with multiple partitions

You can use dd to back up the entire hard drive including the partition table.

BE CAREFUL WITH THIS COMMAND, AS YOU CAN EASILY OVERWRITE VALUABLE DATA!

To back up FROM an internal hard drive TO an external hard drive, you would run this in a terminal window:

dd if=internal-hard-drive-device-name of=external-hard-drive-name

where hard-drive-device-names are something like:

/dev/sda

/dev/sdb

/dev/sdc

etc...

If your hard drive is /dev/sda, and it has partitions /dev/sda1, /dev/sda5, /dev/sda6, the partitions ending in numbers don't matter if you are backing up the ENTIRE hard drive.  All you need use is the first part, without any number, which in this example is /dev/sda.

So if your internal hard drive is /dev/sdb and your external hard drive is /dev/sdd, you would type:  (please note you MUST figure out what YOUR device names are)

dd if=/dev/sdb of=/dev/sdd

You can use the already installed program called Disks to figure out what your hard-drive-device-names are.  Search for Disks in the Unity Launcher, and run it.  Then plug in you external hard drive, and take note which device name gets assigned to it.  You can do this by clicking on one of it's partitions, and looking for the part that starts with /dev/.  You can also click on the other devices in the left column, and figure out which one is the internal hard drive you want to back up.

Of course, the backup hard drive would have to be as large, or larger, than the failing hard drive.  If the backup hard drive is larger, you will only see the size of the failing hard drive when you mount the completed backup.  This is because the partition table gets copied over, just like you wanted.  You can resize partitions using GParted if you feel the need.

You can also save the backup hard drive to an image file by typing this:

dd if=internal-hard-drive-device-name of=NameOfHardDriveBackupFile.img


Does the Ubuntu Server iso support full disk encryption out of the box?

I have tried the Ubuntu 13.04 Server ISO. The installer does offer the option to create an Encrypted Volume.

I can't confirm that it works properly, since I am having some issues with grub2 and dual-booting.

EDIT: This answer offers working command line instructions for encrypting the filesystem root.


How to make Firefox look more like the current GTK theme?

In my case, Firefox ESR 78 ignores system GTK3 theme set in ~/.config/gtk-3.0/gtk.css as well as returned by:
gsettings get org.gnome.desktop.interface gtk-theme

This is most noticeable by a vertical scrollbar on a long page having the default GTK3 Adwauta theme look. Other GTK3 app use the proper theme and doesn't have this issue.
The fix is to launch Firefox with the following command line:
GTK_THEME=My firefox-esr`

Or to make it permanent, you could add the following lime to your ~/.profile:
export GTK_THEME=<Your theme name like Adwaita:dark>


Is there a way to get OSX style file previews in the file browser?

There is a program that I think do the thing you asked for (not 100% sure since I never used OSX), it's called sushi.
It basically open a windows giving you preview of all files and directories pressing the spacebar.
It is in the default repository so to install use can type in a terminal

sudo apt-get install gnome-sushi

and you have to restart nautilus:
type in the terminal

nautilus -q

to close it and click on the home folder icon on the dash to start it again.


Sudo Not Working for Node and NPM Install

AWS did some tinkering with the normal setup so that you can do npm install global packages without doing sudo. Normally npm and node comes with the nodejs package in Ubuntu and they are installed to /usr/bin and global node modules are put in /usr/lib/node_modules.

After you install nodejs in Ubuntu 18.04, you can check where they are located.

$ dpkg -S /usr/bin/npm
nodejs: /usr/bin/npm

$ dpkg -S /usr/bin/node
nodejs: /usr/bin/node

$ dpkg -L nodejs
<output very long and not included here>

I'd suggest not to use sudo if you want to stick with how AWS wanted you to od things, even when specifying -g in package install. Alternatively, you can install nodejs from Ubuntu normal repo and use sudo whenever you need to install npm packages such as bower, gulp to be accessible globally.

Edited: If you want to use the latest nodejs in older Ubuntu version, e.g., 16.04, follow the instruction from nodejs.

curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get install -y build-essential

The last step allow basic compilation to work when you do npm install. I guess the answer to your original question is that sudo won't work because the nvm environment is setup for ubuntu and sudo messes it up.


fingerprint sensing device, driver installed, still not detected

Here's how it got solved,

Download driver from here.
Extract and install according to manual present in the compressed file. (EN eNBSP SDK for Linux Programmer's Guide DC1-0042A Rev E.pdf)


What is the weby-icon-cache folder in my home folder?

Launchy stores its icon cache there.
If you're using it - leave it be, if not - delete.


I find that the following works for me with snmp and snmpd installed on my system:

$ snmpget -m SNMPv2-MIB -v 2c -c public 127.0.0.1 1.3.6.1.2.1.1.3.0
SNMPv2-MIB::sysUpTime.0 = Timeticks: (1422579) 3:57:05.79

There seem to be various overlapping MIBS, so I think it may be necessary to specify which module you want with the -m option.

The following also works:

$ snmpget -v 2c -c public 127.0.0.1 SNMPv2-MIB::sysUpTime.0
SNMPv2-MIB::sysUpTime.0 = Timeticks: (129146) 0:21:31.46

So it seems that if you specify a numeric OID  without specifying a MIB module snmpget returns a numeric display, but if you qualify the request with a symbolic reference to a particular MIB that MIB definition is used to interpret the response.

See also man snmp.conf


Ubuntu One allows you to share folders with others, with the choice of whether or not to allow them to modify the folder.

To share a folder, go to https://one.ubuntu.com/files and open the folder you'd like to share (you need not navigate anywhere to share the root directory of your Ubuntu One storage). Then click on Share this folder, enter the emails of those whom you'd like to share with, and check or uncheck Allow modification according to your preference.


PHP Memcache Extension Incomplete on Ubuntu 12.04

Fairly common issue in my experience, you actually want php5-memcached (note the d on the end). This should install it and remove the confusingly awful php5-memcache:

sudo apt-get install php5-memcached php5-memcache-


You can also use the terminal way.

sudo -i gedit /etc/default/grub

There is an option in the text file. GRUB_DEFAULT=0 . This implies the first line of the grub list while booting. Count from 0 to the OS you want to be default. For example;

0 - Ubuntu Server

1 - Recovery Options

2 - Windows os

3 - Ubuntu Desktop

You should set GRUB_DEFAULT=3

Than give sudo update-grub2 command.
Restart.


Where is my Java compiler 1.8, in Eclipse?

Older version of Eclipse does not support Java 8.

Eclipse Kepler SR2 & Eclipse Luna are the versions will support Java 8.

You can download Eclipse Luna from this link.

And Eclipse Kepler SR2 also supports Java *, see this link.

See this link to know how to install Eclipse Luna.


Disable GRUB setting itself to the first boot option on updates

You might be able to patch /usr/lib/grub/grub-multi-install to add --no-nvram to the arguments of grub-install.  The postinst scripts for several packages call grub-multi-install.
I dug into this before on this Q: How do I get grub-efi-amd64-signed to not automatically overwrite NVRAM on update


F-Spot can make some of the things you are asking for (though not all)

On the other hand, and though this is not an answer to your question, but eventually, and hopefully, it will be. There's a project called DarkTable, which is being developed as a substitute of Lightroom. The print interface, however, is still in the list of future features, but it's promising. More info: http://darktable.sourceforge.net/features.shtml

Edit:

What about gthumb?:

Up to 600 dpi
No standard sizes, but customizable ones
Paper tray selection in the print dialog (cups, I think)
Can do grids, but you can't mix grid sizes (you can mix photo sizes, but within the cell grid -meaning they will be adjusted to the cell size, but you can't select each image's size-)...
Guess you can print several times with same settings (you can't save settings, tho)
Can't test the borderless, as my printer is not capable of doing such a print :(. GThumb's dialog does allow you to set margins to 0, but I can't test it...

Try Geeqie, too...

Unlimited dpi
Same as before, you can customize paper size
You can't select paper tray (a workaround is print in Postcript, open the .ps file and print with the printer settings dialog customized to your likings)
You can print images in a grid, too (all cells same size, as before)
You can keep the settings for several prints
Again, can't test the borderless printing, but it allows you to set margin to 0... so maybe?

Have you tried Digikam?


Boot failure after upgrading to Ubuntu 15.04

Maybe grub is configured badly:

Create a super grub2 disk (http://www.supergrubdisk.org/super-grub2-disk/) usb drive.

Boot from the usb drive and try to start ubuntu.
If it works, run   update-grub and try booting without the usb drive.


Upgrading to 16.04.3 LTS Caused Loss of Dual-Boot Ability

you can try editing the /etc/default/grub file so it looks like this:

GRUB_DEFAULT="0"
#GRUB_HIDDEN_TIMEOUT="0"
GRUB_HIDDEN_TIMEOUT_QUIET="false"
GRUB_TIMEOUT="3"

Once set up like this you can save the file and run sudo update-grub
this should give you the menu at boot for 3 seconds .. you can change the timeout to your liking