How do I programatically get the file or directory name after extracting after a tar archive?

Don't. Instead, get tar to put the contents in a directory of your choosing.

tar can remove n components of the path of each file (--strip-components)
tar can apply arbitrary sed expressions to change the path of each file (--transform)

So I'd do something like:

mkdir ffmpeg
wget -O - http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz |
  tar --xz -x -C ffmpeg --strip-components=1

Here, I made the directory myself, and told tar to extract there (the -C option), while removing the first component from the path of the extracted files. So ffmpeg-3.4.1-64bit-static/ffprobe becomes ffprobe  inside the directory ffmpeg.

Or:

wget -O - http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz |
  tar --xz -x --transform='s:[^/]*/:ffmpeg/'

Here, I simply changed the first component of the path to ffmpeg, so I didn't need to make the directory myself. So, ffmpeg-3.4.1-64bit-static/ffmpeg becomes ffmpeg/ffmpeg.

Or, knowing that you specifically want to dump those particular files in /usr/local/bin, use -C to directly place the files there, while removing all directory components and selecting exactly those files you want to extract:

wget -O - http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz |
  tar Jx -C /usr/local/bin --transform='s:.*/::' --wildcards '*/ffmpeg' '*/ffprobe'

With any tar, you can specify the files to be extracted. With GNU tar, you can also use wildcards.


ubuntu 13.10 kvm binary is deprecated, please use qemu-system-x86_64

It's apparently a problem with virsh. Just try and start the virtual machine using directly the command that's advised in the error message, like this

sudo qemu-system-x86_64 -hda [wherever your created virtual disk is]

It's apparently a bug in virt-manager that has not been fixed yet. This user found the solution by changing the XML definition of the VM.


Broken BURG install after backup/restore

You need to uninstall BURG with:

sudo apt-get purge burg burg-common burg-pc burg-themes burg-themes-common

And manually delete "burg" folder in "/boot".

After this install BURG again.


How to create a shortcut that executes an xdotool command to simulate a key press?

The issue
Your shortcut is performed at the same time as your simulated key press
If you run a command, simulating a key press, called with
... another key press, you will actually simulate a third key press, which is the combination of both :)
To solve
You need to prevent your shortcut to run at the same time as the simulated key press, in other words, add a delay:
/bin/bash -c "sleep 1 && xdotool key XF86AudioPlay"

Add this command to a shortcut, and it should work.
Note
Of course you can play a bit with the value in sleep 1, to set it to the best value that feels comfortable, depending on how "sticky" the combination is pressed. sleep 0.5 might very well do, and make the shortcut act more promptly.


Ubuntu 11.10 dhclient-enter-hook.d scripts not invoked

Since this question isn't really a question, I'll assume that the question is "how can I get the dhclient-{enter,exit}-hooks to run?"  The short answer is you can't without some work.  See this bug for a good discussion on the issue and some solutions.

As suggested by the OP, network manager (NM) is the problem.  Here's an example of a dhclient invocation by NM:

/sbin/dhclient -d -4 -sf /usr/lib/NetworkManager/nm-dhcp-client.action \
    -pf /var/run/dhclient-wlan1.pid -lf <lease file> \
    -cf /var/run/nm-dhclient-wlan1.conf wlan1

Notice the "-sf /usr/lib/NetworkManager/nm-dhcp-client.action".  This is a special program provided by NM, which overrides the default script for dhclient, which is at /sbin/dhclient-script.  The default script behaves as you would expect and is documented in "man dhclient-script".

nm-dhcp-client.action is a C program, so you'll need the source to figure out what its doing.  But looking in the source you'll notice that it doesn't run any of the enter/exit scripts directly by default.

Probably the best (least hacky) solution is to write a /etc/NetworkManager/dispatcher.d script that runs the enter/exit scripts when the interface comes up and if the DHCP* environment variables exist (see man NetworkManager).  Since you can only pass variables that NM gives the dispatcher script, this might not be a fully transparent solution.

An untested, hacky, but easier alternative would be to rename /usr/lib/NetworkManager/nm-dhcp-client.action and put a script in its place that unconditionally exec's into the newly named nm-dhcp-client.action.  You could pretty much copy a large part of /sbin/dhclient-script that runs the enter/exits hooks, so it should be pretty simple to create the script.  This should work with pre-existing hook scripts, whereas the former solution may not (due to unavailability of expected variables).

NM really should already be running the hooks because it seems like some packages don't function as expected without it.


How to make browsers re-adjust web pages because of the sidebar?

Incorrect. More right is "Chromium has to make bottom scrollbar because web pages has tuned for bigger size than current size of monitor (or window)" ...

Solutions:

0 You can use System Settings > Apperance ( 12.04 ) to adjust Unity to hide sidebar. Read this question: How can I configure Unity's launcher auto-hide behavior?

1 Using wider monitor.
2 Disabling any sidebars.
3 Use special userstyles to override site styles (width:100% !important ) * Thanks for @Izzy
4 Change zoom level. Ctrl+MouseWheel to zoom/out. Ctrl+0 to reset.* Thanks for @erdemkeren


How to install AMD graphic drivers on Ubuntu 18.04

You should be able to use the open source drivers that come with your system. You may just need to use the common nomodeset fix:

How do I set 'nomodeset' after I've already installed Ubuntu?

Using the built in driver is usually sufficient for radeon cards.

If you have done other mucking around, or added the PPA for the NVIDIA drivers (sorry about that) you can clean up with the following:

sudo apt-add-repository -r ppa:graphics-drivers/ppa && \
sudo apt update && \
sudo apt upgrade && \
sudo apt autoremove && \
sudo apt autoclean

Now, add the AMD updates PPA and update:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt upgrade

Then reconfigure your packages to be safe:

sudo apt install --reinstall xserver-xorg-video-amdgpu
sudo dpkg --configure -a
sudo dpkg-reconfigure gdm3 ubuntu-session xserver-xorg-video-amdgpu

Finally, you can enable accelerated video:

sudo apt-get install mesa-vdpau-drivers

Then to test the VDPAU driver with mpv use:

mpv --hwdec=vdpau yourvideofile

Now reboot the computer and make sure it still works. It does? Good! Now reboot once again and see if you can remove the nomodeset boot option. If it will work without it, this might improve performance.

Finally, once you are logged into the GUI, go to Settings > Devices > Displays and make sure the resolution is properly set.

If performance is still not up to standards after all of the above, you can manually install the closed source driver as a last resort.

If you decide you would still like to use the proprietary driver, you will need to download and install it. According to the output you posted, you need to download this driver:

AMD Radeon™ HD 8670M Series GPU Drivers & Support

Click on the "Linux x86_64" box and download the zip file.

You can follow this guide or post any additional updates to your question and I will improve the answer accordingly.


ralink 148f:760b mt7601 driver not working

I also had a lot of time trying to put that dongle to work.

The driver is outdated and doesn't have the signature for the ID 148f:760b.

So following the same instructions but before 'make' you need to edit the file

  ./common/rtusb_dev_id.c

and add the line

{USB_DEVICE(0x148f,0x760b)}, /* 360 wifi */

after the block

#ifdef MT7601U
    {USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */
    {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 */

Then after 'make install' and when plugging the dongle you can confirm the installation by running ifconfig. The new device might appear as ra0. If it shows the MAC address as all zeros you can run 'ifconfig ra0 up' and check again.

Hope it helps.


Separate home directory and system files

Yes, i'm been doing this for many times:

Copy all the files
Correct /etc/fstab ( Especially the one for / )
Re-generate ramdisk with update-initramfs
launch update-grub ( you may have to do this in chroot )

But before any operation took place , i strongly suggest you to have a bootable CD or USB for system recovery. e.g fix grub2 with chroot

As long as the partition is correctly mounted , everything will be fine. For data copying you could use rsync or pack & extract with e.g tar


How to change tooltip background color in Unity?

Install and open gnome-color-chooser .

Go to Specific → Tooltips and put black foreground over pale yellow background.


How to make a set of screenshots automatically?

How to create an animated (GIF) screenshot

(Cross-posted from my answer here.)

Added bonus with this approach is that you can post the screencast without embed tags on any forum that includes animated GIFs as embedded like this

The answers prior to mine have clearly answered how to create a video screencast. Now if you just want to show an animated screenshot, essentially an extremely short screencast in an image format (GIF, and not more than ~10 sec), it's also easy.

First create a screencast of what you want to show in the animated GIF. Then follow the instructions below...

You'll need Gimp, mplayer (WARNING! NOT mplayer2) and mencoder. Issue the following commands to install them.

sudo apt-get install gimp
sudo apt-get install mplayer
sudo apt-get install mencoder
sudo apt-get -f install

Alternatively, you can install them from the Synaptic package manager that comes with Ubuntu.

The following command breaks your screencast into a number of jpeg or png (based on which command you choose) images:

mplayer -ao null -ss 0:0:33 -endpos 2 eagles.avi -vo jpeg:outdir=Desktop/animated
mplayer -ao null -ss 0:0:33 -endpos 2 eagles.avi -vo png:z=9:outdir=Desktop/animated

Where, -ss 0:0:33 tells mplayer where you begin (0 hours, 0 minutes, 33 seconds), -endpos 2 tells mplayer where to stop (2 minutes), z=9 sets compression level for the output png images to 9, Desktop/animated is the directory (~/Desktop/animated/) where you want the images to be output to.

You can also tell mplayer where to stop, as a specific time, like so:

mplayer -ao null -ss 0:0:33 -endpos 0:1:12 eagles.avi -vo jpeg:outdir=Desktop/animated
mplayer -ao null -ss 0:0:33 -endpos 0:1:12 eagles.avi -vo png:z=9:outdir=Desktop/animated

Now you have the images, but you need to combine them into a single, animated GIF. This is really simple:

Start Gimp > File > Open as Layers > browse to the directory (~/Desktop/animated/), Ctrl+A to select all images, and click 'Open'.
Simple hit Shift+Ctrl+S or go to File > Save As... and name the image as 'animated.gif' > hit 'Save' > check 'Save as Animation' radio button > hit 'Export' > in the next window, simply hit 'Save' unless you know what you are doing.

That's it. You have your animated GIF ready!

Here's an example:


Where to find the full text of "typing" options in gnome-tweak-tool

On my 13.10 box I found them in /usr/share/X11/xkb/rules/base.{xml,lst} and /usr/share/X11/xkb/rules/evdev.{xml,lst}. The XMLs are identical, as are the LSTs (at least in my case), so I think any one of them would have the full text you seek.

Another thing you can do is modify gnome-tweak-tool so you can see the entire text. Here's how I "fixed" mine:

usr/share/pyshared/gtweak/tweaks/tweak_typing.py, line 56 - makes the comboboxes in the Typing section display more characters:

#renderer.props.max_width_chars = 40
renderer.props.max_width_chars = 80

/usr/share/pyshared/gtweak/tweakview.py, line 49 - resizes the tool window so there is space for the comboboxes:

#self._main_window.set_size_request(740, 636)
self._main_window.set_size_request(1160, 680)

These values work OK for me, but there are even longer text options that still do not fit. A better fix would be to add tooltips or horizontal scrolling, but I don't want to pick up up on GTK and its Python bindings right now. Let's hope the devs will take notice of the bug you filed.


Clicking on active apps on unity launcher stopped working

When you click on the active icon once the last opened window opens, click on the icon again you will get both windows in parallel for you to choose.


You want better responsiveness? Add RAM. Changing DE (Ubuntu flavour) will not give you much good.
Firefox itself is very resource hungry and you can't do much about it, unless you disable some major functionality. Both big browsers are getting bigger and bigger with every release. May be switch it for something lighter?


How do I finetune subpixel font anti-aliasing?

The difference between the two font rendering was caused by the LCD Filter setting. XFCE4 stores that setting in:

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

To fix my problem I deleted the whole <property name="Xft" type="empty"> section (might require to logout of XFCE4 to avoid getting the changes overwritten).

Doing a:

xfconf-query -v -c xsettings -p /Xft/Lcdfilter -s lcddefault

will also work (changes will only take effect after restarting XFCE4).


The issue here is with the text colour of the theme.

You can change this quite easily, since GTK+ themes (as of GTK+ 3) are simply CSS (Cascading Style Sheets).

You can change the colour to

#FFFFFF;

as opposed to

@desktop_item_fg;

in this section:

.caja-desktop,
.nemo-desktop.nemo-canvas-item,
.nautilus-desktop.nautilus-canvas-item {
    color: @desktop_item_fg;
    text-shadow: 1px 1px @desktop_item_text_shadow;
}

Or change the value of the variable:

@define-color fg_color

You might also want to consider a more up to date theme. You can find several of the same kind on gnome-look.org.


how to record sound via headphone in audacity

It's look like that's you have no working device to record sound... just have a look on mine sound setting:

PS no microphone not headphone are plugged in, that's only show my audio pheripheral ability.


where commands are logged apart from .bash_history?

No, by default commands run in bash (without any output) are saved in the user’s ~/.bash_history file only. There are multiple ways to remove lines from this file, e.g.:

manually remove line(s):

# removes line 42
history -d 42
# removes lines which just say “exit”
sed -i '/^exit$/d' ~/.bash_history
# removes lines containing “/path/” anywhere
sed -i '\_/path/_d' ~/.bash_history

prepend a space to the command you don’t want to be saved  (␣ means space here):

␣echo secret password | …

See this answer.
set the HISTIGNORE variable in your ~/.bashrc to not save certain commands:

# ignores lines beginning with “ls ” and lines which just say “clear”
HISTIGNORE='ls *:clear'

See this answer.


Can't boot or see Windows 7 particition after installing Ubuntu

You have erased Windows by installing Ubuntu above it. To recover your lost files, you can try using TestDisk: http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step


Realtek 8188E not working after routine update

I know, this answer sounds lame, but consider buying a new (Intel) wireless card to replace yours. You can get one for 15-25$ on amazon and specifically look for its compatibility with Linux.
Many non-Intel wireless cards tend to work unreliably on Linux...

A friend of mine had problems with his wireless on his notebook and that's how he solved the problem.


killall doesn't kill all and rarely kills, what is the command for then?

From the man page for killall

  killall sends a signal to all processes running any of the specified
  commands. If no signal name is specified, SIGTERM is sent.

When you do a kill -9, you are sending the SIGKILL signal. If you want to send a SIGKILL with killall, you need to do

killall -s SIGKILL <PROCESSNAME>

A good explanation of the difference between SIGKILL and SIGTERM (and why you should try SIGTERM first)

From http://rackerhacker.com/2010/03/18/sigterm-vs-sigkill/

  Sending signals to processes using kill on a Unix system is not a new
  topic for most systems administrators, but I’ve been asked many times
  about the difference between kill and kill -9.

  Anytime you use kill on a process, you’re actually sending the process
  a signal (in almost all situations – I’ll get into that soon).
  Standard C applications have a header file that contains the steps
  that the process should follow if it receives a particular signal. You
  can get an entire list of the available signals on your system by
  checking the man page for kill.

  Consider a command like this:

  kill 2563

  This would send a signal called SIGTERM to the process. Once
  the process receives the notice, a few different things can happen:

  the process may stop immediately
  the process may stop after a short delay after cleaning up resources
  the process may keep running indefinitely

  The application can determine what it wants to do once a
  SIGTERM is received. While most applications will clean up their
  resources and stop, some may not. An application may be configured to
  do something completely different when a SIGTERM is received. Also, if
  the application is in a bad state, such as waiting for disk I/O, it
  may not be able to act on the signal that was sent.

  Most system administrators will usually resort to the more abrupt
  signal when an application doesn’t respond to a SIGTERM:

  kill -9 2563

  The -9 tells the kill command that you want to send
  signal #9, which is called SIGKILL. With a name like that, it’s
  obvious that this signal carries a little more weight.

  Although SIGKILL is defined in the same signal header file as SIGTERM,
  it cannot be ignored by the process. In fact, the process isn’t even
  made aware of the SIGKILL signal since the signal goes straight to the
  kernel init. At that point, init will stop the process. The process
  never gets the opportunity to catch the signal and act on it.

  However, the kernel may not be able to successfully kill the process
  in some situations. If the process is waiting for network or disk I/O,
  the kernel won’t be able to stop it. Zombie processes and processes
  caught in an uninterruptible sleep cannot be stopped by the kernel,
  either. A reboot is required to clear those processes from the system.

When you sent killall (SIGTERM) to the thunderbird processes, you requested those processes to stop. Some of those processes weren't working correctly (probably why you needed to kill them in the first place), so they couldn't act on the SIGTERM signal.


Samba Internal DNS - Systemd resolve safe to disable?

Re-enable systemd-resolve.

Two possibilities...

Regarding dnsmasq and systemd-resolved...

Do a ps auxc | grep -i dns and ps auxc | grep -i resolv and look for dnsmasq and systemd-resolved, and if both are running, you need to disable the DNS part of systemd-resolved by editing /etc/systemd/resolved.conf and...

change:

#DNSStubListener=yes

to:

DNSStubListener=no

then restart systemd-resolve and dnsmasq, or reboot.

you MAY need to reset the symlink that is /etc/resolv.conf (if dnsmasq is not running)...

sudo mv /etc/resolv.conf /etc/resolv.conf.OLD # save the old symlink

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf # create new symlink

Update #1:

Many details of this installation came forward in the comments, and we still don't have a final working solution. Here are some points to recognize...

DNSStubListener=no does not belong in /etc/resolv.conf. (/etc/resolv.conf should not (normally) be edited directly). It's an edit to /etc/systemd/resolved.conf. DNS= can also be edited there to add DNS server addresses.

/etc/resolv.conf should be a symlink, linked to one of two possible locations in /run.

NEW -> /run/systemd/resolve/resolv.conf
OLD -> ../run/resolvconf/resolv.conf

and should contain either 127.0.0.53 (or 127.0.0.1 if dnsmasq was running), or DNS nameserver addresses, or your router's address (ex: 192.168.1.1)

If you're going to use NetworkManager instead of netplan, then /etc/netplan should contain at least one .yaml file containing...

network:
  version: 2
  renderer: NetworkManager

followed by...

sudo netplan --debug generate # generate config files

sudo netplan apply # apply configuration

If you're using NetworkManager, then /etc/NetworkManager/NetworkManager.conf should exist... and should look something like...

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no

If dnsmasq AND systemd-resolve are running, then you should do #1 in my answer.

If dnsmasq is not running, and systemd-resolve is running, then you should do #2 in my answer.


can I use sonycybershot digital camera for videochatting

If your camera has a webcam mode you should be able to use it as any other webcam. Just change the device in the options of whatever program you use. Of course you have to activate that mode on your camera first. If it doesn't have such a mode, you can't use it as webcam no matter what software or operating system you use.


I would give Bumblebee a try, although HDMI ports are a bit of a hit-and-miss sometimes:
Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


Well, I fixed it.

I needed to copy the /etc/apt/sources.list to /mnt/boot-sav/std3/etc/apt

It then worked.

PD: You may need to sudo chroot "/mnt/boot-sav/sda3" apt-get update, sometimes the program is not on the list


Update Information Outdated (conflicting message?)

This is usually caused by a problem with a repository (as the message states). Try to manually disable ppa's until this problem is solved.

Guide to disabling repositories:

start Ubuntu Software Center
click edit in the top bar and go to software sources
Select 'other sources' in the top bar of the new window
deselect any of the ppa's which could be the cause of this problem (the more 'fishy' ppa's)

I had this caused once by a ppa for canon drivers, just to give a idea as to what you are searching for.


Can not change folder location in overGrive - no syncing possible

Seems like overGrive needs to make sure the default path is available before allowing you to change it to somewhere else. Try to manually create a folder exactly as suggested, e.g. /media/martin/sklad/Google Drive, then open overGrive and change the folder location. At least that worked in my case.


If you have already set up PHPMyAdmin, you can edit the /etc/phpmyadmin/config.inc.php file and set the $cfg['Servers'][$i]['host'] value (and friends) to the IP address or DNS name of the MySQL server you are trying to connect to.

PHPMyAdmin's documentation is quite good.  There's usually a block similar to:

$cfg['Servers'][$i]['host'] = 'your_server'; // MySQL hostname
$cfg['Servers'][$i]['port'] = '3306'; // MySQL port
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['connect_type']= 'tcp';
$cfg['Servers'][$i]['user'] = 'username'; // MySQL user
$cfg['Servers'][$i]['password'] = 'password'; // MySQL password

You'll just need to point the 'host' value to the IP of your MySQL node and make sure TCP port 3306 is open inbound in your firewall at least for your Apache/PHP node.


Why script doesn't see envvar while installing via Ubuntu Software Center?

/etc/environment is only read at login so any settings there are only known by programs started from users after login.

Ubuntu Software Center uses aptdaemon to do the package installation. aptdaemon is a system service (started on demand by DBus) so it doesn't know about the settings in /etc/environment.


mplayer aalib missing ("-vo aa" not working)

OK, it seems the problem is in the mplayer2 package which does not contain aa (libaa1) support.

I've tried mplayer (the old one, not mplayer2) package and it works!

Here is what I've just done to make it work:

$ sudo apt-get purge smplayer
$ sudo apt-get purge mplayer2
$ sudo apt-get autoremove
$ sudo apt-get install mplayer smplayer

This way I've achieved to have mplayer 1.x, in particular 1.1-4.8:

$ mplayer --version
Unknown option on the command line: --version
Error parsing option on the command line: --version
MPlayer 1.1-4.8 (C) 2000-2012 MPlayer Team

(which is the same version as @Sneetsher reported - thank you!)

Now it's working almost the same as before again. I suppose the problem occurred after upgrading to 14.04 somehow, maybe because, if I am not wrong, I had not mplayer installed explicitly, but rather just "shipped-in" as dependency of smplayer (?) - this is my hypothesis so far.

"almost the same as before" means it runs, but it's strangely blinking all the time. Before having all this trouble the picture was bright and clean. However, I've came to this workaround:
http://andrusiv.com/blog/2010/01/08/mplayer-is-superman-of-mediaplayers.html

You have to use the -really-quiet parameter.

You might also want to adjust the pixel aspect ratio to make use of the whole screen with -monitorpixelaspect X parameter where X is a number to play with - try 0.7 or similar.

So my final typical usage of mplayer to render video in ASCII from X is as follows:

xterm -geometry 269x102 -fn 5x7 -e "mplayer -noautosub -really-quiet -monitorpixelaspect 0.9 -vo aa:driver=curses:contrast=35 *"

BTW, to list the fonts available in your system, you might want to run xlsfonts

If you would like to play videos like this in text mode only (single user mode with console only, no X), you would probably appreciate set some smaller console font first, something like this might help:

setfont /usr/share/consolefonts/Uni1-VGA8.psf.gz

Typical usage of mplayer to render video in ASCII from text-only console (no X) is as follows:

defaultfont="/usr/share/consolefonts/Uni2-Fixed16.psf.gz"
font="/usr/share/consolefonts/Uni1-VGA8.psf.gz"
test -e "$font" && setfont "$font" || { echo "ERROR: font \"$font\" could not be set :(" >&2; exit 1; }
mplayer -noautosub -really-quiet -monitorpixelaspect 1 -vo aa:driver=curses:contrast=35 *
test -e "$defaultfont" && setfont "$defaultfont" || { echo "ERROR: supposed default font \"$defaultfont\" could not be set, sorry :(" >&2; exit 1; }

You may combine it into one script:

$ cat ~/bin/asciiplay.sh
#!/bin/bash
#play all readable files in current directory with mplayer and render them in ASCII
#crysman (copyleft)2014

#list fonts in X:
#xlsfonts

#list fonts in text-only (TTY) mode:
#ll /usr/share/consolefonts

# we detect text-only mode
textonly=`tty | grep tty | wc -l`

if [ $textonly -ge 1 ]; then
  #Xubuntu 14.04 TTY console default font:
  defaultfont="/usr/share/consolefonts/Uni2-Fixed16.psf.gz"
  #let's set a more appropiate font:
  font="/usr/share/consolefonts/Uni1-VGA8.psf.gz"
  test -e "$font" && setfont "$font" || { echo "ERROR: font \"$font\" could not be set :(" >&2; exit 1; }
  #play it all
  mplayer -noautosub -really-quiet -monitorpixelaspect 1 -vo aa:driver=curses:contrast=35 *
  #revert to default console font:
  test -e "$defaultfont" && setfont "$defaultfont" || { echo "ERROR: supposed default font \"$defaultfont\" could not be set, sorry :(" >&2; exit 1; }
else
  #likely usable fonts:
  #font=-misc-fixed-medium-r-normal--6-60-75-75-c-40-iso8859-1
  #font=-misc-fixed-medium-r-normal--7-50-100-100-c-50-iso8859-1
  font=5x7
  #font=micro
  #geometry optimized for font 5x7 on 1366x768 resolution:
  xterm -geometry 269x102 -fn $font -e "mplayer -noautosub -really-quiet -monitorpixelaspect 0.9 -vo aa:driver=curses:contrast=35 *"
fi;

I've created a launchpad bug regarding to mplayer2 not supporting aa here:
https://bugs.launchpad.net/ubuntu/+source/mplayer2/+bug/1338000

Happy ASCIIing! ;)
McZ


How can I see which video card on my Optimus-enabled machine is being used?

The command glxinfo displays which video adapter is used for OpenGL graphics. Look for a line similar to the following:

OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile

The above is displayed on my laptop even though it has Nvidia Optimus discrete GPU. This means that it is still using the integrated Intel GPU for 3D graphics.

After setting up bumblebee I run optirun glxinfo and can see that the system now uses the Nvidia GPU, but only when running commands with optirun:

OpenGL renderer string: GeForce GT 540M/PCIe/SSE2

In the end I found out that the Nvidia GPU performs actually worse through bumblebee than with the integraded Intel GPU enabled with DRI_PRIME=1 setting. I will try again when/if there is a better solution in future.


Need to create a Xconfig file- ubuntu 16

You can create the file with any text editor, using sudo to obtain administrative permissions e.g.

sudo nano /etc/X11/xorg.conf

Then simply paste the contents in, and save.

If you want to use a GUI-based editor such as gedit, then make sure to add the -H parameter for the reasons described here Why should users never use normal sudo to start graphical applications?

sudo -H gedit /etc/X11/xorg.conf


This Linux/Ubuntu audio/sound problem seems to be caused by Linux kernel incompatibility with Realtek ALC287 chipset. So this will happen not only for Lenovo Yoga 7i but any laptop or device using this specific chipset.
In my Lenovo Yoga 7i system:

built-in speakers: not working
headphones connected to 3.5 mm jack: audio output works
headset with mic connected to 3.5 mm jack: not yet tested
TV audio output connected to HDMI over USB-C: not yet tested
Bluetooth speakers: work (should be anyway)

See: https://bugzilla.kernel.org/show_bug.cgi?id=208555
Other resources:

https://forums.lenovo.com/t5/Other-Linux-Discussions/No-sound-from-speakers-using-Realtek-ALC287/m-p/5061232
https://unix.stackexchange.com/questions/611530/how-can-i-get-my-unsupported-sound-card-to-work-with-alsa
https://github.com/alsa-project/alsa-lib/issues/76


System 76 offers you the ability to disable the Intel Management Engine, a computer-within-your-computer. However, if you change your OS to a different release or version, IME may return.

Some folks don't like IME for security reasons. Suggest you do your own research on the benefits and downsides of IME before you make a decision.


Your processor is not powerful enough to run Ubuntu. The min recomended processor has at least 700 mhz.

Source: Ubuntu System Requirements


Regarding the netflix-desktop issue: It is a known bug with pulseaudio and netflix-desktop. You should restart the pulseaudio server, by

pulseaudio -k

Restarting the pulseaudio server may even solve your flash problems with Chrome, so try this first. Or you can find in that bug report a link to a website with another solution.

Chrome uses it's internal flash plugin, whereas Firefox uses the system-wide plugin. If Chrome behaves badly, but firefox not, then most likely it is a problem with the internal plugin. Please look here for other answers.


Python applications crash with module errors

Looks like you may need to set your Python environment path. First, go in your terminal, and execute the command, echo $PYTHONPATH. This variable may be empty. If so, you can create a new one. Do this by executing the command export PYTHONPATH=/usr/lib/python2.x/ If this works, append this command to your ~/.bashrc file. If you cannot locate this file in your home directory, press ctrl+h. Hope I helped!

To test to see if your path was properly set, open a Python shell and do import test. If it says, No module named test then you didn't properly set your environment variable.


ModuleNotFoundError: No module named 'powerline_shell'

So I got the Solution for my question.

Type  >
vi .bashrc in  a terminal
And delete all the codes for Powerline-Shell .If previously edited.
Save the file and restart the terminal.


For me the following fix worked:
In /etc/pulse/default.pa , find this section :
### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

after this section add the following line:
load-module module-detect

save exit. after reboot, the sound issue should be fixed
I don't exactly know in depth details of what was causing this, but I tried almost all fixes given on all forum in the end only this worked.
I am using kernel 5.8, signed version from ubuntu repository


Volume Control Stopped Working - always max voume

Try this: go to System > Preferences > Sound, then in the Output tab, select a device different from the selected one, until you find one working together with the global volume control.


How to write alias when the command includes file path

I assume what you wanted to ask is how to use command line arguments in conjunction with an alias (which you cannot).
Try to define a function instead:

Using zsh:
% func abc() { echo python abc.py -p "$1" -c "$2" }
% abc def ghi
python abc.py -p def -c ghi

Using bash:
$ function abc { echo python abc.py -p "$1" -c "$2"; }
$ abc def ghi
python abc.py -p def -c ghi

You might also want to have a look at alias vs. function in bash scripts.


Welcome to Linux!

If you want a guide for Ubuntu Server, visit this link: https://help.ubuntu.com/, and choose your version. When you click on your version, you'll find an Ubuntu Server Guide link. I think that is an excellent and organized guide. There's a section for LAMP applications in it.

Since you're new to Linux and Ubuntu in general, there's an excellent guide called the Ubuntu Pocket Guide. I read this when I was beginning with Ubuntu (as a normal desktop user though) and it was extremely helpful.


Have you tried localepurge? (aptitude show localepurge)


I was able to fix the issue by installing appindicator extention

https://extensions.gnome.org/extension/615/appindicator-support/


How do I combine two toolbar buttons into one?

This can be done directly through Glade.

Build and select your toolbar. In the right select the common tab and add the line inline-toolbar to the Style classes.

Note that you won't see anything different in the editor itself, but only when you run the application or through the builtin previewer.

If you build your interface by hand, you have to set the style class manually like this:

# You take care of getting the toolbar ofcourse
context = toolbar.get_style_context()
context.add_class(Gtk.STYLE_CLASS_INLINE_TOOLBAR)

More style classes can be found in the documentation.


Disabling restricted graphics drivers not listed by jockey-text

Here are some instructions:

Boot into Recovery Mode
Open a Terminal
Run the following commands:

sudo apt-get remove --purge nvidia-*
sudo apt-get install ubuntu-desktop
sudo rm /etc/X11/xorg.conf
echo 'nouveau' | sudo tee -a /etc/modules

This will remove the Nvidia drivers and revert to the nouveau ones. Since the Nvidia drivers have ubuntu-desktop as a dependency, it also reinstalls that.


How to create desktop shortcut for Firefox 79 on Ubuntu 20.04

There were several traps here to creating a working firefox.desktop file:

"Allow launching" is not an option in Ubuntu 20.04
The desktop file must have full path to files like /home/wonko/firefox -  using the ~/firefox shortcut will not work
the desktop file has to be placed in ~/.local/share/applications directory.

Here is what I did without installing additional software, all from command line.

Install firefox from tar file to /home/wonko/firefox

[optional] Download firefox.ico from from the interwebs and save in /home/wonko/firefox

cd ~

create firefox.desktop file

paste this into the file [change paths to suit your own config]
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Exec=/home/wonko/firefox/firefox
Name=Firefox
Comment=Firefox
Icon=/home/wonko/firefox/icons/updater.png

Run chmod +x firefox.desktop

Run cp firefox.desktop ~/.local/share/applications

After a few seconds, you should see the Firefox icon in your dock and you're good to go. You can also launch by pressing Super and typing in firefox.


Installing Snappy Ubuntu Core on an old Android phone

not sure if this question still bugs you, but I guess the best starting point might be here: http://docs.ubuntu.com/core/en/guides/build-device/gadget and espacially this site : http://docs.ubuntu.com/core/en/reference/gadget.


Do I have an unstable Debian 8 distribution?

No, you have a distribution which is based on Debian sid / unstable, which is the under development release of Debian.

This means that being under development Debian sid / unstable is not guaranteed to be stable at all times; it has a very fast update cycle and it's likely that an update could break stability.

It must be noted that one of the characteristics of Debian has always been striving for stability (in fact it's one of the most popular distributions for production servers); calling it "unstable" makes sense especially in the context of a rolling-release distribution model where the user should expect things to break suddenly.

But that's not what you're using, you're using a  fork of Debian sid / unstable on which Canonical's developer worked to fix potential issues, potentially merging fixes released directly for Debian sid / unstable, in order to make a functional distribution.

Addin to this, it must be noted that the update cycle on Ubuntu is way different, slower and safer compared to Debian sid / unstable: updates are first uploaded to the dedicated "proposed" channel, they are tested for about a week or less and only then they're uploaded to the "updates" channel.

So you're using a distribution based on the under development release of Debian, on which someone has worked in order to make it useable by the end-user, which has a way different, slower and safer update cycle.


How to use netplan to do the same as was being done using iptables?

Netplan does not support hook scripts:

https://netplan.io/faq#use-pre-up-post-up-etc-hook-scripts

The workaround is to use networkd-dispatcher. The above FAQ gives an example on how to do it.

The following is an example of using networkd-dispatcher to run existing ifup hooks via a script installed in /etc/networkd-dispatcher/routable.d/50-ifup-hooks:

#!/bin/sh

for d in up post-up; do
    hookdir=/etc/network/if-${d}.d
    [ -e $hookdir ] && /bin/run-parts $hookdir
done
exit 0

Similarly, here is an example of an ifdown hook installed in /etc/networkd-dispatcher/off.d/50-ifdown-hooks:

#!/bin/sh

for d in down post-down; do
    hookdir=/etc/network/if-${d}.d
    [ -e $hookdir ] && /bin/run-parts $hookdir
done
exit 0


Move all files from the partition where Ubuntu installed to another partition

i.e: move all the files on screen to "New Volume"


Unable to allocate free space to Ubuntu partition

Note: You really need a bigger disk... or remove some stuff from sda4, and use Windows Disk Manager to resize sda4... then move/resize the ext4/swap partitions with gparted...
Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB
start gparted
move sda5 partition all the way left
move sda6 partition all the way left
move sda7 partition all the way left
resize the right side of sda7 all the way right
click the Apply icon


Finding a file with name that matches current date

You can use find for this:

find -name "$(date +"%F").csv"

This command will search for files named YYYY-MM-DD.csv using the current date

As @Zanna pointed out in the comments, it seems like you are dropping a leading 0 from the date in your file name. In that case you should use this:

find -name "$(date +"%Y-%-m-%-d").csv"


Get rid of the sequence No. on the first column

Not knowing whether your after C or the line numbers I offer these solutions:

To get rid of the line numbers use:

sed 's/^ *.[0-9]  //g' line.txt

# Result

#
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_sunxi=y
# CONFIG_TARGET_sunxi_BPI-M1-Plus is not set
CONFIG_TARGET_sunxi_BPI-M1=y
# CONFIG_TARGET_sunxi_BPI-R1 is not set
CONFIG_TARGET_BOARD="sunxi"
CONFIG_TARGET_ARCH_PACKAGES="sunxi"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16"
CONFIG_CPU_TYPE="cortex-a8+vfpv3"
CONFIG_LINUX_3_18=y
CONFIG_DEFAULT_base-files=y
CONFIG_DEFAULT_busybox=y
CONFIG_DEFAULT_dnsmasq=y
CONFIG_DEFAULT_dropbear=y
CONFIG_DEFAULT_firewall=y
CONFIG_DEFAULT_fstools=y
CONFIG_DEFAULT_ip6tables=y

To get rid of the C use:

sed '5,22s/ [C]//g' line.txt

# Results

1  #
2  # Automatically generated file; DO NOT EDIT.
3  # OpenWrt Configuration
4  #
5 ONFIG_MODULES=y
6 ONFIG_HAVE_DOT_CONFIG=y
7 ONFIG_TARGET_sunxi=y
8  #ONFIG_TARGET_sunxi_BPI-M1-Plus is not set
9 ONFIG_TARGET_sunxi_BPI-M1=y
10  #ONFIG_TARGET_sunxi_BPI-R1 is not set
11 ONFIG_TARGET_BOARD="sunxi"
12 ONFIG_TARGET_ARCH_PACKAGES="sunxi"
13 ONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -march=armv7-a -mtune=cortex-a8 -mfpu=vfpv3-d16"
14 ONFIG_CPU_TYPE="cortex-a8+vfpv3"
15 ONFIG_LINUX_3_18=y
16 ONFIG_DEFAULT_base-files=y
17 ONFIG_DEFAULT_busybox=y
18 ONFIG_DEFAULT_dnsmasq=y
19 ONFIG_DEFAULT_dropbear=y
20 ONFIG_DEFAULT_firewall=y
21 ONFIG_DEFAULT_fstools=y
22 ONFIG_DEFAULT_ip6tables=y

To write to original file and create a backup use the --in-place option in sedcommand:

sed --in-place=.bak '5,22s/ [C]//g' line.txt

sed --in-place=.bak 's/^ *.[0-9]  //g' line.txt

To write to a new file:

sed 's/^ *.[0-9]  //g' line.txt >> new_file.txt

sed '5,22s/ [C]//g' line.txt  >> new_file.txt

To keep the spaces before each line:

sed 's/^ *.[0-9]  /     /g' line.txt


How to remove the option to boot from Ubuntu in the Windows Boot loader?

Start menu > type 'msconfig' > within the 'boot' tab, remove the entry from there.


Spread does not activate when restoring minimised windows across different workspace

This is a bug that at least here has been fixed with the upcoming unity upgrade -4.24.0-0ubuntu1

Here's the bug report I have  on this
https://bugs.launchpad.net/ubuntu/+source/unity/+bug/838055


How do I change the login manager's keyboard layout?

What did seem to work for me was this suggestion: change /etc/default/keyboard.

Banging head on desk indeed, this is ridiculous.


Messed up Kernel parameters, no longer can boot into ubuntu

Try this.

Boot a live-session und change /boot/grub/grub.cfg directly from your broken system. Remove boot option by the upmost  kernel version. Then try to boot this Kernel. If it works you can remove your boot option in /etc/default/grub and update the grub.cfg by runningsudo update-grub


have you dropped the disk or in any other way gave it a heavy impact, if you did the lens might be damaged, you would hear the disk spinning but it couldnt read it and thus doesnt show up in gparted.

just an idea, apart from that i have no idea why it wouldnt show up.
anyway, good luck i hope you find a way to acces your backup


Grub loads instead of Ubuntu whenever my HP streambook reboots

It is UEFI and you show grub not UEFI.
See these bug reports, they seem to have rolled out a version of grub efi boot that uses /EFI/grub (used by Debian) not standard Ubuntu /EFI/ubuntu:
Ubuntu 18.04 similar error /EFI/grub

https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1781042

Ubuntu 18.10 Cosmic installed /EFI/grub

https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1775743

Can you manually boot?
Your install is in /dev/mmcblk0p2  so in grub that is gpt2.

grub> set root=(hd0,gpt2)
grub> configfile /boot/grub/grub.cfg

Then once booted run these:

sudo apt-get install grub-efi-amd64
sudo update-grub


What causes Nautilus to restart whenever I kill it?

Gnome uses a Session Manager (gnome-session) to keep track of what it needs to do. It is responsible for bringing up the whole session, all subprocesses, restoring state and saving it when you log out.

  GNOME provides tools to allow your application to run smoothly from session to session. Users can log out with running applications and have those applications fully restored when they log back in.  – from the Gnome Documentation Library

Among other things, the session manager tries to keep it's instance of Nautilus running. Nautilus has to register with the session manager for that - which it does by default; naturally, there's a command-line option to disable it:

nautilus --sm-disable

You can kill a running Nautilus process for good by running:

killall -9 nautilus


You should download the tor package from here
And then, uncompress the package and then, if you want a direct acces you can create a .desktop file with the following contents
#!/usr/bin/env xdg-open
Version=1.0
Type=Application
Terminal=false
Exec=/path/to/tor
Name=Tor Or whatever you want to name it
Comment=Anonymous Browsing This is for easier location in the dash
Icon=/path/to/icon


How To Set Default Wallpaper As Login Screen Wallpaper [Automatically]?

Try Ubuntu Tweaks.  To install, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:tualatrix/next
sudo apt-get update
sudo apt-get install ubuntu-tweak

Another way of doing it, is right click on the desktop, and click Change Desktop Background.

Click the + sign

Browse, and choose the image, and click open

The desktop background has changed with the new image

This is the login screen, with the new image applied.


how to install opencv for python3.7 when default python3 is python3.5

for python3.x ,try  pip3 command

sudo pip3 install --ignore-installed --upgrade opencv-python


This might be bug 1592833 where accented characters are not being displayed right with Ubuntu GNOME's default Cantarell font.


You don't have permisission necessary to save the file,PHP Apache

Three quick steps

Add your user to the www-data group

sudo usermod -a -G www-data username

Change the owner of /var/www

sudo chown -R username:www-data /var/www

Change the permissions recursively on /var/www

sudo chmod -R 644 /var/www

NB:  Replace username in the commands with your username.


Cannot add an application to the launcher

Issues with the desktop file

Taking the alacarte-made desktop file as a starting point (the other one has more issues), there are two lines which are almost certainly critical, and causing your desktop file to be refused by Dash and the Launcher:

The Exec= line:

Exec=/home/jantek/Instalki/Eclipse Java/eclipse/eclipse

What you are actually trying to do here is to open a file Java/eclipse/eclipse with an executable called Eclipse, located in /home/jantek/Instalki:

Exec=<application> <file>

That is probably not what you intended. Instead of the application (eclipse), you are referring to what seems to be a directory (Exec=/home/jantek/Instalki/Eclipse).

Assuming the executable eclipse (lowercase) is in the folder .../Eclipse (looking at your Icon= line, but check it), your Exec= line simply should be like:

Exec=/home/jantek/Instalki/Eclipse/eclipse

The Icon= line:

Like I mentioned in my comment, Alacarte removes the file extension of any icon you define. Apart from that, just like in the Exec= line, the path you are defining is incorrect (why the space?). Your Icon= line should look like:

Icon=/home/jantek/Instalki/Eclipse/icon.xpm

But again, check if the paths to both the eclipse executable and the icon are correct.

If you fix these two lines, your .desktop file should work fine.

Note:

If the path to your executable or your icon includes foldernames with spaces:

If it is in the Exec= line, put either the whole part after Exec= in quotes:

Exec="/long/path/to/executable/folder with spaces/eclipse"

or just the folder with spaces:

Exec=/long/path/to/executable/"folder with spaces"/eclipse

In the Icon= line, a folder with a space should be fine:

Icon=/long/path/to/executable/folder with spaces/icon.xpm


File system is not clean (The partition is misaligned by 1024 bytes)

This article explains this problem.

The problem with misalignment lies with the partition editor. The partition editor that was used during installation defaulted to Rounding off to nearest cylinder. Whereas for newer installers it defaults to Rounding off to nearest MB.

Possible solutions ...

Back up, repartition, and restore.
Repartition and reinstall.
Use GParted to resize/move the partition that has a problem without backup.

Here is the official document on resizing. It is old though and does not include the dropdownbox regating the MiB setting.
Another one without images.


Running cron job on every Monday, Wednesday & Friday of a week

It can be done in  one line too

0 0 0 0 1,3,5 /pathofscript/


As discussed on IRC this is a limitation of using WOL with MAAS, which can only power on nodes and not power them off (Sleep on LAN anyone? ;) ). Juju will ask MAAS to power off the node but MAAS can't.


What is Stack Clash and what can I do about it?

Stack Clash is an exploit based on a fairly old technique. The memory used by a process is divided into two regions - the stack and the heap. One generally imagines the stack as growing downwards and the heap as growing upwards. What happens when the either grows enough to clash with the other? More generally, what happens when the stack grows enough to encroach into unrelated memory spaces? The original vulnerability is 12 years old, and the Linux kernel developers fixed it temporarily by using a guard page. However, researchers at Qualys have managed to exploit this despite the guard page.

Ars Technica reports:

  Stack Clash vulnerabilities have slowly gained widespread awareness,
  first in 2005 with the findings of security researcher Gaël
  Delalleau and five years later with the release of a Linux
  vulnerability by researcher Rafal Wojtczuk. Linux developers
  introduced a protection that was intended to prevent stack
  clashes, but today's research demonstrates that it's relatively easy
  for attackers to bypass that measure.

  The primary proof-of-concept attack developed by Qualys exploits a
  vulnerability indexed as CVE-2017-1000364. Qualys researchers also
  developed attacks that use Stack Clash to exploit separate
  vulnerabilities, including CVE-2017-1000365 and CVE-2017-1000367. For
  example, when combined with CVE-2017-1000367, a recently fixed flaw in
  Sudo also discovered by Qualys, local users can exploit Sudo to obtain
  full root privileges on a much wider range of OSes. Qualys has so far
  been unable to make the exploits remotely execute code. The sole
  remote application they investigated was the Exim mail server, which
  coincidentally turned out to be unexploitable. Qualys said it can't
  rule out the possibility that such remote code-execution exploits
  exist. Qualys said it will release the proof-of-concept exploits at a
  later date, once people have had time to protect against the
  vulnerabilities.

  [...] Much more information is available in this detailed technical
  advisory from Qualys and this technical analysis from
  grsecurity.

Quoting the LWN article about the original fix from 2010:

  Because Linux does not separate process stack and heap pages,
  overrunning a stack page into an adjacent heap page is possible. That
  means that a sufficiently deep stack (from a recursive call for
  example) could end up using memory in the heap. A program that can
  write to that heap page (e.g. an X client) could then manipulate the
  return address of one of the calls to jump to a place of its choosing.
  That means that the client can cause the server to run code of its
  choosing—arbitrary code execution—which can be leveraged to gain root
  privileges.

The above description applies to various Unix-like kernels.

While Ars Technica does note a temporary workaround mentioned in the Qualys report ("set the hard RLIMIT STACK and RLIMIT_AS of local users and remote services to a low value"), it should be noted that this doesn't necessarily safeguard against this exploit. The only safe way out currently is to upgrade. According to the grsecurity analysis:

  It should be clear that kernel-only attempts to solve this problem
  will necessarily always be incomplete, as the real issue lies in the
  lack of stack probing. Since the alternative real solution depends on
  rebuilding all userland, this is likely the only feasible solution for
  the foreseeable future.

The best we can do now is upgrade the kernel to a patched version.

The 2010 exploit used the X server, this one used sudo, the next one could be any of a multitude of userland programs that, at some point, run under elevated privileges.

Qualys has not published any proof-of-concept code for exploits as yet (they plan to do so at a later date).

There are multiple Ubuntu Security Notices associated with CVE-2017-1000364:

USN-3324-1 (Updated)
USN-3325-1 - Raspberry Pi 2 (Updated)
USN-3326-1
USN-3327-1 - Raspberry Pi 2
USN-3328-1
USN-3329-1
USN-3330-1 - Qualcomm Snapdragon
USN-3331-1 - AWS
USN-3332-1 - Raspberry Pi 2
USN-3333-1 - HWE
USN-3334-1 - Xenial HWE
USN-3335-1
USN-3335-2 - 12.04 ESM
USN-3338-1 - 12.04 ESM

Also note that the CVE tracker lists several release/kernel combinations as pending fixes.

Generally, the simplest fix is to update your systems to the latest kernel package ASAP.

The relevant kernel versions from the USNs (culled using for i in {24..35}; curl -s https://www.ubuntu.com/usn/usn-33$i-1/ | pup 'dl:nth-last-of-type(1)'):

Ubuntu 17.04:

linux-image-4.10.0-24-lowlatency

4.10.0-24.28

linux-image-generic-lpae

4.10.0.24.26

linux-image-generic

4.10.0.24.26

linux-image-4.10.0-24-generic-lpae

4.10.0-24.28

linux-image-4.10.0-24-generic

4.10.0-24.28

linux-image-lowlatency

4.10.0.24.26

Ubuntu 17.04:

linux-image-4.10.0-1008-raspi2

4.10.0-1008.11

linux-image-raspi2

4.10.0.1008.10

Ubuntu 16.10:

linux-image-powerpc-smp

4.8.0.56.69

linux-image-powerpc-e500mc

4.8.0.56.69

linux-image-4.8.0-56-powerpc-smp

4.8.0-56.61

linux-image-4.8.0-56-powerpc-e500mc

4.8.0-56.61

linux-image-4.8.0-56-lowlatency

4.8.0-56.61

linux-image-generic

4.8.0.56.69

linux-image-4.8.0-56-generic

4.8.0-56.61

linux-image-powerpc64-emb

4.8.0.56.69

linux-image-virtual

4.8.0.56.69

linux-image-powerpc64-smp

4.8.0.56.69

linux-image-4.8.0-56-generic-lpae

4.8.0-56.61

linux-image-generic-lpae

4.8.0.56.69

linux-image-lowlatency

4.8.0.56.69

linux-image-4.8.0-56-powerpc64-emb

4.8.0-56.61

Ubuntu 16.10:

linux-image-4.8.0-1040-raspi2

4.8.0-1040.44

linux-image-raspi2

4.8.0.1040.44

Ubuntu 16.04 LTS:

linux-image-powerpc64-smp-lts-utopic

4.4.0.81.87

linux-image-generic-lts-wily

4.4.0.81.87

linux-image-generic-lts-utopic

4.4.0.81.87

linux-image-4.4.0-81-generic-lpae

4.4.0-81.104

linux-image-powerpc64-emb-lts-vivid

4.4.0.81.87

linux-image-powerpc-e500mc

4.4.0.81.87

linux-image-generic-lpae-lts-xenial

4.4.0.81.87

linux-image-generic-lpae-lts-utopic

4.4.0.81.87

linux-image-powerpc-e500mc-lts-xenial

4.4.0.81.87

linux-image-4.4.0-81-powerpc64-emb

4.4.0-81.104

linux-image-powerpc-e500mc-lts-wily

4.4.0.81.87

linux-image-4.4.0-81-powerpc-e500mc

4.4.0-81.104

linux-image-generic-lpae-lts-wily

4.4.0.81.87

linux-image-virtual-lts-vivid

4.4.0.81.87

linux-image-virtual-lts-utopic

4.4.0.81.87

linux-image-virtual

4.4.0.81.87

linux-image-powerpc64-emb-lts-wily

4.4.0.81.87

linux-image-lowlatency-lts-vivid

4.4.0.81.87

linux-image-powerpc-e500mc-lts-vivid

4.4.0.81.87

linux-image-powerpc64-emb

4.4.0.81.87

linux-image-powerpc-smp-lts-xenial

4.4.0.81.87

linux-image-4.4.0-81-generic

4.4.0-81.104

linux-image-powerpc64-smp-lts-vivid

4.4.0.81.87

linux-image-lowlatency-lts-wily

4.4.0.81.87

linux-image-4.4.0-81-lowlatency

4.4.0-81.104

linux-image-generic

4.4.0.81.87

linux-image-lowlatency-lts-xenial

4.4.0.81.87

linux-image-powerpc64-smp-lts-xenial

4.4.0.81.87

linux-image-powerpc64-emb-lts-utopic

4.4.0.81.87

linux-image-generic-lts-xenial

4.4.0.81.87

linux-image-generic-lts-vivid

4.4.0.81.87

linux-image-powerpc-e500mc-lts-utopic

4.4.0.81.87

linux-image-powerpc-smp

4.4.0.81.87

linux-image-4.4.0-81-powerpc-smp

4.4.0-81.104

linux-image-generic-lpae-lts-vivid

4.4.0.81.87

linux-image-generic-lpae

4.4.0.81.87

linux-image-powerpc64-smp-lts-wily

4.4.0.81.87

linux-image-powerpc64-emb-lts-xenial

4.4.0.81.87

linux-image-powerpc-smp-lts-wily

4.4.0.81.87

linux-image-virtual-lts-wily

4.4.0.81.87

linux-image-powerpc64-smp

4.4.0.81.87

linux-image-4.4.0-81-powerpc64-smp

4.4.0-81.104

linux-image-powerpc-smp-lts-utopic

4.4.0.81.87

linux-image-powerpc-smp-lts-vivid

4.4.0.81.87

linux-image-lowlatency

4.4.0.81.87

linux-image-virtual-lts-xenial

4.4.0.81.87

linux-image-lowlatency-lts-utopic

4.4.0.81.87

Ubuntu 16.04 LTS:

linux-image-4.4.0-1016-gke

4.4.0-1016.16

Ubuntu 16.04 LTS:

linux-image-snapdragon

4.4.0.1061.54

linux-image-4.4.0-1061-snapdragon

4.4.0-1061.66

Ubuntu 16.04 LTS:

linux-image-4.4.0-1020-aws

4.4.0-1020.29

Ubuntu 16.04 LTS:

linux-image-raspi2

4.4.0.1059.60

linux-image-4.4.0-1059-raspi2

4.4.0-1059.67

Ubuntu 16.04 LTS:

linux-image-4.8.0-56-powerpc-smp

4.8.0-56.61~16.04.1

linux-image-4.8.0-56-powerpc-e500mc

4.8.0-56.61~16.04.1

linux-image-4.8.0-56-lowlatency

4.8.0-56.61~16.04.1

linux-image-4.8.0-56-generic

4.8.0-56.61~16.04.1

linux-image-generic-hwe-16.04

4.8.0.56.27

linux-image-lowlatency-hwe-16.04

4.8.0.56.27

linux-image-4.8.0-56-generic-lpae

4.8.0-56.61~16.04.1

linux-image-virtual-hwe-16.04

4.8.0.56.27

linux-image-generic-lpae-hwe-16.04

4.8.0.56.27

linux-image-4.8.0-56-powerpc64-emb

4.8.0-56.61~16.04.1

Ubuntu 14.04 LTS:

linux-image-powerpc-smp-lts-xenial

4.4.0.81.66

linux-image-lowlatency-lts-xenial

4.4.0.81.66

linux-image-4.4.0-81-powerpc-smp

4.4.0-81.104~14.04.1

linux-image-4.4.0-81-powerpc-e500mc

4.4.0-81.104~14.04.1

linux-image-4.4.0-81-lowlatency

4.4.0-81.104~14.04.1

linux-image-4.4.0-81-generic-lpae

4.4.0-81.104~14.04.1

linux-image-generic-lpae-lts-xenial

4.4.0.81.66

linux-image-powerpc64-smp-lts-xenial

4.4.0.81.66

linux-image-4.4.0-81-generic

4.4.0-81.104~14.04.1

linux-image-4.4.0-81-powerpc64-smp

4.4.0-81.104~14.04.1

linux-image-generic-lts-xenial

4.4.0.81.66

linux-image-powerpc64-emb-lts-xenial

4.4.0.81.66

linux-image-powerpc-e500mc-lts-xenial

4.4.0.81.66

linux-image-virtual-lts-xenial

4.4.0.81.66

linux-image-4.4.0-81-powerpc64-emb

4.4.0-81.104~14.04.1

Ubuntu 14.04 LTS:

linux-image-powerpc-e500mc

3.13.0.121.131

linux-image-lowlatency-pae

3.13.0.121.131

linux-image-3.13.0-121-powerpc64-emb

3.13.0-121.170

linux-image-generic-pae

3.13.0.121.131

linux-image-3.13.0-121-powerpc-smp

3.13.0-121.170

linux-image-3.13.0-121-powerpc-e500mc

3.13.0-121.170

linux-image-3.13.0-121-powerpc-e500

3.13.0-121.170

linux-image-3.13.0-121-generic-lpae

3.13.0-121.170

linux-image-generic-lts-quantal

3.13.0.121.131

linux-image-virtual

3.13.0.121.131

linux-image-powerpc-e500

3.13.0.121.131

linux-image-generic-lts-trusty

3.13.0.121.131

linux-image-3.13.0-121-generic

3.13.0-121.170

linux-image-omap

3.13.0.121.131

linux-image-powerpc64-emb

3.13.0.121.131

linux-image-3.13.0-121-powerpc64-smp

3.13.0-121.170

linux-image-generic

3.13.0.121.131

linux-image-highbank

3.13.0.121.131

linux-image-generic-lts-saucy

3.13.0.121.131

linux-image-powerpc-smp

3.13.0.121.131

linux-image-3.13.0-121-lowlatency

3.13.0-121.170

linux-image-generic-lpae-lts-saucy

3.13.0.121.131

linux-image-generic-lts-raring

3.13.0.121.131

linux-image-powerpc64-smp

3.13.0.121.131

linux-image-generic-lpae-lts-trusty

3.13.0.121.131

linux-image-generic-lpae

3.13.0.121.131

linux-image-lowlatency

3.13.0.121.131

Ubuntu 12.04 ESM:

linux-image-powerpc-smp

3.2.0.128.142

linux-image-3.2.0-128-virtual

3.2.0-128.173

linux-image-3.2.0-128-generic-pae

3.2.0-128.173

linux-image-generic

3.2.0.128.142

linux-image-generic-pae

3.2.0.128.142

linux-image-highbank

3.2.0.128.142

linux-image-3.2.0-128-highbank

3.2.0-128.173

linux-image-3.2.0-128-powerpc-smp

3.2.0-128.173

linux-image-virtual

3.2.0.128.142

linux-image-powerpc64-smp

3.2.0.128.142

linux-image-3.2.0-128-omap

3.2.0-128.173

linux-image-3.2.0-128-powerpc64-smp

3.2.0-128.173

linux-image-omap

3.2.0.128.142

linux-image-3.2.0-128-generic

3.2.0-128.173

Ubuntu 12.04 LTS:

linux-image-3.13.0-121-generic

3.13.0-121.170~precise1

linux-image-generic-lpae-lts-trusty

3.13.0.121.112

linux-image-generic-lts-trusty

3.13.0.121.112

linux-image-3.13.0-121-generic-lpae

3.13.0-121.170~precise1

Sudo

The aforementioned sudo bug is covered by USN-3304-1, from May 30, 2017:

Ubuntu 17.04:

sudo-ldap

1.8.19p1-1ubuntu1.1

sudo

1.8.19p1-1ubuntu1.1

Ubuntu 16.10:

sudo-ldap

1.8.16-0ubuntu3.2

sudo

1.8.16-0ubuntu3.2

Ubuntu 16.04 LTS:

sudo-ldap

1.8.16-0ubuntu1.4

sudo
1.8.16-0ubuntu1.4

Ubuntu 14.04 LTS:

sudo-ldap
1.8.9p5-1ubuntu1.4

sudo
1.8.9p5-1ubuntu1.4


When you look at memory for your VMs, 192+19 is 211GB. And VM1 is using 126GB for buff/cache. It is typical for linux to eat all the memory which is available to cache i/o. If you want to decrease stress on memory on your host, make VM1 smaller.


How can I access Apache (on VirtualBox guest) from host?

If you need other machines in your physical network to be able to reach your VM (or if the VM needs Internet access), use bridged networking. Otherwise, stick to host-only networking.

Stop your VM and open its settings in the VirtualBox (OSE) Manager
Go to the Network tab
Select the network mode at your choice (bridged networking or host-only) (in the below example, I'm using host-only)

If you want to use bridged networking, you've to select the right network adapter at Name. For wired connections, you'd select something named like eth0. Wireless connections are usually named wlan0 (the numbers may vary)
Save the settings
Start the Ubuntu VM
When up, you can gather the IP address by running:

ifconfig | grep addr

In the below output, 192.168.56.101 is the IP address that can be used in your Win7 host system to access your VM:

eth0  Link encap:Ethernet  HWaddr 08:00:27:70:27:fe
      inet addr:192.168.56.101  Bcast:192.168.56.255  Mask:255.255.255.0
      inet6 addr: fe80::a00:27ff:fe7b:25fe/64 Scope:Link
      inet addr:127.0.0.1  Mask:255.0.0.0
      inet6 addr: ::1/128 Scope:Host

In your windows host system, edit C:\Windows\System32\drivers\etc\hosts as administrator and add a line:

192.168.56.101   guestserver.com

If you've a Ubuntu host system, edit /etc/hosts using sudo nano /etc/hosts
Profit!


Do I need to activate the firewall? I only use Ubuntu for a home desktop use?

In most desktop cases you don't need to have a firewall. When you use a router at home, it does already quite a job -- for example, it does network address translation (NAT) such that you only have a local IP -- not reachable from the Internet.

Also, Ubuntu does not open any ports out of the box, so that there is no real danger of anyone trying to hack into your SSH.

Finally, all firewalls actually are different interfaces to the same thing -- the iptables of the Linux kernel.

You really need a firewall if your machine sits in a LAN, with an IP visible for the whole world and you need to open up some ports (for example, you run a server, be that a test web server installation or an SSH server).

Furthermore, a firewall is very useful if you want to limit which addresses are allowed to use an open port on your machine (e.g. you only allow the IP of your lab workstation to connect to the SSH port of your home computer).

Of course, you might want to learn iptables one day :-) However, in that case, learn the iptables and networking first, and then use one of the alternatives which make the life of a network admin easier.


How to disable gnome fallback animations?

I found this by utter luck using dconf-editor:

/org/gnome/desktop/interface/enable-animations


What would be the command line equivalent of "always on top" option on windows?

Install wmctrl
Open a terminal and type wmctrl -l. You will see a list of windows and processes.
Type wmctrl -i -r 0x01c00267 -b add,above. Replace 0x01c00267 with the window number you want to be on top.


Install the package xdotool via, we need the command xdotool

sudo apt-get install xdotool

Create a small script

#!/bin/bash
sleep 0.1
xdotool type $(date +"%H:%M")' '$(date +"%d.%m.%Y.")

If the output does not looks something like

17:31 15.08.2015.

use

#!/bin/bash
sleep 0.1
xdotool type $(date +"%H")':'$(date +"%M")' '$(date +"%d")'.'$(date +"%m")'.'$(date +"%Y")'.'

If the time is not fully inserted after pressing the shortcut, increment the parameter for sleep, eg 0.5, in the script

Make it executable

chmod +x your_script

Assign a keyboard shortcut for the script, eg Super+F5 or some other shortcut that is not used.


Assuming (from the error message) you installed IE8 through PlayOnLinux, it's important to note that IE8 "isn't fully functional (for using it on a daily basis) at the moment," according to the PlayOnLinux website.  There seem to be quite a few people running into problems with IE8 crashing when opening tabs or even when loading pages.

If you need IE8 to do browser testing (e.g. for web development), I'd strongly recommend using a Windows virtual machine instead. modern.ie is an official Microsoft website that provides virtual machine images that should let you run IE8 in Windows 7 using VirtualBox on Ubuntu.

If you use Seamless Mode, you'll be able to use IE8 side-by-side with Ubuntu applications, and it won't even feel like a virtual machine (but the result will be a much more stable and accurate implementation of IE8).


Wacom BambooFun can't change mode to relative

I've just had the same issue and found the solution. It seems the "Relative" mode applies to the stylus or pen, not the pad. So for me, rather than:

xsetwacom set "Wacom BambooFun 6x8 Pad pad" Mode "Relative"

It was:

xsetwacom set "Wacom BambooFun 6x8 Pen stylus" Mode "Relative"

(notice Pad pad is swapped for Pen stylus. your particular values for these will be gotten from xsetwacom --list devices)

I hope this helps!


It is very difficult to type in a constantly switching console, but not impossible. I found out that the constant switching was caused by gdm3, so I stopped stopped it:

sudo /etc/init.d/gdm3 stop

I could probably have done it by ssh-ing to my desktop as well, which would probably have spared me the difficulty of having to type in a constantly switching console.

Once I got my console back, I figured out that it was a combination of the kernel and the nvidia-304 driver that was causing the problem (the usual suspects). This got my system working again:

Manually install kernel 4.5.2, as explained here: http://www.ubuntumaniac.com/2016/04/update-update-to-linux-kernel-452-on.html
Purge nvidia-304 and install nvidia-361


How can I setup LDAP client authentication?

Had the same problem.

Installing nslcd helped me.


How to upgrade Ubuntu from update manager?

Ubuntu 10.10 and 11.04 and the next version after 11.04 (11.10) ALL have reached EOL (End Of Life). They are not supported anymore. No updates, no new packages, no community support..etc.

Please read the list here

So you cannot upgrade from an unsupported version to another unsupported version. The only thing you can do is to download an .iso image of a supported version: 12.04 or 12.10 or 13.04,  burn it to a CD/DVD or USB , then boot from there and upgrade or have a new install. Your will see the options at Installer window.

PS: Ubuntu 12.04 is the current LTS version and will be supported until April 2017.


How do you install chntpw on Ubuntu 17.04?

chntpw is in the default repositories of Ubuntu 17.04 and all currently supported versions of Ubuntu. To install chntpw open the terminal and type:

sudo apt update
sudo apt install chntpw


How do you find the current "modeline" xrandr is using for an output?

This is a quite old question, but in case anyone stumbles over the problem, here is the answer. From the command line the simplest way is using
> xrandr --verbose
[...]
DP-3 connected 1920x1080+0+0 (0x22d) normal (normal left inverted right x axis y axis) 641mm x 401mm
  1920x1080 (0x22d) 148.500MHz +HSync +VSync *current +preferred
    h: width  1920 start 2008 end 2052 total 2200 skew    0 clock  67.50KHz
    v: height 1080 start 1084 end 1089 total 1125           clock  60.00Hz
[...]

The corresponding modeline can be extracted from the numbers in the output, e.g.
Modeline "1920x1080_60"  148.5  1920 2008 2052 2200  1080 1084 1089 1125  +HSync -Vsync

In case you need to fix the modeline you can also manually add that modeline via xrandr.
> xrandr -d :1 --newmode "1920x1080_60" 148.5 1920 2008 2052 2200 1080 1084 1089 1125 +HSync -VSync
> xrandr --addmode DP-3 "1920x1080_60"
> xrandr --output DP-3 --mode "1920x1080_60"

In case you are writing a program you might of course want to use libXrandr, especially its XRRGetOutputInfo function to read the desired information from the mode's XRRModeInfo struct.


Fan not working on Thinkpad T440s (Ubuntu 14.04)

What solved it for me was to, in BIOS, change the Thermal Management setting from Optimal Performance to Balanced.


How to create shortcut of executable on Unity launcher?

Easiest way imaginable:

Ordinarily start the application. When the icon appears in the Unity taskbar, right click the icon and chose Lock to Launcher.

Note that this will create a .desktop file in ~/.local/share/applications.


Why not using the NetworkManager for this? On the other hand, if you are comfortable with command lines you could use /etc/network/interfaces (just google for this).


How can I remove/ uninstall list of packages immediately after searching them with grep

Since you are grep'ing the output of all the installed packages that contain the word plymouth, you can instead pass a regular expression to apt's remove command.

You can run the following command

sudo apt remove 'plymouth.*' --dry-run

This will remove all packages that contain the word plymouth. However, since the command is using a wildcard like that, it might be dangerous and so it's better to review the changes first, hence the --dry-run parameter.

This will allow you to validate what would happen when you run that command, without actually removing anything. If you are satisfied, you can just rerun the same command without the --dry-run parameter.

The following packages will be REMOVED:
  libplymouth4 plymouth plymouth-label plymouth-theme-ubuntu-logo
  plymouth-theme-ubuntu-text
0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded.
Remv plymouth-theme-ubuntu-text [0.9.3-1ubuntu10]
Remv plymouth-theme-ubuntu-logo [0.9.3-1ubuntu10]
Remv plymouth-label [0.9.3-1ubuntu10]
Remv libplymouth4 [0.9.3-1ubuntu10] [plymouth:amd64 ]
Remv plymouth [0.9.3-1ubuntu10]


Error extracting setup 1 cab when trying to install Osu!

Ubuntu 16.04-18.04

If your computer is 64-bit, add the 32-bit architecture:

sudo dpkg --add-architecture i386

Add the Wine Staging repository:

wget -nc https://dl.winehq.org/wine-builds/Release.key
sudo apt-key add Release.key
sudo apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/

Or in Ubuntu 17.10 and 18.04 you can skip Steps 2-4 and simply type:

sudo apt install wine-stable

Update the list of available software.

sudo apt update

Install winehq-stable.

sudo apt install --install-recommends winehq-stable

Create a new Wine prefix (if you don't want to use your default prefix).

env WINEPREFIX=$HOME/.wineosu wineboot --init

If Wine prompts for installing Mono, click Cancel.
Ensure that Mono is not installed (use 'wine' for 32-bit prefixes, and 'wine64' for 64-bit):

env WINEPREFIX=$HOME/.wineosu wine uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}'
env WINEPREFIX=$HOME/.wineosu wine64 uninstaller --remove '{E45D8920-A758-4088-B6C6-31DBB276992E}'

Set reported version to Windows XP (it will ensure that the installer of .NET 4.0 will copy some required files like mscoree.dll).

env WINEPREFIX=$HOME/.wineosu winecfg

On winecfg dialog, change reported Windows version to Windows XP, and click OK.
Download and install .NET Framework 4.0 (higher versions of .NET will not work on Wine if this version is not previously installed):

wget https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe
env WINEPREFIX=$HOME/.wineosu wine dotNetFx40_Full_x86_x64.exe /q
env WINEPREFIX=$HOME/.wineosu wineboot --restart

Set reported version to Windows Vista, and add mscoree.dll override.

env WINEPREFIX=$HOME/.wineosu winecfg

Change reported Windows version to Windows Vista (because .NET 4.5 and higher don't install on Windows XP/2003, and osu! will not start if reported version is set to Windows 7 or higher).

Go to Libraries tab. Add an override to mscoree and set it to "Native". Close all dialogs by clicking OK.
Download and install .NET Framework 4.6.1 (osu! Stable needs .NET 4.5 or higher to work, and Lazer needs .NET 4.6.1 or higher):

wget https://download.microsoft.com/download/E/4/1/E4173890-A24A-4936-9FC9-AF930FE3FA40/NDP461-KB3102436-x86-x64-AllOS-ENU.exe
env WINEPREFIX=$HOME/.wineosu wine NDP461-KB3102436-x86-x64-AllOS-ENU.exe /q
env WINEPREFIX=$HOME/.wineosu wineboot --restart

Make sure to append the "/q" parameter after the installer path to perform a silent installation, because GUI installation of .NET 4.6.1 still doesn't work (without more workarounds) on Wine.
Download and install osu!:

Stable version: (Beta and Cutting edge must be selected at osu!'s Options menu after Stable is installed):

wget http://m1.ppy.sh/r/osu!install.exe
env WINEPREFIX=$HOME/.wineosu wine 'osu!install.exe'

It's highly recommended to change the installation path to C:\osu! so you can easily find osu! files later. Then you will find them on $HOME/.wineosu/drive_c/osu!. Make sure to use only ASCII characters for the path to avoid installation problems.

Lazer version:

osu!lazer can't be installed using its default installer because it needs non-administrator privileges. Instead, download the "osulazer-full.nupkg" file from https://github.com/ppy/osu/releases and extract it inside your wine drive_c.

Ubuntu 12.04-14.04

Detailed instructions to play osu! on Ubuntu (12.04 through 14.04 + variants) (x86_64)

Add the Official Wine PPA. From the terminal run this command:

sudo add-apt-repository ppa:ubuntu-wine/ppa

Update Software Sources.

sudo apt-get update

Install Wine.

sudo apt-get install wine1.7

Accept the license for the fonts package. (Well, read it first of course. You may have to click the Terminal window and use Tab and Arrow Keys to navigate.)

Create a Wine Prefix Folder.

mkdir 'Wine Prefixes'

Make sure your terminal is at your Home directory. (You can change directories to your home directory using the command cd ~)

Create a osu! Wine Prefix and make it a 32-bit Prefix.

WINEPREFIX='/home/USERNAME/Wine Prefixes/osu!' WINEARCH=win32 winecfg

Replace USERNAME with your Linux username. (You will have to do this for the rest of these instructions.)
Feel free to just close the configuration window afterwards.

Install .NET Framework 2.0 Service Pack 1.

WINEPREFIX='/home/USERNAME/Wine Prefixes/osu!' winetricks dotnet20sp1

Download osume.exe.

wget http://osu.ppy.sh/release/osume.exe

Create a osu! folder in the Program Files folder in your Wine prefix and move osume.exe to it.

mkdir '/home/USERNAME/Wine Prefixes/osu!/drive_c/Program Files/osu!' && mv osume.exe

You can manually create the folders and move osume.exe with GUI also.

Start osume.exe

WINEPREFIX='/home/USERNAME/Wine Prefixes/osu!' wine '/home/USERNAME/Wine Prefixes/osu!/drive_c/Program Files/osu!/osume.exe'

Wait for osu! update to completely download osu!

If you have a beatmap and/or skin library backup somewhere, now would be a good time to restore it.

Start osu!
Do any initial in-game setup you want.

Includes logging in, setting a resolution, changing keybindings, etc.
If you cannot see the login window (it appears behind osu!), set osu! to a smaller window resolution via cfg
If setting a fullscreen resolution causes osu! to crash and you cannot close it, see additional notes.

Exit osu!

From this point on, the only thing you need to do to run osu! is just run the osu!.exe binary (double-click it or use the wine command from the terminal). You will have to create a shortcut(s) to osu! if you want. The easiest way is to go to the folder via the GUI file browser, right-click osu!.exe and make a link, and put the link on your desktop.

Source: WineHQ AppDB osu!


Why do I get Exception in thread "main" java.lang.UnsupportedClassVersionError?

The version number "major.minor version 51.0" show which Java was used to run eclipse.

51.0 = Java J2SE 7

To fix your problem you should try to run eclise with Java 7. This can be done by updating your Java configuration:

sudo update-alternatives --config java

Then select a Java 7 version and retry.

If Java 7 isn't installed you can get it with apt-get:

sudo apt-get install default-jdk


Moonlight 3.99.0.3 is not compatiable with firefox 12?

If your browser reports that "moonlight" is "disabled" due to incompatibility, then here is what you need to do:

Make a backup copy of .mozilla (/home/your_user_name/.mozilla) before proceeding. This will preserve important bookmarks and other things you might want to consider later.

Now delete the .mozilla folder from /home/your_user_name/ and then reinstall all the addons and search plugins you had.

Now go to http://www.go-mono.com/moonlight and again install moonlight from there.

Note:

1) .mozilla is a hidden folder. Press (ctrl+h) to see it.

2) You can restore your bookmarks from backup of .mozilla

mozilla/firefox/om8xf96h.default/bookmarkbackups

This "om8xf96h" will look diffrent on your system. To restore open Bookmarks Window then use the  "Restore" option from "Import and Backup" menu. Click on Restore and then navigate to backup directory and select the last modified .json file (like "bookmarks-2012-05-02.json")

4) To restore search engines (search plugins) copy the "searchplugins" folder from mozilla/firefox/om8xf96h.default/ and paste it to /home/your_user_name/.mozilla/firefox/om8xf96h.default


after dpkg-reconfigure console-setup not able to login on console keyboard

upgrading to kernel 4.20 solved the problem.

I followed theses instruction:
https://linuxhint.com/upgrade-kernel-ubuntu-1804/


How to make installation stick having storage partition

I have done few bootable USB keys for Ubuntu with Startup Disc Creator and could always create additional storage space. When you start Startup Disc Creator and select the USB you desire to make bootable, you will see two selectable options on the bottom part of window. Itreads something like:

When starting from this disk, documants will be stored in reserved extra space... (select this option). You can set how much of this extra space you wish to create. Be sure not to select the option bellow that reads:

Discarded on shutdown unless stored elsewhere.

Anyhow, the space on the USB key that is not occupied with OS image and this extra space is still usable for transfering data, as if the USB key would be "normal" USB key (I mean "not bootable"). But if you boot into live sesion from this key and wish to save something, this will be saved in the extra space you have created and not on the unused part.


Is is possible to modprobe a module from the boot loader?

To load a module when the kernel is called from the bootloader you have only to add the name of the module.

The syntax is the name of the module, if you want to pass an option to the module, type modulename.moduleoption.

For example, in my old computer I have an ISA Plug & Play Ethernet Adapter RTL8019/11901 that works with the NE module. On the kernel command line I add ne.irq=0x0220 and boot. Finally the card is recognized.


How do I fix a missing command whose package is already installed?

I solved this problem relatively easily with sudo apt-get install --reinstall winetricks. Thanks to @steeldiver for providing the solution


The problem is the useragent, maybe they have rules for that.

I tested from my Mac, and it works on both Safari and FF.

Workaround , change your useragent on FF following this tutorial, it worked for me.


How can I create a shell script that will take me to a folder?

You can't use a shell script to change directory, because the script runs in a different process and that child process cannot alter the environment of the current shell process.

You need to write a function or alias that will operate in your current interactive shell. One of these will work:

alias go='cd /really/damn/annoyingly/long/and/it/takes/a/while/to/type'
# or
go() { cd /really/damn/annoyingly/long/and/it/takes/a/while/to/type; }

Pick one, save it in your ~/.bashrc, type source ~/.bashrc and you should be ready to go.


Wolfram Cloud not working in any browser

I had the same issue. It has been solved when I accepted the cookies. Button is on the lower right of the page, easy to miss.

If you have a link to a workbook and the button does not appear (only a white page or similar), then first try to visit https://develop.open.wolframcloud.com, accept the cookies and reload the workbook.

wolfram cloud cookie accept button


Did you check that the invoice2data library was installed correctly?

Run this command:

pip uninstall invoice2data

If the output is

 Skipping invoice2data as it is not installed

Then it was not installed correctly.

I wonder you needed sudo to install invoice2data correctly:

sudo pip install invoice2data

I hope it works.


Ubuntu 20.04 LTS: Screen freezes after login when waking laptop up from suspend

I'm also having the same problem with fresh installation of Ubuntu 20.10.
After some research, i found that the /etc/securetty file didn't exist and gdm3 systemd service reported this.
I created this file and now suspend is working correctly
Guide: Ubuntu 20.04 and 20.10, /etc/securetty: No such file or directory


How to speed up rsync/tar of large Maildir?

I ended up writing a little python script to calculate the correlation between directory names and inodes, inodes and data blocks, and directory names to data blocks.  It turns out that ext4 tends to have rather poor correlation between the order the file names appear in the directory, and where they are stored on disk.  After discussing it on the ext4 mailing list, it turns out that this is the result of the hashed directory indexes used to speed up lookups in large directories.  The names are stored in hash order, which effectively scrambles their order relative to anything else.

It seems to me and at least one other commenter that this is a deficiency in the fs that should be fixed.  Ted Ts'o ( the ext maintainer ) feels that it would be too difficult to do in the fs, and that good tools ( like rsync and tar ) should have an option to sort the directory by inode number before reading the files.

So it looks like feature enhancement requests need filed for rsync and tar.


How to explort content from file into variable?

You can try this:

#!/bin/bash

myjson=$(cat patch/file.jsn)


Changing Live Pendrive to Persistent Pendrive

That works with both BIOS and UEFI

Many people prefer a Persistent pendrive that will save changes.

Create a Live pendrive using Rufus or similar.
Boot the pendrive toram to make the drive editable, (press Shift when booting, press Esc from language, press F6, press Esc, type {space}toram after "quiet splash ---", and press Enter.
Create a casper-rw file:

sudo dd if=/dev/zero of=casper-rw bs=1M count=512
sudo mkfs.ext3 -L casper-rw -F casper-rw

(where count=512 is persistence size, with max 4GB).
Move the new casper-rw file from home to the root of the Live Pendrive.
Edit /isolinux/txt.cfg, (for BIOS boot persistence) and /boot/grub/grub.cfg, (for UEFI boot persistence), add a space and the word "persistent" after "quiet splash ---".
Shut down and reboot the persistent drive.


There is a program called Brightness and Lock. Open your dash using the windows key and type brightness. In that program you can use a slider to adjust the brightness of your screen.


14.10 Cannot connect to internet through a wired connection. Try before install boot option selected

I guess you're trying to boot the 64-bit install DVD with IOMMU disabled in BIOS. Either:

Boot the 32-bit install DVD
Enable the IOMMU for the duration of the installation, then boot the installed kernel with 'iommu=soft' parameter (you can change that in grub).


After Ubuntu install, computer boots directly to windows7, no dualboot

Following the advice of oldfred, I went to help.ubuntu.com/community/UEFI  and tried to follow the instructions.

First, I disabled quick boot.

Second, there was an option to choose, whether what should start first, UEFI or Legacy. I chose Uefi. Then, I started with the USB-stick again and used Boot-Repair. After that, it seems to work. Thanks to oldfred.


Trying to make a Windows 7 USB with UNetBootin, getting error "Failed to load COM32 file menu.c32"

I have recently answered similar question using Unetbootin. Hope it help! Try, comment and vote


Use Android Transfer to transfer file from any ubuntu or android device.


Okular

Install Okular

Okular is a universal document viewer with support for advanced document features, such as annotations, forms, and embedded files.

This package provides the document viewer application, plus plugins for a wide variety of document formats such as:

PostScript (PS)
Portable Document Format (PDF)
OpenDocument Text (ODT)
TeX Device independent file format (DVI)
XML Paper Specification (XPS)
G3 fax
various electronic book formats: ComicBook, FictionBook, and Plucker This package is part of the KDE graphics module.

If KMouth and Jovie is installed, you can use Tools > Speak... to read out the document


Login takes very long, annoying repaints once a minute when logged in: How to troubleshoot?

Frequent crashes of gnome-settings-daemon seem to have been the reason for this problem, which has vanished after some time and some irreproducible manipulations with Gnome settings.


How do I turn off the automatic update of the system time on

System time updating is handled by ntp, which is stopped via

sudo systemctl stop ntp.service

and (re-)started by

sudo /usr/sbin/ntpdate-debian
sudo systemctl start ntp.service

However, setting the time backward has been known to have unintended consequences.


Use the apt-src utility. sudo apt-get install apt-src;man apt-src. Then, you can:

# I keep the sources in ~/apt-src/,
# you may replace that with a directory of your choice
mkdir ~/apt-src
cd ~/apt-src
# download the coreutils source + current patches
apt-src install coreutils
# build the unmodified source first
apt-src build coreutils

Now you have buildable, currently-patched sources (and you've seen the noise/valuable information emitted by a build). Proceed as you would like.


Internal/external mics no longer recognized after dropping laptop

Thanks for the comments. Somehow this worked itself out. Not sure if there's a loose connector or something, but all's well now.


Help to fix acpi on my HP Pavilion DV6-6008el

There is a complete man-page for this at Ubuntu. Get it here

http://manpages.ubuntu.com/manpages/natty/man4/acpi_hp.4freebsd.html


Android 9 phone on Ubuntu 18.10 not showing up

You can try my answer on this link: https://askubuntu.com/a/1111802/183131

But basically Android File Transfer for Linux should do the trick.


Definitely (and unfortunately) not realted to Chrome only - it doesn't work in any app running via XWayland currently.

See Wayland: Multi DPI Setup for nice explanation and current state (as of Sep 2018):

  ...Because (these) apps don't fully support Wayland yet, they still use the X11 protocol with XWayland, which doesn't handle MultiDPI well (GNOME has ideas, but I doubt whether this will happen).


This solution (gstreamer-properties related one)worked for me on m14r2.

Also, upgrading to Ubuntu13.04 solves this problem without using gstreamer-properties.


My wireless network not visible in wireless network list with a Broadcom card

Same problem here, on a fresh (not upgraded) 12.04 system. If this is of any relevance, the computer is a "DELL Latitude E4300" and the Wifi card is a "Broadcom Corporation BCM4322".

The problem was solved by changing the router channel from 12 to 3. (Intriguingly channel 7, which was my first pick, did not seem to work either...)


How to install the fastlane using docker

You can get the fastlane image with:

docker pull fastlanetools/fastlane

src: https://hub.docker.com/r/fastlanetools/fastlane/


Happily, the cp210x kernel module (driver) is already included in Ubuntu. You don't need to compile it.

1) Check your kernel version.

$ uname -r
5.0.0-20-generic

2) Check that you have the correct package installed for your kernel.

$ apt list linux-modules-extra-5.0.0-20-generic
linux-modules-extra-5.0.0-20-generic/disco-updates,disco-security,now 5.0.0-20.21 amd64 [installed,automatic]

See how the kernel version is part of the package name?
And see how it's installed on my machine?

3) Let's verify that the module is included in this installed package.

$ dpkg -L linux-modules-extra-5.0.0-20-generic | grep cp210x
/lib/modules/5.0.0-20-generic/kernel/drivers/usb/serial/cp210x.ko

4) Finally, let's install the kernel module (driver):

$ sudo modprobe cp210x
$

Note that no feedback usually indicates success. It's a good thing.

To check that it worked, use the lsmod command to list all loaded kernel modules.

If, for whatever reason, Step 2 indicates that you DON'T have the package installed, read this wisdom from the package's control file before racing to install it:

  You likely do not want to install this package directly. Instead,
  install  the linux-generic meta-package, which will ensure that
  upgrades work  correctly, and that supporting packages are also
  installed.


The prompt theme resets PS1 in the precmd hook, specifically through an entry in precmd_functions. If you want to set your own prompt, don't use prompt themes at all: comment out the two lines about promptinit and the prompt adam1 line below them. If you want to use prompt themes, use their own customization capabilities. You'll have better luck with a prompt theme if you want something very fancy and one of the preexisting themes suits you, and better luck setting your own if you want a simple or highly customized prompt.


Install mate-dock-applet for MATE panel on Ubuntu 18.04 (Bionic Beaver)

Currently I'm running Ubuntu MATE 16.04 LTS. It has this package in the universe repository.

It is also available in all other Ubuntu versions:

$ rmadison mate-dock-applet
 mate-dock-applet | 0.70-1build1 | xenial/universe | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 mate-dock-applet | 0.85-1       | bionic/universe | source, amd64, arm64, armhf, i386, ppc64el, s390x
 mate-dock-applet | 0.87-1       | cosmic/universe | source, amd64, arm64, armhf, i386, ppc64el, s390x
 mate-dock-applet | 0.87-1       | disco/universe  | source, amd64, arm64, armhf, i386, ppc64el, s390x

So you do need any PPA to get it working.

Moreover the ppa:webupd8team/mate PPA does not support 18.04 LTS (bionic). Consider to remove it from your sources.list:

sudo add-apt-repository -r ppa:webupd8team/mate
sudo apt-get update

and then simply install the package with

sudo apt-get install mate-dock-applet


apache2 on ubuntu 14 - localhost works but ip doesn't

This isn't actually an answer, but it was too detailed to be a comment, and may become an answer after more information is determined.

When I read your post, I thought you were using your lan ip address (internal ip address), but after comparing the results of your commands vs my own, forcing me to look more closely, I see that you are trying to use an external public ip address.

This situation results in more variables and more complexity.

Are you using the actual ip address (xxx.xxx.xxx.xxx), or the domain name?

Is "mydev.testdomain.bg.org" the actual domain name?  I don't see this in the registry at all - how are you getting the DNS?

Does your apache configuration file have the ServerName specified in the VirtualHost setup in /etc/apache2/sites-enabled?

What sort of system is this hosted on? I've seen situations with certain routers where you couldn't access a local site from the local machine using the external public ip (for example, Comcast's router).

EDIT:   Also, when you make changes to your configuration, as suggested by people who may or may not have a clue about what they are suggesting, and the change does not solve your problem, do you go back and undo the change to restore the original configuration?  You should either do that, or keep very good records about all the changes you've made.


Tmux shows double the amount of space in front of command prompt

The ~/.zshrc file is only read once, when a new shell is started. Any changes you make there won't affect your current shell session unless you either source it manually (. ~/.zshrc) or start a new shell session.

So, the simplest solution is to just open a new terminal after adding those lines to your ~/.zshrc and run tmux from the new terminal.


Why does Ethernet autonegotiation selects 1000baseT-HD instead of 1000baseT-FD?

There is a bug in mii-tool that causes HD and FD to be switched around in the case of Gigabit speed links.

You can confirm that the link is actually running 1000baseT-FD by running ethtool:

$ sudo ethtool [interface name] | grep Duplex
         Duplex: full

Alternatively, you can tell from dmesg that the link is running full duplex:

$ dmesg|grep duplex
xxxxxxx      eth0: Link is up at 1000 Mbps, full duplex


How can I restore a country specific apt-get update mirror?

you have to select another ...

and after you could find the list of all countries


Canonical does not provide updates for VLC media player?

For Ubuntu 14.04 you can install VLC 2.2.1 using this ppa.

Run

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install vlc vlc-plugin-*

In Ubuntu 15.04 VLC is already version 2.2.0.


Libreoffice 5 does not start - error while loading shared libraries

Try to install the following lib and relaunch LibreOffice :

sudo apt-get install libdbus-glib-1-2:i386

The missing library libdbus-glib-1.so.2 is in the package libdbus-glib-1-2.


Unity Dash Does not Shows any Applications. Searching Applications for ever

Sorry for disturbing people here ... This low tech failure had me on my nerve.

The solution was to clear the software-center hidden folder ~/.cache and to reset unity. This is one of the solution proposed on Dash search gives no result. However in order to be able to restore the cache in case this does not work it is better not to remove it first but to rename it to -bak for exemple:

$ mv ~/.cache/software-center{,-backup}
$ unity --reset &

Or <Alt> <F2> and type unity (to reset not using a terminal).
After checking's it's working

$ rm -r ~/.cache/software-center-backup/


Dual Monitor on Virtualbox with 3D Acceleration

Virtual Box can provide up to eight virtual monitors for a guest operating system. These will be presented in multiple windows on the host. Only in fullscreen mode (or seamless mode if supported by the guest) we can address the physical monitors attached to the host.

  However, in full screen and seamless mode, they will use the available physical monitors attached to the host. As a result, for full screen and seamless modes to work with multiple monitors, you will need at least as many physical monitors as you have virtual monitors configured, or VirtualBox will report an error. You can configure the relationship between guest and host monitors using the view menu by pressing Host key + Home when you are in full screen or seamless mode.Virtual Box Manual

Fullscreen mode may need the guest additions to be installed in the guest OS.
Seamless mode is not working correctly in the guest OS when running OpenGL with Compiz as the compositing manager.


headset microphone not found after update to 17.04

I managed to get it working following this :
I edited /etc/modprobe.d/alsa-base.conf and added the line “options snd-hda-intel model=dell-headset-multi”. (A few instead need “options snd-hda-intel model=dell-headset-dock”, but it’s not that common.) Rebooted the computer and bingo !
ref : http://voices.canonical.com/david.henningsson/2014/03/07/headset-jacks-on-newer-laptops/


How to check if a given PPA or repository is available

You can alsways check it on PPA Web page.

E.g for wireshark-dev PPA you can check

https://launchpad.net/~wireshark-dev/+archive/ubuntu/stable

There you can see what is available. You can also filter by Ubuntu release.

As you can see, there is nothing for disco if you click "Published in" drop down.


How to install requests module for Python 3.2 by using pip install?

Answered by OP:

  I figured it out by following various answers from
  here.
  The answer is I have to have pip-3.2 installed first. I am not sure
  all steps are necessary though:

$ sudo apt-get install python3-pip
$ sudo apt-get install python3-setuptools
$ sudo python3 -m easy_install pip
...
Installing pip script to /usr/local/bin
Installing pip-3.2 script to /usr/local/bin
.. Now I get pip-3.2:

$ sudo pip-3.2 install requests


How can I recover Ubuntu after accidentally installing another distribution over it?

Depends on how you partitioned your Ubuntu installation. If you chose default options then most likely your home folder resided on the same partition as your system. In this case when you installed a new distro on that partition it got fully overwritten.
I'm afraid there's no way to recover your data? sorry...


Complete removal of all bluetooth related packages

sudo apt-get autoremove blueman bluez-utils bluez bluetooth

see for reference