How do I fix UI lag on a Dell Precision 5520 when using a Bluetooth keyboard and mouse?

I have the same laptop with the intel 8265 wifi radio.  I removed the radio and the UI freezes seem to be fixed.  Note that removing the card will disable bluetooth since the card has bluetooth and wifi.

I'm not sure if this is related, but the bluetooth firmware files aren't present in the kernel that ships with 16.10, and the firmware files for the wifi radio aren't present anywhere - it seems intel hasn't released them or the driver is loading the wrong files.  Dmesg shows the following:

[    2.059624] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-8265-24.ucode failed with error -2
[    2.059854] iwlwifi 0000:01:00.0: Direct firmware load for iwlwifi-8265-23.ucode failed with error -2

There are similar errors for bluetooth.

The latest kernel firmware files for Ubuntu can be retrieved from here: http://security.ubuntu.com/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.165_all.deb.  After installing the package, run sudo update-initramfs -u -k all.

This file contains the bluetooth firmware files.  I'm not sure if installing it fixes any issues.

I've started a group for discussing issues with running Linux on this laptop: https://groups.google.com/forum/#!forum/dell-precision-5520-linux


Why does my laptop suspend after 5 minutes?

You mentioned you checked the power options screen so I'll put add this one even though I don't think it is effecting you, but which you can check nonethelesss:

The only thing I can think of now are gnome settings which you can force off via the terminal:

gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type nothing
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-timeout 0
gsettings set org.gnome.settings-daemon.plugins.power sleep-inactive-battery-type nothing

The value of 0 seconds on lines 1 and 3 turns the function off. The nothing feature on lines 2 and 4 are like hitting it was a hammer twice.

If problem persists there are other things in systemd to look at such as xautolock but the steps above are the most obvious ones to try first.


Install ssmtp :

sudo apt-get install ssmtp

Edit the ssmtp config file:

gksu gedit /etc/ssmtp/ssmtp.conf

Append the following text:

root=username@gmail.com
mailhub=smtp.gmail.com:465
rewriteDomain=gmail.com
AuthUser=username
AuthPass=password
FromLineOverride=YES
UseTLS=YES

Run ssmtp and provide the recipient email address:

ssmtp recepient_name@gmail.com

Provide the message details as follows:

To: recipient_name@gmail.com
From: username@gmail.com
Subject: Sent from a terminal!

Your content goes here. Lorem ipsum dolor sit amet, consectetur adipisicing.
(Notice the blank space between the subject and the body.)

Press Ctrl + D to send.

You can also put the text in file and send it as follows:

ssmtp recipient_name@gmail.com < filename.txt


Open Office - how to control spaces between words

It's because you have used Shift +  Enter at the end of line to start the new paragraph.
You should start it with just a  Enter or if you don't want to use  Enter  just add a  Tab  at the end of line.


Cores vs Threads: How many threads should I run on this machine?

This is what you want to know

Thread(s) per core:    2
Core(s) per socket:    12
Socket(s):             4

You have 4 CPU sockets, each CPU can have, up to, 12 cores and each core can have two threads.

Your max thread count is, 4 CPU x 12 cores x 2 threads per core, so 12 x 4 x 2 is 96. Therefore the max thread count is 96 and max core count is 48.

What is better ?

That depends on what you want to do, more threads means less frequency (ie a 3ghz becomes split in two) but better multi-tasking (more threads) and using full cores (no hyper-threading) is better for high CPU usage tasks (ie games).

Hope this helps you.


If you looking for a command to delete a printer use this (replace "HPLaserColor" with your printer name to delete):

sudo lpadmin -x HPLaserColor


What is the default ubuntu 12.10 firewall?

Standard, unless you've enabled it, is the firewall OFF in Ubuntu 12.10 (and other versions)

to enable the firewall type sudo ufw enable
to check if it's working typ sudo ufw status
to disable the firewall type sudo ufw disable

all in a terminal.

In the softwarecenter you can find GUFW a graphic frontend to control your firewall;
you can make rules for the firewall, as you can easily enable/disable it with a slider.


Why does gzip on tar output always produce different results?

The header for the resulting gzip file is different depending on how it is called.

Gzip tries to store some origin information in the resulting file header. When called on normal files this includes the origin file name by default and a timestamp, which it gets from the original file.

When it is made to compress data piped to it, the origin is not as easy as with a normal file, so it resorts to a different naming and time stamp convention.

To prove this try adding the -n param to the offending lines in your example as...

~/temp$ tar c file | gzip -n > file1.tar.gz
~/temp$ tar c file | gzip -n > file.tar.gz
~/temp$ cmp file.tar.gz file1.tar.gz

Now the files are identical again...

From man gzip ...

   -n --no-name
          When  compressing,  do  not save the original file name and time
          stamp by default. (The original name is always saved if the name
          had  to  be  truncated.)  When decompressing, do not restore the
          original file name if present (remove only the gzip suffix  from
          the  compressed  file name) and do not restore the original time
          stamp if present (copy it from the compressed file). This option
          is the default when decompressing.

So the difference is indeed the original file name and time stamp information that is turned off by the -n param.


How do I remove Ubuntu from a partition and reuse the partition for another distro?

If you're using testing version or latest version, I suggest you to
   use ubuntu 12.04 LTS, it's very stable release, and has matured over
   time. Your system won't freeze as frequently.
And after that if some problem exist, ask it here, you'll get answers
   very easily

Here is answer if you want to install mint/elemenntryOS

Go to terminal and write

user@localhost:~$ sudo blkid
sudo] password for user10:

/dev/sda1: LABEL="System Reserved" UUID="xxxxxxxxxxxxxx" TYPE="ntfs"
/dev/sda2: LABEL="abcd" UUID="xxxxxxxxxxxxxx" TYPE="ntfs"
/dev/sda5: UUID="72ab4798-8754-41ac-a483-794fd40f5201" TYPE="swap"
/dev/sda6: UUID="7dabbc24-d018-4a6f-b5f7-c5df6d110ae6" TYPE="ext4"

Write down the name of partition Where you see type is ext4/ext3, that would be ubuntu partition.
In above output it would be /dev/sda6
Download the Hybrid ISO of whatever OS you  want to install.

Now make a bootable drive using any software, I prefer
 Unetbootin  make a bootable drive.
There are many tutorial out there to make bootable pendrive.
Boot the system using bootable pendrive now and while installing the system choose advanced partitioning option.
Now format the drive with the name in our output that would be /dev/sda6
Format the drive, and just install system now

Note: Just formatting ubuntu partition and not installing any other distro will lead your computer to unusable state, you'll not be able to boot the system untill you install grub using live cd


You will need sqlheavy to use beatbox AFAIK. Try

sudo add-apt-repository ppa:nemequ/sqlheavy
sudo apt-get update
sudo apt-get install beatbox

And if you want to follow beatbox development and use latest development release I recommend you to use elementary-daily ppa.


Converting numbers in a CSV file to their corresponding URLs

Using sed:

sed -r 's#^([0-9]+),([0-9]+)$#http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/\1\.jpg,http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/\2\.jpg#' input-file

redirect the output to a new file > output-file; or use the option -i.bak to make the changes in their places and create a backup file.
-r, --regexp-extended - use extended regular expressions in the script.
the command s means substitute: #<string-or-regexp>#<replacement>#.
# is used as delimiter - usually / plays this role, but here we have much slashes within the <replacement>, thus we do not need to escape each of them.
^ will match to the beginning of the line. $ will match to the end of the line.
[0-9]+ will match to each string consisting of digits.
within the the <replacement>, the capture groups ([0-9]+), will be treated as the variables \1 and \2.
\. is just escape of the special meaning of the dot.

Here is a simplification proposed by @dessert:

sed -r 's#([0-9]+)#http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/\1\.jpg#g' input-file

here we assume the file format is homogeneous, as it is in the example, and we do not need to match the whole line.
the g flag (at the end) repeats the substitution for each occurrence of the matched regex to the end of the line.

In addition it is possible to use also variables for the base URL and for the file extension:

URL='http://www.cs.bu.edu/~betke/research/vc-crowd/MSCOCO/'; EXT='.jpg'
sed -r "s#([0-9]+)#$URL\1$EXT#g" input-file

Note: here are used double quote marks.


This is not a Koha issue. Please read apt manual page (similar to apt-get) running man apt. You should expect to receive an error about a file not being present on a folder you just deleted. To remove completely Koha should be enough to

sudo apt purge koha-common

apt remove (and with apt-get) is different will leave configuration files of the package (again, that's on manual page).

As said here remove first all Koha instance.


I found a pretty simple solution, that should also work with other streaming services and is not bounded to minidlna / ReadyMedia

Check out mp3fs https://github.com/khenriks/mp3fs

Quote: mp3fs is a read-only FUSE filesystem which transcodes between audio formats (currently FLAC and Ogg Vorbis to MP3) on the fly when opened and read.

This can let you use a FLAC or Ogg Vorbis collection with software and/or hardware which only understands the MP3 format, or transcode files through simple drag-and-drop in a file browser.

I installed it via sudo apt-get install mp3fs

Mounted my Music-HDD folder that contains my FLAC and WAV files to the mp3fs filesystem:

sudo mp3fs -b 320 /home/alex/Music-HDD /home/alex/mp3-Music-HDD/ -o allow_other,ro

modified my /etc/minidlna.conf to point to the correct path:

media_dir=A,/home/alex/mp3-Music-HDD

and restarted the service:

sudo systemctl restart minidlna.service

Now my player is able to play the FLAC files.


What is the accelerate method of free space wiping with random fill?

First and foremost, wiping your drive 35+ times is completely unnecessary. The Guttmann Method (35 wipes) is something designed to wipe any drive, from brand-new modern spinning drives to massive ancient 5MB behemoths that are more likely to store resident data. With that said, wiping your drive once or twice is pretty much the best you can do. You have a modern magnetic drive.

The sfill command is... silly. See the manpage for what I mean. If you only need to wipe the drive out with zeros, you can just use the (far simpler) sfill -llz /path/to/your/mountpoint to wipe out all free space with zeros, once. This (according to Guttmann himself, see above link as well as right here) is more than good enough for the vast majority of systems. As you're writing zeros instead of random data, your only speed limit will be your drive's speed.

If you need plausible deniability ("No, officer, I didn't wipe this hard drive"), you can use  the sister command sfill -ll /path/to/your/mountpoint to wipe your drive in a single pass with random data. This will be slower, but just as secure for your system as any other wiping method with the addition of possible plausible deniability.

However, if you really need to ensure that no data is absolutely recoverable from this drive (in theory or otherwise), use a drill.


I broke encrypted swap partition. How do I bring it back?

I had to start from scratch, everything works great now.

This article was a life-saver: http://iwtf.net/2010/01/05/encrypting-your-ubuntu-swap-partition/

In case the link gets moved, basically all I had to do is:

format as swap
Add this line to /etc/crypttab:

sudo echo cryptoswap /dev/sda5 /dev/urandom cipher=aes-cbc-essiv:sha256,size=256,hash=sha256,swap

and add this line to /etc/fstab:

/dev/mapper/cryptoswap none swap sw 0 0

After reboot everything works. I can share encrypted swap space between both distros.


Global Keyboard Shortcuts Broken in 14.04

It seams to be a bug, see https://bugs.launchpad.net/ubuntu/+source/gnome-control-center/+bug/1224732

On my laptop, they are two ways to bypass :

my custom shortcut works if I use a more simple key binding. For example, Ctrl+Alt+ESC does not work, but SUPER+K works.
use an alternative way to create a custom command with the CompizConfig Settings Manager launched with ccsm > Commands. Then create your key binding.

Remark in the both solution, my key binding Ctrl+Alt+ESC doest not work, but SUPER+K works. I think some key binding can not be used anymore.


Kubuntu 15.04 Plasma 5.3 showing KDE apps with GTK themes

https://forum.kde.org/viewtopic.php?f=289&t=124931

put this

export QT_QPA_PLATFORMTHEME=kde

on your ~/.profile


Hp probook 4530s running on Ubuntu 14.04 overheats and lags

I have the same problem on my laptop HP Compaq nx8220 with Kernel 3.13.0-24 to 3.13.0-30 (in Ubuntu 14.04 and Linux Mint 17). This laptop ran Ubuntu and now Mint since 8 years without overheating problems. Try to boot from an older Live-DVD or USB stick with Ubuntu 12.04 LTS or Linux Mint 13. If this will fix your CPU fan then a bug in kernel 3.13.x might cause the problem.

I was able to fix it today with a pre-release of kernel 3.13.0-32 from https://launchpad.net/~canonical-kernel-team/+archive/ubuntu/ppa

Careful users should wait a few days to get this fixed kernel as a normal update!

From what I have read the problem was a kernel patch called "ACPI / AC: convert ACPI ac driver to platform bus" which has now been reverted in kernel 3.13.0-31 and higher.


How to Bind to Static IP address in MySQL

Only one address can be specified, but you can set bind-address to  0.0.0.0 in order to make MySQL listen on all available interfaces.


software center won't open, triggers system problem detected message, ubuntu 12.04

Not sure what's up but software centre is often glitchy
Use Synaptic in the meantime


I'll explain why you see this behaviour first. If you just want the solution, skip to the bottom :)

Network cards that is administratively down (e.g. ifconfig nic down) will not show up in the list by default. A short example from one of my boxen:

[~]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 84:1b:5e:27:38:80
          inet addr:10.0.1.64  Bcast:10.0.1.255  Mask:255.255.255.0
          inet6 addr: <redacted>/64 Scope:Global
          inet6 addr: <redacted>/64 Scope:Global
          inet6 addr: <redacted>/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8278086 errors:0 dropped:0 overruns:7 frame:7
          TX packets:1286330 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:11747172316 (10.9 GiB)  TX bytes:150285863 (143.3 MiB)
          Interrupt:16

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:364 errors:0 dropped:0 overruns:0 frame:0
          TX packets:364 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:24920 (24.3 KiB)  TX bytes:24920 (24.3 KiB)

[~]$

The box has two NIC's, eth0 and eth1 (It's running an older Debian release, so interface names are the traditional ethX, but this doesn't matter here).

ip link on the other hand shows all interfaces:

[~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 84:1b:5e:27:38:80 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 84:1b:5e:27:38:81 brd ff:ff:ff:ff:ff:ff

If it does not show up using ip link, please run lsmod | grep rtl. rtl8139 should be loaded. If, for some strange reason, it isn't please try sudo modprobe rtl8139 && ip link to manually load the module and list interfaces again.

If you're using Network Manager, it can be configured using sudo nmtui, and selecting 'Activate a connection'. If you don't use Network Manager, you can edit /etc/network/interfaces as root, and add the NIC. The format is fairly simple:

auto <interfacename>
 iface <interfacename> inet static
 address   <ip address>
 broadcast <broadcast>
 netmask   <netmask>

Replace  with what ip link shows. Replace the various address parameters with what's applicable for your CCTV network.


Installation of the astronomy software CASA in Ubuntu 16.04

The binaries are precompiled, so you just need to unpack the tarball and you can then run casa directly in the terminal.

cd Downloads
tar xfzv casa*
cd casa-*el7/bin
./casa

It will create a directory ~/.casa and update with its config, then start the program.

If you want to make using it regularly more efficient, you can add the directory where the binary is located to your path, or make a symlink to it in a path location. For example, if you left it in Downloads (you might prefer to move it somewhere else), you could do something like:

sudo ln -s $HOME/Downloads/casa-release-4.7.2-el7/bin/casa /usr/local/bin/casa

Then you could run it from anywhere just by typing casa.


Check to see if you have module asus_nb_wmi loaded with lsmod | grep asus_nb_wmi
If it is loaded try sudo modprobe -r asus_nb_wmi

sudo modprobe asus_nb_wmi wapf=4

and see if wifi can be enabled using the keyboard combo FN+F(?)
If it does work you make make it persistant withecho "options asus_nb_wmi wapf=4" | sudo tee /etc/modprobe.d/asus_nb_wmi.conf

This solution was proposed by a kernel developer on ubuntuforums


How much space should / and /home partition have

That's definitely not the right choice. To summarise what these partitions are:

root (/) is the one which operating system uses. For example application binaries and things like that. It's typically 20GB or more depending on the requirement. But leaving a huge space for this partition is generally not advised. I've used 50GB for my machine that's more than enough.
swap (swap) it helps operating system manage the memory when RAM is getting used up. Typically it will be double the size of the RAM. (Ex: 2 GB RAM machine requires 4GB swap space.
home (/home) is the one where user's data is stored. There is no upper limit for this partition. It all depends on how much data you wanted to store.

Coming back to your scenario
You should have 30GB or so for your root, swap is based on your RAM and you can do the math and finally all remaining space for home.
Hope this helps


Shrink NTFS Windows 7 Partition with GParted

As far as I know, the linux-based NTFS tools will refuse to touch a NTFS filesystem unless it is already perfectly consistent, so as to minimize the chance of data loss. Are you completely unable to boot into Windows?

If you really really don't mind losing the data, you can delete the NTFS partition completely, and grow your linux partition to take up the extra space. I recommend doing this from a Live CD.

I vaguely remember the NTFS mount program providing the option to mount a damaged filesystem as read-only so that you could recover data off of it, but I could be wrong.


GUI for configure -> make -> make install

ubucompilator ( Download Link )

Ubucompilator is a gui to compile and make .deb by the source code.
An easy software to ubuntu, debian, linux mint to compile, make, install and create a .deb package.

DebianPackageMaker (Download Link)

DebianPackageMaker is a simple user interface/tool to make a debian package easier and straightforward to use and deploy your linux application to any debian based distro.


You can download and customize the Yaru theme from Gitub.
Here are instructions to get you started.
Install prerequisite packages to clone the repository and build the source files:
apt install libgtk-3-dev git meson sassc

Download the repository from GitHub, and then build and install the theme:
# You can get the master branch using:
# git clone https://github.com/ubuntu/yaru.git

# You can get the branch for 20.04 using:
git clone --branch focal https://github.com/ubuntu/yaru.git
cd yaru

# Initialize build system (only required once per repo)
meson build
cd build

# Build and install
sudo ninja install

To customize the theme, before building and installing, you will need to modify various files. Take a look at the files in these directories...
.../yaru/gtk/src
.../yaru/gtk/src/default/gtk-3.20
.../yaru/gtk/src/default/gtk-3.0

.../yaru/gnome-shell/src
.../yaru/gnome-shell/src/gnome-shell-sass

I won't be able to give you specific instructions, since this is a complex topic, and it all depends on what you want to change.
However, definately take a look at the _ubuntu-colors.scss files in the above paths, if you are just interested in changing some basic colors.


Is there any hope of choosing peacefully between Unity and KDE at login time (or session restart time)?

Probably it would be easier for you to disable autologin first and then check how you choose different desktops at the login screen.

To disable auto login open

Settings -> User Accounts

or in terminal (ALT+CTRL+T) run

unity-control-center user-accounts

and turn it off

To install KDE run

sudo apt-get install kde-plasma-desktop
Log out and choose Desktop


Compcache is deprecated in favor of zRam since Natty. I recommend using zramwap instead, it has an install-a-package setup process and comes with sane defaults that automatically adapt to your system specs.


Ubuntu 19.04 .desktop files not working correctly

Logging into another user account shows us that everything works as expected. That means that something in your original user account is causing the problem.

Troubleshooting involves trying to determine what's causing your problem, and this may take some time/effort. But, I'll try an give you a start with an area where common problems occur.

Common problem areas can be the ~/.local folder, and ~/.config folder, and the ~/.cache folder. We rename these folders, only one at a time, log out, log back in, and see if the problem has gone away. Here's a note... most of these folders will get recreated when you log back in.

I'll use the ~/.config folder as an example, as this is the most difficult to do. Rename this folder to ~/.config.HOLD. Log out. Log back in. Retest for the problem. If the problem is resolved, then there's something in the ~/.config.HOLD folder that caused your problem. Now you have to restore files from the ~/.config.HOLD folder, back into the newly created ~/.config folder. You do this by dragging files/folders from ~/.config.HOLD back into ~/.config, but NOT REPLACING any existing files/folders that are already in the new ~/.config folder. (This way you'll be able to keep some/all of your application preferences). Then log out, log in, retest.

The same technique is used for the ~/.local folder, or any other files/folders in your home directory, excluding the major folders like Documents, Music, Pictures, etc.

Pay close attention to what you're doing, 'cause if you aren't careful, you can make it difficult to log back into your account. I'd leave the bash and profile and authority files alone.

Update #1:

If you decide that one of the .HOLD folders did not resolve the problem, to return to the previous configuration, you have to manipulate the new folders and the .HOLD folders this way... using .config as an example... move the new .config folder to ~/Desktop/config.NEW, rename .config.HOLD to .config, log out, log in, delete ~/Desktop/config.NEW.


It expects you to enter passcode to unlock , in case you can't recall it only option I can think of resetting phone to factory settings.


How to move a VirtualBox image (VDI ?) to an bootable SD

It is possible to convert a VirtualBox VDI disk to an image file which can then be put onto a disk partition. There may be further steps required to make this bootable, though it may just work.

To convert the VDI file:

vboxmanage clonehd YourVMDisk.vdi RawVMDisk.img --output=raw

This will result in a .img file which can be written to a block device partition. You can use a tool such as Clonezilla for this, or something more low-level and potentially destructive such as dd.

I'm not sure whether you mean to write your disk image to and SD card or an SSD, both can be made bootable, though there are sometimes BIOS related difficulties around consistently assigning a device name to an SD card.


How do I swap mouse buttons to be left handed from the terminal?

xmodmap -e "pointer = 3 2 1"

in a terminal should work. If you want to run that command at the start of lightdm (the default login screen), you can edit /etc/lightdm/lightdm.conf like described here - use the xmodmap command instead of xbacklight in the script, of course.


Compress folder following any symbolic links

Note that the manual for tar includes an option for this:

-h, --dereference
don't archive symlinks; archive the files they point to


If your application has no GUI (I.E. only does console output), you would not see anything because a terminal is not opened when double clicking an executable in the file manager. However, your application should run in the background.

You can run the executable from an existing shell by calling it with ./path/to/executable

The second, more complex option would be to make a desktop file to launch the application from the file ex and set it to show the terminal output.

Suppose I have a very simple application such as

#include <iostream>
#include <stdlib.h>
int main() {
    std::cout << "hello bob" << std::endl;
    system("read moo"); // pause for input at the end.
    return 0;
}

And I compile it with g++ foo.cpp which by default outputs an a.out file.

Then just create a foo.desktop file containing

[Desktop Entry]
Type=Application
Name=Awesome App
Terminal=true
Exec=/path/to/a.out

which one could then set executable then double-click from the file navigator and see the terminal output. That is how application shortcuts are built in menus and how they get to have a friendly name and icons.


glxinfo | grep OpenGL not showing nvidia

It seems that prime-select feature is it doesn't work for amd/nvidia but only for intel/nvidia, so I had to manually config some files.

Basically I had to edit 2 files

/usr/share/X11/xorg.conf.d/10-amdgpu.conf

In this one, I replaced the line with Driver "amdgpu" with Driver "modesetting"
/usr/share/X11/xorg.conf.d/10-nvidia.conf

I added a new line inside OutputClass: Option "PrimaryGPU" "Yes"

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 1660 Ti with Max-Q Design/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 435.21
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 435.21
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 435.21
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

These instructions were given here. So now I was able to see the correct output of glxinfo.


First, check your BIOS. Use sudo dmidecode -s bios-version, note the version number returned, go to the Lenovo web site, and check for a newer version.

Second, check the firmware in your SSD. Use sudo lshw -C disk, note the manufacturer and the firmware version, and check at either the Lenovo web site, or SSD manufacturer's web site for an update.

Third, run a memory test. Go to http://www.memtest.org or https://www.memtest86.com/ (use the second link to get the latest free version), and download/run memtest to test your memory. Get at least one complete pass of all the tests to confirm good memory.


Ubuntu 12.04 - [drm] nouveau unknown i2c port, i can not use the PCI express card with VGA and HDMI output


dependency error on libc6-amd64 even if it's already installed

I found the solutions

I had to remove all i386 package i have installed, build again my .deb and install it.

root@x72j:/home/reda/repo/git/node-debian# dpkg -l | grep i386
ii  gcc-4.9-base:i386                     4.9.2-10                             i386         GCC, the GNU Compiler Collection (base package)
ii  libc6:i386                            2.19-18+deb8u1                       i386         GNU C Library: Shared libraries
ii  libc6-amd64                           2.19-18+deb8u1                       i386         GNU C Library: 64bit Shared libraries for AMD64
ii  libc6-i386                            2.19-18+deb8u1                       amd64        GNU C Library: 32-bit shared libraries for AMD64
ii  libc6-i686:i386                       2.19-18+deb8u1                       i386         GNU C Library: Shared libraries [i686 optimized]
ii  libgcc1:i386                          1:4.9.2-10                           i386         GCC support library

root@x72j:/home/reda/repo/git/node-debian#
apt-get remove --purge gcc-4.9-base:i386
apt-get remove --purge libc6-i386


I was Looking at you laptops support sheet on the Toshiba Website:
http://www.toshiba.com/us/computers/laptops/satellite/L650/L655D-S5066

Under Performance and Graphics Memory I See this:

GRAPHICS MEMORY*
256MB-1917MB dynamically allocated shared graphics memory

I just subtracted the 1917 from your swap size and it gave me the memory amount of what your output showed. It may be that the graphics card is using this shared memory 100%. This may be due to the Normal ATI drive that would be in windows is not there to manage it.

I would reboot and go into your PC's BIOS. In there you may find a setting to turn of the shared Memory feature and just used the 256MB which should be more than enough to keep your system running smooth.

By default Ubuntu will use the open source Radeon driver for cards manufactured by AMD.

you may want to look at installing the Linux Driver for your Graphics card. Ubuntu has a Guide for this Here. https://help.ubuntu.com/community/BinaryDriverHowto/AMD

You simply need to open the setting menu for ubuntu, Click "Software & Updates".

Select the far right tab "Additional Drivers" and wait a few seconds for Ubuntu to build a list of drivers you can use.

It should looks something like this:

Note: I have an Nvidia GPU so you will see different drivers than me.

Make sure to pick the one that has the message (proprietary, Tested) next to it.

Once Selected click "Apply Changes" let it do its thing and reboot.


Why the services do not start at installation?

This "script" is included in the sysv-rc package. This is part of a Debian policy which allows sysadmins to control what services starts/restarts/stops whenever they install/upgrade/uninstall packages:

  POLICY-RC.D   Policy layer (/usr/sbin/policy-rc.d) interface:

  Most Debian systems will not have this script as the need for a policy
  layer is not very common. Most people using chroot jails just need an
  one-line script which returns an exit status of 101 as the jailed
  /usr/sbin/policy-rc.d script.

  The /usr/sbin/policy-rc.d file must be managed through the
  alternatives system (/usr/sbin/update-alternatives) by any packages
  providing it.

  /usr/sbin/policy-rc.d [options]   []

  /usr/sbin/policy-rc.d [options] --list  [...]

(Source)

So, what happens here? Well, whenever this script is present it will return a code which states the current policy of the local system (which is by default 101 = action forbidden by policy). If you want to change the policy, just modify the file as root to any of this values:

  0 - action allowed
  1 - unknown action (therefore, undefined policy)
 100 - unknown initscript id
 101 - action forbidden by policy
 102 - subsystem error
 103 - syntax error
 104 - [reserved]
 105 - behaviour uncertain, policy undefined.
 106 - action not allowed. Use the returned fallback actions
       (which are implied to be "allowed") instead.

The script is still a place holder, but when completed all these values could be returned. If you want to allow any change just change exit 101 for exit 0 and done. Whenever you install/remove/upgrade a service these will be (re)started/stopped.


When you install windows 8 on the partition of windows 7 it replaces the ubuntu grub on the
 Master Boot Record (MBR) which is a special type of boot sector at the very beginning of the hardisk.
The grub which contains the location of ubuntu is wiped and replaced with windows 8 boot partiton
Solution i could take if i were you :
  get a gparted live image either on a CD or USB and boot it, it will tell you whether the ubuntu partition exists .
If it does you can use a ubuntu live image to restore the grub


connected my N7 (running ubuntu touch) to my pc (Ubuntu 12.10, no virtual machine)

    2:35 started phablet-flash on my pc
    2:35 downloads 'quantal-preinstalled-armel+grouper.zip" and the md5sum
    2:36 pushing grouper.zip to /sdcard: 1145 KB/s  (56481865 bytes in 48.145s)
    2:37 pushing quantal-preinstalled-phablet-armhf.zip to sdcard: 1129 KB/s (504219641 bytes in 436.014s)
    2:44 N7 reboots
    2:44 Android Logo with "open belly"
    2:47 done Ubuntu Touch up and running

My suggestion: If possible, try it on a plain Ubuntu and not on a virtual machine.


For lubuntu 18.10, drag and drop from the start menu to the quick launch bar.


Re-enable notify-osd (?) after installing MATE

Remove the package mate-notification-daemon and you should be just okay.

sudo apt-get remove mate-notification-daemon


Is "sm-disable" flag required for nm-applet on openbox?

The --sm-disable flag isn't used anymore due to the applet no longer being session-managed (source). It should be safe to use it without that flag.


Compile snort 2.9.8.2 : ERROR! dnet header not found

My SNORT installation problem was resolved by installing libdumbnet-dev:

apt-get install libdumbnet-dev

(source)


Are there guidelines for creating panel icons?

Canonical has guidelines for application indicators, but more specifically you would be looking for a guideline for the gnome-panel and to my knowledge, there probably is not one specifically, though there may be something about it in the GNOME HIG.


In this case ~/mulval is mulval's root folder.

Edit your .profile file (run gedit ~/.profile) and add the following lines in the end:

# set variables for mulval
MULVALROOT="$HOME/mulval"
PATH="$MULVALROOT/bin:$MULVALROOT/utils:$PATH"

Save the file then log out and log in.


How do I disable automatic screen locking in Xubuntu?

light-locker is the new screen locking program in Xubuntu 14.04. If you disable light-locker, it should stop locking your screen.

How to disable lightlocker

Go to settings manager > session and startup > application autostart and disable light-locker, which is titled “Screen Locker (Launch screen locker program).”
Reboot your machine and it should stop locking. Alternatively, start up Terminal with Ctrl+Alt+T and run killall light-locker.

Source: Disabling screen lock is not possible


Ubuntu 18.04.1 LTS unable to change resolution

Check if "nomodeset" is added in your grub. (Like in my case)

goto /etc/default/grub

If yes remove it.

Run command after saving file

sudo update-grub

and reboot the system


juju bootstrap command finished but deployment failed

I had a problem with the DNS forwarder on my MaaS server which was probably the cause of this. An upgrade to an updated MaaS pointed out the problem to me.  After fixing it machines seem to be deploying better.


Bad Youtube video quality on Ubuntu 14.04 with NVIDIA card

What exactly do you mean?

The screenshot you posted shows colour banding and bad deblocking here on a Windows machine running Firefox in that dark and low complexity scene too. Some other scenes like 9m49s appear acceptable for the pretty low quality of the video. That's exactly how bitrate starving video looks like and what the encoder does.

Here is mediainfo from the 720p file that I downloaded to my computer at home:

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High@L3.1
Format settings, CABAC                   : Yes
Format settings, ReFrames                : 1 frame
Format settings, GOP                     : M=1, N=60
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 30mn 11s
Bit rate                                 : 1 318 Kbps
Maximum bit rate                         : 6 991 Kbps
Width                                    : 1 280 pixels
Height                                   : 720 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 25.000 fps
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.057
Stream size                              : 285 MiB (87%)
Tagged date                              : UTC 2015-12-18 19:12:58

1318 Kbps at level 3.1 is way below typical recommendations (2496 Kbps/ HQ 3072 Kbps) for 720p content and even low for the higher and more efficient levels. I doubt that YouTube can be blamed for the bad quality of this video, it must have had bad quality to begin with when it was uploaded.

I'm always impressed to see such results when there is Handbrake out there as a good example of a no frills, easy to use and fast x264 configuration with acceptable image fidelity (crf20).


This rule limits the number of parallel connections coming from a single IP to your webserver. In this case no more than 20 parallel connections from a single IP are allowed.

Usually rules like these are used to protect against DoS attacks.

Given a browser which opens a new connection for every image included in the HTML file you might easily exceed this limit.


WiFi works on Ubuntu, but not wired connection

Your /etc/neplan .yaml file should look something like this... this will enable your ethernet device...

network:
  version: 2
  renderer: networkd
    wifis:
      wlp3s1:
        dhcp4: yes
        dhcp6: no
        access-points:
          "3MightyMen":
          password: "3346993030"
    ethernets:
      ens33:
        dhcp4: yes
        dhcp6: no
# for a fixed IP, comment out the above line, (dhcp4: true),
# and uncomment addresses: and gateway4: lines below.
# to specify DNS nameservers, uncomment last three lines.
#       addresses: [192.168.1.20/24]
#       gateway4: 192.168.1.1
#       nameservers:
#         search: [mydomain, otherdomain]
#         addresses: [192.168.1.1, 1.1.1.1]

In terminal...

sudo netplan --debug generate # generate config files

sudo netplan apply # apply current configuration

reboot # reboot and confirm proper network operation

postnote: see https://netplan.io/examples for more examples


and if you try to delete it it doesn't seem to work

If a normal rm -rf {dir} does not work do a disk check first. Easiest to do that would be (this will reboot your system and do a disk check during the boot):

sudo touch /forcefsck
sudo reboot

And try a rm -rf {dir} again. If that still does not work try it from a live dvd. Don't kill the command and let it run for a little while.

It is possible that there is an error with the file system where a dir inside a dir points to a dir above (and making an endless loop). The disk check should fix that.


Try typing this at the command line: (assuming your username is nautilus)

sudo chown nautilus /home/nautilus/.gnome2

You will be asked to provide your password.  This is the password you use to login.


Disable lock screen does not disable the slide up lock screen

Ok, here's what I found as a solution, maybe not the best but it works.

sudo dconf_editor

I found these settings:

/org/ukui/power-manager/lock-use-screensaver set to [false]

Result: slideup lockscreen is gone.

/org/ukui/power-manager/lock-blank-screen set to [false]

Result: locking still enabled on blank screen

used the script:

# script to disable lock-screen
sudo gsettings set org.gnome.desktop.lockdown disable-lock-screen 'true'

Now lock screen is disabled. No slideup screensaver, I also have the script to re-enable the lock screen:

# script to enable lock-screen
sudo gsettings set org.gnome.desktop.lockdown disable-lock-screen 'false'


Install menu wrong resolution so can't continue

I don't know how long you waited, but the install process with that laptop is very slow. Try again and just let it sit. I'd say you should have some respose in about 15-20 minutes. I have the same laptop and am working on getting the resolution a little better - the display is to the left and shows a duplication of the top 1" or so of the top part of the screen on the bottom. Good luck!
PS Also try different installation method(s) like using Universal USB Installer(use Google to find) to install from USB or an expendable external hard drive(you'd want to format the hard drive during the process)
PS Ubuntu also runs VERY slow on this laptop - I think it's related to the display anomaly. I suspect it's sensing the wrong graphics hardware. Mine is still a work in progress.


Firefox 4 and Firefox 3.6, users cannot start Firefox 3.6

To have two versions of firefox to run - you'll need to create separate profiles.  If you don't, you will get clashing addons and possibly a corrupted shared profile.

I'm not sure how you installed firefox 4 - it no longer appears in the mozilla releases folder

On my computer I have the standard firefox 8.0 installed with Natty.

I downloaded firefox 3.6 tar file from the Mozilla releases folder and untar'ed it:

cd Downloads
tar xjf firefox-3.6.24.tar.bz2
cd firefox

Then create a profile for firefox 3.6

./firefox -ProfileManager

call the profile firefox36 - note the ./ is significant to run the local copy of firefox.

When you want to run firefox 3.6

cd ~/Downloads/firefox
./firefox -P firefox36

Similarly create a profile for firefox 8

firefox -ProfileManager

call the profile firefox8

When you want to run firefox 8 run

firefox -P firefox8

the only caveat - dont run both browsers at the same time.

You've possibly permissions/corruptions due to running Firefox as root - if you run Firefox as root, then various files can be updated with root permissions.  When you use firefox as a standard user, the same files will fail to update.

These steps below should give you a clean start with no profiles and incorrect file permissions.

I would purge your current firefox (sudo apt-get purge firefox) -and then reinstall.
I would remove your /user/local/share version of firefox - and install firefox 3.6 locally as per my answer.
I would rename/remove the .mozilla folder in your home folder.


PC is not detecting any boot drive. How to fix this?

Problem solved. :)
Boot-Repair fixed it, with no hassles.
Here's how to get it:

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

I ran it and clicked Recommended repair and it fixed the problem automatically.

Basically it fixed problems with my GRUB.


It sounds to me like the drive in the MP3 player is going bad. I've seen this exact thing multiple times on various computers and devices where I work, and every single time it's been a failing drive. As the drive gets worse and worse it will eventually start intermittently showing up as read-only, exactly as you've described.

Unfortunately, it's probably time for you to get a new MP3 player. You can try to unmount the drive and fsck the drive, but most likely it will either fail or it will "fix" some errors only to have more errors appear.


Cannot install mozilla from the Software-Center

In case you didn't know it, the latest version of Firefox from the Ubuntu Software Center in Ubuntu 12.04 is Firefox 40 and you have a software source in your sources.list file that is adding Firefox 37 to your software sources. This is very irregular. If the default version of Firefox in the Ubuntu Software Center is more up-to-date, you should normally install that version instead. Unless you have a compelling reason to install Firefox 37 on your system, you should remove the line that refers to http://security.ubtuntu.com/ubuntu/pool/main/f/firefox/firefox_37.01+build1-0ubuntu0.12.04_i386.deb from your sources.list file, run sudo apt-get update to update your software sources, and stay with the latest version of Firefox from the default Ubuntu repositories.

Otherwise you need to correct the misspelling in http://security.ubtuntu.com/ubuntu/pool/main/f/firefox/firefox_37.01+build1-0ubuntu0.12.04_i386.deb

Use the terminal text editor program nano to edit /etc/apt/sources.list. Open the terminal and type:

sudo nano /etc/apt/sources.list

In sources.list replace this string:

http://security.ubtuntu.com

with this string to correct the spelling error (ubuntu was misspelled):

http://security.ubuntu.com

The instructions for using nano are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.
Update the software sources to get rid of the Failed to fetch ... 404 Not Found error:

sudo apt update

Open the Ubuntu Software Center and try to install the package again.


CMake Error - CUDA_cublas_LIBRARY not found

You have the libcublas9 libraries in the standard library location.  There are other ways to install CUDA however, which may put those libraries elsewhere. The makefile handles this possibility by having you tell it where the libraries are -- the CUDA_cublas_LIBRARY variable.  This variable may be set in the makefile, or perhaps it may be picked up from your environment (you set in your .profile).  You edit the makefile and define the location in CUDA_cublas_LIBRARY.    It should look something like:
CUDA_cublas_LIBRARY=/usr/lib/x86_64-linux-gnu/libcublas.so

If you do this in your .profile, remember to add it to an export line:
export CUDA_cublas_LIBRARY
Your .profile is just a text file.  Use a text editor (vim, zile, ...) and add things at the bottom. Don't use a word processor like LibreWrite because it tends to perform unwanted actions like breaking lines or adding characters.

Libraries get revisions all the time, and typically get a new version number added to their name.  You wouldn't want to keep all the old versions, so when you link, you want a name that does not change so frequently -- Ubuntu typically provides links for these more stable names. Libraries ending in .so or .so.x are typically links to the .so.x.version library.
The locations of the libcublas files you listed are in the normal place for libraries for Ubuntu 64 bit architecture, so a normal link should pick them up.  If they were in another place, like a location you picked to install all the CUDA files (which you can do by unpacking the CUDA deb files instead of installing them), then you'd add that ...cuda/lib location to your LD_LIBRARY_PATH environment variable (as the CUDA instructions tell you).  If the makefile expects to find those libraries in /usr/lib, then you either fix the makefile, or for a real kluge, just add another link to the library in the expected (wrong) place.

From your other question trying to give cmake the information from the CUDA_cublas_LIBRARY variable, you may either put it into your enviromnent by adding it to your .profile, or define it first on the cmake line, instead of after the cmake command.

Updated things a bit now that I know it's CUDA9 you are using.  Things look a bit confused, but I think you have the necessary files, just set the CUDA_cublas_LIBRARY variable as described above.


Microphone not working in Google Hangouts

I see from your question you are using a linux OS.

I had the same issue and installing Google hangouts extension worked like a charm for me.

In my case, I was using chromium on Ubuntu 18.04.


Is it worth it to change from Ext4 to Ext3 in order to use Partimage?

Check here: Alternatives to Windows, Mac, Linux and online software - AlternativeTo.net

izx's point about virtual machines is a valid one. It is a great way to experiment and learn, and has built-in support to rollback any mistakes.


there are no Linux drivers available

yes there are
canon-europe.com > support > drivers > pixma g5050 > linux 64 bit
IJ Printer Driver Ver. 5.90 for Linux, Release date: 10 September 2019
PPD file is cnijfilter2-source-5.90-1/ppd/canong5000.ppd
in CUPS the driver is Canon G5000 series
in arch-linux the driver package is cnijfilter2
the driver fails to remove temporary files after use
as workaround i use
#!/usr/bin/env bash
# remove canon printer temp files older than x minutes
# run this script as root
minutes=5
# temp_path: folder with the cnij* temporary files
temp_path=/var/tmp # arch linux
#temp_path=/var/tmp/*cups*/tmp # nixos linux
while true
do
  date
  find $temp_path -maxdepth 1 -name 'cnij*' -mmin +${minutes} \
    -exec rm -v '{}' \;
  sleep ${minutes}m
done


Installation of ncurses-bin fails with "unable to make backup symlink for './usr/bin/infotocap': No such file or directory"

This is caused by /usr/bin/infotocap being a symlink to itself (which doesn't make sense for me). I removed the symlink and invoked sudo apt-get -f install again. I suggested better feedback of dpkg at https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1552957.


Emacs installation fails on Ubuntu 20.04

To fix this, I first did sudo apt purge emacs.

I then reinstalled libotf0 and libm17n-0, using:

sudo apt install --reinstall libotf0 libm17n-0

after that, sudo apt install emacs worked as expected.


Ubuntu 12.04 ethernet settings not working

Screenshot

So this was the output while wired connection 1 was connected.
@Ted .


Ubuntu 16.04 - Second Drive in machine has to be re-shared through GUI at boot

You can use rc.local to add the mount on boot.
You will have a problem only if the network will be init before the rc.local will run, and to fix this issue see this answer


I attached a picture with the NVidia driver as it is installed from the Additional Drivers. Does this good or should i install another version?

EDIT #1: I downloaded the latest driver from NVIDIA website. It's a .run file. When i try to install it, i get the following error:

EDIT #2: Here is the answer that actually worked for me:

disable secure boot
select another driver that is not from nvidia in
    the additional drivers
restart
sudo apt purge nvidia*
sudo
    add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
go to
    additional drivers select the nvidia binary driver (proprietary)
restart

Now i have all the options inside NVIDIA X Server Settings and my secondary monitor works.


This will get the source of the stock kernel:

apt-get source linux-source

https://help.ubuntu.com/community/Kernel/Compile/

You can check what version of the kernel is running like this:

uname -r

Which will print something like:

3.13.0-46-generic

You can find a list of current source package versions available on your system via:

apt-cache search linux-source

To get the upstream version of the kernel:

git clone git://kernel.ubuntu.com/ubuntu/ubuntu-trusty.git

https://wiki.ubuntu.com/KernelTeam/GitKernelBuild

In the above link, 'trusty' is the codename for the version of Ubuntu.  You can find out the codename for the version of Ubuntu you have installed via:

cat /etc/lsb-release


How to totally remove the nginx from ubuntu 14.04 LTS

Please stop nginx first then try it to remove:

sudo apt-get purge nginx nginx-common

Or

sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras nginx-naxsi nginx-common


I want to install an iso dvd burner, but I don't know, which application I need to use for it

You could use Brasero.

Some of its features:

Image Burning
Data CD/DVD
Audio CD
CD/DVD copy

You can install it by using Ubuntu's Software Center.


How do you get to show the full name of application in 'Show Applications' and 'Files?

If you need to see the full names, you can try the extension Applications Overview Tooltip (should work from Gnome 3.20, tested and still working on Gnome 3.32.1, the latest Gnome version to this date on Ubuntu 19.04).

Although the names would not be displayed differently as before, you would be able to see the full names by passing your mouse over the icons.

(If someone has a better idea on how to see the full names directly (without the tooltip), I would be interested too though. )


How to run a command BEFORE shutdown on Ubuntu 21.04

You can do this by creating a service file, then reloading systemd. Here's how:

Open Terminal (if it's not already open)

Ensure the script that you want to run at shutdown is executable:
chmod +x ~/scripts/pre-shutdown.sh

Create a file in /etc/systemd/system for the shutdown service. For the sake of this example, I'll call my file nighty-night.service.

Add the following lines to the .service file, modifying it as needed:
[Unit]
Description=Pre-Shutdown Processes
DefaultDependencies=no
Before=shutdown.target reboot.target halt.target
# This works because it is installed in the target and will be
#   executed before the target state is entered
# Also consider kexec.target

[Service]
Type=oneshot
User=smeterlink
Group= smeterlink
ExecStart=/home/smeterlink/scripts/pre-shutdown.sh  # your path and filename

[Install]
WantedBy=halt.target reboot.target shutdown.target

Restart the daemon:
sudo systemctl daemon-reload

That's all there is to it.


Failure to install ubuntu-13.10-desktop-amd64

If you are installing 13.10 using Wubi then that is likely your issue. Wubi is not supported in 13.10 you will need to follow the official install instructions which can be found here: http://www.ubuntu.com/download/desktop/install-desktop-latest


Using systemd this can be done (sample autossh created for mysql access):

Create a systemd file using nano or vim or appropriate editor of choice:

sudo vim /etc/systemd/system/autossh-mysql-tunnel.service

Add the following contents:

[Unit]
Description=AutoSSH tunnel service everythingcli MySQL on local port 5000
After=network.target

[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NL 5000:localhost:3306 cytopia@everythingcli.org -p 1022

[Install]
WantedBy=multi-user.target

Reload systemd:

sudo systemctl daemon-reload

Start the Autossh service:

sudo systemctl start autossh-mysql-tunnel.service

Enable at boot:

sudo systemctl enable autossh-mysql-tunnel.service

Check status with:

sudo systemctl status autossh-mysql-tunnel

Note

  There is however an important thing to note about systemd and AutoSSH: -f (background usage) already implies AUTOSSH_GATETIME=0, however -f is not supported by systemd.

So in the case of systemd you need to make use of AUTOSSH_GATETIME

Source

https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-autossh/
https://www.freedesktop.org/software/systemd/man/systemd.service.html


It seems that the problem resides within the Intel High Definition Audio drivers, and it has been around for quite some time now.
To solve the problem temporarily, but immediately, issue the following command:
echo 0 | sudo tee /sys/module/snd_hda_intel/parameters/power_save

Try the previous command to be sure you are suffering this problem. If this works for you, then you can solve it permanently by adding the following line above "exit 0" in "/etc/rc.local".
echo 0 > /sys/module/snd_hda_intel/parameters/power_save

Hope this helps
Sources:
post 1
post 2


This is a known bug: https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1294877

There are several workarounds but the one that worked for me was to right click on the .iso in the file explorer and select 'Open With Disk Image Writer' and then 'restore' the ISO image to the selected USB device.


visuals on screen are fuzzy after installing nvidia 340.46

I had a similar problem, sometimes some websites or programs windows started flashing. I solved the problem temporarily switching to version 331.89.

solution is here: http://linuxg.net/how-to-install-the-nvidia-331-89-gpu-drivers-on-ubuntu-14-04-ubuntu-13-10-ubuntu-12-04-and-derivative-systems/


How do I disable the TouchPad on a laptop, but keep mouse buttons active?

Open gedit and copy-paste the following lines into it:

#!/bin/sh
# This script disables the touchpad without disabling buttons by setting Hysteresis
# to an impossible value.

############
# Warning! #
############
# If you have a touchpad with no "Physical" buttons but have to tap the corners
# of your touchpad to simulate physical buttons, put a "#" sign in front of the next
# 4 lines!

synclient LTCornerButton=1
#synclient LBCornerButton=0
synclient RTCornerButton=3
#synclient RBCornerButton=0

# Set PalmDetect on: Needed if the before lines are commented away,
# Doesn't do any harm if they're not
synclient PalmDetect=1

synclient HorizHysteresis=10000
synclient VertHysteresis=10000

# Disable all other touchpad features
synclient VertEdgeScroll=0
synclient HorizEdgeScroll=0
synclient CornerCoasting=0
synclient VertTwoFingerScroll=0
synclient HorizTwoFingerScroll=0
synclient TouchpadOff=2
synclient LockedDrags=0
synclient TapButton1=0
synclient TapButton2=0
synclient TapButton3=0
synclient CircularPad=0

Then save it as /usr/local/bin/DisableTouchPad.sh

In a terminal type:

chmod a+xr /usr/local/bin/DisableTouchPad.sh

To activate it type:

DisableTouchPad.sh

and test whether this works.

To make this change permanent, go to the dash, open "Startup Applications", click add, in the command type: /usr/local/bin/DisableTouchPad.sh and in the Name and Comment type anything that will remind you what this was about.  Click add again.

Presto: a disabled touchpad with the buttons still enabled!


Modify creation and last modified date for entire subdir

You can change the modification times of all files and directories under your target directory with:

find /target/dir -exec touch -m {} +

That will set the modification time to today. You can also set it to a specific date of your choosing:

find /target/dir -exec touch -m -d '1/1/2000' {} +

I really doubt you'd need to touch the creation date since they're not really used in Linux (see [1],[2],[3]) kernel doesn't even provide a way of accessing it easily.


Unable to Connect to Internet with 3G USB Dongle for Particular ISP

Take a look at this unofficial guide about "How To Setup Mobile Broadband Like BSNL 3G USB DataCard On Ubuntu 11.10".

Besides, according to this answer, there is a bug concerning two USB dongles, Huawei E220 and E1550, on Ubuntu 11.10. The workaround suggested in the thread of the bug is:

Plug your usb dongle;
execute in terminal: sudo usb_modeswitch -v 0x12d1 -p 1003 -V 0x12d1 -P 1003 -R
Then unplug and replug the dongle, and now it will connect.

Hope it helps and don't forget to mark the bug as affecting you, in order to solve it as soon as possible.

If you are still not able to connect to the internet, you can try the solution proposed in this similar question.


HUD not work in all aplications (Ubuntu 12.04)

HUD does close Chrome windows. Instead of typing "exit", type "close" and the first item in the dropdown should be "File > Close Tab" and the second should be "File > Close Window". Select the close window option to close that particular Chrome window. From here on, you can simply type "Alt [to invoke HUD] + CW" and it should pull up the first choice as "File > Close Window". Hope this helps.


seamless upgrade virtualbox from 4.2.0to 4.2.12

Remove the virtualbox-guest-additions-iso package. This will download on demand if required.
Install the new version (tip: you could add the virtualbox repository to keep apt-getting - see further down the download page)
Install the Oracle VM VirtualBox Extension Pack which comes under a separate license but is still monetarily free and available on the main download page.


Countdown applet, capable of counting down long periods of time?

You could modify the existing applet.

Open a terminal type :

sudo gedit /usr/share/pyshared/timerapplet/ui/DurationChooser.py

change the line MAX_HOURS = 48 to MAX_HOURS = 336(for a maximum of 14 days) restart the applet and you won't be limited by 48h any more.


"Open with..." option missing for Pencil documents

This is a 'Pencil' document, specifically a saved wireframe. For those who don't know what Pencil is, please see here.

Sadly, Pencil does not allow you to register file extension types (and open them correctly). This is due to it being built on Firefox technology. This means that it isn't recognised as an application, but as an extension of the original software. I've had this issue on Ubuntu and Windows both (I use Balsamiq on Mac). I've looked into many avenues for registering extensions, and none of them work.

Sorry I couldn't be more help.


Windows 8 dont show up on boot loader after installing 16

Try to boot into ubuntu and run sudo update-grub command on the terminal.


How do I update to the most recent version of KMyMoney?

how do I update to the most recent version of KMyMoney?

Update to the latest version of Ubuntu

When using an older version of Ubuntu, such as 10.04, the easiest way to get the latest software is to upgrade to the latest Ubuntu (currently 11.04).  Updating Ubuntu will also  update all of the software you have installed (if updates are available).

The version of Ubuntu that you're using is a Long Term Support release, so by default, you won't be prompted to upgrade. If you want to upgrade Ubuntu, go to System > Administration > Software Sources. Then, under the "Updates" tab, set "Release upgrade" to "Normal Releases", then run Update Manager and check for updates.

  I have installed KMyMoney 1.0.4... but there is a more recent version available from the KMyMoney website (4.5.3)

The change in version number may look significant, but KMyMoney actually just updated its version number to match the rest of the KDE platform.  Unless you know of specific features in the new version that you don't have in 1.0.4, I wouldn't bother with the update.

Add a PPA

If, for whatever reason, you'd prefer to stick with the Ubuntu 10.04, but you really want the newest version of KMyMoney, you'll want to add a PPA.  When you add a PPA, application updates will be installed through Ubuntu's Update Manager.  Keep in mind that these updates are coming from a third-party, and you should only add PPAs from trusted sources.

I'm not sure why the PPA didn't work for you before, but in theory, this would be the way to go.  This is the PPA you want: ppa:claydoh/kmymoney2-kde4  See here for more information on how to add PPAs to Ubuntu 10.04.

Bonus Questions

  what is the difference between the KDE desktop and the standard gnome desktop

KDE and Gnome are the two most popular desktop environments for Linux.  Generally, the desktop environment controls the look and feel of the user interface and the default applications (web browser, text editors, email client, etc).  You can find a lot about the specific differences on Wikipedia.

  if I install KDE4, how do I select one or the other at boot?

On the login screen you'll be able to choose which session (Gnome or KDE) you want to use.

  Can I run KMyMoney in gnome (do I need KDE)?

You can run KMyMoney in Gnome (this is what I do), but if I remember correctly, it depends on a lot of KDE libraries and tools, so it will install a lot of extra stuff.  This shouldn't be a problem unless you're really low on hard drive space.

Anyway, welcome to Ubuntu, and sorry it took awhile for your question to get answered.  If you have any other questions, don't hesitate to ask.


Failed Attempt to Upgrade to 12.04 Need to Get Old Files

Trying running ubuntu off a disk or USB in its Live Session. You can go into your hard drive and fetch files that way. Windows won't be able to understand some hard drive formats, especially from linux.


Is it possible to use Juju on MAAS nodes not connected to Internet?

This could work in theory, but many of the charms will pull in stuff from the internet when configuring, like a BZR or Git repository or something like that.

I would recommend allowing machines to be connected to the internet. If you are concerned about security, you can set up the network to do NAT or have a firewall so incoming requests can't get to the nodes, but outgoing requests can.

If you are concerned about bandwidth usage, I would set up squid or some other proxy in a transparent configuration between the virtualbox nodes and the internet. (I did this since I'm on a limited transfer connection and this worked fine).

The feature to support running disconnected has a bug report here if you want to follow along:

https://bugs.launchpad.net/juju-core/+bug/1215948


'ls' and file managers hang on home directory after installing KDE

Simply restarting my computer solved the problem.  I'm still not sure why this happened in the first place though.


K here's exactly how to do this.

1 Plug hard-drive into a computer with an OS (Duh)

2 For windows:
Download universal usb installer
2 For linux:
Get linux pen drive installer

3 Go into the installers (Make sure you have the linux OS you want to install)

4 Format the drive as you would with USB stick (In other words, pick the external hard drive letter in the menu and click continue pretty much)

The installation should enable you to run ubuntu from the external itself the way it can run from a USB

If this doesn't make the OS exactly as it would on a computer than run the OS and get a partitioner, leave 5gb for your current OS on it, than format the rest of the drive as a fat32 and install the OS through the OS already on it and over-ride the entire drive. (Yeah looking back at this I don't think this would work because externals don't have usb drives >_> but i'm sure someone can explain that part better and get the jist)


I try to run Steam and I get this in the terminal

Try running sudo apt install libatk-adaptor libgail-common.


Dependencies still exist in "dpkg -l" after running "apt-get remove dependencies-names"

Note the rc at the beginning of the list.

  r: Remove (marked for removal)
    c: Configuration files are present.

The difference between apt-get remove and purge (From man apt-get)

   remove
       remove is identical to install except that packages are removed instead of installed.
       Note the removing a package leaves its configuration files in system.

   purge
       purge is identical to remove except that packages are removed and purged (any
       configuration files are deleted too).

As you choose to apt-get remove, your dpkg -l reflecting that. If you would have been used apt-get purge you could avoid such a situation. To get rid of these, try in terminal,

dpkg --list | grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge

It will purge all the packages which are marked for removal. Before you purge them you can check the list which you are going to purge using,

dpkg --list | grep "^rc" | cut -d " " -f 3

I guess you have no other package remain marked for removal except those are from xfce. If you are not sure about it. Use the following instead,

dpkg --list | grep -i xfce | cut -d " " -f 3 | xargs sudo dpkg --purge


Trying to find if internet connection is 2.4 or 5ghz, in order to purchase proper tv streaming stick

The available wireless frequency will be determined by your router or, if you had configured your computer to provide a hot-spot by the capabilies of your inbuilt wireless card.

I am not aware of any card or router that will only be able to provide a 5 GHz signal - they all can do 2,4 GHz as well, mostly simultaneously or even in parallel so we can use both bands to increase bandwidth.

Informations including frequency about the wireless you are currently connected to will be displayed by this terminal command:

iwconfig

Also see
- How to setup an Access Point mode Wi-Fi Hotspot?
- How to connect and disconnect to a network manually in terminal?


How to be warned if RAID 1 fails on Ubuntu 10.04

mdadm automatically sends root an email when a fault happens.  You just have to have a mail server, such as postfix installed on the server and configured to store or forward root's mail somewhere you will read it.


Nevermind... I found it here:  http://old-releases.ubuntu.com/releases/xenial/


Is $HOME/.local/share the default value for $XDG_DATA_HOME in Ubuntu 14.04?

As report in XDG Base Directory Specification environment variables aren't set by default bug, Ubuntu doesn't set XDG variables.

According to FreeDesktop Base Directory Specification:

  $XDG_DATA_HOME defines the base directory relative to which user
  specific data files should be stored. If $XDG_DATA_HOME is either not
  set or empty, a default equal to $HOME/.local/share should be used.

Applications that implement this specification must implement this behaviour, so if $XDG_DATA_HOME is not defined they must use $HOME/.local/share as default.

There are some implementation of this specification, like: Glib, libghc-xdg-basedir-prof and pyxdg

If you want to override this value, you should define XDG variable in /etc/profile or better in /etc/profile.d as described in Where should the XDG_CONFIG_HOME variable be defined?


Ubuntu 11.10 and 12.04 - My computer GUI - list of hard drives - "Unknown type"

Nothing to worry about. Nautilus just doesn't have a 'definition' for this type of link.

If it bothers you and you don't find the Type field useful you can turn it off by going to File->Preferences->List Columns and un-select the Type column or you could change the view mode from list to Icons.


The easiest way to uninstall pil is using pip:

sudo pip uninstall pil

and then install pillow using pip:

sudo pip install pillow

(see here for installing pip)


How do I get smem to output useful results?

Probably the files in your system have a different format/naming or you use the -S argument but do not point to a .../proc. If the SMAPS is not present in /proc/$pid/ you'll also have nothing displayed.

smem requires /proc/$pid/smaps, /proc/$pid/cmdline, /proc/$pid/stat, /proc/meminfo, /proc/version.

You can find more info on /proc on the man pages of linux. e.g. http://man7.org/linux/man-pages/man5/proc.5.html.

There I found out that in order to have useful data, you need to have a 2.6.14 kernel at least and it needs to be compiled with the option CONFIG_PROC_PAGE_MONITOR.

Bernard


No option to boot Ubuntu in a dual-boot system

No need to worry, Ubuntu is still installed. You just need to access Windows boot manager by pressing spacebar or F8 or F10. When the BIOS appears, then it will show you the operating systems loaded on Windows boot manager.


Have you tried to follow these instructions from the Videolan documentation (scroll down to the Video on demand section)?

It would be useful if you provide a test rtsp url that you want to stream.

Edit: the instructions from the above link are:

  First launch the vlc:

  vlc --ttl 12 -vvv --color -I telnet --telnet-password videolan --rtsp-host 0.0.0.0:5554

  where:

  12 is the value of the TTL (Time To Live) of your IP packets (which means that the stream will be able to cross 11 routers).
  telnet launches the telnet interface of the vlc.
  videolan is the password to connect to the telnet interface.
  0.0.0.0  is the host address.
  5554  is the port on which you stream.

  Then connect to the vlc telnet interface and create the vod object:

  new Test vod enabled

  setup Test input my_video.mpg

  You can access to the stream with:

  vlc rtsp://server:5554/Test

  where server is the address of the streaming server (IP or DNS)


How does APT choose the specific package to install in order to provide a virtual package needed as a dependency?

How does APT choose the specific package to install in this case?

APT doesn't select a package. It tells:

  You should explicitly select one to install.

If you try to manually select a package, it wouldn't be installed.

In the case of base-files depending on awk it is irrelevant. First, it actually PreDepends on awk, forcing dpkg to install awk before starting to install base-files; second, mawk have priority required which are installed at system installation, and apt nags you if you try to remove it. So, just don't do it.

Now, according to sources, apt tries first of satisfying the dependency before trying with virtual packages (i.e., if depends are firefox | www-browser, checks if any of the packages are installed, then try to install firefox if neither is). If the non-virtual package isn't available, it seems to just iterate over all packages which provides the virtual package, if no other dependencies are broken. Other comments evidence of this behavior are this which leads to GrpIterator::FindPreferredPkg function.


If the problem with HDD power, try to use another cable, or another USB port. If you'll get it work, look at disk's SMART data (using Disks application). There is an information of disk health. Maybe your disk is corrupted physically, but not just broken data. If it's not there, try

sudo fdisk -l

But your disk is not listed there, it seems it's dead.


Delete all files with certain name in entire directory

Find all such directories:

find -name .svn -type d

If you are sure, delete all of them:

find -name .svn -type d -delete


Ok, figured this one out after some tinkering. the problem was the validation key. I had to manually add it from the site and everything downloaded fine.


The problem is that you are using a VPS server; you can't use a GUI normally because you don't have a monitor attached directly to it; that's why startx won't work.

A VPS is meant for use as a server, not as a desktop.

Maybe you could use a VNC server but I've never tried it.


Can't connect to VPN in network manager for KDE in Kubuntu 19.04

Make sure that you have all the required packages like network-manager-openvpn (or in my case network-manager-openconnect) or some other packages in apt search networkmanager or apt search network-manager. Unfortunately, when these packages are missing, it does not display any error message -- it just "does nothing"


"command 'gcc' failed" when trying to install a Python package from pypi

Your system is missing the Python headers. To fix this, run

sudo apt-get install python-dev

or

sudo apt-get install python3-dev


OK, now that you have only one language and locality defined in your user profile, you can already see that en_GB has a different collating sequence then en_US.

If you're familiar with database technology, what we'll be accomplishing is something like:

SELECT Name FROM tPerson WHERE Name LIKE "helen%"
Name
----
Helen
Hélène
Helena
...

I propose the following two possibilities:

Change the current language (en_GB) to include the diacritics of both fr_FR and de_DE
Create a new language (Let's call this one eu_EU) that is based on the language that contains the most diacritics that includes the other ones.

Advantages (by number) :

Less work to create a new language
Less possibilities of an Ubuntu upgrade breaking your work

Disadvantages (by number) :

Keep good back-up copies and restore them when an Ubuntu update changes en_GB
None that I can see.


How to change terminal emulatior keyboard shortcuts?

Using gnome-terminal.

Go in Edit > Preferences > Shortcuts.

Then simply edit them :


I was unable to reproduce your problem, but when I ran your sample, I didn't see the webview at all.  It looks to me that your positioning is very confused.  You have a Column containing a single Row, which contains another Column.  This doesn't really make sense.  It's obscured by incorrect indentation, so the first take-away is, clean up your code before you post it.  Not only will it help those trying to help you, you may discover the problem in the process.

You are mixing positioning by explicit sizing and anchoring.  For example, your outer column has both the width set explicitly and implicitly, through the anchor.fill attribute.  Do you know which one will win if they disagree?  I sure don't.

Along a similar line, you set the width of the WebView to be the width of its parent, the Row.  But the Row has to be wide enough to hold all of its children, so it must be wider than the WebView.  How does QML resolve this?  I don't know.  I find Row and Column good for arranging a number of Elements of known size, but not for holding elements that should take up the remaining space.  If that's what you want, do it explicitly or through anchors.

Below, I've rewritten your example code into a form that works for me.  I don't know that this was the layout you were trying for, but hopefully it's clear enough for you to rearrange it as you see fit.

I chose to put the URL entry and the buttons in a Row, since all of them are of a fixed size.  The WebView should take up the rest of the space, so I anchor its top to the bottom of the Row (with a 1 gu margin) and its bottom to the bottom of the Page.  Setting its width to the Page width ensures that it reaches all the way across, although that could also have been accomplished with anchors.

import QtQuick 2.0
import Ubuntu.Components 1.1
import com.canonical.Oxide 1.0
import QtQuick.Window 2.0

MainView {
    applicationName: "com.ubuntu.developer.mkamenjak77.bugapp"
    useDeprecatedToolbar: false
    width: Screen.width/2
    height: Screen.height/2

    Page {
        Row{
            id: controlRow

            TextField {
                id: textfield
                text: "http://google.com"
                width: units.gu(40)

                Keys.onReturnPressed: {
                    if (textfield.text.substring(0, 7) != "http://")
                        textfield.text = "http://" + textfield.text;
                    webview.url = textfield.text
                }
            }

            Button {
                width: units.gu(10)
                text: i18n.tr("Osvježi")
                onClicked: webview.reload()
            }

            Button {
                width: units.gu(10)
                text: i18n.tr("Naprijed")
                onClicked: webview.goForward()
            }

            Button {
                width: units.gu(10)
                text: i18n.tr("Natrag")
                onClicked: webview.goBack()
            }
        }

        WebView {
            id: webview
            width: parent.width
            anchors.top: controlRow.bottom
            anchors.topMargin: units.gu(1)
            anchors.bottom: parent.bottom

            Component.onCompleted: {
                url = textfield.text
            }
        }
    }
}


Command for determining my public IP? (old question)

The following commands will get you the public IP addresses for your machine:
curl ifconfig.me

curl ifconfig.me/ip

curl ifconfig.me/all


Force ./configure NOT to look in /usr/lib /usr/bin /usr/include

You need to compile any external libraries used as ffmpeg dependencies, such as x264 and libvpx (if you don't want to use the -dev versions from the repository), using a custom --prefix, and may need to use additional options. See ./configure --help for options specific to each library. Then compile ffmpeg telling it where the external libraries are and where you want to install it. See some examples in this thread:

[FFmpeg-user] Compiling ffmpeg with --prefix option


It is possible that you have services running that are getting in the way. On my system, for example, I knocked out network-manager, and networking services.

First, open a terminal window and see what's running:

service --status-all

If the services display with a + they are running. To stop them:

service network-manager stop
service networking stop

See if that is any better for a few sessions. (You might find you need to restart the service.)
If that is the answer, look up how to stop the services from running in the first place (I don't know your specific system).


Running in a VM. How can I access the host computer's files?

The exact steps will vary depending on what VM solution you are using, but the general concept is usually the same. Typically a hidden virtual network is used to enable shared network folder or drive.
How to enable a shared folder in VMware Player:
[Windows 8 - Core X86-64 host][Ubuntu 12.04 - Desktop X86-64 guest]

How to enable a shared folder in Virtual Box:
[Windows 8 - Core X86-64 host][Ubuntu 12.04 - Desktop X86-64 guest]
[Guest Addons must be installed, or the folder won't show up in the guest.]

Additional Information:
How to install vmware tools on Ubuntu guest:
[vmware tools are for vmware obviously]
Step #1 = https://copy.com/8rA1r3VM4iNr/screen_shot_install_vmware_tools_on_ubuntu_guest_1.png
Step #2 = copy.com/GY7LId3Gmbe3/screen_shot_install_vmware_tools_on_ubuntu_guest_2.PNG
Step #3 = copy.com/ZkuU9zwlL7oI/screen_shot_install_vmware_tools_on_ubuntu_guest_3.PNG
Step #4 = copy.com/i7qTUkENFVge/screen_shot_install_vmware_tools_on_ubuntu_guest_4.PNG
Step #5 = copy.com/ckO09RNaECfB/screen_shot_install_vmware_tools_on_ubuntu_guest_5.PNG
Step #6 = copy.com/iEOZTz4Y0gsp/screen_shot_install_vmware_tools_on_ubuntu_guest_6.PNG
Step #7 = copy.com/dThBlFl1gruT/screen_shot_install_vmware_tools_on_ubuntu_guest_7.PNG
How to install guest addons on Ubuntu guest:
[guest addons are for virtualbox]
Step #1 = https://copy.com/gCACBiKIrO8j/screen_shot_install_guest_addons_on_ubuntu_guest_1.png
Step #2 = copy.com/P0kVyO9TGr2r/screen_shot_install_guest_addons_on_ubuntu_guest_2.PNG
Step #3 = copy.com/K0BWcXnRkZDJ/screen_shot_install_guest_addons_on_ubuntu_guest_3.PNG


How to set UEFI on my Ubuntu 12.04 for better performance?

An EFI-mode boot is unlikely to affect Ubuntu's performance once booted. The system might boot a little more quickly in EFI mode, but that's all the performance improvement you're likely to see.

That said, if you want to do an EFI-mode installation, the key is to ensure that your motherboard boots the CD/DVD/flash drive in EFI mode rather than in BIOS mode. How to do this depends on the firmware. Some offer clear and obvious options in their boot screens (usually selected by pressing F8, F10, F12, or some other key at boot time), but others provide few or no options to control the boot mode, which means you can only control this detail by preparing a boot medium that lacks the boot loader for the mode you don't want to use.

As a side note for Geezanansa (and anybody else who may be interested), rEFInd 0.4.6 and later supports booting both EFI-mode and BIOS-mode OSes if your firmware provides appropriate support. The BIOS-mode boot options are disabled by default on UEFI-based PCs (but enabled on Macs), so to use this feature you must edit the scanfor line in refind.conf to scan for BIOS-mode boot options. This feature is still a little klunky, but I've used it to switch between EFI-mode and BIOS-mode boots of Linux. It could be a quick fix if you accidentally install Windows in EFI mode and Linux in BIOS mode -- install rEFInd from Windows and then when you boot, you should see a boot menu giving you both Windows and a generic BIOS-mode boot options. The first will start Windows and the second will launch GRUB 2, which in turn will launch Linux.


Cut the second field delimited by spaces

First we replace each sequence of a repeated spaces using tr -s ' ' then we grab the 3th column:

ps -e | head -5 | tr -s ' ' | cut -d ' ' -f3

3th column because there is a space at the beginning of each line. We can remove that too:

ps -e | head -5 | tr -s ' ' | sed 's/ //' | cut -d ' ' -f2


unity and the tray are not displayed after login

CTRL + ALT + F1 can be used to bring up a terminal. Once you log in press those keys and type in your username and password (the password will not display, just type it in anyway). Once that is done you will have a functioning terminal. Run the command unity. Then press CTRL + ALT + F7 to return to the desktop.

If Unity is still not running then switch back to the terminal (with CTRL + ALT + F1) and see if there was an error, especially in the "Initializing" section, each of those should lines should end with "...done".

Additional Suggestions:

Try running sudo apt-get install compizconfig-settings-manager followed by export DISPLAY=0:0 followed by ccsm then switch to the desktop, if it comes up make sure that the check box next to unity is checked then go to preferences on the left and click reset to defaults. After that restart the computer and try logging in.

Commands that might work:

xhost +localhost
This will add you to the xhosts, I doubt that you aren't in it but probably should try anyway.

/usr/lib/nux/unity_support_test -p
Run this command to check if the computer supports unity, if it doesn't you can't run it. In that case I would click the Ubuntu logo on the login screen and select Ubuntu 2D and try that.

unity --reset

sudo rm /etc/X11/xorg.conf
This will reset your X11 config file.

If all of those fail you can reinstall unity:

sudo apt-get --purge remove unity
sudo apt-get install unity
sudo services lightdm restart

This will reset all of your graphical settings:

gconftool --shutdown
sudo killall -r -I gconf
sudo killall -r -I dconf
rm -rf .compiz* .gconf* .config/dconf/ .config/compiz*

If that fails this will reinstall the graphical portion of Ubuntu.

sudo apt-get install --reinstall ubuntu-desktop

You can try the same thing with compiz:

sudo apt-get install --reinstall compiz


Executing a command in bash, passed as string, with proper file wildcard operation

Use an array, and appropriate quoting. For example, given:

$ ls
file1  file2  file4  file5  file6

then

$ bash -c 'files=(*) ; echo "${files[@]}" ; for file in "${files[@]}" ; do echo "${file/2/3}" ; done'
file1 file2 file4 file5 file6
file1
file3
file4
file5
file6


How do I find out what credentials I need to run a command?

Open a terminal, enter the command :

sudo <command>

You will be asked for a password, it is the same as your log in password. You will not see anything in the terminal as you type your password. That  is normal behavior, just enter your password and hit enter.


Improve full backup speed with Déjà Dup / Duplicity

Found it, Deja Dup overwrites the default duplicity chunk size. The source code explains the advantages and disadvantages:
     // Returns volume size in megs
  int get_volsize()
  {
    // Advantages of a smaller value:
    // * takes less temp space
    // * retries of a volume take less time
    // * quicker restore of a particular file (less excess baggage to download)
    // * we get feedback more frequently (duplicity only gives us a progress
    //   report at the end of a volume) -- fixed by reporting when we're uploading
    // Downsides:
    // * less throughput:
    //   * some protocols have large per-file overhead (like sftp)
    //   * the network doesn't have time to ramp up to max tcp transfer speed per
    //     file
    // * lots of files looks ugly to users
    //
    // duplicity's default is 25 (used to be 5).
    //
    // For local filesystems, we'll choose large volsize.
    // For remote FSs, we'll go smaller.
    if (DejaDup.in_testing_mode())
      return 1;
    else if (backend.is_native())
      return 50;
    else
      return 25;
  }

I managed to compile a custom version of deja-dup. Therefore, I had to do the following steps:

Clone source code
git clone https://gitlab.gnome.org/World/deja-dup.git
cd ./deja-dup

Switch to older branch with gtk3 support for Ubuntu 20.04
git checkout --track origin/40

Patch the return of the get_volsize() funktion in DuplicityJob.vala and increase the version number. Eg.
git apply patch40-7-1.diff

patch40-7-1.diff (0.82 KB):
diff --git a/libdeja/tools/duplicity/DuplicityJob.vala b/libdeja/tools/duplicity/DuplicityJob.vala
index a229e8b0..bb6f77fe 100644
--- a/libdeja/tools/duplicity/DuplicityJob.vala
+++ b/libdeja/tools/duplicity/DuplicityJob.vala
@@ -1399,9 +1399,9 @@ internal class DuplicityJob : DejaDup.ToolJob
     if (DejaDup.in_testing_mode())
       return 1;
     else if (backend.is_native())
-      return 50;
+      return 500;
     else
-      return 25;
+      return 250;
   }

   void disconnect_inst()
diff --git a/meson.build b/meson.build
index 266d7a36..fed8434d 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@
 # SPDX-FileCopyrightText: Michael Terry

 project('deja-dup', ['vala', 'c'],
-    version: '40.7',
+    version: '40.7.1',
     license: 'GPL-3.0-or-later',
     meson_version: '>= 0.47'

Make and install (including installing missing packages):
meson . _build
ninja -C _build
ninja -C _build install

Voilà

Update about performance
I just double-checked the speed of a full backup, it improved like 50% (from 24 to about 12 hours). Unfortunately, that is still not perfect as it packs each package and upload it before it starts the next one. But still better than before...


As the person who wrote this bit of code, I guess I should jump in and explain.

Originally Shotwell developed RAW photos at import time.  This annoyed a lot of photographers who shoot RAW, because it mean imports could take hours to complete!

So we made a couple of changes:

RAW photos would be developed the first time they're opened.
A preference option lets you select between Shotwell developed photos and Camera developed photos, where the camera developer represents embedded JPEGs or the JPEG from a RAW+JPEG pair.

I hope that explains why Shotwell works this way.

Now as to your issue, it seems you've found an interesting workaround.  I'm afraid I can't offer a better solution or workaround, but I would point out that you can select multiple RAW photos and change the developer on all of them at once.


Terminal/Putty showing control characters (^M) after updating

I am not very sure for the reason, but you can type inside vi(m) [in ESC mode]

%s/^M//g

to remove the CTRL M from a file.


How to tell Chrome what to do with a magnet link?

Chrome (or Chromium) protocol handling works differently than in Firefox.  Firefox basically keeps track of all that itself, which is why you can configure protocol handling (like magnet links) in the Applications part of the Preferences.  Chrome, however, relies on xdg-open.

There are a couple things that you need to do before xdg-open will handle magnet links properly.

Find the name of the desktop file of the program you want to handle the magnet link.  Let's suppose the program is Transmission.  It (like usual) has its desktop file in /usr/share/applications/ and in fact, by perusing the listing of the directory, I find that my version of transmission is actually the gtk version, so its desktop file is called transmission-gtk.desktop.
It's possible the desktop file is messed up.  So you can check that /usr/share/applications/transmission-gtk.desktop contains the lines:

Exec=transmission-gtk %U
[some lines omitted]
MimeType=application/x-bittorrent;x-scheme-handler/magnet;

Note the %U in the Exec line.  It's absolutely necessary.  The MimeType line should look as above.
Now for the essential step to tell xdg-open to open magnet links using Transmission.  In the terminal, type:

xdg-mime default transmission-gtk.desktop x-scheme-handler/magnet

(Step not necessary if you use Gnome, KDE, Xfce, or LXDE) Lastly, xdg-open assumes you are running one of the standard desktop environments:   gnome, kde, xfce and lxde.  If you are not, xdg-open will not work on magnet links.  As suggested on the Arch wiki, you can simply modify /usr/bin/xdg-open.  At the end of the file, you'll find a portion that starts with:

detectDE
if [ x"$DE" = x"" ]; then
   DE=generic

change generic to one of gnome, kde, xfce, or lxde.  I chose xfce since I actually have an Xfce session that I've configured and use on occasion.

The downside to this approach is that if xdg-open gets updates, you'll have to redo this.  The Arch wiki suggests another approach that avoids this flaw (but has its own downside).

Warning: The choice in the last step is more important than it might seem.  Picking lxde did not work for me!  In xdg-open, the helper function open_lxde relies on pcmanfm (lxde file manager) and something is wrong with either the code in open_lxde or perhaps it's pcmanfm's fault.


First you will need to extract the .deb to a temporary directory (tmpdir).
dpkg-deb -x example-latest.deb tmpdir

Then we are going to pull the control file that is located in the tmpdir/DEBIAN/ folder. This is where you will make your dependency changes.
cd tmpdir
dpkg-deb --control example-latest.deb

Edit the tmpdir/DEBIAN/control file
vim tmpdir/DEBIAN/control

Change the package name:
packages: myname

After you have edited your control file you will need to repackage your .deb with this command.
dpkg -b tmpdir new-name-of-package.deb

Install the package and then you can run
dpkg -i new-name-of-package.deb
apt install myname

Source: https://forums.linuxmint.com/viewtopic.php?t=35136


Can't Connect to University Wireless Network

I managed to find, in the Math Department's website, a Linux instruction guide for connecting to the campus wireless. It was basically super stupid simple, but it worked.


rinzwind@discworld:~/SmartBear/soapUI-4.6.0$ ls
bin          jre       LICENSE.txt  soapUI-4.6.0.desktop  UserGuide.url
hermesJMS    lib       README.md    soapUI.url            wsi-test-tools
JavaDoc.url  licences  readme.txt   uninstal

See the file named uninstall? ;)

rinzwind@discworld:~/SmartBear/soapUI-4.6.0$ ./uninstall
testing JVM in /home/rinzwind/SmartBear/soapUI-4.6.0/jre ...


You cannot do this as a normal usr with the default file manager that comes with Ubuntu 18.04 and later. The behaviour of how progress is shown, has changed since older versions. The posts you linked to all refer to older versions.


Ubuntu 16.04 and vim-youcompleteme plugin install fail

Installation process of YouCompleteMe has been modified. Use the instructions provided in the GitRepo Help file.

  Make sure you have Vim 7.4.143 with Python 2 or Python 3 support. Ubuntu 14.10 and later have a Vim that's recent enough.

  Install YouCompleteMe with Vundle.

  Remember: YCM is a plugin with a compiled component. If you update YCM using Vundle and the ycm_core library APIs have changed (happens rarely), YCM will notify you to recompile it. You should then rerun the install process.

  Install development tools and CMake.

sudo apt-get install build-essential cmake

  Make sure you have Python headers installed.

sudo apt-get install python-dev python3-dev

  Compiling YCM with semantic support for C-family languages:

cd ~/.vim/bundle/YouCompleteMe
./install.py --clang-completer

  Compiling YCM without semantic support for C-family languages:

cd ~/.vim/bundle/YouCompleteMe
./install.py


How do I install miniconda/anaconda on ARM systems?

You can install miniconda to armv7 as shown in this post:

https://stackoverflow.com/questions/39371772/how-to-install-anaconda-on-raspberry-pi-3-model-b

Then use "conda" as per norm package management.  It is definitely not as smooth as anaconda for nix64, but many packages are built in alternate channels as "anaconda search -t conda " will show you.


Access Prompt keeps asking for GMail password

Evgeni Leshtanski's answer clued me in to what was really happening. The question isn't, "How do I tell some random prompt what my password is?" but rather, "What is going on?"

In my case -- and this probably affects a lot of people -- the underlying culprit was Empathy. I don't use Empathy, so I don't want it to authenticate to Google Talk on my behalf. Now here's where it gets interesting. When I followed Evgeni's lead and ran Online Accounts (under System Settings), it was completely unpopulated. That's because it auto-populates when apps that hook in to Online Accounts update credentials. Since I never filled in that Access Prompt dialog box, this never happened and I had nothing to change.

The key action that's leading this behavior on startup is that Empathy defaults to "Automatically connect on startup" even if you don't actually use it. So run Empathy, go to Preferences, and under the General tab, uncheck "Automatically connect on startup".

In my particular case, I had to also stop Evolution from checking my Gmail account before this dialog box went away completely.


Bad wifi connection Intel Corporation Centrino Advanced-N 6235

Reboot your computer then try the parameter this way:

echo "options iwlwifi 11n_disable=1" | sudo tee -a /etc/modprobe.d/iwlwifi.conf
sudo modprobe -rfv iwldvm
sudo modprobe -rfv iwlwifi
sudo modprobe -v iwlwifi


How to install "intel graphics driver installer " in Ubuntu 12.04 LTS?

The official Intel Linux Graphics Installer is now no longer supported for 12.04 (support for 13.04 will end when 13.10 is released).

Near the bottom of this link, it is said that:

  Ubuntu* 13.04 was released in late April 2013. Support for Ubuntu* 12.04 effectively ended when the Intel® Linux* Graphics Installer version 1.0.1 was released (20 May 2013).

Unless you have a specific reason for using the latest drivers, your system should work fine with the default drivers.

The Intel Linux Graphics Installer for 12.04 is no longer supported and using it is discouraged.

The 12.04 repo could be manually added (it's still hosted here), but it will not be updated to the latest version and may be removed without notice. Adapt the instructions here if you still want to use the outdated 12.04 repo (not recommended).


Installing Intel iwlwifi firmware for UNCLAIMED Wireless 8260?

Fixed my own problem

When I saw that the drv.c file was exactly how it should have been, I got frustrated and stopped. Turns out this was a good thing and I needed to keep following instructions. I then finished the fix by running the commands to actually install the backport that I learned about from the above linked post in my question.

cd ~/Desktop/backports-20150923
make clean
make defconfig-iwlwifi
make
sudo make install

This and a reboot was all I needed to get the wireless drivers perfected


Cannot find how to disable a screensaver

Go to Settings > System Settings > Desktop > Screensaver to turn off the screensaver.