You've got a unsupported version of Wine already and that doesn't seem to be working for you so I'd suggest another unsupported version from the ubuntu-wine PPA. The repo has taken to adding Pulseaudio patches for Wine so that the sound is much more reliable. It's the version I've been using for ages and it does Just Work™ 99% of the time.

Unfortunately for you the PPA doesn't support Lucid any more but you can grab the for-Oneiric packages directly from:

http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu/pool/main/w/wine1.5/?C=N;O=D

If you're on a 32bit install you want the two files:

[ ] wine_1.5.13-0ubuntu1_i386.deb       14-Sep-2012 21:02   916
[ ] wine1.5_1.5.13-0ubuntu1_i386.deb    14-Sep-2012 21:02   1.0M

Or if you're on 64bit:

[ ] wine_1.5.13-0ubuntu1_amd64.deb      14-Sep-2012 21:02   918
[ ] wine1.5_1.5.13-0ubuntu1_amd64.deb   14-Sep-2012 21:02   1.1M

Obviously those filenames will change with time but the concept is you want a wine_<full-version>.deb and a wine<major-version>_<full-version>.deb file. The first depends on the second and is there to fulfil dependencies for other things that require wine.

Anyway, download what you need. Open a terminal, cd to where they downloaded and run sudo dpkg -i wine*.deb (assuming there are no other Wine debs lying around - delete them if there are).


External sound card Scarlett 2i2 not playing sound

In qjackctl connections , try to connect left side Pulseaudio jack sink to the last "system playback"   (right side) which is probably your 2i2 soundcard:
This can be be done by drag and drop from left item to desired right item,
or using "connect" or "disconnect" buttons after selecting items.


NIC Teaming under Ubuntu 16.04 - Can only ping DNS servers and nothing else

Ultimately the fix for this was to edit my resolv.conf file. Once I did this, I rebooted the server, and voila! Magic!

Thanks for all the help on this. For anyone who needs it, this will get you two NICs bonded together in a working LAG. Make sure your switch it setup for LACP also.

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet manual
bond-master bond0

# The secondary network interface
auto eth1
iface eth1 inet manual
bond-master bond0

# Bonding eth0 & eth1 to create bond0 NIC
auto bond0
iface bond0 inet static
address 10.0.0.90
netmask 255.255.255.0
network 10.0.0.0
broadcast 10.0.0.255
gateway 10.0.0.250
dns-nameserver 10.0.0.250 8.8.8.8 8.8.4.4
bond-mode 4
bond-miimon 100
bond-slaves all


Kubuntu 16.04 hybrid amd graphics card blank window

I don't know if this is related or not, but 16.04 (all flavors) drops a lot of support for AMD cards.

"There’s good and bad news for AMD graphics users. Ubuntu 16.04 LTS will support AMD’s new AMDGPU graphics driver architecture, which should help close the gap with Nvidia’s exceptional Linux drivers. Unfortunately, Ubuntu 16.04 LTS no longer supports the current AMD Catalyst driver, also known as “fglrx.” AMD graphics card users may want to stick with Ubuntu 14.04 until AMDGPU has matured. That is, if you’re using the card for gaming or other demanding chores. AMD graphics will work just fine if you’re performing standard desktop activities."

I see you're using AMDGPU--this could be part of the "immaturity" this quote refers to....

http://www.pcworld.com/article/3058857/linux/ubuntu-1604-lts-gives-fans-new-reasons-to-love-this-popular-linux-desktop.html


Recursively list the files in a specific directory and order according to size

Sure you can, just add -S option to ls

ls -R -S -l /path/to/folder

I have also add -l, to show size of files.

There are also command tree, more human friendly. It need to be installed by sudo apt-get install tree

tree -h --sort=size /pathtofolder

leonid@DevSSD:~$ tree -h --sort=size / |head -n 10
/
├── [4.0G]  swapfile
├── [3.2M]  core
├── [ 64K]  swap64k
├── [ 16K]  lost+found [error opening dir]
├── [ 12K]  etc
│   ├── [152K]  ld.so.cache
│   ├── [ 53K]  mailcap
│   ├── [ 24K]  mime.types
│   ├── [ 19K]  services


If you want to code on your CPU/GPU the AMD guide is probably a good place to start. To get the OpenCL drivers working on a computer with an AMD APU/GPU you simply need to install the fglrx driver from the software center. To test that its working and to write code you may also want the AMD APP SDK.

I used version 3.0 of the SDK from the AMD site.
The install guide is here.
Once you have it you can follow their programming guide.

Here is one of the early examples modified to simply print out the number of compute units on your machines GPU:

            //
            // Copyright (c) 2010 Advanced Micro Devices, Inc. All rights reserved.
            // Modified by Aedazan for learning purposes.
            // Uploaded as fair use teaching material 17 U.S. Code § 107.
            // A minimalist OpenCL program.
            #include <CL/cl.h>
            #include <stdio.h>

            #define NWITEMS 512

            // A simple memset kernel

            //const char *source = "__kernel void memset( __global uint *dst ) \n" "{ \n" " dst[get_global_id(0)] = get_global_id(0);  \n" "} \n";
            const char *source = "__kernel void memset( __global uint *dst ) " "{ " " dst[get_global_id(0)] = get_global_id(0)*get_global_id(0);"
            ""
            "\n" "} \n";

            int main(int argc, char ** argv)
            {
            // 1. Get a platform.
            cl_platform_id platform;
            clGetPlatformIDs( 1, &platform, NULL );
            // 2. Find a gpu device.
            cl_device_id device;
            cl_uint compute_units;
            clGetDeviceIDs( platform, CL_DEVICE_TYPE_GPU,1,&device,NULL);
            clGetDeviceInfo( device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(cl_uint), &compute_units, NULL);
            printf("Compute units: %d\n", compute_units);

            // 3. Create a context and command queue on that device.
            cl_context context = clCreateContext( NULL, 1, &device, NULL, NULL, NULL);
            cl_command_queue queue = clCreateCommandQueue( context, device, 0, NULL );
            // 4. Perform runtime source compilation, and obtain kernel entry point.
            cl_program program = clCreateProgramWithSource( context, 1, &source, NULL, NULL );
            clBuildProgram( program, 1, &device, NULL, NULL, NULL );
            cl_kernel kernel = clCreateKernel( program, "memset", NULL );
            // 5. Create a data buffer.
            cl_mem buffer = clCreateBuffer( context, CL_MEM_WRITE_ONLY, NWITEMS * sizeof(cl_uint), NULL, NULL );

            // 6. Launch the kernel. Let OpenCL pick the local work size.
            size_t global_work_size = NWITEMS;
            clSetKernelArg(kernel, 0, sizeof(buffer), (void*) &buffer);
            clEnqueueNDRangeKernel( queue,
            kernel,
            1,
            NULL,
            &global_work_size,
            NULL, 0, NULL, NULL);
            clFinish( queue );
            // 7. Look at the results via synchronous buffer map.
            cl_uint *ptr;
            ptr = (cl_uint *) clEnqueueMapBuffer( queue, buffer, CL_TRUE, CL_MAP_READ, 0, NWITEMS * sizeof(cl_uint), 0, NULL, NULL, NULL );
            int i;
            for(i=0; i < NWITEMS; i++)
            //printf("%d %d\n", i, ptr[i]);
            return 0;
            }

You can compile it with the following line. It assumes you installed the SDK as root into the default locations.

gcc -o computec.bin -I /opt/AMDAPPSDK-3.0/include/ -L /opt/AMDAPPSDK-3.0/lib/x86_64/ test.c -lOpenCL


How to disable webmin start on boot on Ubuntu?

You can either manually edit the scripts but the best way is to run

sudo update-rc.d webmin enable

and all the required entries will be made cleanly - less risk of breakage of essential startup scripts.

and the reverse to disable

sudo update-rc.d webmin disable


How to fix black screen whenever a game starts?

I know about Minecraft, but not Counter Strike, sorry. Download the minecraft.jar from here. Put it on your Desktop. Right click and make a new document called "minecraft". Inside it, type this:

#!/bin/sh

java -Xms512M -Xmx512M -jar minecraft.jar nogui

Open your Terminal and do these following commands:

cd ~
cd Desktop
chmod a+x minecraft

The file called "minecraft" should be an executable, and open it up. Run it, and you should be able to play.


Kubuntu Certain Programs Become Unoperable After Update?

Turns out the update had nothing to do with this particular issue. As pointed out in the question glib was causing the issue. I went to their Launchpad and downloaded the latest glib tar.xy for my version of Kubuntu and compiled and installed it. This solved the issue.


what is process avpppnvxrk? its using high cpu

Sounds to me like your server was compromised. Malware often uses random process names to escape detection, which would explain why none of your searches turned anything up and why dkpg didn't know about it.

You need to wipe the server clean and reinstall a fresh copy. You mentioned you were using an older version of Ubuntu. Make sure you keep the new install up to date!  Tons of security fixes come through the pipes every week. If you don't get those updates something like this will eventually happen. Hopefully you've been keeping good backups of any important data, because you can't trust any of it now.


Deleted files from my home folder. How to recover them?

If you only moved files into the trash, rather than actually deleting them, you will be able to restore your files by opening your file manager and browsing to the 'Trash folder'. When you open Trash you should be able to see your files. Right click on them and 'Restore' them they will appear back where they were prior to deleting them.


How do I compress a directory auto use directory name?

Open your .bashrc file with your editor and add this line:

   function tardir() {
        tar -zcvf $1.tar.gz $1
        return $?
   }
   export -f tardir

Save .bashrc and run this command:

  source .bashrc

Now you should call your function as command:

  tardir XXX

You can add more bash code in order to check if tar file already exists or if XXX exists and so on, as you like.


Disable screensaver while watching flash videos

Use caffeine, there is absolutely no need to patch flash player, that is way too much work when you can just install caffeine. When you run caffeine it will be in your notification area, a little coffee cup, when you want to watch a video just click on the icon and go to 'disable screen saver'. I use this all the time when I watch videos on the net. When you are done you can just click on the icon again and go to 'enable screen saver'.

https://launchpad.net/~caffeine-developers/+archive/ppa


Is it possible to encrypt the communications via netcat?

It's possible - however I don't think nc does this itself: echo "Words" | gpg -e will produce an encrypted version on stdout; you can specify a receiving user as per usual.
If you pipe this to another copy of gpg as gpg -d then it asks for a passphrase - this will be remembered for a period, so enabling a conversation.

Therefore, echo "words" | gpg -e | nc target 4321 will send, and nc -l 4321 | gpg -d will listen.

Also, see this question which is similar.


how to get separate x screen multi-monitor working

The same exact thing just happened to me.  I looked in /etc/X11, and I believe my xorg.conf file was renamed to xorg.conf.MMDDYYYY where MMDDYYYY were set to today's date (the day I did the upgrade).

I copied this xorg.conf.MMDDYYY file to /etc/X11/xorg.conf, rebooted, and my 2nd monitor returned to life.  Maybe you won't have as easy a time, but this worked for me.


Ubuntu 18.04's installation/boot freezes

I found that Kubuntu 14 on another USB key worked.
I then downloaded the newest iso of Ubuntu being Ubuntu 20.04.
I then used Startup Disk Creator on an USB key laying around with another computer.
Then, with the USB key with Ubuntu 20.04, it worked!
I'm unsure of what happened. I guess there could have been some corruptions on the downloaded iso.
Also, for some computers, the issue could be that the CPU is a 32-Bit one, so it's better to check that before, and take the right OS for it.


How to make XF86Explorer my new Super key

Open the file ~/.Xmodmap

nano ~/.Xmodmap

Place your mapping, eg.:

keycode 152 = Super_L

Test it

xmodmap ~/.Xmodmap

Open the file ~/.xinitrc

nano ~/.xinitrc

Add the lines below

if [ -s ~/.Xmodmap ]; then
    xmodmap ~/.Xmodmap
fi

Logout and re-login

If ~/.xinitrc does not work then use ~/.profile in step 4 and repeat step 5.


How to find all the driver packages installed in my pc?

The drivers are for the most part of the kernel. Some are built in but the majority are build as modules and loaded as needed.

You can list the modules in use with

lsmod

You can see all the modules with

ls -R http://www.bios-mods.com/kernel-version/

The discussion can become a bit technical, see : http://www.tldp.org/LDP/tlk/

If you have drivers outside of those locations, in a non-standard location, we would be guessing where you put them.


I never succeeded in making it work with touchegg. But there is an easy way to achieve it with another tool. Here are the steps:
At first download, compile libinput-gestures and install from git repository:

git clone http://github.com/bulletmark/libinput-gestures
cd libinput-gestures
sudo make install

Make sure libinput-tools and xdotool are installed:

sudo apt install libinput-tools xdotool

Make sure current user is in the input group to have permission to read the touchpad device:

sudo gpasswd -a $USER input  # Log out and back in to assign this group

Start libinput-gestures on every start up:

libinput-gestures-setup autostart

Now you can change your virtual workspace by swiping up an down. If you want to make some custom configuration, you should copy the configuration file to your home folder. You can then change it there.

cp /etc/libinput-gestures.conf ~/.config/libinput-gestures.conf
nano ~/.config/libinput-gestures.conf

Have a look at the git repository for further documentation: https://github.com/bulletmark/libinput-gestures

Don't forget to logout then login to see the changes taking effect.


Considering you added the programs to autostart yourself then they would be located in /home/<user>/.config/autostart as .desktop files. you can copy all the files for your backup. To restore you can return them to that same location. For them to work, the application they are pointing to must be installed.

If you use lubuntu another location where autostart program/commands can be found is inside the file  /home/<user>/.config/lxsession/Lubuntu/autostart.


Files disappeared in ntfs partition using Ubuntu 11.10

This may be caused by Windows "synchronising" its hibernation image with the changed filesystem state.

Have a look at this question

The solution would be not to use hibernation in Windows. Ubuntu is not at fault :)


One of the things that I noted when I installed recently was that even though it deploys openstack on 18.04, it still needs an 16.04 image in order to launch an use juju.  This is not the case if you just use juju (juju uses 18.04) and not conjure-up.

Update: just tried to install again (dec 31, 18) and now it is using 18.04 like it should.


How to install libc6-i386 libc6-dev-i386 on Linux Ubuntu 18.04 32bit Virtual Machine?

You have to update your package lists first by
sudo apt-get update

And then install the packages by
sudo apt-get install libc6-i386 libc6-dev-i386


I can't install Pantheon Greeter in Ubuntu 14.04

In my search  libgranite3 (>= 0.2.0) not available for 14.04

refer here

so before installing pantheon  we need to add the following PPA(that will install  libgranite3):

Open terminal and run the following commands in terminal

sudo add-apt-repository ppa:elementary-os/daily
sudo add-apt-repository ppa:elementary-os/os-patches
sudo apt-get update
sudo apt-get install pantheon-greeter

Note: Remove the PPAs after installation

For reference here

RESULT AFTER TESTING

sudo apt-get install pantheon-greeter
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
gir1.2-json-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  apport-hooks-elementary contractor libatk1.0-0 libatk1.0-data libcairo2
  libgail-3-0 libglib2.0-0 libglib2.0-bin libgranite-common libgranite3
  libgtk-3-0 libgtk-3-common libpango-1.0-0 libpango1.0-0 libpangocairo-1.0-0
  libpangoft2-1.0-0 libpangoxft-1.0-0 libwayland-client0 libwayland-cursor0
 numlockx
The following NEW packages will be installed:
  apport-hooks-elementary contractor libgranite-common libgranite3 numlockx
  pantheon-greeter
 The following packages will be upgraded:
  libatk1.0-0 libatk1.0-data libcairo2 libgail-3-0 libglib2.0-0 libglib2.0-bin
 libgtk-3-0 libgtk-3-common libpango-1.0-0 libpango1.0-0 libpangocairo-1.0-0
  libpangoft2-1.0-0 libpangoxft-1.0-0 libwayland-client0 libwayland-cursor0
    15 upgraded, 6 newly installed, 0 to remove and 119 not upgraded.
Need to get 11.5 MB of archives.
   After this operation, 29.7 MB of additional disk space will be used.
Do you want to continue? [Y/n]


Gedit external tools plugin failed to load

As written here, try installing gir1.2-gtksource-3.0.
It worked for me.

sudo apt-get install gir1.2-gtksource-3.0


16.04 with nouevau driver does not let me set native resolution for monitor to 2560x1080

Using the nouveau in 16.04 seems not to support that resolution, however I installed ubuntu 16.10 beta 2 and the resolution solved itself.


Is there a way of automatically suspending processes that are running in unfocused workspaces?

No one seems to have answered your question so i will give you at least a bit of what you are asking for.

I don't believe there is really any way of suspending it automatically depending on what work space it is on. Or that it always be a good idea. What if you are streaming music or downloading a file? The TCP connection will hang and the server drop it after a while.

There are commands you can use that might get you in the right direction of "semi-automation"

running the command:

kill -STOP pidOfProgram

will background / stop the process.

kill -CONT pidOfProgram

will foreground / return it to its previous state

Pids change though. If you want to use it in a script (so you can bind it to a key combination for example)
you could try using use this:

kill -STOP `pgrep -o chrome`

to background
    kill -CONT pidof -o chrome
to resume


Need to add ssh again and again on Godaddy server

You could either move SSH agent to your PC and use Agent Forwarding, or not use a SSH agent at all.

Using SSH Agent on your PC and agent forwarding instead of SSH Agent on the server

You can store your SSH private key for accessing Git on your PC (instead of on your server), and use SSH Agent Forwarding.

SSH Agent Forwarding is a feature of SSH, which allows access from your GoDaddy server to your PC's SSH agent through your SSH (PuTTY) connection.
With SSH Agent Forwarding you do not need to start separate SSH agents on different machines, but only once and then 'forward' it to any machine you want to use SSH keys on.

Pageant is a SSH agent implementation that comes with the PuTTY suite.

To set it up:

Start Pageant on you Windows PC
(put a link into your 'Startup' folder to start it automatically when logging in to Windows)
add the SSH private key you use for accessing Git to Pageant
In PuTTY, edit the Saved Session for your GoDaddy server: Check "Allow agent forwarding" (under Connection -> SSH -> Auth)
Connect to your GoDaddy server using PuTTY with this session configuration you just adjusted
to confirm SSH Agent Forwarding now works: Run ssh-add -l on your GoDaddy server

Relevant sections in PuTTY's documentation:

Using agent forwarding
Getting started with Pageant

Using Git with SSH public key authentication but no SSH agent

SSH client's (incl. Git) will per default look for keys ~/.ssh/id_rsa, ~/.ssh/id_dsa a.s.o.

If you rename your private and public keys to ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub (replace rsa with the key type you are using if it is not RSA)., your git should try those directly - without the need for ssh-agent.


Because, you installed it manually from source. It should declared .pc file in one of the directories or through environment variable.
man pkg-config
pkg-config retrieves information about packages from  special  metadata
       files.  These  files  are named after the package, and has a .pc exten‐
       sion.   On  most  systems,  pkg-config  looks  in   /usr/lib/pkgconfig,
       /usr/share/pkgconfig,     /usr/local/lib/pkgconfig     and     /usr/lo‐
       cal/share/pkgconfig for these files.  It will additionally look in  the
       colon-separated  (on  Windows, semicolon-separated) list of directories
       specified by the PKG_CONFIG_PATH environment variable.

Just make sure you have installed opencv not just copied its shared lib to python. I expect default installation put .pc file in /usr/local/lib/pkgconfig/


Eclipse always starts with /root/workspace

Go under preferences then type "workspace" in the search box provided
to filter the list. Alternatively you can go to General>Startup and
Shutdown>Workspaces.
There you can set a flag to make Eclipse prompt you to select a
workspace at startup by checking the "Prompt for workspace at
startup" checkbox.
You can set the number of previous workspaces to remember also.
Finally there is a list of recent workspaces. If you just remove all
but the one you want Eclipse will automatically startup with that
workspace.


To create a clean installation, you will need an USB, Ubuntu or Ubuntu based ISO, and your current PC. This can be also done in windows too.

Linux Way:
Download the I so and go into a partition manager and make sure to format the USB to fat32. This is need to prep our installation media. Next, download the iso from Ubuntu or another based distribution. In Ubuntu there is a startup live CD/USB creator installed by default. Go into that program and locate the iso. Now select your USB and let the program extract the files. Once done; restart and it should automatically boot. If it didn't, on the bios splash screen, it should be f12 to go into other devices and select the USB/CD. You can then follow the setup and choose to wipe the entire drive.

Windows way:
Everything is same except you need a program called Linux Live USB creator. Download it and select ISO and USB (make sure its formatted to FAT32) It will do the same thing and just reboot to boot into your Live USB.

Hope this helps and if you have any questions leave a comment below :)


Print with other user on network printer (CUPS)

I believe I solved your problem, my answer is here. Short version: set the "billing info" in the "print menu/jobs".


How do I make the Panel and Window Decorations appear on a second monitor?

These bugs might be relevant: #779867, #711456, #779124

Alternatives are to try Twinview Cloning or Ubuntu Classic.

There are workarounds for fullscreen flash depending on the source.


Internet connection drops on ubuntu 14.04 (TP-Link TLWN821N v4 )

I have had the same issues with the 8192cu until I installed the dkms driver via https://github.com/vincent-t/rt8192cu_dkms

Now the connection is fast and stable.


How can I repeat the content of a file n times?

You don't need input-duplicated.txt.

Try:

mycommand <(perl -0777pe '$_=$_ x 1000' input-data.txt)

Explanation

0777 : -0 sets sets the input record separator (perl special variable $/ which is a newline by default). Setting this to a value greater than 0400 will cause Perl to slurp the entire input file into memory.
pe : the -p means "print each input line after applying the script given by -e to it".
$_=$_ x 1000 : $_ is the current input line. Since we're reading the entire file at once because of -0700, this means the entire file. The x 1000 will result in 1000 copies of the entire file being printed.


Which bash shortcuts/tips are available?

Output management

Shift+PageUp/Shift+PageDown - Scrolling the terminal output. This is very handy when using an tty: in Gnome Terminal works the same way as dragging the scroolbar.
Ctrl+s - Pauses the output: the command keeps running, only their output stops.
Ctrl+q - Resume the output: when output is paused, this will make the command show their output again.
Ctrl+l - Clear terminal output.

Prompt text manipulation

Ctrl+u - Deletes all the text currently typed in the prompt.
Ctrl+k - Deletes all the text from the right of the cursor
Ctrl+w - Deletes a word, from right to left.
Ctrl+a - Move to the beginning of the text.
Ctrl+e - Move to the end of the typed text.
Ctrl+Left/Right arrow - Move to the beginning/end of the previous/next word.

Command execution

Tab - Lists available commands from the typed text.
Up/Down arows - Shows previous/next command executed.
Ctrl+r - Searches the last command executed from the given text.
Ctrl+c - Stops the current command.
Ctrl+z - Sends the program to the background. Can then be managed using fg/jobs.
Ctrl+d - Logs out from the current terminal. Similar to typing exit.


How to complete uninstall git from Ubuntu Desktop 12.04?

you can use this command:

sudo apt-get remove git


Can't Open Gnome-Control-Center in Ubuntu 18.04 - Some library is missing

I found a solution to my question. Here, is it:

sudo apt install --reinstall libwbclient0


How can I host a website in a virtual machine?

The procedure is basically as follows: you need to create a "virtual" network adapter on your host machine, with its own IP address (yes, it is possible for a physical network card to have multiple IP addresses) and then set up VirtualBox guest so it binds to that adapter. This way the guest gets its own IP address which is visible in your local network just as if it was a physical machine.

This is called "bridged networking", and after you set up your host system, setting up the guest is just a matter of going to the guest's Settings - Network and selecting "bridged adapter" from the Attached to: dropdown.

Now, I never did this with a Windows host, but here appear to be some instructions here. Also, now when you know the "magic word" - google is full of information.


Here is how to prevent apm actions on /dev/sdb.

Run the following commands. Set to 254 or 255 depending on your manufacturer and based upon the gathered results from running the command:

sudo smartctl -A /dev/sdb | grep Cycle

These numbers should not change if apm is disabled while your computer is on and has not been turned off or hibernated.

Here, I will provide an example for the 254 option as I have seen that in most instances, it is necessary to use this option as 255 does nothing to prevent apm from non-hdparm applications or code or whatever.

sudo hdparm -B 254 /dev/sdb*
echo "/dev/sdb* {" | sudo tee -a /etc/hdparm.conf
echo "  apm = 254" | sudo tee -a /etc/hdparm.conf
echo "  apm_battery = 254" | sudo tee -a /etc/hdparm.conf
echo "}" | sudo tee -a /etc/hdparm.conf
sudo sed -i 's/#apm = 255/apm = 254/g;s/#apm_battery = 127/apm_battery = 254/g' /etc/hdparm.conf


How can I access Google Scholar in w3m through ssh?

Solved by add this line to /etc/hosts:

2404:6800:4008:c06::be scholar.google.com


Ubuntu 12.04 LTS does not boot with enabled IDE controller

Download a copy of boot-repair-disk that matches your architecture

And burn it to CD or make a bootable USB out of it (according to the instructions at the link above).

Boot your computer using the disk, and run the boot-repair program.


How can I insert a Bash variable using the Gedit Snippets plugin?

You must simply edit your snippet and escape the $ in Gedit's snippet manager with a \ backslash, just as you can see in the screenshot below.

That way the $LINENO will not be evaluated by Gedit Snippets, but inserted literally.


How to make the TV tuner in the Dell Mini 1010 work?

Take a look at these answers, referring to TvTime and MeTV, of which my favorite is the TvTime, that is working like a charm in the majority of the TV Tuners that I have tested, PCI, PCI-X, USB.

How to scan for analog cable channels on a DVB-T USB tuner?
Can anybody help me to make Kworld UB445-Q TV tuner work?

Dropping tvtime --help in a terminal will provide you with enough information about tvtime available parameters. Drop man tvtime and you will have a more informative help text.

If you experience problems after trying tvtime, please drop in your original question the results of tvtime if an error appears. Additionally, try adjusting the parameters to what better fits your incoming TV signals, such as the proper device where to gather signals from, tv aspect ratio, etc. if you experience Audio issues when trying TVTime (which I can bet you won't), drop the

tvtime | arecord -D hw:1,0 -r 48000 -c 2 -f S16_LE | aplay -

in a terminal and let's see what happen.

You may wish to make sure what your video device is but you can also try gathering signals from different devices, using the --device parameter, which will make tvtime terminal's command look like:

tvtime --device=/dev/video0 | arecord -D hw:1,0 -r 48000 -c 2 -f S16_LE | aplay -

Change /dev/video0 for /dev/video1...video2, etc. according to your input device. It is all about to play with the parameters and you will have TV Signals working like a charm in your computer.

If you need further information don't hesitate to drop a comment.

Good luck!


Setting swappiness in /etc/sysctl.conf and /etc/sysctl.d/ doesn't persist after reboot

Suggest you make a sysctl.d(5) configuration file so the configuration is set at boot time, with contents similar to:

/etc/sysctl.d/99-swappiness.conf
vm.swappiness=10


What security context software does Ubuntu use?

Ubuntu uses AppArmor, a SELinux alternative.

Wikipedia gives some hints on why some people think AppArmor is better than SELinux:

  AppArmor is offered in part as an alternative to SELinux, which critics consider difficult for administrators to set up and maintain. Unlike SELinux, which is based on applying labels to files, AppArmor works with file paths. Proponents of AppArmor claim that it is less complex and easier for the average user to learn than SELinux. They also claim that AppArmor requires fewer modifications to work with existing systems: for example, SELinux requires a filesystem that supports "security labels", and thus cannot provide access control for files mounted via NFS. AppArmor is filesystem-agnostic.

Ubuntu ships many AppArmor profiles for core applications. You can find them in /etc/apparmor.d/. If you need to edit the default profiles, you can override settings from /etc/apparmor.d/local/.

Ubuntu also ships some so-called "abstractions", which are ways to help you write your own AppArmor profiles quickly without repeating yourself (the famous DRY principle).

One thing that is important to note is that the AppArmor profile for Firefox is disabled by default, because it might be too restrictive for many users. You can however enable it as described on the documentation:

sudo aa-enforce /etc/apparmor.d/usr.bin.firefox

If you want to go with SELinux, you are free to disable AppArmor and install the selinux package. Note however that the default configuration for SELinux in Ubuntu is not much restrictive, so you have to configure it yourself.


How can I direct gnome-tweak-tool to list extensions alphabetically?

I don't consider myself a pro python coder, so this may not be the most efficient way to go.  In fact, I had to do some research for sorting because it's been a while since I've used python.

If you open /usr/share/pyshared/gtweak/tweaks/tweak_shell_extensions.py, and add the following import at the top of the file:

from operator import itemgetter

Then at the bottom of the script, modify the try block to sort extensions (around line 154):

        try:
             #add a tweak for each installed extension
             extensions = shell.list_extensions().values()
             for extension in sorted(extensions, key=itemgetter('name')):


Chrome and chromium freeze and stutters on fresh install Ubuntu 20.04

I had the same issue and disabling the hardware acceleration in Chrome fixed it for me.
To disable hardware acceleration in Google Chrome:

Open Google Chrome.
Go to Settings.
Click on Show advanced settings and scroll to the System section.
Uncheck Use hardware acceleration when available and restart Google Chrome.


my macbook pro will not let me have ubuntu...please help!

Here is the ubuntu's official document to prepare install Ubuntu on Mac. You have to install a different hybrid bootloader called  "rEFIt" which is a boot menu and maintenance toolkit for EFI-based machines like the Intel Macs. You can use it to boot multiple operating systems easily, including triple-boot setups with Boot Camp. It also provides an easy way to enter and explore the EFI pre-boot environment.

Just be careful while you wipe the Mac HDD to not to use the all space. I had my old mac mini (early 2006) which does not support the internet recovery and I made it working with Ubuntu however now it's almost a brick, since it doesn't boot into ubuntu (after latest update) and doesn't recognize the latest installation media. Last option will be to replace the HDD and do a fresh install.

Alternatively, you can use virtual box or VMWare Fusion to run Ubuntu. It runs like a tiger without any problem.

Good Luck.


Can you save workspaces in Ubuntu 20.04?

I dont have a direct solution, but a workaround is to use a Virtual Machine with ubuntu installed, and use ubuntu's workspaces from there.
When you shut down a virtual machine you can select to save the current state of the machine.
And, in the virtual machine you can have your normal ubuntu workspaces, which will be saved.
You can scroll bottom right in your vm to change workspaces

That way, when you restart the VM, you will have it as you left it.


Unable to login through GUI as a user but I am able to login via terminal

Well, by the look of your output for ls -l /home/user/.Xauthority shows that the file is owned by root where it is supposed to be user. In your case, it should be george. Moving the file or giving permission to its origin user would fix if I'm not mistaken. Anyhow, please follow below steps by logging in via terminal;

Log in as the user (as goerge) & change to the user's home directory

cd /home/user                 # in your case, its /home/george

or even a single cd ~ command will take you directly to the home folder of the user.

I do not recommend deleting or changing ownership at first, so let us move it by backing-up

sudo mv .Xauthority .XauthorityBak

And then reboot your system.

sudo reboot

P.S.: There are instance where this may work to get your problem fixed or may not. Since you're not deleting the original .Xauthority file it won't be a harm.

Source: Lost gui after ending xorg process


So I have a VPS, and I have no idea how to administer it.

That's the single biggest argument for managed hosting I've ever seen. Hacked servers are responsible for a large portion of the nonsense that makes the internet a bad place. Hosting phishing pages, spreading malware. If you're going to do this, I hope you do it properly.

To give you some sort of idea of the long term undertaking, I'd read through this: What Can Be Done To Secure Ubuntu Server? There are other questions like it on the site (dozens) with good answers but this one has some nice vast answers.

For SSH, I've been over all of these in long-form on my blog but the key points are:

Move it to another port. Something high, in the 10,000-60,000 range.
Install fail2ban.
Use key based authentication.
Disable password authentication.
Disable root login (make sure your user is in the admin group).
Make sure your user doesn't have a guessable name (eg admin).

Just moving the port will deflect 99.99% of drive-by hacking attempts. fail2ban will stop any brute attempts from being viable. Forcing key-based auth means the number of guesses a brute would take is now in the range of billions of billions. Disabling root login and having a harder-to-guess username means they don't even have a username with which to start bruting: they have to brute for the username before they even get to the password element.

This results in a fairly secure SSH server. There would have to be a pretty horrific exploit in it for people to get through it... But don't put all your focus on making the door as impenetrable as possible and then ignoring the open window.

Web applications (of all dynamic languages) are hackable. If you're using open source scripts, you need to keep on top of their updates.
A firewall should be stopping people getting to services that shouldn't be exposed to the internet (MySQL for example).
Otherwise secure services will let people right in if you're not applying patches to them (and restarting them after patching).


How can I make my terminal display non-standard characters?

It seems you can set your local settings to utf-8, but it is not possible to set it only for terminal. similar question


This is a vanilla 11.04 classic-gnome.session file:

[GNOME Session]
Name=Classic GNOME
Required=windowmanager;panel;filemanager;
Required-windowmanager=gnome-wm
Required-panel=gnome-panel
Required-filemanager=nautilus
DefaultApps=gnome-settings-daemon;
IsRunnableHelper=/usr/lib/nux/unity_support_test --compiz
FallbackSessionsID=GNOME2d
GNOME2d=2d-gnome

In case single system files were accidentally deleted they can always be restored from a live session. Boot from your installation CD, browse the Files System with Nautilus to /etc/usr/share/gnome-session/sessions/ and copy classic-gnome.session to your local drive.


How to partition while installing Ubuntu 12.10

I think English may not be your first language, so I am going to attempt to answer what I think is your question(s). I can only imagine what it would be like trying to ask a similar question in your language.

First off, formatting a linux installation like a windows drive is not necessarily the right way to go. Windows formatted things that way because it, well is windows and like to do things, backwards and sometimes badly.

The three general configurations that linux systems are configured are:

Everything in "/"

Everything in is basically put in root except boot and swap. You actual disk will look something like...

/boot

/swap

/

Everything in "/" except "home"

This is the same as above, except you put the "home" directory off in a separate partition. Some people think that this makes it a bit easier to totally blow away your OS base install and not have to backup/recover or do anything with your "home" if you do. Which it does in a way, but there can be some other things that come up as well. You drive will look like...
/boot

/swap

/

/home

"/", "home", "/-other things"

In some configurations, typically server installations, where for instance the log directory is going to take up a lot of space or potentially eat up the file system, the "/var/log" directory might be put on its on partition. These are all custom configurations... So your drive might look like...

/boot

/swap

/

/home (optionally if you chose this)

/var/log

During installation when you come to the disk partitioning scheme if you want to set up anything other than the default partitioning scheme, then you will need to choose the custom or manual option and set the disk up yourself. If you don't know how to do this, there are a lot of guides online that can walk you through it.

If you are worried about some issue later like having your linux disk layout mirror a windows disk layout to use some samba shared configuration that a windows machine is going to access, don't. In the configuration of that you can make the windows client see essentially what you want it to see.


It will be necessary to install the libmtp package (libmtp-common). Here are instructions.

Android 5 switched to using the MTP protocol which isn't supported by default on Linux.l


Lock screen - more time to switch off monitor

You can open System Settings then click on Brightness and Screen Lock.

You can change the value from the drop-down:

Turn screen off when inactive for: [Time value dropdown]


How can I speed up my computer, now that I've installed Linux?

Linux is significantly more efficient than Windows. If you are really concerned about speed, try messing with your startup applications.

Linux primarily uses the ext3 or ext4 file system, which unlike NTFS, does not need defragmentation. So your computer won't slow down over time because of file fragmentation on the HDD. The Linux filesystem is more intelligent than that. :)

If you are new to Linux, I would recommend Linux Mint over Ubuntu.


Problem with keyboard back-light on Ubuntu Mate 16.04 on ThinkPad T450s

From
https://ubuntu-mate.community/t/keyboard-light-keeps-turning-on-after-login-and-or-unlock/6914/12
I got the right direction for the solution (similar problem with Ubuntu Mate 18.10 on a ThinkPad T480s).

I edited /etc/dbus-1/system.d/org.freedesktop.UPower.conf (with sudoedit) and changed the allow in the lines

<allow send_destination="org.freedesktop.UPower"
       send_interface="org.freedesktop.UPower.KbdBacklight"/>

to a deny so after editing the lines look like this:

<deny send_destination="org.freedesktop.UPower"
      send_interface="org.freedesktop.UPower.KbdBacklight"/>

No service restart or reload necessary, works directly after changing the file. Manual switching of the keyboard backlight with the hotkey (Fn+Space).


Why won't my Ubuntu 19.10 connect to the internet?

This was the common issue in some type of laptops like hp.
Below Tutorial was helped me to detect my wireless adapter. Please watch this
 video to recognise your wireless adapter.
Follow these steps

 1. Please install make command
 2. ```sudo apt-get install build-essential```
 3.  Please update your kernel to lates one
       ```sudo apt-get dist-upgrade```
Step 2: In terminal enter
    git clone [https://github.com/lwfinger/rtlwifi_new][2]

Step 3: Now enter “cd rtlwifi_new”.

Step 4: And now press “git checkout origin/extended -b extended”.

Step 5: sudo make install

Step 6: sudo modprobe -r rtl8723de

Step 7: sudo modprobe rtl8723de

if you got error like: modprobe: ERROR: could not insert ‘rtl8723de’: Required key not available

Above steps are included in that video
Or go to this repository and follow the instructions


On Ubuntu 16.04 server I am unable to upload large files in Moodle 3.2

From php.net:

  post_max_size
  Sets max size of post data allowed. This setting also affects file upload. To upload large files, this value must be larger than upload_max_filesize. Generally speaking, memory_limit should be larger than post_max_size.

From answer of similar question in Stack Overflow:

  upload_max_filesize is the limit of any single file. post_max_size is
  the limit of the entire body of the request, which could include
  multiple files.

  Given post_max_size = 20M and upload_max_filesize = 6M you could
  upload up to 3 files of 6M each. If instead post_max_size = 6M and
  upload_max_filesize = 20M then you could only upload one 6M file
  before hitting post_max_size.

By default (in PHP 7.0) the value of post_max_size is four times larger than the value of upload_max_filesize:

post_max_size = 8M
upload_max_filesize = 2M


Do you have a reference speed to go by?  It may not be related to Ubuntu at all.  If you have another operating system or another computer to compare against you might be able to narrow down if its Ubuntu or your router/modem.


Can I install 32-bit Ubuntu in a 64-bit host using VirtualBox?

Yes, you can install a 32-bit Ubuntu virtual system in a 64-bit host.

To do this, follow these steps:

Install VirtualBox from the Ubuntu Software Center.
Download the desired Ubuntu ISO file (32-bit in your case from the Ubuntu page).
Create a new machine from the File → New menu.
Make sure that you select the "Ubuntu" OS (instead of "Ubuntu (64-bit)").
Setup your other options.
Launch the virtual machine and install Ubuntu (select the downloaded ISO file when prompted for a CD or DVD media).
After installing Ubuntu and "rebooting", install the VirtualBox drivers.
Setup the new installation as desired.

I hope that this will help you solve your problem.

Edit: I found a video on YouTube that explains how to install Ubuntu on VirtualBox (in case that you did not use VirtualBox before).


Can't access UEFI or boot to Windows 10 after installing Ubuntu 16 LTS

Sometimes EFI boot settings get damaged, making it difficult or impossible to boot into the firmware setup utility (what you're calling "the UEFI"). This can create a chicken-and-egg sort of situation, since the solution to such a problem is to reset all the firmware settings to the default, but you have to access the firmware setup utility to do this. I can think of several possible workarounds:

You could try putting my rEFInd boot manager on a USB flash drive or CD-R and boot to it. On most EFIs, rEFInd shows an option on the second row of icons to reboot into the firmware setup utility. Select this, reset the options to their defaults, use rEFInd again to reboot to Ubuntu, and re-install GRUB (sudo grub-install) to get things working again. If you can't get rEFInd to boot from the USB drive, you could install it to your hard disk, but that runs the risk of further corrupting the firmware settings.
GRUB includes an ability similar to rEFInd's, but it's often not active. I don't know offhand what an entry to do this looks like, but if it's not present in your GRUB menu, you could try to track this down and create such an entry. You'd then be able to use your existing GRUB to get into the firmware setup utility, much as you'd use rEFInd, then reset its options to their defaults.
You could turn off the computer, unplug all your hard disks, and start the computer. With no disks, the computer should launch its firmware setup utility. You can then reset the options to their defaults, plug the disks back in, and restart. The machine might not boot, though, or it might boot to Windows. If the latter, you could use EasyUEFI to create a new entry for GRUB/Ubuntu (its boot loader is EFI\ubuntu\shimx64.efi or EFI\ubuntu\grubx64.efi; the former supports Secure Boot, the latter doesn't). In either case, you could use rEFInd to boot into Ubuntu on a one-time basis or use Boot Repair to fix GRUB.

There may be other ways to do this, too. Using efibootmgr in Ubuntu to delete redundant entries might fix the problem, for instance. (Type sudo efibootmgr or sudo efibootmgr -v to see existing entries, then delete unwanted entries with sudo efibootmgr -b #### -B, where #### is the hexadecimal number of the boot entry you want to delete.)


Transaction for graphical.target/start is destructive

So I finally found it. It was due to error in my file system after I saw logs.
Simple solution was to run:
$ fsck /dev/diskname

In my case my home was on /dev/sda3.
But till I found solution, I had reinstalled ubuntu. I encountered same error while using the old home partition, so I issued above command. It worked!


If you really need your CAD applications for professional use the easiest solution for you would probably be leaving Windows on a small partition of your computer so you can switch back when you need to.

However there are alternatives in linux.

There are some open source CAD programs available from ubuntu software center so I'd advise  you to try ubuntu from a usb stick first and check out the applications and see if they'll do for you.
Another possibility would be using wine.
It is a compatibility layer for Windows (not a full emulator though!) that provides the necesarry filesystem and .dlls to run certain applications.
Before blindly relying on wine I'd look here ( http://appdb.winehq.org/ ) to see if the applications you want to use are documented to work with wine and your current ubuntu version.

But because CAD applications might demand 3D graphics capabilities you should also make sure that your graphics card is well supported by the drivers available for linux.

Hope this helps you considering your options


mouse pointer not working properly Ubuntu 16.04

I dont have 50 reputation to comment, so I have to write here: I had it once too, it was a graphic driver error. Do you have an Nvidia graphic card? Then you could try install the proprietary drivers and/or updated one.


The fast way is to install from the command line. Type the following command.
sudo apt-get install groovy

You can also use Software Center from Ubuntu->Software Center to install Groovy.
Type Groovy in the search box and after selecting the first option, click Install button.


Please visit here before you connect to the vpn. Write down, or keep the site open. It  should be your public WAN ip adress: 81.171.x.x
Then you connect your vpn, and visit here again. Now the ip it shows should be like the address of the vpn server, in your example 123.123.123.123.


How can I get the correct Spanish Keyboard layout?

Press the Super key and start typing "keyboard" (for you, it would be "teclado") and open "Keyboard layout" ("Distribución del teclado"). Alternatively, you open "System configuration" ("Configuración del sistema") and select "Keyboard layout".

There you can add another keyboard layout, by clicking on the button with a "+" symbol at the bottom left, check the layout itself by clicking on the little keyboard button, and even change some of the options for your preferred layout (button "Options..." at the bottom right). The latter would let you customize the layout.

As for typing characters in a manner similar to Ctrl+Alt+number, check this question: How can I type ASCII characters like Alt + numpad in Windows?

If you only want to know what key combinations are available in you current keyboard layout, click on the little keyboard button (highlighted in pink in the image, below) after you selected the layout.

The combinations of keys are as follow:


Can't get my Canon LBP printer to run under Ubuntu 14.04

The Canon CAPT printer driver is closed source and the binary libraries supplied by Canon are compiled for i386. So if you are on amd64 you will need to first enable multiarch and install some libraries:
# amd64 only
dpkg --add-architecture i386
apt-get update
apt-get install libstdc++6:i386 libxml2:i386 zlib1g:i386 libpopt0:i386

Install cups if you do not already have it:
apt-get install cups

Download and unpack the Canon CAPT printer driver:
wget http://gdlp01.c-wss.com/gds/6/0100004596
tar -zxvf Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz/03/Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz

Install 32-bit or 64-bit driver depending on your architecture:

32-bit
 dpkg -i Linux_CAPT_PrinterDriver_V260_uk_EN/32-bit_Driver/Debian/*.deb

64-bit
 dpkg -i Linux_CAPT_PrinterDriver_V260_uk_EN/64-bit_Driver/Debian/*.deb

Now look in /usr/share/cups/model for the ppd files that describe the printers and choose the one that matches (or is closest to) your printer:
# grep -H ModelName /usr/share/cups/model/*.ppd | less
...
/usr/share/cups/model/CNCUPSLBP6018CAPTS.ppd:*ModelName: "Canon LBP6000/LBP6018 CAPT (US)"

In this case we chose CNCUPSLBP6018CAPTS.ppd which matches model LBP6000.
(Note - if you can not find a match for your printer, then view the README-capt-*txt file in the Canon tar.gz archive - in the section named "Object Printer" it contains an exact list of the printers supported by each .ppd file).
Add printer:
# lpadmin -p LBP6000 -m CNCUPSLBP6018CAPTS.ppd -v ccp://localhost:59687
# lpadmin -p LBP6000 -E
# ccpdadmin -p LBP6000 -o /dev/usb/lp0

And configure your system to start the Canon ccpd daemon automatically:
# update-rc.d ccpd defaults

Problems
There are several problems with the Canon printer driver:

It was built for Debian and last supported Ubuntu version was 12.04. It does work in 14.04 though.

It includes closed source binary libraries which are built for 32-bit i386, so can not be run natively on amd64 (even in the 64-bit package)

captstatusui includes an unbounded call to strcpy in cnsktmodule.c which fails with error aborted *** buffer overflow detected *** on some systems

The Canon printer driver is actually a separate daemon that talks to cups over a local or network socket - it leaves an open network port on your system, and I doubt the Canon code has ever been audited for security vulnerabilities

The printer can appear twice in cups (once for auto-detected USB printer, once as Canon CCPD daemon) but the "USB" printer will not work if you try and print to it. In printer settings, if you see your printer configured as USB printer, you must manually disable it (right click, disable)

Canon use their own proprietary software and protocol for talking to the printer, which is why it is not integrated with cups, does not get automatically detected, and requires a driver to be manually installed. It is  reasonable to expect that a printer should be automatically detected and just work, but this is not possible with Canon LBP. My next printer will be a printer that "just works" with open source drivers, probably a network printer that supports the PCL - Printer Command Language standard, like the Brother HL-2250DN (cheap duplex network printer, previously Amazon's top selling laser printer), or a HP Linux recommended printer that works with their open source HPLIP software.

The build scripts for the source code are old and a bit of a mess. Due to the inclusion of closed source i386 binary libraries, and lack of support for multiarch in the build scripts, it would be very hard to compile a fully working 64-bit release. Compiling a 32-bit release, on a 32-bit system, is possible once you have worked around the various bugs in the build system.

Problem: ccpd hangs
Sometimes ccpd hangs and the queue just says "Processing since ..."
Try a manual restart:
pkill -9 -x ccpd
pkill -9 -x captmoncnabc
/etc/init.d/ccpd start
/etc/init.d/ccpd status

Problem:  ccpd does not work - only one ccpd process running after system startup
For normal operation two ccpd processes should be running in a system. The ccpd daemon depends on running cups daemon before forking the second process. You can use the following method to workaround the problem:

Enable the cups init script (update-rc.d cups defaults).

Instruct the ccpd init script to run after the cups init (update-rc.d ccpd defaults 99), or add "sleep 10 && /etc/init.d/ccpd start" in /etc/rc.local script.

If you want to use UDEV rules and startup script, be aware that UDEV rules execute before the CUPS init script, so it may be useful to restart the ccpd init script rather then simply start. For example, you can place the following string in "/etc/rc.local":
sleep 10 && /etc/init.d/ccpd restart
(Solution from
Ubuntu wiki)

Reporting bugs and issues to Canon support
Canon have an official email address for reporting any bugs and issues with the driver:
sup-debian@list.canon.co.jp

Build from source
If you are tempted to try building and installing from source, follow these instructions (the Arch build script may also help):
sudo apt-get install build-essential automake libtool libgtk2.0-dev libglade2-dev libcups2-dev

wget http://gdlp01.c-wss.com/gds/6/0100004596/03/Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz
tar -zxvf Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz
cd Linux_CAPT_PrinterDriver_V260_uk_EN/Src/

# do cndrvcups-common
sudo apt-get install build-essential automake libtool libgtk2.0-dev libglade2-dev libcups2-dev
rm -rf cndrvcups-common-2.60-1/
tar -zxvf cndrvcups-common-2.60-1.tar.gz
cd cndrvcups-common-2.60-1/
sed -i -e 's/-lcups/-lcups -lgmodule-2.0/' cngplp/src/Makefile.am
dpkg-buildpackage -b -uc
cd ..
sudo apt-get install cups
sudo dpkg -i cndrvcups-common_2.60-1_amd64.deb

# do cndrvcups-capt
rm -rf cndrvcups-capt-2.60-1/
tar -zxvf cndrvcups-capt-2.60-1.tar.gz
cd cndrvcups-capt-2.60-1/
export echo=echo
sed -i -e 's/dh_shlibdeps/dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info/' debian/rules
sed -i -e 's/eval cmds=\"$old_archive_cmds/echo/' cngplp/ltmain.sh
sed -i -e 's:uimain.h":uimain.h"\n#include <cups/ppd.h>:' statusui/src/ppapdata.c
sed -i -e 's/cnsktmodule.la/cnsktmodule.la -lpthread/' statusui/src/Makefile.am
debian/rules configure
sed -i -e 's/RANLIB=/#RANLIB=/' cngplp/libtool
debian/rules build
fakeroot debian/rules install
fakeroot debian/rules binary-arch
cd ..
sudo dpkg -i cndrvcups-capt_2.60-1_amd64.deb

I am including this just as a note for anyone inclined to follow this path. Most people should not attempt to build this from source. Even on an amd64 system, the resulting package will include the closed i386 libraries.


Moved Root to new SSD, but df shows old root after boot

Okay, I solved it myself. The issue was that I followed two guides for my setup and didn't use the right grub installation. Using this guide it worked when I made sure to follow step 7 for grub installation: https://frankfzw.wordpress.com/2014/12/23/migrate-ubuntu-14-04-from-hdd-to-ssd/

Make sure to look at the update in the comments for this step!!

You can exit the chroot with ctl-d for those who don't commonly use them.

Thanks..


How can I add Processing to the Unity launcher?

Install Processing

Once you have downloaded Processing it first needs to be unpacked.

tar zxvf processing-2.1-linux64.tgz

The processing file then needs to be copied to /usr/bin

cd processing-2.1
sudo mv processing /usr/bin/

The rest of the files then need to be copied to the /opt directory.

sudo mkdir /opt/processing
sudo cp -r processing-2.1/* /opt/processing/

The tldp website provides a great explanation of why to install to /opt

  This directory is reserved for all the software and add-on packages
  that are not part of the default installation. For example,
  StarOffice, Kylix, Netscape Communicator and WordPerfect packages are
  normally found here. To comply with the FSSTND, all third party
  applications should be installed in this directory. Any package to be
  installed here must locate its static files (ie. extra fonts, clipart,
  database files) must locate its static files in a separate
  /opt/'package' or /opt/'provider' directory tree (similar to the way
  in which Windows will install new software to its own directory tree
  C:\Windows\Progam Files\"Program Name"), where 'package' is a name
  that describes the software package and 'provider' is the provider's
  LANANA registered name.

  Although most distributions neglect to create the directories
  /opt/bin, /opt/doc, /opt/include, /opt/info, /opt/lib, and /opt/man
  they are reserved for local system administrator use. Packages may
  provide "front-end" files intended to be placed in (by linking or
  copying) these reserved directories by the system administrator, but
  must function normally in the absence of these reserved directories.
  Programs to be invoked by users are located in the directory
  /opt/'package'/bin. If the package includes UNIX manual pages, they
  are located in /opt/'package'/man and the same substructure as
  /usr/share/man must be used. Package files that are variable must be
  installed in /var/opt. Host-specific configuration files are installed
  in /etc/opt.
  Interpret this as you wish, but to my understanding you do this if you want to run a self-contained package i.e. one that contains all that is needed within the download itself.

Next it needs to be linked to java

cd /opt/processing
ln -s /usr/lib/jvm/java-6-sun java

And finally to create a link

sudo sed -i 's/APPDIR=`readlink -f "$0"`//'g /usr/bin/processing
sudo sed -i 's/`dirname "$APPDIR"`/\/opt\/processing/'g /usr/bin/processing

Create Unity launcher

With Processing now "installed" the launcher can now be made. The Ubuntu website provides a good tutorial of this, which is summarised below. First, create the launcher

sudo touch /usr/share/applications/processing.desktop

And then open it for editing

sudo gedit /usr/share/applications/processing.desktop

With the file now open fill it with the following information and save.

[Desktop Entry]
Version=2.1
Name=Processing
Comment=graphics and animation language
Exec=processing
Icon=/opt/processing/lib/icons/pde-256.png
Terminal=false
Type=Application
Categories=AudioVideo;Video;Graphics;

With that now saved you should be able to find Processing in the Unity Dash

Upgrading will require you to just copy over the files in /opt/processing with the new ones, though do check that the directory and file structure is the same as before.

Associate .pde files with Processing

Finally, to associate .pde files with Processing - so double-clicking a .pde launches Processing - you need create a new MIME type and associate Processing with that type.

The GNOME dev center provides an explanation of how to create a new MIME type. First, create the new MIME type

sudo touch /usr/share/mime/packages/processing.xml

Then open it for editing

sudo gedit /usr/share/mime/packages/processing.xml

Put the following data in that file and then save it

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
    <mime-type type="text/x-processing">
        <comment>Proecssing source code</comment>
        <sub-class-of type="text/x-csrc"/>
        <glob pattern="*.pde"/>
    </mime-type>
</mime-info>

Update the MIME database

sudo update-mime-database /usr/share/mime

Finally, associate the new MIME type with Processing. The default applications list is stored in a file called defaults.list

sudo gedit /usr/share/applications/defaults.list

Add text/x-processing=processing.desktop somewhere in that file.

Now, when you double-click a .pde file it'll open the file Processing.


PowerPC version of Ubuntu 10.10 or 10.04 wont boot on my Mac

Boot to OpenFirmware, then boot the CD from there.

https://help.ubuntu.com/11.10/installation-guide/powerpc/ch05s01.html


Problem with gnome-desktop-item-edit on Ubuntu 18.04

I know how to does it...

1- In top above left on the corner on icon click to activities.

2- on the window "Type to search...", write aaaaa (the Programe Name..)

3- On the icon from aaaaa with the right Mause, give to add it,

How to have it on my desktop

The Application is MV

Very Thanks all your for the help and SurvivalMachine for your correction...

I wish you a nice day!


If you disable Secure Boot in BIOS, you will not see this message.

Generally speaking the Secure Boot option does not improve security of the system against any modern threats.

The Secure Boot feature was invented by Microsoft. The main idea was to control OS installations. Nothing about security.

For Linux based systems Secure Boot does not make any sense. Linux has its own security features. If you have enough control over the system to install kernel modules, you have enough permissions to do anything you like. So the Secure Boot does not help.


How can I set up Ubuntu 16.04 LTS to automatically empty the trash based on parameters?

Turns out there is a program called autotrash that works under Ubuntu 16.04 LTS.

Here is an article that describes how it works:

Automatically Empty the Trash in Ubuntu

--> This article is informative but is older, so do not follow the install instructions.

Instead, just do this:

sudo apt-get update
sudo apt-get install autotrash

Then the program is executed by entering the autotrash command with arguments.

This can be run periodically by cron, and based on specific parameters:

Those arguments are described in detail in the

man page for autotrash for Ubuntu 16.04 LTS

EXCERPT:

  NAME
         autotrash   —  program to automatically purge old files from the trash

  SYNOPSIS
         autotrash [-d purge_n_days_old]

   autotrash [--delete number_of_megabytes_to_purge]

   autotrash [--keep-free number_of_megabytes_to_free]

  DESCRIPTION
         autotrash is a program that looks in a FreeDesktop.org Trash folder for
         information  on  it's  contents  and  then  purges  a part of the trash
         depending on the options.

   The most common option is -d, which will purge files that have been  in
   the trash for more then a given number of days.

   The  option --delete will remove at least the given number of megabytes
   from the trash, removing the oldest trash first.

   Using --keep-free will make sure at least the given number of megabytes
   of  free  space  is available, by automatically setting --delete to the
   right value. For example, to  keep  at  least  a  1GB  of  free  space,
   removing files from the trash if needed, use autotrash --keep-free 1024

The man page goes on to describe many other options.


How to modify the system default login background image?

Open the terminal and run the following commands

sudo cp /usr/share/applications/gnome-appearance-properties.desktop /usr/share/gdm/autostart/LoginWindow

Then logout, and you’ll see an Appearance window pop up. Change it to how you prefer it, then close it and login as usual.

When you have logged in after finishing the customizing, run this command to prevent the Appearance window from opening at the GDM screen every time.

sudo unlink /usr/share/gdm/autostart/LoginWindow/gnome-appearance-properties.desktop

or

If you want to install plymouth themes run the following command from your terminal

sudo aptitude install plymouth-theme-*

Now you can run the following commands to change login and plymouth screens

sudo update-alternatives --config default.plymouth

gksu -u gdm dbus-launch gnome-appearance-properties


Reduce Hard disk size using Gparted in VMWare player?

Is it possible to reduce 300GB to 150GB using Gparted in VMWare
  player? (150GB is still unallocated out of 300GB)

GParted is able to grow and shrink many different file systems and other formats - see GParted Features.  However, GParted is not able to grow or shrink the size of a hard disk drive.

In the post you stated that you grew the size of the hard disk drive with VMware Player.

You might check to see if there is an option to shrink the size of a hard disk drive with VMware Player.


Is Chromium still under consideration for Unity?

Firefox (4) was chosen at the recent Ubuntu Developer Summit to be the default for 11.04 Unity Desktop and Netbook Editions.

One of Chromium's biggest drawbacks is working out how to integrate its six weekly release cycle into Ubuntu's six monthly schedule.


Would a Lua or C API be suitable? mpv is, by my understanding, one of the more popular media players for Linux and it seems to be very full-featured in terms of integrability. https://mpv.io/manual/master/#command-interface


How to re-install libgcc1:i386 which breaks libgcc1?

Have you tried installing the libgcc1 package that is requested?

sudo apt-get install libgcc1:i386=1:4.9.2-0ubuntu1~12.04

or pin it:

sudo sh -c "echo -e 'Package: libgcc1:i386\nPin: version 1:4.9.2*\nPin-Priority: 500'  > /etc/apt/preferences.d/multiarch-libgcc1"


As a workaround you could copy them first locally and then view them.
I think it is an MTP bug. I really hate this protocol.
I have also tested this in 14.04, same bug, i can copy them but not view them locally.


after updating to ubuntu 15.04, the mouse pointer disappears over the gnome sidebar and top menus

I have the same problem.

And, finally, I found this https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers-346/+bug/1440012

So, I think maybe you have installed the nvidia-346 driver?

If you did install nvidia-346 driver, you can downgrade to nvidia-331 or upgrade to nvidia349 to avoid this issue.

fearlessly install driver 349 :

sudo apt-add-repository ppa:mamarley/nvidia
sudo apt-get update
sudo apt-get install nvidia349

or

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update

then
goto additional drivers and select driver 349.16


Ubuntu 16.04.* is the most recent Long Term Support version.  This is the most stable, least subject to change over its lifetime, and is supported for five years from release (until April 2021).  Ubuntu 17.10.* is not LTS, and its support will end in July 2018, with the expectation that you'll replace it with 18.04.

If you like the idea of having the absolute latest stable version, install 17.10.1 and be prepared to replace it in a couple months.  If you like the idea of having the same version for a prolonged period (and not having to re-learn your way around every few months), install 16.04.3 LTS.


How do I upgrade from Ubuntu 16.04.4 to 16.04.5?

You will need a time machine to go to the future.
To be precise Travel to approximately August 2, 2018. Then run the first three commands in your question. Once done you can use the same time machine to come back to the present.
See https://wiki.ubuntu.com/XenialXerus/ReleaseSchedule
As a side note,
Canonical, the makers of Ubuntu will continue to patch the kernels used in the Ubuntu LTS 16.04 for five years from April, 2016. So, even if kernel v.4.13 reaches end of its life, for Ubuntu 16.04, it will continue to live a fruitful life till 2021.
You just have to make sure that you use the default kernels from the default Ubuntu repository and keep them updated as usual.
Hope this helps


The following worked for me.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
sudo update-alternatives --config gcc

Source for reference


The Android OS is based on the Linux kernel, so theoretically all android phones should be able to run Ubuntu for Android. Then the question, which phone will run Ubuntu with the best performance. For that, you will have to look into the hardware specifications and read some performance reviews. Smooth performance with the regular OS will carry over to smooth performance with Ubuntu.

The docking feature you are referring to utilizes the microUSB port. This will connect to a USB port on your computer. All androids have this port. They use it for charging the battery, adding music, etc.


Can apps created using Quickly for Ubuntu be used in Windows or Mac?

Not easily, Quickly apps use a lot of things that are unique to Linux desktops to make your app run and integrate better.


Virtual box has trouble opening its own .vdi images

Check your /etc/init.d directory to see if there's anything related to vboxdrv. Googling shows it sometimes getting renamed to vboxdrv.dpkg.bak; others report that they have /etc/init.d/virtualbox-ose and that running

/etc/init.d/virtualbox-ose start

fixed their problem.

Also, un-installing virtualbox and installing it again would most definitely solve the problem. You may as well install dkms package when doing this.


To display a character you need a font that contains this character. This is also for the character map.

No font contains all Unicode characters (which are approximatly 1.000.000).

So install a font containing the unicode block you want to display and select this font in the character map. Then the character should be displayed.


On Thinkpad T540p, there is a field Security Chip in BIOS under the Security tab with options Active, Inactive and Disabled.

The error message you reported appears if this option is set to Inactive: "Security chip is visible, but is not functional."

In my case, any other option removes the error. Active means "Security chip is functional" and Disabled "Security chip is hidden and is not functional."


can't delete a printer - how do I access the printing dialog with admin privileges?

Try the following command:

sudo system-config-printer


CPU frequency too high even with 'powersave' governor

Answer Version 3.0
Kernel version 4.14.98 has finally fixed problems I've noticed for last 6 months or so:

When system is idle CPU frequency would spike to 3,000 MHz in Turbo Mode.
When system is busy CPU frequency would simmer down to about 1,500 MHz.

Now as you can see when system is idle system is at 800 MHz as it should be:

Answer Version 2.0
OP updated question with results of Initial Answer below and for whatever reason the governor is set to performance mode which runs all CPU's at max speed all the time.
We need to do the reverse of this answer: Set CPU governor to performance in 18.04:

Use: sudo -H gedit /etc/rc.local put insert this before the last line containing exit 0:
sleep 120 # Give CPU startup routines time to settle.
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
echo 800000 | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq

Save the file and reboot. Two minutes after rebooting your CPU's will settle down and run normally.

What if /etc/rc.local doesn't exist?
From this: Ubuntu 16.10 rc.local file does not exist
you need to enter:
sudo systemctl enable rc-local.service

Initial Answer
According to: intel_pstate CPU Performance Scaling Driver, intel_pstate status should be:

status
Operation mode of the driver: “active”, “passive” or “off”.

“active”
    The driver is functional and in the active mode.
“passive”
    The driver is functional and in the passive mode.
“off”
    The driver is not functional (it is not registered as a scaling driver with the CPUFreq core)

My first step would be to remove your kernel command line parameter intel_pstate=disable.
Reboot and type the following:
$ cd /sys/devices/system/cpu/cpu0/cpufreq

$ paste <(ls *) <(cat *)

affected_cpus                             0
cpuinfo_max_freq                          3500000
cpuinfo_min_freq                          800000
cpuinfo_transition_latency                0
energy_performance_available_preferences  default performance balance_performance balance_power power
energy_performance_preference             balance_performance
related_cpus                              0
scaling_available_governors               performance powersave
scaling_cur_freq                          832522
scaling_driver                            intel_pstate
scaling_governor                          powersave
scaling_max_freq                          3500000
scaling_min_freq                          800000
scaling_setspeed                          <unsupported>

This is what I have in a default configuration without intel_pstate=disable.
Pay close attention to scaling_max_freq and scaling_min_freq.
You might want to temporarily uninstall CPU Freq Utils package:
sudo apt remove cpufrequtils

I have never found a need for it and it might be mucking your system up. Later you can install it again (if need be) with:
sudo apt install cpufrequtils


First off, did you try attaching speakers / headphones to the rear analog output in case you have a defective cable / connector?

Otherwise, I notice that your motherboard has a RealTek 892 audio codec, which another user had issues with. You can see their post here and try out their solution: ALC892 Low sound issue fixed with changing alsa config, why does it work?


I want to put Ubuntu on a bootalbe external USB hard drive

You can do a persistent install or full install to a USB hard drive.
It should work on most computers as long as you don't install proprietary drivers.

It gets a little more complex if one of the computers uses UEFI.


Disable gnome from asking passphrase in GUI when using ssh and gpg from terminal

SSH and GPG use so-called "agents" to cache decrypted private keys, so that users don't have to enter their pass phrases all the time. By default they use the program pinentry to this purpose.

Before we continue let's make sure that an example for a command-line pin entry program is available on your system. In Ubuntu's repository we have pinentry-curses (since forever) and pinentry-tty (since Xenial) but they're not installed by default. You can get it from the package of the same name:

sudo apt install pinentry-curses

Setting a different pin entry program

You can adjust the program used for pin entry by either:

(per-user) Setting pinentry-program in your ~/.gnupg/gpg-agent.conf to a command-line pin entry program, e. g.:

pinentry-program /usr/bin/pinentry-curses

You need to either restart the agent or have it reload its configuration:

gpg-connect-agent <<< RELOADAGENT

(system-wide) In all common Linux distributions including Ubuntu the default pinentry program is actually a symbolic link to the actual pin entry program. The target of this symbolic link is managed by the update-alternatives system. You can use it to change the link target to a command-line pin entry program:

sudo update-alternatives --config pinentry

Choosing the pin entry program based on the availability of a terminal

The disadvantage of both of these methods is that you won't be able to use a command-line pin entry if SSH or GPG are invoked from a program running without a terminal, e. g. a graphical SFTP client or a mail user agent. A better way would be to use the graphical pin entry program only when an X server is available and a terminal is unavailable. To this purpose we'll need a small wrapper script that analyses the environment before deferring to the right pin entry program.

Let's assume we have the following executable shell script at ~/.local/bin/my-smart-pinentry:

#!/bin/sh
set -eu

# Configuration -- adjust these to your liking
PINENTRY_TERMINAL='/usr/bin/pinentry-curses'
PINENTRY_X11='/usr/bin/pinentry-x11'

# Action happens below!
if [ -n "${DISPLAY-}" -a -z "${TERM-}" ]; then
    exec "$PINENTRY_X11" "$@"
else
    exec "$PINENTRY_TERMINAL" "$@"
fi

To use this wrapper as the pin entry "program" you can use the per-user method mentioned above. You can also add it to the update-alternatives database.


Move Ubuntu 16.04 to a SSD from HDD occurring error, no ssd shown in grub menu

Can you clarify if you still have both hard drive and SSD installed in the machine?
Did you change the boot priority in your BIOS?  If the Hdd is still higher in the boot order than the SSD, then it will boot from that first and not even look at the SSD.


Is indeed an electron app... I found that launching it with this command line options the rendering looks better.

skypeforlinux --disable-gpu --enable-lcd-text


Cannot get or set to Redis on Vagrant guest from host due to "Error: Connection reset by peer"

The solution is here : check your /etc/redis/redis.conf, and make sure to change the default

bind 127.0.0.1

to

bind 0.0.0.0

Then restart your service service redis-server restart

You can then now check that redis is listening on non-local interface with


I think the following command comes close:

sed -r 's:([^/]*/):d\1:g; s:([^/]+)$:f\1:' foo.txt |
  sort |
  sed -r 's:/f:/:; s:d([^/]*/):\1:g'

What does it do? The first sed command adds a d to the beginning of every directory (by looking for strings that end with a /), and an f to files - those that don't end with /. Then we apply sort - and since d sorts before f, directories get sorted first. The second sed undoes the first one.

For the example input:

$ sed -r 's:([^/]*/):d\1:g; s:([^/]+)$:f\1:' foo.txt |
 sort |
 sed -r 's:/f:/:; s:d([^/]*/):\1:g'
bash /etc/skel/
bash /etc/skel/new/backups/
bash /etc/skel/new/file
bash /etc/skel/old/backups/
bash /etc/skel/old/file
bash /etc/skel/file
bash /etc/skel/filenew
bash /etc/file
bash /etc/filenew
bash /usr/
bash /usr/bin/
bash /usr/bin/file
bash /usr/sbin/
bash /usr/sbin/file.sbin


Ubuntu 12.10 and Windows 7 Network: Network password doesn't work

are you sure about the password you have entered is correct password for the user in windows 7 ? , What you can try is create a new user from windoows 7 with a simple username and password and try to login with that username and password and if its possible then I seriously doubt on previous credentials you have given.


What is the difference between /dev/tty* and /dev/bus/usb/001/002?

The /sys/bus/usb/devices/* tree describes the full physical USB topology, and contains metadata about each device.

The /dev/bus/usb/<bus number>/<device number> devices address each device in a simplified way (so you don't have to care about whether a device is connected directly or via one or more USB hubs, just pick the right bus) and allows passing raw USB packets to/from the device. With a USB serial converter, you might send a request packet and get back a response describing the current state of the serial port's handshaking lines.

The /dev/ttyACM* device, on the other hand, hides the complexity of the USB bus and allows you to control the serial port of the USB<->serial peripheral pretty much like  a directly-connected serial port, with all the features of a Unix-style tty driver. Because of the latencies caused by the USB bus, some things may not work as well as with a "real" serial port: in particular, attempts to bit-bang the control lines with precise timing might not work.


Why does my Ethernet port sometimes not work?

Sounds like bug.  Lets dig in.

First, stop Network Manager: sudo service network-manager stop

Then, plug in the cable and bring up the interface sudo ifconfig eth0 up and tell it to ask for a new dhcp lease sudo dhclient eth0  (I'm guessing it's eth0, if not use the right name)

Did it work? If so, file a bug on Network Manager:  ubuntu-bug -p network-manager

If not, try reloading the network driver.  This should simulate a reboot to the ethernet port.  To find out your driver, look in /etc/udev/rules.d/70-persistent-net.rules  You'll see some bits like:

# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:f1:4c:01:94:3e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Finding the one that matches your interface's name, look at what's in the parentheses where mine says r8169.  That's your module's name.

sudo modprobe -r r8169 && sudo modprobe r8169

(replacing r8169 with your module's name) Try the dhclient step again.  If that worked, I suspect it's a kernel bug.  ubuntu-bug -p linux


How to install latest CouchDB on Ubuntu?

Install the latest stable release with the commands below:

sudo apt-get remove couchdb couchdb-bin couchdb-common -f
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:couchdb/stable
sudo apt-get update
sudo apt-get install couchdb couchdb-bin couchdb-common -f

Source


Is there any way to synchronize flash audio and video?

Try the following in Chrome (if that's what you're using):

Enter chrome://plugins/ in address bar, click on details, if there are more than two Shockwave Flash entries listed under Flash, disable one of them and see if there's any improvement. If not, go back reactivate the entry and disable the other one. See if it's better now.


apt-get upgrade won't update gimp from the ppa

You also can install it from Flatpak.
https://www.gimp.org/downloads/


Unplug the USB drive. The computer still sees the USB as a boot device and chooses that route first.


Remains left after converting Lubuntu to Kubuntu

No, there aren't no differences. You can just

sudo apt-get purge --auto-remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview  ace-of-penguins audacious audacious-plugins audacious-plugins-data blueman  chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg  elementary-icon-theme esound-common galculator gdebi gdebi-core  gecko-mediaplayer giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools  gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview  gtk2-engines-pixbuf guvcview hardinfo indicator-status-provider-pidgin leafpad  libaacs0 libabiword-2.9 libaudclient2 libaudcore1 libaudiofile1 libbinio1ldbl  libbluray1 libbs2b0 libcddb2 libcompfaceg1 libcue1 libencode-locale-perl  libept1.4.12 libesd0 libexo-1-0 libexo-common libexo-helpers  libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfm-gtk1 libfm1  libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgmlib0  libgmtk0 libgmtk0-data libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2  libgsf-1-114 libgsf-1-common libgtkmathview0c2a libguess1 libhtml-form-perl  libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl  libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl  libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-inet6-perl  libio-socket-ssl-perl libjpeg-progs libjpeg-turbo-progs liblink-grammar4  libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl  libmailtools-perl libmcrypt4 libmenu-cache1 libmowgli2 libmpg123-0  libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libobrender27 libobt0  libonig2 liboobs-1-5 libopts25 libots0 libpisock9 libresid-builder0c2a  libsidplay2 libsocket6-perl libtar0 libtidy-0.99-0 libtie-ixhash-perl  libtimedate-perl libuniconf4.6 liburi-perl libvdpau1 libwebcam0 libwv-1.2-4  libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl  libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfconf-0-2  libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1  lightdm-gtk-greeter link-grammar-dictionaries-en lm-sensors lubuntu-artwork  lubuntu-artwork-12-04 lubuntu-core lubuntu-default-settings lubuntu-desktop  lubuntu-icon-theme lubuntu-software-center lxappearance lxappearance-obconf  lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin  lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer2 mtpaint  ntp obconf openbox openbox-themes osmo pcmanfm pidgin pidgin-data  pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo  plymouth-theme-lubuntu-text python-pysqlite2 python-xklavier scrot sylpheed  sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends  transmission ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn  xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf  xfonts-100dpi xpad xscreensaver xscreensaver-data

to remove everything from your recent Lubuntu installation.


How to move available space from / (root) to /home? (Ubuntu server 18:04 LTS)

One way is this:

You could create a directory under / like so:

sudo mkdir /free_space

Then, create a directory under your home directory like so:

mkdir ~/free_space

Then bind the /free_space directory to ~/free_space directory like so:

sudo mount --bind /free_space ~/free_space

This way all the free space on / will be accessible under ~/free_space

Another way would be to use aufs to merge /free_space with your home directory.


What native GUI applications can easily make a photo collage grid?

GIMP Plugin
There are some plugins for GIMP  available which should do the job.
Personally I only have experience with the Image Grid Layout plugin which merges several images into one based on a predefined grid layout. As an alternative you may try Index Print which also allows sorting by date.


SSLv3 error with cert generated in OpenSSL

The problem is with the web server's configuration.
You need to disable SSLv3 and Weak Ciphers.

Things that matter in this case are: the web server's kind, its version and the version of OpenSSL. By default in Ubuntu 16.04 this are:

OpenSSL 1.0.2g
Apache2 2.4.18
Nginx-light 1.9.14 [1.10.0 in Ubuntu 16.04.2]

An example of Apache2 VirtualHost configuration:

<VirtualHost *:443>
    ...
    SSLEngine on
    SSLCertificateFile     /path/to/signed_certificate_followed_by_intermediate_certs
    SSLCertificateKeyFile   /path/to/private/key

    # Uncomment the following directive when using client certificate authentication
    #SSLCACertificateFile    /path/to/ca_certs_for_client_authentication

    # HSTS (mod_headers is required) (15768000 seconds = 6 months)
    Header always set Strict-Transport-Security "max-age=15768000"
    ...
</VirtualHost>

# Spas's note: you can leave next lines here or you can put them
# into '/etc/apache2/mods-available/ssl.conf' or into '/etc/apache2/apache2.conf'

# intermediate configuration, tweak to your needs
SSLProtocol             all -SSLv2 -SSLv3 -TLSv1
SSLCipherSuite          ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
SSLHonorCipherOrder     on
SSLCompression          off
SSLSessionTickets       off

# OCSP Stapling, only in httpd 2.3.3 and later
SSLUseStapling          on
SSLStaplingResponderTimeout 5
SSLStaplingReturnResponderErrors off
SSLStaplingCache        shmcb:/var/run/ocsp(128000)

An example of Nginx configuration:

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
    ssl_certificate /path/to/signed_cert_plus_intermediates;
    ssl_certificate_key /path/to/private_key;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
    ssl_dhparam /path/to/dhparam.pem;

    # intermediate configuration. tweak to your needs.
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # Spas's note: You can remove also TLSv1 from this list.
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
    ssl_prefer_server_ciphers on;

    # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
    add_header Strict-Transport-Security max-age=15768000;

    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling on;
    ssl_stapling_verify on;

    ## verify chain of trust of OCSP response using Root CA and Intermediate certs
    ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates;

    resolver <IP DNS resolver>;

    ....
}

Sources:

Mozilla SSL Configuration Generator
Mozilla Wiki: Security/Server Side TLS
A practical guide to secure and harden Apache Web Server

Configuration check:

Quality SSL Labs
Beyond Security
Security Hearers

Read also:

When does Ubuntu 16.04 use /etc/apache2/ssl/apache.crt?
I need rules to drop some malicious Apache connection


sha256sum: 'filename': No such file or directory

If you look carefully, you can see that the message is actually

filename$'\r': No such file or directory

The $'\r' is the shell's way of telling you that there is a carriage return (\r) character at the end of the string. This indicates that the sha256sum.sha256 file has DOS- or Windows-style line endings (CRLF) in place of the Unix standard LF endings.

You can fix the file using one of the methods described in How to change Windows line-ending to Unix version

You can use the program dos2unix, which is specifically designed for this:

dos2unix file.txt

will replace all CR from all lines, in place operation.

To save the output in a different file:

dos2unix -n file.txt output.txt

You might need to install it first by:

sudo apt-get install dos2unix


kget, Skype, and Vuze are not showing up in my panel

That is probably because in Natty the system tray is disabled by default. You can however "whitelist" applications. These applications will then show up in the top left corner of your screen right next to your other application indicators where they used to be.

To whitelist an application you can use dconf-tools.

sudo apt-get install dconf-tools

Alt + F2 and type dconf-editor

Go to com.canonical.Unity.Panel (desktop -> unity -> panel) and change systray-whitelist.

Add the applications you want to whitelist. For example for skype add , 'Skype'.

Some information on how to debug this is here:

How do I know what to whitelist to allow my application into the system tray?

Edit:

I got another idea. Try to add "notification area" to your panel. I was able to reproduce the same behaviour. Having Skype in the whitelist but the tray icon did not show up. It's probably because in your panel is only the "indicator applet complete" which has problems showing even whitelistet applications (using the classic desktop).


Installing Windows7 after Ubuntu 14.04, other recommendations not working

Since the automatic ways aren't working, I tried googling for "manually add windows to grub" and found this.

The linked answer suggests the following:

  The first step is to edit /etc/grub.d/40_custom (using SUDO) and add the following lines to the bottom of the file:

menuentry ‘Windows 7′ {
set root='(hd0,msdos2)’
chainloader +1 }

Then running

sudo update-grub2

Sadly I don't have personal experience with this solution though, just thought it might help. (it's also kind of old)


"ifconfig" command gives different output than earlier in Ubuntu 16.04 LTS and eth0 is also missing from the output. How do I reset it?

It was implemented to avoid a problem on computers with more than one NIC. It was never guaranteed you would get eth0 and eth1 named consistently among NICs. New way is to use hardware position of the card. It is confusing when you see it first time, but unless you have very strong reason, just don't fight it, it is not a bug, it is how it is going to be.


How to keep a local ~/bin folder up to date with updates from various Github repositories?

Simple solution

What you want to do essentially is to run git fetch && git pull from inside each one of the repository folders inside ~/bin. The simplest way is to add this command to Startup Applications:

find /home/user/bin  -type d -exec sh -c 'cd {} && git fetch && git pull' \;  2> /dev/null

Note, that /home/user/bin must be full path to your ~/bin folder.

Python script

But if you want a dedicated utility to this task, here's a python script that updates everything in your ~/bin recursively.  Usage is simple - run it from terminal as python git_updater.py and it will take care of the rest. That same command can be even added as entry to Startup Applications to run the script each time you log in

The script source is below, and is also available on my GitHub repository.

#!/usr/bin/env python3
# Author: Serg Kolo
# Date: 10/21/2016
# Written for: https://askubuntu.com/q/759058/295286
from __future__ import print_function
import subprocess
import os

def run_cmd(cmdlist,workdir):
     """ utility: reusable function for
         running external commands """
     new_env = dict(os.environ)
     new_env['LC_ALL'] = 'C'
     try:
         stdout = subprocess.check_output(
                    cmdlist,
                    env=new_env,
                    cwd=workdir
         )
     except subprocess.CalledProcessError:
         pass
     else:
         if stdout:
             return stdout

def is_behind(cwd):
    """ simple wrapper for checking
        git status output
    """
    fetch = run_cmd(['git','fetch','origin','master'],cwd)
    status = run_cmd(['git','status'],cwd)
    if 'Your branch is behind' in status.decode():
        return True

def update(cwd):
    print('> previous commit:')
    print(run_cmd(['git','--no-pager','log','-1'],cwd).decode())
    print(run_cmd(['git','pull'],cwd).decode())
    print('> latest commit:')
    print(run_cmd(['git','--no-pager','log','-1'],cwd).decode())

def main():
    root_dir = os.path.join(os.path.expanduser('~'),'bin/')
    base_cmd = ['git','--no-pager']
    first_args = ['status']
    second_args = ['log','-1']
    third_args = ['pull']

    for root,dirs,files in os.walk(root_dir):
        for dir in dirs:
            top_dir = os.path.join(root,dir)
            git_dir = os.path.join(top_dir,'.git')
            if os.path.exists(git_dir):
                print('WORKING REPOSITORY:' + top_dir)
                if is_behind(top_dir):
                    print('repository is behind, will update')
                    update(top_dir)
                else:
                    print('not behind, skipped')
                print('-'*80)

if __name__ == '__main__': main()

Script Demo

$ python git_updater.py
WORKING REPOSITORY:/home/xieerqi/bin/sergrep
From https://github.com/SergKolo/sergrep
 * branch            master     -> FETCH_HEAD
repository is behind, will update
> previous commit:
commit ba629ef71c4d2bfe329b8ebe5f48d1ce21e76ebc
Author: SergKolo <1047481448@qq.com>
Date:   Wed Aug 24 21:22:06 2016 -0600

    fixed sending sigterm to process

Updating ba629ef..dd0c962
Fast-forward
 disable_super_key.py   |   2 +-
 git_updater.py         |  61 ++++++++++++
 launcherctl.py         | 162 +++++++++++++++++++++++++++++++
 single_window_expo.py  | 138 ++++++++++++++++++++++++++
 windowctrl.py          | 258 +++++++++++++++++++++++++++++++++++++++++++++++++
 xml_wallpaper_maker.py | 152 +++++++++++++++++++++++++++++
 6 files changed, 772 insertions(+), 1 deletion(-)
 create mode 100644 git_updater.py
 create mode 100755 launcherctl.py
 create mode 100755 single_window_expo.py
 create mode 100755 windowctrl.py
 create mode 100755 xml_wallpaper_maker.py

> latest commit:
commit dd0c9627392540df7c4230e7898cb9e55adc7083
Author: SergKolo <1047481448@qq.com>
Date:   Fri Oct 21 02:37:01 2016 -0600

    git updater script

--------------------------------------------------------------------------------
WORKING REPOSITORY:/home/xieerqi/bin/PythonStuff
From https://github.com/mnovits1/PythonStuff
 * branch            master     -> FETCH_HEAD
not behind, skipped
--------------------------------------------------------------------------------


software & updates didn't open in Ubuntu 16.04. How to fix it?

I fixed my issues with the help of Eliah and George. They gave some hints. So I can clear this issues. I said thanks to both of them.
These are commands so I can fix the issue.
The following command is used as change the access permissions to file system objects (files and directories):
sudo chmod u+s /usr/lib/dbus-1.0/dbus-daemon-launch-helper

Restart the dbus services:
sudo service dbus restart

If you open with the terminal and type software-properties-gtk, sometimes it will show some error like this:

"permissions of the setuid helper is not correct"

Then use above commands.