How to compare two columns from two different files?

The key here is "at the same line" - that suggests you need to index the array with the record number in the current file, FNR, rather than with the field value $3
Ex.
awk 'NR==FNR{a[FNR]=$3; next} {print $2, $3 == a[FNR] ? "ok" : "error"}' file1 file2

Alternatively, if you know how many columns there are in the first file (let's call it N), you could just paste them side by side and then just compare $3 with $(N+3)
Ex.
paste file1 file2 | awk '{print $2, $14 == $3 ? "OK" : "error"}'

Note I omitted the -F"," because your files as posted are whitespace delimited not comma delimited - if they are actually CSV files, add it back.


Purple screen of death: can't get into ubuntu desktop or grub menu

Someone much smarter than me found the solution. I just ran these commands:

sudo dpkg --configure -a
sudo apt update
sudo apt-get install -f
sudo apt upgrade
sudo apt install systemd-sysv ubuntu-standard


As far as I am aware, hibernate creates a complete 'image' of the system state that is restored on restart. Poweroff, on the other hand, shuts down the system which includes clearing tmp files and memory caches.


How can I update Ubuntu offline without using Synaptic or Keryx?

As far as I know, you can't download updates for a Oneiric (11.10) system using Ubuntu Natty (11.04). You must have a working Ubuntu 11.10 system.

An sketch about the process we are following:

First we'll install a Virtual machine in OP's Natty (11.04) system.
We'll install Ubuntu 11.10 in that virtual machine
We'll setup virtual machine to have a common shared folder between the host OS (11.04) and the guest OS (11.10)
We will generate a download script of packages which are required to upgrade that system (guest OS i.e Ubuntu 11.10).
We'll transfer the download script to the host OS using shared folder set up in step 3.
In host OS, we'll download all the required packages with the help of download script we get in step 5.
We'll transfer all the downloaded .deb files in the Offline system, that is actual Ubuntu 11.10 system in his friend's PC.
We'll create a local repository in his friend's PC with those packages.
We'll upgrade OP's friends Ubuntu with the help of local repository created in step 8.

1. Getting a working Oneiric system

There are two ways to have a working Oneiric system.

By Doing an actual installation

You have to install Ubuntu Oneiric (11.10) on the computer with Internet connection. Though it is also possible from a live system running from USB or CD, I recommend installing. You can get help for installing Ubuntu from these links:

How do I install Ubuntu?
Help with Ubuntu installation.

Installing Oneiric in a VirtualBox Virtual Machine

To install VirtualBox in Ubuntu 11.04 Natty Narwhal, run these commands in a terminal:

sudo apt-get update
sudo apt-get install virtualbox

Then install Oneiric in the virtual machine.

How to install Ubuntu on VirtualBox?

Set up a shared folder in the virtual machine.

You need to install VirtualBox Guest Additions to enable shared folder feature. Run this command in the virtual machine to install that:

sudo apt-get install virtualbox-guest-additions

If you need help enabling the shared folders feature in the VirtualBox, check this link:

Chapter 4: Shared Folders

2. Grab the .deb files required for updates

Please Note these specific points:

It is recommended  not to update the virtual system during installation or afterwards before installing Synaptic. Cause, those updates might be deleted from cache and without those updates, you can't successfully generate package download script.
Don't run sudo apt-get clean or sudo apt-get autoclean, because those commands removes .deb files from cache.

Then boot to the Oneiric system that has an Internet connection (either from the installed system or in VirtualBox) and follow this procedure:

Install Synaptic Package Manager. Run these commands in a terminal for this: (Note, You must connect the virtual machine to the Internet, without Internet access the machine cannot update the package list)

 sudo apt-get update
 sudo apt-get install synaptic

You may also want to download the packages required for the ubuntu-restricted-extras package. To do so, Run this command additionally with the previous two commands

 sudo apt-get install -d ubuntu-restricted-extras

This command will not install the packages, it only downloads them with all dependencies in /var/cache/apt/archives folder.
Then open Synaptic Package Manager. Push the button Mark All Upgrades.

When asked if you want to Mark additional required chanages, press the Mark button.

Then going to File --> Generate package download script, save the script as a file. Let it be update-downloader.sh in a folder named Updates. We assume the Updates folder is in your home directory, i.e., in /home/username. Then close Synaptic.
Now download the .deb files.

Go to the Updates folder, where you saved update-downloader.sh.
While you are still in the Terminal and have cd'd to the Updates folder you created earlier, run this command:

cp /var/cache/apt/archives/*.deb .

That copies the downloaded .deb files which are used for installing Synaptic Package Manager and the files downloaded for the ubuntu-restricted-extras package.
Then run this command sh ./update-downloader.sh to download all the .deb files required to update in the current folder (i.e., in the Updates folder.

Or

Alternatively, you can transfer the Updates folder with the few .deb files you just copied from /var/cache/apt/archives with the update-downloader.sh script in it to the host OS via VirtualBox's shared folder feature.

Then in the host Ubuntu system, open a terminal and run the below command by going to  the Updates folder you just copied from the guest OS using shared folder feature, where update-downloader.sh file resides:

sh ./update-downloader.sh

If you downloaded the .deb files in the virtual machine, in this step, transfer the Updates folder with those files using Virtual Box's shared folder feature. (This step is only required if you downloaded the files in virtual machine)
After you get the Updates folder with all .deb files in your host PC (i.e., in your Natty system) copy that folder with all files on a USB flash drive. You may also want to burn a DVD with those packages, though I am not recommending that.
Transfer the Updates folder using your USB drive (or CD/DVD, if you burned them)  to your friend's PC.

3. Use the .deb files to create a local repository

Copy the whole folder named Updates to the Internet-less computer. Put that folder in a directory. Let say, you have put the Updates folder in the home directory. Create a new directory in your home folder with name offline, and move the Updates folder into the offline folder. Now, the directory structure looks like this

   + home
     +- username
       +-  offline
         +-  Updates (contains the .deb files)

Now open a terminal and go to the offline folder. Once in the offline folder, run this command to generate the necessary package index file:

apt-ftparchive packages . > Packages

It will create a file with name Packages.
Now open /etc/apt/sources.list file with root power. In a terminal do this

gksu gedit /etc/apt/sources.list

Then press an Enter while your cursor is at the beginning of the file. This will create a new blank line at the top. Write this line as the first line in the file

deb file:/home/username/offline /

Then save the file with Ctrl+S and exit gedit, the text editor.

Remember to use the exact folder / path names for the offline folder, and replace username with login name of the user.

Also, if you are sure, your friend cannot use other repository sources, you may want to disable all other repositories by placing a # mark before each line in the /etc/apt/sources.list file. (This is not actually required, but recommended).

Note that it is generally required to put a local repository at the top of the file, to give it a higher preference then other repository sources. (But in this particular case, you might be able to get away with not doing this, since your friend can't even connect to the Internet to access any of the other configured repositories.)

4. Do the update without accessing the Internet!

Run sudo apt-get update in the terminal to make the package manager recognize your local update directory.
Then do this command to upgrade the offline system:

 sudo apt-get upgrade --allow-unauthenticated

Done! You have upgraded your system without Internet access.

Some Notes:

1. Don't want to write allow-unauthenticated option every time?

If you want to use this local repository to install packages time to time, but feel bored to always use that allow-unauthenticated option, do this.

Create a file named 99mysettings in /etc/apt/apt.conf.d with gedit and add the line in that file and save.

    APT::Get::AllowUnauthenticated "true";

To open a file named 99mysettins in that directory with root power use this command in a terminal

gksu gedit /etc/apt/apt.conf.d/99mysettings

2. Note about allow-unauthenticated option:

You might wonder why I have provided the --allow-unauthenticated option. This is used because your local update repository is not authentic to the system. But it will not harm, because you downloaded those packages from an authentic official Ubuntu repository.

3. I want to have a trusted repository instead:

Check this awesome and epic post in Ubuntu forums about creating a trusted local repository. If you create a trusted repository, you don't have to provide --allow-unauthenticated option anymore.

Recommendation: I would recommend you not to use PPA repositories, unless you really trust them. In particular, don't use experimental repositories, because they may introduce dependency problems in the system, which is often referred by Unix geek as dependency hell. This can be harder to fix when you do not have an Internet connection.


There is a program called pm-is-supported that can be used to check for the suspend capabilities of the system.

On my system here are the results (0 means supported, 1 means unsupported):

$ pm-is-supported --suspend ; echo $?
0
$ pm-is-supported --hibernate ; echo $?
0
$ pm-is-supported --suspend-hybrid ; echo $?
1

The manpage of pm-is-supported suggests that s2both supports hybrid suspend. I've installed s2both, available in the uswsusp package but it still reports that hybrid suspend is not supported. I have a hunch that it needs a reboot because it updated the initrd image. I'm gonna reboot and report back. Wish me luck.

Update: Running sudo s2both wrote the snapshot to disk and suspended to RAM correctly, however when I pressed a key to resume the system rebooted (and didn't restore the snapshot from disk).

I think there's something wrong with the uswsusp package in ubuntu. The splashy package (which is used by uswsusp) has a file conflict with lsb-base which has been left unfixed since Jaunty ( https://bugs.launchpad.net/ubuntu/+source/splashy/+bug/328089 )

Try running sudo s2both or sudo pm-suspend-hybrid, see if it works on your system.


This is a known issue in debian and its derivatives. So, it's better to stick to earlier versions of pip. To rollback, run:

sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall
sudo python -m pip uninstall pip && sudo apt install python-pip --reinstall


Xubuntu setup not allowing to create an extended partition, limits to four total, no matter if primary or logical

"I haven't seen it create a swap partition in the confirmation dialog..." Swap partitions are passé. Nowadays, since the problem with earlier kernels and swap file speed has been solved, Ubuntu's (and Xubuntu's) default is a swap file which they will automatically generate during install if you do not create a swap partition (note: btrfs does not support swap files).

The swap file is far more flexible; if you add RAM later on, and would therefore normally increase swap space, it's a lot easier with a swap file than remaking partitions, and since it is created during install, it will be within 100 GB of the front of the drive.

"The customary numbering scheme is to create primary partitions sda1 through sda3 followed by an extended partition sda4. The logical partitions on sda4 are numbered sda5, sda6, etc." - Partitioning at the Arch wiki.

Since your PC does not support EFI/UEFI, then you will need to make partitions following the MBR partition table rules; if you want/need more than four partitions, then choose Something else during the install process, create three Primary partitions and assign them to root, /var, and /home (with /boot automagically under root), then an Extended partition in which you may create the remaining partitions as Logical partitions. Or, make root, /boot, and /home, with /var one of your Logical partitions.

Note: You make an Extended before you can create a Logical, not vice versa.

Every source I can find says there's very little difference, if any, in HDD  performance between Primary and Logical partitions (example), and absolutely none if you have an SSD instead of an HDD.


There is an gnome extension called YAWL that shows icons on the top bar and it has an option to hide the app menu.

The problem with this extension is that the icons that it shows on the top bar are ugly - just like the app menu.

Here is the link to YAWL if you want
https://extensions.gnome.org/extension/674/yawl-yet-another-window-list/


Is it possible to run qemu-system-x86_64 virtual machine from raw disk image located on external flash drive?

I had this permissions issue when running VM's from a thumb drive.

The problem I was having was that my system (Fedora 27) automatically mounts new drives (external HDDs, USB, SD) to

/run/media/(username)/(device name) (on your system it's /media/username/....)

For whatever reason this causes the permissions issue. By default it was mounted with fmask=0022 and dmask=0022 (use man mount for details). To fix the issue we need to unmount the drive from that location as root, and then mount it to /mnt. In the example below the thumb drive is /dev/sdc1. We need to remount it with fmask=0011 to allow write access for all users and groups.

# su  -     (then enter root password)
# umount  /run/media/yourusername/devicename
# mount  /dev/sdc1 /mnt -o fmask=0011        (mount usb to /mnt)

After that I just made sure to have symbolic links from the original location of the qcow2 drives to the new location (still as root)

# cd  /var/lib/libvirt/images
# ln  -s  (new target)  (link name)

so if your VM is named MyVM

# ln  -s  /mnt/Myvm.qcow2  MyVm.qcow2

Once I saw that my VMs were now working, I edited /etc/fstab to automatically mount the drive at /mnt. The folders and qcow2 drives were owned by my standard user account and group. I am sure there are better ways to do it, but this is what worked for me.


error while using lkl keylogger in ubuntu 16.04

Clearly, the user you're running as does not have the permissions necessary to install the file:

/usr/bin/install: cannot create regular file '/usr/local/bin/lkl': Permission denied

Run the make install as root, via:

sudo make install


try the following config for Nginx redirection

server {
        listen 80;
        server_name _;

        location / {
            proxy_pass http://127.0.0.1:8080;
            proxy_set_header X-Real-IP  $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto https;
            proxy_set_header X-Forwarded-Port 443;
            proxy_set_header Host $host;

        }
        location /.git {
            deny all;
            return 404;
        }
}


Vixiecron doesn't allow disabling of emails, how can I disable cron emails globally?

When it has to be vixie-cron adding MAILTO="" on top of the cron is the solution. There is no global method (all options are stored in the respective users crontab). This

  cron then  wakes  up  every  minute,  examining  all  stored  crontabs,
         checking each command to see if it should be run in the current minute.
         When executing commands, any output is  mailed  to  the  owner  of  the
         crontab (or to the user named in the MAILTO environment variable in the
         crontab, if such exists).  The children copies of  cron  running  these
         processes  have their name coerced to uppercase, as will be seen in the
         syslog and ps output.

has no additional configuration so is executed always (it is also possible to kill the sending of mails by adding >/dev/null 2>&1 or &>/dev/null to the command itself; but that would be more work then editing all crontabs).

The link also states:

  Each user can have their own crontab, and though these are files in /var/spool/cron/crontabs, they are not intended to be edited directly.

I see 3 possible options:

My preferred method would to edit all the crontabs with crontab -e.
use another cron that does have a method for globally setting MAILTO (which cron and how to do this is for another question ;) )
ignore the warning and edit all files from commandline with a for/next loop. I read that as "you can if you really really really really really really want to.". Mind the remarks in these 2 topics about this: ubuntuforums and serverfault. As far as I can tell the only problem you face (if done correctly!) is that your change gets overwritten if someone does use crontab -e.  But if you all agree that if someone does change a crontab with crontab -e that they also HAVE to include the MAILTO='' that concern should be taken care of (since the change you made is overwritten by the new crontab but that one also includes your change).


Can not install Ubuntu virutal machines on VirtualBox and VMware Player

In order to properly install Ubuntu a working Internet connection is needed. In case the installer wants to download files it will stall in case it could not connect. When installing on bare metal the Ubuntu live session will already have drivers for most network adapters including wireless adapters to be able to connect.

This is different when installing in virtual machines, as these will make use of the host network for conntecting to the Internet. Therefore we will have to tell the virtual machine application to what network it should connect before we install Ubuntu. This is done in settings for a virtual machine we are about to create.

For Virtual Box this can be done from the Virtual Box Manager in the Network settings tab:

 Screenshot from: Wifi card on an virtualbox's ubuntu

Tick to enable networking
Choose the type of networking it is attached to (Bridged vs. NAT, or Host Only, see Which type of VirtualBox networking should I use?). Choose a bridged adapter when unsure.
Choose the name of the host network interface to connect to (e.g. ethX or wlanX).

Also see the follwing question for attaching to a wireless LAN:

Wireless Network in Virtualbox


Can't use symlinks in local /var/www directory

This sounds like a permissions issue. Make sure that each directory and parent directory that Apache must access (both in /var/www and in the symlinks' target directories) has the global execute bit set.

For example, if your symlinks point to /home/somebody/www, do this:

sudo chmod a+x /var /var/www /home /home/somebody /home/somebody/www

It is not necessary to set read access on any directory; only the files that Apache is supposed to read must have appropriate read permissions.


It didn't work for me how i solved it was

sudo /usr/local/bin/pip install PyYAML

I will try to make a symlink for next time.


You can try Ubuntu (or Lubuntu, or any flavour) without need to install it, by using a LiveCD. There, you can see how Ubuntu would work in your PC.

The steps are very simple:

Download the flavor of Ubuntu you want to test
Burn the ISO into a USB/CD/DVD. A simple guide here
Boot the USB/CD/DVD as if you were to install it.
Select "Try Ubuntu without any change to your computer" from the menu.

There you have, Ubuntu in your PC! Now try it, play with it, and see how it performs in your PC. You can do this for several flavors and see which fits your needs better.

There are plenty of guides online for LiveCD. For example, here.


Graphics card drivers are not generally available by sudo apt-get update. You should go to

system settings -> software & updates

and click on the Additional Driver tab. There you should see proprietary drivers available for use.

In your case details of software should indicate that the driver is for Graphics Card. You should tick the radio button which will enable the use of the driver. Then apply changes.
I hope it resolves your issue.


Issue installing FLEXnet on ubuntu for program: Geneious

You need to run the full command:

/home/shep/Geneious/licensing_service/install_fnp.sh "/home/shep/Geneious/licensing_service/linux64/FNPLicensingService"

note that the bit in quotes is a parameter to the install_fnp.sh shell script.


How to copy file from a list to a new folder?

The error you are getting is because you are reading /trial/file1.txt and not ./trial/file1.txt. That means the shell is trying to find a directory called trial which is under the root directory (/). If you want a path that is relative to your current directory, you can just use:

while read file; do cp "$file" trial/test_folder; done < trial/file1.txt

Or,

while read file; do cp "$file" ./trial/test_folder; done < ./trial/file1.txt

Or, you can use the full path:

while read file; do cp "$file" /home/shane/trial/test_folder; done < /home/shane/trial/file1.txt


Do I get updates for Kubuntu 16.04 after April 2019?

Run

ubuntu-support-status --show-all > ~/Desktop/support.txt

to get an idea of how long various packages will be supported.

I'm on Kubuntu 18.04 and the summary at the top of the (long) output of that command looks like this:

Support status summary of 'kububb':

You have 1298 packages (55.3%) supported until April 2023 (Canonical - 5y)
You have 933 packages (39.8%) supported until April 2021 (Community - 3y)
You have 2 packages (0.1%) supported until April 2021 (Canonical - 3y)

You have 1 packages (0.0%) that can not/no-longer be downloaded
You have 113 packages (4.8%) that are unsupported

Note that packages categorized as unsupported may actually be unsupported or it maybe that the package maintainer hasn't specified the support status and the package may still be currently maintained. Also, packages derived from ppas are listed as "unsupported". For example, I have google-chrome-stable and libreoffice-core which are from actively supported ppas listed as unsupported.


Easy fix for LibreOffice Impress font problems on Lubutu 20.04?

The user @sudodus helped out the OP in chat, so thank you @sudodus

I have seen numerous bugs reported on launchpad since 20.04's launch which are being fixed by LibreOffice upstream, but I didn't look to see if this was one. The OP had reported the issue was gone once the snap version was installed, so to install it just enter

sudo snap install libreoffice

This will result in two versions of LibreOffice installed (original deb and new snap version).

Should you want to remove the originally supplied version it consists of these packages

libreoffice-calc
libreoffice-impress
libreoffice-writer
libreoffice-base-core
libreoffice-gtk3
libreoffice-qt5
libreoffice-style-breeze
libreoffice-draw
libreoffice-math
and some libs etc

Those can be removed with

sudo apt remove libreoffice-base-core libreoffice-impress
sudo apt remove libreoffice-core libreoffice-common
sudo apt remove libreoffice-style-breeze
sudo apt autoremove


Virtual MAC address? I think you mean "virtual IP addresses". See man 5 interfaces, and follow the documentation links at the very end. On my system, it says:

For  advice  on  configuring  this  package  read  the  Network  Configuration chapter of the Debian Reference manual, available at http://www.debian.org/doc/manuals/debian-reference/ch05.en.html or in the debian-reference-en package.
Examples of how to set up interfaces can be found in /usr/share/doc/ifupdown/examples/network-interfaces.gz.

But, even if you assign extra IP addresses, your traffic is still going in/out of your system through the SAME NIC. No matter how many IPs, only 1 NIC. No speedup. Multiple IP addresses are good for obfuscation, virtual machines, and simulated network testing.
Read and enjoy!


How to install openmpi modules in Ubuntu 18.04?

The missing libraries are provided by the libblacs-mpi-dev package. The solution is to install the package, either via a GUI software manager or via the command line

sudo apt install libblacs-mpi-dev


Can't change language inputs on Ubuntu 20.04 LTS after computer wakeup

I had this problem switching between English and Spanish keyboard layouts. Based on the answer at: https://askubuntu.com/a/1232819/264753, I regenerated my locales with:
sudo locale-gen

and it seems to have solved the problem.


How do I install drivers for the RTL8821CE Network Controller on Ubuntu 20.04?

This fixed the No Wifi on my ASUS D509DA laptop, Ubuntu 20.04.1 LTS:
First Ensure that you disable Secure Boot in the BIOS(See snip below)
NOTE: I did not have do Step C as I had already disabled Secure boot.
Then run
sudo apt-get install rtl8821ce-dkms

To see what adaptor you have and hence which dtiver to install:
sudo lshw -C network

*-network UNCLAIMED
       description: Network controller
       product: RTL8821CE 802.11ac PCIe Wireless Network Adapter
       vendor: Realtek Semiconductor Co., Ltd.

read full details at this link for your specific driver, see snip from that page below
https://easylinuxtipsproject.blogspot.com/p/realtek.html#ID6
------------ Snip -----------

Realtek RTL8821CE chipset
6. Below you'll find a how-to for installing a driver, which should get your RTL8821CE chipset to work.
Proceed like this:
a. First establish temporary internet connection by other means.
b. Launch a terminal window. (You can launch a terminal window like
this: Click)
c. Copy/paste the following command line into the terminal, in order
to install the application mokutil and to let it examine the Secure
Boot status of your machine:
sudo apt-get install mokutil && mokutil --sb-state
Press Enter. Type your password when prompted. In Ubuntu this remains
entirely invisible, not even dots will show when you type it, that's
normal. In Mint this has changed: you'll see asterisks when you type.
Press Enter again.
If it reports that Secure Boot is enabled: reboot and disable Secure
Boot in the BIOS. In order to do this, you might need to set an
administrator password in the BIOS first.
Disabling Secure Boot is no loss: it adds no meaningful security
anyway. It's primarily a means for Microsoft to enforce its vendor
lock-in on your computer...
d. Copy/paste the following command line into the terminal, in order
to install the driver:
sudo apt-get install rtl8821ce-dkms
Press Enter.
e. Reboot your computer. Your WiFi card should work now. If not: try
the rtw88 driver, as described in item 7 below.

--------- end snip -----------


Help with Bash script - appending sequential numbers

You can get bash to count for you just by telling it where to start, like this:

$ n=0
$ echo $((++n))
1
$ echo $((++n))
2
$ echo $((++n))
3

You can use printf %03d to format the result of $((++n)) as 001 002 003 and 010, 011 etc, for more accurate sorting. Also, there's no point setting - and _ as variables since they are not going to vary. Your function could be like this:

function rename () {
  title="photo"
  n=0
  for file in *.jpeg; do
   printf -v new "$title-$1-$2_%03d.jpeg" "$((++n))"
   mv -v -- "$file" "$new"
  done
}

Which does:

$ rename birthday 2015
'file_001.jpeg' -> 'photo-birthday-2015_001.jpeg'
'file_002.jpeg' -> 'photo-birthday-2015_002.jpeg'
'file_003.jpeg' -> 'photo-birthday-2015_003.jpeg'

But there is already a useful rename command in Ubuntu, so you may want to use a different name :)


Getting the latest features on Ubuntu Daily Builds

Simple answer really - any ubuntu installation, whether the stable/alpha or beta will receive updates as and when the package maintainers release new updates.

Thus for 12.04, a steady stream of updates are usually made available - several megabytes a day.  You can usually just leave update-manager to receive your updates.

Personally, I leave alpha/beta updates once a week because you usually see many releases of the same package over a short period.

I also separately maintain the ISO download via zsync.  In that way, if you need to trash the release, you can reload from a very recent snapshot rather than loading the last alpha/beta and updating from there.

Hang-out on the developers forum over at ubuntuforums.org.  You usually get wind of major issues quickly - that way you can make a judgment call when to best update.

Linked Question:

How do I update an ISO with zsync?


Window's Title Bar Text Desproportionally Big

Nevermind, 5 more minutes of searching and I found a command in another question:
How can I increase window title font size? (ironically asking the oposite).
This is the command if someone has my problem in the future:
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Ubuntu Bold 11'


Deleted swap partition. Now it is booting to grub rescue

You don't need Internet connection, just you need Ubuntu in CD/Flash.

Boot from live CD/Flash and do steps:

After booting from live Ubuntu, first of all open gparted and check if you installed Ubuntu in which partition ex:/dev/sdaX, where X is your installed partition (Type gparted in dash and open it).

  I am consider for example you installed Ubuntu on /dev/sda4 and I
  explain steps.

Then mount /dev/sda4 by the following commands (you can replace it by partition that you will see in gparted application):

sudo mount /dev/sda4 /mnt
for i in /sys /proc /run /dev;do sudo mount --bind "$i" "/mnt$i";done

Now we mounted the /dev/sda4 that installed Ubuntu here. just run below command to switch to root directory of Ubuntu patrtition:

sudo chroot /mnt

And run below command to install grub to main partition /dev/sda:

grub-install /dev/sda

Update grub and exit and reboot your system. it will fix.

update-grub
exit
sudo reboot

I hope this helps.


Dark screen on Macbook Pro before disk decryption on boot

This bug was present only when Installing GNOME on top of an Ubuntu 16. When with the release of Ubuntu 18.0, Ubuntu switched to GNOME as the default DE, the problem seized from appearing.


S.M.A.R.T. test reports defect, can I re-initialise the drive?

See if these are what you're looking for:

sudo e2fsck -c /dev/sdXY

(replace sdXY with that of the target device)

The -c option causes e2fsck to use badblocks program to do a read-only scan (eqvt. to using badblocks with the -n switch) of the device in order to find any bad blocks.  If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory.  If this option -c is specified twice (be forewarned that this option erases data), like in:

sudo e2fsck -cc /dev/sdXY

then the bad block scan will be done using a non-destructive read-write (eqvt. to using badblocks with the -w switch) test. If you want to do write-mode testing on an existing file system, use the -n option instead. It is slower, but it will preserve your data.

To print the blocks which are reserved as bad in the filesystem, you can use:

sudo dumpe2fs -b /dev/sdaX

(for the complete disk)

sudo dumpe2fs -b /dev/sdaXY

(for a particular partition of the disk)


Automount of CIFS share fails during boot while mount -a works after login

thanks zhongfu, this was the path to the solution.

I had to change the arch-script to this to work:

#!/bin/bash
if [ "$2" = "up" ]
   then
    mount /Volumes/share &
fi

location of the script:

/etc/NetworkManager/dispatcher.d/

Owner: root, mode 755

Now it works like a charm :-)

BTW: it could be related to my system booting off an SSD, the network actually is started after the login prompt is displayed

thanks again :-)


Uninstall Windows 8.1 to run Ubuntu 14.04 as the single OS on my laptop?

I would advice to keep the W8 recovery partition that probably is on your system intact. You never know if you want to turn back.
You have several options. The most common 3:

re-install Ubuntu 14.04 and during partitioning remove all the partitions you want to use and re-partition them as wanted (whatever rocks your boat: / or / swap or / swap /home or / swap /home /etc /boot). You can do that automatically or manually. In the  end all is used for Ubuntu. Problem: this will remove your current Ubuntu and its files.
If that is not wanted...

Burn and boot a gParted live dvd. Remove all unwanted partitions and after that is done choose to resize the partition that is adjecent to the unallocated space. That will probably be the root partition. After this is done the space from the Windows partition will become available to Ubuntu (Option 4: you can only do resizing to adjecent partitions; if you want it added to another partition you need to shrink and enlarge partitions several times; this will take a lot of time depending on how full your system is).

Burn and boot a gParted live dvd. Remove all unwanted partitions and after this is done format the unallocated space as EXT4 and give it a mountpoint. That way you end up with an extra partition and can freely use that space after you changed the owner and group to your user (chown $USER:$USER /media/{mountpont}/.

The reason I advice a live gparted is that this makes sure all partitions are unmounted and you can change the partitions at will.


In a ternimal, navigate to /usr/share/xsessions:

cd /usr/share/xsessions

this will contain .desktop files for the desktop environments.
simply delete the entries for gnome-openbox (and openbox if desired).

It sounds like openbox is required by LXDE, so uninstalling is probably risky. Removing the desktop option is safer.


Disk usage increasing over time. Why? And how to fix?

First, how can i determine what is eating up this disk space?

find . -type f  -exec du -h {} + | sort -r -h > /tmp/files.txt

to list files ordered by size.

  but the problem is I don't know what would normally and legitimately be taking up a lot of space and what wouldn't.

Neither do we. What you can do is create a list of all files with the command above and compare it to the same list next week. Find the files that got bigger or the new files (diff is a good tool for that).

  Second, can you tell me what directories/files on an ubuntu server typically need pruning over time to prevent wasted disk space like I am experiencing?

did you install software? Ubuntu keeps a cache of packages. But generally this will not be the issue: a server has its software and when working should not have new software installed. Only updates and those are small (the mostly replace the existing software).

  Third, I have enabled automatic system security updates. Could this be contributing to the problem? How would I check this? Can I clean out old files? Where would they be?

No
No.
That's up to you to decide.
see for instance var/cache/apt/archives occupying huge space for deleting cache archived packages.


Cannot install Ubuntu 18.10 onto HP Compaq dc5800 via USB

nvm guys, just had to update my BIOS. :P


Problem in installing glibc-devel packager

There is a patch available for installing tlib in ubuntu.
https://github.com/lerwys/Installation_instructions/tree/master/patches/ltib/

It solves the above error.

After this I came across the problem of rpmdb. So Patch for this is available at
https://github.com/lerwys/Installation_instructions/tree/master/patches/ltib/fixes

IMPORTANT NOTE:
At first, I applied patches from second link and after that i applied patch from first link.
It didn't work.

After this I applied Patch from first link and then rpmdb patch from second link. It works.

After this I got this error

failed to install pme_tools package.

A patch is available for this in second link.

Things might change from system to system. So, apply only those patches which are necessary otherwise you will get some undefined behaviour.


Okular opens large pdfs with blank pages

Try to rename the file and then reopen it again. For me it happened when i tried to highlight a line, the whole file suddenly turned blank white. I renamed the file and reopened it and it displayed the pages normally again, but unfortunately without the highlighting... i don't think that Okular can handle such large files, mine was 90MBs


If I understand correctly, vlc is in the repository universe. If it is not available, you must activate that repository. You can do it with the following commands (or with some GUI tool, for example synaptic).

sudo add-apt-repository universe
sudo apt-get update

then it should work to install vlc with

sudo apt-get install vlc


This is a dependency issue for etherape. Please install libgnomeui to fix it:

sudo apt install libgnomeui-0


How do I remove a default command keyword?

You cannot do so without hiding the default install command because aliases take precedence over commands. I recommend choosing another word as the alias. You can use get for example.


Running sudo apt-get purge lxmusic then sudo apt-get install lxmusic worked for me. Now I can add songs to lxmusic.


Gnome terminal does support italics (at least in version 3.8.4). You can test terminal support for italics by executing $ echo -e "\e[3mfoo\e[23m". If you see foo printed in italics, foo, then terminal supports it.

Then you have to insert the following in .vimrc:

set t_ZH=^[[3m
set t_ZR=^[[23m

Note that ^[ is a single character and can in vim insert mode be inserted by typing <ctrl>-v <esc>.

After that you have to tell vim to italicize comments. You can quickly test if it works by executing :highlight Comment cterm=italic in vim when file with some comments is open. Comments should get italicized right away.

I found the above instructions on reddit (Italics in terminal vim and tmux), but I didn't have to follow all the steps listed there. My answer is the distilled version of instructions that worked for me.


How to install new system (with new applications) without removing /home

Since you have your /home on a separate partition you can install 11.04 without losing the data in /home without problems. Just make sure to use manual partitioning during installation, declare your existing partitions as / and /home, and make sure that / gets formatted but /home does not.

You should still make a backup though, anything else would be negligent.

Also, if you want to keep your documents but not necessarily your user settings (as you mentioned to have lots of 'trash' there) you can just create a new user after you installed the new system, and move your files there.


Setting up subdomains for ubuntu server 14.04?

You not need apache on server for subdomains. You need apache only for web. Enough is to create record on dns server, probably on godaddy.

ichat.example.io A xxx.xxx.xxx.xxx

type of record is A

xxx.xxx.xxx.xxx is ip of your server

When anybody will to go on your irc server practical will connect to xxx.xxx.xxx.xxx:irc_port.


I use rsync over ssh with chron to keep an up-to-date copy of my entire /home over the internet every couple of hours. It takes seconds and works flawlessly. If you take an hour to figure it out, you'll never have to think about it again.

To make it a little easier to manage, you can create a fill called firefox-settings-backup.sh somewhere with the rsync command line, and use Scheduled tasks from the repos as a simple cron management tool to run firefox-settings-backup.sh


First, the "AMD64" name refers to the AMD64 architecture, which was invented by AMD and later adopted by Intel. Most current Intel CPUs use the AMD64 architecture -- although of course Intel refuses to use that name. Other names for this architecture include x86-64, x64, and EM64T. In other words, the AMD64 version of Ubuntu is the right one to use for any mainstream 64-bit computer. (It'd be another story if you were using a computer with an ARM, Itanium, SPARC, or other CPU type.)

Second, I'm the maintainer of rEFInd, and I've received several reports from users of recent Macs to the effect that rEFInd doesn't work with them. It appears that Apple has done something strange with the video modes of these models, so rEFInd produces a blank display. Chances are the same is true of rEFIt and of GRUB (which Ubuntu uses by default). Unless/until I can get my hands on such a computer for debugging, or another developer does the same and submits a patch, the rEFInd problem won't go away. The same is probably true of other boot loaders. Given the fact that the problem exists in multiple boot loaders, and even in a very simple test program I created to help a user debug the problem, I'd say this qualifies as a bug in the firmware, although I'm sure Apple would dispute that claim and say they're using some new Apple-specific "standard."

My best suggestion for a workaround is to try using BIOS mode to install Linux. Use Apple's Boot Camp to prepare your disk, then hold down the Option key while starting the computer with the Ubuntu disc inserted to get Apple's own boot manager. You should be able to boot the Ubuntu installer (probably mis-identified as Windows) into BIOS mode and do an install. You'll then need to use gptsync or gdisk to re-create the hybrid MBR. If this is entirely successful, you should be able to use the Option key at boot time to choose between booting OS X and Linux. If/when the firmware/video problem is overcome, you should be able to install a fixed boot manager and begin booting in EFI mode via the updated boot manager.


There may or may not be a couple of ways of doing this.

First off you could use nautilus to navigate your iphone into the /iTunes_Control/Music/ folder. There you should find folders named Fxx. When inspecting these folders you should try to find files named lipgodxxxxxx as opposed to the iTunes synched files which should be named with 4 capital letters.

The lipgodxxxxxx files are the ones uploaded onto the phone via banshee.

Once you're at this step and you've asserted that this is indeed the case you can either browse all folders and remove them manually or use the following command:

find ~/.gvfs/XXXXX/iTunes_Control/Music -name "libgpod*" -exec rm -f {} \;

Where XXXXX is the device's name (as it shows in the nautilus sidebar)


Don't hold me to this but I think I may have solved your problem.  Please install the Ubuntu Synaptic Package Manager.  Then open it and in the search box type ATI RADEON.  You should see about 40 results, most of which are listed specifically by the version they are made for.  In your case trusty, and I see two of them and a bunch of generic drivers.  Installing all of them should hurt nothing in so much as I understand it, only those which can work should have any effect on your system.

Please note that as much as I have loved ati cards in the past, the ati radeon cards have an awful reputation of instability and dying so if you have difficulties with it, don't blame the drivers.  I can offer you some recommendations for better values in graphics cards, and one in particular which doesn't use a tiny fan to clog but instead a massive heat sink which you can drastically improve the efficiency of with a cheap $3 fan.


Why is compiling drivers for the Ralink RT3070 wireless chipset failing?

You are using a very old version of the driver, hence the errors.

The latest is 2.5:

2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO

Get it from http://www.ralinktech.com/en/04_support/license.php?sn=5016 . It builds successfully.


Open Teminal and apply updates for current version

sudo apt-get update
sudo apt-get dist-upgrade

Now do the Ubuntu upgrade

sudo do-release-upgrade


I can't restart the apace2 if I open the SSL port 443 in file of `/etc/apache2/ports.conf ` in ubuntu 18.04LTS

I've conducted a small investigation - yes there is a different behaviour between Apache2's versions that come with Ubuntu 16.04 and Ubuntu 18.04.

16.04 comes with Apache/2.4.18 and there is no matter how many times you will repeat identical Listen directives - I've tested that on a virtual machine.
18.04 comes with Apache/2.4.29 and in the current Apache2.4 documentation is written:

  Error condition

  Multiple Listen directives for the same ip address and port will result in an Address already in use error message.

In your case the directive Listen 443 appears twice within the Apache's configuration, so according to these new rules it is normal to receive the above error.

By default, within ports.conf, the directive Listen 443 is enclosed with <IfModule> tags, as follow:

Listen 80

<IfModule ssl_module>
        Listen 443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 443
</IfModule>

That means it will be active only when mod_ssl (or mod_gnutls) is enabled. So, if you have enabled mod_ssl, you do not need to put any additional Listen 443.

You can investigate how many times and where the directive Listen 443 appears in your configuration by the command:

grep -rni 'listen 443' /etc/apache2/

You can check which Apache's modules are enabled by the command(s):

sudo apachectl -M
sudo apachectl -M | grep 'ssl\|tls'

You can check whether any service listen to port 443 and which is it by the commands:

sudo lsof -i -n -P | grep ':443'
sudo netstat -peanut | grep ':443'

Further reading: How to secure Apache with Let's Encrypt.


You can install this driver from another branch of this github called rock.new_btcoex and use ant_sel=2 parameter.

Alternatively you can uninstall that  driver by running sudo make uninstall and install a driver from PPA

sudo add-apt-repository ppa:hanipouspilot/rtlwifi
sudo apt-get update
sudo apt-get install rtlwifi-new-dkms
sudo tee /etc/modprobe.d/rtl8723be.conf <<< "options rtl8723be ant_sel=2"

This problem happens with 1 antenna laptops. The driver does not detect to which slot the antenna is attached. So you are using the adapter without an antenna. The last command should fix it.

Older versions of this driver do not have this parameter. You can check if it is there or not by

modinfo rtl8723be | grep parm


Try to check your disk drive, it means that GRUB really can't read the file /boot/vmlinuz.... You can check the file by trying to copy it or the disk with badblocks command as suggested on http://www.linux.org.ru/forum/linux-hardware/7228767 (in Russian).


Try the following 3 commands as a work around for a known issue with the pepperflashplugin under Ubuntu 16.04:

sudo add-apt-repository ppa:jonathonf/pepperflashplugin-nonfree
sudo apt update
sudo apt install pepperflashplugin-nonfree

Details of the nature of this issue can be seen in the link in the references below...

References:

New Pepper Flash Installer for Chromium, Firefox


If you use Dropbox a lot, it may be used as your default Documents folder.

You can change _XDG_DOCUMENTS_DIR_ to point it to Dropbox:

Edit your ~/.config/user-dirs.dirs and change the line to:

XDG_DOCUMENTS_DIR="$HOME/Dropbox"

Restart your session, and check it:


How can I install the full version of Ubuntu on an external hard drive

Simplified Full Install of Ubuntu 20.04 to USB that Boots BIOS and UEFI Mode
Many computers today boot in UEFI mode while older computers boot in BIOS mode. It is possible to create a Full install USB device that boots Ubuntu in either BIOS or UEFI. You just need to start with a boot partition for each.

Download BIOS/UEFI Template: https://phillw.net/isos/linux-tools/uefi-n-bios/dd_grub-boot-template-for-uefi-n-bios.img.xz

Flash image to target USB using Win32DiskImager, Rufus, mkusb, balenaEtcher, etc.

It is recommended to unplug any internal drives especially when installing in UEFI mode. Creating while booted in BIOS mode saves a few steps.

Boot Live Installer USB, and insert Target USB.

Start install process, select: Language, Keyboard, Wireless, Updates and Something Else.

When the "Something Else" option opens select Target USB for Bootloader installation. This is important.

(Optional Data Partition), Select the empty space on the Target drive and click the plus sign to create a FAT32 partition with mount point "/Windows". Leave at least 6GB up to 100GB empty space for root partition.

Select the empty space on the Target drive and click the plus sign to create an ext4 partition with mount point "/".

Select Install now, confirm partition to be formatted, enter location, name and password.

When install is complete copy /boot/grub/grub.cfg from the root partition to overwrite /boot/grub/grub.cfg on boot,esp partition.

If the Target USB was created using Rufus/Etcher or in UEFI mode reinstall GRUB for BIOS boot:
sudo mount /dev/sdx3 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sdx

Thanks to Sudodus for the mkusb based BIOS/UEFI Template


The mpm_itk module can be installed by installing the libapache2-mpm-itk module with apt.

sudo apt-get install libapache2-mpm-itk
sudo a2enmod mpm_itk
sudo service apache2 restart

The last 2 commands enable the module and restart apache after you install it.


Why does archive manager extract files out of folders?

If you right click the archive and choose Extract here, you should get the behavior you want by default.

But perhaps you want to examine the contents first and are opening the archive with archive manager and then using the Extract button.

In that case, make sure that under Actions in the extract dialog the checkbox Keep directory structure is checked.


How to package a browser plugin and a gui app in a snap package

We don't currently offer a way for snaps to integrate with the the browser, I'm afraid.

This is probably going to happen at some point (at least in the sense you seem to want, i.e. hand particular URLs off to particular apps), but I couldn't hazard a guess as to when.


Where does GNOME 3 store panel orientation?

Settings for GNOME Panel are stored in dconf, now, and you can access them using dconf-editor under: /org/gnome/gnome-panel.

Stuff in dconf is stored in a binary format, which is why those options didn't show up in a search.

To run dconf-editor:

First install dconf-tools:

sudo apt-get install dconf-tools or click here (apt://dconf-tools).

Then run dconf-editor.

Screenshot:


Return key stops functioning correctly when switching to a new language

I had the similar problem and found a solution.

Open the language support and change the "Keyboard input method system" to "none".

It was "IBus" on my computer and when I changed it to "none" and reboot, the Enter key send messages as expected. same for Ctrl+w.

the IBus is used for languages that need multiple keystrokes (Japanese, Chinese (various) and Korean). see What do the 4 keyboard input method systems mean? for more details.


I've seen this happen when one gets two ACPI events that seem to confuse the suspend.  I've also seen this happen when somebody manually puts the machine into suspend via the menu and then closes the lid, as this creates two suspend events too.  Are you doing the latter? If so, just try closing the lid.


I believe you are referring to Canonical's ShipIt service. The service has been shut down since 2010. If you require Ubuntu, please download it for free from the website.


Impossible to boot Ubuntu after shut-down during system upgrade

It might be possible to recover Xubuntu, but I really don't recommend you to even try. Shutting down a system during a full upgrade can do nothing as well as it can break your system apart (which probably happened to you).

Backup everything you need from Xubuntu and install it again (preferably from a fresh 16.04 ISO).

It's always good to download a fresh copy every time you upgrade, since things like this can happen.


Why does Grub2 break EVERY time I update my laptop?

Sometimes when the system is updated, it configures grub again. As I could see, you use a RAID array. You have to reinstall grub in the MBR of your array. That done, I don't think you will keep having this problem. Try BootRepair:

http://www.webupd8.org/2011/06/boot-repair-fix-ubuntu-boot-issues.html


Mouse resolution changes when connecting second screen

I'm answering my own question after 2 mounths, i approached again the issue and i found a solution.

xinput --list --short outputs two drivers related to touchpad:

Atmel Atmel maXTouch Digitizer             id=11 and
ETPS/2 Elantech Touchpad                   id=14

The only one that changes when connecting the external monitor is the id=11.
Changing back its parameters using xinput set-prop 11 144 1 0 0 0 1 0 0 0 1 (144 is the Coordinate Transformation Matrix prop) didn't change the cursor behaviour, then i tried hacking with the other driver and succeeded:

xinput set-prop 14 144 .5 0 0 0 .5 0 0 0 1
xinput set-prop 14 273 25

this way i have been able to increment the cursor precision when moving slowly (through the Coordinate Transformation Matrix, prop 144) and keep an high acceleration when moving my fingers faster on the pad (Device Accel Velocity Scaling, prop 273).

I think this info may be useful for other full-HD owners too.


It does not seem there are many left-handed cursor themes. You have the following options:

comixcursors-lefthanded (ugly)

You have to install comixcursors-lefthanded  and gcursor  (gnome cursor theme managing software). Although gcursor doesn't seem to do install the theme for me it is useful to see what a cursor theme looks like.

The theme ComixCursors-LH-White-Small looks the most decent, so let's pick that one

Installation
First we need to add an extra line to the themes index.themes file. All themes are located in /usr/share/icons, and for the ComixCursors-LH-White-Small theme we need to do

sudo gedit /usr/share/icons/ComixCursors-LH-White-Small/index.theme

This file looks like this:

[Icon Theme]
Name = Comix Cursor LH White Small Bold
Comment = The left-handed Comix Cursors - White Small Bold
Example = default

Now we need to add the following line at the bottom (of course if you pick another theme, you should write the name of the other theme)

Inherits = ComixCursors-LH-White-Small

Now save and close the file.

On Ubuntu the utility update-alternatives manages the cursor themes, so we need to tell it about this new theme we want to use, execute

sudo update-alternatives --install /usr/share/icons/default/index.theme x-cursor-theme /usr/share/icons/ComixCursors-LH-White-Small/index.theme 91
sudo update-alternatives --set x-cursor-theme /usr/share/icons/ComixCursors-LH-White-Small/index.theme

Now if you log out and log in again, you should have your new cursors.

Note:
You can use

sudo update-alternatives --config x-cursor-theme

to change between the installed cursor themes.

Modifying the default (DMZ-White) theme (beautiful)

The above approach works but the cursors are ugly, however you can also modify the default theme. The cursors that you use most are the normal pointer and the hand (which appears if you hover over a link):

which are /usr/share/icons/DMZ-White/cursors/left_ptr and /usr/share/icons/DMZ-White/cursors/hand2.

The DMZ-White theme also provides a pointer that points to the right, and I made my own mirrored hand using gimp  (see note at the end):

The pointer is /usr/share/icons/DMZ-White/cursors/right_ptr, and mirrored hand is called hand3 and I made it available on mediafire (if you follow the instructions below, you will download it automatically to the correct directory).

Now we need to replace these cursors. First go to the DMZ-White cursor directory

cd /usr/share/icons/DMZ-White/cursors/

Then download the hand3 cursor

sudo wget http://www.mediafire.com/download/v45c56ewol1k140/hand3

Now backup the original left_ptr and hand2 files

sudo mv left_ptr left_ptr_orig
sudo mv hand2 hand2_orig

Now let the new left_ptr and hand2 point to the right_ptr and hand3 files

sudo ln -s right_ptr left_ptr
sudo ln -s hand3 hand2

Now if you log out and log in again, you should have your new (beautiful) cursors.

Note: Editing cursor files using gimp
You can edit cursor files (and make your own cursor theme :) ) using gimp  which is a free alternative to Photoshop. If you want to save your file choose Export to and then pick X11 Mouse Cursor. This will save your file with the .xmc extension, but you can simply remove the extension.


The time specification

5 * * * *

runs once per hour, at 5 minutes past the hour. To run every five minutes, you would need

*/5 * * * *


You can use "alternatives" to switch between different java versions:

sudo update-alternatives --config java

And also for the java compiler (javac) if you are compiling some java code:

sudo update-alternatives --config javac

If you installed Java 8 from apt openjdk:

sudo apt install openjdk-8-jdk

Then your java home must be: /usr/lib/jvm/java-8-openjdk-amd64

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

If java 8 is not visible in update-alternatives you can install it with:

update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-8-openjdk-amd64/bin/java 1000

Then check it's there with:

update-alternatives --list java


This may be the slow keys feature.
It is toggled on and off by holding down the shift key for 8 seconds.
Press the Shift key for 8 seconds and see if the problem goes away.


How do I fix an Input/Output error using dd?

You said it yourself: your disk is broken. You can try ddrescue, it may be able to work around the broken path. Beware though, that you will lose data.

Restoring from backup will be easier :)

The correct usage of ddrescue is as follows:

sudo apt-get install gddrescue
sudo ddrescue /dev/sdc1 /dev/sda1

or if you want to pipe stdout to the progess monitoring tool:

sudo ddrescue /dev/sdc1 /dev/sda1 | pv


wherei need to create /.config/winapps/winapps.conf

where i need to create /.config/winapps/winapps.conf

You are missing a vital character: the ~.

Step 3: Creating your WinApps configuration file
You will need to create a ~/.config/winapps/winapps.conf configuration file with the following information in it:

The ~ automatically translates to your users home directory (so is equal to /home/$USER/). We use a ~ because we all have different user names and this makes it usable for all.


Bluetooth 0930:021c not working in Ubuntu 15.04

This adapter [0930:021c] is not supported by Linux kernel yet.

The Bug Link

I fixed it and added to ppa. The module can be installed by

sudo add-apt-repository ppa:hanipouspilot/bluetooth
sudo apt-get update
sudo apt-get install btusb-lp1502781-dkms

The bluetooth adapter should work after reboot.

The modules built are for Ubuntu 14.04.3 with kernel 3.19, Ubuntu 15.04 and Ubuntu 15.10.


kubuntu shutdown/restart /closing wallpaper vanishing

Ok, sorry for my English,
when I Click on "K" menu with gear, and I choose exit option, and after in the exit menu I click on reboot or shutdown, usually it appears the desktop with wallpaper, icons and so on, with on top in the middle of the screen a gray strip with reboot/shutdown icon a message about reboot or shutdown, the countdown and two buttons... cancel or reboot/shutdown, is it clear till now?.

On my linux box, it doesn't happens, the wallpaper and icons disapper, it's all white with the usual grey strip described before.

When I click ok to reboot/shutdown,the screen is all white until it starts boot splash with black  screen and kubuntu in the middle and it shutdown or reboot.

It doesn't happens when I log on or when I suspesnd or I disconnect., only with reboot and shutdown

I tryed, to delete and re-install all kde, maybe some conf file is broken (but I amnot an expert)

ctrl+alt+f1
log in as root
systemctl stop sddm
apt-get purge kubuntu desktop
apt-get purge kde
apt-get purge  kde

apt-get autoremove
apt-get clean
apt-get install kubuntu-desktkop

reboot

nothing changed... it is all equals as before


Help with grub comand screen now gone off

Regardless of version I've been able to successfully recover from this problem (I managed to duplicate it today) using the Super Grub2 disk available here.

By booting the live media and choosing Everything from the menu then choosing the newest kernel and booting into the previously unbootable system then reinstalling and updating grub.

sudo grub-install /dev/sda To install grub2 to the MBR (changing sda if necessary to the drive you intend to boot from)

and then

sudo update-grub To update the menu

Finally insure the drive you intend to boot from is first in your BIOS boot order.

There was a Legacy Grub boot disk available, but it's outdated and no longer being developed.

Sources: Current experience, http://www.supergrubdisk.org/super-grub-disk/ and How can I reinstall GRUB Bootloader on MBR after installing Kubuntu?


To close laptop lid without doing anything

To have the lid closed without doing anything:

Have someone else close the lid for you.
execute the following commands:

gsettings set org.gnome.settings-daemon.plugins.xrandr default-monitors-setup 'follow-lid'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-battery-action 'nothing'

Now when that other person closes the lid for you, Ubuntu will not do anything neither!

;-)


Problem with package installation - linux-image-server

So, I force removed all of the related packages, rebooted and then apt-get -f install was happy. What I did was:

dpkg --remove --force-remove-reinstreq linux-headers-server
dpkg --remove --force-remove-reinstreq linux-image-server
dpkg --remove --force-remove-reinstreq linux-headers-3.2.0-56-generic
dpkg --remove --force-remove-reinstreq linux-headers-3.2.0-56
dpkg --remove --force-remove-reinstreq linux-server

and then

apt-get -f install

And that fixed it. To get a list of all packages I used dpkg --get-selections. There is a very useful post for cleaning previous versions here.


Sending a 'built' application to your environment is actually a fairly common technique especially for those using tools like docker.

Typically you'll want to create a charm for each component in your environment. In this case it looks like you would have 'proxy' and 'application'.

So you would create a proxy charm which has, in addition to the install and start hooks, a relation-joined and relation-broken hook scripts. These scripts will modify the proxy settings when a relation is joined to add the new application location and subsequently remove an application location on broken. This will allow you to keep the proxy up and running and swap out application servers at will.

The application service will have similar hook scripts to send its location to the proxy service. It will also need a charm configuration option for the location of the application zip file to which it needs to deploy. When the applications install hook is run it will then pull down the zip file at the location supplied extract and then run it in the start hook.

The continuous deployment is where Juju really shines. First you're going to need a bootstrapped environment juju bootstrap <your-env-name> and juju switch <your-env-name>.

Your Jenkins instance will build your proxy zip and application zip file and then upload them to a place where your servers can access. If you're on EC2 this would likely be on S3. It would then take note of the location paths and build number, and service names of the currently running proxy and application services.

It will then run:

juju deploy your-proxy your-proxy-<build-number>
juju deploy your-application your-application-<build-number>
juju add-unit your-application-<build-number> -n 2

At this point you'd likely want something on an interval checking periodically to see when your proxy and application services are up and running. At which point you will want to connect the new application service to the proxy, switch traffic to your new proxy and tear down the old services.

juju add-relation your-proxy-<build-number> your-application-<build-number>
# add code here to switch to new proxy
juju destroy your-proxy-<old-build-number>
juju destroy your-application-<old-build-number>

This assumes that you will be rebuilding your proxy every time your application changes. If not then simply remove the proxy steps from the above commands. This also assumes that the applications take time to start and you wouldn't want to incur that downtime so a simple upgrade-charm hook wouldn't work.


WebUpd8 do try their best to adapt most important Gnome-Shell extensions for Ubuntu, and have already put three of MGSE extensions in their repository. Unfortunately, the one you want is not there yet.

So, you may want to get it from their GitHub branch.

1) Install git:

sudo apt-get git

2) Create a folder where you want to put all Git repositories

3) cd to that folder and use git to create a clone:

git clone https://github.com/linuxmint/MGSE.git

Later to update use

git pull

4) When everything is done, it will create a separate folder MGSE. So, cd to that folder. You will see a bunch of folders containing an extension each. There is a file called test to install all of them at once, and there is also one file test in each folder to install one particular extension. Run either one depending on what you want.

I do not recommend installing all their extensions at once. To avoid conflicts in your system and keep it stable, install only those not available, or at least, not installed through other repositories such as WebUpd8 Gnome3 PPA.


Use the following to configure -

sudo dpkg -a --configure

hope it will work.


GRUB 2 - Avoid unrestricted boot options are overwritten with kernel updates

You have to edit the scripts that generate /boot/grub/grub.cfg, not that file itself.

For the Ubuntu entry, check out /etc/grub.d/10_linux and search for the lines that output menuentry. The relevant part on my system looks like this:

      echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  else
      echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
  fi

I think the first of those (with echo "$title") should be used for all "Advanced options" whereas the second line (with echo "$os") seems to be responsible for the "normal" Ubuntu entry.

You can insert additional options in here, so that the correct menuentry line gets printed as you want it to appear in the grub.cfg file.

Don't forget to run sudo update-grub afterwards to regenerate the config from your changed scripts.

Other related posts:

How to set up GRUB2 password in an easy way?
Seeking for a better solution to restrict access in GRUB2 menu


Why does WordPress keep telling me that it needs to access my web server?

You have to add a direct update method to your wp-config.php file.

Edit wp-config.php, and add the line define('FS_METHOD','direct'); somewhere between <?php and ?>, for instance like this:

define('FS_METHOD','direct');

// Get everything else
require_once(ABSPATH.'wp-settings.php');
?>

This, combined with the permissions you have set will allow Wordpress to Update directly, without going trough FTP.

I tested this just now, and it appears to work. The directory has to be writeable for the www-data-user that's running Wordpress.

Source: https://www.hongkiat.com/blog/update-wordpress-without-ftp/


Ubuntu 17.10 on Razer Blade GeForce GTX 1060 logs out automatically every 5 seconds but only after I close and reopen the laptop lid

I've encountered the exact same problem about a month ago right after installing Linux Mint, I switched to Ubuntu 17.10, then 16.04 and then I realized it was a problem inherent to the Razer Blade: when closing the lid to suspend after booting up and re-openning it, the laptop just loops into sleep cycles.

To solve it:

Solution from the Ubuntu Community  (Not tested by me, yet works great):

Edit /etc/default/grub
Add button.lid_init_state=open to your GRUB options as follow: GRUB_CMDLINE_LINUX_DEFAULT="quiet splash button.lid_init_state=open"
Be sure to update the grub afterward:
Run sudo update-grub
Reboot and pray

Alternative method from the Ubuntu forum (a bit more hacky):

In /etc/systemd/logind.conf change #HandleLidSwitch=suspend to HandleLidSwitch=ignore
In /etc/acpi/events/ create a file called laptop-lid-close and put this in it:

event=button/lid
action=/etc/acpi/lidclose.sh

Then create another file in /etc/acpi/ called lidclose.sh and put this in it:

#!/bin/sh
/usr/sbin/pm-suspend

Be sure that you can run sudo pm-suspend on your distro before attempting this. I know this works very well on Ubuntu 16.04 but it may not work on 17.10. Also I noticed that when I close the lid the razer logo doesn't dim so I have to half open it and about a second after close it back and then the logo dims. But as long as the suspend problem is solved, it's okay for me :)
Reboot before testing, just in case.

Sources:

https://ubuntuforums.org/showthread.php?t=2184159
https://ubuntuforums.org/showthread.php?t=1652574&p=10283728#post10283728
https://help.ubuntu.com/community/RazerBlade


The problem turned out to be missing relevant entries in the /etc/nsswitch configuration file.

While resolving hostnames to IP address, the GNU C library libc uses this file to get the sources and the order in which will be queried. The database name of /etc/nsswitch.conf involved here is hosts. There are also many other databases understood by libc e.g. passwd, protocols etc.

The databases are mentioned at the start of the line followed by the name of the sources to be queried. For example the required configuration for hosts database (used for finding IP address of a host) can take the form :

hosts:          files mdns4 dns

files indicates that at first the relevant configuration files in /etc directory to be queried first, hence /etc/hosts is queried first
Then mDNS (Multi-cast DNS) is used up to check if the IP can be retrieved
Then DNS i.e. the name servers are queried for the IP address.

As your /etc/nsswitch configuration file does not contain anything, i would suggest you to put the default entries to the file :

passwd:         compat
group:          compat
shadow:         compat

hosts: files mdns4 mdns4_minimal [NOTFOUND=return] dns

networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

Check man 5 nsswitch.conf to get more idea.


Keyboard shortcut to toggle auto-hide unity launcher

If you want to do it Pythonic way.

#!/bin/python
import subprocess
AUTOHIDE = subprocess.check_output (["/usr/bin/dconf", "read", "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode"])
if (AUTOHIDE==1):
   subprocess.call (["/usr/bin/dconf", "write", "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode", "0"])
else:
   subprocess.call (["/usr/bin/dconf", "write", "/org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode", "1"])

you have to execute the programs by creating a subprocess.

And this is the bash script version

#!/bin/bash
AUTOHIDE=$(dconf read /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode)
if [[ $AUTOHIDE -eq 1 ]]
then
   dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 0
else
   dconf write /org/compiz/profiles/unity/plugins/unityshell/launcher-hide-mode 1
fi

The shortcut can be assigned like this.


Error reinstalling isc-dhcp-server "post installation script returned error exit status 255"

Wow... worked for me. Thanks! I hosted my server trying to edit permissions and stuff. I was trying to clean up old leases and everything was write protected.  Uninstalled and reinstalled it and nothing was working properly. This allowed me to reinstall it and tell it to overwrite or recreate the configuration files that were missing.

sudo rm /var/lib/dpkg/info/isc-dhcp-server

sudo apt install isc-dhcp-server


making connections in JACK on the command line

Bash's Tab-completion is a helpful feature when trying to find available commands, so in this case:

~$ jackTab
jack_alias                  jack_multiple_metro
jack_bufsize                jack_net_master
jack_capture                jack_net_slave
jack_capture_gui            jack_netsource
jack_connect                jack-osc
jack_control                jack-play
jack_cpu                    jack-plumbing
jack_cpu_load               jack-rack
jackd                       jack_rec
jackdbus                    jack-record
jack_disconnect             jack_samplerate
jack-dl                     jack-scope
jack-dssi-host              jack_server_control
jack_evmon                  jack_session_notify
jack_freewheel              jack_showtime
jack_iodelay                jack_simdtests
jack-keyboard               jack_simple_client
jack_latent_client          jack_simple_session_client
jack_load                   jack_test
jack_lsp                    jack_thru
jack_metro                  jack_transport
jack_midi_dump              jack-transport
jack_midi_latency_test      jack-udp
jack_midiseq                jack_unload
jack_midisine               jack_wait
jack_monitor_client         jack_zombie

jack_connect and jack_disconnect sound promising, let's take a look at man jack_connect:

NAME
       jack_connect,  jack_disconnect  - JACK toolkit clients for connecting &
       disconnecting ports

SYNOPSIS
        jack_connect [ -s | --server servername ] [-h | --help ] port1 port2
        jack_disconnect [ -s | --server servername ]  [-h  |  --help  ]  port1
       port2

DESCRIPTION
       jack_connect  connects the two named ports. jack_disconnect disconnects
       the two named ports.

We need to know the port-names, the jack_lsp-command will deliver the existing ports and connections, take a look at man jack_lsp. I started the jackd-server with pulseaudio and MIDI routed to jackd, here the output from jack_lsp -c:

~$ jack_lsp -c
system:capture_1
   PulseIn:front-left
system:capture_2
   PulseIn:front-right
system:playback_1
   PulseOut:front-left
system:playback_2
   PulseOut:front-right
PulseOut:front-left
   system:playback_1
PulseOut:front-right
   system:playback_2
PulseIn:front-left
   system:capture_1
PulseIn:front-right
   system:capture_2
a2j:Midi Through [14] (capture): Midi Through Port-0
a2j:Midi Through [14] (playback): Midi Through Port-0

Example commands:

~$ jack_disconnect PulseOut:front-left system:playback_1
~$ jack_connect PulseOut:front-left system:playback_1

With these commands I could successfully disconnect and reconnect this connection
observing the connection dis- and reappearing in Carla which was running in the background while issuing the commands.


UBUNTU/PHP: Can not connect to sql server 2008

Finally we found out the reason: The problem was that on migration the file containing our DNS-SERVERS was overwritten by Wmvare. Meaning that even though the servers were duplicates the IP for our DNS-servers was changed..

We had no reason to suspect this as it should have been full copy of functioning server


I believe that you refer to /usr/share/sounds/ubuntu/stereo/system-ready.ogg. Remove that file, and the drums shouldn't bother you again, at least, at the login screen.

As for Firefox, you could try disabling sound effects under Sound Preferences.

PS: You should have probably mentioned the version of Ubuntu you use.


cabal install readline ask readline not found error

sudo apt-get install libreadline-dev

should do it.

It looks like you may also want

sudo apt-get install libncurses5-dev


Unfortunately, Facebook does not support video calling on Ubuntu yet, as explained on the Facebook Help Center. They haven't developed their plugin yet.

However, video calling (popularly known as Hangouts) works on Google+, for example (after installing a plugin). If you are curious in upcoming technologies, you also can take a look at WebRTC.


Error installing MySQL Ubuntu 12.04, dependency?

I found a similar problem (with solution) here:

Check the mysqllogs and syslogs for errors.


avoiding losing precision with nawk option

Use printf for finer control over the output:

$ echo 4053.45677771 | nawk '{printf "%f\n",$1*1000}'
4053456.777710

So, for your example:

nawk -F, '{printf "%f\n",$1*1000}' data > data_2

You can also stick to print if you set the OFMT variable (POSIX.1-2008 supports it):

$ echo 4053.45677771 | nawk -vOFMT='%f' '{print $1*1000}'
4053456.777710


How to check serial number of NVMe disk?

The nvme tool provides options to obtain NVME device information, for example, to install the tool, list the NVME devices and look at the id control fields on /dev/nvme0n1, one would use:

sudo apt-get install nvme-cli
sudo nvme list
sudo nvme id-ctrl /dev/nvme0n1


How to patch libgphoto2 for preview pictures in Shotwell while importing?

If you click on the "Patch" link you can then save the patch as a .diff file and apply it against trunk.

You can get a copy of gphoto's working trunk with

svn co https://gphoto.svn.sourceforge.net/svnroot/gphoto gphoto

Applying the patch is something akin to this command:

patch -p1 < gphoto.diff

(Note: I haven't actually tried this, but I believe it will work.)


You're asking multiple questions, each of which should be their own separate questions, but I'll answer them both here, anyways.

(1) (BACKUP ANY DATA YOU WANT TO KEEP BEFORE DOING THIS!) To change the Operating System, the VPS provider should be able to do that.  If there's not an automated "Reinstall Operating System" option in the VPS control panel pages for your provider, file a support ticket with your VPS provider.  If they tell you that you cannot switch operating systems, or that they do not have Ubuntu VPSes, then you won't be able to switch to Ubuntu (but most VPS providers have Ubuntu images)

(2) Once the VPS is set up with whatever OS, you should SSH in by specifying the IP address for your server, then it'll connect and prompt you for the username and password.  Provide those, and once you're logged in, do sudo useradd --create-home --user-group --shell /bin/bash USERNAME where USERNAME is the login name for the user you're creating, because the default user you login to will either be root or a user with sudo access


MonoDevelop reports Build Successful but there is no exe file

I just stumbled upon this too. Clean, Build, Rebuild all report successful, but nothing really happens.

To fix this, you must install package mono-devel, which is also in the recommends tag

  Recommends: libglade2.0-cil-dev, libgtk2.0-cil-dev, mono-devel

Maybe you installed monodevelop with option --no-install-recommends, or have APT::Install-Recommends "false"; somewhere in your apt.conf(.d), as I do.

See also How to not install recommended and suggested packages? about recommended packages and no-install-recommends.


$history

and it will show the history

 1999  exit
 2000  cd /opt
 2001  sudo apt-get install p7zip-full
 2002  sudo apt-get install p7zip-rar
 2003  mkdir CS-RT-code
 2004  cd CS-RT-code/
 2005  ls -lrt
 2006  history

$ !<history #> to execute the previous history command


First Time To Run C++ Program on Ubuntu 14.04

First you need to compile and link your program. Assuming the source code is saved in a file yourprog.cpp, you can do that using the GNU C++ compiler g++, for example

g++ -Wall -o yourprog yourprog.cpp

The resulting executable will be called yourprog and you can then run it using

./yourprog


How to install programs compressed on linux

First you need to know that gz and tar extensions are compressed file extensions. The most used formats (also rar and zip).

To install Eclipse you need to do the following steps:

tar -zxvf eclipse-jee-oxygen-1a-linux-gtk.tar.gz
Then you should execute the installation file. (as seen in the picture below)

You may also need to make the file executable. You can do a right click on the exec file and select "Properties" and then "Permissions" and check "Allow executing file as program"

Another way is using the command line:

chmod +x file.ext

I hope you can install it correctly!

To execute Eclipse you can do it in two ways

a) Clicking on the executable file

b) Run from command line, go to path of installation and run:

./eclipse


Print Screen key doesn't work if a drop-down menu is active

and what about shutter it will work without a problem, but you need to rebind the print key to shutter

Rebinding the print key:
- open compiz
- go to gnome compatibility

- switch to commands tap and in the Screenshot command line Write shutter -f -d 3
this will take a screen-shot after 3 seconds and you can take a screen-shot for you menus or simple ignore the 3 seconds delay and it will also work by this command shutter -f

 Now you can take a screen-shot to any menu you want, for more options see this.


How to set the package selection  status to the current status?

Try this command to change package status -

echo "<package-name> <status>" | sudo dpkg --set-selections

Say you have set status of package zip to deinstall. To rollback to original status install run this command-

echo "zip install" | sudo dpkg --set-selections

To change more packages at once use this command

dpkg --get-selections | sed -n 's/\<<current-status>$/<status>/p' | sudo dpkg --set-selections

for example, to change all packages with status deinstall to install use -

dpkg --get-selections | sed -n 's/\<deinstall$/install/p' | sudo dpkg --set-selections


Starting Ubuntu after first installation

If you absolutely need real root access and you don't know the password, try running in a shell

sudo su

It will ask for your password. This will be the password you use to log into the computer for your regular user. After you put your password in, type

passwd

This will ask for a new Unix password, and voila! You have changed (and now know) the root password!


To update existing Color profiles

Insert the USB stick (hopefully FAT32)
In the top right corner of the screen, click the "gears" icon
Choose the 3rd menu item: "system settings"
Click "Device Colour profiles" (looks like a colourful flower)
Click "add profile"
Choose "other profile"
Change in the lower right corner "Supported ICC profiles" to "All files" (icm = International Colour Microsoft)
Choose the USB stick from "devices" and navigate to the file and click "import"
Done

To have more advanced color management

sudo apt-get install gnome-color-manager

This will install the full gnome color manager that will allow you to add your own hardware calibration, ...


Your graphics driver is not installed. You need to re-install it properly.
Run in terminal:

sudo apt-get purge bumblebee
sudo apt-get install --reinstall nvidia-346 nvidia-prime

If there are any errors, post them to your question.


Replace gnome-screenshot save option with shutter edit screen or atleast shutter main screen in ubuntu 14.10?

I tried it my self.... Here are the steps..

Disable gnome printscreen shotcuts .. (All Settings--->Keyboard---->Screenshots)

Next create shortcuts as preferred (All Settings--->Keyboard---->Custom shortcuts )

Shutter -f

And assign  printscreen key. ( See more for how to assign a custom key ) How to add keyboard shortcuts?

And next shortcut for shutter -a

And assign alt key and printscreen ( See more for how to assign a custom key ) How to add keyboard shortcuts?

Then open shutter and go to menu (Edit--->preference--->main)
Select Do not save file automatically

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

At this point you have achieve main screen by pressing printscreen button or Alt + printscreen button..
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

To open edit windows, instead of main screen, when ressing printscreen button or Alt + printscreen button, go to Actions in preference and select open with Built-in Editor

And make sure other settings remain as below in behavior section,

Done!!


18.04 audio (Realtek ALC3254) fails on new Dell G3 15 3590

Im using Ubuntu 18.04 Dell G3 3590 i7 series
I just follow the instruction here and fixes my problem
Edit /etc/default/grub
sudo vi /etc/default/grub

Find the line starting with GRUB_CMDLINE_LINUX_DEFAULT and append snd_hda_intel.dmic_detect=0 to its end. For example:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"

Update grub configuration
sudo update-grub

Reboot
https://askubuntu.com/questions/1218058/ubuntu-19-10-audio-driver-issue/1238287#1238287


Installing VirtualBox guest additions usually fixes this problem.

To do so:

With the virtual machine running, press HOSTKEY + D By Default your host key is usually the right control key.

After a moment a windows should pop up asking you to run software, click the Run button.

VirtualBox guest additions should install, you will probably need to enter your Ubuntu password somewhere along the automated process.

You may need to restart your Virtual Machine for changes to take effect.

Good luck!


I have the same laptop and was going to write a script using something like below. However I upgraded to 16.10 daily and seems to work now.

But I was going to do something like

while true; do cat /proc/acpi/button/lid/LID0/state ; sleep 3; done

and grep for "open" or "closed".

then have that run

echo "password" | sudo -S xinput set-int-prop 12 "Device Enabled" 8 1

or you can run pm-hibernate

When I break down and do it I will post it unless someone out there want to slap something together.

Check out this link it might help

HP Spectre x360 Disable Touchpad in Tablet Mode - Ubuntu 15.10


How to exclude some processes while using ps command

Just insert the condition $2 !~ /^(awk|sh|ps)$/:

ps -eo pid,comm,user,%mem,%cpu | awk '$2 !~ /^(awk|sh|ps)$/ {$4=<Variablehere>*$4/100;}{print;}'

It means "if $2 does not match start-of-string, followed by either awk, sh, or ps, followed by end-of-string" then ...


Install Ubuntu on Toshiba Portege Z20T-C-12J alongside Windows

There were no problems during install. Just install Ubuntu on a USB device with Unetbootin or Rufus (Unetbootin can keep the existing data on your USB device and just add the install-image as extra folders).

But these are the optimizations I did after install:

Optimization for installation of Ubuntu On toshiba portege z20t-c-12j

base install of missing applications

echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections
SYSTEMLANG=de
apt install unp audacious gimp gimp-help-de pidgin pidgin-otr haveged language-pack-$SYSTEMLANG language-pack-$SYSTEMLANG-base firefox-locale-de hunspell-$SYSTEMLANG-$SYSTEMLANG libreoffice-l10n-$SYSTEMLANG thunderbird-locale-$SYSTEMLANG inkscape fail2ban ncdu ccze dfc screen tmux sshfs keepass2 workrave dolphin chromium-browser krusader krename kompare kate p7zip audacity ttf-mscorefonts-installer ubuntu-restricted-extras etckeeper xfce4-goodies redshift meld htop atop fonts-ubuntu-font-family-console gnupg2 picard w3m curl wine make gcc g++ unzip gawk bzip2 yakuake onboard neovim tree psensor hardinfo kdiff3

Get rid of Lenses

apt remove unity-scope-chromiumbookmarks unity-scope-colourlovers unity-scope-devhelp unity-scope-firefoxbookmarks unity-scope-manpages unity-scope-openclipart unity-scope-texdoc unity-scope-tomboy unity-scope-video-remote unity-scope-virtualbox unity-scope-yelp unity-scope-zotero unity-lens-music unity-lens-photos unity-lens-video

backgroundimages

https://askubuntu.com/a/1145869/34298

Keyboard-layout

Configure Caps Lock as AltGr and Arrows like in vim

fix nodejs

snap install --classic --edge node
sudo ln -s /snap/bin/npm /usr/bin/npm
snap install atom --classic

fix scrolling in Firefox

https://askubuntu.com/a/994483

in case you use KDE or Kubuntu

Plasmashell High CPU Load Fix - Plasma 5.15 KDE on Kubuntu 19.04

fix default app okular:

https://www.ryananddebi.com/2014/09/29/linux-fixing-pdfs-opening-in-gimp-in-firefoxzotero/


WebSQL and other databases not working with HTML5 apps

QtWebkit supports WebSQL and IndexedDB: The following code samples return true:

var websqlAvailable = typeof window.openDatabase != 'undefined';
var indexeddbAvailable = typeof window.indexedDB  != 'undefined';

As a side notice, only an older version of indexeddb is available in QtWebkit.

More information on using Web SQL, IndexedDB and Web Storage in Ubuntu Touch can be found here: http://daniel-beck.org/ubuntu-html5-platform-storage/


Frequent grub rescue error: unknown filesystem

may be one of the harddisk got some bad sectors, try to run them separately , if it always happens with the secondary hdd where ubuntu resides may be the hdd has gone bad.
if you don't think the hdd is bad , give more details about parttions on both the disks and also the type of boot efi or normal.

you can attach a screenshot of gparted or disk utility for both the disks.


Genymotion Android 6.0 API 23 Problem on Ubuntu 16.04

First make sure you have the latest version of VirtualBox installed - in case not - install it this way :

Download and register the ORACLE public key.

wget -q -O - https://www.virtualbox.org/download/oracle_vbox.asc | sudo apt-key add -

Add the VirtualBox repository to the sources.

sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian xenial contrib"

Update the software repositories :

sudo apt-get update

Install VirtualBox 5.0 :

sudo apt-get install virtualbox-5.0

Now the main part :

Download ARM Translation Installer v1.1 (mirror1).
Drag and drop the file into your device.

Reboot the virtual device.
Download the correct version of Google Apps for Android :

Google Apps for Android 6.0
Google Apps for Android 5.1
Google Apps for Android 5.0
Google Apps for Android 4.4.4
Google Apps for Android 4.3
Google Apps for Android 4.2
Google Apps for Android 4.1
Google Apps for Android 2.3.7

Drag and drop the correct gapps (gaaps-*.zip) file to the virtual device.

(Be patient during the file transfers.)

Restart the device again.

You should see all Google Services, sign in with your Google ID and now you can use Google Play.


As root, issue the following commands:

dpkg -l | grep linux-image

Find the kernel image you want to remove, which should be linux-image-3.8.0-27-generic (be sure it is).

Then

apt-get remove linux-image-3.8.0-27-generic

I don't think a GRUB update is needed, it should just disappear from the GRUB menu. If you get any errors with GRUB just issue, also as root, update-grub.


After adding to the path in /etc/environment, you'll need to log out of your user session and back in. After that, it should pick up the new path.


Problem accessing web based email with Firefox

You can try to reconfigure firefox

sudo dpkg-reconfigure firefox

Also I would check the proxy server settings of firefox. Maybe you can as well try firefox from another user account as the firefox in there might have another configuration.


Mousepad edge scrolling disabled in Ubuntu 18.04

It seems you didn't install whole packages, or packages are not up-to-date

install the following package:

apt update
apt install xserver-xorg-input-libinput

Or install and upgrade whole ubuntu packages this way

open a terminal and type

apt update
apt install ubuntu-desktop

if nothing happened generate new /etc/apt/sources.list from this link and repeat steps above

If still you have the problem mayble you need a full upgrade:

apt update
apt full-upgrade

after package steps you can enable it, this way:

Settings > Mouse & Touchpad > "Uncheck" Two finger scroll

Settings screenshot:

OR:

Settings > Devices > Mouse & Touchpad > Edge Scrolling

This is also accessible via DConf Editor as well. Go to org.gnome.settings-daemon.peripherals.touchpad and set:

 scroll-method: edge-scrolling


Ubuntu not allowing me to log in after upgrade from 10.04 to 12.04

This solution originally by actionparsnip worked for me:

Press CTRL+ALT+F1

Log in with you user name and password

Run the following command: sudo chown -R $USER:$USER $HOME

Press CTRL+ALT+F7
Try to log in


Have successfully used our Toshiba estudio 280 copier(different model from yours) as a printer.   Ubuntu 14.10 recognized and autoconfigured easily via ethernet. In System Settings, chose Printer then Ubuntu took care of the rest.


How to clone Ubuntu server via .iso for bootable usb?

I always use clonezilla. It is best to make copies as well as to clone.
You simply download the .iso from clonezilla on a usb and you need a hard disk connected by usb to the computer or another usb to make the copy. The size will depend on how much information you have on your device.


You can use if. Also, to grep for a command, but to exclude the grep itself, you can use the following trick:

if ps x | grep '[s]omething' ; then
    echo Running.
else
    echo Not running.
fi


linux machine not visible to pc or macs at home

First of all you should check if you can connect to your own LAN. If you can't connect to your LAN you should check the media in use and if your system needs additional drivers.

Moreover you should check if your Ubuntu system has received an IP address, a gateway address and a DNS server address. You can check this using either a graphical tool or by using the ifconfig  command in a terminal.


Check DocumentRoot in

/etc/apache2/sites-available/000-default.conf

and

/etc/apache2/sites-available/default-ssl.conf


I remember following this guide from Psychocats when I first started out on Ubuntu nervously. It covers everything you need with helpful screenshots. There appears to be an updated guide here.

As usual, the normal caveats apply. Backup your data before attempting any OS installation.


Is it possible to use my real graphic card on a virtual machine?

As far as I know, VMWare Workstation has the ability of 3D on VMs, it does not exactly lets the guest system use the card, but does some kind of mapping of the requests of the guest to OpenGL requests on the host (at least in the last time I checked).
It has limited 3D ability though.


Try OpenOffice/LibreOffice Draw. It is installed by default, in the Graphics menu.


Why does it take twenty seconds for my microphone to start working in Skype if I pause Clementine?

Clementine eventually proved innocent.

I found that turning off the skype wifi setting in skype's advanced settings does the trick. I've no idea why this works but a patient friend called me repeatedly so I was able to confirm that it was causing the problem.


I resolved the problem based in this post, but I downloaded the proxy configuration file.

I used a Windows, which connection is working, then I access the URL http://wpad/wpad.dat to download the config file.

Then I logged my Linux, and used the file as proxy auto detect config.


Wireless problems, doesnt seem to have any easy fix

I, too, have A Dell Latitude D630, running Ubuntu 11.10, and connect to my local Access Point (WPA2-PSK) with ease, and have connected to an Open (no security) AP.

Click on the Wireless icon in the top row of the screen, make sure that Enable Networking and "Enable Wireless" are checked; then  select "Edit Connections". Click the "Wireless" tab. For each connection listed, select it, click "Edit". In the window that opens, click the "Wireless Security" tab and ensure that the "Security" is set to the "right" value for that connection, and that the "Password" is correct (You can click on the "Show password" box to see the password).

I use the shipped-with-the-kernel b43.ko driver module /lib/modules/<kernel-version>/kernel/drivers/net/wireless/b43/b43.ko, not "sudo get-apt install firmware-b43-installer and i tried purging the bwml(something)".

Run this command sudo modprobe 43, wait 7 seconds, then tail -n 30 /var/log/kern.log.

Use this method:

Cause the event (failure to connect in this case) to take place.
Do ls -rlt /var/log to get a reverse time-ordered list of log files.
For each of the "recent" log files, inspect the last several lines, and try to figure out what really happened.

Your problem report lacked details and clarity. I've tried to guess what you mean/want, but please make it easier for me next time.


How to use ActionSelectionPopover QML Component

Well I figured out what was going on in my case, I was handling it correctly, what was happening is for some reason, probably because where my ActionSelectionPopover was located in my QML file, it was appearing below all the other components in my app, I just set it's z property to 100, and now it works fine, so this is my new ActionSelectionPopover code:

/* Popup menu when right clicking items */
ActionSelectionPopover {
    id: contextMenu
    z: 100
    actions: ActionList {
        Action {
            text: i18n.tr("View Item Info")
            onTriggered: print(text)
        }
    }
}


Get grub customizer, go to Preferences, disable show menu, and click save.

You can't remove plymouth, but you can disable the splash. Remove the package "plymouth-label".


How can I make the text cursor in X Windows easier to see?

Use something like Gursormaker to edit one of the existing cursor themes from /usr/share/icons to make the "xterm" cursor more visible, then export it to an X11 cursor theme.  Place the theme directory in ~/.local/share/icons.  You should then be able to select it as a cursor theme.


Booting from USB stick with Ubuntu 20.04 not possible

I have SOLVED my problem.

I replaced in Bios settings Peripherals,Sata Mode
settings Intel Premium with AHCI.

efibootmgr -v  shows the boot options
efibootmgr -o  means make  changes
Output before changing:
user@user:~$ efibootmgr  (enter)
BootCurrent:0000
Timeout: 1 seconds
BootOrder: 0000,0002
Boot0000* Windows Boot Manager
Boot0002* ubuntu

Then:
sudo efibootmgr -o 0002
System now starts up with grubmenu with Ubuntu
on top. Followed by Windows10.
Now I am satisfied.