OpenVPN client not getting DNS information

I had the same problem but managed to solve it using the following hack:
Instead of up /etc/openvpn/update-resolv-conf I created a file named up.sh in /etc/openvpn.
Run the command sudo gedit /etc/openvpn/up.sh and paste the following:

#! /bin/bash
DEV=$1

if [ ! -d /tmp/openvpn ]; then
mkdir /tmp/openvpn
fi
CACHE_NAMESERVER="/tmp/openvpn/$DEV.nameserver"
echo -n "" > $CACHE_NAMESERVER

dns=dns
for opt in ${!foreign_option_*}
do
eval "dns=\${$opt#dhcp-option DNS }"
if [[ $dns =~ [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]; then
if [ ! -f /etc/resolv.conf.default ]; then
cp /etc/resolv.conf /etc/resolv.conf.default
fi

cat /etc/resolv.conf | grep -v ^# | grep -v ^nameserver > /tmp/resolv.conf
echo "nameserver $dns" >> /tmp/resolv.conf
echo $dns >> $CACHE_NAMESERVER
cat /etc/resolv.conf | grep -v ^# | grep -v "nameserver $dns" | grep nameserver >> /tmp/resolv.conf
mv /tmp/resolv.conf /etc/resolv.conf

fi
done

Save it and run sudo chmod +x /etc/openvpn/up.sh
Then create another file /etc/openvpn/down.sh and paste the following in it

#! /bin/bash
echo "Restoring original nameservers"
rm -f /etc/resolv.conf
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
echo "Done restoring nameservers cheers"

Save it and run sudo chmod +x /etc/openvpn/down.sh

Now remove the lines:

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

And replace them with:

 script-security 2
    up /etc/openvpn/up.sh
    down /etc/openvpn/down.sh


How to have airplane mode by default on in ubuntu 20.04

First, list the available devices:

rfkill list

Your bluetooth adapter may be numbered 1 and called hci0. Now disable it:

rfkill block 1

and so on for the other devices.
This will persist across boots.


What is the leading 2048 sectors and in the first two partitions?

Out of the initial 2048 sectors at the start of the disk, the very first 34 sectors of a GPT-partitioned drive contain the partition table, the rest of the (2048 - 34 =) 2014 sectors are not used. Partitions need to start on a certain sector for optimal disk-performance, a common practice is to align partitions to 1 MiB (512 B (sector size) x 2048 (number of sectors) = 1 MiB), that's why you see this gap at the start of the disk.
/dev/nvme0n1p1 is the ESP (EFI System Partition), it is the place where boot-loaders are stored. This partition is a must, it is required by UEFI specifications, without this partition you would not be able to boot the machine. This partition will be mounted at /boot/efi in your system.
/dev/nvme0n1p2is your boot-partition and will be mounted at /boot in your system. This partition is not encrypted. You need this extra partition because you use LVM and encryption. The boot-loader can not read from a partition which is encrypted, so the need for this extra partition. This partition holds the kernel(s) and the boot-loader-configuration.
swap_1 is the swap-space. Swap acts as virtual memory. The system will use this space to move contents which are in RAM to the swap-space to free some RAM when necessary (this may happen if an application uses a lot of RAM, it will definitely happen if an application needs to use more RAM than installed, if you don't have swap-space in that case, the application would crash).


Ubuntu 16.04 with Kernel 4.7 and Broadcom Wireless - no bcmwl

I had the same situation. Here is what worked for me: Get the .deb package at https://launchpad.net/ubuntu/yakkety/amd64/broadcom-sta-dkms/6.30.223.271-3 and then

sudo dpkg -i broadcom-sta-dkms_6.30.223.271-3_all.deb


Virtual Box Ubuntu Server 18.04 TWO Network Adapters

The VirtualBox connected adaptor does not have DHCP enabled by default. You either need to statically assign an IP address or in the VirtualBox management interface turn on the DHCP assignment feature.


Connection refused when Host OS(Ubuntu) telnet the Guest OS(Windows XP) of the Virtualbox

Make sure you installed the following packages:

sudo apt-get install ssh
sudo apt-get install telnetd-ssl
sudo apt-get install openssh-server


SVN - How to downgrade svn client version from 1.7.9 to 1.4.6

I looked around on subversion's website and I was unable to find any .deb files for older versions available on the site (though it is possible I missed it).

What you can do instead is download the source from here: https://archive.apache.org/dist/subversion/

Note that there is the source tarball and then the *-deps tarball.

If you're unsure of what to do with these files, see this answer

If you do go this route, before you start, make sure you do sudo apt-get purge subversion to make sure it's uninstalled and doesn't leave any files that may conflict with the package you built from source


5.1 sound on Ubuntu 20.04 LTS with 3 3,5mm jacks allows stereo onlly

You have to edit /etc/pulse/daemon.confand define the number of channels for your sound card.

Find

; default-sample-channels = 2

Uncomment it by removing the leading ;, and change it from 2 to 6:

default-sample-channels = 6

After saving that change, kill pulseaudio by running:

pulseaudio -k

(It restarts itself after a few seconds.)

That's all.


Change Resolution on ubuntu 16.04 32 bit not working

My problem is solved now! I am so happy now, resolution of 1280x800 works now. The problem was that the video card i use is very old. I found instructions to add a boot parameter. The line looked before adding like this: GRUB_CMDLINE_LINUX_DEFAULT="nomodeset". I erased nomodeset and wrote "quiet splash raedon.dpm=1" and did a reboot. After that everything is like it should. Hope that helps somebody with an old Raedon Video card. Best Regards


Is it possible to color the prompt in Bash?

Found an easy way to do it:

Uncomment force_color_prompt=yes in ~/.bashrc.


Programs like as and ld are part of the GNU binutils package. The package management system will install this automatically as a dependency of the compiler: if you have installed build-essential there should be nothing extra you need to do.

This assumes you are referring to the native GNU compiler toolchain: things may be different if you are referring to a toolchain for cross-compilation.


Add Searchmonkey to Thunar custom actions

With gnome-search-tool and catfish, command-line options are available and so the programs can integrate into Thunar quite nicely; the --path=%f option is important as that means the location of the selected folder (with its files) can be passed on to these search tools so they open at the right folder.

If you enter the name of the program and then add--help, you will see all the command-line options for these two search tools: for gnome-search-tool --help we have many options such as:

 --named=STRING                  Set the text of "Name contains" search option
 --path=PATH                     Set the text of "Look in folder" search option

With catfish there are similar options, but it used to be essential to specify --fileman=thunar in addition to --path=%f. This was found to be necessary as catfish used to only open the home folder, not the one selected if the fileman workaround was not used. However, it works now with just --path=%f with Catfish 0.3.2 and Thunar 1.2.3 on Xubuntu 12.04.

It doesn't seem to be possible to pass any command-line options to searchmonkey, and there doesn't seem to be any information available: the mailing-lists and forums seem pretty empty. Even if you set the filemanager and options in searchmonkey > settings > preferences > systemcalls, and then specify options in the custom action, it doesn't seem to integrate into Thunar successfully.

Searchmonkey doesn't seem to integrate with other filemanagers either after testing, so it must be because it does not accept any suitable command-line options. The only way to make it integrate would be to create a patch for it and recompile it, which is probably not really worthwhile considering how useful catfish is.


After creating a new user in recovery mode I noticed that doing startx with my own user but not others threw this error: xauth: error in locking authority file /home/Connor/.Xauthority What fixed my problem was deleting the ~/.Xauthority file in my home directory - a new one was generated with correct permissions and everything was fixed.


Evince shows small frame in Presentation mode

I'm using Ubuntu 20.04 and evince 3.36.7. I have met the issue.
After searching in evince official repository issues I think the answer is in:
https://gitlab.gnome.org/GNOME/evince/-/issues/1486
https://gitlab.gnome.org/GNOME/evince/-/issues/1504

Basically, the issue is introduced when fixing an issue on Wayland but forgetting to limit the fix to Wayland.
You should either use Wayland protocol, or use a newer version of envice (you can install the newer version from snap, flathub, etc). For example, use evince from snap:
sudo snap install evince


Is permission required for creating a derivative?

Ubuntu is open source, it is free to modify it, with no permission from Canonical, or Ubuntu. As long as you don't claim it to be your own work or an official derivative, you're fine.

What would this separate name be?


If you don'h have donf-editor install it:

sudo apt-get install dconf-tools

open dconf-editor

Then go to  setting-->org-->gnome-->settings-daemon-->peripherals-->touchpad

and set touchpad-enabled to true

Check this for more information about dealing with touchpad


Revert accidental `dpkg --clear-selections`

To set all packages currently selected to deinstall back to install, you run the following two commands:

sudo dpkg --get-selections | awk '/deinstall/ {printf "%s\t%s\n",$1,"install"}' > packages
sudo dpkg --set-selections < packages

The first command finds all packages marked with deinstall and writes a list of packages like this

package-name         install

The second command corrects the packages.

If the full output of dpkg --get-selections from before the accident is given, you can simply restore all selections with the command

sudo dpkg --set-selections < packages

where packages is the name of the file holding the old output.


Janitor broke my visual interface - Xubuntu 12.04

It appears that you indeed accidentally removed the proprietary AMD driver (fglrx in the log). Log in to your virtual terminal and execute sudo jockey-text from there to reinstall it. Then you should be good to go. If possible, please inform the developer of computer-janitor of this misbehavior.

What I did to resolve this even though I did not have an AMD card:

fglrx caught my attention
apt-cache search fglrx yielded jockey-gtk. It appeared already installed.
Since you have no graphics I tried jockey-Tab on the terminal
jockey-text was autocompleted and executed but did not find any additional (read: proprietary) drivers. Assumed this would fix if there were any.


What's the easiest way to install Drupal locally?

Drupal is a free and open-source content-management system, and it’s surprisingly flexible. You can use it for everything from a small blog to a major business or government site.  It's a mildly tricky setup, since you basically have to build a LAMP server from scratch, but here’s a step-by-step guide on how to do it.

First, install Ubuntu into your machine of choice. Once Ubuntu is installed and updated, you will need to install and configure four pieces of software to create a LAMP server to support Drupal: the Apache web server, the MySQL database server, PHP , and the MySQL module for PHP.

Begin with the Apache web server. To install Apache, open up a Terminal window (Applications, Accessories, Terminal), and type the following command (note that all Terminal commands are case-sensitive):

sudo apt-get install apache2

Follow the prompts to install Apache. Once the installation is finished, you can test that Apache is working by opening up Firefox and navigating to http://localhost. If you see the “it works!” web page, you have Apache up and running.

Next, you’ll need to install MySQL. Return to the Terminal and type this command:

sudo apt-get install mysql-server-5.6

During the installation you be will asked to provide a root password for MySQL. Be sure to pick a strong password (a combination of lowercase, punctuation, and uppercase letters), since the root user has full access to all tables on all databases. For obvious reasons, you’ll want to remember this password, not least because we need it again in the following steps. MySQL is a big package, and depending on your connection and computer speed, it might take a while to install.

Next, install PHP version 5:

sudo apt-get install php5

Then install the MySQL module for PHP:

sudo apt-get install php5-mysql

Install gd module for PHP:

sudo apt-get install php5-gd

Finally, download the Drupal software to your Downloads folder. You can obtain it from here on the drupal.org site.

Now that we’ve got our software installed and downloaded, we’ll need to configure it.

First, you’ll probably need to add a line to your /etc/apache2/apache2.conf file.  I’ve read differing things about this, but I have found in my own testing that Drupal would not function properly without it, since Apache did not properly interpret the PHP pages otherwise. To edit apache2.conf, use the following command:

sudo -H gedit /etc/apache2/apache2.conf

(Note that it’s a good idea to back up any system configuration file before editing it. You can do so quickly by using sudo cp /etc/apache2/apache2.conf ~/Desktop to save a copy to your Desktop. You can of course use vi or emacs or the editor of your choice, but most new users seem to prefer gedit)

Once you are in gedit, add the following line to the end of the file:

AddType application/x-httpd-php.html

Save the file and exit gedit. Restart Apache with this command, so it re-reads its configuration file:

sudo /etc/init.d/apache2 restart

Now we’ll need to prepare MySQL for use with Drupal. First, you’ll need to run MySQL’s install script:

sudo mysql_install_db

And then this command, to properly secure MySQL. Follow the default prompts to remove the testing database in MySQL:

sudo mysql_secure_installation

Once this is completed, log into the MySQL command-line client:

mysql -u root –p

Enter your MySQL root user password from above, and you’ll find yourself at the MySQL> local client prompt. First, create a database for Drupal to use:

CREATE DATABASE drupal;

(Note that all commands entered in the MySQL local client must end with a semicolon to denote the end of the statement.)

Once the database is created, you’ll need to create a database user for Drupal to use. While still in the MySQL command line client, type this:

CREATE USER drupaluser;

Then create a password for your new user (note that your password will actually go within the quotation marks, and is case-sensitive):

SET PASSWORD FOR drupaluser = PASSWORD(“password”);

Now that you’ve got your Drupal database and your Drupal database user, you’ll need to grant the user all permissions on the database (again, the password goes within the quotation marks, and is case sensitive):

GRANT ALL PRIVILEGES ON drupal.* TO drupaluser@localhost IDENTIFIED BY ‘password’;

(Make sure to append “@localhost” to drupaluser; otherwise you’ll get a database error when you try to start Drupal for the first time.)

Go ahead and exit MySQL:

\q

Next, make a directory for Drupal with this command:

sudo mkdir /var/www/drupal

Next, you’ll need to unpack the Drupal files and move them to the /var/www/drupal directory. Once the files have been unpacked and copied, you’ll need to make a few changes. First, you’ll have to create a settings.php file for Drupal to use during the installation:

sudo cp /var/www/drupal/sites/default/default.settings.php /var/www/drupal/sites/default/settings.php

Next, make the file writable:

sudo chmod 666 /var/www/drupal/sites/default/settings.php

Then create a files directory for Drupal to use:

sudo mkdir /var/www/drupal/sites/default/files

Mark the files directory as writable:

sudo chmod 775 /var/www/drupal/sites/default/files

Now you’re ready to install Drupal. Open up a web browser on your Ubuntu system and navigate to http://localhost/drupal. You’ll be redirected to the Drupal installation page. Click on the "Install Drupal In English" link to continue.

if http://localhost/drupal directs you to the 404 page, Apache is likely looking for the wrong document root.  Run the following:

sudo -H gedit /etc/apache2/sites-enabled/000-default.conf

Replace DocumentRoot /var/www/html/ with DocumentRoot /var/www/; save and exit.

Restart apache to register the changes:

sudo /etc/init.d/apache2 restart

Go back to the web browser and navigate to http://localhost/drupal.  Click on the "Install Drupal In English" link to continue.

On the next page, you’ll be asked for the database name, username, and password you created earlier. Enter those names and continue. On the next page, you’ll be asked to set an admin username and password and a few other settings.

After that, your basic Drupal installation is finished, and you can choose how to further customize the site. One last thing you should do; use this command to change the settings.php file so it is no longer world writeable:

sudo chmod 644 /var/www/drupal/sites/default/settings.php


nvidia drivers fail completely after update to 3.5.019

It appears you've messed up your kernel module configuration by installing both an upstream Nvidia driver as well as one from the Ubuntu repositories.

Now the "userland" Xorg libraries don't match the version of the kernel module and that's what you're seeing here in the Xorg error logs. I suggest you to take the steps below in order to revert to the ones provided by Ubuntu.

Uninstall the manually installed Nvidia driver. Refer to one of the many questions on this, e.g.

How to uninstall manually installed Nvidia drivers?
Uninstall all possible Ubuntu's Nvidia packages:

sudo apt-get purge 'nvidia-*'

List and remove the Nvidia kernel modules still installed (if any) at this point:

dkms status
dkms remove nvidia -k your-kernel-version-here

Repeat this until you see no Nvidia modules anymore using dkms status.
Install from the repositories:

sudo apt-get install nvidia-current nvidia-settings

or if you need newer/recent versions:

sudo apt-get install nvidia-current-updates nvidia-settings-updates

Verify that the Nvidia kernel driver is build for your running kernel:

dkms status | grep `uname -r`

should produce e.g. nvidia-current, 313.09, 3.8.3-030803-generic, x86_64: installed.
Reboot.


problem adding ppa in ubuntu server 14.04.05 lts

remove the 5 at the end

if im correct youre trying to add this ppa.

do this:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5.6

and you can install extensions for example: sudo apt-get install php5.6-mcrypt php5.6-mbstring php5.6-curl php5.6-cli php5.6-mysql php5.6-gd php5.6-intl php5.6-xsl php5.6-zip

source 1
source 2


Loading online videos even with flash / pepper [Ubuntu 16]

Check out Adobe's flash player download page. Downloads are now available for Firefox and Chrome (although Chrome should have this built in) for the most recent versions of the Adobe flash player.

Here's a screenshot of the download page for Firefox


I was able to figure this out.  My initial problem was understanding that Ubuntu does not treat a disk swap like Windows.  When a disk is swapped in Windows, the OS knows to extend the file system into the remaining space.  In Ubuntu, there are some extra steps that I found by reading How can I resize an LVM partition? (i.e: physical volume).

Basically, the steps I took were...

Use Clonezilla to copy the contents of the smaller drive to a larger
drive.
Use the Disk manager to create a new partition on the new free space
(180gb).
Use the LVM (Logical Volume Management) tool to initialize the new
space.

And, the steps I was missing....

Reboot from a Live CD and install LVM according to the post above.
Use LVM to extend the file system into the new space.
Reboot and space is now available.

I hope this helps someone else struggling with how to accomplish a disk swap.


NVIDIA RTX 3070 Laptop not working on Xubuntu 20.04

I've found this to be the solution. Read the steps carefully, starting with Kernel update.
Here is the original copy from the thread. Copyrights as per the link below.
1. Get the latest Kernel. Currently it is 5.10.14
2. Download all files from this URL https://people.freedesktop.org/~agd5f/radeon_ucode/gs/ and copy them to
/lib/firmware/amdgpu Make sure they all have the same owner and permissions like the other files in the same folder.
3. sudo wget https://raw.githubusercontent.com/torvalds/linux/master/scripts/module.lds.S -O /usr/src/linux-headers-5.10.2-051002-generic/scripts/module.lds
4. sudo sed -i '$ d' /usr/src/linux-headers-5.10.2-051002-generic/scripts/module.lds

Make sure you put the correct kernel version instead of "5.10.2-051002"

1. sudo update-initramfs -u
2. sudo add-apt-repository ppa:graphics-drivers/ppa
3. Reboot and install the NVIDIA driver from “System → Preferences → Hardware → Additional Drivers”

Source: https://forums.developer.nvidia.com/t/ubuntu-mate-20-04-with-rtx-3070-on-ryzen-5900-black-screen-after-boot/167681/30
Make sure to copy the amdgpu bin files into the right kernel path, as it changes with time so you will end up with different digits.


Can not find class org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory in Tomcat7/Ubuntu 12.10? (Possible bug)

A solution is given for this same problem on StackOverflow by modifying the resource tag in conf/context.xml to use factory="org.apache.commons.dbcp.BasicDataSourceFactory" instead of Tomcat 7 default factory. You can see there the cause of this problem.

The resource tag will look something like (taken from the referenced answer):

<Resource name="jdbc/myDataSource"
    auth="Container"
    type="javax.sql.DataSource"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/myDatabase"
    username="username" password="password"
    validationQuery="SELECT COUNT(*) FROM MY_TABLE"
    factory="org.apache.commons.dbcp.BasicDataSourceFactory" />


How do I change the unity launcher dash home icon in ubuntu 12.04?

The problem in your command is that there is no launcher_bfb.png file in your ~home directory.

Also I wouldn't follow a guide to tweak a newer release of ubuntu to tweak an old one.


Copy Only one directory (recursively) from a damaged NTFS drive

I found this to be the best solution:

cp -Rfv source target

-R: recurse through subfolders
-f: skip over undreadable files
-v: verbose output so you can see what was skipped.


Problems with setting up a second monitor on Ubuntu

Were you able to install xserver-xorg-video-displaylink using the following command?

apt-get install xserver-xorg-video-displaylink

If not, please reply with what error you encountered. You may not have the proper dependencies. Try installing them using:

apt-get install xinit xserver-xorg xserver-xorg-dev xfonts-base libusb-dev xorg-dev git-core build-essential

EDIT: In reply to your comment saying that you were still unable to get it to work, the dmesg logs seem to indicate it's detecting it. Are you using an nvidia graphics card? Are your graphics drivers all up to date? If it's NVidia, then go to Applications-->System Tools-->Administration and choose option Nvidia X Server settings. Can you select the other display in those options?


E: The package ros-indigo-librealsense needs to be reinstalled, but I can't find an archive for it

This worked for me:

sudo dpkg --remove --force-all ros-indigo-librealsense


installation problem of texlive in Xubuntu 16.04.1

I had a similar problem when upgrading from Ubuntu LTS 14.04 to LTS 16.04.1. I could not remove textlive* using the suggestion by rancho. Then I found a solution by vehka on how to remove texlive-latex-base-doc:
apt-get broken after version update (unmet dependencies)

$ sudo dpkg --force-all --purge texlive-latex-base-doc

It is also important to remove all packages carefully otherwise reinstallation will not work. I followed the steps that I took from a comment given by mubeena in a comment to a solution given by Nate Eldredge for mubeena's own thread: many many dpkg errors while upgrading:

$ sudo apt-get remove --purge tex-common texlive-*
$ sudo rm /etc/texmf/

Based on the other error that you are getting, you might need to remove also texlive-lang-english by using

$ sudo dpkg --force-all --purge texlive-lang-english

Then you could do

$ sudo apt-get -f install

and finally

$ sudo apt-get install texlive-full

This last command will install all you need and more. You might want to explore other detailed or lighter versions of texlive installation, but probably installing everythin will simplify things for you. I share the explanation by ufos in the following thread: Installation of texlive-full on Ubuntu 12.04, but there is a nice breakdown by masroor if you want to install just what you need.


error: file '/grub/i386-pc/normal.mod' not found in ubuntu 13.10

I just encountered a similar issue when trying to install Mint 16 and Ubuntu 13.10 on my system (dual boot with Windows 7, replacement for existing Mint 15 installation). Both  Installations resulted in this message and reinstalling / reconfiguring Grub didn't fix it.

It seams that - at least in my case - the installer thought that I wanted to use EFI (Secure Boot) which is not the case. I explicitly disabled it in my UEFI BIOS, but when I checked /boot/grub it only contained a 'x86_64-efi' folder, the needed 'i386-pc' folder was missing (required for BIOS / non-EFI setup).

The following solution worked for me (with Ubuntu 13.10):

Boot Live DVD/USB, open shell and execute:

sudo -s
#where sda1 is my root partition
mount /dev/sda1 /mnt
mount -t proc none /mnt/proc
mount -t sysfs none /mnt/sys
mount -o bind /dev /mnt/dev
mount -o bind /tmp/ /mnt/tmp
# chroot into your ubuntu installation
chroot /mnt
# remove all those grub efi packages
apt-get remove --purge grub-efi-amd64 grub-efi-amd64-bin
# and re-install grub with the bios (non-efi) packages only
apt-get --reinstall install grub-common grub-pc os-prober
# if there is an error repeat the setup via:
grub-install --recheck /dev/sda

Additional notes:

If you have a separate boot partition you need to mount it too before reconfiguring grub.
It may be necessary to leave some free (unpartitioned) space before the first partition for the boot loader (can be done with GParted in Live system).
If apt-get can't reach (find) the remote archive hosts, try to manually set the DNS server (at home usually the router's) IP, e.g.: "echo nameserver 192.168.0.1 >> /etc/resolv.conf"
Note that the setup may be different for GPT (non MBR partition table) + this will surely not work when dual booting with a system that needs EFI.


The mysqli|mysql extension is missing. Please check your PHP configuration

Install one of the packages that contain your package.  Pick the latest:

Also, when installing a package, make sure your libraries are updated with these commands:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install php7.0-mysql

Run these steps to purge and install PHPMyAdmin fresh:

$ sudo apt remove --purge phpmyadmin
$ sudo apt install phpmyadmin

When prompted to delete the PHPMyAdmin database, confirm to delete.  When prompt to create the PHPMyAdmin database, confirm to create.

Update:

This is the results of a version conflict.  Remove the pertinent files, especially the PHP packages and reinstall a consistent version.


The latest version of wubi is compatible with windows 7. So no need to change the comparability.

Get latest wubi here (For installation of 12.04).
Download correct version of ubuntu.

More info: https://wiki.ubuntu.com/WubiGuide

ubuntu download links → http://www.ubuntu.com/download/desktop


Boot-repair error on dual boot system with Ubuntu 14.04 and Windows 7

@oldfred Your links were very useful. I've opted for using the overwrite strategy from Dual boot Win 8 / Ubuntu loads only Win (plan B). Now I can fool my firmware and make it boot using GRUB instead of Windows Boot Manager, and select between Windows and Ubuntu from there. I only hope someday there will be a definitive way to solve this without any workarounds.


Successfully running a program requires that three things match:

CPU instruction set (Eg. x86 in your PC, ARM in your mobile phone, PowerPC in some Apple Macs, Java bytecode for Java Applets, CLI for ".Net"/Mono applications)
Binary File Format (Eg. PE/COFF ".exe" for Microsoft Windows, .jar for Java Applets, PE32 ".exe", ELF on Unix/Linux)
Application Programming Interface; (Eg. POSIX on Linux/Unix, Cocoa for Mac OSX, Win32 on Microsoft Windows, Base Class Library for ".Net"/Mono applications).

You can increase the chance of matching all three by having emulators/interpreters (for other CPU instruction sets), by having extra file loaders (for foreign file-formats), and having additional programming libraries providing more APIs.

Note also, that some processors can natively execute more than one instruction set;  a PC quite often has x86 and amd64 instruction sets;  an ARM processor can execute four: ARM32/Thumb/Java bytecode/ThumbEE.  Some operating systems can provide more than one API natively too (Microsoft Windows provides Win32 and POSIX).

For everything else you need extra software.  For running Java programs you need the three parts listed above to make it work:  a Java Virtual Machine program to run the bytecode; a way of launching Java programs, and a Java Classlibrary for the programs to call.  "Java" is a brandname here for several separate technologies originally developed by Sun, but to a user they are often downloaded as one.

The same applies for ".Net", which is a marketing brandname for several different technologies originally developed by Microsoft:  The Common Language Run-time/Base Class Library (CLR) are the API; VES is the loader and Common Language Interface (CLI) is the instruction set.

You don't have to download those technologies from Microsoft, from Sun, or from Intel just because they originally invented something.  AMD make processors compatible with Intel's standards;  both Apache ("Harmony") and Google ("Android Dalvik") both make a Java-like suite;  and Mono provides a CLR/CLI/VES suite.  The important thing is that everyone uses the same standards, making them compatible.  A DVD disc will play on any DVD player that meets the standard, and an HTML webpage will rendering in any Web Browser meeting the HTML standards.

Mono is a CLR/CLI/VES suite that can run on Mac OSX, MS Windows and Linux.
Wine is a Win32 API implementation that can run on Mac OSX, MS Windows and Linux.
You can run Mono on top of Wine, on top of any operating system.
You can run Wine on top of Qemu, on top of any CPU architecture.

So Mono makes CLR .exe applications run, and Wine makes Win32 .exe applications run.  The only thing in common is that the filenames end in ".exe"; the contents are completely different and incompatible, so you need the right one.

Just like a Python interpreter will error when presented with Perl (and vis versa), a CLR interpreter will error when presented with x86+Win32, or JVM+Java bytecode.  If you can post a link to the particular program that you're wanting to run, myself or somebody else should be able to tell you the exact instruction set, file format and API it was designed for, and what you need to install on Linux to run it.  Hope that helps!

(Sometimes you might even need both.  For example, the Openbve train simulator is C# and compiled to PE/COFF+CLI+CLR, but can optionally use C binary plugins compiled for PE/COFF+Win32+x86.  In this case, you need a Win32 version of Mono under Wine.  If the CPU architecture is also, different that would need emulating; so Mono under Wine under Qemu).


How to install phpstorm and IntelliJ with the package manager on Ubuntu 16.04

What worked quite nice for me (Ubuntu 16.04 and PhpStorm 2017.3.2) was installing PhpStorm as a Snap package:

sudo snap install phpstorm --classic

as mentioned on PhpStorm's official download page.

Some more useful info about Snaps, you can find here.


How to remove top left window button from ubuntu mate

You can use alternative Window Control.

Go to Control Center -MATE Tweak - Windows -Appearance.

Change from Traditional Right to Contemporary Left.

If you want to just to remove menu button by keeping Traditional Right layout:

1) Open dconf Editor.

2) Navigate to org - mate - marco -general

3) Double click on button-layout.

4) Change values there, i.e remove menu entry from there, but keep colon. Otherwise your menu butttons will go to the left.


What has changed in libssl.0.9.8o-7ubuntu2 so that it now breaks my Aventail client, and what should I do?

I got it working - well I can use Aventail on Ubuntu 12.04 32bit but on Ubuntu 12.04 64bit it does not work at all - startcui or starct do not work (please test and escalate to Sonicwall if you want).

To solve your lib issue

sudo apt-get install libssl0.9.8
sudo ln -s /lib/i386-linux-gnu/libssl.so.0.9.8 /lib/i386-linux-gnu/libssl.so.0.9.7
sudo ln -s /lib/i386-linux-gnu/libcrypto.so.0.9.8 /lib/i386-linux-gnu/libcrypto.so.0.9.7


Is it possible to change the unity launcher delay to absolute zero?

Workaround for "absolute zero" delay

1) We will need XDoTool and Compiz.

You can install these from the Ubuntu Software Center or by clicking here (xdotool) and here (Compiz)

2) Open Compiz (Alt + F2 and type ccsm and hit Enter)

3) Go to Commands and add xdotool key super to one command

4) Then go to Edge Bindings and choose Left.


Your issue sounds more like a bandwidth problem. If the streaming audio comes from an external broadcast you are limited by both your bandwidth and the broadcaster's bandwidth.

This usually occurs when you are attempting to gather a high bitrate broadcast. Have you tested the behaviour of your sound system when gathering information from a different place?

Buffering must also be considered, unfortunately the buffering itself can't be software controlled if the case is as of an internet radio-station and in certain cases you can allow the buffering by pausing the playback as mentioned in this Support answer by Google, related to "Buffering and Playback problems"

Do you mind providing any further information about the stream that is causing your issue in order to run a test? after which this answer may be edited to include the results of the testing.

Good luck!


create a file named swap.desktop or any name with .desktop extension in the directory /etc/xdg/autostart/ with the below content and reboot to see the change..

[Desktop Entry]
Name=swapping
Exec=setxkbmap -option caps:swapescape

Tested in Lubuntu 18.04

Further Reading:
http://manpages.ubuntu.com/manpages/bionic/man1/xdg-autostart.1.html
https://specifications.freedesktop.org/autostart-spec/0.5/ar01s02.html


I can't see applications other than those in launcher

Hare's how to browse all the installed applications in Unity!

Press Super Key (Windows key) or click on the top most button in launcher to open the Dash.

Now,

Click on the application lens in lower most part of the dash then,
Click on the installed (See more results).

Just scroll down and you'll see all the applications installed on your system.


After testing a couple of hours I found the problem. It was the actual game. For example Skyrim was running perfectly, L4D2 was running with full graphics and Hitman also. The only one was WoW. In the config.wtf in the WTF folder of wow I had to change the variable gxApi from OpenGL to d3d11 (Or just basically remove the gxApi line). Also I removed the -opengl parameter from the WoW shortcut.

That made the game support SM3.0 as seen in the following pics:

This PIC is without OpenGL support (Using DirectX 11 Option):

As you can see, the only 2 options not available are the Good/Ultra Settings for Liquid Detail and the Sunshafts but this is more of a small part of missing stuff from Wine and a lot of problems with the actual game of WoW. I say this because Skyrim which demands more runs amazingly. The water looks real and reflects.

When I ad the -opengl parameter and edit the Config.wtf leaving OpenGL in the GxApi variable like I mentioned above I get this:

As you can see from the 2 pictures, Multisampling went from 16 to a maximum of 4. Shadow Quality went from Ultra to Fair with a warning saying "Unsupported for graphics related reasons". Liquid Detail went to Low as the only option and Ground Clutter went to Low as the only option.

Wine has come a LONG way from the days where newer games could not be played. It is getting to a point that the only reason for some friends to stick with Windows will be gone. There has been good progress towards implementing the Shader Models. Wine has even some support for SM4.0. This link for Wine should help a bit http://wiki.winehq.org/DirectX-Shaders but it is very outdated (2008) and a lot of stuff has happened since then.

Lastly, for running Steam on Linux, if you get a message similar to Required OpenGL extension GL_EXT_texture_compression_s3tc when running a Steam game, it just means that, either your video card does not support this compression or you are missing installing the correct libraries. If it is the libraries do the following:

sudo apt-get install libtxc-dxtn-s2tc0

I am still trying to find what does Wine actually support in terms for Graphics and Sounds.


Acces to the "burn:///" directory from the terminal?

You can't! That's because burn:/// is not a real directory or a real path, but is a special URI (let say a virtual directory) created by a virtual file system called Gnome Virtual File System (gvfs) and can be accesed only by a GUI file manager (like Nautilus or Thunar).

This URI - burn:/// - is configured by /usr/lib/gvfs/gvfsd-burn file (is a binary file, so don't try and edit it).

See also: Nautilus special URIs.


How to know the source of Ubuntu 64 or 32 bit?

You can read the version and architecture in the README.diskdefines file:

It is a plain textfile which you can open with notepad or so:

#define DISKNAME  Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386
#define TYPE  binary
#define TYPEbinary  1
#define ARCH  i386
#define ARCHi386  1
#define DISKNUM  1
#define DISKNUM1  1
#define TOTALNUM  0
#define TOTALNUM0  1

Also .disk/info file, example:

Ubuntu-Server 12.04.3 LTS "Precise Pangolin" - Release amd64 (20130820.2)

dists/precise/Release file (precise is name of the release):

Architectures: amd64
Codename: precise
Components: main restricted extras
Date: Mon, 16 Dec 2013 02:30:54 UTC
Description: Ubuntu 12.04 LTS
Label: Ubuntu
Origin: Ubuntu
Suite: precise
Version: 12.04
MD5Sum:
 d41d8cd98f00b204e9800998ecf8427e                0 Release
 efedbc5cc3342ad15ed70f01c49ba17b          1481266 extras/binary-amd64/Packages
 [...]


That's not something you can control in your operating system. That's what the BIOS is for.
In most BIOS setups there'll be an option like After power loss with possible values like Power off and Reboot.


Get and install Nvidia GeForce 8400 GS driver

Problem solved. Removed the driver again and did a re-install using the hardware Drivers sub-menu, chose the recommended Nvidia driver from the list, and clicked activate. That did it. Thanks for the help received.


How to set permisson back to Read-only via ssh?

The chmod command has an easy to remember way of setting permissions. Instead of the numeric code, you can use letters r w x to add (+) or remove (-) read, write and execute permissions (navigate in case of directories). In addition, you can use u g o a to select which user is affected by the change (current user, current group, all users...)
There's more info about this and more options in the man page at $ man chmod
The command to set the file back from 777 to read only for all users would be:
$ sudo chmod a-rw /home/admin/web
You can see the permissions are set to read-only in the first column of $ ls -l output:
$ ls -l
···
-r--r--r-- 1 user group  968 Mar  6 21:59 web
···
$


Found an edit to ~/.config/gtk-3.0/gtk.css here by @Lari Hotari over at stackoverflow.

It doesn't remove the buttons, but makes them nicer for a dark theme and use less vertical space.

TerminalWindow .notebook .button,
TerminalWindow .notebook .button:active {
   padding: 2 2 2 10;
   background-image: none;
   border: 0;
}

I'm using this customization, works well with a dark theme (also found in the above link):

@define-color bg-grey #222;
@define-color active-grey #333;
@define-color border-grey #555;

TerminalWindow .notebook {
   border: 0;
   padding: 0;
   color: #eee;
   background-color: shade(@active-grey, 1);
}

TerminalWindow .notebook tab:active {
   border: 1px solid @border-grey;
   background-color: shade(@active-grey, 1);
}

TerminalWindow .notebook tab {
   background-color: shade(@bg-grey, 1);
}

TerminalWindow .notebook .button,
TerminalWindow .notebook .button:active {
   padding: 2 2 2 10;
   background-image: none;
   border: 0;
}

Then logout of your session and log back in, the theme should take effect. ALT+F2 and typing "restart" did not work for me, but your mileage may vary.


Grep the contents of a file for contents from another file one at a time

The command you are asking for is simply:

grep -c -o -f strings_file input_file

The -f option will obtain the patterns from the strings_file, one per line.

The -c option will return the count of matches, thus eliminating the usage of | wc -l.


There aren't four different folders. There are two named by date, and current is the same as the older of these two, and pending is the same as the newer of these two.

This seems to be the result of applying some automated testing to the ISOs. From this blueprint:

  During the quantal cycle there have been times where the daily ISO
  images had bug or problems on them, which hit many users and or
  automated jenkins testing. Ideally we want to prevent users from
  downloading borked images and hitting/reporting bugs over and over
  again. We should discuss and possibly implement something to help with
  this, e.g.:

  consider uploading images to a staging area, running jenkins test and if jenkin tests pass then publish the iso images
  or for example push jenkin test failure notes to the cdimage / iso-tracker (like the oversize warning)
  think about potentially yanking borked images from cdimage.u.c
  communicate "why there was no daily build yet?", e.g. by pushing "FTBFS" notification to iso-tracker & cdimage.u.c
  communicate respin process in a more automatic way, e.g. on the iso tracker / cdimage.u.c

  Objective:

  Try to run some automated testing before the images are published
  Work with Unity testing team to make sure unity works (hook unity jenkins to be dowstream from the desktop-default jenkins test)

pending is this staging area, as can be seen from the notes further down the blueprint page.

As for why have a set of folders based on dates and another set with names, it's easier:

for scripting to have folders like current which always point to the current release,
to atomically update the folders if current and pending are symbolic links to folders containing the actual ISOs.


gnome-online-accounts (GOA) with Xubuntu?

Took the plunge and installed the gnome-online-accounts. No adverse effects seen yet.

In order to use GOA you need to start gnome-control-center as follows:

$ env XDG_CURRENT_DESKTOP=GNOME gnome-control-center

to trick the desktop to believe it is running GNOME. Worked fine after that and provided Evolution in my case the right authentications for Gmail/Calender etc.


Windows7 in VirtualBox, does this mean I can use Windows software?

Yes, a VirtuaBox Windows system will allow you to run all the software that you would run inside a normal install (except for a lot of Direct3D software, ie, 3D games) and allow you to connect any USB accessory to the guest Windows system.

Of course that will cost you some performance but nothing too noticeable.

Any USB devices attached to the host can be seen in the guest via a USB 1.1 emulated controller included and if you install the closed source version (download directly from the VirtualBox site) you will emulate a USB 2.0 one.

To install VirtualBox you can do so via the software center or if you prefer you can install the closed source version from the Oracle's repos via these instructions

How do I install VirtualBox 4.1?

Mounting a USB device is simple and the instructions should be similar to the post bellow

How do I mount a Motorola Droid Bionic?


This is actually an ongoing development. Diaspora is currently in the process of being packaged up for Debian, but those packages are likely going to be copied over to our Launchpad PPA for Ubuntu users to make use of when the time is right.

Below are some useful links regarding what's going on:

Debian Diaspora Packaging Effort
Diaspora Ubuntu PPA


I have slow performance on my Ubuntu installation, what can I try?

You can try:

Software

install preload. sudo apt-get install preload it will run in the
background and may improve performance. Programs may start quicker.
Update your system. sudo apt-get update && sudo apt-get upgrade or open the update manger.
Unity-2D instead of the default Unity. log out, at the log-in screen click on the gear symbol, choose Unity-2d instead of Unity.
Lubuntu, or just lubuntu-desktop
Xubuntu, or just xubuntu-desktop

Hardware

Upgrade your RAM, Ubuntu uses a lot of RAM.

Drivers

What drivers are you using for your video card, etc. is it an open
source variant or is it nvidas own? (or Radeon, intel, etc. )


You can't do this only with chmod. You can, however, make a new group and change the group ownership of the directory, add the user to that group and then give the group the permissions you want on the directory, so you can give privilege to only that group.

To create a group tomcat and add the user tomcat8 to it:

sudo groupadd tomcat && sudo adduser tomcat8 tomcat

You may also want to add yourself (and any other users who need read write access here) to the group with sudo adduser [username] tomcat

Now change the group ownership of the directory:

sudo chown :tomcat /usr/local/javaagent/appagent/ver2/logs/Tomcat1

Don't forget the colon - this is to change only the group ownership.

Now change permissions, for example, you add read and write permissions to the group like this:

sudo chmod g+rw /usr/local/javaagent/appagent/ver2/logs/Tomcat1

From your question I'm not sure what you want the other settings to be. I recommend reading man chmod and this guide to permissions to understand better what you are doing.

Directories need execute permissions to be entered and searchable, so you most likely want octal 775 (so all users can read and search but only group can write) or 770 (so only owner and group have any permissions - keeping the directory private)

Don't use -R as it's unlikely you want all files to have execute permission.

You probably do want to add the setgid bit though, so that files created here by all users inherit the same group ownership as the directory:

chmod g+s /usr/local/javaagent/appagent/ver2/logs/Tomcat1

Or using octal, in one step:

chmod 2775 /usr/local/javaagent/appagent/ver2/logs/Tomcat1

which gives these permissions:

drwxrwsr-x

(the s in that position is the setgid bit) or

chmod 2770 /usr/local/javaagent/appagent/ver2/logs/Tomcat1

which gives

drwxrws---

To check permissions and owners on the directory, use ls -ld:

ls -ld /usr/local/javaagent/appagent/ver2/logs/Tomcat1


Permission denied (publickey) after rsync

The rsync command, override the ssh  configuration in the second-remote-host /home/username/.ssh  with the content of .ssh folder from the first-remote-host

A way to confirm it, will be:

copy (using rsync) from firstmachineip to local_folder
remove .ssh folder from local_folder
copy (using rsync) from local_folder to secondmachineip


I have been using it on Ubuntu and this might help you: https://support.ivacy.com/setup_guide/how-to-setup-ivacy-pptp-protocol-manually-on-ubuntu/

If it doesn't than you can contact their Live Chat and discuss this with them, they'll surely help you in setting it up on Ubuntu too.


sudo su
nano /etc/apt/sources.list

  deb http ://old-releases.ubuntu.com/ubuntu/ raring main restricted

  deb-src http ://old-releases.ubuntu.com/ubuntu/ raring main restricted

  deb http ://old-releases.ubuntu.com/ubuntu/ raring-updates main
  restricted

  deb-src http ://old-releases.ubuntu.com/ubuntu/ raring-updates main
  restricted

  deb http ://old-releases.ubuntu.com/ubuntu/ raring universe multiverse

  deb-src http ://old-releases.ubuntu.com/ubuntu/ raring universe
  multiverse

  deb http ://old-releases.ubuntu.com/ubuntu raring-security main
  restricted

  deb-src http ://old-releases.ubuntu.com/ubuntu raring-security main
  restricted

sudo su
apt-get update
apt-get upgrade
apt-get autoremove
apt-get clean


Is there a way to encrypt the entire hard drive after you have already installed Ubuntu 14.04?

If it is just "data" you would like protected, you can try using software such as VeraCrypt to create a separate encrypted partition where you can put all your data into.


Line in /etc/network/interfaces causes wifi to stop working

The Technical Explanation

Declarations in /etc/network/interfaces will not be effective if they are incorrect in any way. Your declaration is incorrect primarily because wireless interfaces need to be directed to connect to a specific SSID and, ideally, an encryption password provided. As well, we have no evidence that wireless-power off is needed or even effective. A proper file would include:

auto wlp12s0
iface wlp12s0 inet dhcp
wpa-ssid MyRouter
wpa-psk MySecretKey

The Practical Answer

I suggest that you remove all the wireless stanzas completely and simply let Network Manager do the work for you. In most cases, it is entirely adequate.


Copying files from multiple directories using a loop

The statement

for i in `basenames.txt`; do ...

attempts to execute basenames.txt and loop over the resulting (whitespace split) tokens.

Although you could have written for i in `cat basenames.txt`; do ... it's not recommended - better to use a while read loop.

As well, there doesn't appear to be any value in cding to the directory (and you forgot to cd back each time). So:

while read -r i; do
  cp "${i}_dir/${i}.file" files/
done < basenames.txt

The trailing / on files/ ensures that the target is treated as a directory.


Why is there a baloo_filemetadat process even though I have disabled baloo?

baloo_filemetadata_temp_extractor ?

If the 'baloo_filemetad' is a truncated version of the 'baloo_filemetadata_temp_extractor':

By Rémi Verschelde in https://bugs.kde.org/show_bug.cgi?id=332065#c32 :

  ..for metadata extraction to work on non-indexed files in Plasma 5,
  make sure that you have baloo-widgets installed on your distro (or the
  package containing /usr/bin/baloo_filemetadata_temp_extractor if named
  differently). This tool is the one used for on-the-fly extraction of
  metadata when Baloo's file indexing is off.

$ baloo_filemetadata_temp_extractor
Usage: baloo_filemetadata_temp_extractor url

Arguments:
  url

---Edit---

It seems that the 'ps -A' will truncate the output

With the:

$ watch -n 1 'ps -A | grep baloo'

With the KDE System Activity:


No sound from speakers, but headphones work

try using these commands

sudo apt-get update
sudo apt-get upgrade
sudo apt-get purge linux-sound-base alsa-base alsa-utils
sudo apt-get install linux-sound-base alsa-base alsa-utils gdm ubuntu-desktop

Reboot.

if this not help trying running this script


How do I find out if a program uses GTK 2 or 3?

Use ldd. Mine appears to use gtk2 libraries.

$ ldd /usr/bin/inkscape | grep gtk
    libgtkmm-2.4.so.1 => /usr/lib/x86_64-linux-gnu/libgtkmm-2.4.so.1 (0x00007fa8de4d5000)
    libgtkspell.so.0 => /usr/lib/libgtkspell.so.0 (0x00007fa8dcfe1000)
    libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007fa8dc9a7000)


Dependency problem with mysql-server-core-5.5

Since I didn't actually need MySQL server anymore I solved this by uninstalling programs with unresolved dependencies one by one.

First I had a similar error:

mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.29-0ubuntu0.12.04.1)
  but 5.5.29-0ubuntu0.12.04.2 is to be installed

I uninstalled mysql-server-core-5.5 using dpkg:

$ sudo dpkg --remove mysql-server-core-5.5

The another error arised:

mysql-server-5.5 : Depends: mysql-server-core-5.5 (= 5.5.29-0ubuntu0.12.04.2)
  but it is not going to be installed

Uninstall mysql-server-5.5 this time:

$ sudo dpkg --remove mysql-server-5.5

One step higher in the hierarchy:

mysql-server : Depends: mysql-server-5.5 but it is not going to be installed

Uninstall mysql-server:

sudo dpkg --remove mysql-server

Seems to work now.


Virtual machine, mouse cursor only works within the box

Right CTRL key to release the mouse and keyboard.
Documentation on the host key is here. <-- Credit to Takkat on the link

Install guest additions for transitions without manually releasing the keyboard/mouse.


What text do I have to put in mc's File Find text field "Content:"?

I managed now to obtain meaningful results. I probably always had set the mask in the »File Name:« text field too narrow. I set it now to '*', and now it works. I asserted also »Use Shell Pattern«, »Search for Contents« and »Case«.


Update your ffmpeg and then run:

ffmpeg -i input.mp4 -c:a copy output.mp4

It will automatically properly rotate the video.


crippling repeating "pciehp card not present" notifications

I tried the following patch-methods, and listed why they didn't work for me:

Bios features: nothing I could do in the bios would effect the hotplug problems I have.
Suppressing errors. The blacklist didn't reliably work for some reason (I might have done something wrong, I admit) and as I said, it isn't a real sollution. The polling still would've been going on. Apart from that, the messages would also show up in the tty's, in the DMESG, etc.
Unloading modules: the modules were compiled into the kernel, so blacklisting or unloading those doesn't work.

In the end I did compile my own kernel, using this manual:

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

and specifically the "alternative" method. There is no need for all the fancy different flavors if you just need to remove one thing, so I copied my old config (as explained), removed the hotplug stuff, and waited for the compile to complete.


You need to sort the input file first before passing to uniq to make same lines sequential/adjacent:

sort file.txt | uniq -dc

-c will count the number of occurrences of repeated lines.

Example:

$ sort file.txt | uniq -dc
3 hello
2 Hi

$ sort file.txt | uniq -dc | sort -k1,1n  ## Your expected output
2 Hi
3 hello


What is the advantage to build unity from source

Usually when you build software from source, it will be for one of several reasons:

You want to help with the development of the software.  Obviously if you're going to develop the software, you need a copy of the source, and a way to test your changes.
You absolutely can't tolerate a certain problem with the latest stable version of the software.  In this case, there may be a patch available, so you hope to build from source, with that patch applied.  Or, a fix to the problem may be available in the latest source, but no release has been made since the fix was committed.
Often times when packagers compile software, some decisions are made at compile time.  If you require different configurations, or wish to optimize for your specific system, compiling the software yourself will allow you to do this.


Running out of hard drive space because compression is not happening quickly enough

I made something for you, I've named it Cerberus, from the guard dog.
https://pastebin.com/yiqajYfT
Your downloaded filenames must contain no spaces, so if they do at the time of download, rename them and remove spaces, else they will not be detected.
compile with gcc -ocerberus cerberus.c
you'll need a subdirectory into which the compressed files will go. your original files will be removed after compression, if you don't want this to happen, comment line 63. you can change the compression (workdirectory) directory name, compression program and compressed files extension in the definitions section, lines 9-11. if your filenames are longer than 100 characters, increase MAXNAME in line 12.
good luck!


Shell Scripting for Linux Server Administration

Yes and No. Shell scripting will help you administrate a server and automate tasks.

You will not be able to build Applications with shell scripting. Something like python would be better for building software apps in Linux. Or possibly C++ and Qt framework. Shell scripting is used to automate services and tasks at low level on server. Not build apps.


How do I remove rounded borders in GNOME Shell?

From the ArchLinux Forum:

edit the css in /usr/share/gnome-shell/theme/gnome-shell.css
(the .panel-corner properties).

The credit goes to the forum user "gimmy". Refer to the original forum in the sources below if you would like to view the entire thread.

Source: ArchLinux Forum - https://bbs.archlinux.org/viewtopic.php?id=138403


Ubuntu 15.10 - League of Legends - Nvidia GTX 960 - 15 FPS

Mock-answer: DOTA2 works natively ;)

More serious answer: Have you checked out other folks' suggestions at https://appdb.winehq.org/objectManager.php?sClass=application&iId=10436 ? Some people appear to be reporting fairly good success with minimal work, although "compile Wine with these patches" may be outside of your personal definition of minimal!

I've noticed in a quick perusal (for example http://metaphysical.zz.mu/league-of-legends/lol-on-linux-the-three-ways/) that there's often mention of running it via OpenGL being more reliable but slower, so you could always try the opposite of what's generally suggested and change the game config file to use

x3d_platform=0


"can't read file" error after installation causes system to not boot

I had this same error, also with 11.10 and WinXP.  I reinstalled ubuntu but this time did manual partitioning, just a single partition mounted at /, plus a swap partition.  That seemed to do the trick.


If you want filesystem mounted automatically you will have to add it to your /etc/fstab configuration.

As for chmod, permissions and some settings for ntfs filesystem - man mount will probably shed some light onto that and mounting filesystems in general.


Internet connection drops while using torrent

Your ISP may be monitoring for torrenting on their client's modems, and shutting down their internet in an attempt to fight piracy.

One way to check if it's the computer or your modem is getting another device on the network and checking if that works while your computer isn't.


The package name is linux-doc, after you apt install linux-doc look in /usr/share/doc/linux-doc.

In general anything that would be called "kernel" in RH/CentOS land will be called "linux" in Ubuntu since Ubuntu is based on Debian which has versions with other kernels like GNU Hurd and BSD.


Wifi works perfectly in Windows but incosistent in Ubuntu. Goes up and down frequently

I had the same problem with my laptop (with a Broadcom b43 adapter) after installing 12.04. Then I googled and found the answer here. I don't remember the thread, but I don't deserve credit if you solve this problem thanks to my answer.

Make sure you have the wireless driver installed and enabled.

You may need proprietary/restricted drivers.

If you can connect via Ethernet follow these steps:

Connect to internet using an ethernet connection. It will be detected as ato eth0.

Click the settings icon on the launcher.

Go to Restricted drivers.

If you find your wireless card on the driver list, enable it. The driver will be downloaded and enabled.

Hope this helps.


Computer suddenly won't boot - stops at a flashing prompt

Trying to work backwards:

Is this a ubuntu issue...

If this is a ubuntu issue then press and hold SHIFT while booting - it should display your grub.  If it doesnt, then the problem is pointing towards a hard-disk issue.

If you see grub, then possibly a ubuntu issue - try using the recovery mode option.

You've got a few choices - try fail-safe graphics.  If this doesnt work, try using the terminal (not network) option.  Run sudo fdisk -l to examine your disk structure.

Is this a disk issue...

Check in you bios that you can boot via CD/USB.  Plug in a CD image of ubuntu and see if you can boot into Ubuntu - if you cant then more likely a graphics/motherboard issue.

If you can boot into ubuntu - then possibly your software RAID has gone awry...


Automatically connecting to OpenVPN only when using Wifi, not on Ethernet

I played around a found a solution that happens to work for my configuration. It's not a fully general solution, so hopefully someone can come along and give a solution that's more robust.

Instead of disabling OpenVPN on my laptop when on Ethernet, I just configured ufw (Uncomplicated Firewall) on my network's OpenVPN server to reject connections from the local subnet; it's a teeny bit more complicated than just creating rules using sudo ufw allow ... and sudo ufw deny ..., though:

First, if you're running ufw on a machine bridging a VPN to a local network (which I am doing), you need to configure ufw to allow forwarding traffic, since it drops that by default. This means changing DEFAULT_FORWARD_POLICY="DROP" to DEFAULT_FORWARD_POLICY="ACCEPT" in /etc/default/ufw.
Second, you need to make sure to add rules in the right order; ufw processes rules one by one and uses the one that you reject connections to OpenVPN (port 1149) within your subnet before allowing them from outside only if you create them in that order; in my case, this meant running sudo ufw delete deny from 192.168.16.0/20 to any port 1194 (no, that's not a typo, I actually use a /20 subnet locally :D) before running sudo ufw allow 1194.
Lastly, you need to make sure that connections from your local network actually do look like they come from your local network so the ufw rule gets invoked.

The last part is important because initially that was not the case when I tried the first two steps; my laptop OpenVPN is automatically set up to try to connect to my VPN at mydomainname.com, which is dynamically assigned to my home router, which in turn forwards port 1194 it to the computer running my VPN at 192.168.16.1. This might not be the case for all routers, but for my router at least, connecting to mydomainname.com from within the local subnet creates a connection to the OpenVPN server that looks like it has the router's IP address, rather than the laptop's. (And it's a long story but I actually want to allow VPN access from other devices connected to the router, on a different subnet--I have a pretty complicated home setup :D).

The solution in my case ended up being to configure my router's DNS server with a static assignment from mydomainname.com to 192.168.16.1, so that mydomainname.com resolves directly to 192.168.16.1 but to my router's external IP otherwise. This works for me, but your mileage may vary.


Can i do a fresh install ontop of outdated Ubuntu?

Installing over the top is fine, just chose Erase this disk and install or Install over Ubuntu XX.xx. Make sure you have a backup and a list of programs.

However, you could upgrade it, preserving your documents etc, by running the command sudo update-manager -d - Wouldn't work for version 10.04.


Installing CUDA 7.5 toolkit on Ubuntu 15.10

It isn't dangerous to use the CUDA toolkit from 15.04.  The toolkit interfaces from the nvidia driver which is all the Nvidia stack and code base.  That is why people use CUDA because it gets them closer to the hardware to get performance increases.


KDE Partition Manager is available in the repositories, sudo apt-get install partitionmanager

It is a KDE front end for libparted, the same technology behind Ubuntu's partition manager. It can be used to not just format drives, but also create, resize, and move partitions.


Script doesn't work on startup, but does when run manually

To run your script using crontab, make sure you're specifying full paths:

#!/bin/sh
/usr/sbin/rmmod nbd
/usr/sbin/modprobe nbd max_part=16
/usr/bin/qemu-nbd -c /dev/nbd0 '/media/tygo/1.8TB Drive/MEGA.vhdx'
/usr/bin/ntfsfix /dev/nbd0p2
/usr/bin/mount -o rw /dev/nbd0p2 /home/tygo/MEGA

You could find paths using whereis command: whereis mount.

Then run crontab with sudo: sudo crontab -e and add full path to your script:

@reboot /home/user/scripts/vhdscript.sh

Use your own time instead of @reboot

To see if it is executed, you could add some additional information to your script. For example, add to the end of your script:

echo "VHD file loading have been completed" | logger

Then, using terminal, monitor your script execution by your message appearing:

journalctl -f | grep VHD


According to this link, it is a bug of Calibre.
To solve it, as suggested there, you have to replace line 110 (self._listener._unlink.cancel()) of /usr/lib/calibre/calibre/utils/ipc/server.py with the following content:
if self._listener._unlink is not None:
    self._listener._unlink.cancel()

Alternative solutions are to upgrade Calibre to 4.15 (or newer) or downgrade your python3 installation to a version prior to 3.8.3.


Ubuntu 16.04 Firefox and software OS updates stopped working

It might be showing you the message "Server not found" despite your internet is working its easy to fix

sudo rm -f /etc/resolv.conf
sudo systemctl restart NetworkManager.service

OR

sudo systemctl restart network.service
Reboot


I had a similar issue a while ago with a Web App being pinned to the Home screen of an iOS device.

The issue was related to the way the App treated links. i.e. if there is a link we need to open it in a webs browser

I'm unsure if the code will work in your situation as I have not used the Web App Generator to test but here it is.

var a=document.getElementsByTagName("a");
for(var i=0;i<a.length;i++)
{
    a[i].onclick=function()
    {
        window.location=this.getAttribute("href");
        return false
    }
}

StackOverflow link for reference:

https://stackoverflow.com/questions/2898740/iphone-safari-web-app-opens-links-in-new-window


A common /home partition for multiple Linux distributions

Ubuntus graphical installer does not automatically create a separate partition for /home. That's true. It is recommendable to do so though, and you can do it if you choose to manually partition. But even if you didn't, you can still fix it.

However, there are a few things to consider. First, make sure that all the distros can actually use the filesystem used on the home partition. It's usually not a problem, but better safe than sorry. Second, and this is more important; don't use the same home directory between distros unless you know what you're doing. The distros may have different versions of the installed software, meaning that their settings might not be identical. It should normally not be a problem since the applications should handle different versions properly, but not all do. It is perfectly fine to have a home directory with a different name than your username though, so that's not a problem.

If I'm reading correctly, you should have two partitions for Ubuntu (swap and root) and a few partitions for Debian. Then the first thing you do, is to mount Debians home directory in Ubuntu and make sure it's mounted at boot by adding it to /etc/fstab. There are loads of documentation on how to do this, so I won't go into it.

If you mount Debians home partition on /home, then it will hide Ubuntus /home directory, so mount it somewhere else first, in /mnt, for instance. Now you have to make some decisions. You can try to use the same home directory for all the distros if you want, or you can have a different home directory for each distro. You could for instance make a separate folder in /home for each distro like:

/home/ubuntu/username
/home/debian/username
/home/other_distro/username

I'd say that's the safest solution. I am assuming your home directories are not encrypted. If they are, then that will complicate things although the main procedure would be similar. You should probably be logged out of your main account when you do this, so create a new user, make it admin and login as that user.

You have to configure all the current users on all your distros to use the new location for the home directory. You should also configure the distros to use those paths by default for new users you create.

If you've mounted the home partition on /mnt, you'd then create /home/ubuntu and /home/debian. You then copy /home/username to /mnt/ubuntu/username and move /mnt/username to /mnt/debian/username (for the Debian user).

You now have both Ubuntu and Debians user homes in the same partitions, but in different home directories. If you have configured both Debian and Ubuntu to mount that partition in /home at boot and changed the users to use the new paths for their homes, then everything should be fine. When you intend to install a new distro, you'd first create /home/distroname/ and install as usual, but use the home partition and configure it to use /home/distroname as default location for new user homes. If you do that, make sure not to format it, otherwise you'll loose the data from Debian and Ubuntu :)

If you want to reuse a single home directory, make sure you know what you're doing. You would need to have the same uid for the users across the distros. Otherwise the permissions would be messed up.

Good luck and take backups :)


Does Ubuntu One (U1) HAVE to be synchronised?

You can use the "Disconnect" button ("Desconectar" in spanish) in your Ubuntu One's client top right corner, after which your computer will stop syncing until you click it back to re-connect and this way start syncing again. You can also stop individual folders from being synced and re-synced again by simply activate/deactivate the corresponding checkbox in the same window.

Both options allow you to run a first time/one time sync and stop syncing, so you can delete what you don't wish to be in sync and it will remain on the cloud but if you reactivate the global/partial sync, the files will come to your computer.

Here is a screenshot (This system is in spanish, just for your consideration)

Good luck!


How do I fix dependency and tar problems with linux-image-extra* package?

The problem with linux-image-extra-3.13.0-49-generic_3.13.0-49.81_i386.deb not being updated over the previous release was caused by the package being damaged in some way when Ubuntu Software Centre, Synaptic, or apt-get downloaded it.

Go to the temporary download folder ...

 gksudo nautilus /var/cache/apt/archives

... and delete the package .deb file. Now rerun the update in the package manager of your choice.


Does Kde Connect has a limit to file sending?

I haven't used KDE Connect, but AirDroid has worked for me in the past when I needed to transfer large files from my phone to my PC. It's pretty intuitive to use:

Install AirDroid on your phone.
Open the app on your phone and make a note of the URL shown on screen.
Connect your phone and Linux device to the same wireless network.
Open your preferred browser on the PC and navigate to the URL provided by the app.
Click to connect and you're ready to transfer files.

You can also connect by scanning a QR code on the PC from your phone, as explained in this post (although I haven't used this method myself).

Hope that helps.


In case anyone has the same problem, I'm leaving this answer for reference.
So I was trying to create a second UEFI partition on hdd. First one being used by windows. You just need to point Ubuntu installer to existing UEFI partition using the flag boot.


There is an answer. Go over to Google (https://www.google.com/chrome/browser/desktop/) and download Google Chrome. Google Chrome is able to run Netflix "out of the box".


The ~ and $ are elements of the command line prompt. This indicates that your computer (or more exactly, I guess, the shell you are running) is waiting for user input.  It is prompting you to input a command.

The $ is merely a separator or divider. It separates the command prompt from the command which follows it.  When people write such things as $ sudo apt-get update (your example), they are simply telling you that the command, in this case sudo apt-get update, needs to be entered at a command prompt. Strictly speaking, perhaps, the $ is redundant in this context.

Other separators may be used in other situations. For example, # is used for a root shell.

The ~ (called 'tilde') is shorthand for your home directory.  When it appears in a command prompt, e.g., user@hostame:~$, it indicates that the current working directory is your home directory.  Thus if you run the list command, ls, without specifying any particular directory, it will list the contents of your home directory.

(By the way, $HOME, is not a command, as you suggest, but rather an environment variable. It determines the location of your home directory.  You can see its value by running $ echo $HOME.)


Openstack Installation on Ubuntu Non Graphical server edition 14.04.1

The PPA should be ppa:cloud-installer/stable


Multi-Select Group of Items in Listbox using Ctrl+Shift+Mouse1?

It does indeed work this way, except you don't click on the item that is already selected, you have to click on the last item that is not selected.

Interestingly, "last item" depends on whether selected the top set first or the bottom set.  If you selected the bottom item first the the "last item" is actually the upper one of the group in between.  It's kind of intuitive, but would be odd if the system you used previously works in a slightly different way.

Recap:

It already does what you want.  Select and item at the top of the list.  Scroll down.  Select and item at the bottom of the list while holding Ctrl.  Now hold CtrlShift and click on the last unselected item and all the items in between will be selected.

Of course, you could also have just selected one item at the top, then CtrlShift clicked on the last item to achieve the same result.  It appears to work exactly how you want it to.


It is likely that you are missing graphics card drivers. Install all updates and then check the Additional Drivers program.


How to connect to internet with nokia x2-01

Solved using  wvdial

Install wvdial from a Ubuntu Live CD
Execute this command in a terminal:

sudo wvdialconf

Execute this command in a terminal:

sudo gedit /etc/wvdial.conf

edit the file with your configuration.
Execute this command in a terminal:

sudo wvdial


The hard disk temperature depends on the ambient temperature, so it is not easily comparable.

There are other discussions on askubuntu.com that talk about powertop which is a tool to control the fine issues of power tuning. Have a look at it (search) to see if you can perform some optimisations for your laptop.

The reason why Ubuntu might be a little warmer for the hard disk is due to how often it needs to access the disk. There is a system option called laptop_mode, which you can set and see what temperature the disk reaches when idle. To do so,

# Read the current value for laptop_mode
cat /proc/sys/vm/laptop_mode
# Set the laptop_mode to five, which reduces the accesses to the disk, letting it sleep more.
sudo echo 5 > /proc/sys/vm/laptop_mode

When the system lets the hard disk to sleep for a little when idle, the hard disk goes in a lower power mode, and becomes cooler. However, this change of power mode has a small effect on the lifetime of the disk. You can use Disk Utility in the Administrative tools to find out how often the disk goes into and comes back from the low power state.

Read more at
Tips to extend battery life for laptops and notebooks


Media card reader not working in 16.04.1

Maybe inserting a sd card into the internal card reader is just not recognized by the system. Try the following:

Boot the system with the SD card in the SD card reader. Maybe this will lead to a mounted device. As alternative, on a running system insert the sd card and execute

sudo sh -c 'echo 1 > /sys/bus/pci/rescan'

to rescan the devices.

For further investigation you could post the output of lspci -v with the card in (just the relevant bit regarding the sd card reader) and the output of dmesg when inserting the card.


To get a triangle, type Ctrl + Shift + u, then type 25b2, then press Enter

To get the space, type Ctrl + Shift + u, then type a0, then press Enter

Edit: To answer the comment below:

Ctrl + Shift + u, then type a0, Ctrl + Shift + u, then type a0, type Ctrl + Shift + u, then type 25b2, then press Enter.

type Ctrl + Shift + u, then type 25b2, type Ctrl + Shift + u, then type a0, type Ctrl + Shift + u, then type 25b2

You'll get something like this

 ▲
▲ ▲

Alternatively you can enable compose keys to create these symbols with ease without remembering these annoying keyboard number-letter combinations.

Open GEdit and insert the following:

include "/usr/share/X11/locale/en_US.UTF-8/Compose"

<Multi_key>     <t>     <r>     <i> : "▲"   U25B2   # Triangle

Save this as .XCompose (case sensitive) in your home directory.

Open your keyboard settings (system settings → keyboard settings) and go to the shortcuts tab.
Under the "typing" section you'll find a "Compose Key" setting. Set this to your compose key (I advice right alt)

Log out and log back in.
For the non-breaking space press Compose Key → space → space.
For the triangle char press Compose Key → t → r → i

If it isn't working add

export GTK_IM_MODULE="xim"

to the end of ~/.profile.
If xim isn't working for you you'll have have to install uim (sudo apt-get install uim) and replace the xim in ~/.profile with uim.

Congratulations you are now triforcing like a pro.


How can I prevent password requests whenever I try to access a secondary drive?

Run the Disks program
Select the appropriate disk form the left hand pane.
Click the Additional Partition Options icon.
Edit Mount Options.
Set User Session Defaults to Off.
Check the Mount At Startup box.
Check the Show In User Interface box.
OK.
Repeat for the other hard disks.
Reboot.
You should find your additional disks are now mounted permanently.


Easiest way is to just install by apt-get...

If you just want the libraries:

sudo apt-get install libsdl2-2.0

On Bionic or newer:

sudo apt-get install libsdl2-2.0-0

If you want to do development:

sudo apt-get install libsdl2-dev


This is a perennial source of confusion resulting from the difference between system crontabs (/etc/crontab and the associated files in /etc/cron.d) and user crontabs (including that for the user root, usually accessed via sudo crontab -e) - from the DEBIAN SPECIFIC section of man cron:

Support  for  /etc/cron.d  is included in the cron daemon itself, which
handles this location as the system-wide crontab spool.  This directory
can  contain  any  file  defining  tasks  following  the format used in
/etc/crontab, i.e. unlike the user cron spool, these files must provide
the username to run the task as in the task definition.

If you really need to run the find command as user derakupload, then you can either do so directly via their own crontab e.g.

sudo -u derakupload crontab -e

or add it (with the user field) to /etc/crontab.

Alternatively, if the find command can be run as root, simply use root's crontab sudo crontab -e but omit the user field derakupload.


The package name for the default image viewer, is eog.


How to create an image of the OS  or disk?

You can use Clonezilla.  Clonezilla is the Free and Open Source
  Software for Disk Imaging and Cloning.  Two types of Clonezilla are
  available, Clonezilla live and Clonezilla SE (server edition).1

For more information or to download Clonezilla See here.

1Source:Clonezilla


ecryptfs-recover-private not accepting password

No, it's not incorrect (too many negatives...). To unwrap your wrapped-passphrase file you need the last user login passphrase that was used to encrypt/"wrap" it.

If your user passphrase was changed without you being logged in, through a live or root user, or if something went wrong then you might need a previous login passphrase.

Or, if you used the ecryptfs-migrate-home script yourself or saw the warning somewhere, you really should have a backup copy of the mount passphrase. You can use it to decrypt your files without knowing the login passphrase. The ecryptfs-recover-private script should ask you for the mount passphrase if you don't have the login passphrse.


How do I allow Hangouts to access camera and Mic in Ubuntu BQ M10 OTA 11?

You should get a dialog in the middle of the screen asking about the permissions when you start a video call.

If it doesn't work, try updating and/or restarting your tablet.


Finally figured it out. I installed Ubuntu using the Alternate CD. After that Ubuntu would start up properly graphics issues so I started up in Recovery Mode, un-installed the video drivers, then booted with nomodeset and installed the latest drivers for ATI graphics cards. Now it works.

Hope it will help somebody.


You are not losing the content, you are hiding it from your system view, mount will override the system view for the mount path. You are signaling the systen that that path is now served from the shared directory on your virtualbox host, ignoring whatever is placed below the mount point.

No, you can not merge a regular filesystem content from your system, with a a shared mount system. You should automount the shared filesystem, so that every write/read is performed always to the same location, both for your guest, and for your host.


Will the official repositories update to Firefox 4.0 when it's released?

Ubuntu 11.04 will release with Firefox 4.0. However, other supported Ubuntu releases will remain with Firefox 3.6 in the medium term. When Firefox 3.6 approaches end-of-life, the other supported Ubuntu releases will be upgraded to the latest version of Firefox, although this may not be 4.0.

For those Ubuntu releases, we will provide semi-official packages of Firefox 4.0 in a PPA.

How do I install the latest stable version of Firefox?


How do I bind a ZFS pool to a LXC container?

The bind is happening before ZFS is ready.

You need the enhanced mountall utility from the daily PPA.  Run apt-add-repository ppa:zfs-native/daily, do a full upgrade, and try again.

If the problem persists, then please open an issue here:

https://github.com/dajhorn/pkg-zfs/issues/new


How to install Dell firmware update from Ubuntu Software app

This is a special class of updates called "Firmware Updates" which affect your BIOS and system firmware on the system board.  These typically come from Dell and hardware manufacturers, and typically firmware updates like this do not get applied during a warm boot (aka a "reboot").

You typically need to do what is called a 'cold boot' - a full shutdown and then turn on the computer again from that cold 'powered off' state - for the firmware to pick up on the fimrware update needing installed.  During that process it'll see it has a pending firmware update and apply it.

(This is the case on my XPS 15 9570 and likely other XPS/Precision models)


How do I upgrade from ubuntu 16.04 to 18.* when packages are being kept back?

Backup first. Download Ubuntu Release you want. Ubuntu bionic is current newest LTS (with long term support) while Ubuntu disco is the current newest STS (short term support)
Create a bootable DVD or USB stick. Start a Live-session and test if everything is running.

I would like to advocate fresh installation. Your guide describes a release-upgrade from xenial to bionic. This is supported.

sudo apt install --reinstall gcc-5-base=5.5.0-12ubuntu8 gcc-6-base=6.4.0-22ubuntu1 libdatetime-locale-perl=1:1.22-1 libdatetime-timezone-perl=1:2.19-1+2018e

This way we tell apt which package version we want. No, errors? sudo dpkg --configure -a && sudo apt -f install

Control with dpkg -l | egrep -v '^ii|rc' if all packages are in good condition. No output is gut.

Now purge during the upgrade removed packages. Without any manually config the config-files stays on your System. sudo apt purge $(dpkg -l | egrep '^rc' | awk '{print $2}')

Take a look in /etc/apt/sources.list that all entries points to cosmic. I never use do-release-upgrade, I prefer an other way.

sudo apt install apt-show-versions

It help's to identfy packages are not longer available because the name changed for example.

apt-show-versions | fgrep 'No available'

If you want to get rid all of them. sudo apt purge $(apt-show-vesions | fgrep 'No available' | awk '{print $1}')

Note: This could work, but not with guarantee.


Help, my laptop can't boot any installed OS

The default installation of windows 10 requires a minimum of 4 partitions.

sda1 (Recovery)
sda2 (Boot/efi)
sda3 (MSR)
sda4 (Windows OS, usually "C")

On the other end, linux OS requires a minimum of 2 partitions.

sda1 (swap)
sda2 (/)

Using a live Ubuntu CD or USB you can check your disk's partition with the following command:

sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL

If you had 2 Windows 10 installed then you should have 8 partitions for windows and at least 2 more for Linux. So a total of 10 partitions. Also if you installed another Windows 10 you might have erased some of your DATA from the original Windows 10 (the one you want to recover). Using the command mentioned earlier with a live CD of Ubuntu you should be able to have a better idea of what happened to your system. Also you will be able to access your Windows partition from Nautilus and backup any data.

With the information provided, I think at this point you'll have to reinstall completely your system. If you don't want to lose any DATA, boot first with a live Ubuntu CD or USB and backup all the DATA you had on your windows partition on an external Hard Drive usually located at:

  "/media/[username]/Windows"

Reinstall windows 10 completely, (Format and delete all partition) and then, after Windows 10 is working, install Ubuntu but on a different partition. So a normal installation of Windows 10 + ubuntu should look like this:

sda1 (Recovery)
sda2 (Boot/efi)
sda3 (MSR)
sda4 (Windows)
sda5 (swap)
sda6 (Ubuntu)

Please feel free to ask me more questions today, I'll gladly help. I'll be a little busy today though, but I'll try to check this page as often as possible.

itSp4x


Pick any of the methods from this Stack Overflow question, and use Python to run it. For example:

$ python -c 'import rstr; print(rstr.xeger("ls (-[al]{2}|-a -l|-l -a)"))'
ls -a -l

You might have to pip install the rstr module.


When does Ubuntu Livepatch on a non 24/7 Server

Theoretically, there is a sense in installing kernel live patching on a server Ubuntu installation that is rebooting daily. You decrease the window of opportunity for the hacker attacks that can occur in between the time of publishing of the patch and scheduled reboot.

I have Canonical livepatch installed on my desktop Ubuntu and it does work. At the time of publishing of the patch, it had live patched my kernel which is visible with command:

# canonical-livepatch status --verbose

The command will say "patchState: nothing-to-apply", yet it will list the patched CVE vulnerabilities by CVE numbers when a live patch is issued:

# canonical-livepatch status
   client-version: "1"
   architecture: x86_64
   cpu-model: QEMU Virtual CPU version 2.4.0
   last-check: 2016-08-24T19:38:36.793837171Z
   boot-time: 2016-08-24T18:53:56Z
   uptime: 45m4s
   status:
   - kernel: 4.4.0-21.37-generic
     running: true
     livepatch:
       state: applied
       version: "10.1"
       fixes: |-
         * CVE-NNNN-XXXX LP: #NNNNNNN
#

You don't set up time when your system is patched as it depends on Canonical making the patch available, at which livepatchd will live patch your kernel ASAP. Reboot is not necessary, and your system will remain patched until the scheduled reboot.

Unless you install new version of kernel when it is available via

# apt-get dist-upgrade

your system will continue to livepatch kernel upon next power on, right until you do install Linux kernel upgrade and reboot having selected the patched kernel or making it the default.

By default, canonical-livepatch will check if there are new patches made available by Canonical every 60 minutes.

You can change this check interval in minutes by:

# canonical-livepatch config check-interval=120

Unfortunately, the lowest value is hardcoded to 60 minutes.


Sandisk USB thumb drive won't mount because file system is not Installed

Looking more closely to your video seems that the File System is unknown to Ubuntu or that you don't have a partition table. To fix this, you should save all your data (since you say that Windows still recognize that mess) then go to the Disk Utils, and click "Format Drive", then select FAT32 from the options and Voila your driver works in Ubuntu and Windows.


Latex Installation with TeX Collection 2020 DVD

You need to install texlive-xetex package which provide xelatex command:
sudo add-apt-repository universe
sudo apt update
sudo apt install texlive-xetex

To install the full version of latex:
sudo apt install texlive-full


Make a bootable usb for an iso file greater than 4 GB?

You are trying to make a bootable USB from an ISO file (Maybe a Windows installation ISO?) using WoeUSB, and the error message said that you can not copy the file install.wim in the the partition because the parameters by default in WoeUSB for the target filesystem (USB stick) are FAT32. That is what i saw in the link posted by you: WoeUSB Installation failed ERROR

Now, from the man page of WoeUSB (WoeUSB man page) the options

`--target-filesystem`

and

`--device`

will help you.

To accomplish the task you should type in the command line something like this:

sudo woeusb --target-filesystem NTFS --device /media/pathtothe/isofile.iso /dev/sdX

whith the option --target-filesystem NTFS you make possible copy into the USB files greater than 4GiB. In your case the install.wim file.

/dev/sdX is the target device (your USB stick unmounted). Change the X according to your needs.

That should work.

Hope this can help you.


Using bridged adapter function on VirtualBox with several Linux guests - will there be any IP conflict?

No, they will not have an IP conflict. When you bridge the adapters, it will effectively operate as a switch, and two MAC-addresses will be visible to the partner connection. They will have separate MAC-addresses and IP-addresses.

Bridging effectively makes the VM sit directly on the hosts network adapter, as if it had its own physical adapter.


How to do svn update without password on crontab

Any command run with sudo (without further arguments) will be run as root. root does not have access to your SSH keys, thus your passwordless login setup fails.

If your setup works when you run it with your own user, the fix is easy. In order to run the svn updates in a cronjob, but with your user, try using the -u option.

sudo -u yourusername svn update


Linksys WMP54GS-EU wireless card not detected

(Since the OP has not logged in since Oct 21 '11 but reported an answer I post that as an answer to close this question.)

By issuing the following in a terminal you can detect what the device is called:

lspci

What you need to do is to install the utility for extracting the firmware for your wireless card. Do this by issuing the following in a terminal:

sudo apt-get install b43-fwcutter


Fn keys for brightness not working on Asus X551MAV-SX366GB

Here is the summary of what I did:

I created the file /usr/share/X11/xorg.conf.d/20-intel.conf as described here 13.10 Can't Adjust Dell Laptop Backlight:

Section "Device"
     Identifier  "card0"
     Driver      "intel"
     Option      "Backlight"  "intel_backlight"
     BusID       "PCI:0:2:0"
EndSection

Then I changed one line in/etc/default/grub so it looked like this: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=" and ransudo update-grub` from the command line.
Install xbacklight  if not already installed sudo apt-get install xbacklight. Then I put xbacklight -set 50 to autostart applications.
Reboot

This worked for me.


(Answered by OP in comments)

  Had burnt and tried two DVDs but found place on internet where they'd suggested using UNetBootin to create a USB stick and tried and worked! Finally!


That's something for a complete 600 pages book! 8-) More or less, someone gets a software project, compiles it and creates a package and stores it in a repository.

Packages receive a version so the system can recognize older and newer versions.

The package system on your computer can access the repository and see whether new versions of packages that are installed on your computer have available. If so, it offers you the possibility to upgrade.

There is a lot more to it than just that. For example, when upgrading a server you want to stop the server, do the upgrade, then restart the server. These steps are accomplished by pre and post scripts as described on this page:

http://windowspackager.org/documentation/implementation-details/scripts-and-processes

Another important point, different packages may not be compatible between each others. For example, if you install Postfix you cannot also install sendmail because both offer the same functionality (although there are ways to offer both software via the alternative links.) Similarly, installing Apache and httplight would generally be in conflict because both use port 80 by default. Again, you can fix the conflict by tweaking the settings of each server, but by default the operating system is likely going to tell you that you cannot do that.

You may want to read about the Debian Policy Manual

http://www.debian.org/doc/debian-policy/

as it gives you quite a bit of information in that regard.


Ubuntu 14.04 wirelss card all seems installed but cannot scan for networks

you don't appear to have an IP address.  Try sudo ifconfig wlan0 192.168.1.100 up and see what happens.


Ubuntu 17.10./16.04. Black Screen after Hibernation

There's currently an open bug on Launchpad (#1743094) with waking from hibernation with a black screen for more recent kernels, including 4.13.0-31. You may want to subscribe to this bug to monitor progress.

The bug report does indicate success with installing a more recent kernel, (4.14.13-041413 is referenced).


Copying a SSH public key on a VPS with a SSH connection

I guess the best way copy  pub key to remote host is use ssh-copy-id:

ssh-copy-id -i ~/.ssh/mykey user@host


Text missing / garbled after laptop resumes from sleep mode

You are probably experiencing a bug related to framebuffer memory corruption due to improperly marking particular portions for saving/restoring.

See this discussion. Sadly the best resolution is to try a different kernel.

I have not experienced it on 4.2, but it's a serious bug on 4.4.

Maybe try a stable kernel. (Such as the 3.2 for Debian, which is the base for precise: http://kernel.ubuntu.com/~kernel-ppa/mainline/)


How can I switch from Kubuntu 18.04 to Ubuntu 18.04?

Based on the information you've provided, it looks like apt is refusing to continue with the installation because it is detecting conflicting packages.

The main possibilities that come to mind are:

There are PPAs or non-standard repositories installed.  If so, remove them.
There are manually downloaded and installed deb files.  If so, remove them.
Recommended packages are being treated as dependencies.  If so, turn the setting off.  (The easiest way is from within synaptic or perhaps software-properties-kde.)

Further recommendations:

Use aptitude (instead of apt or apt-get) because it has a built-in dependency resolver that will suggest potential solutions that will allow the installation to continue.
If you just want to try different desktop environments, try the live discs first to avoid destabilizing your current system.  Then if you like them, install just the associated packages (such as, gnome or xfce4), rather than ubuntu-desktop.


In the question you've linked, the UUID used is the one of the swap partition. So, in order to fix your problem using the provided solution, you would have to find the UUID of your swap partition.
The easiest way to do that would be to execute the following command:

sudo blkid | grep swap

Which will output something similar to:

/dev/sdb4: UUID="2ffc1e3c-8a56-41bc-914a-79efe08b8a52" TYPE="swap" PARTUUID="5e43fe42-04"


According to https://wiki.ubuntu.com/Lvm

"(Snapshots) is something you simply can not do without LVM"

But not all hope is lost if you have an external hard drive or a file server some where on your network you can use imaging software like http://clonezilla.org/ to create images of your machine and restore to them as your require.