How to easily remove old kernels in Ubuntu 20.04 LTS?

Here are the steps to remove unused kernels.
Check what current kernel You run:
uname -a
Linux blackhole 5.6.13-050613-lowlatency #202005141310 SMP PREEMPT Thu May 14 13:17:41 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I am running 5.6.13-050613-lowlatency
List all installed kernels in Your OS:
dpkg --list | egrep -i --color 'linux-image|linux-headers|linux-modules' | awk '{ print $2 }'
linux-headers-5.6.11-050611
linux-headers-5.6.11-050611-lowlatency
linux-headers-5.6.13-050613
linux-headers-5.6.13-050613-lowlatency
linux-image-unsigned-5.6.11-050611-lowlatency
linux-image-unsigned-5.6.13-050613-lowlatency
linux-modules-5.6.11-050611-lowlatency
linux-modules-5.6.13-050613-lowlatency

Uninstall kernels You don't need:
sudo apt purge linux-headers-5.6.11-050611  linux-headers-5.6.11-050611-lowlatency linux-image-unsigned-5.6.11-050611-lowlatency linux-modules-5.6.11-050611-lowlatency


Why are linux-headers not upgraded by apt-git dist-upgrade

If you installed linux-headers matching your running kernel version only, for example, linux-headers-3.5.0-18, then they will not be upgraded. Instead, do:

sudo apt-get install linux-headers-generic

The -generic header package will update headers every time linux-image is updated.


Why can't I install Steam onto Ubuntu 12.10 32-bit or 64-bit version?

There are 32-bit versions of Steam. I think you may have to re-install the 32-bit version of Ubuntu, depending on whether your hardware is 32-bit or 64-bit.

12.10 is the latest version of Ubuntu, but it isn't the most stable. I would recommend using 12.04 LTS (The LTS stands for "Long Term Support"). It's the most stable version of Ubuntu (LTS versions are the most stable). Valve built Steam for Linux to work with 12.04, so getting it to work on 12.10 may be a bit of a challenge if you're not familiar with Ubuntu.

I assure you that you aren't losing anything by going to 12.04 LTS.

Are you able to tell us what your hardware is, so we can tell you whether you should be running 32-bit Ubuntu or 64-bit Ubuntu?


How can I create a simple debian package from binary?

We tried to write the easiest steps here in this blog post.

https://web.archive.org/web/20141210051522/http://developer.ubuntu.com/2012/02/how-to-prepare-a-compiled-application-for-ubuntu-software-center/


Removing all kernel boot parameters and installing the ppa:xorg-edgers/ppa's nvidia drivers fixed the issue.


Kubuntu: Black diagonal line across the screen

try disabling the desktop effects.  That worked for me


How do I access my OneDrive folder from my Ubuntu 16.04 partition in Dualboot with Windows 10

i have the same issue and i tried the workaround here:
How to read OneDrive NTFS Folder in Ubuntu

just  untick Save space and download files as you use them on the Settings tab, it really solved my problem. hope it may also help yours.


How to Upgrade Oracle JDK and remove old JDK settings

Upgrade may cause problems , so its better to do a fresh install.

Completely remove Open-jdk

just use this simple commands in terminal to remove open jdk completely

sudo apt-get purge openjdk-\*

How to install Oracle-Java

To get an automatically update-able Java from Oracle, you can you use the PPA provided from webup8.

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

Installing Oracle Java manually

For installing Latest Oracle Java:

To check ubuntu system architecture installed

$ uname -m

or

$ arch

Download the Oracle Java JDK for Linux. Make sure you select the correct compressed binaries for your system architecture 32-bit or 64-bit (which end in tar.gz).It will be downloaded in Downloads folder in home.So first open nautilus with sudo as

sudo nautilus

and make a folder java under

/usr/local/

and then folow the following commands:

cd /home/"your_user_name"/Downloads
sudo cp -r jdk-7u40-linux-x64.tar.gz /usr/local/java
cd /usr/local/java
sudo chmod a+x jdk-7u40-linux-x64.tar.gz
sudo tar xvzf jdk-7u40-linux-x64.tar.gz

At this point you should have two uncompressed binary directories in /usr/local/java check it by

ls -a

Now edit the system path file by

sudo gedit /etc/profile

scroll down to the last and add following lines

JAVA_HOME=/usr/local/java/jdk1.7.0_40
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH

Save and exit and write these commands in terminal to Inform your Ubuntu Linux system where your Oracle Java JDK/JRE is located.

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk1.7.0_40/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk1.7.0_40/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/local/java/jdk1.7.0_40/bin/javaws" 1
sudo update-alternatives --set java /usr/local/java/jdk1.7.0_40/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk1.7.0_40/bin/javac
sudo update-alternatives --set javaws /usr/local/java/jdk1.7.0_40/bin/javaws
. /etc/profile

Now everything is installed just check it by

java -version

the output must be like

java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b40)
Java HotSpot(TM) Server VM (build 23.1-b03, mixed mode)

Congratulation now its installed.


Ubuntu 16.04 Running Hot (MSI GS70 stealth Pro)

So it turns out the discrepancy in temperature comes from the fact that the nvidia drivers in windows automatically switch between intel integrated graphics and the nvidia graphics card based on what the computer is running. Unfortunately, there does not seem to be any way to do this in linux (bumblebee is a rough solution). However, the graphics device can be switched manually under nvidia-x-server settings by changing the prime profile.


MySQL istallation problem on Ubuntu 16.04 (my.cnf public ip problem)

The configuration file name and directory change in Ubuntu 16.04
The new file and location here:

/etc/mysql/mysql.conf.d/mysqld.cnf

You can edit this using:

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

OR

sudo vi /etc/mysql/mysql.conf.d/mysqld.cnf

I find this solution here:

http://www.cyberciti.biz/faq/howto-install-mysql-on-ubuntu-linux-16-04/


How do I get the wireless working on an HP Pavilion dv6?

http://www.kubuntuforums.net/showthread.php?62541-Wifi-no-longer-working-after-update-to-13-04 this solved my problem (disable 3rd party drivers):

Check your additional drivers, if the proprietary driver is active try deactivating it and reboot.
This fixed my wifi problem.


How can I reload my XKB configuration without restarting my computer or logging back in

Solution. Run this command. Of course, you could change "us" to your desired keyboard layout.

setxkbmap -layout us


Is there a way to make Windows Fastboot and Ubuntu work together?

Short answer:

No.

Long answer:

The "Fast Startup" name is something of a misnomer. This Windows feature actually turns shutdown operations into hibernation (suspend-to-disk) operations. As such, filesystem data structures are left in an inconsistent state. When another OS, such as Ubuntu, boots, it sees the disk in an inconsistent state, assumes that the previously-running OS crashed, and will either attempt to repair the disk or refuse to mount it. Thus, the Windows "Fast Startup" feature is fundamentally incompatible with a dual-boot setup. In principle, it could be fixed by having Windows sync its disks before doing its suspend-to-disk operation, but this would require changes in Windows, or at least a new third-party utility to add the functionality. I don't know how practical such a change would be, and AFAIK no such feature or add-on tool is available.

As a side note, the Windows "Fast Startup" feature is entirely different from the firmware feature that's often called "fast boot" or "fast start." This firmware feature takes shortcuts on hardware initialization in order to speed up the boot process. For instance, the firmware's fast start might skip initialization of some or all USB devices. This firmware feature usually works fine with Ubuntu, with the caveat that it may be impossible to boot an Ubuntu installer because the firmware won't see the USB flash drive. If you can boot acceptably, though, you can leave the firmware "fast start" feature active.


GtkWarning: GtkSpinButton: setting an adjustment with non-zero page size is deprecated

It is a bug in the software. You should report it to the developers. However, it is also only a warning, and not fatal. You can also just ignore it.


Python-libnotify showing weird behaviour with xfce4-notifyd and notify-osd

Notify-osd does not handle actions. This is an explicit design decision by the developers. As the design spec states, "Other than that hover effect, bubbles should not directly respond to input devices in any way." The it also asserts that when actions are requested, it will fallback to an alert box:

  For cases where applications have expected the notification system to
  allow interactivity without checking whether it actually does, and
  cases where applications have expected the notification system to
  display a notification indefinitely, Notify OSD should show an alert
  box as a fallback.

While it's up for debate whether or not that is a good decision,
Notify-osd is an implementation of the Freedesktop notification spec,
which clearly states that it is the responsiblity of the client
to make sure the server supports the desired ability:

  Clients should try and avoid making assumptions about the presentation
  and abilities of the notification server. The message content is the
  most important thing.

  Clients can check with the server what capabilities are supported
  using the GetCapabilities message.

You can test for notification server capabilities with something like:

import pynotify

pynotify.init("Test Capabilities")
caps = pynotify.get_server_caps()

if caps and 'actions' in caps:
    # We support actions, so add a button.
    notification = pynotify.Notification("Can we use actions?", \
                                         "Yup, we sure do.")
    notification.add_action("ignore", "Ignore", ignore_cb)
else:
    notification = pynotify.Notification("Can we use actions?", \
                                         "Nope, we don't support actions.")
notification.show()


The simplest thing to do (requires almost no set-up) is just using SSH to tunnel X connections.  SSH can forward your local computer's x-server connection to the remote computer.  That way you can run a program on a remote computer but display it's windows locally.  The performance isn't too great though.  If your contractors are using Windows then they'll need to download Putty and Xming. You can also tunnel VNC over SSH if they have a VNC client, but VNC's performance is even worse.

If you want to minimize the time you are paying your contractors to look a loading screens then you'll probably want to use NX.  While X works remotely it's not optimized for non LAN networks.  NX fixes this by using compression and getting rid of redundant Xlib calls.

While the NX client is free, NoMachine's NX-server isn't.  Luckily, if you don't mind a little work, you can use Google's NX-server NeatX. NX uses SSH tunneling behind the scenes so it is as secure as ssh -X.  And doesn't require setting up a VPN.

If your desktop machines are behind a NAT or a proxy though, you'll need to use a VPN.

Setting-up a VPN is a little bit of work though.  Luckily I find the community documentation of OpenVPN to be pretty easy to follow.


How to record in .opus with Audio Recorder or via CLI?

Under AudioRecorder I use:

Title: Opus 48khz 32kbs
File extension: opus
Command:
audio/x-raw,rate=48000,channels=2 ! opusenc name=enc bitrate=32000 ! oggmux

These are working in Lubuntu 20.04, although there seems to be hard coded rate and not fully libopus working.


Good news! So if you have apache2 already installed, you install W3C Validator and Perl:

sudo apt-get install w3c-markup-validator libapache2-mod-perl2

The issue is that the w3c-markup-validator package hasn't been updated to install properly on 13.10+ (I'm on 14.04). To fix it manually:

sudo ln -s /etc/w3c/httpd.conf /etc/apache2/conf-enabled/w3c-markup-validator.conf

I then had an issue where /usr/lib/cgi-bin didn't have the correct permissions. This is due to a problem in /etc/apache2/conf-available/serve-cgi-bin.conf where it will only give the correct permission if the module is being loaded. It appears this version of perl isn't listed in the IfModule statement. To fix this:

sudo gedit /etc/apache2/conf-available/serve-cgi-bin.conf

You want it to look like this:

<IfModule mod_alias.c>
    <IfModule mod_cgi.c>
        Define ENABLE_USR_LIB_CGI_BIN
    </IfModule>

    <IfModule mod_cgid.c>
        Define ENABLE_USR_LIB_CGI_BIN
    </IfModule>

    <IfModule mod_perl.c>
        Define ENABLE_USR_LIB_CGI_BIN
    </IfModule>

    <IfDefine ENABLE_USR_LIB_CGI_BIN>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
            AllowOverride None
            Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
            Require all granted
        </Directory>
    </IfDefine>
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Once you're done with these steps you have to symlink validator's html directory to /var/www/html:

sudo ln -s /usr/share/w3c-markup-validator/html /var/www/html/w3c-validator

Once the file is linked and the changes are in place, all you have to do is restart the Apache server:

sudo service apache2 restart

Check that it's all working

http://localhost/w3c-validator

CSS might be missing from validator page in the browser, but validation should work well.


Plus signs running across edit boxes, etc

It might be a mechanical problem, but if you can make it past the login textbox without the pluses happening it wouldn't hurt to change this field in System Settings:


If you don't want to reinstall everything using a 11.10 iso CD, you will have to upgrade to each version, 10.10, 11.04 and then 11.10 from the update center.

PS: do this quickly as 10.04 is LTS so its end of life is april 2013 (for desktop) but 10.10 is not and will end in april 2012


dependency problem while downloading the google play dwonloader

Bottom Up!

python-ndg-httpsclient depends on python-support

download it: http://packages.ubuntu.com/utopic/all/python-support/download
install it: sudo dpkg -i python-support.deb

googleplaydownloader depends on python-ndg-httpsclient

download it : http://packages.ubuntu.com/search?keywords=python-ndg-httpsclient
install it : sudo dpkg -i python-ndg-httpsclient.deb

googleplaydownloader finally

you have downloaded it already
install it now: sudo dpkg -i googleplaydownloader_1.7-1_all.deb

Thats It and Thumbs Up :)


Can't click inside any window application!

Something similar happen to me a while ago while i was fooling around with the compiz configurations and i solved it by doing the following:

Run the following commands in the terminal, compiz --replace & and after it unity --reset and log out and in again.

Hope it helps, next time try providing more info about your setup, version, shell and some hardware related.


Is there a way to provide customized sorting rules to "ls" command?

Make some test dirs:

cd /tmp
for atom in H He Li Be B C N O F Ne Na;do mkdir $atom-directory;done

The atomic number for each symbol:

export ATOMS="H 1 He 2 Li 3 Be 4 B 5 C 6 N 7 O 8 F 9 Ne 10 Na 11" #and so on...

Make a bash function, make sure everything is on one line:

atomls () { for f in $(perl -le'%m=split" ",$ENV{ATOMS};$re=join"|",keys%m;print for map$$_[0],sort{$m{$$a[1]}<=>$m{$$b[1]}}map[$_,/($re)\b/],@ARGV' $*);do ls -ld $f; done }

Run it:

atomls *

Result:

drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 H-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 He-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Li-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Be-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 B-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 C-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 N-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 O-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 F-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Ne-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Na-directory

List just the two letter atoms:

atomls ??-dir*
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 He-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Li-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Be-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Ne-directory
drwxrwxr-x 2 idiot idiot 4096 okt.  22 19:56 Na-directory

There might be better ways...


Im not an expert at this topic at all but

Could not prepare Boot variable: No space left on device

sounds to me like the efi partition might be out of space. You could try to check the size of your boot partition and see if there's enough space available


Ubuntu can't see windows 7 partition when installing 13.04

To fix your problem, follow these steps:

Boot the emergency disk and open a text-mode shell.
Type "gdisk /dev/sda" (change "/dev/sda" to whatever is appropriate to access your hard disk, if necessary). The program is likely to complain that it's found both MBR and GPT data, and will ask which to use. It doesn't matter which you tell it to use.
At the "Command" prompt, type "x" to enter the experts' menu.
At the "Expert command" prompt, type "z" to "zap" (destroy) the GPT data.
Type "y" in response to the confirmation about destroying the GPT.
Type "n" in response to the query about blanking the MBR. Caution: If you answer "y" here, you'll destroy your Windows partition(s)!


Can't shrink Ubuntu partition on Windows

The general rule is to edit Windows partitions in Windows, and Linux partitions in Linux. Although Windows-made partitions can be edited in Linux, but not the other way around.

I would suggest making a live USB with Ubuntu, boot into it, and shrink the hard disk Ubuntu partition from there. You need to unmount the partition before you edit it though.


warning returns while using sudo apt-get update, how to fix

This is not an error, but just a warning. Contact the repository owner and ask him to fix the problem. For now you can ignore the warning or find a more well maintained PPA providing the software, if possible.


Change default behavior of Fn+Funtion key

I have exactly the same laptop and i had the same problem.

You must change the video card drivers. Go to Additional Drivers and select the option: "Using video driver for the AMD graphics accelerators from fglrx (proprietary)" and reboot the system

Then you have to program the keys. First install xdotool:

sudo apt-get install xdotool

Then open Keyboard from System Settings (Applications->System Tools->System Settings in Gnome).

Go to the Shortcut tab add press "+" to add the following shortcut:

Name: Brightness Up
Command: xdotool key XF86MonBrightnessUp

Click "Apply" then click on "Disabled" next to the new "Brightness Up" entry. Now press the key that corresponds to brightness up - F3 for me, but possibly F7 or something else for you.

Click "+" again and repeat the above steps to add the following entry for brightness down:

Name: Brightness Down
Command: xdotool key XF86MonBrightnessDown


Keep working with bash while a program is running

You have to send it to the background, by putting an & after the command, so e.g.:

firefox &

The bash will print out a job number for it e.g:

[1] 4510

means that the job number is 1. Then you can bring it back to the foreground when you want by fg and its job number, e.g.:

fg 1


No sound from internal speakers, headphones working, Kubuntu 18.0.4 and Mint 18.3

I could finally solve the problem installing ofono

sudo apt-get install ofono

If I stop ofono with systectl, sound keeps working, so don't know really what happened.

From apt show ofono:

Homepage: http://www.ofono.org/
Description: Mobile telephony stack (daemon)
 oFono is a stack for mobile telephony devices on Linux.  oFono supports
 speaking to telephony devices through specific drivers, or with generic
 AT commands.


You should use apt to install and to update software (and the kernel).

Boot from your older kernel by selecting "advanced options" from the grub menu.

If the grub menu does not display on your computer when you boot, you should hold down your shift key when you boot to display the grub menu.

The following assumes that you did not download and install nvidia drivers from the internet. If you did manually download and install nvidia drivers from the internet, please let me know and I will post different instructions.

After you boot up using the older kernel, you can update the kernel and your software by running the following commands:

sudo apt update
sudo apt dist-upgrade

As an Ubuntu user, you should try to drop the habit of downloading-an-exe-file and installing it. Remember, this isn't windows. Using apt and the software-center to install and download stuff for you helps to prevent viruses and malicious code from being injected into your software.

Think of apt and the software-center like the "google-play" of Ubuntu or the "i-store" or whatever they call it on apple.


No wifi with N1525 or external netgear A6210

I believe ndiswrapper will be ineffective as I suspect there are no Windows XP driver files available for your device. Let's erase the installation:

sudo ndiswrapper -e netathr7x
sudo rm /etc/ndiswrapper/*

Next, the driver ath10k_pci doesn't appear to load automatically. Please check to see if it is blacklisted:

gksudo gedit /etc/modprobe.d/blacklist.conf

If it is listed as blacklisted, remove the listing, proofread, save and close the text editor.

Next, we see that you lack the needed firmware:

  ath10k_pci 0000:03:00.0: Direct firmware load for
  ath10k/QCA6174/hw2.1/board.bin failed with error -2

I suggest that you do:

sudo mkdir /lib/firmware/ath10k/QCA6174/hw2.1
cd /lib/firmware/ath10k/QCA6174/hw2.1
sudo wget https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA6174/hw2.1/firmware-5.bin
sudo wget https://git.kernel.org/cgit/linux/kernel/git/firmware/linux-firmware.git/plain/ath10k/QCA6174/hw2.1/board.bin

Reboot. Let us see another paste of dmesg | grep ath10.


apt-get upgrade fails with "failed to fetch - hash sum mismatch" on Ubuntu 14.04

Actually, if you started working with Linux back when Slackware was cutting edge, you'd consider today's Ubuntu to be a dream to work with.  That and the package you are trying to install is a debian package....  supported by Ubuntu but not Ubunbtu software.

If stability and relatively error free operation is your goal, you should not be installing or upgrading pre-released updates.  Pre-release is, by definition not thoroughly tested and could very well have bugs.  Some serious.

Off the top it looks like the package you are trying to install is corrupted so the error message you are seeing is the system protecting itself from installing a "bad" package.

If this is a package that you really need and want, a first step after downloading it would be to run a checksum against it to make sure that it is a legit package and that the file is not corrupted.  There are lots of threads here that explain in depth how to do this.

If you don't actually need this package and especially if this package is a pre-release, you are probably better off NOT trying to install it.


How to re-generate a clean sources.list

Please use the following sources generator to generate the content for your sources.list (the file itself is located at /etc/apt/sources.list)

Errors in your current sources.list

Just trying to explain some errors:

What is sources.list used for

Your operating system knows based on its sources.list which software/packages it can find (from where) and based on that make it available for your computer.  Its somehow a critical part of your package manager.

General hint/warning

It might be dangerous to edit system-relevant files without knowing what you are doing.

For me it seems like you added apt sources from Debian Etch (which is a really old debian version) to your Ubuntu 16.04 sources.list. This is really far away from things you should do as starter. You might compare it with using DLLs from Windows 98 and trying to use them in Windows 7 or something.

If it comes to Ubuntu or other Linux distributions - if a command needs sudo permissions - please read and try to understand what the command is supposed to do - before you even consider executing it.


I had to wipe the disk and reinstall Ubuntu 17.10.  I tried the recovery option first, but the relocation error was still there.


Used update manager and now can't boot up

I think Nvidia drivers have caused the issue.

issue this :

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 is how to completely purge the nvidia driver and use the open source nounveau.


When will Ubuntu One be available in German and other languages?

There are no plans to internationalise the website at the moment. Because the website contains a lot of commercial information, we can't have it translated by the community like the client.
Getting professional translations for dozens of languages is a huge undertaking (both in cost and effort).
We do, care about all users, but the translation of the website has not yet become a priority for us.
When it is, I'll make sure we announce it properly.


How to format the unallocated USB drive and make it as Fat32?

It looks like your 4GB USB stick is broken. To ensure no one uses a destructive test and just copy-pastes the stuff without reading the explanation, you have to type the next command all in lower-case.

  WARNING
         Never use the -w option on a device containing an existing file system.  This option erases data! If you want to do write-mode testing
  on an existing file system, use the -n option instead.  It is slower,
  but it will preserve your data.

So to be absolutely sure it's broken (or not) do a:

sudo BadBlocks -w -s -o /tmp/BadBlocks.log /dev/XdY

Where X and Y are s and b

If you get errors while executing the BadBlocks command: the USB stick is irreparably broken.  Throw it away and buy a new one.

And if it would give you no errors, you're in luck: just re-format with gparted but create an msdos partition table first.

Sorry to be the very likely harbinger of bad news.


You can try addon named FiltaQuilla which in theory allows you to execute an external command during message filtering.


Double password entry when changing active users in Ubuntu 13.10

Well, as it turns out, this issue was caused by having both light-locker and cinnamon-screensaver installed. I removed light-locker, and now my issue is resolved. The problem is that light-locker apparently doesn't have any settings you can set and just reads the general screensaver/brightness settings.

Thus, when the screensaver time-out hits the allotted time, the system activates what are in essence two screensavers, requiring two password entries, but only one has settings you can manage.

Naturally, I overlooked light-locker at first because of it's lack of dedicated settings interface and didn't clue in until I was reading about somebody else having gnome-screensaver and cinnamon-screensaver both installed and having the same issue I was when I realised that light-locker is forked from the Gnome 3 gnome-screensaver project. Because light-locker is just a blank screen, I didn't realize there were two screensavers running.

As I said though: removed light-locker and solved the problem.


Window resize area, Firefox automaximizes and Giant Ubuntu Bar

It seems the cause was that after the upgrade, the system stop recognizing the video card, and the system began to use unity-2d.

Unfortunately, the easiest way to fix it was to install ubuntu 13.10.


Back up symbolic links (not the files they link to) with Dropbox

Dropbox actually does not follow symbolic links.

Well, it does, but not when the file is edited.  So if you add a symlink, the original file will be backed up to your other computers.  But if you edit that file on another computer, the symlink will be broken.  That came as quite a shock when it happened to me.

Dropbox only works the way you (as a Linux user) expect when the original file is in Dropbox, and the symlink is elsewhere.  So a solution for you would be to copy all your small files into your dropbox folder, then link them from their original locations in your filesystem.  You could do that with a (long) one-line find command.

See my answer here : Does dropbox sync hardlinks?


How to automatically archive a directory?

Sounds like a perfect task for rsync

sudo rsync -az /path_to/A /path_to/B

  -a archive mode (implies recursive, copy symlinks as symlinks, preserve owner, modification times, group, owner, special and device files)

  -z compresses the data

If you wish to remove files deleted in A from files in B, use the --delete option

For additional information see:

https://help.ubuntu.com/community/rsync

You can run rsync from cron

sudo crontab -e

Add in an hourly task

@hourly rsync /path_to/A /path_to/B

https://help.ubuntu.com/community/CronHowto


How do I reset my password? Ubuntu 12.04

i suggest you go in the password and keys application (in the dashboard, research in the installed applications).
then in password, right click, change password.

another way to do it, go in your system settings (icon top right), then in User accounts you will be able to manage it.


My root directory (/) is owned by my user. Shouldn't it be owned by root?

Yes ownership of / is root:root, so UID=0, GID=0.

Same ownership (root:root) typically applies to absolutely everything directly under / (e.g. /bin, /etc, /home, /var)


Suppose that the URL was http://svn.example.com/somewhere/somerepo. Then svn co http://svn.example.com/somewhere/somerepo creates a subdirectory of the current directory called somerepo. That's where the svn checkout is located.

If you want to add more files to the svn repository, you need to put them under that somerepo directory.

cd somerepo
# create someFolder and put your new stuff there
svn add someFolder
svn commit

Use the command ls to see what files exist in a directory. Use ls -A to also see hidden files like the .svn subdirectory.

Use svn info to see what svn thinks about the current directory.

All this is assuming that the checkout was successful. If you ever see this message from svn:

svn: OPTIONS from http://svn.example.com/somewhere/somerepo: 200 OK

(or some other HTTP code: 403, 403, etc.)
that's subversion's way of telling you that it did not understand the response from the server. Common causes are:

This is the wrong URL, the server at that URL is not a subversion server. Fix: type the correct URL.
You did not authenticate successfully. Usually you get a 403 HTTP status in that case, but some servers reply with 404 or even 200 (which is supposed to mean success, but some servers are funny that way).


The update script for resolvconf writes up to three nameserver lines to resolv.conf.

If you access man pages for resolvconf, you can find this information:

$ man resolvconf

Go to line 47, or libc subsection from CONSUMERS OF NAMESERVER INFORMATION section and watch for the number 1 item:

   libc
       The most important software package that  subscribes  to  the  notification  service  is  the  GNU  C  Library
       resolver(3).   This  library  is used by many applications that need to resolve domain names.  When nameserver
       information is updated, the script /etc/resolvconf/update.d/libc generates a new version of the resolver  con‐
       figuration file, /run/resolvconf/resolv.conf, as described below.  If the new version of the file differs from
       the previously generated one then the hook scripts found in /etc/resolvconf/update-libc.d/ are executed.

       The dynamically generated resolver  configuration  file  always  starts  with  the  contents  of  /etc/resolv‐
       conf/resolv.conf.d/head  and  ends  with the contents of /etc/resolvconf/resolv.conf.d/tail.  Between head and
       tail the libc script inserts dynamic nameserver information compiled from,  first,  information  provided  for
       configured  interfaces;  second, static information from /etc/resolvconf/resolv.conf.d/base.  Specifically, it
       writes:

         1) up to three nameserver lines, ordered according to /etc/resolvconf/interface-order, possibly fewer if one
            of  the  addresses is a loopback address and the TRUNCATE_NAMESERVER_LIST_AFTER_LOOPBACK_ADDRESS environ‐
            ment variable is affirmatively set, as discussed in the ENVIRONMENT VARIABLES section;

         2) up to one search line containing the combined domain search list from all  "domain"  and  "search"  input
            lines, also ordered according to interface-order(5);

         3) all other non-comment input lines.


Installing Ubuntu 14.04.4 in other than windows 10 boot C:\ drive..problem in installing...plz help me out

First of all, you have the right idea to create another partition for the ubuntu install. You are also correct to create this partition from the Win10 side, and 30GB should give enough space for the install. But you will need to create an additional partition for the swap space that Linux has to have (usually double the RAM - 4GB). You may also have to format these partitions (NTFS,FAT32) to make them visible for the ubuntu install.
Now, when choosing your / partition, find the 30GB partition, change to a Linux filesystem (ext4), and choose the 4GB partition as a swap drive (filesystem will be swap).
If you only had a c: drive and created a 30GB d: partition, this partition should be empty unless you put data in the drive. Make sure that this partition and the swap partition are empty BEFORE starting the ubuntu install.
follow these instructions and the install should go as you wish it to including GRUB setting up the dual boot that I believe you are looking for.           Good luck Craig


Shouldn't Blueman manager tray applet list paired bluetooth devices (with option to connect)?

This is not really the answer required, relating to using blueman, but gives an alternative to blueman, as a solution to the more general problem that blueman didn't solve: "I would like to have a "connect" option in the tray icon for the paired devices."

That is provided by the 1.2.9 version of blueberry, the Linux Mint configuration tool for bluetooth, available in Linux Mint 19.2. I have tested it in the Xfce version (New features in Linux Mint 19.2 Xfce, under XApps improvements: "The Blueberry systray menu now lets you connect or disconnect paired devices with a click of the mouse". The same is said for the Mate and Cinnamon versions).

Right-clicking the tray icon shows the menu:

I am not sure if/when blueberry 1.2.9 is/will be available in the very Ubuntu repos, and for the moment I can only find as deb to download the version 1.2.5, but this PPA provides the 1.2.9 version.

sudo add-apt-repository ppa:trebelnik-stefina/cinnamon
sudo apt update
sudo apt install blueberry

Another solution would be a panel launcher to connect, for example by running this script, which will connect the first unconnected bluetooth headset that it finds.

After saving the script and making it executable, create a .desktop file in ~/.local/share/applications to run that script:

[Desktop Entry]
Version=1.0
Type=Application
Name=Bluetooth-connect
Comment=
Exec=sh -c '/path/to/script'
Icon=preferences-system-bluetooth-inactive
Path=
Terminal=false
StartupNotify=false

Then, add 'Bluetooth-connect' as a launcher to the Xfce panel. (That .desktop file can be used differently in other desktops of course. It can also be found by search & launch tools like Synapse, WhiskerMenu, etc.)


In general,

Wireless mice and keyboards that have a USB dongle don't need any drivers, in any OS - they will just work.
If they did come bundled with drivers, the drivers will not usually be essential, but will only add extra features such as a little configuration console (that runs all the time in the tray, consuming resources), or activate extra features on the device, usually unrelated to the plain keyboard/mouse functionality.  Even the media/navigation buttons on the keyboard are likely to work without extra drivers these days.

Linux tends to include drivers for as many devices as possible in its kernel (and related firmware packages).  As you have noticed, it is not typical for device manufacturers to include Linux drivers for download from their sites, so this is often combated by the fact the Linux kernel already has drivers for a lot of devices.


Username displays incorrectly in GUIs, correct in terminal

Try to see if the real name is written in the wrong way:

grep rmano /etc/passwd

gives

rmano:x:1001:1001:Romano Gtti,,,:/home/rmano:/bin/zsh \

the first is the username, the name after the second number ("Romano Gtti") is the one that appears in login screen etc.

If it's incorrect, you can change it with sudo chfn -f "New Name" user (thanks @steeldriver) or (dangerously) by editing /etc/passwd with sudo vipw.


Have you tried using grub customizer?

Here are the instructions for installation...

sudo add-apt-repository ppstrong texta:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

Give this thread a look! It's where I got this from. Maybe almost a duplicate, but not exactly.. not sure in this case.
How to remove duplicate entries in Grub menu?


Are actions on local files sent to the Smart Scopes Server?

And I'm happy too answer my own question on this one. I asked Michael Hall from Canonical and he confirmed that they will not see which file I clicked on, but only that I activated something local.

That's good. It was really the only uncertainty I had about Smart Scopes.


Why is wget not calling my entire web address?

You have special chars in your URL, like ?.

You best bet would be to enclose the full URL with single quotes so that those special chars will not be handled by the Shell :

wget 'http://api.mesowest.net/v2/stations/timeseries?token=000&start=200505010000&end=200510310000&vars=air_temp_high_24_hour,air_temp_low_24_hour,relative_humidity,sea_level_pressure&units=english&output=csv&obtime=local&STID=KPHX'

As a side note : trying your URL i've encountered a "permission denied".

Depending on your authentication method you may have to pass some login :

wget --user=user --http-password=pass 'http://....'


Ctrl+a doesn't return all the way back in terminal

You need to wrap color codes in \[ and \]

PS1='\[\e[0;36m\][${debian_chroot:+($debian_chroot)}\u@\h] \w$(__git_ps1 " (%s)")\[\e[m\]\n\[\e[1;36m\]\$\[\e[m\] '


Temperature sensors doesn't show two of my cores

Maybe it is a different i5 CPU (Some are manufactured with 2 physical cores, some with 4, and some have HT enabled, which double the number of cores which the os sees. Check wiki Core i5 and
run this cat /proc/cpuinfo

This will show more info about your cpu.


Download Ubuntu ISO and burn it in a CD.
Boot your computer from the CD.
Choose install Ubuntu.
There will be three options.
(i) Upgrade the old version of Ubuntu.
(ii) Replace the old version of Ubuntu with the new version.
(iii) Something Else
Choose upgrade and it will keep all your files. It could also upgrade some programmes if  your computer is connected to internet.


For me also, suddenly all the folders in the desktop disappeared. Also I cant able to open the folders. When I inserted the pendrive, I got the message as "Unable to open the folder. No application is registered as handling this file". What to do???


sudo aptitude install smbclient=2:4.1.6+dfsg-1ubuntu2

Typical! After hours of searching for an answer I find it 2 minutes after posting the question. Aptitude takes care of the dependencies. I didn't realise that apt-get wouldn't do that.


You should log in by a root user (from the terminal):

Type su or sudo su.
Run the command chsh -s /usr/bin/zsh root.


If you want to append successive outputs of a command substitution to an array in bash, you can use a syntax like

arr+=( "$(command args)" )

For example, give files with

$ grep -H 'versionName' thing*
thing1:versionName: foo
thing2:versionName: bar
thing3:versionName: baz
thing4:versionName: boo

then

$ for f in thing*; do version+=( "$(grep 'versionName' "$f")" ); done
$
$ echo "${version[0]}"
versionName: foo
$
$ echo "${version[3]}"
versionName: boo


I want to reformat my home partition from ext3 to ntfs

Converting the /home folder to NTFS is neither wise, nor recommended, and not possible!

The home folder contains user configurations as well as user data. Ubuntu maintains user specific permissions for folders and files. The permissions format used by Ubuntu is specific to ext3, ext4 formats.

In other words, Ubuntu cannot preserve folder and file access permissions in an NTFS, or any of the Windows partition formats.

Once you format the /home partition to NTFS and copy everything back, you won't be able to mount it as /home as the partition will not meet the requirements of Ubuntu.

See Do I need Intel Smart Response when installing Ubuntu? for a solution on how you can link your data folders in another (NTFS) partition to your home partition. You will need to shrink the /home partition and create a new NTFS partition and copy the data folders, like Documents, Pictures, Music etc. there.

Hope this helps


Kubuntu freezes whenever I boot my laptop on battery. Why?

It turned out to be an issue with the kernel being old, for the relatively new AMD Ryzen 3550H processor in my laptop.
I'm currently using linux v5.6-rc5 without any issues to date.


How do I solve the "out of disk space" error thrown by GRUB?

Similar issue faced users said issue was with BIOS (bios not having the correct disk size) I saw something else in reference to the out of disk error - apparently if your partition/data is above 137gb some BIOS's won't access it. And used BURG
 as solution, here is the reference link for same http://ubuntuforums.org/showthread.php?t=1420427(I have not used it personally but found useful)


KDE 4.8 started to open new windows in a "grid mode"?

If I understood you correctly, the settings for the "grid mode" are here:
System Settings → Window Behavior → Advanced → Tiling
Just disable it there...

I also found the keyboard shortcut Alt+Shift+F11 which toggles tiling.

P.S. With KDE it is always useful to look through the settings, or just search by some keywords in Kickoff (which I did to answer the question).


There might be two reasons:

(Simple) Do you have libdb-dev and libdb++-dev installed?
If the answer to first question is yes, then the usual reason for failing the builds is non-existent support for newer version of Berkeley DB.  You will need to edit the CMakeLists.txt and mangle it to accept libdb-5.1.so or libdb++-5.1.so in case of C++.


Why do commented lines in a linux configuration file sometimes work?

Any line that begins with a # is a comment in many languages and is ignored by the interpreter (perl etc.).

However, if the first line of a script in Linux begins with a #! (shebang as it is called), it is not a comment but a directive to the program loader to actually run the program specified after #! and pass it the name of your file as the last argument.

For example, if the first line is

#!/usr/bin/perl -w

it means the shell will actually invoke /usr/bin/perl -w /path/to/the/script and you don't need to specify a program to run this script, you can run it using

/path/to/the/script

if you have the permission to run it and it is located on a filesystem supported for execution and the file has the permission to be executed.

For the interpreter, however, this line is always just a comment, so if the script is  executed as:

perl /path/to/the/script

then the line has no effect. (Thanks to Ruslan for pointing this out).

Be warned that # is not always indicative of a comment. For example, a statement beginning with a # in C is pre-processor directive and not a comment.

In your case, the line is a comment and will be ignored while execution.

Update:

The file you are talking about is a menu.lst for which a comment is a line beginning with ## and not #. (Source)


Can a deb package contain a PPA dependency and install packages from the PPA?

Can a control file from a deb package contain a PPA address and install that package when the deb file is installed?

No. You can only control the name of the package and the version via control file. Why you could do is creating a package that adds a file under /etc/apt/sources.list.d/ with the repository, but it implies a two steps process:

Install the package with the repository, update package list.
Install your package.

Informing your users before hand that they should add first the PPA you need removes the need of having to install the first package and updating the list to just installing your packages. Through adding a third party repository that you don't control (and the user possibly doesn't trust) could cause a security concern, since the third party repository isn't obligated to only serve only the packages you need but whatever packages the owner decides, i.e. adding a rouge version of openssl that replaces Ubuntu's. That's why is recommendable to try hard and only set as dependency packages that either are in Ubuntu's repositories or provide those packages yourself.


During the install process...

~You'll be asked to pick a username and password.
.....When you pick the username, the name of your computer will automatically appear also.

~Then it will ask you to pick a password.
.....You'll be asked for this many times when you use Ubuntu, so if there's no one else who has access to your system, you might want to make it short,
.....on the other hand, for security reasons you might want to make it strong - 8 characters or more, not your SS#, bank info, and no recognizable names or words.

~Then it will offer 3 choices:
1. log in automatically,
2. Log in with your password,
3. I think it's 'log in remotely?'

.....For ease and speed, I'd pick 'log in automatically,'
.....but again, depending on how security conscious you are, you may want to pick #2.

~Next it will ask you if you want it to partition your disk.

~There will be a line with a slider for you to move to pick the size of the partition that you want for each OS.
.....Windows is heavy on resources, so I'd use a somewhat larger partition for that.

~Then go on with the install. I think at this point it doesn't ask any more questions but just runs itself, giving information about Ubuntu as it does.

~Finally it asks you to restart your system, and there you are.

~When I had my drive partitioned and I started my system, a prompt would appear asking me which partition I wanted to start. Just arrow up or down for Ubuntu or Win 8.

If I've missed anything, folks, please correct me, but I think this should do it.

Best of luck.


Failed to exec method /usr/lib/apt/methods/http

I fixed it by removing and reinstalling APT:

sudo apt-get remove apt You will be asked to type "Yes, do as I say!"
After that, download the apt package through your browser from here
Go to your Downloads folder and type sudo dpkg -i <filename>.deb

After that you can use the apt-get functions again.


You can use the Nvidia proprietary drivers, open a terminal and use:-

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

sudo apt-get update

sudo apt-get install nvidia-current nvidia-settings


Power button on menu bar goes red regularly

I had this after I activated Google verification service - Ubuntu required me to re-authenticate with Google. I guess the red icon means "something needs to be corrected" but it's not exactly clear on what when it happens.

@Dobev is right - look for "Account Options" under the "System Settings" menuitem.

After re-authenticating, icon returned to white.

Hope this helps


The update manager is looking for packages on the Ubuntu CD/DVD. If it is not inserted you get that error. You can disable the CD as package source. Open the software center, go to Edit/Software Sources... and disable the CD on the first tab.


[EDIT]

Try uninstalling the joystick modules

sudo apt-get purge xserver-xorg-input-joystick

Then clean any downloaded package files

sudo apt-get clean

Then update your repository list

sudo apt-get update

Then attempt to reinstall the package

sudo apt-get install xserver-xorg-input-joystick


Can I upgrade ubuntu in preinstalled dell laptop

Yes, you can.

You can even install lUbuntu, xUbuntu or any other operating system (not excluded to Ubuntu flavors) if you want. You can even create a multi-boot with more than 1 operating system.

For that matter you can even insert a new harddisk with another pre-install of Ubuntu and use that.

There are NO restrictions. The only restriction you have is that you need to pay for some operating systems to make it legal to install. Ubuntu is not one of those ;)


new to ubuntu need to intall it properly with my new SSD

The instructions for installing Ubuntu onto an SSD are no different than for a traditional hard drive.  The default partitioning recommended by the installer will be suitable.

The speed benefits of an SSD do not require special configuration of the OS.

It wasn't a main part of your question, but you are going to run into difficulties getting Photoshop and After Effects running on Ubuntu (with Wine).  After Effects in particular probably won't work at all if you have version 9 or later (CS4 or later) (source).

Adobe Photoshop CS5 won't run, and Adobe Premiere Pro beyond version CS3 won't run.  Other versions will run with problems or will be difficult to get working (source).


''Rats, that failed, you may have to do it manually"

The final step is to import messages into the Sup index.
  Depending on how many messages are in the sources, this could take a while.

Seems as if sup is installed but was unable to load messages. There is surprisingly little information available on how to do this manually. Try man /usr/bin/sup-sync or /usr/bin/sup-sync --help and read this - hopefully there are a few answers.

No such file or directory indicates that there is a file or directory missing which sup-sync expected to be there. Check those docs or help output, to figure out which locations are involved and check whether or not they are available by the user running sup-config.

Additionally I found this on the ArchWiki - can you try to run sup or sup-config to verify if you ran into that bug? I would start with that step.


Trash icon and files have disappeared from the desktop after upgrade to Ubuntu 19.04

Install Gnome Tweaks ("Tweaks") from the software center. In Tweaks, click the extensions tab. Find the extension "Desktop icons" and enable it.

If you do not find the extension in Tweaks, it might not have been installed during your upgrade. In that case, install it from software, or with the command sudo apt install gnome-shell-extension-desktop-icons.

Background: In general, upgrading is not the very best way to update an Ubuntu version. An upgrade is not always without issues, in many cases small ones (like this probably), but sometimes major issues. That is why it is not possible to know whether your issue is due to the extension not being enabled, or the extension not being installed.

In 19.04, desktop icons are handled by a rather new Gnome Shell extension instead of by the file manager.


Open the terminal and type:

sudo apt update
sudo apt full-upgrade
sudo apt install -f apache2


Please read this bug report carefully to confirm you are having the same problem.

If so review all the comments. Of particular interest is comment #8:

sudo apt install gnome-icon-theme # fixes
sudo apt purge gnome-icon-theme # breaks

I don't have this problem using Unity on 18.04 LTS so I hope this helps you.


If you ping by domain name and it is successful it is not DNS.

Try to wget the front page of google com:

wget http://google.com/

If you are able to successfully download the index.html page, you may have a browser issue.

Try to check the following:

Proxy settings
AD blocker settings (if any), or disable AD blocking

(Remark: corporate policies used to block entertainment sites during business hours...)


VMware Workstation 12 wont compile modules on linux kernel 4.6

It appears get_user_pages was replaced with get_user_pages_remote

With this patch: https://lkml.org/lkml/2016/2/10/555

To resolve:

(From Arch linux wiki:)

https://wiki.archlinux.org/index.php/VMware#Kernel_modules_fail_to_build_after_Linux_4.6

cd /usr/lib/vmware/modules/source
tar xf vmmon.tar
mv vmmon.tar vmmon.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmmon-only/linux/hostif.c
tar cf vmmon.tar vmmon-only
rm -r vmmon-only
tar xf vmnet.tar
mv vmnet.tar vmnet.old.tar
sed -i -e 's/get_user_pages/get_user_pages_remote/g' vmnet-only/userif.c
tar cf vmnet.tar vmnet-only
rm -r vmnet-only

To me it seems like this is a linux patch breaking userspace, am I wrong?


Ubuntu 12.10 64bit ( fresh install ) usb modem ZTE 190S

I run sudo apt-get install udev-discover and restarted the system and it works.


Here you can find all wubi related answers solved: How do I remove the Ubuntu boot option created by Wubi?


Logged out on resume from sleep ubuntu 15.10

Try use pm-suspend-hybrid instead. It will prepare the system for hibernate by storing all memory content to disk and then goes into suspend. The suspended state gives the advantage that it can resume very quick and because it also prepared for hibernate the system is also able to start when the power is lost.

More info here:
http://manpages.ubuntu.com/manpages/precise/man8/pm-action.8.html

Good luck!


Unable to read text when using a dark theme

To install Delorean Dark theme in Ubuntu open Terminal (Press Ctrl+Alt+T) and copy the following commands in the Terminal-

sudo add-apt-repository ppa:noobslab/themes
sudo apt-get update
sudo apt-get install delorean-dark

Delorean dark offers theme for software center enter these commands in terminal to get it:-

cd /usr/share/software-center/ui/gtk3/css/ && sudo mv softwarecenter.css softwarecenter.css.backup
cd /usr/share/software-center/ui/gtk3/art/ && sudo mv stipple.png stipple.png.backup
cd && wget -O softwarecenter.css http://drive.noobslab.com/data/themes/delorean-dark-3.10/softwarecenter.css
sudo mv softwarecenter.css /usr/share/software-center/ui/gtk3/css/`
cd && wget -O stipple.png http://drive.noobslab.com/data/themes/delorean-dark-3.10/stipple.png
sudo mv stipple.png /usr/share/software-center/ui/gtk3/art/

To revert back software center theme simply enter these commands:

cd /usr/share/software-center/ui/gtk3/css/ && sudo mv softwarecenter.css.backup softwarecenter.css
cd /usr/share/software-center/ui/gtk3/art/ && sudo mv stipple.png.backup stipple.png

That's it.


Start Synergy client with SSL before login Ubuntu 16.04 LTS

The fingerprint of the server needs to be added to
/root/.synergy/SSL/Fingerprints/TrustedServers.txt

As the home directory of the root user is not /home/root/ but /root, as per this question What is "~" (home directory) defined as for programs running before login using LightDM?


Wine - spotify - audio configuration of wine

I know this isn't a direct answer to your question, but I think that you'll find the native client is much faster and more stable than running the windows client via wine:

http://www.spotify.com/se/download/previews/

Spotify provides an apt source which you can add to your apt.sources, then just install via apt-get as usual.


Install Ubuntu from USB Stick to USB Stick and use it as “external drive” to boot and use from

Installing Full Ubuntu on USB Stick.
A comparison of Full install vs Persistent install can be found here: Ubuntu 20.04 USB not working after every reboot
A quick and easy method to flash a Full install of Ubuntu to USB can be found here: Easy Full Install USB that Boots both BIOS and UEFI
A step by step method of Fully installing Ubuntu to USB can be found here: How to Create a Full Install of Ubuntu 20.04 to USB Device Step by Step
Both of these methods work with SSD's, Flash Drives and other External USB drives.


Micro-HDMI to VGA adapter does not work with Ubuntu on Lenovo Yoga 2 Pro

The Yoga 2 Pro has a serious design flaw that prevents most micro HDMI cables from working properly, see this thread for a workaroud:

https://forums.lenovo.com/t5/Yoga-Flex-Laptops-and/Yoga-2-Pro-micro-HDMi-issue-SOLVED/td-p/1297269

(basically you have to modify the connector so that the metal part becomes longer and makes proper contact)


Can anyone point me to a guide for installing Ubuntu 12.04 LTS on to a USB Thumb Drive?

You can install to a USB flash drive the same way you'd install to any external drive. Probably only minimal special guidance is needed in this situation.

Make sure the external drive that you want to install Ubuntu Server on is attached. If your computer has trouble booting from other installation media when it is, then you can defer this step to immediately after the system starts to boot from the installation media in step 2.
Boot the server install CD/DVD/USB. (If this is a live USB, then of course it must be a different drive from the USB drive you're installing on.)
Select the external drive to install to.
As part of the installation, you are asked to specify where the GRUB boot loader should be installed. Make sure it is at least installed to the master boot record of the external drive itself. You will probably not want to install it anywhere else.

In particular, please note that if the newly installed server system's GRUB is installed to the MBR of an internal hard drive, then whether or not any other Ubuntu system is installed on the machine, no system will be able to boot when the flash drive is not attached. You don't want that. (You can fix it by reinstalling your OS's boot loader to the MBR of the internal drive, but it's best simply to avoid it altogether.)
To boot the new system, you must select the drive it's on as the boot device.

This server system may or may not be highly portable, depending on how much you configure it to be dependent on other features of the machine on which it is installed:

You should make sure the swap partition (and as discussed above, the boot loader) is also on the USB flash drive!
By default, drives in /etc/fstab will be listed using their UUID's (which can be viewed by running sudo blkid). If you keep it that way when adding any new entries or modifying existing ones, your system will be much more portable, because it will be much more resilient to changes in the way devices are numbered, which often happens when hardware is substantially changed.
If you install the 64-bit version, it will use large amounts of RAM more efficiently, and for high-performance server needs, this is typically recommended. However, the 64-bit version of Ubuntu (server or otherwise) will not run at all on a machine with a 32-bit processor.

Finally, you may want to consider alternatives to attempting to create a portable server system. For example, you might be better off installing Ubuntu Server to a virtual machine. This is automatically portable. One of the disadvantages of running Ubuntu Server from flash storage is that, if you have a very large amount of writes (which occurs in many though not all server applications), the USB flash drive will wear out muc faster than a traditional magnetic hard drive (and I believe also faster than an SSD).


How can I force Plasma 5 to treat two monitors as one in Kubuntu 16.04?

Turn off Twinview.  Change this line in xorg.conf

   Option         "Twinview"   "false"

Note: When you maximize a window it will go across both monitors, but I think this is what you want.


The locate command consults a database rather than scanning the filesystem, as scanning the whole filesystem can be quite time consuming.  As a result, the database can become out of sync with the filesystem for a time after you add or remove files.  The database is updated when the updatedb command is run, which is usually scheduled to be done once a day.  Hence, it is normal for locate to still show files immediately after you have removed them.


Sharing folders on home network between ubuntu machines is not permanent after restart

In Nautilus, after you've set up the folder you want, and when you have it open, choose "Bookmarks" from the top menu (global menu if you're using Unity), choose "Add Bookmark."  After that it should be permanent and remain in your list after you reboot.


What tools do I need to install for Java Development?

Step 1: Install Debian packages (I always use Debian packages where possible).

sudo apt-get install openjdk-6-jdk

This installs the full Java 6 development kit,

Download and install netbeans from here
Now you will need to install the NetBeans Mobility plugin, which provides support for J2ME development, and the Sun Wireless Toolkit (WTK), which provides the actual libraries to compile against.

Step 2: Install the NetBeans Mobility plugin.
If you choose File -> New Project, you will find no way to create a J2ME project! You need to install the Mobility plugin.
Close that, and choose Tools -> Plugins. Under Available Plugins, select Mobility (Category: Java ME). Install that. Now under File -> New Project, you will find Java ME. Choose to create a Mobile Application.

Step 3: Install the Sun Wireless Toolkit.
Having chosen Mobile Application, you will be presented with a dialogue with a red error at the bottom: “No J2ME compatible platform is installed in the IDE. You need to have at least one J2ME compatible platform installed in the IDE.” So you’re still missing the actual library files required to compile J2ME apps.
So after much searching, I found what I think is the correct download (but there are lots of similar ones with different versions): Sun Java Wireless Toolkit 2.5.1 for CLDC. You should pick the Linux version, and download it (it’s called sun_java_wireless_toolkit-2_5_1-linux.bin).
Download it to your desktop, then run:

chmod +x sun_java_wireless_toolkit-2_5_1-linux.bin
./sun_java_wireless_toolkit-2_5_1-linux.bin

If it says

  “No suitable Java interpreter was detected”

. Type “0″ to “Specify a path to a Java interpreter directory.”
        If you installed openjdk-6-jdk like I said above, it should be installed in /usr/lib/jvm/java-6-openjdk/bin/.
        You might have many Java bin directories installed. To find one, type ‘which jar’. This might give you a symlink (such as /usr/bin/jar). Use ‘stat /usr/bin/jar’ to follow the symlinks until you find the real location, such as the one above.
    You are asked to enter a directory to install WTK. Just pick somewhere out of the way, probably in your home directory unless you want to share it with other users.

Step 4: Add the WTK platform to NetBeans.
Now that WTK is installed, we can fix the above issue in NetBeans.
In the New Mobile Application dialogue (heading should be Install Platform), click Install SDK/Platform/Emulator. (You can access this from the Tools -> Java Platforms menu also).
Click the Add Platform button, choose Java ME MIDP Platform Emulator, and then you will be asked to “choose a directory to search for platforms”. Choose the directory where you installed WTK. It should have a special icon. Now it should do some detection magic, and install a platform with a checked checkbox in the Add Java Platform window.
Click Next a few times, and you will see the Java Platform Manager screen with a J2ME folder, and the “Sun Java(TM) Wireless Toolkit 2.5.1 for CLDC” under it.
Now you can complete the wizard to create a mobile application with MIDP! It even has a checkbox to create a little “Hello World” app. Now to get the damn thing running …

Links

How do I install Java?
http://java.sun.com/products/sjwtoolkit/download-2_5_1.html
http://blog.sudobits.com/2011/04/30/how-to-install-netbeans-ide-on-ubuntu-11-04/
http://blog.sudobits.com/2011/04/30/how-to-install-netbeans-ide-on-ubuntu-11-04/

source


How to permanently change the time in Ubuntu Server

Sounds like you have a timezone issue. The easiest way to fix this is to reconfigure the tzdata package sudo dpkg-reconfigure tzdata

There are alternative ways, like symlinking the correct zonefile from /usr/share/zoneinfo to /etc/localtime which will inform the system of the proper time:

ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime

However, it's preferred to use dpkg-reconfigure


.sh and .php file not working on crontab - updated

I think that your crontab entry may be wrong. The 6th field in the entry should be the username who runs the process not the shell that runs the script. So assuming that you dont have a user called "sh", replace the entry with your username.

eg (assuming that you want the command to run as user "bob"):

*/5 * * * * bob /home/ubuntu/workspace/teste.sh

(edited to include grooveplex's comment)


First identify exactly the module you want to blacklist, at a terminal type
lsmod | head -20

Then you can note extra information by typing
modinfo modulename

modulename being the name you found previously with lsmod
Then add this modulename to the config file by typing
sudo nano /etc/modprobe.d/blacklist.conf

(Or you can use gedit or vi instead of nano)
Add a line to the bottom of this file that reads

blacklist modulename

modulename being the name you found previously with lsmod
Commit the changes and save with the same filename then reboot.


Should a relatively conservative user untick "Unsupported updates (precise-backports)" in Software Sources?

This is not necessary.  If you run

apt-cache policy | grep backports

you'll see that the Backports repository is pinned to 100.  This means that you have to explicitly choose to install the backport version of a package if a version also exists in the non-backports repository.  The advantage this has, is that if a package is only available in backports, you'll be able to install it without modifying anything else.


After recompiling vim to use python 3, I still get "requires Vim compiled with Python 2.x support" from YCM

I apparently used outdated instructions.  The vim install was good, but the YCM install instructions were old.

What I did was remove the directory .vim/bundle/YouCompleteMe/ completely and add
.vim/bundle/YouCompleteMe/
To the proper place in .vimrc, then run

:PluginInstall from within vim.

Then I went to .vim/bundle/YouCompleteMe and ran

python3 install.py

The previous instructions didn't provide a install.py file.

Jim


Ubuntu Server Samba Permissions best practice

Webmin is outdated and has security problems and should not be used.

I had the same problem on 14.04. Many people answered my question and said Samba was not so screwed up on previous versions of Ubuntu. But this is a function and alias I add to my $HOME/.bashrc.

####################
# $1 is parameter for function
function fAdduser
{
if [ -z $1 ]; then
    echo "ERROR: No user given.";
    echo "Usage: cradduser USER";
    echo "Sets permissions and groups for home dir of user.";
    echo "Also sets up samba for user.";
    echo " ";
    return;
fi

# Add new user $1 and add to group 'users'.
# -m = make home dir
# -G GROUP = assign to group
sudo useradd -m -G users $1 || { echo "Error in useradd"; return 1; };
sudo usermod -p $1 $1;
echo "fAdduser: Their password is now the same as their username."
sudo passwd -u $1;
echo "fAdduser: Now enter their password.";
sudo passwd $1;

# Now add to samba users. This linux user uses this password for Samba.
# The user is the same, the Samba password is not.
# -a = add user
# -e = enable user
sudo smbpasswd -ae $1;

# Now change permissions for Samba on their home dir.
TDIR=/home/$1;
echo "Changing permissions and group on $TDIR files for Samba...";
sudo chmod a+rw $TDIR;
sudo chmod -R a+rw $TDIR/*;
sudo chgrp users $TDIR;
sudo chgrp -R users $TDIR/*;
echo "These are the users in group 'users'";
getent group users;
echo "Added user $1";
}

alias myadduser='fAdduser'
alias mysambareset='sudo restart smbd; sudo restart nmbd; sudo service smbd restart'

Edit and save your .bashrc, then do this: source $HOME/.bashrc to make the changes into effect. The function fAdduser adds a new user and sets them up for Samba. Review the steps here and see if you did them all.

To set up a Samba user do this: myadduser USERNAME.

If you change your Samba config file, save it and do this: mysambareset.

After much conflicting advice, and much trial and error, this is what works for me.


Make a command run if the output of the previous command had a specific value

Get the number of available updates with:

/usr/lib/update-notifier/apt-check
# returns (for example) 12;4

/usr/lib/update-notifier/apt-check --human-readable
# returns (for example)
  12 packages can be updated.
  4 updates are security updates.

/usr/lib/update-notifier/apt-check |& cut -d";" -f1
# returns (for example) 12

To test if there are available updates, use the last command and test his ouput against 0.

Here is a simple script that will do your stuff
Note that it does not handle bad inputs, only catches '', 'yes', 'YeS', 'y', 'Y' to continue proceeding. If no 'yes' input, then simply exit script.

#!/bin/bash

read -r -p "Would you like to check your system for updates? [Y/n] " response
  response=${response,,} # tolower
  if ! ([[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]); then
    exit
  fi
sudo apt update > /dev/null 2>&1
nUpgradables=$(/usr/lib/update-notifier/apt-check |& cut -d";" -f1)

if [ $nUpgradables -gt 0 ]; then
  echo ${nUpgradables}" packages can be updated"
  read -r -p "Would you like to update your system? [Y/n] " input
  response=${response,,} # tolower
  if ! ([[ $response =~ ^(yes|y| ) ]] || [[ -z $response ]]); then
    exit
  fi
  sudo apt-get -f install # that is good to do too
  sudo apt upgrade        # upgrade, not 'upgrades'
  sudo apt autoremove
  sudo apt autoclean
else
  echo "No upgrade available"
fi


How to find out what autostarted a program?

when you install the package xbindkeys

sudo apt install xbindkeys

it creates a .desktop file in your users home directory in $HOME/.config/autostart/ with below contents

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=xbindkeys
Comment=Start xbindkeys
Exec=xbindkeys_autostart
Terminal=false
Type=Application
Categories=
GenericName=
Hidden=true

If you observe the Exec line.. this .desktop file will execute xbindkeys_autostart which is actually /usr/bin/xbindkeys_autostart with below contents

#!/bin/bash

set -e
set -u
set -E

PROG="/usr/bin/xbindkeys"
NOAUTO="${HOME}/.xbindkeys.noauto"

# This file autostarts xbindkeysrc if the user (or system) has a config
# for it AND does NOT Have a .xbindkeys.noauto in his homedir.

# we only run if there is no NOAUTO file
if ! [[ -f ${NOAUTO} ]] && [[ -x ${PROG} ]]; then
    # User config wins over system config
    # guile config wins over classic config
    for cfile in "/etc/xbindkeysrc" "$HOME/.xbindkeysrc" "$HOME/.xbindkeysrc.scm"; do
        if [[ -f ${cfile} ]] || [[ -L ${cfile} ]]; then
            CONF="${cfile}"
        fi
    done

    # Run $PROG - if it has been configured
    if [ -n "${CONF}" ]; then
        $PROG -f $CONF
    fi
fi

for example manually added autostart programmes with directly entering commands in startup application list is like below

you can see the difference between both of these .desktop files for the line "Hidden" which is false for one and true for other

if you make the Hidden=true to Hidden=false you can see it in GUI startupapplications list like below


Problem using avconv to convert .mp4 to .webm

finally for some have interest, i use these commands to convert some type of video files:

avconv -i "$videoname".AVI -b 2048k -r 30 -c:a libmp3lame "$videoname".mp4
avconv -i "$videoname".AVI -c:v libx264 -ar 44100 -y "$videoname".flv
avconv -i "$videoname".mp4 -y "$videoname".webm

with these three steps i can embed correctly with my script.


Remote ACCESS - SSH listening port filtered out by Firewall?

If SSH was the only way you were able to access this server before you changed the firewall settings, you have unfortunately locked yourself out of that machine.  You will need physical access to fix it or be able to speak with your hardware provider to have someone there help you out.

You can forward ports to "channel" your SSH connections, but this would require you to already have SSH access or some other means of administration.


/etc/environment is not a shell script. It is read by the pam_env module during log in, and it doesn't do variable expansions, it only accepts KEY=VALUE pairs. You could instead edit /etc/profile (which is a shell script), and add

PATH=$PATH:$JAVA_HOME:$JRE_HOME:$MAVEN_HOME/bin


What application can I use to create and order a photo book? (like Apple's iPhoto)

Take a look at Shotwell.  Shotwell is shipped by default with Ubuntu.

If that doesn't cut it, take a look at F-Spot.  F-Spot is a full-featured personal photo management application.

To download, install and more info, visit the website.  Or just click F-Spot

There is also a list of optional extensions available.


Unable to log in to one specific user account in ubuntu 10.04

If it logs in to another account, then turn off 'Automatic Login.' This should take you to the Login Screen every time.

To do it, go to: System Settings -> User Accounts. Click on the user that is logged in at boot and turn off the automatic login feature. Note: It may ask for a Admin password if you are on a 'Standard User' account.

Hope this helps!


UBUNTU 16.04 - wifi stopped working after fixed "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set"

I made a video on how to fix wifi not working in ubuntu by reinstalling the driver: https://youtu.be/J4O_LwiXwNk if that doesn't fix it, maybe try sudo rfkill unblock all. My wifi got disabled after secure boot too, but I managed to fix it. Also check that you have not enabled flight mode by accident, and also note that for me at least the flight mode light on my keyboard is on when flight mode is off for linux, while it is normal in windows, so try pressing the flight mode button on your keyboard if you have one :)


I had the similar problems installing Lunbuntu 17.04 with disk encryption under VirtualBox. My resolution:

Temporarily increase the virtual machine memorty to 6Gb
(to prevent memory problems due to lack of swap space)
Try Lubuntu without installing
Start LXTerminal
Disable swap space by issuing the command sudo swapoff --all
Preinstall LVM by issuing the command sudo apt-get install lvm2
run 'Install Lubuntu 17.04' from the desktop

In my specific case, I also could have opted to simply install the Oracle VM VirtualBox Extension Pack, and encrypt my entire Virtual machine...


Note: According to Nvidia website, your video card has been supported since 295.53

http://www.nvidia.com/object/linux-display-amd64-295.53-driver

  Added support for the following GPUs:

GeForce GT 610
  :

Be slightly conservative. You may want a later version (to better support your device), but do not want to be bleeding edge.

Unless you want to always download and compile (every OS update), use one of the provided PPAs.

See: Update nvidia drivers with xorg-edgers ppa

Use @robblue2x's method, and try 340.58

Note: 331 is only 331.104 (not 311.113); and 346.nnn is very latest.


File access: open fails for one program but not another

No one's answered, so I'll tell what I found out.

The problem in short is the following: when the file /etc/mysql/my2.cnf is accessed by cat, we see this:

open("/etc/mysql/my2.cnf", O_RDONLY)    = 3

However, when mysqld makes the same call, it gets a different answer:

open("/etc/mysql/my2.cnf", O_RDONLY)    = -1 EACCES (Permission denied)

Thus, the answer lay in the kernel. Something in the kernel was differentiating between a call to open(2) by cat and by mysqld. The only thing that came to mind was AppArmor.

Searching the packages on the system turned up several related to AppArmor. Listing files in the packages turned up the command apparmor_status; running this showed that mysqld is indeed covered under AppArmor:

# apparmor_status
apparmor module is loaded.
6 profiles are loaded.
6 profiles are in enforce mode.
   /sbin/dhclient3
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/connman/scripts/dhclient-script
   /usr/sbin/mysqld
   /usr/sbin/ntpd
   /usr/sbin/tcpdump
0 profiles are in complain mode.
3 processes have profiles defined.
3 processes are in enforce mode :
   /usr/sbin/mysqld (22699)
   /usr/sbin/mysqld (6808)
   /usr/sbin/ntpd (2800)
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

Reading the man pages for apparmor(7) showed that profiles were stored in /etc/apparmor.d; looking at this directory turns up the file usr.sbin.mysqld. This turns out to be the file to modify.

Modifying the file is straightforward, copying the entries for the original standard directories and files and making them into the new directories and files. Once this is done, activate the new configuration with a service apparmor restart.

I never did see any messages in syslog about "audit" (from AppArmor). The reason for this was that the messages went to /var/log/audit/audit.log instead of syslog or messages. This file contained entries like these:

type=APPARMOR_DENIED msg=audit(1310141055.025:256):  operation="mknod" pid=28765 parent=28764 profile="/usr/sbin/mysqld" requested_mask="c::" de
nied_mask="c::" fsuid=104 ouid=104 name="/var/log/mysql2/error.log"
type=APPARMOR_DENIED msg=audit(1310141055.025:257):  operation="open" pid=28765 parent=28764 profile="/usr/sbin/mysqld" requested_mask="r::" den
ied_mask="r::" fsuid=104 ouid=104 name="/var/lib/mysql2/mysql/plugin.frm"
type=APPARMOR_DENIED msg=audit(1310141055.035:258):  operation="open" pid=28765 parent=28764 profile="/usr/sbin/mysqld" requested_mask="rw::" de
nied_mask="rw::" fsuid=104 ouid=104 name="/var/lib/mysql2/ibdata1"
type=APPARMOR_DENIED msg=audit(1310141097.085:259):  operation="open" pid=28780 parent=28779 profile="/usr/sbin/mysqld" requested_mask="::r" den
ied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/my2.cnf"
type=APPARMOR_DENIED msg=audit(1310141177.636:260):  operation="open" pid=28841 parent=28840 profile="/usr/sbin/mysqld" requested_mask="::r" den
ied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/my2.cnf"
type=APPARMOR_DENIED msg=audit(1310141614.953:261):  operation="open" pid=28903 parent=28902 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/my2.cnf"
type=APPARMOR_DENIED msg=audit(1310141665.113:262):  operation="open" pid=28916 parent=28915 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/my2.cnf"
type=APPARMOR_DENIED msg=audit(1310141739.863:263):  operation="open" pid=28926 parent=28925 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/my2.cnf"
type=APPARMOR_DENIED msg=audit(1310142253.323:264):  operation="open" pid=28962 parent=19377 profile="/usr/sbin/mysqld" requested_mask="::r" denied_mask="::r" fsuid=104 ouid=0 name="/etc/mysql/conf2.d/"

This proves my reasoning and investigation: AppArmor was rejecting the open(2) requests.

Now that I knew what to look for I found blog entries relating to this - one article from all the way back in 2008.


Bash script that needs root only runs when I type exit!

I would

#!/bin/bash
if [[ $EUID -ne 0 ]]; then
   echo "This script must be run as root" 1>&2
   exit 1
fi
while true
do
    setleds -D +caps < /dev/console
    sleep 0.1
    setleds -D +caps < /dev/console
    sleep 0.1
    setleds -D -caps < /dev/console
    sleep 0.1
done

and do this:

sudo lights_infinity.sh

(add the -k if you want to kill the 15 minute time-frame for sudo but should not be needed)

The reason you need the "exit" is due to the "sudo su" you used. That opens an extra shell you need to "exit".

extra: check for "root" at the beginning of the file. If this runs for 15 minutes it might error out(not sure); if so add "sudo" to the "setleds" and it will stop and ask the password.
extra2: 3 times "setleds -D +(/-)caps < /dev/console
sleep 0.1" looks better when you use a function. And the while loop will look better if it has a nicer exit than control-x.


How to quit tasksel instalation stalled with error "write access unavailable, cannot proceed"?

It seems nothing bad happened from killing tasksel process, thus I post it as an answer.

I killed tasksel process and ran usual commands to clean up and fix package system:

sudo apt-get clean
sudo dpkg --configure -a

dpkg --configure -a command froze for a second and I mounted sda partitions. It found Fedora distribution on that disk and finished fixing packages successfully. My guess is that grub configuration needed access to the disk.


why my ubuntu 18.04 have many dev/loop? and how to fix it?

You have a bin directory in your $HOME, which is before the system directories in your PATH environment variable. To override the system df, you can make a script named "df" in your $HOME/bin directory with the contents:
cd $HOME/bin
echo '/bin/df $@ |grep -v "loop.*snap/"' >df
chmod +x df


You messed up the partition that MacOS is installed i believe, follow this guide in order to reinstall MacOS. I assume you don't have any important data on your pc since it's a brand new one. If you wanna access your files and copy them into a external drive or something

Boot up to LiveCD of ubuntu
Follow this answer from superuser to mount your MacOS Hdd
I believe you would be able to rescue your data, i have no access to a mac however mounting the partition worked for me in a situation with Windows.


copy and paste for columns between two text files

Since your data appears to have inconsistent amounts of whitespace between fields, awk will handle it better than cut. So paste the two files together and then pick out the required fields from the composite:

paste text_2 text_1 | awk '{print $1,$2,$3,$4,$12,$13,$14}' > new_text

Ex.

$ cat new_text
E GPS41 0 5.68026000000000E+08 1.097676240456553E+04 -1.668403004627044E+04 1.770513486005421E+04

The output differs from yours only in terms of whitespace:

$ diff -sb your_new_text new_text
Files your_new_text and new_text are identical

If you need to preserve the exact amounts of whitespace, you can change the awk print to a suitably formatted printf.

You can do it with cut and paste if you first squeeze the delimiters down to single spaces:

paste -d ' ' <(tr -s ' ' < text_2 | cut -d ' ' -f 1-4) <(tr -s ' ' < text_1 | cut -d ' ' -f 5-7) > new_text


Terminal in Ubuntu doesn't work using Ctrl + Alt + T

I fixed it somehow, by going to Settings > Keyboard Shortcuts > + (by scrolling down to the bottom) and entering this, Name: Terminal, Command: xfce4-terminal, Shortcut: Ctrl+Alt+T. Nevertheless, thank you for helping.


Starting mongodb on latest version of ubuntu is a bit different.

The correct code to start mongodb is  sudo service mongodb start

To confirm that mongodb is running run  sudo service mongodb status

Other commands include
 sudo service mongodb stop  sudo service mongodb restart


20.04 Mouse click and keyboard unresponsive

Replace the screen saver
I experienced something similar on Xubuntu LTS 20.04 with the keys of my Logitech K400 Plus wireless touch keyboard becoming unresponsive after a while except for console switching with Ctrl+Alt+F1..F6.
As it turned out, the buggy xfce4-screensaver was kicking in. I replaced it with the more reliable xscreensaver.
$ sudo apt remove xfce4-screensaver
$ sudo apt install xscreensaver

I would suggest replacing your current screensaver with xscreensaver.


You can remove the session using this command:

sudo apt-get remove gnome-session-fallback


Unable to install any software in Ubuntu because of this error

Try this :

sudo rm -f /var/lib/dpkg/info/initramfs-tools.post*
sudo rm -f /var/lib/dpkg/info/initramfs-tools.pre*

sudo rm -f /var/lib/dpkg/info/bcmwl-kernel-source.post*
sudo rm -f /var/lib/dpkg/info/bcmwl-kernel-source.pre*

sudo dpkg --configure -a


Let's assume you've got a swap partition between windows' and ubuntu's one (something like EFI/boot manager - Windows - Swap - Ubuntu) as it is the trickiest scenario.

First, boot on Windoze and defrag you hard drive (Start menu > search for "defragment" and do "Defragment drive" after selecting your windows partition).
Then, resize the Windows partition (search for "disk management" and right-click on your windows partition, select “Shrink Volume” from the menu and free the space you want to add to your ubuntu.
Next, boot via a live-CD or live-USB (see Create a bootable USB stick on Windows | Ubuntu tutorials)
Launch GParted, you should know have this kind of configuration : EFI - Windows - Free space - Swap - Ubuntu
Right now, all you have to do is swipe the swap space to the left (right click, resize/move and click-n-drag it to the left) and expand the ubuntu's one (right click, resize move, expand via clic and drag).
Press on apply and agree to the warning.


Auto mount sshfs volume through fstab with password auth

In this example I implied that we work as root. If you don't, apply sudo su or sudo when needed.
Your system may use different init system than Systemd, but Cron is pretty universal.

You can simply use /etc/fstab to pre-define your mount options and whatnot.

Example:

USERNAME@HOSTNAME_OR_IP:/REMOTE/DIRECTORY /LOCAL/MOUNTPOINT fuse.sshfs  defaults,password_stdin,_netdev 0 0

Keep in mind default mount options are far from perfect.
For example: reconnect is important. see: https://github.com/libfuse/sshfs/issues/101

An example with these options (taken from the Github issue):

sshfs#user@storage.cz:/content/ /mnt/srv fuse   password_stdin,defaults,user,allow_other,reconnect,delay_connect,ConnectTimeout=5,ServerAliveInterval=5,IdentityFile=/root/.ssh/id_rsa_storage 0 0

Once that's done, you need a simple script with this sole content, such as:

#!/bin/bash
echo "passwordgoeshere" | mount /mnt/srv

Let's save it under your root user, so an example: /root/mount_sshfs.sh
Now you need to make it executable: chown +x /root/mount_sshfs.sh

Now all you need is just cron or systemd to execute this on mount.
With cron, a simple entry like this works:
@reboot /root/mount_sshfs.sh

With Systemd:
1) You have to create the script. See just above.
2) You have to create a new Systemd service script.
An example would be: /etc/systemd/system/mount_network.sh
3) The contents of the file:

[Unit]
Wants=network-online.target
After=network-online.target

[Service]
ExecStart=/root/mount_sshfs.sh

[Install]
WantedBy=default.target

Notes:

I did not test the Systemd method as I try not to rely on it as much as possible. It's personal dislike/dislike/hate. :)
With Cron, you may need to add a "sleep" to the script, so it doesn't try to run the script "too early", ie.: before internet/network comes up.

Source: https://linuxconfig.org/how-to-automatically-execute-shell-script-at-startup-boot-on-systemd-linux


Why isn't Evince integrated with the HUD in Ubuntu 13.10?

User qamelian at the Ubuntu Forums says the following:

  Evince uses the new Gnome menu model rather than the old type that
  appear above the app. As a result, the HUD can't communicate with
  those menus.


Unable to install any packages due to unrecoverable fatal error /var/lib/dpkg/diversions

First, back up /var/lib/dpkg/diversions and /var/lib/dpkg/diversions-old, just in case.

Next, try copying /var/lib/dpkg/diversions-old on top of /var/lib/dpkg/diversions:

cd /var/lib/dpkg
mv diversions diversions.broken
cp diversions-old diversions

Now dpkg should be able to work again, but it's possible that its diversions database is incomplete.  Reinstalling (apt-get install --reinstall packagename) the affected packages might be a good way to restore that; question is: how can you identify which packages were affected?  Comparing the contents of diversions.broken and diversions-old (diff -u diversions-old diversions.broken) is one way; looking in /var/log/dpkg.log for a list of recently updated packages and reinstalling them just in case is another.  It is also possible that nothing bad will happen from you having a slightly out-of-date diversions database; it all depends on what exactly is in those files.


I've downloaded the file to install Ubuntu 14.04.1 LTS but I can't open it. Some advice?

iso is a CD/DVD image format. You have to burn it to a disc and boot your machine from it to install Ubuntu.
Here you have a full step-by-step guide on how to install Ubuntu.


find history of mysql commands on ubuntu

Those commands go into ~/.mysql_history.


java process hogs both cpu and net speed

Looks like Freenet was causing the issue. I removed it, and now everything works fine.
Thanks to this thread. Also, the process did not restart once I killed it. So, it did the trick!


How to Extract parameters from captured beacon frame

You might find this to be of interest.  There is a post there claiming that the RSSI is in the notdecoded part of the packet and they describe how to retrieve it.  Also, how you put the card in capture mode may effect the presence of the RSSI info field.

I don't think frequency information is stored in the capture, but the type of protection should be in the Dot11Elt ID field.  Some random github hosted script that parses this.


Help on dualboot Ubuntu 14.04 and Windows 7 on HP Mini 200?

You need to use gparted and create an ext4 partition in that space you opened up, also there is no BIOS part of the disk, there is an MBR but that is not a partition and is not accessible from gparted or anything else. Once you have created the ext4 partition you restart the installation (sorry) and once you get to the screen you posted you select that partition, click "change" then set it as ext4, format, and set it as mount point /, then continue the installation following the prompts.


Ubuntu 14.04 - User desktop launcher is missing

the source : Unity doesn't load, no Launcher, no Dash appears

You just need to turn the Unity plugin back on. The problem is this is a pain in the bottom because you've now got no graphical method to do this. So:

Try to open a terminal with Ctrl+Alt+T.
This may not work but you can try right clicking on the desktop and selecting "Open terminal here." Otherwise, you may need to change to a "hard" terminal by pressing
Ctrl+Alt+F1 and log in.
Install compizconfig-settings-manager by running

sudo apt-get install compizconfig-settings-manager

Then run it with this:

DISPLAY=:0 ccsm &

The first part tells the terminal which display you want it to load on (otherwise it won't have a clue).
If you switched to a TTY in step 1, switch back to the graphical server by pressing Ctrl+Alt+F7 (or Ctrl+Alt+F8 sometimes).
There there should be a CompizConfig Settings Manager waiting for you.
Find the Unity plugin. Enable it. You will be asked "Ubuntu Unity Plugin requires the plugin OpenGL. Enable Ubuntu Unity Plugin / Enable OpenGL"
Everything should spring into life but if it doesn't, you might have to restart. You can do that by going back to the terminal and running sudo reboot.


On typing dev/usb/lp0 it says 'no such file or directory'

Try using SUDO . The MAN page for escputil also says this error as a known bug, try retyping the command once again that should resolve the issue.

   USB-connected printers sometimes fail to identify or return ink levels.
   You may have to repeat the command.  This is probably a timing issue in
   escputil, not a flaw in the printer.

   Anything  requiring bidirectional communication with the printer (iden-
   tify, ink levels, or head  alignment  without  specifying  the  printer
   model)  requires  read/write  access  to  the printer port (for example
   /dev/lp0).  This may require these operations to be performed as  root.
   In  addition,  kernel  support is required for bidirectional communica-
   tion.   For  Linux  version  2.2,  CONFIG_PRINTER_READBACK  should   be
   enabled; this is called CONFIG_PARPORT_1284 on 2.4 and later kernels.

   If  the  printer  is performing self-test or head cleaning on power up,
   the identify and ink level commands will time out, although the printer
   successfully  receives  the command.  The command will need to be reis-
   sued when the printer is quiescent.


I have windows 8 and windows 7 can i install ubuntu to a usb normally

Once I managed to install Ubuntu 12.04 in my 16 GB pen drive. Hope you can also install Ubuntu in a pen drive.  I first formatted it into two partitions. 1st as EXT4, gave around 12 GB and 2nd as SWAP gave remaining space. Any how I managed to use Ubuntu from pen drive.

But believe me it didn't worth the installation. It was too slow to response and was taking seconds to open a window. I installed in USB 2.0, so you may give a try on USB 3.0. But I don't think that it will run fast. So I prefer you to just steal some space from your existing Windows partition and install Ubuntu on that. Gparted will do this for you.


RSSOwl 2.2.1 won't run or install on Ubuntu 18.04

NOTE: You probably shouldn't continue using RSSOwl as there exists multiple vulnerabilites that will
  never be patched as the project is no longer going to be mantained.
  Furthermore it does not support Java9.

Having said that, the following prerequisites are required to run RSSOwl as The .deb package is for an older version of Ubuntu/Debian and can't be used:

A working installation of firefox
The Oracle JDK/JRE 8, that you can install by

sudo add-apt-repository ppa:webupd8team/java && sudo apt-get install oracle-java8-set-default


About

From the GNU Paint project page:

  GNU Paint (gpaint) is a simple, easy-to-use paint program for GNOME,
  the GNU Desktop. Gpaint starts as a port of xpaint and takes
  advantages of features unique to the GNOME environment. Gpaint is
  licensed under the GNU GPL, version 2 or later.

Curent Features:

Drawing tools--ovals, freehand, polygon, text, with fill or shallow for polygons and closed freehand.
Cut and paste by selecting irregular regions or polygons.
Print support using gnome-print (still flaky, will be improved upon next release)
Print support using gnome-print (still flaky, will be improved upon next release)
Editing multiple image at the same time without runnng multiple instance of the image editor
All image processing features present in xpaint

Installation

You can install Gnu Paint / gpaint by

sudo apt install gpaint


How to move my downloaded wallpapers to the default wallpaper directory

The theme section you are shown when selecting properties from the desktop also has a drop down menu to select a wallpaper from the /home/$USER/Pictures/ folder.

This should be the most logical place to store pictures.

Nevertheless the command to store those images in /usr/share/background/ would be

sudo cp /home/$USER/Desktop/wallpapers/* /usr/share/backgrounds/


There are multiple ways to do this.

Option 1: Use a command line tool called gifsicle. It's available in default Ubuntu/Debian repositories.

It's fast and won't affect the quality, buy it only accepts frame numbers, not time, so if you need to cut exact time, you should figure out the frame number yourself. You can view the total number of frames and delay times between each frame with this command:

gifsicle --info YOURFILE.gif

Then you can divide the time you want to cut with the frame delay and it will give you the number of frames in this time, so you can figure out start frame and end frame.

Replace XXXX with the frame where you want your GIF to start, and YYYY with frame where you want your GIF to end.

gifsicle YOURFILE.gif '#XXXX-YYYYY' -O3 > cut.gif

Option 2: Using FFMPEG. It's also available in apt.

FFMPEG accepts time directly, so it's very straightforward, but it may worsen the quality of output gif and increase file size in some cases.

ffmpeg -i YOURFILE.gif -ss 00:00:04 -t 00:00:08 -async 1 cut.gif

Option 3: if you're ok with online tools and your GIF does not exceed 20MB, this online tool can cut GIFs by frame number or by time and won't affect the quality.


Ubuntu 16.04 with 4.13 kernel freezes on swap

I had similar issue. The reason in my case was having both out of swap space and out of memory. I created a simple bash script to automatically increase/decrease swap space continuously if having too less/too much memory available. It keeps memory performance optimal by disabling swap space when enough free memory available.

See https://github.com/make/autoswap


CUPS what command do we use to get information about the user?

You can extract the information from /var/log/cups/page_log*, after that, it's a SMOP.


Using avconv, when remuxing to MKV, is there a way to fix packed AVI input files?

A workaround is to convert to .mp4 first:

avconv -i input.avi -c copy temp.mp4
avconv -i temp.mp4 -c copy output.mkv
rm temp.mp4

Sadly, one cannot simply pipe the mp4 format between avconv instances: "[mp4 @ 0x80846c0] muxer does not support non seekable output"


Make window backgrounds semi-transparent

So, there's a package, compizconfig-settings-manager, which installs a program, ccsm.  In previous versions of Ubuntu, this included, in the "Accessibility" section, a feature, "Opacity, Brightness, and Saturation."

Now, you need to additionally install the package compiz-plugins in order for this to appear.

So:

sudo apt-get install compizconfig-settings-manager compiz-plugins
Then, run ccsm.


Ubuntu 16.04: appstreamcli error while get-update

I have had the same problem and the problem was that there was (in my case) an inappropriately escaped character in file /var/cache/app-info/xmls/fwupd.xml in line 265 which broke the xml, hence the error. In line <checksum filename="Firmware_SF30&SN30_Pro_V1.26.dat" target="content" type="sha1">3ef2bdee8aca2a45b9f53b4d4cce9722523f57f8</checksum> the & symbol must be encoded &amp; for this to be a valid xml.


You can install gcc-4.8 with:

sudo apt-get install gcc-4.8

No difficult compilation methods are needed to be employed.


I cannot seem to install wubi on windows 8.1 Pro (Surface Pro 2)

Wubi does not work with computers pre-installed with Windows 8 and higher. There is no way around it. Your only choice is to do a full install.

See Installing Ubuntu on a pre-installed Windows 8 64 bit system (UEFI supported) for details on how to do it.


Ubuntu 13.10: Upgrade interrupted because of openjdk-7

Try to remove previously installed openjdk-7-jre-headless:amd64 package,

sudo dpkg -r openjdk-7-jre-headless:amd64

Then try,

sudo apt-get -f install


Best way to set up a haskell development platform

what's the easiest way to set up a reasonable development system for Haskell?

The easiest, and the most reasonable way to get a Haskell environment running is:

sudo apt-get install haskell-platform
or

Click the package to install haskell-platform

The problem with the 7.0.1 platform is that it hasn't all been packaged up nicely for Ubuntu yet, it's still only recommended for early adopters and packagers.