python ctypes and pulseaudio segfault after upgrade to 12.04

Finally fixed it. The moral of the story: be careful about copying code off the internet that "looks right" but you haven't really worked through yourself.

The sample spec struct buffer string above is actually a slight modification of the code to  How do I write raw bytes to a sound-device?  - it forces native byte order but no alignment via the "=", unlike the original code which has native byte order and alignment (like a C implementation would have). I can't remember why I would have ever done that. However, neither works, and I can't understand how things possibly worked before. First, "L" on a 64-bit system is 8 bytes, whereas the pulseaudio code (pulse/sample.h) is using 32-bit (4 byte) integer types for the first 2 fields of the struct. Second, using c_buffer without a length argument is adding a null terminator, actually increasing the length of the buffer representing the struct by one byte.

You would think fixing this would make everything happy, but no. I created a buffer using the bytes generated vs dumping the memory from an equivalent C program, and still no dice. Something must be going on in ctypes. After actually reading the ctypes page  from start to finish rather than just skimming it for what I need, I settled upon the following more ctypes-strict implementation, using an actual Structure subclass (and passing null pointers as "None", which doesn't change things but is still nice):

import ctypes
import struct

PA_SAMPLE_FLOAT32LE = 5
PA_STREAM_PLAYBACK = 1

pa = ctypes.cdll.LoadLibrary("libpulse-simple.so.0")

class SampleSpec(ctypes.Structure):
    _fields_ = [("format", ctypes.c_int), ("rate", ctypes.c_int), ("channels", ctypes.c_byte)]

pa_sample_spec = SampleSpec(PA_SAMPLE_FLOAT32LE, 44100, 2)

error = ctypes.c_int(0)

s = pa.pa_simple_new(None, "Python", PA_STREAM_PLAYBACK, None, "Test", ctypes.byref(pa_sample_spec), None, None, ctypes.byref(error))

No segfault, and all my old code to pump audio through this works. Phew!


Running Threadripper 3960x and Ubuntu upgraded kernel to 5.8 - have had to revert back to 5.4

There was no need to disable kernel upgrades. If linux-generic package is installed it will get upgrades for bug fixes and security.
It is normal to stay with these kernels. If you don't install new hardware there is no reason to upgrade to another major kernel especially when you have problems with the 5.8 now.


If u set root hard nofile 65535 it will only change root users limit.
If you want to change another users limit add that users username for example,

sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.


Create the file /etc/acpi/local/lid.sh.post and add the following to it:

#!/bin/bash
grep -q closed /proc/acpi/button/lid/*/state
if [ $? = 0 ]
then
/usr/sbin/pm-suspend
fi

Make the file executable with chmod +x lid.sh.post and your problem should be solved.


Beginning with Wine 4.5 the wine-devel packages from WineHQ require libfaudio0 as a dependency. The Wine Wiki suggests that both i386 and amd64 libfaudio0 packages should be installed and I illustrate the required steps for Ubuntu 18.04 Bionic Beaver, although similar steps should work for 18.10 and 19.04:

For Ubuntu 18.04 first download both required Debian packages:

cd ~/Desktop
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/amd64/libfaudio0_19.07-0~bionic_amd64.deb
wget https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/i386/libfaudio0_19.07-0~bionic_i386.deb

if the links are broken, you can still find the files from here, you just need to open the i386 and amd64 folders to find the updated files.

Next install the two files and then attend to some missing files:

cd ~/Desktop
sudo dpkg -i libfaudio0_19.07-0~bionic_amd64.deb libfaudio0_19.07-0~bionic_i386.deb
sudo apt --fix-broken install

And now you should be right to install and run the very latest versions of Wine from WineHQ!

References:

Wine Wiki: Ubuntu:  The definitive word on how to install WineHQ packages
FAudio for Debian and Ubuntu: Links and details on how to install the new requirements of libfaudio0


Ubuntu 16.04 Gnome: Nvidia Prime problem when switching to Intel Mode

I have the same issue with Gnome Ubuntu 16.04. I think I found a workaround.

At login open terminal:

sudo prime-select intel
systemctl restart display-manager
Log in and go.

I am not sure if the power savings are there yet. Trying to confirm.


Can't install RuneScape (tried Ubuntu client and Wine)

Try this

The unofficial Linux client is a bundle of perl scripts that replicate the Windows client behaviour like reading the parameters to use from a .prm text file and also, it makes sure that OpenGL works when using Java7/OpenJDK7 which, according to its developer, is an issue for Linux users due to Java being unable to find its own libraries without wrapping it inside the LD_LIBRARY_PATH. Without this, Linux users would have safemode available as the display mode, which gives about 4fps.

The package also includes a RuneScape Client Settings GUI which lets the users change some script and client settings, as well as a jagexcache cleaner.

Install the unofficial RuneScape Linux Client

runescape

To install the unofficial RuneScape Linux/Unix Game Client in Ubuntu 12.10, 12.04, 11.10, 11.04, 10.10 or 10.04, use the following commands:

sudo apt-add-repository ppa:hikariknight/unix-runescape-client
sudo apt-get update
sudo apt-get install unix-runescape-client

Note: the "unix-runescape-client" package is a dummy package which will install OpenJDK if it is not installed so if you want to use a custom Java package (Sun/Oracle Java) without installing OpenJDK you can just install the "runescape" package instead.

There is also a video on how install the RuneScape client in Ubuntu, HERE.

After the installation completes, run RuneScape from the menu / Dash. The first time you run the RuneScape launcher, a terminal window will be displayed which lets you select the official (.jar) client you want to use and once the download finishes, you can launch RuneScape.

The unofficial RuneScape Linux/Unix Game Client developer mentions that the game runs dramastically faster in 32bit Java than on 64bit Java on Linux because the client jvm (hotspot client) is not available for 64bit.

There are some known issues when running RuneScape on Linux, but there are also some fixes available - check them out on the RuneScape wiki.


How to set up a mail server which I can then use with email clients?

Postfix will handle smtp. That is: postfix is a server that handles receiving and sending emails. When I (frobenius@otherserver.com) what to send email to you (you@yourserver.com) that will cause otherserver.com to talk to postfix on yourserver.com . Same thing the other way. If you want to send email to me, that will cause postfix on yourserver.com to talk to otherserver.com

Now IMAP is just a convenience. It will allow you to access your emails on other computers (than yourserver.com). You can think of emails as files in yourserver.com, and thunderbird just reading a remote directory (that is in yourserver.com)

My advice: Install postfix first, without dovecot. Test it (read and send email via the command line of yourserver.com). Then worry about IMAP.


thunderbird not updated to 52.3 on xubuntu 16.04

There doesn't exist any update yet in the official repositories, for any release. 52.2.1 is the latest version you can get.

See https://packages.ubuntu.com/search?keywords=thunderbird

You have to wait until a package update is provided. If there really is a security threat, this will probably happen pretty quickly.

If you are really concerned, you might e.g. try finding a PPA or installing Thunderbird from source, but I don't think it will be worth the hassle.


When I open a terminal session it shows ~$, how can I solve it?

~ (a home folder) has always been the default one. If it had been different to you, that means your home folder did contain overriding config file.
If you really want to start with another folder, open Edit - Profile - Edit,  and there, in Custom command field enter bash / for example.


How to make all file shares without passwords?

From my samba config, this makes a public share

[videos]
comment = Videos
path = /media/external/videos
public = yes
writable = yes
create mask = 0660
directory mask = 0770
force user = mythtv
force group = mythtv
browseable = yes


Plymouth doesn't work with binary released drivers....there's a solution but it involves a bit of legwork.  For a scripted solution try this: http://www.webupd8.org/2010/10/script-to-fix-ubuntu-plymouth-for.html


Brightness Controls Serious Lag Ubuntu 15.04

I have the same problem now. My brightness controller was running fine on Ubuntu 14.10. But recently u upgraded to Vivit and now it's extreme laggy like you said. I have a 4th gen laptop.
I think the kernel is responsible somehow for our graphic cards driver because when i upgraded to Linux Kernel 3.19 on Ubuntu 14.10 i got the same issue and then i reverted back to the original one. But now 15.04 is using kernel 3.19 which may be causing this problem.
Maybe someone has a solution for us :)


Update from 14.04 to 16.04 - PHP version

If you want to hold back a package version while upgrading, use

echo "package hold" | sudo dpkg --set-selections

to remove the hold back and upgrade the package, use

echo "package install" | sudo dpkg --set-selections

OR,

To hold    sudo aptitude hold package_name

To unhold    sudo aptitude unhold package_name

Here, replace 'package' with the exact package name. Hope this helps


Selecting from list like array (without name by number)

Here is a one liner:

for something in $( ls );do echo $something;done

Or using select:

select item in $( ls );do echo $item;done

You could replace echo with rm and it would remove the item that you selected. You could then press ctrl+c  to stop the loop.

Output:

bob@bob-p7-1298c:~$ select item in $( ls );do echo $item;done
1) adifferentlikethis    6) Documents       11) initramfs       16) MESVG20.xlsx    21) out.png     26) racket      31) t~          36) Untitled        41) VMs
2) bash_speakit      7) Downloads       12) irssi_log       17) MLGVG17.xlsx    22) output.mp3      27) run.py      32) Templates       37) Document
3) color_img.jpg     8) ec2         13) likethis        18) MLRVG17.xlsx    23) php5        28) run.sh      33) test        38) 1
4) DATES         9) examples.desktop    14) lpr         19) Music       24) Pictures        29) space.txt       34) t.sh        39) Videos
5) Desktop      10) grub.iso        15) MEEVG19.xlsx    20) nano.save       25) Public      30) t           35) Untitled-2.pd   40) VirtualBox
#?

I then enter a number and it will echo it back to me.

#? 2
bash_speakit

Another Possibility:

thearray=( $(ls) )
echo "${thearray[2]}"

Output:

color_img.jpg


Make Ubuntu acknowledge that a custom built version of PHP is installed

This is a problem when your compile from source or install a package outside of apt (apt-get).

Probably the easiest solution is to use checkinstall

sudo apt-get install checkinstall

Then make and install php

make
sudo checkinstall

checkinstall creates a .deb from your source code, then installs a .deb, so apt will then acknowledge php is installed.

See https://help.ubuntu.com/community/CheckInstall


Found the configuration for the second display was stored on:

~/.config/xfce4/xfconf/xfce-perchannel-xml/displays.xml

simply delete this file.


No audio device detected for an Asus X206H netbook under ubuntu 16,04, what should I do?

There is no sound at the moment because of some I2C issues, the drivers of the backtrail cpu are necessary to get the realtec soundchip running. You can follow this thread, the drivers of the X205TA should be the same and the guys there are working very hard to get that sound out of that bunch of hardware.
https://ubuntuforums.org/showthread.php?t=2254322&page=123

EDIT:
Sorry its not the same one, but Pierre Bossart informed the community that intel will release a working codec driver soon, so be tuned :)
https://bugzilla.kernel.org/show_bug.cgi?id=115531#c18


How to save files from a live usb boot to computer?

Persistent live with a casper-rw partition in the internal drive

You can create a persistent live drive with mkusb according to the following links,

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/persistent
Ubuntu will search for a file with the name casper-rw or a partition with the label casper-rw, and use the first one that it finds. So you can

remove or re-label the casper-rw partition on the USB pendrive (created by mkusb),
In Windows shrink the Windows partition (typically C:) and leave the freed drive space as 'unallocated'.
Boot live-only from the Ubuntu live drive, 'Try Ubuntu',

start gparted and

create a partition in the unallocated drive space and
in the partition create an ext4 file system
set the label casper-rw on this partition

Now, when you reboot the Ubuntu live drive, you should be able to boot persistent live and it will use the casper-rw partition in the internal drive. It should be possible to install your large programs and they are stored (automatically) in the casper-rw partition in the internal drive.

Test that it really works

As you can see in the screenshot, the casper-rw partition in the internal drive /dev/sda is 49 GiB, and it is used for persistence. The operating system is running from a [16 GB] USB pendrive /dev/sdb, where the automatically created casper-rw partition is re-labeled to casper-off.


Is Nvidia drivers updated each Ubuntu version?

If your graphics card is old, there is a chance Nvidia does not update its drivers any more.  In that case the driver version remains the same.  You can go to http://www.nvidia.com and check what the latest version for your card is and the date it was released.

Running Additional Drivers usually shows you the latest driver available for your card in the repos.

Additionally, if you find out that Nvidia has released a later driver than the one in the repos, you can check here if it exists and install it manually by adding the ppa to your system and following the standard installation procedure.


apt error message ubuntu virtualbox guest

I FIXED IT i was sooo stupid. so i was unable to access the website for reasons then i fixed it and BOOM
I am sooo sorry for the inconvenience


How do I variabilize x value in KERNELS==x condition of my udev rule?

Instead for trying to load the condition value, leave it to your script to load that value and make decision if it should execute the required instructions.

You can know from which PCI by checking the environment variable DEVPATH

DEVPATH=/devices/pci0000:00/0000:00:19.0/net/eth0

or pass either $devpath or %p (path value) as argument to your script.


Sluggish Desktop Experience on Laptop with External 4K Monitor

You can install Nvidia proprietary driver and switch to Nvidia adapter.

Run in terminal

sudo apt-get install nvidia-346 nvidia-prime

and reboot.

You will be able to switch adapters in Nvidia Settings application.

You can also toggle adapters by running

sudo prime-select nvidia

and

sudo prime-select intel

You will have to log off and on to apply the selection.

For this new adapter you can try a newer driver. Run in terminal

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-352 nvidia-prime
sudo add-apt-repository -r ppa:xorg-edgers/ppa

and reboot again.


Unable to use new SATA 3TB drive in Ubuntu 12.04


Is there a way to find duplicate images in Ubuntu?

diff will help you find duplicate files in two different directories, but if your mess is greater or if, for any other reason, you want to find duplicate (exact) image files in a whole directory, including subdirectories, you can use the gthumb image browser viewer, which is probably already installed in your system.

Gthumb provides a tool to search for duplicate media/audio/video/images/text/all files in a directory. To do this, just select your directory in the view mode that displays a left pane with your directory tree, and then, from the menu select Edit>Find duplicates... a dialogue window shows the duplicates and lets you choose which file(s) to delete. This procedure is visual and helpful in many cases; but it is slow, if you have too many duplicate files to delete.


Perhaps all you want to do is:

exec ./test.sh

This replaces your current shell process by the script, so that when it finishes there is nothing left to run.


cannot get grub/boot after Ubuntu install on surface pro 3

It looks like you've got a flaky EFI that's forgetting its settings. I recommend you look through the firmware's options to see if there's one to reset its options to the factory defaults. (Such an option usually exists.) If so, use it, then try either running Boot Repair again or re-install rEFInd (boot to Ubuntu in any way you can and run sudo refind-install). The idea here is that EFIs sometimes go "out to lunch" when cruft builds up in their NVRAM settings, and resetting them to the defaults sometimes revives them.

If that fails, look at the EFI/Boot directory on the ESP (that is, /boot/efi/EFI/Boot in Ubuntu) in more detail. Your Boot Repair output shows that this directory exists and holds a bootx64.efi file. This program should be launched as a fallback when everything else fails, but clearly you're not getting to GRUB. Other files in the directory might provide a hint about what the bootx64.efi file is -- there may be a configuration file or well-known filename. It could be that EFI/Boot/bootx64.efi a leftover Microsoft program, which could help explain things; deleting it might be in order in that case. You could also try putting either GRUB or rEFInd there -- copy the EFI/ubuntu or EFI/refind directory to EFI/Boot and then rename the boot loader (grubx64.efi or refind_x64.efi) to bootx64.efi. The result should be a system that boots.


Wireless in HP Pavilion G4 2210la does not start with ubuntu 21.10

Go to Windows, turn on Wireless, and come back to Ubuntu.

Now you should be able to work with wireless.

But I don't think you can control wireless with the wireless key in Ubuntu.

Atleast it doesn't work for me.


yes

sudo updatedb

then

locate foo

see http://www.linfo.org/locate.html

You can also use find

find /usr -name foo

see http://content.hccfl.edu/pollock/unix/findcmd.htm

For a graphical tool see Software for text search in files


Good NVidia drivers for a GeForce GT 330M on a VAIO laptop?

This is very specifically an issue with Sony VAIOs. The latest nvidia drivers should work but there's an EDID detection issue (how the video card finds out the monitors supported modes).

This post should provide a fix and there's a handy link at the bottom for ironing out any other quirks:

  What I found was that Lucid's kernel
  (I believe all >= 2.6.32 kernels) has
  built-in driver for nvidia, called
  "nouveau". This one is built right
  into initrd image and is the one that
  causes the workspace to be bigger than
  the actual screen.

  Naturally I though of installing
  invidia drivers instead of nouveau,
  but that wasn't easy. I couldn't
  unload nouveau in any way (I believe
  because it's built-in and not shipped
  as module) and with nouveau loaded
  nvidia's installer would fail.

  So what I had to do first, was to
  disable the nouveau driver. I did it
  by putting the following parameter to
  /etc/default/grub:
  GRUB_CMDLINE_LINUX="nouveau.modeset=0".
  Then I had to invoke sudo
  update-grub.

  Having added this parameter, I
  rebooted and got 800x600 resolution,
  bacause now there was no driver in
  kernel to support the 330M GPU (but
  naughty nouveau was finally gone!).
  Switching to command-line mode by
  sudo service gdm stop and by
  installing nvidia latest drivers
  (195.36.24) I almost got it done, but,
  not yet. Original nvidia driver
  loaded, but failed to correctly draw
  anything on the screen.

  After searching a bit I found on the
  page linked in the bottom of this post
  that Sony Vaio F's LCD panel EDID
  isn't recognized by nvidia drivers
  automatically, so you have to "help"
  drivers in this matter: after
  finishing installing nvidia drivers
  (and before the reboot) you have to
  add the following lines to "Device"
  section of xorg.conf:

  Code:

Option         "ConnectedMonitor" "DFP-0"
Option         "CustomEDID" "DFP-0: /proc/acpi/video/NGFX/LCD/EDID"

  and only then reboot. You'll be happy
  to see log-in screen in fullhd!

  NVidia's driver still behaves
  strangely on my Sony (no sound over
  HDMI, poorly working display backlight
  settings, no ability to switch to text
  mode via CTRL-ALT-N (1-6)), but
  general functionality is ok, including
  native fullhd desktop resolution, 3d
  acceleration etc.

  PS A lot of Sony-Vaio F Series related
  problems in Linux are discussed here:
  http://code.google.com/p/vaio-f11-linux


How to start MongoDB server on system start?

According to the comments, on Ubuntu 18.04 LTS this seems to be the solution:

systemctl enable mongodb.service

Thanks to @Adam. I had the same "problem" on Debian jessie, and my solution there was:

systemctl enable mongod.service

Maybe they changed the name of the service.
I think in Ubuntu it's the same.


Filtering between 2 sub-networks with UFW?

You are setting up filtering to and from the machine working as the router, but nothing about how it should or shouldn't forward traffic through the router.
To do that, you need to set up FORWARDING rules in the firewall. I belive that ufw has support for that now, using the forward keyword.
Please read the documentation for ufw, like the man page, documents in /usr/share/docs/ufw or the programs web page for more information. I don't currently have an access to a computer, so I can't help you with some examples.

But in short. There are three different paths in a firewall that you have to handle. Packages/traffic IN to your router. Packages/traffic OUT from your router. Packages/traffic that is going through your router, that is FORWARDED by the router. They are each filtering independently by each other.

Your examples is all about filtering traffic IN to your router.


Is it safe to upgrade from Ubuntu 16.10 to 17.04?

just did the upgrade from 16.04 to 16.10 to 17.04. Had an issue with the network manager not starting on 16.10. The upgrade from 16.10 to 17.04 was smooth but I'm having some issues with my VPN service at the moment. My network connection has been stable though. I used the software & update UI but you can follow the official upgrade doc: https://wiki.ubuntu.com/ZestyZapus/ReleaseNotes


Use the program: unetbootin

Install it if you don't already have it.

Click Diskimage>ISO  Then navigate to ISO.

This makes a static version, like a LiveCD so it is unchangeable.

To make a version you can add to you need to make a "persistent" USB stick. Look here: https://wiki.ubuntu.com/LiveUsbPendrivePersistent


Can't upgrade from Kubuntu 18.04 LTS from Kubuntu 20.04 LTS

This was likely caused by:  Unofficial software packages not provided by Ubuntu.
Please use the tool 'ppa-purge' from the ppa-purge package to remove software from a Launchpad PPA.
And try the upgrade again.
grep -i ppa.launchpad.net /etc/apt/sources.list.d/*.list

This will give the ppa list
The path of the PPA needed to uninstall it with ppa-purge, is the text found between ppa.launchpad.net and ubuntu.
For example, to:
http://ppa.launchpad.net/jrm-smnt/ppa/ubuntu

PPA path is: jrm-smnt/ppa
So, in ppa-purge you are going to put:
sudo ppa-purge ppa:jrm-smnt/ppa

For each ppa.


machine when to sleep while updating, process seems stuck

seems it going to sleep had very little to do with getting stalled on "preconfiguring packages." I killed the process and investigated in Synaptic -- something seems to have been contracting itself in terms of dependencies, related to Python 3.3 and/or the replacement of Gwibber with "Friends." I'd be curious if others who had been using the dev branch of 13.04 up to now and installed the beta updates experienced the same issue, but in any case, I beat on it for a little while and then it installed updates just fine.


Bitnami LAMP - Can't connect to localhost

Ok so i figured out that all the project must be under apache2/htdocs that's why I was unable to reach my project.


VPNC connect via additional SMS passcode?

Finally I managed it with console version of VPNC. This version asks for additional passcode after entering username and password.
Unfortunately no support via the plugin in ubuntu :-(


How can I put gVim in my gnome-shell favorites?

Make a file called ~/.local/share/applications/gvim.desktop and copy the following into it:

[Desktop Entry]
Name=gvim
GenericName=Text Editor
Comment=Edit text files
Keywords=Plaintext;Write;
Exec=gvim %U
Terminal=false
Type=Application
MimeType=text/plain;
Icon=gvim
Categories=Utility;TextEditor;

It should now be in the applications list and you can add it to the favorites bar like any other application.


How do I get vim to indent all HTML tags?

Make sure you have the full vim installed:

sudo apt-get install vim

Then make a file named ~/.vimrc with the following contents:

filetype plugin indent on

Then it should work.

UPDATE (source of the update)

In the 7.4 version the indentation file was changed, that is what causing problems. The new indentation doesn't indent every html tag, but you can specify which tags to indent by using:

:let g:html_indent_inctags = "html,body,head,tbody"

in vim, or without the : in ~/.vimrc as always. (Of course put those tags in the list which you want to be indented.)

Or you can just swap back the older version of indent file in place of the newer one. In 12.04 the old indent file is located in /usr/share/vim/vim73/indent/html.vim so I guess for the 7.4 version the file is located in /usr/share/vim/vim74/indent/html.vim. Or to override it only for your user and keep it safe from updates put it in ~/.vim/indent/html.vim


Most computers come with one physical hard drive installed in them. If the computer comes with a pre-installed version of Windows, there will be multiple "drives" seen in Explorer, under Computer or This PC, such as Windows (C:), Recovery (D:) and Data (E:). A disc drive might show up as F:.

The "drives" you see here, however, are not actually each individual hard drives. They are called partitions. Partitions are sections of your hard drive and are essentially mini or virtual hard drives. Windows calls these partitions "Disks" or "Drives" so as to not confuse people.

Ubuntu works a little differently than Windows in this regard. Instead of pretending that each partition is its own physical hard drive, Ubuntu recognizes that they are partitions, and names them as such. When Ubuntu refers to a "Drive" or "Disk" (not disc), it is referring to the physical storage medium (the hard drive).

Partition/Drive labeling on Ubuntu is also different from Windows. Physical devices get a letter, but in a different way. For example, C:, D: and E: become sda1, sda2 and sda3. The number refers to the partition number; 1 is the first partition on the drive, 2 is the second, 3 is the third, and so on. If there is more than one drive in the computer, you may see partitions listed as something like:

/dev/sda1
/dev/sda2
/dev/sda3
/dev/sdb1
/dev/sdb2

The letter to the left of the number refers to the physical hard drive. sda is the first hard drive in the hardware order and sdb is the second. It doesn't matter which you plug in first. If your plug a drive into the secondary port on your motherboard, it will be labelled sdb.

When you chose to "wipe disk and install Ubuntu," Ubuntu didn't automatically read your mind and know which partition to erase, it erased the whole hard drive and installed Ubuntu in a new partition that takes up the whole hard drive space, except for a tiny other partition for boot files.

Your file manager doesn't show C:, D:, E: and F: for two reasons. One, Ubuntu doesn't label devices like that. Two, you erased your whole partition, essentially destroying all information on it, before you installed Ubuntu.

Maybe you're thinking that it's stupid for Ubuntu to label stuff so differently from Windows, but Windows is actually the cause for confusion here. Pretty much every other OS, including Mac, lists hard drives in terms of physical devices and partitions, not the unifying and confusing way Microsoft decided on.

Further reading on partitions: http://www.howtogeek.com/184659/beginner-geek-hard-disk-partitions-explained/


Trouble connecting to the internet, strange IP problem

It seems like your NIC failed to receive an IP properly from your DHCP server. Check to make sure DHCP is enabled on your router, and that you don't already have a static IP reserved on your router for your device.

From superstition, I don't know if it actually does anything:
It may be best to power cycle your router and machine after connecting to the network.

More about 169.254.0.0 IP addresses here.


How to find the path of a freshly mounted USB Drive dynamically?

An easy way would be to use UUIDs.  Each partition has a unique address which you can use in your scripts.

ls -l /dev/disk/by-uuid

This command shows the UUID for each drive currently mounted as a symlink to the partition (a USB drive can have more than one partition)

These codes are generated randomly and have enough entropy that they're not likely to ever collide, except for FAT32 partition (which only have a string of eight hex digits, so 8^16 = 281,474,976,710,656 choices)

You may want to check out the blkid and findfs commands too.


How to find out which application is sending notifications?

I'm running 16.40. My default browser is Firefox. I found it in settings under privacy -> notifications where it was allowing web-push notifications from certain websites that I must have agreed to have received notifications from, not knowing that they could push them through even though the sites pages aren't loaded. (https://support.mozilla.org/en-US/kb/push-notifications-firefox?as=u&utm_source=inproduct).


Is Ubuntu better on battery than other OS's?

Ubuntu uses more power on laptops than Windows 7 does, according to wikipedia. As wikipedia puts it: "Ubuntu has also been criticized for its poor battery life on Laptops and Netbooks, even as OEM on devices such as Asus's eeePC, when compared to Microsoft Windows 7, with Ubuntu having been shown to use between 14-56% more power. Ubuntu's developers have acknowledged and sought to solve the issues of power consumption in future releases."

However, to save battery life, some tricks are to turn down screen brightness, and when not needed, turn off WiFi or bluetooth. Hope this helps!


Getting error message when trying to start a virtual machine

Wierdly, for me it worked by closing VirtualBox and then running

sudo modprobe vboxdrv

from the terminal and then restarting VirtualBox


Try this:

if [[ "$thisvariable" = "yes" ]] && grep -q 'this string' ./"${thisfile}".txt; then


How do I access a WUBI install after installing a third OS alongside Windows?

This is how it works with my Ubuntu 11.10-Windows 7-Wubi install.

My GRUB menu has entries for 11.10 (which is its own partition), as well as my Windows 7.

When I want to access my Wubi install, I select Windows, and then there is another entry to access my Wubi install or boot Windows. Here is a video of how this works.


Rename files in a directory based off of the text contained within a text file

How about

n=1
while IFS= read -r newname; do
  printf -v oldname 'Track %d.wav' $((n++))
  echo mv -vn "$oldname" "$newname"
done < "filenames.txt"

where filenames.txt is the name of the file into which you typed the desired new names.

If it seems to be doing the right thing then remove the echo and run it again to actually rename the files


After running make, an executable called generator is created inside the source directory (the one you are in at this point). To execute it, type

./generator

The ./ is necessary because the shell by default looks for executables only in directories found in the $PATH environment variable. The ./ tells it to look inside the current directory.


Ubuntu-16-04 : How to remove wifi adaptor from wifi tray

I suggest that you unload and then blacklist its driver. From the terminal:

sudo -i
modprobe -r rt2800pci
echo "blacklist rt2800pci"  >>  /etc/modprobe.d/blacklist.conf
exit

You should be all set.


Permission issues about Plex Media Server

Okay, since you followed the instructions (mentioned in your question) you should have a backup of the original fstab named fstab.old.

So let's use a live system to boot and restore this old version.

Inside the live system - let's assume you used the graphical interface to mount the partition, we should find it under /media/ubuntu/(something).

So lets open a terminal with Ctrl+Alt+t and then copy back the backed up file with sudo cp /media/ubuntu/(something)/etc/fstab.old /media/ubuntu/(something)/etc/fstab

To avoid typing the full address of the mountpoint - especially this (something) part - you can use auto-completion via pressing the Tabulator-Key twice.

Hope this helps.


This bug was fixed in 16.04 (xenial) in the package nis - 3.17-34ubuntu3 The bug appears to still exist in Trusty.

Source: https://bugs.launchpad.net/ubuntu/+source/nis/+bug/1204530

Of course as a workaround you could simply enter the correct password.


I had the similar problem with an HP laptop.  I solved it by going dual boot.  Since you completely erased your hard drive installing uBuntu and already activated windows 10 (assumed) then I'll introduce you to the steps I made to create a Ubuntu Server 18.04, except you'll continue to install Ubuntu Desktop instead of Server.

Download a current Microsoft Media Creation Tool and get an ISO of the latest Windows 10 build.  Use Rufus to format a USB flash drive to boot.  When you boot into the windows installation environment and get to the install now button, at the bottom left corner, you'll see Repair Your Computer. Click into that link and you'll be show a list of options, go into Troubleshoot then Advanced Options, select Command Prompt.  Type in the following:
diskpart then ENTER key.  You'll get to the disk partitioning environment, then type: list disk ENTER , this will show you a list of disks available.  You will generally see two disks or two volumes, the flash drive and the hard drive.  Look for your hard drive which is usually disk 0 (zero) and type:  select disk 0 ENTER.  Now type: clean ENTER. This will turn your HDD into a raw drive with no formatting.  Type: Exit ENTER to leave the environment.  Then type: Exit ENTER to leave the command environment.  This will bring you back to the Windows 10 installation, choose to shut-down your PC.
Boot with the Windows 10 flash drive you already made. and follow the Windows 10 installation process, when you get to the Product Key choose Skip or Don't have key, Use Custom:  Install windows only, Where to install Windows, here is where you will create a New partition to install windows 10.  I allocated 70GB or 70000 MB for windows out of my 500GB HDD.  Select the partition you made for Windows 10 and continue with installation, when you are interviewed by windows to set-up an account, create a local account only, resist using the e-mail option.  When you are presented with customize settings, turn everything off, and don't use Cortana.
Windows 10 should now be up and running, update windows 10, while it's updating, turn off fast shutdown by going into windows start button, settings, system, power & sleep, additional power settings, Choose what closing the lid does.  Here you'll see that Turn on fast startup is greyed out, so above you'll see Change settings that are currently unavailable, click on that then you'll be able to uncheck Turn on fast startup, click save changes.  Right-mouse click on the start button and select Disk Management.   Here you'll see Disk 0 with the unallocated space, we are going to turn this into a raw partition so that Ubuntu will see it and use it.  Right-mouse click on unallocated and select new simple volume.   Accept auto size click on NEXT, Do not assign a drive letter NEXT, Do not format this volume NEXT, click on FINISH.  Close this window and return back to windows updates where you'll wait until windows 10 updates and reboots and then check updates again and reboot if needed, now you're ready to installed Ubuntu.  Shutdown your PC.
I have not gone through the Ubuntu Desktop installation process because I was focused on installing server, so I lack that experience.  But looking at screen shots from Ask Ubuntu, I can see that you can select Something Else under Installation Type.  Then select the Raw partition that we prepared earlier and format it to use EXT4.  Continue with the Ubuntu installation at this point.
Side note for Ubuntu Server Installers, doesn't pertain to you but will show up in a search for installing server 18.04.  I had to use the traditional installer for the server in order to get to an area where I can select my raw partition.  By using the common installer, I didn't get the "Something Else," I got the use all of the drive option only, which I chose at first but then my HP laptop wouldn't boot up, did this twice (once with an unallocated space and 2nd with a RAW partition), so I learned my lesson and went the dual boot way with the traditional installer.


It'll work but it's not that safe in terms of stability; you might end up with broken packages. However, you'd pretty much be doing an upgrade to 14.04 because, as soon as your system does the first software update, the 14.04 counterparts of all your installed 12.04 packages and applications will update to the newest version available by default, versions from 14.04, unless specified otherwise.

You might find it useful to know that an upgrade from 12.04 to 14.04 can be done via live disk without overwriting all your data as a full system install used to. You now have the option to upgrade your existing installation.

Alternatively, you  could run the following command from a terminal to do the upgrade to 14.04 that way:

sudo do-release-upgrade

Also, there are some differences in the filesystem structure from 12.04 to 14.04 that can cause conflicts without performing a complete upgrade.


Browsing is slow on LAN but works fine on wireless

Your symptoms do suggest your first DNS is invalid, so there's a timeout period, then your second DNS is able to resolve addresses correctly and you start seeing things loading.

Of course, once the connection is established, transfers are fast, as you noted.

Unless I'm missing something, 8.8.0.0 is NOT a valid DNS, which suggests this is your problem:

$ dig @8.8.0.0 yahoo.com

; <<>> DiG 9.9.5-3-Ubuntu <<>> @8.8.0.0 yahoo.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

If you meant to use Google DNS, the correct addresses are 8.8.8.8 and 8.8.4.4:

$ dig @8.8.8.8 yahoo.com

; <<>> DiG 9.9.5-3-Ubuntu <<>> @8.8.8.8 yahoo.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32669
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;yahoo.com.         IN  A

;; ANSWER SECTION:
yahoo.com.      1205    IN  A   98.138.253.109
yahoo.com.      1205    IN  A   98.139.183.24
yahoo.com.      1205    IN  A   206.190.36.45

;; Query time: 32 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Jun 07 21:20:40 EDT 2014
;; MSG SIZE  rcvd: 86


non-ascii fields in list of all members in launchpad team using the launchpadapi?

Use

  print person.display_name.encode('utf-8')

to tell Python what character encoding to use for unicode strings.


Ubuntu 12.04 cannot boot after running update to 3.2.0-97

if something doesn't work as expected after you updated your kernel (or to be more specific: something hardware related no more works as it was working before), the easiest method is to simply uninstall the new kernel:

first restart your computer (sudo shutdown -r now)
at the beginning of the reboot (even before the splash-screen) hold down the SHIFT-key
now you are in the GRUB-menu and it should look something like this:

Ubuntu, with Linux 3.2.0-97-generic
Ubuntu, with Linux 3.2.0-97-generic (recovery mode)
Previous Linux versions
Memory Test (memtest86+)
Memory Test (memtest86+, serial console 115200)

use the arrow keys to choose Previous Linux versions, and then your previous working kernel like Ubuntu, with Linux 3.2.0-92-generic (or whatever kernel-version it was).
after your system has booted (and everything is working as before the update) open a terminal and type sudo apt-get purge linux-headers-3.2.0-97* linux-image-3.2.0-97* (make sure you have entered the correct version-number twice).

and that's it... GRUB should be updated automatically and you can try to restart your system and everything should be working as it was!


how safe is deb http://debian.nfgd.net/debian unstable main?

The repository's name itself has the word unstable in it. So, there is a high possibility that it's going to be unstable. But, as izx points out in the comment that the unstable repo of debian is very much stable and that packages for all the non-LTS versions of Ubuntu are taken from it and that you can trust this repo

But generally speaking, if repositories (other than the Debian one mentioned above) have the word unstable in them, they are unstable. Now the reason why people have this, is so that other users can have bleeding edge software. Now these might have bugs and stuff too. Users contributing to the project can file bug reports, fixes for the bugs and so on and so forth. Hence, this is not advised for the average user.

So the choice is ultimately yours, whether you want use the super-bleeding edge of the software or once when the community is confident enough to push the software to stable when it feels the software/project is relatively free of bugs.


Solved. I tinkered more in the windows setup and found the problem(s) preventing successful windows repair tools.
Anyway it still bothers me that a simple trial of Ubuntu did all this mess. I still want to load Ubuntu on the laptop maybe in a permanent manner next time around.
Cheers.


libpango1.0-0 is just a transitional package. Transitional packages are just there to allow that upgrades goes without a hitch if some packages still depends on such packages so they doesn't end with unmet dependencies. These packages normally are created when the original is renamed somewhere. If no package depends of this package it can be removed without problems.

apt-cache show libpango-1.0-0 libpango1.0-0
Package: libpango-1.0-0
Description-en: Layout and rendering of internationalized text
 Pango is a library for layout and rendering of text, with an emphasis
 on internationalization. Pango can be used anywhere that text layout is
 needed. however, most of the work on Pango-1.0 was done using the GTK+
 widget toolkit as a test platform. Pango forms the core of text and
 font handling for GTK+-2.0.
 .
 Pango is designed to be modular; the core Pango layout can be used with
 four different font backends:
  - Core X windowing system fonts
  - Client-side fonts on X using the Xft library
  - Direct rendering of scalable fonts using the FreeType library
  - Native fonts on Microsoft backends
 .
 This package contains the shared libraries.

Package: libpango1.0-0
Description-en: Layout and rendering of internationalized text
 Pango is a library for layout and rendering of text, with an emphasis
 on internationalization. Pango can be used anywhere that text layout is
 needed. however, most of the work on Pango-1.0 was done using the GTK+
 widget toolkit as a test platform. Pango forms the core of text and
 font handling for GTK+-2.0.
 .
 Pango is designed to be modular; the core Pango layout can be used with
 four different font backends:
  - Core X windowing system fonts
  - Client-side fonts on X using the Xft library
  - Direct rendering of scalable fonts using the FreeType library
  - Native fonts on Microsoft backends
 .
 This is a transitional package.


Window start position overlapping with Menubar and Titlebar since last update

On compizconfig-settings-manager. Just enable Place Windows on Windows Management category.


You can try unetbootin.

Specify Type as "Hard Disk" and then for Drive specify your drive letter (C:\, D:\, E:\, etc).

Make sure you select your .iso image in the Diskimage section.


USB Switch Not Working in Ubuntu 18.04 or 20.04

I had similar error on Ubuntu 20.04 and I disabled usb autosuspend and now it is working for me.
I used the following article: https://www.makeuseof.com/tag/fix-usb-device-port-linux/#restarting-linux-to-fix-a-usb-port


Ubuntu 19.10 Using Laser Jet Pro M402n Jobs Held Even After Being Released

I had configured two separate printers for the same printer, and the default one was wrong. So CUPS was getting confused.

The solution was to find the proper printer by trial and error. In the print menu, I picked the non-default printer. This printed right away.

Then, I just had to merely delete the second printer using CUPS at localhost:631 in a web browser.

NOTE: When adding the printer, I followed these instructions: “No suitable Destination Host found by cups-browsed” as I had the same error: ‘Idle - “No suitable Destination Host found by cups-browsed”’


How can I tell, from the command line, whether the machine requires a reboot?

You can simply check if the file /var/run/reboot-required exists or not.

For example, any of these would tell you "no such file" or "file not found" if you do not need to reboot, otherwise (if you need to reboot) the file would exist and these commands would show information about the file:

file /var/run/reboot-required
stat /var/run/reboot-required
ls /var/run/reboot-required

In a bash script, you can use:

#!/bin/bash
if [ -f /var/run/reboot-required ]; then
  echo 'reboot required'
fi


passing port to calibre-server via env variable in upstart script

I have no idea how MAX_COVER is working, but variables do not expand in env stanzas. For example, take the following job:

env US=yhej
env SU="$US"

exec echo $US $SU

If variables expanded, this would output:

yhej yhej

but instead, it outputs:

yhej $US

You can modify your job to use a script section and variables will be expanded:

description "Calibre (ebook manager) content server"

start on runlevel [2345]
stop on runlevel [^2345]

respawn

env USER='test'
env PASSWORD='test'
env LIBRARY_PATH='/var/lib/calibre'
env MAX_COVER='300x400'
env PORT='80'

script
    exec /usr/bin/calibre-server --with-library $LIBRARY_PATH --auto-reload \
                                 --max-cover $MAX_COVER --port $PORT \
                                 --username $USER --password $PASSWORD
end script


Shortcut @ key is not functioning properly

That is because you've your keyboard defined to a different layout (german for example).

In order to change your keyboard layout, go to DASH and search for "keyboard". Open it and change your keyboard layout accordingly.


Your processor is dual core. System monitor shows you the number of threads, which is 4 for your processor.
Intel i5-3317U


Run the following commands:

sudo dpkg --purge --force-depends ca-certificates-java

sudo apt-get install ca-certificates-java

Worked for me.


Ubuntu 14.04.4 - Screen is blank with blinking cursor

Well, by some miracle after doing another reinstall and dpkg-reconfigure of xserver-xorg, all is back to normal now.


Moving partitioned dual boot to separate drives

I'm tempted to mark this as a duplicate, since it's asking basically the same question that's answered here:

Moving entire Linux installation to another drive

There are one or two deviations of this question from the one I've referenced, though:

The referenced question is for a Linux-only installation, whereas in your case you've got both Windows and Linux. That shouldn't really affect anything, though, with the possible exception of the EFI System Partition (ESP), which is normally shared between OSes. You can either leave Ubuntu's GRUB on the original disk's ESP or move it to a new Ubuntu-only ESP on the second disk. Either approach will work, but the latter approach will make the installation more self-contained -- you'll be able to physically move the Ubuntu disk to another computer and boot it there (although you'll need to jump through some hoops because of the way EFI-mode booting works). OTOH, leaving GRUB where it is will likely be a little less hassle.
The referenced question involves a BIOS-mode boot. It's unclear whether you're booting in BIOS/CSM/legacy mode or in EFI/UEFI mode, but if the Windows installation is from the factory, it's probably in EFI mode. (See this page of mine to determine your boot mode.) Assuming an EFI-mode boot, if you move GRUB to the new disk, you'll need to adjust the EFI's boot manager to point to its new location. You can do this with efibootmgr or by re-installing GRUB with the help of Boot Repair. Whether it's a BIOS-mode or an EFI-mode installation, chances are you'll need to adjust the GRUB configuration to get it to point to the new location. Boot Repair should be able to do this. Alternatively, if it's an EFI-based system, you could use my rEFInd boot manager on USB flash drive or CD-R to boot after you've transferred the system and updated its /etc/fstab file, then install either GRUB or rEFInd manually.

In any event, there are a lot of different ways to do this. They're all similar in broad outline, but some details differ. The biggest challenge is likely to be dealing with the boot loader (GRUB by default), which can be picky and create problems if it's not reconfigured appropriately.


gsl library: gslcblas library not found but installed

You need to install Octave development package first with:

sudo apt-get install liboctave-dev

With standard Octave 4.2.2 from official Ubuntu repositories this results in successful installation of internal gsl package.

>> pkg load gsl
>> gsl_sf_sinc(0)
ans =  1

For your information: Ubuntu provides octave-gsl package ver. 2.1.0-3, while Octave Forge provides ver. 2.1.1 - NEWS file contains note:

===============================================================================
gsl-2.1.1
===============================================================================

** Octave 4.4 compatibility fixes (remove deprecation warnings)

So you can use Octave from repositories.


At first: Why are you changing directory to root / ? Are your files located there ?

Remove the qoutes ".." from your command. So that it looks like

  ogg123 plugin.ogg

Make sure that you have installed the package vorbis-tools

  # sudo apt-get install vorbis-tools


Are there any Ubuntu Courses or training programs?

As I understand the certification universe, there is no "Ubuntu-specific" certification. Mainly, the general universe of execs hiring IT Professionals don't look for just "Ubuntu Certification", more often they're looking for Linux expertise rather than just one specific OS. Sometimes they want expertise in the specific OS, and in fact in one workplace I know the sysadmin is CentOS/RHEL experienced, and one of the other staffers is Debian/Ubuntu experienced, and they both share linux administration, not to mention teach each other things from time to time.

If they're looking for a Linux certification, they're looking for a general certification. Here's some of them. This is NOT an all-inclusive list:

Linux+, from CompTIA in conjunction with the Linux Professional Institute, is a nice entry level one. [link]  You get an OpenSUSE certification, a Linux+ certification, and a LPIC-1 certification from this.
Linux Professional Institute Certifications and such exist too, separate from the Linux+. [general link]

Linux Essentials is their most basic 'certification', and isn't really a systems administrator certification - it merely covers the absolute basics.  I wouldn't even call it a certification worth anyone's time.  Details about this one are available on the LPI site.
LPIC-1: Linux Server Professional Certification. This is my current (as of July 2015) level of LPIC certification, and it is a much harder certification than Essentials. This covers a lot more than the bare minimum to understand Linux. The details of what it covers are listed in the two exams' focuses that cover the certification. LPIC-1 information is available here, and is more of a systems administrator certification. Taking the LPIC-1 also gets you an OpenSUSE administrator certification if you pass.
LPIC-2: Linux Network Professional Certification. This is the next step up from LPIC-1. It's a networking and advanced systems administration cource. Details on what LPIC-2 covers is here.  You'll need LPIC-1 before you get LPIC-2.
LPIC-3: Linux Enterprise Professional Certification.  This is by far the most difficult, but also the most specialized of the LPIC exams.  Provided you have LPIC-1 and LPIC-2, you must pass one of three potential exams, which focus on special-focus exams.  Their site goes more in depth on these, but here's a short summary:

Exam 300: Mixed Environment. (Corresponding certification designation: LPIC-3 Mixed Environment) This exam focuses on mixed-environment areas, and different tasks such as: OpenLDAP Configuration; OpenLDAP as an Authentication Backend; Samba Basics; Samba Share Configuration; Samba User and Group management; Samba Domain Integration; Samba Name Services; and, Working with Linux and Windows Clients.
Exam 303: Security. (Corresponding certification designation: LPIC-3 Security) Pretty self-explanatory, this exam focuses on security topics, such as: Cryptography; Access Control; Application Security; Operations Security; and, Network Security.
Exam 304: Virtualization and High Availability. (Corresponding certification designation: LPIC-3 Virtualization and High Availability) This focuses on tasks and items such as: Virtualization; High Availability Cluster Management; and, High Availability Cluster Storage.

While each of these certifications has their quirks and difficulties, these are some of the most popular certifications I have seen.

The Linux+ certification is a nice starting point. So is the LPIC-1. If all you're after is a certification to say you're competent as a Linux sysadmin, that's probably all you'll need to be considered a server administrator.

The more specialized certifications will indicate you are a more global Linux Professional, but usually that's not necessary if you're after just a plain old sysadmin position, provided you can demonstrate ample knowledge to back up your skills.

Other certifications not in my list

Linux System Administrator Certification, from LinuxFoundation.org (Thanks to @Wilf)
Linux Foundation Certified Engineer, from LinuxFoundation.org. (Thanks to @Ron)


How to use Notepadqq for edit git commit messages?

Do one of the following (not necessarily both):

Set core.editor : git config --global core.editor "notepadqq"
Set the GIT_EDITOR environment variable: export GIT_EDITOR=notepadqq


18.04 Remmina, remote desktop connection, best way?

You should consider using xrdp and xorgxrdp which is giving a really good way to remotely connect on your computer. You can use Remmina and use rdp protocol so you just have to open the port 3389/tcp the same way you made it for ssh.


I thinks so you have to install ia32-libs package.

Full steps are as follows:

This works for both 32 and 64 bit versions of Ubuntu 10.10 and above.

Step 1 Download the linux version (.deb file) from here

Step 2 Run following command to install debian package
Note: 64-bit versions of Ubuntu need ia32-libs, or similar package before install

sudo dpkg -i avg2012flx-r1795-a5274.i386.deb

Expected output is as follows

Selecting previously unselected package avg2012flx.
(Reading database ... 153531 files and directories currently installed.)
Unpacking avg2012flx (from avg2012flx-r1795-a5274.i386.deb) ...
Setting up avg2012flx (2012.1795) ...
Installing 'avgd' service initscripts...
Registering 'avgd' service to runlevels...
 Adding system startup for /etc/init.d/avgd ...
   /etc/rc0.d/K20avgd -> ../init.d/avgd
   /etc/rc1.d/K20avgd -> ../init.d/avgd
   /etc/rc6.d/K20avgd -> ../init.d/avgd
   /etc/rc2.d/S20avgd -> ../init.d/avgd
   /etc/rc3.d/S20avgd -> ../init.d/avgd
   /etc/rc4.d/S20avgd -> ../init.d/avgd
   /etc/rc5.d/S20avgd -> ../init.d/avgd
Registering with license: XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
AVG command line controller
Copyright (c) 2012 AVG Technologies CZ

License was successfully changed.
Operation successful.
Please do configuration with /opt/avg/av/bin/avgsetup
Generating unique user id
Processing command line ...
Cfg file not specified using /opt/avg/av/cfg/diagcfg.xml.
New installation ID succesffully generated.
 * Starting avgd ...                                                     [ ok ]
Processing triggers for man-db ...

Step 3 Reboot the PC to initialize AVG. Alternatively you could run

sudo /etc/init.d/avgd start

Step 4 Run following command to update virus database

sudo avgupdate

Expected output is as follows

AVG command line update
Copyright (c) 2012 AVG Technologies CZ

Running update.
Initializing...
Analyzing...
Downloading file:  u12iavi5350u5270wc.bin                      1 /  1    2.01 M
Analyzing...
Preparing installation...
Updating...
100% [===================================>]

Update was successfully completed.

Useful Commands

To Start AVG Anti-Virus run following command

sudo avgctl --start

For Scanning a Virus

avgscan -H /desire_folder
avgscan --heur /

To Update a Virus Databases

sudo avgupdate --priority 2
sudo avgupdate -p 3
sudo avgupdate -p 4

Source : How to Install AVG Free Antivirus Software on Ubuntu 12.10, 12.04


It is the comma.

$ cpuIdle=$(mpstat 5 1 | grep Average | awk '{  print $12 }')
$ echo $cpuIdle
99,25

->

$ cpuUsage=$(bc <<< "100.0-95,25")
(standard_in) 1: syntax error

and

$ cpuUsage=$(bc <<< "100.0-95.25")
$ echo $cpuUsage
4.75

So this could be an internationalization issue (in Holland we use a comma for decimals). I would say: bug, someone forgot to include a comma as a possible decimal sign.

Switch to American annotation and it will work again.


There is a problem with ptrace and WINE in Ubuntu 12.04 which affects some games, I think Steam is one of them.  If this is your problem there is a workaround.

To test this you can run the following command in a terminal to reset your ptrace value to 0

echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope

Then try running the games again and see if it will launch.  This fix will be reset the next time you start your computer so you will have to enter it everytime.

I use Codeweavers Crossover version of WINE so I will give you the link that I have saved and can find easily but I did see the same answer in a WINE forum while researching this problem.

WINE WORKAROUND

I have to include a caveat here;  the link above will also give you a way to set ptrace permanently  but what I have read trying to understand this "bug" it may make your system less secure.  ptrace handles interactions between programs: ptrace=0 is more permissive than ptrace=1.  I'm not sure of the severity of the security risk.  I stumbled across you question becasue I have been watching the site for a question about how insecure it might be and have not found any answers either here or anywhere else.


I booted the Ubuntu Server 11.04 CD and chose Rescure console. Clicked Esc until the main menu came up. Then selected Execute a shell.

I followed the instructions over at https://help.ubuntu.com/community/Grub2#ChRoot like @enzotib suggested. These are the commands I used, which are modified for the BusyBox shell.

mount /dev/sdc1 /mnt
for i in /dev /dev/pts /proc /sys; do mount $i /mnt$i -o bind; done
chroot /mnt
/usr/sbin/update-grub
/usr/sbin/grub-install /dev/sdc
reboot

After the reboot I was presented with

error: no suitable mode found

Yay. After a couple of reboots and some searching I came to understand I just had to wait, then Ubuntu would boot. After it did, I logged in and ran update-grub and then rebooted. Problem solved! Thank you @enzotib.


A bad electrical connection could cause this to happen. The easy way to diagnose this is by running an entirely different Linux operating system from a live USB flash drive and test if that operating system shuts down normally without disabling Wake On LAN in the BIOS.

If your test live USB operating system also doesn't shutdown normally without disabling Wake On LAN, then you should check your build thoroughly for bad electrical connections. For example, a bad wire crimp can cause this type of problem.


Comparing arbitrary revisions between branches using Bazaar

You can specify the path to the branch of the revision by appending a : and the path:

cd /path/to/branchA
bzr diff --new /path/to/branchB -rX..Y:/path/to/branchB

I just tried it out:

$ bzr diff --new ../checkout -r2..2:../checkout
=== modified file 'x'
--- x   2013-03-12 17:28:11 +0000
+++ x   2013-03-12 17:26:47 +0000
@@ -1,1 +1,1 @@
-aa
+zz

See bzr help revisionspec for more information (it's hidden in the revno: section).


Try to reinstall Software center using

sudo apt-get update && apt-get install --reinstall software-center.

In some cases like this
deleting ~/.cache/software-center also worked.


How to know where plugged device was mounted?

I use mount whitout argument to see all mounted device.

For example, list of mounted disk, I use : mount | grep /dev/sd


First make sure you have Nvidia's own binary driver installed and not the open-source version that comes with Ubuntu (run Additional Drivers)...

Then install Bumblebee in the software centre so you can switch between your build in Intel graphics and Nvidia graphics, otherwise both will be running at the same time and your laptop will overheat and run out of battery quickly...


Unable to switch between users in Kubuntu 18 with NVidia drivers

After long search the following helped me:

install Bumblebee: https://float-middle.com/ubuntu-18-04-steam-and-nvidia-390/ (nvidia drivers are loaded only when playing games)
enable Bumblebee for Steam: https://support.steampowered.com/kb_article.php?ref=6316-GJKC-7437&l=portuguese


Ubuntu Install 14.04 Dual Boot Dual Drive Win 7

Yes, your first drive (/dev/sda) should be set as the device for the boot loader installation.

Make a full system backup before proceeding! (You've been promoted to user type 4)


How can I end 18.04.1 download correctly?

I recommend to download with wget.

Run this commands in a terminal:

sudo apt install wget

wget http://releases.ubuntu.com/18.04/ubuntu-18.04.1-desktop-amd64.iso


Ubuntu 17.10 require switch to tty7 while shudown/restart

I had similar symptoms.  I could get a successful reboot only by removing quiet splash from the GRUB_CMDLINE_LINUX_DEFAULT= line in /etc/default/grub (and running sudo update-grub).

Not a real solution, but at least it avoids the hang.


Your modem device is probably registered as a TTY or ACM device. These can be found in /dev like this:

$ ls -l /dev/ttyS*
crw-rw---- 1 root dialout 4, 64 Nov  3 09:37 /dev/ttyS0
[...]

Notice the permissions set to root and the dialout group for the example listed. To be able to read/write to the device as a regular user, just make sure you're a member of this group. Several options to do this exist: through the user management in system settings or command line like this:

sudo adduser username dialout

Then log out of your Ubuntu session and log back in (or simply reboot) to make this change effective.

In case of trouble, check with id whether you're indeed a member and verify with ls -l on the device what permissions you need. In the unlikely case your modem driver doesn't use the regular ACM/serial driver interfacing, edit your question to include these details (we don't have this specific modem).


Open up System Settings.
Go to Keyboard in the Hardware section.
Navigate to Shortcuts tab.
Select Typing in the list of the left side pane.

There you should see some shortcut-keys name like "Switch to next source", "Switch to previous source". You could now modify these shortcut keys to what you would like to set.


Open the terminal and type:

sudo apt-get install devscripts

devscripts are scripts to make the life of a Debian Package maintainer easier.

dpkg-depcheck, dpkg-genbuilddeps: determine the packages used during the build of a Debian package; useful for determining the Build-Depends control field needed. dependencies/recommendations for the dpkg-depcheck script are: build-essential, strace.


Slow boot on Ubuntu 16.04 ... issue with pam_kwallet5.so

According to this bug report
the issue with pam_kwallet5.so occurs because you don't have kwallet installed (it's optional, and not necessary). From my own experience, it is possible to have this annoying and misleading error message without having a slow boot problem.

I think you need to look elsewhere for the cause of your slow boot problem. Try systemd-analyze blame or any other boot processes analyzers in order to find the real cause of your slow boot problem.


mpirun: error while loading shared libraries: libopen-rte.so.12:

You may just need to run this command to link the appropriate libraries:

sudo ldconfig


One thing I also have, that is a problem, is not the iso that you downloaded, but it is the DVD's you have the can be a problem.

One - you burn the iso to the DVD way to fast, and the burn session skips some files during burn session.
Secondly, that DVD is corrupted and can't read the DVD

If you can - try using a USB flash drive, it is way faster and more efficient.

The CD/DVD most time have problems. Burn it at a slow pace like 2x and not the fasted. That will make sure of accurate burning of files onto the DVD


How to add two route command for using two vpn?

I don't know what your default route is, but whatever it is, if you add these two routes then you should be able to reach both VPNs:
sudo route add -net 192.168.50.0/24 gw 10.255.254.0
sudo route add -host 81.91.130.216 gw 81.91.128.161

I assume that both gateways are directly reachable from your computer when VPNs are up. If not, you must use addresses that are directly reachable.


How to use Intel integrated graphic card for display and NVidia card for CUDA on a desktop

The trick is to load nvidia card in to the device without module nvidia, because nsight don't need this module to debug. And I don't need nvidia module as a display.

Here is what I did:

I add the file named nvidia_cuda into /etc/init.d and make it executive by chmod +X

This is given by nvidia, but I commented the line /sbin/modprobe nvidia

#!/bin/bash

# /sbin/modprobe nvidia

if [ "$?" -eq 0 ]; then
  # Count the number of NVIDIA controllers found.
  NVDEVS=`lspci | grep -i NVIDIA`
  N3D=`echo "$NVDEVS" | grep "3D controller" | wc -l`
  NVGA=`echo "$NVDEVS" | grep "VGA compatible controller" | wc -l`

   N=`expr $N3D + $NVGA - 1`
   for i in `seq 0 $N`; do
     mknod -m 666 /dev/nvidia$i c 195 $i
   done

   mknod -m 666 /dev/nvidiactl c 195 255

 else
   exit 1
 fi

This file is from
http://docs.nvidia.com/cuda/cuda-getting-started-guide-for-linux/#runfile-installation
2.5.2. Runfile Installation, Step 6.

But first you need to verify that you have both cards as pci device. I enabled intel multi-display in BIOS to get this.

$ lspci | grep VGA
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GK208 [GeForce GT 635] (rev a1)


The Tor Project maintains a site which explains how to set up a relay. Usually all you need is to edit the torrc file. The file resides in /etc/tor/torrc when you install it via package management.

You need to set ORPort and ExitPolicy:

ORPort 9001
ExitPolicy reject *:*

The network uses the ORPort to contact your Tor relay and the ExitPolicy above advises to be a middle router (reject all exit connections).

Save the settings and restart the Tor process:

sudo service tor restart

Now look at the log file in /var/log/tor/. When it shows the following line, all is good:

  Self-testing indicates your ORPort is reachable from the outside. Excellent.

If not you might want to do some research at Tor's Q&A page. Furthermore the following site might be interesting: https://blog.torproject.org/blog/tips-running-exit-node-minimal-harassment


How to modify the default B5 print format for document notes?

The page format is accessible when in 'Notes' mode by the menu 'Slide', 'Slide properties' and then selecting A4 as the paper format. This is also accessible by a right click and then 'Slide properties'


ubuntu: virtual box, host can only ping guest, cannot access outside world

"You just need bridge adapter"

Shutdown your VM. In the settings for the machine's Network Adapter, make sure Attached To: "Bridged Adapter" is selected. And also in Name: make sure the name of your WAN facing adapter is selected (ie, eth0, eth1, or whatever yours is).


get a file from an array and extract data

Instead of creating your own menu, you can use select
select file in "${logs[@]}"; do
    printf 'You selected "%s"\n' "$file"
    break
done
cat "$file" # or do whatever with this file

Or without saving an intermediate array, which is not necessary in this case I think:
select file in acc_log*.csv; do
    printf 'You selected "%s"\n' "$file"
    break
done
cat "$file" # or do whatever with this file


Installing and switching to desktop environment on Ubuntu Server 20.04

Though it's not recommended, Install your desired desktop first.
Then:

sudo systemctl set-default multi-user.target

sudo systemctl isolate graphical.target

sudo systemctl isolate multi-user.target


APT: Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 10.158.100.1 8080]

Are you sure that your proxy is fine? Please start debugging with thw following check:

curl -x http://yourProxyIp:portNumber -Lk https://askubuntu.com

Checking individual web resources, like archive.ubuntu.com, is recommended as well. If the proxy works, please check the settings of your proxy for apt in /etc/apt/apt.conf.d/ directory. It can look like this:

cat /etc/apt/apt.conf.d/90curtin-aptproxy
Acquire::http::Proxy "http://192.168.100.10:8080";
Acquire::https::Proxy "http://192.168.100.10:8080";


Ubuntu server sending mail from www-data

Have you checked number of successful deliveries to the recipient from your postfix?

It is possible that the recipient at gmail received too many messages from other sources.


Ibus does not show option in input method except Chinese

First of all install or check that you have installed ibus-m17n.

sudo apt-get install ibus-m17n or using software center/synaptic. Then choose ibus as input method

Launch Keyboard Input Method It will prompt for starting ibus if it isn't already started check yes:

This will give you a additional keyboard indicator in the panel. Then go to Input Method tab and choose Hindi Phonetic as your input method and add it.


can't create desktop launchers in ubuntu 18.04, not even in root

fixed it by changing permissions of Desktop from root to user with chown:

opening home/[username]/;
doing sudo su, entering user password;
using
chown [username] Desktop/

voila


You can do a reverse tethering. Take a look here [ http://forum.xda-developers.com/showthread.php?t=2169920 ]


Packages You are looking for are in i386 arch;

apt-get install libatk-adaptor:i386 libgail-common:i386


Installed ubuntu on usb stick works fine on same laptop used for installation but does not boot on other machine it shows a blank screen

There can be different causes of this problem:

You installed the bootloader into the internal drive. This can be avoided if you unplug, disconnect or otherwise disable the internal drive during the installation to the external drive.

There is no hardware driver for the other computer(s). This can happen for example if you install a proprietary graphics driver, that does not work in the other computer(s) and blocks the built-in linux driver that should be used.

See the following links,

Step-wise instructions for installed system in a USB drive

How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step

If you need not encrypt the drive, there is an easy alternative. You can use a compressed image


Is there a tiling extension that works on Mate?

Window shuffler for Ubuntu Budgie & Mate
As part of the Ubuntu Budgie team, I developed a tool for window arrangement. Although it was written for Budgie, it (at least) works on Mate as well.
Window shuffler, recently was made available in its own repo:

GUI and CLI options
GUI
Window Shuffler can be used from either GUI or CLI. The GUI options are pretty much shown in this video.
Command line
Looking at the command line options, they should include pretty much exactly what you are looking for.
From the README:
Shuffler can also be used by cli. To use, run shuffler_nogui, with as arguments the size of the matrix (horizontally, vertically) + the targeted position of the active window in the matrix (where 0 is the first). An example:
shuffler_nogui 2 2 0 1

will place the active window in the bottom left cell in a grid of 2 x 2.
Install
To install, just follow the instructions in the README


After installing Ubuntu, my PC still boots to Windows

You have to manually select the default boot partition at startup.

In windows, First download "Boot Repair Disk" (will be an iso file, but you can have YUMI or Universal-USB-Installer download and install it rather than doing so yourself). In Windows go to http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ and download Universal-USB-Installer (if you only want to work with or from 1 Linux OS with that USB drive) or http://www.pendrivelinux.com/yumi-multiboot-usb-creator/ and download YUMI (if you want to be able to run multiple OS's from your USB Drive). Then, once their (or it) downloaded, go to the folder you downloaded it to, right click it, click Properties and click the little button which says "Unblock". Then you can run the application where you will select your USB drive from the top most drop down box (make certain your USB drive is already inserted and that the drive letter you select is the same as the letter listed in "Computer" for your USB drive), then tell it which OS you want to install to the USB drive in the next drop down box, then click the folder icon and select the location where the iso file for that OS is and select it. Then have YUMI (or universal usb installer) run. Once it's done you can reboot your computer and choose the USB drive from the boot options (if presented, but your computer may automaticly select the USB drive, or you need to change your BIOS settings to use a USB disk to boot from) and run Boot-Repair.

Or, you can install Boot Repair in Ubuntu if you open that OS rather than windows:

sudo add-apt-repository ppa:yannubuntu/boot-repair sudo apt-get update sudo apt-get install -y boot-repair && boot-repair

There, you can open the program (and from either Ubuntu or the Boot Repair OS from your USB drive as both will look the same and provide the same functions, except the OS version only has a terminal which does not allow you to paste things which Boot Repair program has told you to use in a terminal so the Ubuntu version is easier), click the "advanced options" drop down at the bottom left of the window, ensure "Reinstall GRUB" is selected (with checkbox), then click the "Grub Location" tab and select Ubuntu as the OS to boot by default, "Place GRUB on all disks". Now click "Apply" and it will run through it's repair (which often includes a group of lines which you have to enter in a terminal and run yourself, but if it shows you more than one command then copy only one line at a time and use it in the terminal). Because you told it to "Boot "Ubuntu" by default it will now automaticlly select Ubuntu to boot when you start your computer.


What is the objectName: property in QML, why is it needed, and how is it different than the id: property?

This property holds the name of the object. The objectName is a QString property of QObject which defaults to an empty QString.

You usually set this property when you need to find QML elements from Qt.
By this way the signals, properties and functions of a QML element can be accessed from Qt (C++) code.

Autopilot tests use this property to introspect your application.

From Interacting with QML Objects from C++:

QML components are essentially object trees with children that have siblings and their own children. Child objects of QML components can be located using the QObject::objectName property with QObject::findChild(). For example, if the root item in MyItem.qml had a child Rectangle item:

import QtQuick 2.0

Item {
    width: 100; height: 100

    Rectangle {
        anchors.fill: parent
        objectName: "rect"
    }
}

The child could be located like this:

QObject *rect = object->findChild<QObject*>("rect");
if (rect)
    rect->setProperty("color", "red");

Note that an object may have multiple children with the same objectName. For example, ListView creates multiple instances of its delegate, so if its delegate is declared with a particular objectName, the ListView will have multiple children with the same objectName. In this case, QObject::findChildren() can be used to find all children with a matching objectName.

  Warning: While it is possible to use C++ to access and manipulate QML
  objects deep into the object tree, we recommend that you do not take
  this approach outside of application testing and prototyping. One
  strength of QML and C++ integration is the ability to implement the
  QML user interface separately from the C++ logic and dataset backend,
  and this strategy breaks if the C++ side reaches deep into the QML
  components to manipulate them directly. This would make it difficult
  to, for example, swap a QML view component for another view, if the
  new component was missing a required objectName. It is better for the
  C++ implementation to know as little as possible about the QML user
  interface implementation and the composition of the QML object tree.

If an objectName is needed for testing, this is definitely worth it. objectName’s should obviously not be added when not needed. When adding them, the general QML guidelines for performance should be followed.

Source: What is the impact on memory of adding objectNames to QML items?


Does Ubuntu delete cache-thumbnails after leaving the guest mode?

For a guest session a temporary user with a new $HOME folder is created. After leaving the guest session the user and its $HOME including the thumbnail cache and other cache files are removed.


How to connect from MySQL to Web Application

The basic mechanism is:

the browser asks the web server for a web page. This is in fact the address of a program or script, most often written in PHP.
the web server executes the PHP program.
the PHP program accesses the data base server using SQL statements.
the data base server returns data to the program.
the program puts the data into an HTML page.
the web server sends the HTML page to the browser.

So you still have some way to go. Please take a look at stackoverflow to find examples of the above.


how to install HP Laser jet Professional p1108?

Connect your printer with USB.

Switch ON printer

Open Terminal & run following command.
sudo hp-setup

Enter password & then a dialog box will open. Just follow the instruction to install your printer.

Go to System setting --> select Printers
You will see your 'hp-lajerjet' printer.

Select your printer. Right Click--> select properties--> select print test page to check your printer is working properly or not.


How to change Swap partition to add more

in Ubuntu, you use sudo to temporarily gain root privileges. you generally don't use su, although you can do sudo su or sudo -i
you need root privileges to change the partition layout on your disks, and swap is usually handled as a partition in Ubuntu.
i recommend to use gparted to change your partitions. install it via software centre if it is not installed.
add another swap partition in gparted on unused disk space. if you do not have any unused disk space left, you have two options:

resize existing partitions (MAKE A BACKUP FIRST, and possibly you need to do the resize from a live-cd boot)
consider using a swap file instead of a swap partition: see http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/

generally a good read: https://help.ubuntu.com/community/SwapFaq


input/output error during write on /dev/sdb during Ubuntu installation

"I am trying to install Ubuntu 14.04 on a clean hard drive":   "input/output error during write on /dev/sdb" indicates that the system is unable to write to /dev/sdb.

please begin by opening a terminal and providing the output of:

sudo fdisk -l /dev/sdb

If this fails, it's likely either the drive or the cable connecting it is bad.


Is there a way to put the foreground job in the background with a key binding?

You can skip the job id number: if you ommit it it will take the last suspended job from the current environment. So cltr+Z and bg is shorter.
If you add this to your .profile or .bashrc
bind '"\ek"':"\"bg\C-m\""

alt+w should put bg on your screen and execute it so it ends up into background.
Example:
rinzwind@discworld:~$ smplayer
This is SMPlayer v. 0.6.9 (SVN r3447) running on Linux
^Z
[1]+  Stopped                 smplayer
rinzwind@discworld:~$ bind '"\ek"':"\"bg\C-m\""
[1]+ smplayer &

I have not been able to add a cltr+Z into the command though. Probably because of the signal being ignored:

Ctrl+Z    The suspend signal, sends a SIGTSTP to a running program, thus stopping it and returning control to the shell.
12.1.1.2. Signals to your Bash shell
In the absence of any traps, an interactive Bash shell ignores SIGTERM and SIGQUIT. SIGINT is caught and handled, and if job control is active, SIGTTIN, SIGTTOU and SIGTSTP are also ignored. Commands that are run as the result of a command substitution also ignore these signals, when keyboard generated.
SIGHUP by default exits a shell. An interactive shell will send a SIGHUP to all jobs, running or stopped; see the documentation on the disown built-in if you want to disable this default behavior for a particular process. Use the huponexit option for killing all jobs upon receiving a SIGHUP signal, using the shopt built-in.


I use a pretty similar setup, and I experience the same thing.
It could be related to one or more of the current bugs with unity and window order/focusing/etc (which also affect me), e.g.
https://bugs.launchpad.net/compiz-core/+bug/864233

https://bugs.launchpad.net/unity/+bug/781931

https://bugs.launchpad.net/ubuntu/natty/+source/compiz/+bug/772612

At least that's what I put it down to until now...


How can I get the path of the file being downloaded by aria2?

aria2c provides an --on-download-start option which lets you run a command as soon as the download started. To use it to start playing the file, write a script with

#!/bin/sh
mpv "$3"

and run aria2c like that in your function:

aria2c --on-download-start /path/to/script "$1"

That has the extra advantage that you don’t need to sleep for a fixed amount of time, which may not be enough in some cases. In fact, you don’t need a function at all with this solution, a simple alias does it:

alias dl-and-stream='aria2c --on-download-start /path/to/script'


Reinstall paid software from USC in Kubuntu

Just re-install it - how ever that software is installed.

If it is a deb then all the dependencies can be automatically loaded via apt-get install.


Lookit does not produce a PNG file that is able to be used by all image viewing applications

As explained in the comments, I had a similar problem, which I handled with a script, which I show here, in the hope it could help:

#!/bin/bash
#
# autocrop an image, shot by 'import', where an imageoffset is (why, oh, why?)
# allways annoyingly produced
#
f=$1 || exit 1
img=$(identify $f) || exit 2
size=$(echo $img | cut -d ' ' -f3) || exit 3
offset=$(echo $img | sed 's/[^+]*+//;s/ .*//g') || exit 4
convert $f -crop $size+$offset +repage autocrop-$(basename $f) || exit 5

It produces a new file - from screenshot-1.png to autocrop-screenshot-1.png . Renaming the initial file to uncropped-screenshot-1.png would be more comfortable - a possible improvement.


Ubuntu 13.04. How configure surround sound?

I found solution. Just installed pavucontrol from Software Center and set my sound card configuration as 7.1. Now sound works fine!
Strange it's not possible to do it from Sound Settings and it is required to install additional software to choose your sound scheme.


Under "System Settings -> Details" "Graphics" shown as "Unknown"

for the graphics unknown problem run

sudo apt-get install mesa-utils

for broken packages run:

sudo apt-get clean
sudo apt-get update


Corrupted file Ubuntu OS download (11.10 & 12.4)

How did you download the files. Is it normal http/ftp or Torrent download. Http and ftp downloads are too much  prone to file corruption. I would suggest you to download the files using Torrent protocol, which has in-build feature to check the correctness of the download. If you have downloaded the file using Torrent then also check the ISO MD5 checksum with the Ubuntu website MD5 checksum. If both are same then there is no problem with the ISO file.

Secondly, are you using a CD or Pendrive to install the Ubuntu? In case of CD, I have seen such issues if the CD has scratched. Try the pendrive install.


How do I use MAAS and Juju with an existing DHCP server?

You may refer to Manual DHCP configuration in the following link

https://docs.maas.io/2.1/en/installconfig-network-dhcp#external-dhcp-and-a-reserved-ip-range

There is also a nice document by DELL (Deploying workloads with Juju and MAAS) where you can find a section for using an existing DNS/DHCP server and you can find it here

http://linux.dell.com/files/whitepapers/Deploying_Workloads_With_Juju_And_MAAS.pdf


Not getting GUI mode on ubuntu 12.04 desktop edition after installation on vmware workstation 7

You may try sudo lightdm, startx, sudo startx, or sudo gdm in that order of preference(Use the first that works). You may then try to set it up as the last entry in the system-wide crontab(See http://linux.about.com/od/ubuntu_doc/a/ubudg28t5.htm)


Best way to wipe HDD with multiple partitions and format into NTFS

Search for Disks in Ubuntu Dash, it does the job pretty good.

Connect and unmount the HDD you want to delete, delete it (multiple places to open menu in Disks) then create a new NTFS Partition. Tick the option:

Contents -> Erase -> Overwrite existing data with zeros (slow)

Voila, wait couple of hours and your HDD is clean =D

EDIT: I just tried to unswap the SWAP, placed few files on new partition, deleted the same partiton with Disks and tried to recover with TestDisk. No results.


LibreOffice6.1 broken after upgrading to texlive2018 from a PPA. Can't downgrade to LO5.16 under 16.04

The following command succeeded to unlock the situation:

$ sudo apt full-upgrade
[sudo] Mot de passe de jeanpat :
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
Les NOUVEAUX paquets suivants seront installés :
  libpoppler73 libquazip5-1
Les paquets suivants ont été conservés :
  cuda cuda-drivers
Les paquets suivants seront mis à jour :
  fonts-sil-padauk fonts-texgyre libharfbuzz-icu0 libpixman-1-0 libpoppler-glib8 libpoppler-qt5-1 poppler-utils tex-common tex-gyre texstudio texstudio-doc texstudio-l10n
12 mis à jour, 2 nouvellement installés, 0 à enlever et 2 non mis à jour.
Il est nécessaire de prendre 24,8 Mo dans les archives.
Après cette opération, 8 387 ko d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Réception de:1 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 tex-common all 6.09~16.04.york0 [53,4 kB]
Réception de:2 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 fonts-sil-padauk all 3.003-1~16.04.york0 [1 327 kB]
Réception de:3 http://es-mirrors.evowise.com/ubuntu xenial/universe amd64 libquazip5-1 amd64 0.7.1-1 [70,0 kB]
Réception de:4 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 fonts-texgyre all 20160520-1~16.04.york0 [8 769 kB]
Réception de:5 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 libharfbuzz-icu0 amd64 1.7.2-1~16.04.york0 [9 612 B]
Réception de:6 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 libpixman-1-0 amd64 0.34.0-1~ubuntu16.04.1york0 [235 kB]
Réception de:7 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 libpoppler73 amd64 0.62.0-2ubuntu3~16.04.york0 [809 kB]
Réception de:8 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 libpoppler-glib8 amd64 0.62.0-2ubuntu3~16.04.york0 [126 kB]
Réception de:9 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 libpoppler-qt5-1 amd64 0.62.0-2ubuntu3~16.04.york0 [159 kB]
Réception de:10 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 poppler-utils amd64 0.62.0-2ubuntu3~16.04.york0 [171 kB]
Réception de:11 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 tex-gyre all 20160520-1~16.04.york0 [5 043 kB]
Réception de:12 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 texstudio-doc all 2.12.6+debian-1~16.04.york0 [2 141 kB]
Réception de:13 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 texstudio-l10n all 2.12.6+debian-1~16.04.york0 [555 kB]
Réception de:14 http://ppa.launchpad.net/jonathonf/texlive-2018/ubuntu xenial/main amd64 texstudio amd64 2.12.6+debian-1~16.04.york0 [5 305 kB]
24,8 Mo réceptionnés en 24s (997 ko/s)
(Lecture de la base de données... 341032 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../tex-common_6.09~16.04.york0_all.deb ...
Dépaquetage de tex-common (6.09~16.04.york0) sur (6.04ubuntu1) ...
Préparation du dépaquetage de .../fonts-sil-padauk_3.003-1~16.04.york0_all.deb ...
Dépaquetage de fonts-sil-padauk (3.003-1~16.04.york0) sur (2.80-2) ...
Préparation du dépaquetage de .../fonts-texgyre_20160520-1~16.04.york0_all.deb ...
Dépaquetage de fonts-texgyre (20160520-1~16.04.york0) sur (20150923-1) ...
Préparation du dépaquetage de .../libharfbuzz-icu0_1.7.2-1~16.04.york0_amd64.deb ...
Dépaquetage de libharfbuzz-icu0:amd64 (1.7.2-1~16.04.york0) sur (1.0.1-1ubuntu0.1) ...
Préparation du dépaquetage de .../libpixman-1-0_0.34.0-1~ubuntu16.04.1york0_amd64.deb ...
Dépaquetage de libpixman-1-0:amd64 (0.34.0-1~ubuntu16.04.1york0) sur (0.33.6-1) ...
Sélection du paquet libpoppler73:amd64 précédemment désélectionné.
Préparation du dépaquetage de .../libpoppler73_0.62.0-2ubuntu3~16.04.york0_amd64.deb ...
Dépaquetage de libpoppler73:amd64 (0.62.0-2ubuntu3~16.04.york0) ...
Préparation du dépaquetage de .../libpoppler-glib8_0.62.0-2ubuntu3~16.04.york0_amd64.deb ...
Dépaquetage de libpoppler-glib8:amd64 (0.62.0-2ubuntu3~16.04.york0) sur (0.41.0-0ubuntu1.8) ...
Préparation du dépaquetage de .../libpoppler-qt5-1_0.62.0-2ubuntu3~16.04.york0_amd64.deb ...
Dépaquetage de libpoppler-qt5-1:amd64 (0.62.0-2ubuntu3~16.04.york0) sur (0.41.0-0ubuntu1.8) ...
Sélection du paquet libquazip5-1:amd64 précédemment désélectionné.
Préparation du dépaquetage de .../libquazip5-1_0.7.1-1_amd64.deb ...
Dépaquetage de libquazip5-1:amd64 (0.7.1-1) ...
Préparation du dépaquetage de .../poppler-utils_0.62.0-2ubuntu3~16.04.york0_amd64.deb ...
Dépaquetage de poppler-utils (0.62.0-2ubuntu3~16.04.york0) sur (0.41.0-0ubuntu1.8) ...
Préparation du dépaquetage de .../tex-gyre_20160520-1~16.04.york0_all.deb ...
Dépaquetage de tex-gyre (20160520-1~16.04.york0) sur (20150923-1) ...
Préparation du dépaquetage de .../texstudio-doc_2.12.6+debian-1~16.04.york0_all.deb ...
Dépaquetage de texstudio-doc (2.12.6+debian-1~16.04.york0) sur (2.10.8+debian-1) ...
Préparation du dépaquetage de .../texstudio-l10n_2.12.6+debian-1~16.04.york0_all.deb ...
Dépaquetage de texstudio-l10n (2.12.6+debian-1~16.04.york0) sur (2.10.8+debian-1) ...
Préparation du dépaquetage de .../texstudio_2.12.6+debian-1~16.04.york0_amd64.deb ...
Dépaquetage de texstudio (2.12.6+debian-1~16.04.york0) sur (2.10.8+debian-1) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.5-1) ...
Traitement des actions différées (« triggers ») pour doc-base (0.10.7) ...
Traitement de 2 fichiers de documentation supprimés, 2 fichiers de documentation modifiés, 1 fichier de documentation ajouté…
Enregistrement des documents avec scrollkeeper…
Traitement des actions différées (« triggers ») pour fontconfig (2.11.94-0ubuntu1.1) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.23-0ubuntu10) ...
Traitement des actions différées (« triggers ») pour desktop-file-utils (0.22-1ubuntu5.2) ...
Traitement des actions différées (« triggers ») pour bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Traitement des actions différées (« triggers ») pour gnome-menus (3.13.3-6ubuntu3.1) ...
Traitement des actions différées (« triggers ») pour mime-support (3.59ubuntu1) ...
Traitement des actions différées (« triggers ») pour hicolor-icon-theme (0.15-0ubuntu1.1) ...
Paramétrage de tex-common (6.09~16.04.york0) ...
Running mktexlsr. This may take some time... done.
Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.
Building format(s) --all.
    This may take some time... done.
Paramétrage de fonts-sil-padauk (3.003-1~16.04.york0) ...
Paramétrage de fonts-texgyre (20160520-1~16.04.york0) ...
Paramétrage de libharfbuzz-icu0:amd64 (1.7.2-1~16.04.york0) ...
Paramétrage de libpixman-1-0:amd64 (0.34.0-1~ubuntu16.04.1york0) ...
Paramétrage de libpoppler73:amd64 (0.62.0-2ubuntu3~16.04.york0) ...
Paramétrage de libpoppler-glib8:amd64 (0.62.0-2ubuntu3~16.04.york0) ...
Paramétrage de libpoppler-qt5-1:amd64 (0.62.0-2ubuntu3~16.04.york0) ...
Paramétrage de libquazip5-1:amd64 (0.7.1-1) ...
Paramétrage de poppler-utils (0.62.0-2ubuntu3~16.04.york0) ...
Paramétrage de tex-gyre (20160520-1~16.04.york0) ...
Paramétrage de texstudio-doc (2.12.6+debian-1~16.04.york0) ...
Paramétrage de texstudio (2.12.6+debian-1~16.04.york0) ...
Paramétrage de texstudio-l10n (2.12.6+debian-1~16.04.york0) ...
Traitement des actions différées (« triggers ») pour libc-bin (2.23-0ubuntu10) ...
Traitement des actions différées (« triggers ») pour tex-common (6.09~16.04.york0) ...
Running updmap-sys. This may take some time... done.
Running mktexlsr /var/lib/texmf ... done.

The icons are still to great but libreoffice starts:

~$ soffice

(soffice:5890): Gdk-WARNING **: gdk_window_set_icon_list: icons too large

(soffice:5890): Gdk-WARNING **: gdk_window_set_icon_list: icons too large

(soffice:5890): Gdk-WARNING **: gdk_window_set_icon_list: icons too large

(soffice:5890): Gdk-WARNING **: gdk_window_set_icon_list: icons too large


So this turned out to be because I had f.lux installed as well (which I had forgotten about...), and the native night mode was conflicting with it. This conflict wasn't present in my previous Ubuntu version (18.04).

Uninstalling f.lux fixed the issue.


Plex Manager can't read files on external HD (automonted)

You need to configure fstab to set the proper permissions.

There is a whole page about how to do this on the Plex site, see:
https://support.plex.tv/hc/en-us/articles/200288606-Mounting-NTFS-Drives-on-Linux

To make it short:

Find the UUID of your drive:

sudo blkid | grep ntfs
create a directory where you will mount the drive:

sudo mkdir /media/ext_NTFS_USB_Drive
edit file  /etc/fstab with command:

gksu gedit /etc/fstab
add a line to this file and save.

UUID=485CBF485CBF3014 /media/ext_NTFS_USB_Drive ntfs-3g permissions,auto 0 0

where the UUID is the one your drive and the mount point is the folder you created.
now mount the drive:

sudo mount /media/ext_NTFS_USB_Drive

(you might get an error saying the drive is already mounted, in Nautilus for example. Just unmount it - Safely Remove Drive, or click the Eject Icon in Nautilus)

Now in Plex, you need to change the location the media folder you were trying to add to somewhere inside: /media/ext_NTFS_USB_Drive


What are some recommendable wireless USB network adapters for Ubuntu?

Well, I think you will find this post a fountain of information:

 WifiDocs/WirelessCardsSupported


I tried other ask ubuntu answers but they did not work for me. I found an answer at this link which worked for me.

https://discussions.apple.com/thread/8132218

at the terminal type

Diskutil List

identify your disk to be erased then type:

diskutil eraseDisk free EMPTY /dev/disk4

Then format the disk

diskutil eraseDisk ExFAT USB64 /dev/disk4 where USB4 is the disk name and EXFAT the format


You need to have a decent graphic card and the corresponding drivers installed to run Unity.

If you don't have these then you can try Unity 2D (which will be a lot faster on a old graphic card), to install it on 11.04 :

How do I install and switch to the Unity 2D desktop?

Then you restart and when logging in select "Unity 2D" instead of "Ubuntu".


Back-up utility endlessly asks for encryption password

The conflict has been caused by an invalid line in the /home/user/.gnupg/gpg.conf file. This particular line

pinentry-program /usr/local/bin/pinentry-gtk-2

had been added by the user for Enigmail to work (troubleshooting item 'Resolving issues with GnuPG 2.x and gpg-agent') and had been worked like a charm for a long time. Apparently there must have been changes deep under that disrupted the harmony of Enigmail (1.9.2), deja-vu (30.0) + duplicity (0.6.23) and gpg (1.4.16).

Commenting out this Enigmail-specific line is sufficient to restore the back-up functionalities with encryption. This is the post's question.

Enigmail does not work satisfactorily whether that line is commented out or not. This is still unresolved.

For this case, there is no issue of forgotten password at stake.