VirtualBox Ubuntu 12.04 cannot open display under Superuser

Have you tried gksudo? That's for invoking graphical Applications as superuser. Although i think sudo should work as well in normal Ubuntu.

edit: vim and nano are editors working from inside the terminal. Ubuntu should have those installed by default.


Fonts messed up after installing Kubuntu desktop on Ubuntu 14.04

Possibly try Ubuntu Restricted Extras if you haven't already, It contains a few fonts and True-type, True-Type will make text much clearer fixing the text that looks like it was typed on a 1995 Compaq!


Function key commands changing by themselves?? very weird problem

Probably not an intruder, especially if offline.

Probably bugs, funny hardware, or even dirty keys shorting themselves "on", vibration, bad ground...

To see if it still happens I'd try a (different?) live cd/usb, Kubuntu, regular Ubunut, Xubuntu, even a derived-from distro like Linux Mint, or the "source" distro Debian?


You have NUL values in your file (due to the power failure).

tr < {original_file} -d '\000' > {backupfile}

will remove the NUL values from {original_file} while creating a {backupfile}.

Check {backupfile} and confirm it is correct before deleting {original_file}.

If you do

file {original_file}

it probably will tell you it is a "binary file" and not a "text file".


How can I make bash completion (tab auto-complete) match a particular command first?

From this blog it should be sufficient to do

complete -r word-list-compress

in order to remove it from the completion list.

I do not know (yet) how to revert it, so I did not try it myself.


USB 3.1 mass storage not working in USB 3.1 port in Ubuntu 16.04

I found out that answer from USB 3.0 ports not working (16.04) works for my Lenovo G50-45, too.

sudo gedit /etc/default/grub
Find this line: GRUB_CMDLINE_LINUX=""
Change it to GRUB_CMDLINE_LINUX="iommu=soft"
Save
Reboot

Now I can see USB disk like:

lsusb -t
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 5000M
    **|__ Port 1: Dev 4, If 0, Class=Mass Storage, Driver=uas, 5000M**
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M
    |__ Port 3: Dev 3, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 3: Dev 3, If 1, Class=Wireless, Driver=btusb, 12M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ohci-pci/4p, 12M
    |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 1: Dev 2, If 1, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 2: Dev 2, If 1, Class=Video, Driver=uvcvideo, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/4p, 480M
    |__ Port 3: Dev 3, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M

BUT (WARNING) I should not use "safely remove" it leads to complete STOP of Ubuntu, which needs hard restart. I can do only "eject" or "unmount device".
(Mounting to USB 2.0 port seems to work fine, as it did.)


Log on with Live Session of your Current Ubuntu Version.
Open Disks app
and mount the EFI partition.
you will see the partition being mounted and a icon on Desktop.
Open it and find EFI folder, from that delete the Ubuntu folder.
Power off the system.
Resrat, you should see windows.


What is the double slash (//) directory?

// is usually the same as /.  /// must be the same as /.

ls would have shown you that cd // took you to the root directory, the same as cd / does.

$ cd /
$ ls
bin
boot
dev
...
$ cd //
$ ls
(same as above)

The technical way to confirm they are definitely the same directory is:

$ cd /
$ stat -c "%i" .
2
$ cd //
$ stat -c "%i" .
2

they will print the same inode number, meaning they are the same thing.

The gory details are documented in the POSIX Pathname Resolution specification:

  A pathname consisting of a single slash shall resolve to the root directory of the process. A null pathname shall not be successfully resolved. A pathname that begins with two successive slashes may be interpreted in an implementation-defined manner, although more than two leading slashes shall be treated as a single slash.


Oh well, I found a solution myself: these so-called system extensions are loaded from the directory /usr/share/gnome-shell/extensions on startup, most of them aptly named so you can find which is which.

So it's a simple exercise – go to the directory I mentioned, do a sudo rm -r <culprit>, log out and in again, and voila! Gone :)


To manually set a password for the root user, type in the following in the Terminal:

sudo passwd

After that you are asked to type in the new root password twice.


XMMS requires glib version 1.2 series libraries (2.0 series will not work). You can get sufficiently new version of that from levien's PPA:

sudo apt-add-repository ppa:levien/thbio
sudo apt-get update
sudo apt-get install libglib1.2-dev libgtk1.2-dev

But even then you'll likely run into problems with undefined references in libgdk 1.2.


"Gave up waiting for the root" error during boot

I also occurred same problem but I can solve it using following link

http://blog.wittchen.biz.pl/ubuntu-system-boot-problem/

Attempt #1

First, I tried to change rootdelay as error message said. I opened file /etc/default/grub
I found there the following line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
and changed it to:
GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=90 quiet splash"
rootdelay became longer, but unfortunately it didn’t fix the problem in my case.

Attempt #2

I edited /etc/fstab file. I executed the following command in terminal: sudo gedit /etc/fstab and edited fstab file in gedit. In the beginning my file looked like that:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=96889309-5f73-4688-8354-e64cd1bb158f /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=480cc3f7-a39d-4d0f-93d5-49fc8df1a392 none            swap    sw              0       0

Then, I commented one line and added another one describing /dev/sda1 disk device. Now, my file looks as follows:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=/dev/sda1  /               ext4    errors=remount-ro 0       1
# UUID=96889309-5f73-4688-8354-e64cd1bb158f /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=480cc3f7-a39d-4d0f-93d5-49fc8df1a392 none            swap    sw              0       0

Problem still existed, so I tried another attempt to solve it.

Attempt #3

I opened terminal and typed the following command:

sudo grub-install /dev/sda

and then I typed another command to update grub:

sudo update-grub

After all of this, I rebooted computer and finally, error disappeared and problem was fixed!


Xorg does not work after uninstallation of Nvidia drivers

nvidia-common is depreciated in 15.04, you can use nvidia-352

First make sure that nvidia-common is completely removed

sudo apt-get purge nvidia* && reboot

Now install the newer driver

sudo apt-get install nvidia-352

Now run

nvidia-xconfig
sudo reboot

Now your desktop should load.

If you like the most up to date drivers for hardware, you can use this PPA

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-358
nvidia-xconfig
sudo reboot


Remounted the filesystem, restarted the network manager and the problem was solved.


Monitor setup wrong after first boot after switching from windows

Just a hint, for those finding it later.

Updating my BIOS seems to have fixed the problem. But I'm not 100% sure of this, so take this with a grain of salt.


There is an option named "Empty Trash on Exit" in Thunderbird. Maybe this setting is turned on.

Check account settings by right clicking on your account and going to  "Settings...".

There, you can navigate to "Server settings". There should be a text box below the caption "Message Storage" named "Empty trash on exit". Make sure this is not checked.

Let me know if this helps.


Please mention it as wget 1.20 and not wget 1.2 since they would refer to very different package versions.

As someone else has commented, you're probably out of luck with it comes to getting the newer package on your old distro. As you've mentioned, using the file from the new distro won't work well since it was compiled with newer libraries.

However, you could consider getting the tarball for Wget and compiling it locally, yourself. Just do:

$ wget https://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
$ mkdir wget-latest && tar xzf wget-latest.tar.gz --strip-components 1 -C wget-latest
$ cd wget-latest
$ ./configure
$ make

You can then use the wget executable from src/wget. You could also install it as a local user if you like.


Edubuntu LTSP amd64 not Loading with PXE

So, after a year and a half of trying to figure this out (off and on, of course), I finally have an answer. (And, I'm frankly a little embarrassed by how long it took). All that needs to be done is edit the file at /etc/ltsp/dhcpd.conf. Here's a copy of the new file to those who may be interested (you'll notice the mentions to i386 commented out and amd64 put in its place):

# Default LTSP dhcpd.conf config file.
#

authoritative;

subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.20 192.168.0.250;
    option domain-name "example.com";
    option domain-name-servers 192.168.0.1;
    option broadcast-address 192.168.0.255;
    option routers 192.168.0.1;
#    next-server 192.168.0.1;
#    get-lease-hostnames true;
    option subnet-mask 255.255.255.0;
#    option root-path "/opt/ltsp/i386";
    option root-path "/opt/ltsp/amd64";
    if substring( option vendor-class-identifier, 0, 9 ) = "PXEClient" {
#        filename "/ltsp/i386/pxelinux.0";
        filename "/ltsp/amd64/pxelinux.0";
    } else {
#        filename "/ltsp/i386/nbi.img";
        filename "/ltsp/amd64/nbi.img";
    }
}


Cannot boot Fedora from Ubuntu GRUB menu in multi boot system

Now saw you have proxy files. Those are from Grub Customizer. You should either stay with Grub Customizer. But if it does not do what you want, totally reinstall grub2, so Grub Customizer is uninstalled. You may want to backup any custom settings in 40_custom that you already have done, otherwise those get overwritten.

You can try this in 40_custom:

menuentry "Fedora UEFI" {
  search --file --no-floppy --set=root 26F5-18E3
  chainloader (${root})/efi/fedora/grub.cfg
}

Or a configfile entry that loads Fedora's grub since it is in a separate /boot that is not inside the LVM. May be grub.conf not grub.cfg with Fedora.

menuentry "Fedora configfile" {
  search --file --no-floppy --set=root e5cbe847-a1be-4eee-a35a-e59fca2ec794
  configfile (${root})/boot/grub/grub.cfg
}

All the examples I have for booting Fedora directly do not use LVM, so I do not know details on the mount in grub of the LVM. If LVM mounted your grub update should find it and add a direct boot of  the fedora install. You may need to add the loading of lvm modules into grub also using insmod lvm

Another alternative is just copy the boot stanza from Fedora's grub into Ubuntu's 40_custom, its just then you have to regularly update when Fedora has kernel update.


Ubuntu 14.04 prevent screen turning off in lock screen

My experience: I tried setting the option "turn off screen" to never and "lock screen" to 30 seconds, but the computer never locks automatically.

It seems like the time to lock the screen its only after the screen turns off, in that case the "lock screen" option should be grayed out when "turn off screen" its set to never.


You can remove these drivers by

booting into recovery mode and
running

sudo apt-get purge fglrx*


The names are determined by the udev rules in the file /etc/udev/rules.d/70-persistent-net.rules. You can change the name there.

I don't know why that file changed on your computer, though.


/var/run/reboot-required not set after unattended kernel update

Do you have update-notifier-common installed? According to this you need it for automatic reboots to work.


Bash Script for Dump Several Processes on Android Devices

You can make each script accept 2 parameters, the port to use and the pid to use.
Then run them with differing ports and pids.
For example, if the first script is called script1 then you can run

script1 8888 797
script1 8887 1025
script1 8886 2020

Here are the scripts that use 2 parameters.

#!/bin/bash
port=${1?} pid=${2?}
echo "adb forward tcp:$port tcp:$port"
adb forward tcp:$port tcp:$port

#!/bin/bash
port=${1?} pid=${2?}
echo "acquire the process with mem tool"
adb shell "
/dev/examiner/mem $pid | /dev/examiner/nc -l -p $port
"

#!/bin/bash
port=${1?} pid=${2?}
echo "dump the selected process"
nc 127.0.0.1 $port > ~/work_folder/bin/${pid}_surface_flinger.bin

I dont know why you have exec $SHELL at the end of each script. Are you sure you need it?


Komodo Edit: GLib-CRITICAL **: g_slice_set_config: assertion `sys_page_size == 0' failed

This is being tracked on the Mozilla bug tracker at

https://bugzilla.mozilla.org/show_bug.cgi?id=833117

At the moment there is no fix, but the error/warning can be ignored.


heat and fan pacing after ubuntu 12.10 is installed alongside windows 7

I went through same problem sometime back. Tried lot many things but didn't get grip over the problem. You can try whatever solutions given around over the internet.

But I suggest you to re-install ubuntu. But remember to use the correct usb tool to install. I mean correct software to make bootable usb. I recommend "unetbootin".

This is actually a problem which comes due to incorrect linux installation.


EFI Dual Boot Ubuntu 14.04 and Wind10 - Grub strange behavior

Two possible solutions occur to me:

Install my rEFInd boot manager. This tool is more reliable about booting Windows than is GRUB, so it may work around whatever is causing GRUB to ignore the Windows entry. Note that this means you'll be bypassing GRUB, at least for Windows boots; instead, you'll see rEFInd's menu. (To boot Ubuntu, rEFInd should be able to either boot Linux kernels directly or use GRUB.)
Create a manual GRUB boot stanza for Windows, as described in my answer to this question. You'll need to change some details, such as the partition identifier (it should probably be (hd0,gpt2)).

Also and FYI, your /dev/sda2 is the EFI System Partition (ESP). Note that it's the EFI System Partition -- it "belongs" to the EFI (the computer's firmware), not to any one OS. OSes are required to store their boot loaders in the ESP, but the ESP doesn't really belong to any one OS; it's normally shared by all the OSes. That said, it's possible to have multiple ESPs on a disk, and some users restrict each OS to using a dedicated ESP. That doesn't seem to be the case for you, although I can't be 100% positive of that without more detailed information, such as the output of sudo parted /dev/sda print or sudo gdisk -l /dev/sda. (Summaries such as you provided are almost always inferior to cut-and-pasted program output.) This isn't really relevant to your problem, but I thought I should clear up this bit of confusion.


Will Ubuntu Studio 20.04 come prepackaged with the drivers for AMD Radeon RX580 gpus?

I just recently booted a live version of Ubuntu 18.04 on a machine with an RX580, and the built-in driver worked fantastically (didn't need to use nomodeset when booting, great performance and no screen tearing or anything) so unless something has changed between 18.04 and 20.04, I'd say you're good to go!


How to crack the password of a zip which is protected with a password?

There are a few ways to do this.

fcrackzip:  To brute force you can use
 fcrackzip -u -b -v file.zip

The -u flag weeds out incorrect passwords, -b is for brute-forcing, -l is for specifying the password length, e.g: 4-8.  You can use a password-list with the -D and -p flags, like so:
 fcrackzip -u -b -D -p /home/Desktop/passwordlist.txt file.zip

RarCrack:
 rarcrack --type zip/7z/rar file.zip

I like this one as it saves cracking progress to a file called yourfilename.zip.xml, and will pick up where you left off when you next use it.

John the Ripper: Generate the hash first using
 zip2john file.zip > whateveryouwanttocallit.txt

or use rar2john, depending on the file,
and then:
 john --format=zip whateveryoucallit.txt

or --format=rar.
All of these can take a while depending on the length of the password, and the characters, but there you go.
If any of these tools aren't installed, install them with
 sudo apt-get install rarcrack/john/fcrackzip

If this is still not enough, you can download a fast Windows zip cracker, such as Passper for Zip, and run it with Wine.


Opening a file (eg the second path) found by `locate` with `vim`

Do:

vim "$(sed -n "2 {p;q}" <(locate myfile.txt))"

Here i am opening the second newline separated result found by locate myfile.txt with vim.

Make it a function, and put in your ~/.bashrc:

lovim () { vim "$(sed -n ""$2" {p;q}" <(locate "$1"))" ;}

The function takes first argument as the filename to search, and second argument as the number of resultant line (file) you want to open with vim.

More robust, tackling filenames with newlines in their names:

lovim () { vim "$(sed -nz ""$2" {p;q}" <(locate -0 "$1"))" ;}

Example:

lovim myfile.txt 3

will open the 3rd file from the result of locate myfile.txt.

Expansion scope:

Adding some sanity checks on input and output (if the desired number of lines (file) present, before feeding to vim)


I could delete it manually but I would prefer a more clean approach instead.

Why?

  How to remove OpenVAS entirely?

Manually delete it. That directory you created yourself when you set openvas up so it is not part of the installation process so will not be deleted or purged by the system. It contains certificates in ./CA and ./public/CA).


Ubuntu Xenial Standard Installation w Encryption: Dropped all partitions - how to restore LUKS

Few... I managed to solve it and to get all my partitions back. Here in a nutshell what I did:

First, I took an Ubuntu live USB drive and booted into the live system. Then:

install gddrescue and use ddrescue to backup the whole drive bit by bit into a file on an external drive. This gives peace of mind when playing around: The original state can always be restored if necessary
Use testdisk to do a quick search. It did not get the crypt partition right, but the boot one, so I restored that one with testdisk.
Use
"grep -a -b -P --only-matching 'LUKS\xba\xbe' /dev/sda"
to search for the beginning of the LUKS crypt.
Use
"losetup -o result_from_grep -r -f /dev/sda" and
"hexdump -C -n 128 /dev/loop0"
to verify if this is really the beginning of the LUKS crypt including the header. It should look something like: |LUKS....aes.....|
The grep returned the start in Bytes, calculate it in sectors
Use parted to create an Extended partition starting two sectors before the LUKS crypt, till -1s (End of Disk, as in my case, the whole rest of the disk was used)
Use parted to create a logical partition on the sector where the LUKS crypt starts until -3s (three sectors before the end - see my example fdisk -l in the question)
Open the crypt and follow the steps as outlined in link 2 to restore SWAP, root etc.
You can try to save your data at this point, but in my case I could just reboot and get the computer up and running normally again.

These three links helped me with the different steps, as well as man pages of the commands:

1) parted: how to create the partitions exactly at the right positions

2) Mount crypt and find all the logical volumes again

I hope this helps others with similar problems.


Lightdm appears and immediately disappears (DELL XPS 13)

Ditched LightDM completely and replaced it with sddm (comes with kubuntu-desktop), since I am mostly using Kubuntu. No problem with this.

By the way, LightDM would prevent me from switching VTs, even after logging in to KDE. Now, using sddm, I have no problems with that, and Ctrl + Alt + Fn will work as expected.


If I am behind a router, how do I edit DNS resolution?

If you need to modify the nameserver addresses (because, e.g., your router's nameserver is slow) you can set them in the NetworkManager's Connection Editor.

If you don't use NetworkManager then, in Ubuntu 11.10 or earlier, add a line to /etc/resolv.conf such as the following one.

nameserver 8.8.8.8

The address 8.8.8.8 is the IP address of a public DNS server provided by Google, but of course you can use any other good DNS server IP address.

In Ubuntu 12.04 or later you cannot edit /etc/resolv.conf directly because it is generated dynamically and any manual changes will be overwritten. (Actually /run/resolvconf/resolv.conf is overwritten and /etc/resolv.conf is a symbolic link to the latter.) Instead you include nameserver addresses along with other information about each network interface. Again, if you use NetworkManager to configure an interface (a "connection" in NM parlance) then enter nameserver addresses accessible over that interface into the Additional DNS servers field for that interface, using the Connection Editor. If you use the ifup program to configure an interface, add the addresses onto a dns-nameservers line in /etc/network/interfaces. And so on.


VT-x (or "VirTualization eXtensions" for Intel, same as AMD-V for AMD) will be used by default by KVM if available.
The guest OS benefits by running faster -- put simply, VT-x eliminates the overhead (or translation) that was previously involved in letting the guest OS access memory and use the CPU. See this Intel Technical Journal page for technical details.

Although no additional drivers are required to use VT-x per se, it's a good idea to install the "tools" or drivers which allow the guest to access disk/network as much faster "paravirtualized" devices rather than emulated ones. If your processor also supports VT-d, your guest OS may benefit from that too.
For KVM, this can be enabled with the virtio devices, for example:

qemu-system-x86_64 -boot c -drive file=/images/xpbase.qcow2,if=virtio -m 384 -netdev type=tap,script=/etc/kvm/qemu-ifup,id=net0 -device virtio-net-pci,netdev=net0

see this KVM wiki page for more info.
64-bit, as long as you have more than 1GB or so of RAM; especially if you're planning to do virtualization.
VT-x/AMD-V are quite mature technologies at this point and I doubt that KVM lags behind any competing hypervisor (VMware, Virtualbox, etc.).


Can access webserver via IP but not Domain

I was doing some quick testing. I realized that my browser was automatically trying to connect via HTTPS and not via HTTP. This was causing my quick check trying to connect to my server running over HTTP (port 80) to fail since my browser was actually making request to HTTPS (port 443).

When I changed my request to use HTTP for the domain, my request went through.


18.04.1, Threadripper 2, kernel 4.18, RX550 GPU, all up to date, freezes

By using zenstates.py and turing off cstate 6, I've been running flawlessly for 2 days.


Internet breaks when there is heavy data traffic

So it appears that your Rpi has a static address, and it likely shares the network with other devices that use addresses dynamically assigned by the DHCP server (your router).

The DHCP server avoids conflicts between the addresses it assigns. But if the Rpi address is static, DHCP doesn't know about it and may assign that address to another device, so two devices are using the same IP address. Thing becomes a bit random at that point, depending on what each devices has in its arp cache.

So either make the Rpi acquire its address via DHCP(*) or give it an address outside of the DHCP range. It should be possible to tell your router to restrict the DHCP range to a subset of your subnet (say, the 128 first) and give the Rpi an address in the other half...

(*) Yes the address is not known in advance, but in practice the DHCP devices get a "lease" on their address, so unless you have very many devices connecting to your network, a given device will always get the same address, and you can still hardcode the Rpi address. There are also ways to dynamically discover the address of connected devices (WINS).


Unable to disable secure boot with mokutil in 16.04

while I did have a slightly different problem (my Broadcom Wifi driver wasn't working), the symptoms seem to be the same. I too had to enter a password during installation which was never checked after boot.

I too got the strange error message

  Failed to request new MokSB state

after executing mokutil --disable-validation

However: in my case, the problem was I didn't type sudo: sudo mokutil --disable-validation.
After that reboot, Shim was starting and I was able to disable secure boot after shim without disabling secure boot in the BIOS (which is necessary for Windows dual boot).


Raspbery PI vid config for use in Ubuntu

You are looking at this the wrong way. Your question boils down to How can i use the Raspberry pi "config" on my laptop to get HDMI on my laptop working.  You cant.

The Raspberry pi is one device with ONE hardware configuration. It was built and intended to work with Linux  hence its drivers were well tested and developed for this purpose. Which is not the case with your laptop.

The only thing the raspberry pi can help you with (and it has) is to rule out problems with your TV or your HDMI cable. It works so you know that its on the laptop you need to focus your efforts.

Try making a new concrete question with detailed info about your laptop model hardware and ask about getting HDMI working instead of a leading question like this.


Only 2 TB recognized from 4 TB Seagate disk

The drives are in RAID format. As long as the RAID shows up as 4G or 8G, you're fine. If the RAID shows up as something else, then one of your GPT partition tables is corrupt, and needs to be re-written.


file command reports text/plain for .css file

AFAIK you can't use file -i or file --mime-type to test the functionality of the system-wide MIME database. file uses magic and its config by default, so to change the behavior of file, you would have to change the magic config.

To check and modify the xdg-open behavior instead, you should use the XDG-Utilities. For example, you can check the current settings how to handle files with text/plain MIME type:

~ $ xdg-mime query default text/plain

On my Mint laptop, it returns

gedit.desktop

For text/css, there's usually no default application set (you can check this using xdg-mime query default text/css). To change this and set GEdit as default CSS editor, you could use the following command:

~ $ xdg-mime default gedit.desktop text/css

This will insert a line in /home/<Username>/.local/share/applications/mimeapps.list with text/css=gedit.desktop. Instead of using xdg-mime, you could modify the mimeapps.list directly.

Now, xdg-mime query returns the application i've chosen ...

~ $ xdg-mime query default text/css
gedit.desktop

... and xdg-open /tmp/file.css will start GEdit and load the CSS fiile.

See also this page on xdg-open from the Arch Linux Wiki.


How do I reenable opening jar files by double clicking on them?

You can try the following:

If you have OpenJDK Java 7 Runtime installed in your system, then you should have a file named openjdk-7-java.desktop in the folder /usr/share/applications/

Check if you have the .desktop file.

Go to the terminal and type:

cd /usr/share/applications

ls -l openjdk-7-java.desktop
If the result is:

-rw-r--r-- 1 root root 367 Oct 24 22:29 openjdk-7-java.desktop
Then (to associate OpenJDK Java 7 Runtime to the java files) you can edit the file defaults.list also in the folder /usr/share/applications/ .
In the terminal type:

sudo gedit /usr/share/applications/defaults.list
Search for application/x-jar and application/x-java-archive in the defualts.list, and change the .desktop file to the openjdk-7-java.desktop and save the changes.

Now the java files should be open with Open JDK 7 by default. To double-click and run, make sure the file has execute permissions.

You can set the permissions in the terminal with: chmod 755 file.jar or right click in the file, permissions tab and click in "Allow executing file as a program"

Finally double-click in the file to run it.

Hope this will helpful!

Regards.


Can't Install Ubuntu 17.10 Due To Graphical Glitches

There might be some problem with your installation media. Well, You can try another installation media of Ubuntu or if you are using bootable USB drive, try to make it bootable again.

Updated:

Ok, try to install Ubuntu on on Vmware or Virtual box and check if it works or not?


How to kill tabs without closing the tabs or killing the browser itself in chromium 58

Ctrl + Shift + w will kill all tabs in the currently selected chrome window without affecting the browser itself.


htop settings (F2 or shift-s) only allows altering the top part.

  (without renaming the actual script and inputs)

No. It will show the command as is, with parameters.


Can I save a PGM file (portable gray map) somehow with Inkscape?

You can create PGM files with GIMP (available from the Software Centre). This is made going to File -> Export As... and then selecting PGM in the All export images drop down list.

Inkscape should be able to import files in PGM format but it is not able to save them.


CPU is always set to max frequency even when idle

I managed to solve the issue (not sure how) by deleting all commands in "Startup Applications" and also installed CPU power management Gnome extension.
That seemed to do the trick.


From your command above there appears to be a PQ - QP mismatch in the spelling, is that just a paste typo?

Is it the case that Apt is set to always prefer lucid? (Is does not appear as such from the apt-cache output though...) Does:

apt-get -t mycompany-staging install {python-ampqlib,python-amqplib}

make any difference?


Try to change the server selecting update manager, definitions,downloading from, then select a server more near you. and then try again.

Edit: see this link on how to add it by editing sources.list.
How can I get apt to use a mirror close to me, or choose a faster mirror?


How do I work menuLibre in Xubuntu 14.04 & 14.10?

Terminal

$ menulibre

Highlight item to be moved.

Click on up or down arrow in lower left hand corner.

Lather, Rinse, Repeat

I just installed 14.04 (with updates) about 4 am today. The version of menulibre that you want DOES exist. Might want to uninstall the version you have before installing the new one "just in case".


How do I get the system menus to stay open on click?

This has been addressed in an update to Unity: https://bugs.launchpad.net/ubuntu/+source/unity/+bug/869196

The update has been pushed to oneiric-updates.


Ubuntu Server "fakeraid" RAID5 installation

The Nvidia CK804 chipset isn't "real" hardware RAID, I'm afraid. It's largely software driven, "fakeRAID". In Ubuntu you'd use the dmraid driver to utilise it.

There is a strong argument for using software RAID instead (performance is very similar and it's much more portable - with caveats). The only reason I'd use fakeRAID over softRAID is if I needed to dual-boot to Windows and needed a shared RAID5 NTFS partition. SoftRAID has better tools, monitoring and support IMO.

Anyway, if you're still interested in dmraid, read through the Ubuntu Help page on FakeRAID. It's not the clearest of pages but it should get you sorted. You also now know the phrases you'll need to search.

On another note, I would also suggest that perhaps the operating system install doesn't need to be on any sort of RAID. I personally leave all the OS data on an SSD and only put parts of user profiles on RAID. There's also a cron job to backup /etc/ to the RAID volume once a day (things don't change that much) and reinstalling is fairly trivial.


Is my drive encrypted? I can read encrypted partition without providing password

that's indeed quite disturbing.

May be you can double check from the command line with:

cryptsetup luksDump /dev/mmcblk0p1

It should spit out something like

LUKS header information for /dev/mmcblk0p1

Version:        1
Cipher name:    aes
Cipher mode:    xts-plain64
Hash spec:      sha1
Payload offset: 4096
MK bits:        256
MK digest:      50 21 48 22 e3 5e 83 ff 09 eb 56 48 8a 57 44 cf 23 9c ae 9f
MK salt:        0c c0 81 cb 14 17 08 b3 5b c5 91 b9 9e 38 a5 87
                36 db 6f 16 55 d2 92 06 e3 96 0e 94 73 8e 13 27
MK iterations:  32125
UUID:           0080a648-0f64-4ea9-abe2-18585a2da9b1

Key Slot 0: ENABLED
    Iterations:             256000
    Salt:                   73 19 d4 9c a7 24 f3 bc 2c f8 77 8c 98 b9 46 0b
                            00 51 d3 bd bb 07 d5 38 e2 12 ff 34 3b 3d 31 42
    Key material offset:    8
    AF stripes:             4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED

It is the data of the LUKS header of the encrypted partition

p.s: By the way, which version of Disks utility are you using ? Mine is a little different.

May be you have saved the password of the encrypted partition ? But if Disks shows it locked, it is locked.
When it is locked, look in /dev/mapper directory for link like luks-0080a648-0f64-4ea9-abe2-18585a2da9b1. If it is there, then you have an unlocked LUKS partition. Check output of mount to find out if it is the sd card


HP Envy Touchpad/Trackpad/Mousead glitching after updating from Ubuntu 14.04.1

You might try resetting the touchpad every so often using:

$ sudo tpconfig -xr

I know this is a work around, and annoying, but it isn't as bad as a flaky touchpad!


Is it possible to bring back the search box in gedit open recent files dropdown in 20.04?

As KGIII said, there is a Quick Open plugin for gedit, that also works in Ubuntu 20.04.
To enable the plugin click the hamburger menu (the button with the three lines on the top right) → Preferences → Plugins and enable Quick Open (see screenshot below).

After that press Ctrl+Alt+O to open a window which shows your recently opened files but also allows to search for files to open.


This turned out to be an issue with the settings for the video card. I executed the configuration editor for the video card. In this case by executing

gksu nvidia-settings

I then had to enable the second monitor and restart xwindows and presto it worked.


Youtube occasionally giving black screen

All you need to do is turn off the hardware acceleration option in Chrome/Chromium. Settings > Advanced Settings > uncheck "use hardware acceleration when available".


Customize Gnome-Do's default action order

This is not directly possible in Do, but it does have a capability to learn what you mean.  The default action for any item is always the action you've used most frequently out of the possible actions for that item.

So, one way of getting what you want would be to just use the run action a lot from Do.

Another way would be to inform Do that your script is an “application” that's runnable, like Firefox or Evolution or such.  Do determines the list of applications by searching for .desktop files in the standard locations.  One of these locations is ~/.local/share/applications.  So, if you create a foo.desktop file looking something like:

[Desktop Entry]
Version=1.0
Name=Foo desktop frobinator
GenericName=Desktop frobinator
Comment=Awesomeate your desktop!
Exec=/home/raof/.scripts/foo.sh
Icon=shotwell
Terminal=true
Type=Application
Categories=Graphics;Photography;GNOME;GTK;

you'll get a “Foo desktop frobinator” runnable item in Do.


You can mount a device by typing i.e. sudo mount /dev/sdxX /mnt (change "xX" to your device)

Identify your USB-Stick by sudo fdisk -l to know the devicename and partition number which looks like sdbxX i.e. sdb1


Record and display Kinect audio and video via avconv

Correct avconv usage is:

avconv [global options] [input options] -i input [output options] output

You're putting all your options before your input, and so avconv is treating them all as input options. This would be better:

avconv -f video4linux2 -i /dev/video1 -s 640x480 -c:v libx264 -c:a ac3 test.mp4

The default settings may not be ideal for you; for libx264 you might want to set a -crf value (between 0 and 51, 23 is default, 18-28 is a sane range to use, lower=better quality, but bigger file) and a -preset (I normally use veryfast). For more information look here. Normally I'd recommend using VBR encoding for audio, but I don't really know about encoding AC3, so you may need to use a fixed bitrate (-b:a 192k will probably be OK for stereo sound).

Also, resizing the video may not be necessary, only use -s 640x480 if you need to shrink a larger input to that size.

As for viewing it as you're recording it, I can think of two solutions. The first is to simply open the file you are creating with your preferred video player software. This will mean a slight delay in viewing.

The second solution is to send a second output from avconv to stdout, and then use I/O redirection to input the information to a video player. This will be faster, but it will take about twice the processing power, since as it stands avconv can only do this by encoding a second time (this may change in the future).

avconv -f video4linux2 -i /dev/video1 -s 640x480 -c:v libx264 -c:a ac3 test.mp4 \
-s 640x480 -c:v libx264 -c:a ac3 -f mp4 - | vlc -

I'm using VLC as an example, but all the linux video players I know can do this. Since avconv normally determines what container format to use from the file extension, but - (stdout) doesn't have one, so you have to declare the container format with -f mp4.


How to import Winamp equalizer presets to Audacious?

This is the winamp presets file edited for Audacious.
Save the following text as "eq.preset" in the folder "home/.config/audacious/"

NOTE: lower preamp if your speakers are popping or else you will loose hearing.

[Presets]
Preset0=Classical
Preset1=Club
Preset2=Dance
Preset3=Full Bass
Preset4=Full Bass & Treble
Preset5=Full Treble
Preset6=Laptop Speakers / Headphones
Preset7=Large Hall
Preset8=Live
Preset9=Party
Preset10=Pop
Preset11=Reggae
Preset12=Rock
Preset13=Ska
Preset14=Soft
Preset15=Soft rock
Preset16=Techno

[Classical]
Preamp=-1,11022e-15
Band0=-1,11022e-15
Band1=-1,11022e-15
Band2=-1,11022e-15
Band3=-1,11022e-15
Band4=-1,11022e-15
Band5=-1,11022e-15
Band6=-7,2
Band7=-7,2
Band8=-7,2
Band9=-9,6

[Club]
Preamp=-1,11022e-15
Band0=-1,11022e-15
Band1=-1,11022e-15
Band2=8
Band3=5,6
Band4=5,6
Band5=5,6
Band6=3,2
Band7=-1,11022e-15
Band8=-1,11022e-15
Band9=-1,11022e-15

[Dance]
Preamp=-1,11022e-15
Band0=9,6
Band1=7,2
Band2=2,4
Band3=-1,11022e-15
Band4=-1,11022e-15
Band5=-5,6
Band6=-7,2
Band7=-7,2
Band8=-1,11022e-15
Band9=-1,11022e-15

[Full Bass]
Preamp=-1,11022e-15
Band0=-8
Band1=9,6
Band2=9,6
Band3=5,6
Band4=1,6
Band5=-4
Band6=-8
Band7=-10,4
Band8=-11,2
Band9=-11,2

[Full Bass & Treble]
Preamp=-1,11022e-15
Band0=7,2
Band1=5,6
Band2=-1,11022e-15
Band3=-7,2
Band4=-4,8
Band5=1,6
Band6=8
Band7=11,2
Band8=12
Band9=12

[Full Treble]
Preamp=-1,11022e-15
Band0=-9,6
Band1=-9,6
Band2=-9,6
Band3=-4
Band4=2,4
Band5=11,2
Band6=16
Band7=16
Band8=16
Band9=16,8

[Laptop Speakers / Headphones]
Preamp=-1,11022e-15
Band0=4,8
Band1=11,2
Band2=5,6
Band3=-3,2
Band4=-2,4
Band5=1,6
Band6=4,8
Band7=9,6
Band8=12,8
Band9=14,4

[Large Hall]
Preamp=-1,11022e-15
Band0=10,4
Band1=10,4
Band2=5,6
Band3=5,6
Band4=-1,11022e-15
Band5=-4,8
Band6=-4,8
Band7=-4,8
Band8=-1,11022e-15
Band9=-1,11022e-15

[Live]
Preamp=-1,11022e-15
Band0=-4,8
Band1=-1,11022e-15
Band2=4
Band3=5,6
Band4=5,6
Band5=5,6
Band6=4
Band7=2,4
Band8=2,4
Band9=2,4

[Party]
Preamp=-1,11022e-15
Band0=7,2
Band1=7,2
Band2=-1,11022e-15
Band3=-1,11022e-15
Band4=-1,11022e-15
Band5=-1,11022e-15
Band6=-1,11022e-15
Band7=-1,11022e-15
Band8=7,2
Band9=7,2

[Pop]
Preamp=-1,11022e-15
Band0=-1,6
Band1=4,8
Band2=7,2
Band3=8
Band4=5,6
Band5=-1,11022e-15
Band6=-2,4
Band7=-2,4
Band8=-1,6
Band9=-1,6

[Reggae]
Preamp=-1,11022e-15
Band0=-1,11022e-15
Band1=-1,11022e-15
Band2=-1,11022e-15
Band3=-5,6
Band4=-1,11022e-15
Band5=6,4
Band6=6,4
Band7=-1,11022e-15
Band8=-1,11022e-15
Band9=-1,11022e-15

[Rock]
Preamp=-1,11022e-15
Band0=8
Band1=4,8
Band2=-5,6
Band3=-8
Band4=-3,2
Band5=4
Band6=8,8
Band7=11,2
Band8=11,2
Band9=11,2

[Ska]
Preamp=-1,11022e-15
Band0=-2,4
Band1=-4,8
Band2=-4
Band3=-1,11022e-15
Band4=4
Band5=5,6
Band6=8,8
Band7=9,6
Band8=11,2
Band9=9,6

[Soft]
Preamp=-1,11022e-15
Band0=4,8
Band1=1,6
Band2=-1,11022e-15
Band3=-2,4
Band4=-1,11022e-15
Band5=4
Band6=8
Band7=9,6
Band8=11,2
Band9=12

[Soft rock]
Preamp=-1,11022e-15
Band0=4
Band1=4
Band2=2,4
Band3=-1,11022e-15
Band4=-4
Band5=-5,6
Band6=-3,2
Band7=-1,11022e-15
Band8=2,4
Band9=8,8

[Techno]
Preamp=-1,11022e-15
Band0=8
Band1=5,6
Band2=-1,11022e-15
Band3=-5,6
Band4=-4,8
Band5=-1,11022e-15
Band6=8
Band7=9,6
Band8=9,6
Band9=8,8


Sounds like run.sh is using relative paths. Your current working directory when you run it from ~/ is ~/ not ~/Desktop/Haven.

You can fix this by cding to the directory of the script somewhere near the beginning of run.sh, with something like this:

cd "$(dirname "$(readlink -f -- "$0")")"

That, or you could have it specify the full paths to your jars.


How to customise Ubuntu to have the following features?

The First Customization is already available as Super+A . And currently by pressing Single button Super or Dash for directly accessing Applications menu is not available, would be illogical too ( i suppose) .

For your Second Optimization go to system Settings  >> Privacy >> >> Applications  select the + to add the applications you don't want to see in the recently Used as here

For Third Customization Use Ubuntu Tweak , then under

  TWEAK >> Desktop >> window >> windows control button positions>> select Right

For your Fourth Customization refer the Answers here

Hope this Helps.


There is Mconnect

EDIT May, 2018

A new comer is GSConnect for gnome 3.24+. More informations on their GitHub.


This method is only for text only documents. Otherwise the image colors will be inverted.

You can install Evince document viewer from this link and open it.Then goto the options on the top right corner as seen in the picture.

Then select Inverted colors. This will help you to read white text on a black background.
In Evince document viewer 3.30.1+ select Night Mode.


Trying to install tp-link archer T2U wifi adapter

NOTE: There are official sources for the drivers - as noted by some other answer here - but those don't (usually(?)) compile/work out of the box.
Also, the newest version doesn't work for me (Debian 8 with standard x64 kernel:
3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux
) - what does (still) work for me is commit   4606187110b323c272aed504144ee759b31af8ac.

There is an easier solution than trying to use the manufacturer's source (taken from this (German) site):

Just run (with the device being unplugged)

sudo apt-get install git build-essential
mkdir ~/src
cd ~/src
git clone https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916.git
cd mt7610u_wifi_sta_v3002_dpo_20130916
make clean
make
sudo make install

and reboot. As indicated above, you might want to git checkout 4606187110b323c272aed504144ee759b31af8ac before running make and make install. For instance, the newest version

  Caused it to freeze
  Didn't integrate with NetworkManager, ...

and who knows what else.

Worked for me, I also have the Archer T2U, with the same USB-device. I run another system ( I used this with LMDE, kernel 3.11, now I'm on Debian (see above)), however the solution I have linked was tried with the following setups:

  Ubuntu 14.04.2 LTS, linux kernel 3.13.0.49, gcc 4.8.2
  Ubuntu 15.04, linux kernel 3.19.0-15, gcc 4.9.2

So there might be a good chance, that this will work for you.

The author(s) simply modified the MT7610U linux driver from the MediaTek homepage to compile for your device as well as a couple of other ones based on the same chipset.
If you feel like it, you can probably run some command to diff the linked source and the one from MediaTek since directory trees and source file are probably no different from the MediaTek source.

UPDATE: There is another site that may be helpful, if you want to go into fixing the original source yourself instead of following the above instructions:
http://hprath.com/2014/06/cisco-linksys-ae6000-ac580-media-tek-mt7610u-mt7630u-mt7650u-linux-x64-driver-patch/


I got rid of the old profile

mv ~/.gimp-2.6/  ~/.gimp-2.6.bak

I restarted GIMP and it worked!


How to view the console.log of an application whose terminal is closed

You can print the output of the command in another file suppose you have run npm start command for starting your node server than change the command like this npm start > log.txt

Hope it will help you.


autoinstall - using webhooks for reporting

I setup an http-echo-server and added the reporting section to a config.  When the webhook reporting works, it appears to send one HTTP request for each log message generated.
For example, this line in the file /var/log/installer/subiquity-server-debug.log
2021-05-05 00:06:50,666 DEBUG root:39 finish: subiquity/Network/_send_update: SUCCESS: CHANGE ens192

corresponds with this HTTP request
--> POST / HTTP/1.1
--> Accept-Encoding: identity
--> Content-Length: 190
--> Host: REDACTED:8080
--> User-Agent: Curtin/21.2-7-gd49d35bc6
--> Content-Type: application/json
--> Authorization: OAuth oauth_nonce="24545438356422201711620173210", oauth_timestamp="1620173210", oauth_version="1.0", oauth_signature_method="PLAINTEXT", oauth_consumer_key="ck_foo", oauth_token="tk_foo", oauth_signature="cs_foo%26tk_secret"
--> Connection: close
-->
--> {"name": "subiquity/Network/_send_update", "description": "CHANGE ens192", "event_type": "finish", "origin": "curtin", "timestamp": 1620173210.6665578, "level": "DEBUG", "result": "SUCCESS"}

I tested originally with subiquity 20.04.3 and the HTTP server received no data, just like you observed.
I added the configuration to have subiquity update itself.  This resulted in using subiquity 21.04.2 and the HTTP server did receive messages.
Here is a partial config of what was tested
#cloud-config
autoinstall:
  refresh-installer:
    update: yes
  reporting:
    mylistener:
      type: webhook
      endpoint: http://REDACTED:8080/
      consumer_key: "ck_foo"
      consumer_secret: "cs_foo"
      token_key: "tk_foo"
      token_secret: "tk_secret"
      level: INFO

Other Notes

I do not see any commits or bug fixes related to reporting or webhook, so I'm not certain what fixes it or how reliable it should be considered.
Even though the level is set to INFO, the webhook is still sent messages for DEBUG.


Ubuntu won't detect Btrek H9 bluetooth headset anymore

I fixed the problem reading some other posts, I will post it here so other people having the same problem can solve it, you just have to execute these commands:

wget https://dl.dropboxusercontent.com/u/2259248/BCM20702A0-13d3-3404.hcd
sudo cp BCM20702A0-13d3-3404.hcd /lib/firmware/brcm/
sudo modprobe -r btusb
sudo modprobe btusb


How do I fix xbindkeys keyboard to mouse button, repeating key presses when held?

The solution to stop a key-press from repeating is by adding the command xset -r keycode in the xbindkeys file. It behaves the same way as disabling key repeat in settings/keyboard.

the code in place looks like this:

"xset -r 225; xdotool mousedown 2"
    m:0x0 + c:225
    XF86Search

"xdotool mouseup 2"
    m:0x0 + c:225 + release
    XF86Search

While this solved this issue, the real problem I was having was not fixed, which was getting the search button to work perfectly as a middle mouse button in programs such as Blender. The above solution doesn't work well with the Shift modifier for a reason I don't understand.

The best solution for this problem was to forgo xbindkeys entirely, and instead enable middle click emulation by adding this code to /etc/sysctl.conf:

# Enable mouse button emulation
dev.mac_hid.mouse_button_emulation = 1
# Set 2nd button to 217 - the middle button of MX Revolution mouse.
dev.mac_hid.mouse_button2_keycode = 217

After this, I had to create a udev file in /etc/udev/rules.d/ where it would call on a script whenever it would see my dongle plugged in. This script contains the command sysctl --system which is needed to enable the mouse 2 emulation. For some reason it is not enabled by default, which is something I would like to look into later.

This is my udev file specific to my logitech dongle:

SUBSYSTEM=="usb", ENV{ID_VENDOR_ID}=="046d", RUN+="/bin/sh  /home/user/mouse-initialize-settings.sh"


I think you may have changed accidentally the configurations of user and root.
Would you please try this:

sudo apt-get update && sudo apt-get install aptitude && sudo aptitude purge ping && sudo aptitude install ping


Wacom One: device descriptor read/64, error -71

I have the same issue and I discovered it is a problem related to the newest kernel version (5.4.0-54-generic). For some reason the module is not loaded.
I solved by switching to the next to the last stable version (5.4.0-53-generic).
I hope this helps.


How to activate Radeon Dynamic Power Management?

Personally I dislike adding options to modules via the GRUB command line. Instead, to enable DPM with my Radeon card I created a file /etc/modprobe.d/radeon.conf with the following contents:

options radeon dpm=1

After creating this file it is necessary to rebuild the initramfs in order to apply the changes:

$ sudo update-initramfs -u

After the next reboot, the dmesg contents show that the option has taken effect:

$ dmesg | grep radeon
... various other output ...
[    2.439073] [drm] radeon: dpm initialized


Gnome: Keyboard shortcut to move to workspace 7 (or higher)

Add a new custom shortcut

Use xdotool. In the command line put "xdotool getactivewindow set_desktop_for_window 8" to send your window on the workspace 9 (there is a -1 delta to take into consideration with xdotool).

This sends the window to the desired workspace but doesn't switch the view to it. Personally, I prefer to have another shortcut to move to the workspace (xdotool set_desktop 8).

Hope this help!


How can I install Brother printer hl-l2321d in Ubuntu14.04?

Brother supply a Driver Install Tool; get it from here Brother - Driver Install Tool and click to SAVE it and it should end up in your Downloads folder; open a terminal; copy the commands below; and paste each one; line by line into a terminal; hit the ENTER key after each paste; please for help if you need it with any of the above instructions

cd Downloads
gunzip linux-brprinter-installer-2.1 (1).1-1.gz
sudo bash linux-brprinter-installer-2.1 (1).1-1 HL-L2321D

the final command activates the install tool; watch the terminal as it runs, as it may ask you questions; let us know how it goes


How can I fix a failed Ubuntu to Lubuntu switch?

You might try installing lubuntu-desktop in addition to lubuntu-core.  That should pull in the default desktop settings, artwork and such.


Cannot connect XBOX 360 wireless controller on Ubuntu 16.04 ( xboxdrv cannot found controller )

First off, there are no Bluetooth Xbox 360 gamepads. Probably you have an "Xbox Wireless Controller", also known as an "Xbox One S controller".

Second, you don't need an XInput driver (like xboxdrv or xpad) to use Xbox One controllers over Bluetooth. When connected over Bluetooth, they are treated as Bluetooth HID devices and do not require a driver. So the "No Xbox or Xbox360 controller found" error is probably correct and not an issue for getting this device to work over Bluetooth.

Third, there's an issue with the BlueZ Bluetooth stack (which is used by many Linux distros, including Ubuntu) that causes Xbox One controllers to not stay connected. The device will pair successfully and seem to connect, but immediately disconnects. As a workaround, you can set the disable_ertm option to 1 which will allow the device to stay connected.

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

This causes issues that exactly match what you describe with the disappearing signal strength bars so it's likely that this fix will work for you. (Note: you'll need to do this after each reboot, so put it in a startup script if it works.)

sudo echo 1 > /sys/module/bluetooth/parameters/disable_ertm

Fourth, as mentioned in a comment above there is a firmware versioning issue. This was more of a problem a few years ago but may still bite you on 16.04. Basically, Microsoft decided to update the controller's firmware and changed the Bluetooth HID mode to make it more compatible with Android devices while leaving the USB mode unchanged. When they did that, they essentially made it so the controller, when connected over Bluetooth, looked like a "new" device that wasn't recognized by any drivers or games. It didn't start working again until developers updated their apps with the info for the "new" device. Getting new devices to be supported properly is always a challenge, but in this case it was particularly bad because so many people already had the device and it was broken intentionally. At this point it's less of an issue because most apps support both firmware revisions.


Copying root partition and /home to a new larger hard drive

First let's partition the new drive. As it's going to be a second drive in the system we just set it up like we want. If you're unsure about size requirements of your partitions use LVM. (I'm not going to cover it here.)
This will hopefully give you enough pointers to figure out what to do.

Don't use dd unless you're making an identical copy of the old (let's say swapping disk to a faster, but of the same size). First partition new drive, then format the partition (for example ext4). Then the actual copy can be done with: tar -c --one-file-system -f - . | (cd /newPartitionMountPoint/; tar -xvf -)
New drive: no, Using dd for partition: No, After parted: Yes (unless that formats the partition automatically)
Well when you're change partitions that existed before, you also have to edit /etc/fstab
use blkid to see new and old UUID + LABELS and change fstab accordingly. If you had /boot on separate partition on /dev/sda that's most of it.
Partition size for root is subjective. I've actually never needed bigger than 20G root, but that means I have separate partitions for /var/lib (if database is needed), /data for my generic data needs and of course  /home

Moving system around harddrives is easier in linux than in windows, but the most difficult move is moving '/' and '/boot'. I'd say a lot easier for you would be to check where you're using your space with: du -hsc /*
Then create a partition for the largest folder (like /usr)
/dev/sdb1 20G LABEL=myusr
/dev/sdb2 100G LABEL=myhome

Then create usrtmp folder and sync old usr there:
Please note that this is advanced stuff and might screw up your system even if everything worked ok. Basically, if you knew how to do this then go a head. If you did not know.. then I would not do this...

mkdir /usrtmp
mount LABEL=myusr  /usrtmp
cd /usr
tar -c --one-file-system -f - . | (cd /usrtmp/; tar -xvf -)
# this might be dangerous so I would do it with livecd myself..
# If you're feeling risky do this:
cd /
mv /usr /usr_old && mv /usrtmp /usr
## Now you can edit /etc/fstab to mount LABEL=myusr to /usr
## if you forget this but you did the mv then you won't be able to use your system
## Reboot, if everything is okay, you can remove /usr_old
## Repeat the same for home, but change labels accordingly


The accepted procedure is spelled out here:

Report a problem in Ubuntu

Excerpt:

  If you notice a problem in Ubuntu, you can file a bug report.

  Type Alt+F2 and type ubuntu-bug nameofprogram
  If you have a hardware issue or don't know the name of the program affected, just type ubuntu-bug
  After running one of the above commands, Ubuntu will gather information about the bug. This may take a few minutes. Review the
  collected information if you wish. Click Send to continue.
  A new web browser tab will open to continue processing the bug data. Ubuntu uses the website Launchpad to manage its bug reports. If you do
  not have a Launchpad account, you will need to register for one to
  file a bug and receive email updates about its status. You can do this
  by clicking Create a new account.
  After logging in to Launchpad, enter a description of the problem in the summary field.
  After clicking Next Launchpad will search for similar bugs in case the bug you are reporting has already been reported. If the bug has
  already been reported, you can mark that bug as also affecting you.
  You can also subscribe to the bug report to receive updates about
  progress with fixing it. If the bug has not already been reported,
  click No, I need to report a new bug.
  Fill in the description field with as much information as you can. It's important that you specify three things:
  What you expected to happen
  What actually happened
  If possible, a minimal series of steps necessary to make it happen, where step 1 is "start the program"
  Your report will be given an ID number, and its status will be updated as it is being dealt with. Thanks for helping make Ubuntu
  better!


Intel 3160 wireless network card connect to wifi will break down for a while

Yes it happened in my new laptop as well. Try updating the kernel to 4.11 or 4.12.

http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12/

Download depending upon your OS type i.e (64-bit/amd64 or 32-bit/i386):

    linux-headers-4.12.0-xxxxxx_all.deb
    linux-headers-4.12.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb
    linux-image-4.12.0-xxx-generic(/lowlatency)_xxx_amd64(/i386).deb

Install by the following command

    sudo dpkg -i *.deb

This will install the latest kernel files. Restart ubuntu for changes to take effect.


How do I preseed/partman/recipe two disks

Currently, most folks seem to achieve the partitioning of additional drives using the preseed/late_command functionality:

d-i preseed/late_command string \
  in-target echo -e "o\nn\np\n1\n\n\nw" | fdisk /dev/sdb1 ; \
  in-target mkfs.ext4 /dev/sdb1 ; \
  in-target echo "/dev/sdb1  /srv  ext4  nodiratime  0  2" >> /etc/fstab

Of course, this is suboptimal, and I would much prefer writing partman recipes that actually work for multiple block devices without RAID/LVM.

I wish I was totally wrong and someone would correct me with an example that works...


Why does loading my own ~/.Xmodmap freeze my desktop on 18.04?

Stackexchange user @kontrollantaren show us here how it can be solved in some situations:
Before initiating custom xmodmap config:

# Store default xmodmap
$ xmodmap -pke > ~/.Xmodmap.default

# Backup your custom xmodmap
$ mv ~/.Xmodmap ~/.Xmodmap.bak

# Make a diff between default and custom xmodmap, and store the diff as .Xmodmap
$ diff ~/.Xmodmap.bak ~/.Xmodmap.default | grep '<' | tr '<' ' ' > ~/.Xmodmap

Also the user @C.T. proposes here using xkb instead of xmodmap.

Offtopic: I cannot comment but when answered the question it was placed as a comment.


I can not increase Headphone volume from alsamixer

I suppose you've already covered this part!  but ...just in case....
I just opened alsamixer myself on a terminal and I see that I cannot control my headphone volume from there either. However, I don't have my headphones plugged in.  That would correct the situation, plugging them in.  Obvious, maybe not.  Your welcome.


You can use gnome-tweak-tool to change the GTK+ theme setting. To use gnome-tweak-tool, run the following command in a terminal:

sudo apt-get install gnome-tweak-tool

Note that installing gnome-tweak-tool also installs gnome-shell.

Search for gnome-tweak-tool or Advanced Settings (as it is named) in the Unity dash and open the tool.

Move to 'Theme' option on the left sidebar. You can now change the GTK+ theme by changing the options in the dropdown list. Check the image for clarification.


How do I recover from accidentally removing dpkg?

To fix this, open a terminal and download the dpkg  package:

# For i386:
wget http://mirrors.kernel.org/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1_i386.deb
# For amd64
wget http://mirrors.kernel.org/ubuntu/pool/main/d/dpkg/dpkg_1.18.4ubuntu1_amd64.deb

The versions will differ for different Ubuntu releases. If apt-get is still available (only dpkg was removed), you can still use apt-get to just download the appropriate version:

apt-get download dpkg

Or you can use https://packages.ubuntu.com/dpkg to get a download link for your Ubuntu release and architecture.

Extract the data.tar.gz file from the .deb file, which is actually an ar archive:

ar x dpkg_*.deb

Extract the package contents from data.tar.gz into the filesystem:

sudo tar xf data.tar.gz -C / .

Note: this will get just enough of dpkg working to let you use it. Be sure to install the dpkg package afterwards:

sudo apt-get install --reinstall dpkg


How do I target multiple files with HandBrakeCLI?

With a script:

#!/bin/bash

# this script is to convert automatically a folder of video files to mp4
# You need to change SRC -- Sourse folder and DEST -- Destination folder
# The mp4 format is 480x270

SRC=/home/$USER/Videos/
DEST=/home/$USER/Videos/mp4/
DEST_EXT=mp4
HANDBRAKE_CLI=HandBrakeCLI

for FILE in `ls $SRC`
do
        filename=$(basename $FILE)
        extension=${filename##*.}
        filename=${filename%.*}

        $HANDBRAKE_CLI -i $SRC/$FILE -o $DEST/$filename.$DEST_EXT -e x264 -q 22 -r 12 -B 64 -X 480 -O
done

Save, make it exectuable and this will convert files to .mp4 in directory /home/$USER/Videos to /home/$USER/Videos/mp4/. Change and create the dirs to what you need. And alter the line with $HANDBRAKE_CLI in to use your own parameters and setting.


How to install wine application for system wide usage

You can solve it be setting WINEPREFIX variable to a particular directory via /etc/environment (i.e. to set the variable system wide). E.g. to have myuser's installation system wide, add there a line like this

WINEPREFIX="/home/myuser/.wine"

Note however, that this way every Wine application would be installed «system wide», unless when you launch an app you explicitly set a separate WINEPREFIX, like WINEPREFIX="/my/other/wine-dir" wine ./app"


If i switching from windows 10 to Ubuntu all partition are going to be erased?

The option "Erase everything in your disk" does what it promises. It erases everything on disk. Thus, all partitions on that specific disk (which in Windows will represent additionsal "Drives", will be erased.

If you do not want anything erased, then have Ubuntu install in the free space. You can make free space yourself by deleting partitions you do not anymore need. This can be done from within Windows, or using a partition editor such as GParted. GParted is available in the Ubuntu version that you can start up from the live CD or USB.


versions 11.04 - 13.10

As the picture shows - "test" is a root menu which has been added.
To do this will require a couple of folders to be created:
mkdir -p ~/.config/menus
mkdir -p ~/.local/share/applications

Next copy the standard menu template file into the local menus folder
cp /etc/xdg/xdg-xubuntu/menus/* ~/.config/menus

Note - the stock XFCE menu could also be used - I prefer this menu so I've used it in my example:
cp /etc/xdg/menus/* ~/.config/menus

Now create our test menu - its in .desktop file-format
leafpad ~/.local/share/applications/test.desktop

copy and paste the following:
[Desktop Entry]
Version=1.0
Type=Application
Name=test
Comment=
Icon=acroread
Exec=acroread
Path=
Terminal=false
StartupNotify=false
Categories=X-Xfce-Toplevel;

The important bit is the last line - it must have X-Xfce-Toplevel as a category
Edit our custom menu:
leafpad ~/.config/menus/xfce-applications.menu

Add a new entry as shown:

Finally - lets use the custom menu file:
Right click Start and choose properties:

Choose the custom menu option and navigate and select the custom menu file ~/.config/menus/xfce-applications.menu


Can you try adding it as a custom print option? If you go to System Settings/ Printing/ right-click your default printer  Properties/ Job Options there is an option to manually add something there:

Can you test and see if your script (or a pointer to it) can be entered here?


Why can't Ubuntu 12.04 detect my screen resolution?

I have the same problem because I use a KVM switch with analog ports.

Being not digitally connected it seems that my 16x9 screen is not detected.

I hate these automatic detections mechanisms which frequently fail.

Developers these days try to build more fancyness than real value.

Why can't there be easy manual overrides?

On Windows these things work much better than on Linux.

I found that I can use cvt 1920 1080 60 to get the mode settings for my display.

I use:

xrandr --newmode "1920x1080_60" $(cvt 1920 1080 60 | grep Modeline | sed -re 's~.*"(.*)_.*"~\1~')

And:

xrandr --addmode VGA1 1920x1080_60

Then I can see the new mode in the display settings and select it.

Unfortunately it is not persistent on reboot.


If all that you did to break the system was remove libpng, you could go out to a virtual console and type sudo apt-get install libpng (if it can't find the package name, try searching for it with sudo apt-cache search libpng and note the name of the package with the right library.


Pinguy Builder Menu Based 5.2.1 dist mode works after making changes in pinguy conf file in the folder /usr/bin. For me it worked of Linux Mint 20 Cinnamon.
#Cleaning Apt and backing up
# find /etc/apt -type f -iname \*.save -delete &> /dev/null
# find /etc/apt -type f -iname \*~ -delete &> /dev/null
 tar pczvf /root/apt.tar.gz /etc/apt &> /dev/null
 sed -i "s/deb/#deb/g" /etc/apt/sources.list.d/*.list
 sed -i "s/deb/#deb/g" /etc/apt/sources.list
 echo "$SOURCESLIST" >> /etc/apt/sources.list
 apt-get update  &> /dev/null
.
.
.

if [ "`ps axf | grep startkde | grep -v grep`" != "" -o "`ps axf | grep kwin | grep -v grep`" != "" ]; then
        log_msg "Installing the Ubiquity KDE frontend"
    #   apt-get -y -q purge ubiquity-casper &> /dev/null
    #   apt-get -y -q purge ubiquity &> /dev/null
    #   apt-get -y -q remove ubiquity-ubuntu-artwork &> /dev/null
        apt-get -y -q remove ubiquity-frontend-kde &> /dev/null
        apt-get -y -q install ubiquity-frontend-kde &> /dev/null
        apt-get -y -q remove ubiquity-frontend-gtk &> /dev/null
        chmod +x /usr/share/applications/kde4/ubiquity-kdeui.desktop &> /dev/null
        sed -i "s/ubiquity kde_ui/pkexec ubiquity kde_ui/" /usr/share/applications/kde4/ubiquity-kdeui.desktop
    else
        log_msg "Installing the Ubiquity GTK frontend"
     #  apt-get -y -q purge ubiquity-casper &> /dev/null
     #  apt-get -y -q purge ubiquity &> /dev/null
     #  apt-get -y -q remove ubiquity-ubuntu-artwork &> /dev/null
        apt-get -y -q remove ubiquity-frontend-gtk &> /dev/null
        apt-get -y -q install ubiquity-frontend-gtk &> /dev/null
        apt-get -y -q remove ubiquity-frontend-kde &> /dev/null
        chmod +x /usr/share/applications/ubiquity.desktop &> /dev/null
        sed -i "s/sh -c 'ubiquity

    # Replacing Ubiquity icons
    cp -a /etc/PinguyBuilder/icons /usr/share/
    chmod 775 -R /usr/share/icons
    rm -rf /usr/share/icons/hicolor/256x256/apps/ubuntu-logo-icon.png
    ln -s /usr/share/icons/ubuntu-logo-icon.png /usr/share/icons/hicolor/256x256/apps
    chmod 777 /usr/share/icons/hicolor/256x256/apps/ubuntu-logo-icon.png
    chmod 777 /usr/share/icons/ubuntu-logo-icon.png
    gtk-update-icon-cache
    update-icon-caches /usr/share/icons/*
#   rm -r /etc/apt &> /dev/null
#   tar -xf /root/apt.tar.gz -C / &> /dev/null


Can I safely remove grub after installing rEFInd?

The short answer is "yes, you can safely remove GRUB if rEFInd works for you." There are some caveats, though. Most notably, it's always possible that something in the future will break. For instance, there's bug #1649326, which is preventing kernels 3.13.0-101 through at least 3.13.0-106 from booting via rEFInd (or any other method that relies on the EFI stub loader). That said, given the way Ubuntu keeps the currently-booted kernel installed, even if you ran into a problem like this, it should be possible to boot the old kernel via rEFInd, either indefinitely or until a real solution is found.

As to how to remove GRUB, the following command should delete the packages:

dpkg -P grub-efi-amd64 grub-efi-amd64-signed grub-common grub-efi-amd64-bin \
        grub-common grub2-common shim-signed

There are three caveats:

Package changes might necessitate a change to the preceding package list. (That list is taken from this page of the rEFInd documentation, which I wrote a couple months ago.)
This command removes the packages, but not the GRUB binary on the ESP. To delete that, you'll need to type sudo rm -rf /boot/efi/EFI/ubuntu.
Ubuntu is likely to try to add GRUB back. To deal with this issue, I personally employ an empty "dummy" package that claims to be GRUB 3. You can download it from here, if you care to use it. Since it claims to be GRUB 3, Ubuntu won't try to replace it with GRUB 2.

Alternatively, you could delete the files on the ESP and then simply lock the installed GRUB version with a command like this:

apt-mark hold grub-efi-amd64 grub-efi-amd64-signed grub-common \
              grub-efi-amd64-bin grub-common grub2-common

This should keep GRUB off the ESP and prevent future GRUB updates, although your current GRUB package will technically remain installed.

A third possibility is to use dont_scan_file or dont_scan_dirs in refind.conf to keep Ubuntu's GRUB out of the rEFInd menu. This solution won't remove GRUB at all, which has the advantage that it should remain accessible via the computer's built-in boot manager should it ever be needed. OTOH, if Ubuntu should update GRUB, it will take over as the default boot manager. See this page for more ideas on how to handle such issues.


How do I log in to a database without username and password?

You can store the username and password do use in ~/.my.cnf

[mysql]
user=foo
password=bar

But this file is unencrypted so beware of that.


“dev/sda1: clean, …” This message appears after I reboot the pc

I reinstalled nvidia driver and the pc works with me, solution:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-(version suitable for you) nvidia-settings


How can I install Boost 1.50 on Ubuntu 12.04?

gcc  --print-search-dirs

with this command you get informations about where gcc looks for libs and headers, probably the best place where you can install your custom library is

/usr/lib

but the problem is always the same, if you will install the same package from a repository in a next future you will probably experience some problem.

If i was in you, i will install each one of my custom library into a custom directory and instruct gcc with a specific directory named at compile time.


Bash script: syntax error near unexpected token `('

First of all, assignments in shell scripts should not contain spaces between left-hand side of = ( the variable/array name ) and right-hand side of the assignment operator =. As for converting string to array, you don't need to replace spaces with newlines explicitly, just take advantage of automatic word splitting, which occurs when unquoted variables are called:

$ string='This is a hello world string'
$ array=( $string  )
$ echo ${array[3]}
hello
$ echo ${array[4]}
world


pidgin, invisible....but to everyone? Can it be customized?

You can do this using the "Allow only the users below" and "block only the users below" privacy lists. It's possible it's buggy, but that's covered in bug #466 and #4454. And the fact that the privacy lists aren't labeled as "invisible" and "visible" lists will be dealt with in our privacy rewrite.

You can read more at http://developer.pidgin.im/ticket/4878


shell script to monitor cpu usage and alert with top 5 process consuming most CPU

I need to send an email whenever the CPU utilization goes beyond 70%?

I suggest you use an already existing monitoring plugin for this purpose. The plugin check_cpu_stats supports thresholds on CPU usage (not load). There are a couple of different versions of this plugin out there, one example can be found here: https://github.com/Reamer/check_cpu_stats

Usage is quite easy:

$ /usr/lib/nagios/plugins/check_cpu_stats.sh -w 70,70,70 -c 80,80,80
CPU STATISTICS OK : user=7.60% system=2.35%, iowait=0.08%, idle=86.94%, nice=3.02%, steal=0.00% | CpuUser=7.60%;70;80;0; CpuSystem=2.35%;70;80;0; CpuIowait=0.08%;70;80;0; CpuIdle=86.94%;0;0;0; CpuNice=3.02%;0;0;0; CpuSteal=0.00%;0;0;0;

Warning thresholds are set to 70% CPU usage on user, system and iowait. Critical thresholds are set to 80% CPU usage on user, system and iowait. You can of course also adapt the thresholds to your environment.

Concerning the alerting part: The best scenario is of course, if you already have this host/machine in an existing monitoring. But you can also use the plugin standalone and send an alert. Example:

/usr/lib/nagios/plugins/check_cpu_stats.sh -w 70,70,70 -c 80,80,80 > /dev/null; if [[ $? -gt 0 ]]; then echo "alert" | mailx -s "cpu alert" recipient@example.com; else echo "no alert"; fi

  I also need to get the start commands and process names of the top 5 process

To get the top 5 processes (sorted by cpu usage), you can use the following command (source: https://unix.stackexchange.com/questions/13968/show-top-five-cpu-consuming-processes-with-ps):

ps aux | sort -nrk 3,3 | head -n 5

And now you can combine the monitoring plugin and the process output:

/usr/lib/nagios/plugins/check_cpu_stats.sh -w 70,70,70 -c 80,80,80 > /dev/null; if [[ $? -gt 0 ]]; then echo "$(ps aux | sort -nrk 3,3 | head -n 5)" | mailx -s "cpu alert" recipient@example.com; else echo "no alert"; fi


Can't install drivers for my Broadcom 43142

Please consider my working response for Cinnamon x64 "Rebecca" here:

https://unix.stackexchange.com/questions/182950/bcm43142-wont-work-with-mint-17-1-cinnamon-x64/195691#195691

  Here is the answer for Cinnamon x64 "Rebecca" solving without
  need of an internet connection:

  Open the DVD / USB with the Linux install.
  Go to /pool/main/e/eglibc.
  Install both packages. (libc6-dev & libc-dev-bin)
  Go to /pool/main/b/bcmwl.
  Install package. (bcmwl-kernel-source).

  Note: If you don't find the packages there, search them elsewhere in /pool. (updates might change paths)


I had same problem. I fix it with removing every "docker" line in configuration file,

/etc/apt/sources.list

and then run this.

sudo apt update

After this, I ran command again,

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

and it works.


Why can't I start Ubuntu on an Acer Aspire ES1-111M-C56A?

I've also bought this little notebook. I faced almost the same problems as you when i booted with 'legacy' mode. I fixed that issue with enabled 'uefi' mode in bios settings. On ubuntu you can either enable or disable the secure boot option to get it booting. (While booting ubuntu enables 'secure boot' anyways)
Format an usb stick with FAT32 and copy ubuntu 14.10 x64! (For 'uefi' you need to have th e 64bit version of ubuntu. The 32bit wont boot as uefi only supports 64bit os)
For copying i prefer you to use 'unetbootin'. It's an easy tool to copy Linux based OS's to usb sticks.
After copying boot from usb. Check in bios first if you have enabled the F12 bootmenu selection. So you have to press the F12 key to get list of 'uefi boot devices'. Choose your usb stick and boot from it.
It will boot with uefi boot mode. With that mode its possible to install the os to the emmc. In legacy mode the emmc doesn't(i don't know why). You can only install Linux with uefi mode.
I tried that method with ubuntu 14.04 and 14.10 only. It may works with others too.

And about your wifi problem. Check if its a hardware issue or re-install the drivers. If its a hardware bug you have to send it back to acer to get a new 'fixed' one.


The fix was to remove /var/tmp/canon_sgmp_setting_common.ini, by the user who can use the scanner (or root).

scangearmp creates that file if it doesn't already exist and tries to make it writeable by all, even if it already is. But it only has permission to do so if it owns the file, meaning that in practice once scangearmp has run, it can only be run again by the same user until that file is deleted.

Thank you, @jpalecek, for pointing me in the right direction.


yes, i had the same problem... Just follow these steps and you will be out of that mess

sudo mv /var/lib/dpkg/info/xix-media-player.* /tmp/
sudo dpkg --remove --force-remove-reinstreq xix-media-player
sudo apt-get remove xix-media-player
sudo apt-get autoremove && sudo apt-get autoclean


Nvidia has been packaging its drivers in that format for decades so I wouldn't worry so much but you will have several problems with these drivers:

First they will be not updated with the Ubuntu package manager (apt)
Second they could create conflicts with the Ubuntu packages.

Perhaps if you give more information about the problems that you have with the controllers shipped with Ubuntu, I can try to help you better. Is this a laptop?
If you still interested on installing them you should go to a terminal with ctr+alt+f4 and login. Then type the following:
sudo apt apt-get -y install build-essential linux-headers-`uname -r` gcc-multilib
sudo systemctl stop gdm # maybe you need to press ctr+alt+f4 again
sudo sh HERE_YOUR_NVIDIA_RUN_FILE.run
sudo reboot

After the last cmd answer yes to any question that nvidia installer asks... unless you can foreseen any problem doing this.
To uninstall this drivers you can do
sudo sh HERE_YOUR_NVIDIA_RUN_FILE.run --uninstall

If you want to uninstall the Ubuntu's:
sudo apt-get remove --purge '^nvidia-.*'


In the CurrencyConverter Ubuntu SDK QML example where does the index variable come from?

index is a property of the ListView delegate, not necessarily a ListItem. It represents the number of the currentItem. From the docs:

  The index is exposed as an accessible index property. Properties of the model are also available depending upon the type of Data Model.


Trigger Ctrl+key keycode or Hiragana to Control

For CUI:

There are some handy packages to manipulate each key and mouse button.
For the packagesxmodmap xbindkeys xdotool and xte are popular.

sudo apt install x11-xserver-utils
sudo apt install xbindkeys

Use xev and press the Hiragana/Katanaka key and you get the code.

KeyPress event, serial 37, synthetic NO, window 0x3e00001,
    root 0xe5, subw 0x0, time 3469373, (-29,-117), root:(36,405),
    state 0x0, keycode 101 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x3e00001,
    root 0xe5, subw 0x0, time 3469469, (-29,-117), root:(36,405),
    state 0x0, keycode 101 (keysym 0xff27, Hiragana_Katakana), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Alternatively, you can use xbindkeys -mk to get the keycode and numbers.

$ xbindkeys -mk
Press combination of keys or/and click under the window.
You can use one of the two lines after "NoCommand"
in $HOME/.xbindkeysrc to bind a key.

--- Press "q" to stop. ---
"(Scheme function)"
    m:0x0 + c:101
    Hiragana_Katakana

I do know know the codes are the same as your IBM keyboard layout. You should check on your own keyboard. The numbers may be different.

Now then, edit ~/.xbindkeysrc add lines below.  (if there's no such file xbindkeys --defaults > $HOME/.xbindkeysrc to create one.

"xdotool key ctrl+l"
 m:0x0 + c:101 + release

Save this file and
pkill -f xbindkeys && xbindkeys
execute this command to apply changes.

For GUI

Open System Settings > Keyboard > Shortcuts

This one takes only a minute.


Use xinput to adjust scroll direction when logged in through nx-server/player

Try xmodmap -e "pointer = 1 2 3 4 5  6 7 8 9 10 11 12 13 14 15 16" that works for me.


Can't find ttyUSB in /dev after connecting my USB dongle

read from your syslog:

the device seems to emulate a CD drive which delivers windows drivers.
there are ttyACM devices. Did you try /dev/ttyACM1 and 2 instead of ttyUSB0?


There is a bug opened at bugs.launchpad.net

Supporting information may help to get it addressed!


What do these uGet settings (curl+aria2, aria2+curl) mean?

These are download engines for uGet.

You can use CURL or aria2 as the backend engine to do the download. These plugins provide different features so you can pick which one you want...or you can choose an order to use the plugins.

For example, if one plugin is faster for you then you can use that one and if you attempt to do a feature that it doesnt support it will move onto the next plugin to accomplish the task.


How to Iterate through subdirectories with same name in a path?

Your example code looks good to me. How many files do you have in these directories? There is a limit for wildcard expansion. In this case you should use find, for example like that:

find /path*/same | while read i ; do echo "do something with file: $i" ; done


what type of update ubuntu 'software updater' do?

I assume you used all commands with sudo?
The sudo apt-get update command should first get new package lists from the servers you configured (default settings maybe).
The sudo apt-get install command always needs as a parameter the name of the package(s) to install, therefore it should do exactly... nothing!
Finally, the sudo apt-get upgrade command is responsible for actualizing your programs to the newest downloadable versions according to the lists you updated before.

So to solve your problem of some updates not being installed, please try sudo apt-get dist-upgrade, a more radical upgrade command which installs/replaces more packages.

If I could help you, please don't be shy and click the tick next to this answer to accept it, which will earn both of us some reputation and show the community that the question is solved. If it did not work, feel free to bother me again by leaving a comment. :D
Greetings!


Why does Ubuntu freeze frequently since I upgraded my RAM?

Well, if you suspect the problems started after you installed the new memory, then I would test that memory. You can do that from a live-cd or memory stick. I don't remember if it's available in the boot menu of an installed system. RAM can be bad and bad RAM can cause your system to freeze. If you're using the proprietary driver from ATI, then that's caused freezes here from time to time. But it's difficult to tell what the reason is without more information.


Xubuntu 17.04 panel shows utc not local time

It's correct, you must keep the timezone field in blank or write the exact time zone name.
Any other word will turn the clock to the UTC time.  For example, if you put "New York" as the time zone, then the clock will show UTC time because it is not a standard time zone name. So instead you must put "America/New_York".


Is it "bash" that changes the foreground process group of a terminal?

Yes. Quoting this answer by Gilles on U&L:

  The terminal's associated PGID can be set by the
  tcsetpgrp
  function, which is called by the shell when it starts an external
  program in the foreground, or moves a job into the foreground with
  fg.


GPU Pass-through error on Ubuntu 15.10 when starting executable script

Your error message: "/sys/bus/pci/devices//device" clearly shows you're missing something in between the two "device"'s. So something is either wrong with your /etc/vfio-pci1.cfg or with the line "echo $line | grep ^# >/dev/null 2>&1 && continue", because immediately after you make the vfiobind-function call.

I think also there's a possibility that the error message can be ignored, if everything still works. A solution to hide error messages is to replace e.g. vendor=$(cat /sys/bus/pci/devices/$dev/vendor) with vendor=$(cat /sys/bus/pci/devices/$dev/vendor 2>/dev/null).

But I would check the vfio-configuration files, I suspect there are some empty lines - remove those empty lines, that'll be a good start.


Ctrl+Alt+T not working to open Terminal in WSL

By default that is the shortcut, but it might happen that someone have redefined the same.
For this, go to Settings→Devices→Keyboard and redefine or reset to default by clicking on ✕(if previously redefined) beside it the shortcut.

Update:
The above works with Ubuntu OS. Since the OP is using WSL, there are two ways to launch Ubuntu Terminal:

Command Prompt: Command prompt can be launched from Start or can be run by using Win+R an typing cmd. In command prompt , you need to write ubuntu or ubuntu1604 or ubuntu1804 depending on the version you've downloaded.

Using Ubuntu App: You can define its shortcut using app settings and assign it shortcut Ctrl+Alt+T.

But that makes it a Windows question.
For this read:
How to Create Keyboard Shortcuts in Windows 10


3 processes start taking up all the CPU, computer overheats. How do I shut them off?

You can use the terminal for this.
First enter
top

Get the PIDs (first column)
Now enter (with or without sudo)
kill PID
eg.
kill 3184

The processes might be critical, so it is not wise to just stop everything without knowing what they are doing. Overheating might be indicative of a deeper problem ?
Also, how old is old ? Is RAM memory sufficient ? htop or glances might reveal more information. Is the swap full (best seen via htop)


I compiled ffmpeg and somehow installed it to /usr/local/bin/bin/ffmpeg. Can I move it myself without causing errors?

Appreciate the help from the comments, turns out I did not need to edit my PATH nor do anything intensive.

sudo mv /usr/local/bin/bin/ffmpeg /usr/local/bin

worked, and I did move the other file in there that I can't recall the name of.


vpn has no internet after upgrading to 18.04

I solved the problem by adding following 2 iptables rules to my ubuntu server

 iptables -P FORWARD ACCEPT
 iptables -P OUTPUT ACCEPT

my exisisting iptables rules (related to pptp and ocsrv) before above changes:

iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT
iptables -I INPUT -p gre -j ACCEPT
iptables -t nat -I POSTROUTING -o ens32 -j MASQUERADE
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -s 182.18.0.0/24 -j TCPMSS  --clamp-mss-to-pmtu
iptables -t nat -A POSTROUTING -o ens32 -j MASQUERADE
iptables -I INPUT -p tcp --dport 443 -j ACCEPT
iptables -I INPUT -p udp --dport 443 -j ACCEPT


System does not boot, just a black screen after uninstalling/removing smth

Does your system boot but you simply cannot see anything ?
Did you try to go to a console with CTRL+ALT+F1 ? Or on a german keyboard STRG+ALT+F1 ?
From this you can move on if it works.
Makku


No, it's not possible to downgrade.

You'll have to backup any importand data you consider and fresh install 14.04.


Problem renaming files in a NTFS partition

Linux uses some characters witch are not recognised in Windows for file names. Check the encoding for ntfs in Ubuntu and set it to utf8 using the tool pysdm. Pysdm configures for mounting at startup. Just deselect the partitions in pysdm to avoid mounting them at startup.


I have had the same problem. There is a thread on their support forums about it, which I used to get my install working

sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0.1/ubuntu/ trusty universe'
sudo apt-get install curl
curl http://repos.codelite.org/CodeLite.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install libwxbase3.0-0-unofficial

http://forum.moneymanagerex.org/viewtopic.php?f=5&t=5528


"physical block size is 2048 bytes, but Linux says it is 512" when formatting USB - How to create a bootable USB without this error

A command-line method to make a live USB for UEFI systems

Please note: this deletes all data on the target device.

Install prerequisite:

sudo apt-get install p7zip-full

Assuming the target USB is at /dev/sdb

(please check first with lsblk or gnome-disks or sudo fdisk -l and be sure you know what you are formatting)

Make sure the device has no mounted filesystem and unmount it if necessary, for example:

udisksctl unmount -b /dev/sdb1

Destroy existing partition table:

sudo sgdisk --zap-all /dev/sdb

Create new GPT:

sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdb

Format as FAT32:

sudo mkfs.vfat -F32 /dev/sdb1

Check it:

sudo fdisk -l /dev/sdb

Should output something like:

Device     Start      End  Sectors  Size Type
/dev/sdb1   2048 15663070 15661023  7.5G EFI System

Mount the drive and extract iso onto it, replacing 'name-of-iso' with the actual filename of the iso you downloaded earlier

sudo mount -t vfat /dev/sdb1 /mnt
sudo 7z x name-of-iso -o/mnt/

Unmount

sudo umount /mnt

Now reboot & enjoy Ubuntu ^_^

(Here's where I originally learned to do this.)


Ubuntu login loop 16.04 Error after reinstalling lightdm

the problem was with the invidia driver, the solution was to reinstall the nvidia driver.

Sudo apt-get purge nvidia-*
Sudo apt-get install nvidia-*** (***= is the version of the nvidia)


You have to compile it yourself or you upgrade to Ubuntu Precise Pangolin 12.04 and use the WineHQ PPA.

The newest version you can get from the Wine-PPA for Lucid is 1.4.


Screenshot program/tool that captures a specific monitor?

I use the built-in Screenshot-Function: activate with Shift+Print-key combination, then drag open a Capturing-Frame with Left-Mouse-Button, release to capture. Or for that Matter there's a builtin Screencapture-Video Function too: The Hotkey can be configured in the Systemsetting:Devices:Keyboard as it is not assigned by Default.


The legal problems you are referring are about the distribution of Oracle Java. Its license prevents that it could be provided in the default repositories, but its perfectly legal to download and install it.

Probably the easiest way is to use the WebUpd8 ppa:

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

This will run a script that will download and install Oracle Java 7 (JDK) from the official website, so it is perfectly legal.

If you just want JRE the best way is probably download and install it manually from Oracle website.

Source: INSTALL ORACLE JAVA 7 IN UBUNTU VIA PPA REPOSITORY

Are PPA's safe to add to my system and what are some "red flags" to watch out for?


Unable to locate package phpmyadmin on Ubuntu Server 18.04

This worked for me:

sudo add-apt-repository universe

Then:

sudo apt install phpmyadmin


How to run a python script as sudo by double-clicking it?

The appropriate way to start any process or application via GUI is using a .desktop file. You can also use it to run scripts with sudo privileges. In its simplest form that would be:
[Desktop Entry]
Name=Some Name
Exec=gksu python3 /path/to/script
Type=Application

If the script is executable, you could simply use:
Exec=gksu /path/to/script

In the Exec= -line
important notes

You need to make the .desktop file executable to make it work on double- click.
You can "dress up" the .desktop file with more options, such as an icon etc., as shown here.

Alternatively
More complicated and kind of a detour, but it should be mentioned nevertheless:
You could set nautilus to run (executable) scripts on double- click, as described here.
Then (doing it "your way"), a separate bash script:
#!/bin/bash
gksu python3 /path/to/script

made executable, would also run the python script, similarly to the .desktop file.


Changing the Java Runtime in NetBeans 8 on Ubuntu 14.04

Follow below mentioned steps:

Go to netbeans-8.0/etc folder.
Open netbeans.conf file.
Check for the line with netbeans_jdkhome
Mention the Jdk you want to use.


Sporadic problem making a directory in ntfs external drive

I think that ntfs is just generally bad for hard links. I converted to an ext4 file system for backups and things are working a lot nicer now.


First of all it's  "sudo adb devices" not " sudo adb devies"

And Try this

adb kill-server
adb start-server
adb devices


Why when setting up Ubuntu 14.04.1 does it ask you for a username when it's not used?

Why ... does it ask you for a username when it's not used? I would expect the username to be the name I log in with.

That's exactly what it is used for.

Admittedly if you're a graphical user, you probably won't have to interact with it that often but coming in over the command line or SSH, you'll need it a lot more.

  Also, why is it so hard to change, I mean I have to change directories just to change my name, and do it all from terminal.

You seem to have answered the question in the question. Some directories include the name of their users to make finding them much easier for humans. They could use the UID (eg 1001) but this is pretty opaque.

Typically speaking, it's easier to create a new user and move all your stuff over, but you can change it.


Upper Taskbar (Move & Lock) settings missing

Sounds like you're running Gnome Panel 3. You can edit your panel just like before, but you need to hold Alt and right click instead of just right clicking directly. Unfortunately, Ubuntu's indicator applet hasn't been ported to the new gnome-panel yet, so you will need to get creative for some of the missing elements.

If you're interested, you can take a look at a blog post by one of gnome-panel's developers that explains the changes: gnome-panel is dead,long live gnome-panel!


Difference between linux kernel and Ubuntu mainline kernel

Here is a brief answer.

Mainline kernels are just vanilla kernels from kernel.org packed as deb.

Ubuntu kernels are specially maintained by Canonical Kernel Team.

The team backports bug fixes and support of some new hardware from the latest mainline kernels, and also does other improvements.

Canonical and the community supports only the Ubuntu kernels. You can install the mainline ones at your own risk.


Recovering files from old xp using DSL, trouble xfering says hdd has no space left when it is fresh format

Found some older 8.10 ubuntu disks, was able to do exactly what I needed from a live boot, slowly (am impressed it ran on the machine i was working on...yay ubuntu!)


Suggestion needed on updating software available on Ubuntu 14.04 LTE

I don't think it will allow distro release update while your repos are still syncing.
Anyway, the safest way i applied last night itself was to download that 340MB update and then go for release update (741MB). Happily enjoying Ubuntu 14.04LTS now.


I encountered the same problem myself an after many hours of head scratching i found a solution that work for me:

The problem for me was in dconf so i installed dconf-tools

in terminal:

sudo apt-get install dconf-tools

then launch dconf-editor

navigate to org->gnome->setting-daemon->plugins->media-keys
and change the value active to true (put the tick like in this pic)

now the buttons should work as usual (at least worked for me :) )


How do I hide unnecessary .directories in my home directory?

"Dot-files" are normally hidden when you request a listing of a directory.  This is true for both GUI and CLI.  You've toggled "Show/Hide Hidden Files" to show the files and directories and need to toggle to hide them.

Many Linux GUI File Managers/Browsers have this set to the keyboard shortcut: Ctrl+h .  You can press this combination to toggle to show/hide hidden files and directories.

Similarly, the ls command in a BASH terminal has the -a flag, which shows all files, without skipping these dot-files: ls -a.


I am using Ubuntu 14.04 right now and faced the problem. It helped me.
System Program Problem Detected

sudo sed -i 's/enabled=1/enabled=0/g' /etc/default/apport


unsafe map file /etc/mail/access.db: Permission denied

The error you are facing is:

  hash map "access": unsafe map file /etc/mail/access.db

means that sendmail identify potential security issue with the permission access to the file/folder. i.e. non-root user might be able to use it in order to gain root permission.

Limiting access to the file/folder to root only:

The file access.db is writeable to both user root and group root.

The following will allow writing to this file only by root and not by group root and will make this file safer (as only root account will be able to write to this file)

sudo chmod g-w /etc/mail/access.db

according to this old book  /etc/mail directory should be owner by root.

In your case, the directory is owner by non root user.

Updating /etc/mail permissions to be owned by root:

sudo chown root /etc/mail

Updating /etc/mail permissions to be read/write by root only:

sudo chmod 711 /etc/mail


sudo iptables -L -nv

will show the current iptables rules.


Error 255 when sharing folder on Ubuntu 12.04

The simplest solution would to be to add the stated lines,

usershare owner only = false

to the Global section of the smb.conf file by,
sudo -H gedit /etc/samba/smb.conf

then save the file and restart the samba service,
sudo service smbd restart

Then try again to share the selected folder


Bluetooth Keyboard and mouse disconnect when idle for a few seconds and reconnects when moved / typed on Ubuntu 20.04

You didn't make it clear if you'd gone through the GUI and power settings, so I'll take a stab at this.
Open your power settings and disable the ability to suspend Bluetooth devices to save power.


Ubuntu 16.04.01 MATE - Chrome 'Aw snap" crashes

Got the same error message after update ubuntu 14.04 -> 16.04.

You can enable logs with command line arguments as stated here:

  --enable-logging --v=1

For me the resulting file was located here

  ~/.config/google-chrome/chrome_debug.log

Here is an explanation how to find log file for other platforms: http://dev.chromium.org/user-experience/user-data-directory

Unfortunately, content of log gives me nothing.


sudo apt-get install google-chrome-stable did it.


Does running Nexuiz gives extra pressure on Processor if you dont have external Graphics card?

Ubuntu's driver manager probably has the driver for whichever Nvidia or ATI card you get. A quick websearch yielded this post which mentions a few nvidia cards that should work in Ubuntu.

Windows 7 is already a few years old, so the win7 logo on the box is not a bad thing to have, and should have the drivers disc for windows 7 in the box (which is useful if you plan on using win7 with that card). A dedicated graphics card has its own GPU. The newer CPU's have built-in GPU in my understanding, mind you in theory having a dedicated graphics card would lighten the burden on the CPU for graphics rendering.