First try, from the command line:

chmod 777 file_name_here.txt

This will set everyone to access everything (a huge security risk) so only do it with one file.

If you get errors about a read only file system, then your file system is read only and that is another problem.


Why Genymotion doesn't work even if VirtualBox installed?

I get this when I've used up all 128 of my host-only NAT adapters,

I've searched the web and there doesn't seem to be way to a) remove them all in a batch or b) make Genymotion use the same one instead of creating a new one every time it starts. (Although one page I read made it sound like that is supposed to be the case!)

The fix for me:

Start VirtualBox
Go to File -> Preferences -> Network and open the "Host-only Networks" tab
One by one remove the vboxnet(0 to 127)'s!

Although you could just remove one and then start Genymotion - but you'd have to do it again next time! :)

Now if anyone knows how to stop Genymotion creating them ...


HP OMEN - There are no pwm-capable sensor modules installed

Just in case you were asking this question because your HP Omen would make more noise than you think is necessary for a moderate CPU temp. My solution to quiet the laptop was to disable the "fan always on"-option in the BIOS settings. This made the laptop handle fan speeds a lot more reasonable (imho)

To enter the BIOS setup hit F10 on boot

If you were really looking for an answer to control the fanspeed, I'm sorry that I wasted your time here, since I haven't figured this out myself.


Install Ubuntu from ISO image directly from hard disk of a system running Linux?

I found this looking around on the net.

Grub2 is capable of directly booting ISO images for many Linux distros if the entries have been properly defined in the Grub2 configuration files.

The ISO image must be placed on a separate partition that does not have an operating system installed on it. For the sake of simplicity, we would place it inside a new directory under /boot (assuming it is on a separate partition).

Create the new directory and copy your ISO image:

sudo mkdir /boot/iso
sudo cp ~/Desktop/name.iso /boot/iso

Where ~/Desktop/name.iso is the location and name of your ISO image assuming that the image is located at your desktop.
Add the Grub2 entry:

The entry for the ISO image needs to be added to /etc/grub.d/40_custom file. Edit the file by:

gksudo gedit /etc/grub.d/40_custom

And replace the text in that file with this one:

#!/bin/sh
echo "Adding 40_custom." >&2
exec tail -n +4 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry "Kubuntu ISO" {
        set isofile="/boot/iso/kubuntu-12.04.iso"
        loopback loop (hd0,8)$isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
        initrd (loop)/casper/initrd.lz
}

Where is:

Kubuntu ISO = The name you want to display in the Grub menu.
boot/iso/kubuntu-12.04.iso = The location and name of your ISO image.
(hd0,8) = The partition which contains the ISO image.
note: the tail -n +4 means simply "which line grub starts to read the configuration from as is". the 4th line in this example is the first comment line, which is fine.

Grub reads the partitions in a different way than Ubuntu does. 'hd0' means first HDD which is read as sda by Ubuntu, and 8 is the partition which is the same as for Ubuntu. So in other words, (hd0,8) means 'sda8'.

To find out your partition, run this command in a Terminal:

sudo fdisk -l

Suppose your image is contained in the sda1 partition, you'd change (hd0,8) in the above line to (hd0,1) and if the image is in the sdb1 partition, you'd change (hd0,8) to (hd1,1).
Save and close this file and now run this command:

sudo update-grub

Reboot and choose the new ISO entry from Grub menu this time. Hopefully, it will boot successfully to the desktop.

Now, if you want to perform an installation from the same ISO, you'd need to unmount the ISO image first as it is mounted from a partition on your HDD (probably you've got a single HDD and want to install Ubuntu to the same HDD) and the installer needs to unmount any mounted partitions before it can make any changes.

So, from the Live CD environment, go to a Terminal and run:

sudo umount -l /isodevice

That's all. Now you can double-click the 'Install' icon at the desktop and proceed with the installation.

More info see Ubuntu Forums 1, and Ubuntu Forums 2

Source:TuxGarage


How to compare two links if they're correct

Use regex pattern matching:
[[ "$newlink" =~ $correctlink ]]

See also:

Syntax for regex in IF statment
How can I match a string with a regex in Bash?


How to turn a .py file into a .deb package using quickly?

FPM is a great tool for packaging not only deb but other formats too like rpm.


Very strange, it works as expected on:

14.04 LTS with Xfce;
16.04 LTS with MATE DE and Unity;
17.10 with GNOME;
18.04 LTS with MATE DE.

Steps to reproduce:

Install PDF-Shuffler
Launch PDF-Shuffler
Click Add
Select all PDF-files (from /usr/share/cups/data/ in my case)
Shuffle, rotate their thumbnails
Click Save as
Open saved document.


after installed Ubuntu 16.04 to external drive on Windows 8 system, i can't boot with out external drive

The problem that you're having comes from booting into Legacy mode and trying to install grub into Drive /dev/sda during your install.  You could install grub to /dev/sdb and set your BIOS for /dev/sdb as your boot priority.  During that will boot you to Ubuntu.  However, you won't have boot options to boot to Windows.

While there may be a number of methods around this, the simplest method would be to install an Ubuntu partition on /dev/sda.  This can be a very small installation, just enough to have the basic install which can be as small as 8 gigs.

When you boot to the UEFI version of Ubuntu on /dev/sda and run update-grub if your external drive is installed it along with any other OSes detected will be added to the boot menu.

Now when you select UEFI Ubuntu from as your BIOS boot option, you'll have all the Operating systems included all the external drives in the Grub menu.  You'll be able to select either one for your default, including Windows.

The information is automatically added to the EFI partition on /dev/sda.

There are many "seemingly" complex descriptions for how to manually edit the EFI partition to do this.  But I consider spending 8 gigs of space to allow the Ubuntu install to do this automatically well spent for the ease.  Anytime you want to make a change, just boot to the Ubuntu on the /dev/sda drive and run update-grub to have any changes to be automatically reconfigured.

The steps above are to provide being able to have Windows included in your Boot menu.

If you don't care to have your UEFI Windows installation included in your boot menu.  Just install group on /dev/sdb (your external drive).  Set your BIOS for legacy with /dev/sdb as your default boot device.


First, install VirtualBox: https://www.virtualbox.org/wiki/Linux_Downloads

Then, install the Edge virtual machine for VirtualBox from here: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/


Freeing disk space on Ubuntu to use in Windows

For 1), this will be tough as you will need to shrink the root FS, then the root partition, move the root partition to create a gap between the Windows partition and the extended one, then extend the Windows partition. All this is best done using a LiveCD like http://www.sysresccd.org/Download

For 2), if you have free unpartitioned HDD space then you will need to: deactivate the swap, extent the swap partition, re-format it (mkswap), re-activate the swap. You need to update the /etc/fstab file to use the right UUID of your new swap.


How do I move the workspace switcher/selector in Activities overview to the left in GNOME?

You can achieve this using the Workspaces to Dock GNOME extension. From the extension's preferences, set "Left" for the 'Show the dock at the following screen position' option in the General tab.

To disable the dock-like feature, disable both auto-hide and intellihide options in the Behaviour tab.

To learn more about installing and configuring GNOME shell extensions, refer to How do I install and manage GNOME Shell extensions?


Run the following commands to clear out the package cache, resolve dependencies, and (hopefully) fix install issues:

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

Breaking this down a bit more:

sudo apt update
This command will download new package caches and package data from the Ubuntu servers.
sudo apt -f install
This command, known as "fix all the problems" will attempt to smartly resolve any dependency issues, and re-install any broken packages. In your case, it will likely re-install the missing GEGL library.
sudo apt full-upgrade
This command runs a full upgrade of all of your software to bring you up to the latest version. Note that it does not change your OS version, so it won't upgrade 14.04 to 16.04.
sudo apt install gimp
This command installs gimp, as one can guess.


Error when atempting to install Ubuntu 12.04

Try reinstalling it again choosing:

  Erase Ubuntu 12.04 LTS and reinstall


How to keep volume popup from showing when volume isn't changed?

Using pavucontrol I could see that the output device was flickering between "Line Out (plugged in)" and "Headphones", probably due to a loose contact (no headphone is connected). I then used hdajackretask to disable all output jacks except for the Line Out one by checking "Override" and selecting "Not connected". Now, in pavucontrol "Headphones" no longer appears in the Port selector and it no longer flickers between them.

You can install the program like this:

sudo apt-get install alsa-tools-gui

Related answer: https://askubuntu.com/a/448138/938003


It should be there in the Edit, Preferences dialog!

And this is gedit version 3.8.3

There has been a similar issue reported over at ubuntuforums.org. The problem apparently arose when Unity's global menu was removed (by sudo apt-get remove indicator-appmenu). The solution involves using dconf editor to restore menu items or restoring the global menu.


How to remove GNOME and GNOME on Xorg which shows up on login screen?

If all you want to do is to remove gnome then ignore the Step 2 and 7
and follow step 6 to if only a tty screen appears after restarting your computer.

You may need an active internet connection before proceeding:

Memorise your username and setup a password if you don't have one.
Uninstall Cinnamon

sudo apt-get purge cinnamon
sudo apt-get autoremove

Use the second answer to Uninstall Gnome3
Restart
Ctrl + Alt + F1
Enter your username and password
Reinstall gnome using

sudo apt install gnome-session gdm3


Using MAAS to deploy graphical shell on office workstations

curtinator[a] could help you to customized Ubuntu desktop images that could be deployed by MAAS.

Please go to [a] and download the curtinator source by bzr. The README of the curtinator project source should be sufficient to guide you to make a MAAS-deployable Ubuntu desktop image and be imported by MAAS. However, please let me illustrate the "too detailed"[b] steps for you according to the README. I have tested these steps on MAAS 2.1.3 with Ubuntu Xenial 16.04.1 desktop images. You could skip the following steps if you think the README is enough to you.

Prepare the Environment

I tested these steps on my Ubuntu Xenial 16.04.1 Desktop system.
sudo apt-get install qemu-kvm libvirt-bin virt-viewer genisoimage
Reboot the system after you have installed the above packages.
bzr branch lp:curtinator to fetch the curtinator source (you may need to install bzr by sudo apt-get install bzr) somewhere, say <curtinator root>
Download an Ubuntu desktop image. In this case, we choose ubuntu-16.04.1-desktop-amd64.iso and put it in <curtinator root>

Use curtinator

Go to the downloaded curtinator source <curtinator root>
In <curtinator root>, execute ./scripts/curtinator ubuntu-16.04.1-desktop-amd64.iso
If everything works well, you will get a tarball ubuntu-16.04.1-desktop-amd64.iso.tar.gz in <curtinator root>.

The console message looks like:

$ ./scripts/curtinator ubuntu-16.04.1-desktop-amd64.iso
Extracting ubuntu-16.04.1-desktop-amd64.iso to ubuntu-16.04.1-desktop-amd64
Creating ubuntu-16.04.1-desktop-amd64/casper/preseed.cfg
Patching ubuntu-16.04.1-desktop-amd64/casper/initrd.lz with ubuntu-16.04.1-desktop-amd64/casper/preseed.cfg
Creating ubuntu-16.04.1-desktop-amd64/root.qcow2
Creating ubuntu-16.04.1-desktop-amd64/libvirt.xml
Starting domain ubuntu-16.04.1-desktop-amd64
Domain ubuntu-16.04.1-desktop-amd64 defined from ubuntu-16.04.1-desktop-amd64/libvirt.xml

Domain ubuntu-16.04.1-desktop-amd64 started

Installing, run this command for progress:
# virt-viewer ubuntu-16.04.1-desktop-amd64
Compressing tarball
Finished ubuntu-16.04.1-desktop-amd64.iso.tar.gz

Please note the relative path is important when executing curtinator.

Upload the Customized Ubuntu 16.04.1 desktop image

scp ubuntu-16.04.1-desktop-amd64.iso.tar.gz <your MAAS server>
On your MAAS server (mine is MAAS 2.1.3.x), execute maas $YOUR_MAAS_PROFILE boot-resources create -d name=<YOUR_CUSOMIZED_ISO_NAME> architecture=amd64/generic filetype=tgz content@=<where your ubuntu-16.04.1-desktop-amd64.iso.tar.gz is>.

In my case, it is

maas askubuntuprofile boot-resources create -d name=custome_desktop_16-04-01 architecture=amd64/generic filetype=tgz content@=/home/ubuntu/ubuntu-16.04.1-desktop-amd64.iso.tar.gz

YOUR_CUSOMIZED_ISO_NAME is a label name that will show on your MAAS dashboard when you selects which image you want to deploy. In my case, it is custome_desktop_16-04-01. You can see that there is a customized image which is syncing in the following MAAS dashboard screenshot.

Wait for few minutes until it is synced.

Now you can deploy this customized desktop image as usual. Select the tab Custom and your customized desktop image name like this:

[a] https://launchpad.net/curtinator

[b] Too much detailed so I won't update the README ; )


System Settings > Shortcuts > Global shortcuts > Run command

Disable all default shortcuts

I suggest remapping to ALT+=


The best approach for a clone is to NOT be joined to any domain (same applies for Windows clients also). When a computer is joined to a domain a new computer account, its SID and relevant dns records have to be created. So it cannot be done to a clone used for replication. Each replica will consider itself as the original computer account of the clone in the domain. It'll be a mess.


Try this:

for x in {1..100}; do
    echo $x | nc -lk 9999
    sleep 0.1
done


What do snap, snapd and Snappy refer to?

Snap: A specific packaging format defined as a squashfs image containing a meta/snap.yaml file that follows a specific format.
Snap Store: A central repository of snaps from which they can be downloaded/installed.
Snapcraft: A command-line tool used to create snaps (think pbuilder for snaps) and (optionally) place them in the store.
Snapd: A daemon required to run snaps (download them from the store, mount them into place, confine them, run apps out of them, etc.). Snapd also includes the snap command, used to communicate with snapd (for the user to request a new snap be installed, etc.)

This entire system is sometimes referred to as "snappy". Confusingly, I'm also seeing it more and more often referred to as "snapcraft". While snaps run on normal Ubuntu (and indeed a variety of other Linux distributions), Ubuntu Core is an operating system based entirely upon snaps (no apt whatsoever). Unfortunately, there was already an "ubuntu core" that was the basic rootfs of Ubuntu, so to differentiate, it was called "snappy ubuntu core." The old core was recently renamed to ubuntu base, which is why you see "snappy ubuntu core" less these days.


Computer does not have the necessary hardware to run Unity

It's sound like an issue with the installation recognizing the video card.  I looked around and found this posted, different computer but same video card from Người Điên Lang Thang on the cafelancer.com blog:

  Step 1: Download driver from NVIDIA
  website :
  http://www.nvidia.com/Download/index5.aspx?lang=en-us
  (Linux 64bit for my Dell)

  Step 2: Disable nouveau on Ubuntu
  (open source driver for NVIDIA Graphic
  Card)

Press Ctr_Alt_T to open the shell command. sudo su – to gain a root

  permission (nice trick :D )
      Edit GRUB_CMDLINE_LINUX_DEFAULT variable on /etc/default/grub by
  nano/vi or whatever editor you have.
  Replace by :
      GRUB_CMDLINE_LINUX_DEFAULT="nouveau.modeset=0
  acpi_sleep=nonvs"
      Save the file and Run “sudo update-grub”
      Reboot your PC/lappy

  Step 3: Install driver from NVIDIA:

After boot, your Ubuntu looks ugly now he he he he. Don’t worry! It’s

  normal. Press Ctr_Alt_F1 to switch to
  first text terminal.
      Login by your account and sudo su – to get root permission
      Run this command to stop the Graphic Interface service:
  /etc/init.d/gdm stop
      Chmod +x for driver from NVIDIA and Run. In my case:
  /home/bntix/Downloads/NVIDIA-Linux-x86_64-270.41.06.run
      Follow the instruction, then start the Graphic Interface service by :
  /etc/init.d/gdm start
      Then you will get back to a very nice Graphic Interface as before ;-)


look at the following link:
Download Mass Effect Composer’s Ubuntu 14.04 Start Up Sounds


How do I grep for multiple patterns on multiple lines?

Updated 18-Nov-2016 (since grep behavior is changed: grep with -P parameter now doesn't support ^ and $ anchors [on Ubuntu 16.04 with kernel v:4.4.0-21-generic])(wrong (non-)fix)
$ grep -Pzo "begin(.|\n)*\nend" file
begin
Some text goes here.
end

note: for other commands just replace the '^' & '$' anchors with new-line anchor '\n'
______________________________
With grep command:
grep -Pzo "^begin\$(.|\n)*^end$" file

If you want don't include the patterns "begin" and "end" in result, use grep with Lookbehind and Lookahead support.
grep -Pzo "(?<=^begin$\n)(.|\n)*(?=\n^end$)" file

Also you can use \K notify instead of Lookbehind assertion.
grep -Pzo "^begin$\n\K(.|\n)*(?=\n^end$)" file

\K option ignore everything before pattern matching and ignore pattern itself.
\n used for avoid printing empty lines from output.
Or as @AvinashRaj suggests there are simple easy grep as following:
grep -Pzo "(?s)^begin$.*?^end$" file

grep -Pzo "^begin\$[\s\S]*?^end$" file

(?s) tells grep to allow the dot to match newline characters.
[\s\S] matches any character that is either whitespace or non-whitespace.
And their output without including "begin" and "end" is as following:
grep -Pzo "^begin$\n\K[\s\S]*?(?=\n^end$)" file # or grep -Pzo "(?<=^begin$\n)[\s\S]*?(?=\n^end$)"

grep -Pzo "(?s)(?<=^begin$\n).*?(?=\n^end$)" file

see the full test of all commands here (out of dated as grep behavior with -P parameter is changed)
Note:
^ point the beginning of a line and $ point the end of a line. these added to the around of "begin" and "end" to matching them if they are alone in a line.
In two commands I escaped $ because it also using for "Command Substitution"($(command)) that allows the output of a command to replace the command name.
From man grep:
-o, --only-matching
      Print only the matched (non-empty) parts of a matching line,
      with each such part on a separate output line.

-P, --perl-regexp
      Interpret PATTERN as a Perl compatible regular expression (PCRE)

-z, --null-data
      Treat the input as a set of lines, each terminated by a zero byte (the ASCII
      NUL character) instead of a newline. Like the -Z or --null option, this option
      can be used with commands like sort -z to process arbitrary file names.


Uninstall Unity without ubuntu-desktop and use Gnome Shell instead

This link shows you how to remove unity

How can you remove Unity?

You then install gnome-shell.

ubuntu-desktop is a meta package and can be removed safely.

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


Start a live session from a DVD/CD/USB and then:

Reduce the swap partition /dev/sdb6
Now you have extra space
Expand the ext4 / partition /dev/sdb5


How do you Install the Latest Release of Miro?

As an update, note that the repository here:

ppa.launchpad.net/pcf/miro-releases/ubuntu/dists

now seems to include Miro for Ubuntu 12.10 Quantal.  However, the latest version in the repository is 4.0.4 whereas I understand that Miro version 5.0.4-1 is available for earlier versions of Ubuntu (12.04).  Not sure why this is the case.

Thanks.


add this unallocated space to ubuntu partition

It seems you are running in VirtualBox.

The virtual drive i around 40 GB, but you use only around 9 GB. It seems you have nothing in the extended partition, at least nothing that can be seen by parted. If this is correct, you can remove or move the extended partition.

Boot the virtual machine from the image, that you used to install Ubuntu, 'Try Ubuntu'
Start gparted and use it to edit the partitions.
I suggest that you move the extended partition so that there will be unallocated space near the root partition /dev/sda1.
The next step is to expand, 'grow' /dev/sda1.
Finally, you can create a swap partition, for example in the moved extended partition.

The following link might help: GrowIt.pdf


Will 64 bit ubuntu work on x86-64 bit architechture?

yes.

If the iso runs well as a live usb, then it's working, yes?

It should install ok too, should


I am not an expert but consider changing security type in connection settings.
Select your wi-fi icon and then connection settings. On the Wireless tab select the connection you want and press edit. In the Wireless Security tab select LEAP from security and give your username and password.


Shared Folder is not working for host Ubuntu 14.04 and virtual box 4.3.16

I encountered this with a Windows 7 guest on Linux Mint Cinnamon 17, possibly due to a Windows upgrade. If you manually disconnect the disk volumes in the Windows File Explorer (right-click, then Disconnect) and then power off the guest OS and restart, it may fix the problem.


How is sudo safer than directly using su if the user is granted access to all commands?

Personally I do not necessarily consider it safer and most of the benefits (of sudo) are on a multi user system. On a single user system it probably is a wash.

The benefits are (in no particular order):

sudo has superior logging. sudo logs each command.
sudo allows finer grain control. One can configure sudo to give root access to some but not all commands.
sudo uses the login password. This protects having to give the root password (as you would with su) and is related to the point above regarding finer grained control / access to root.
In Ubuntu, by default, the root account is locked. This deters crackers as to log in (remote via say ssh) they have to guess both a user name and a password. If the root account is not locked, as is the case with su, then they only need to crack root's password.
sudo -i is probably the best method to isolate root's environmental variables from your user. This comes up from time to time but is moderately esoteric. See https://help.ubuntu.com/community/RootSudo#Special_notes_on_sudo_and_shells
some people feel that having to type sudo before every command they wish to run as root or having sudo time out allows them to stop and think more clearly and reduces their errors or running erroneous commands. If doing so helps you that would be a benefit as well.

There are probably more benefits , but, those are the major ones, IMHO.

See also - https://help.ubuntu.com/community/RootSudo

To try to answer some of your other thoughts:

There is nothing about either su or sudo that prevents you running malicious code as long as you know the password. Neither is safer or better.
Crackers can obtain shell access via a number of methods. When you see "run arbitrary code" in a security notice - https://usn.ubuntu.com/usn/ - that means a cracker can run /bin/bash or any other code. Thus a cracker, via various exploits, can obtain shell access without knowing your login name or password. Neither sudo or su helps with this.
If a cracker has shell access they can do a lot of damage without root access. For example the ransomware that encrypts all your personal data.
If a cracker has shell access to an account with root access, via either su or sudo, the cracker can obtain root access via a number of methods beyond the scope of this discussion. Neither sudo or su is superior in this respect either.

So while you have observed problems or flaws with sudo, su has the exact same vulnerabilities and su is not superior to sudo in those aspects, IMHO


Auto-arrange desktop icons in Ubuntu Gnome 17.04

With Ubuntu 18.04 Right-click on the desktop and select Keep aligned as shown below:

Be aware that if there are holes in the grid due to icons that you have deleted they will be filled first.


How to show only opened apps in the current workspace on unity?

Press Shift+Alt+up to scale affect all apps open on current workspace

Press Super+w to scale affect all apps open on all workspaces.

What are Unity's keyboard and mouse shortcuts?


WiFi won't work after updating to kernel 4.10.0-24

I experienced the same issue, downgrade to 4.10.0-22 helped.

Running Ubuntu Budgie and I'm using an Intel 7265 WLAN module.


I don't recommend upgrading ubuntu version to new users, nor to anyone else.

perhaps one day that feature will work the way windows 7/8 upgrade to windows 10 does.

today is not that day.

I strongly recomend you backup your data to a usb or external hard drive and make a fresh install of ubuntu 19.04.

ubuntu 19.04 works fine it's my daily driver.

to make an install live USB of ubuntu 19.04 click this link : https://www.ubuntu.com/download/desktop/thank-you?country=FR&version=19.04&architecture=amd64

select "keep" when it finishes downloading, then open up the USB disk creator by typing Ctl+Alt+T, to open a terminal window and inside it type usb-creator-gtk and then just click create.

you can then reboot and choose this USB key to boot to (choose UEFI if it shows up twice)


Selective mounted volumes for the GNOME Desktop and Nautilus Sidebar

Where are "40GB Filesystem", "80gb" and "backup" mounted?

My guess is under /media.

This is something that used to really annoy me, that Windows shares from the file server would appear as removable storage in my Places menu.

So I changed the mount point from /media/S to /mnt/S and now it is handled correctly as non removeable storage. Now the remote windows share :

does not appear in Places menu
does not get added to my "Disk Mounter" applet
does not get added as a volumes_visible icon on my desktop.

You can easily test this yourself by

ensure the volumes_visible option is checked in gconf-editor
create a mount point such as /mnt/backup/
edit your /etc/fstab file to use /mnt/backup instead of /media/backup
unmount /media/backup
mount /mnt/backup

I have just tested these steps and you wont have to log out to see the changes.

When you unmount the drives the icons will disappear and when you remount them under /mnt they wont reappear.


Ubuntu 14.04 fails to boot on restart or cold-start , grub appears on Ctrl+Alt+Del

I had similar problem recently with same setup (encryption). Seemed like every second boot failed with same effect as in your case. Workaround was going to TTY1-6 and back to TTY7.
Then I fixed it by disabling splash screen from grub config (open /etc/default/grub with text editor, and remove splash option from this line: GRUB_CMDLINE_LINUX_DEFAULT). Then run update-grub.


Ubuntu is also slow for me! how to complain about it?

Try to use ubuntu in Gnome Session Fallback. This is another interface faster than default.
You can install this by open a terminal and press:

sudo apt-get update

sudo apt-get install gnome-session-fallback

Restart system and choose Gnome (no effects) interface. This should work faster than default interface.


According to this blog you should use the following procedure to avoid contention on device handles:

$ sudo udevadm control --stop-exec-queue
$ sudo mdadm --create /dev/mdo --level=5 --raid-devices=3 /dev/sdb1 /dev/sdc1 /dev/sdd1
$ sudo udevadm control --start-exec-queue


how to remove windows if already combined with ubuntu

First things first, back up any important data. You will be modifying partitions, which can cause loss of data if done incorrectly.

If you don't need anything off of Windows first, just delete the Windows partition and resize your Ubuntu partition to fill the available space.

Boot from your Ubuntu live CD
At the terminal, run:

  $ gksudo gparted&

Select the Windows partition (It will be formatted NTFS)
Delete the Windows partition
Select the Ubuntu partition, select resize, and set it to take all unallocated space
Reboot normally and enjoy

Windows will still appear in the GRUB menu, so to remove it from GRUB, run:

  $ gksudo gedit /boot/grub/grub.cfg

Look for this following section:

 ### END DEBIAN AUTOMAGIC KERNELS LIST

 # This is a divider, added to separate the menu items below from the Debian
 # ones.
 title           Other operating systems:
 root

 #This entry automatically added by the Debian installer for a non-linux OS
 # on /dev/sda1
 title           Microsoft Windows XP Professional
 root            (hd0,0)
 savedefault
 makeactive
 chainloader     +1

And comment out the bottom section using #

Save & exit.

Reboot, then run:

$ sudo apt-get update && sudo apt-get upgrade
$ sudo reboot


First, since you have run sudo apt-get install build-essential you must be having gcc installed already. You can find out which version you have by running  gcc -v.
The location of this installed version would be /usr/lib/gcc/version-number/.

/usr/bin/gcc is the default location of the binary of gcc in Ubuntu.

Next,
You want to install a previous version.

For gcc-4.1

Since this version is available in the older releases of Ubuntu, we need to have the appropriate repositories for the version. From some search, I found them to be the following, which have to be added to the /etc/apt/sources.list

deb     http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb-src http://snapshot.debian.org/archive/debian/20070730T000000Z/ lenny main
deb     http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main
deb-src http://snapshot.debian.org/archive/debian-security/20070730T000000Z/ lenny/updates main

*These links have been taken from this answer.

Then after doing sudo apt-get update the new repositories will be available.

Next, install the required compiler. I usually install gcc and g++ of the same version for inter-operability. For general purpose it is recommended.

Hence,

sudo apt-get install gcc-4.1 g++-4.1

2. Checking the available compilers

At this stage one will have two set of compilers (oen each for g++ and gcc). These can be checked by dpkg --list | grep compiler,

dpkg --list | grep compiler
ii  antlr3.2                              3.2-14                                              all          language tool for constructing recognizers, compilers etc
ii  g++                                   4:5.3.1-1ubuntu1                                    amd64        GNU C++ compiler
ii  g++-4.1                               4.1.2-13                                            amd64        The GNU C++ compiler
ii  g++-4.1-multilib                      4.1.2-13                                            amd64        The GNU C++ compiler (multilib files)
ii  g++-5                                 5.4.0-6ubuntu1~16.04.4                              amd64        GNU C++ compiler
ii  gcc                                   4:5.3.1-1ubuntu1                                    amd64        GNU C compiler
ii  gcc-4.1                               4.1.2-13                                            amd64        The GNU C compiler
ii  gcc-4.1-multilib                      4.1.2-13                                            amd64        The GNU C compiler (multilib files)
ii  gcc-5                                 5.4.0-6ubuntu1~16.04.4                              amd64        GNU C compiler
ii  gcc-5-multilib                        5.4.0-6ubuntu1~16.04.4                              amd64        GNU C compiler (multilib support)
ii  gcc-multilib                          4:5.3.1-1ubuntu1                                    amd64        GNU C compiler (multilib files)
ii  hardening-includes                    2.7ubuntu2                                          all          Makefile for enabling compiler flags for security hardening
ii  libantlr-java                         2.7.7+dfsg-6ubuntu1                                 all          language tool for constructing recognizers, compilers etc (java library)
ii  libllvm3.8:amd64                      1:3.8-2ubuntu3                                      amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm3.8:i386                       1:3.8-2ubuntu3                                      i386         Modular compiler and toolchain technologies, runtime library
ii  libxkbcommon0:amd64                   0.5.0-1ubuntu2                                      amd64        library interface to the XKB compiler - shared librar

Important is the location of the two set of compilers, which can be listed by,

ls -lh /usr/bin/gcc*
lrwxrwxrwx 1 root root    5  五   5  2016 /usr/bin/gcc -> gcc-5
-rwxr-xr-x 1 root root 208K  七  10  2007 /usr/bin/gcc-4.1
-rwxr-xr-x 1 root root 895K 十一  3 10:00 /usr/bin/gcc-5

and

ls -lh /usr/bin/g++*
-rwxr-xr-x 1 root root 210K  七  10  2007 /usr/bin/g++-4.1
-rwxr-xr-x 1 root root 899K 十一  3 09:41 /usr/bin/g++-5

Selecting a compiler for current purpose (building an application)

After having required compilers installed one can simply switch among compilers. This is done by updating the list of alternative versions of an application. To do this, the update-alternative command has to be run with certain parameters.

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.1 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.1
sudo update-alternatives --config gcc

This will link g++ to gcc and on changing only gcc the g++ will change automatically.

Then whenever you want to change the compiler enter this:

sudo update-alternatives --config gcc

Then, user is asked which compiler to choose.

  Selection    Path              Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-5     60        auto mode
  1            /usr/bin/gcc-4.1   40        manual mode
Press <enter> to keep the current choice[*], or type selection number:

Here you can choose by pressing the key(0,1) and then pressing enter. The change in the current selected version can be checked by gcc -v.

4. Building an application using installed compilers

Some basic guidelines:

There are in general two steps, building (build) and making (make). The build step involves the generation of system specific codes for installation  which requires linking to required compilers. make is equivalent to installation in some directory. Any application can be build and make in any folder as decided by the user.
To build  a temporary folder is chosen. This folder can be removed after a successful make step. Important is that for the make step the installation destination is defined usually by --prefix=/path/to/folder while the build script is run. For example, if the setup script is .setup then, in most cases,
./setup --prefix=/path/to/installation/folder

For specific details please refer to the manual or guidelines for your application.

When running the build script the current selected compiler version (for gcc and g++) will be used. When running the installed application, the behavior will depend on the case whether the program takes compiler from environment variable or is linked to the specific binary. That has to be checked after installation.

cmake and make are separate utility used for installation. Different applications require different versions, so install the required utility and version accordingly.
The step of build and make are same for compilers as well.


amd64 is just the name of the processor arch. It means 64-bit and is not linked to the processor type.

You should install the amd64 version because your processor is 64-bit, and it should work fine (citation: I have it on an earlier-generation Inspiron).


Is there an easy guide on how to prepare my python3 script for upload to my ppa?

Your confusion from all the existing guides is something probably every developer who wants to create a package for their ppa had experienced once. It is immanent to the complexity of building DEBIAN packages, and because of the many paths you can go to get there. Because of this you will not find a step by step guide which is as easy as you may want it to be now.

What we can do here is to give you an idea on where to start to learn how to make a package ready for uploading to your ppa.

Learn how to make a DEBIAN package

This is the first giant leap to take. Without an understanding on how a DEB package works you will not be able to fill your ppa. We do have some good answers to qestions here already:

How do I create a deb package for a single python script?
The answers there will give you a basic idea on the DEB package structure.
How to get my software into Ubuntu?
In answers to this question you will find great links to very good resources. Read them or bookmark them to find answers to issues you may encounter.

Most of all it is important you learn from others. Download source packages and look how people did it there. You may even want to modify an exisiting package and use it as a template for your own.
Make your own DEBIAN package

Only after we are familiar with the structure and files a DEBIAN package needs to build it makes sense to try out ourselves. There are some good articles with special reference to Ubuntu which I recommend reading:

Ubuntu Packaging Guide
Packaging New Software

You again may want to try out the procedures and applications needed for building a package on a downloaded source of another package before you proceed with your own.
Learn from errors

You will see thousands of errors once you started to build a package from your own application. Do not take any of them lightly. Try to understand them and most importantly fix them step by step. This is where you will spend most time with reading packaging guides and DEBIAN policies.
Test your package

After you suceeded with your own package you should test if it installs correctly. I recommend doing this in a VM for different versions, and to be able to revert any unwanted side effects. Also do run Lintian on your package to reveal errors and warnings. All these need to be fixed to get you package accepted for upload on your ppa later.
Upload to your ppa

In addition to exisiting answers I linked to above there is a good guide on Launchpad on how to create a ppa and upload to it. Read and follow it to avoid frustration:

Launchpad Packaging/PPA

Understand and fix the errors you may get after your first upload.

Once you actually started to not only read but to really package something you will soon find that most of your present confusion will eventually lead to knowledge. Don't give up too early. Once you see how it works it is getting easier and easier.

Look at it as if it were game where you need to solve one puzzle after the other to reach the next level.


I think you should create a system user unit file.
This will be located at:

/home/<user>/.config/systemd/user/<name>.service

It is created like a normal unit file.
You enable it by:

systemctl --user start <name>

This will start the service at login.


No valid kits found, although a kit exists

I had the same issue. To solve it do these steps: go to Tools->Options->Qt Versions->add. Here you add the qmake.

After that go to Kits tab, select Desktop default and than in option Qt version select/set your qt version.

Now if you try to create a project the kit will be there :)


Can't find where my windows 10 partition is after having installed ubuntu

I see two storage devices on your system, shown as sda and sdb.

As is apparent in following lines of your boot repair report (lines no. 180 and 181) there is no OS installed on sdb.

sda : not-GPT,  BIOSboot-not-needed,    has-no-EFIpart,     not-usb,    has-os, 2048 sectors * 512 bytes
sdb : not-GPT,  BIOSboot-not-needed,    has-no-EFIpart,     not-usb,    no-os,  2048 sectors * 512 bytes

Based on the result of lsblk you shared, you have formatted whole of your sba while installation of Ubuntu and therefor your Windows files and partitions are gone.

For doing any recovery, if you want to simply get back your windows, there is no chance for it and you should install again. But if you want to get back your data, you should go for data recovery process which I don't think you would get anything useful from it (since your disk is formatted and new data is rewritten on it.

If you didn't have very important data on it forget about recovery. Otherwise, just turn off your system to prevent more damage to your data and go through a deep data recovery.


Can't find Firefox update in Ubuntu Update Manager

To update just Firefox, you could try the following:

sudo apt-get update && sudo apt-get --reinstall install firefox

I'd recommend installing the rest of the updates at your earliest convenience.


Can't resolve the problem Check if the DISPLAY variable is set<<<failed

The Installer likes to open a Graphical User Interface. If you are on a local Terminal you can type in:

export DISPLAY=:0

if You are logged in via ssh you need to close the ssh connection an reconnect with:

ssh -X ...

-X is generating the right "$DISPLAY" variable.

There is an Oracle Help Document regarding this error: https://docs.oracle.com/cd/E11882_01/install.112/e47689/app_ts.htm#LADBI0123
chapter G.3 Remote Terminal Installation Error


Although this question has many possibilities, according to the needs of each one.

I would install in particular:

An ext4 partition, of 1 gigabytes, for /boot in the SDD.

An ext4 partition of 30 gigabytes for /on the HDD.

A partition exchange system, of 4 gigas to swap on the HDD.

An ext4 partition, of 40 gigabytes, for /home on the HDD.


How to Root Lenovo k3 Note Smartphone with Ubuntu

Install ADB and FastBoot system-wide and repeat the procedure again:

sudo apt-get install android-tools-adb android-tools-fastboot


Fuzzy launcher after wakeup from suspend

My opinion it seems that your graphic driver is not matched with your nvidia card. So lets use another driver. Did you check on additional driver to see if your current driver is recommended mode or other ones?

I had similar problem with my nvidia driver. First I checked into my system bios setup and unchecked optimus technology for nvidia then reinstalled my nvidia driver and it goes well for me.


As @Zanna has said in a comment, you can use sudo apt autoremove.
This automatically removes orphaned packages, or packages that aren't needed by the system.

myuser@mypc:~$ sudo apt autoremove
[insert apt output here]
myuser@mypc:~$

Any packages not removed by autoremove are required by your system.

Do not attempt to remove packages you think are useless by yourself.
 You could brick your system by trying that.

The MATE Desktop GTK2 vs GTK3 memory consumption webpage by Canonical's Project lead for Ubuntu MATE, Martin Wimpress, has a list of packages used when memory testing Ubuntu MATE 16.04. It might not be a good idea to remove any of these packages either.


I found a solution at https://ubuntuforums.org/showthread.php?t=2379525&p=13718691#post13718691

"You could insert the GRUB_TERMINAL_INPUT="at_keyboard" to verify keyboard. Usually c or e during grub, then add the line to the end of your kernel grub line.

You could also add the line to your /etc/default/grub file so it's added automatically after kernel upgrade or compiling."

I couldn't use the first option, but the second worked. It still doesn't work when I try to enter BIOS and I can't type the password. I'll update as soon as I find a solution for this as well.


What are the differences between the different vim packages available in Ubuntu?

Including the vim package, there appear to be at least six "vim-variants" (not including available documentation, or plugin packages) as well as the main vim package in both the main and universe repositories.
Below is a brief summary of each (links go to package description and dependencies in Ubuntu LTS release 20.04 "Focal"):

vim

Vim compiled and set up with a rather standard set of features. This package does not provide a GUI version of Vim or scripting language support. See the other vim-* packages if you need more (or less).
In order to install this package, run sudo apt-get install vim

jvim-canna - Japanized VIM (Canna version)

This package allows the entering of Kanji from the console.
In order to install this package, run sudo apt-get install jvim-canna
Depends upon the libcanna1g library
Does not appear to support Perl, Python, Ruby, or TCL scripting.

vim-athena - enhanced vi editor - compiled with an Athena GUI
This package is compiled with the Athena GUI as opposed to GTK+ or Gnome.
See this askubuntu answer for additional details.
In order to install this package, run sudo apt-get install vim-athena
Supports Perl, Python, Ruby, and TCL scripting.

vim-gnome/vim-gtk3 - enhanced vi editor - compiled with a GNOME GUI (GTK2 before 17.10, GTK3 from 17.10)
In order to install this package, run sudo apt-get install vim-gnome
Depends upon the libgnome2 library
Supports Perl, Python, Ruby, and TCL scripting.

vim-gtk - enhanced vi editor - compiled with the GTK2 GUI
Used in KDE/Kubuntu-like environments
In order to install this package, run sudo apt-get install vim-gtk
Supports Perl, Python, Ruby, and TCL scripting.

vim-nox - enhanced vi editor
Like vim-tiny, vim-nox is a minimal vim installation and does not have a GUI. It comes with mouse support, but no clipboard support, IIRC.
In order to install this package, run sudo apt-get install vim-nox
Supports Perl, Python, Ruby, and TCL scripting.

vim-tiny - enhanced vi editor - compact version
vim-tiny is included as the default vim on Ubuntu distributions and comes with many optional features disabled(e.g. multi-level undo).
See this askubuntu answer for details on its feature set(or lack thereof).
In order to install this package, run sudo apt-get install vim-tiny
Does not support Perl, Python, Ruby, or TCL scripting.
As close to being vi without being vi.

Locally, to see which features are supported in a particular installed vim package, running the following command: vim --version will provide a list of features included(or excluded) in the particular package.
For example, on my system I can run either vim --version, vim.tiny --version, or vim.athena --version to see the differences in their respective supported features.  The Debian/Ubuntu /etc/alternatives system determines which vim package executes when you runvi or vim, see What is etc/alternatives used for?

Python support
Before 16.04, the above packages (other than vim-tiny) included Vim with scripting support for Python 2. In 16.04, they all support Python 3, and there are corresponding *-py2 packages (vim-gnome-py2, for example) which provide a Vim command with Python 2 support. Both can be installed together, and the commands will be, for example, vim.gnome and vim.gnome-py2 respectively. Otherwise, the *-py2 packages provide the same feature set as the corresponding packages. Python 2 support was removed after 16.04.


How do I remove the battery icon from top bar?

You can remove the battery icon by removing the indicator-power package. You can do this by searching for it in the software center, or by executing this command:

sudo apt-get remove indicator-power

Then logging out and back in.


Ubuntu doesn't boot because of graphics problem

Ok, choose the first option and then press CTRL-ALT-F7 to get a GUI. When in a GUI, login, go to System Settings and click Additional Drivers. Then, install the recommended drivers and reboot. If pressing CTRL-ALT-F7 didn't work, pressing CTRL-ALT-F1 will get you to a text terminal (a tty).


Blank Purple Screen When Booting Into Ubuntu After Installation

CHECK THE ASUS WEBSITE FOR A FIRMWARE UPDATE!!!

Here is a complete video [about this problem, actually for an Asus Zenbook] but almost every Asus with 8565U has this problem. (https://www.youtube.com/watch?v=NbxrSaclKRc).

Summary of the fix:
Add the boot parameter: dis_ucode_ldr to /etc/default/grub and then execute: update-grub.

More info here at LaunchPad.


Is There A Way to Monitor Drive Access History?

My guess would be that this is caused by overdue cron jobs being started: There are a number of them that are supposed to run daily, weekly, monthly. Just look  at /etc/cron.*:
sh@balrog:~$ ls -ld /etc/cron.*
drwxr-xr-x 2 root root 4096 Apr 26  2018 /etc/cron.d
drwxr-xr-x 2 root root 4096 Apr  7 10:04 /etc/cron.daily
drwxr-xr-x 2 root root 4096 Apr 26  2018 /etc/cron.hourly
drwxr-xr-x 2 root root 4096 Apr 26  2018 /etc/cron.monthly
drwxr-xr-x 2 root root 4096 Jan  7 11:12 /etc/cron.weekly
sh@balrog:~$ ls -l /etc/cron.daily
total 56
-rwxr-xr-x 1 root root  311 Mai 29  2017 0anacron
-rwxr-xr-x 1 root root  376 Nov 20  2017 apport
-rwxr-xr-x 1 root root 1478 Apr 20  2018 apt-compat
-rwxr-xr-x 1 root root  314 Jan 17  2018 aptitude
-rwxr-xr-x 1 root root  355 Dez 29  2017 bsdmainutils
-rwxr-xr-x 1 root root 1176 Nov  2  2017 dpkg
-rwxr-xr-x 1 root root  372 Aug 21  2017 logrotate
-rwxr-xr-x 1 root root 1065 Apr  7  2018 man-db
-rwxr-xr-x 1 root root 6574 Apr  6 14:26 opera-browser
-rwxr-xr-x 1 root root  249 Jan 25  2018 passwd
-rwxr-xr-x 1 root root 3477 Feb 21  2018 popularity-contest
-rwxr-xr-x 1 root root  246 Mär 21  2018 ubuntu-advantage-tools
-rwxr-xr-x 1 root root  214 Jul 12  2013 update-notifier-common

Back when it was really cron running those jobs (now it's probably using systemd timer units), that was supposed to run some time during the night when nobody would need that much computing power.
But home or office PCs don't run during those night hours, so a fallback mechanism was created to have those background jobs run some time after the machine became active (after reboot or after resuming).
Some of those jobs are done so quickly you hardly even notice them; others, like updating the locate database, might take a while.
That particular one scans all filesystems on the off chance that you might want to use the locate command. It annoyed me enough to remove that package because I never use locate anyway (find is so much more powerful).
What you described sounds very much like that same problem.

Coming back to your specific question, catching those processes in the act is pretty difficult. When it starts, you can try our luck with the top command (or the GUI counterpart on your desktop) what unusual processes are active. But if they really do mostly disk I/O and little computing, you might not spot them.
pstree might also be helpful because it shows the process hierarchy.
There are also iotop and dstat (IMHO less helpful) and the old vmstat (never liked that one very much).


Does Ubuntu support Windows applications?

Well, it's always tough to explain Linux to Windows newcomers. First tip ever: forget Windows. Linux is not and will never be Windows, just as Windows is not and will never be Linux. They are different. Period. Now the whole thing:

Linux is an Unix-like system. What? Unix-like? Unix is an ancient operating system born in the 60's, when computers were huge and men were men, writing their own hardware drivers. Unix had a singular file system scheme and an amazing set of utilities. Unix-like systems are the ones that follow these characteristics. Nowadays Unix is extinct, but its soul is held in lots of Unix-like systems, such as the BSD's, Apple's Mac OSX, Minix and Linux. We can say most of the existing OSs today are either Windows NT based or Unix-like.
Windows systems need file extensions to handle their files. They simply do not know what to do with a file without an extension. Those include .exe (binaries/executables), .txt (text), .bat (batch scripts), among lots of others.
Most Unix-like systems do not need any file extensions. Instead of relying on the filename, there is a thing called "MIME" (Multipurpose Internet Mail Extension). It's basically a bit of code written directly in the beginning of every file. It tells the system how to handle it. However we do use extensions sometimes just to tell the user if a file is, e.g., either a shell script (.sh) or a text file (.txt), even though it's not necessary.
There is a thing called kernel. A kernel is a piece of software which makes the "translation" from software language to hardware language and vice-versa. It's essential to any Operating System: no kernel, no OS. Windows uses the NT kernel, while Ubuntu uses the Linux kernel (that's why it's a Linux distribution). When a developer makes a program he uses a programming language, and this language must be translated to binary (computer language) before this program can run. This process is called "compiling". But each kernel has its own way of translating a program to computer language, so programs compiled for NT can't run natively on Linux, and vice
-versa.
There is a very popular program for Unix-like Operating Systems called "Wine". Wine creates a compatibility layer so these OSs can run Windows programs. What Wine does is translating the program's requests to Linux language. You can install it in Ubuntu through the Software Center or through command line with the command sudo apt-get install wine. Right-click the .exe file you want to run and click "open with Wine". Note that some applications may not work.
And last, but not less important (actually the most important one), there are ALWAYS free, open-source, native alternatives and solutions for Windows programs in Linux. Don't forget that!!!

P.S.: sorry for so much "language" and "translation" examples, it's the best way I found to explain.


Correcting the pxeconfig line enabled the system:

APPEND boot=nfs root=/dev/nfs initrd=legolas/initrd.img nfsroot=192.168.0.8:/srv/tftp/legolas,rsize=4096,wsize=4096 ip=dhcp pci=nomsi rw quiet

The change from above was only boot=nfs

I also want to point out that DisklessUbuntuHowto does not mention the boot=nfs parameter, and I could not get the system to boot without it. I hope someone with the same issues finds this before they waste too much time.


can connect to wifi router but not the internet 12.10

If you are able to ping 8.8.8.8 you are actually connected to the internet.
You should check your DNS settings. It sounds like hostnames are not resolved correctly.
Check your resolv.conf file for the following line:

nameserver &ltIP&gt

Where <IP> should be an accessible DNS-server.
You can apply 8.8.8.8 as DS-IP as well.


Ubuntu 13.10, bumblebee and power management problem

To preserve your battery install TLP from their ppa which can be found at www.linrunner.de/tlp on my ASUS i7 laptop, I get same life as on Windows 8


Can't delete empty directories with strange names

Some of your names start with -, so pass -- first or use an absolute path.

For empty directories, use the rmdir command and write -- as a separate word before name of the first directory to  remove. If -- has not been passed (this applies to the commands you've tried as well as rmdir) then words that begin with - will be interpreted as collections of options controlling how the command behaves rather than as filenames for the command to operate on.

You will have to write your commands based on the directory names you have. Because of possible errors in formatting the filenames in the Stack Exchange visual editor, this is a case where I don't recommend copying directly from this answer. However, as an example which I expect you to modify as needed, if you have a directory whose name is:

-9tDCcQrfg8u8e.AlOYZ7DX0q-ZRR77j9q8Gq0z1A62Sh25BS0pYZEby6JDVvtMZavFTCUgQUpjuJUCZ0pKspQLd40O3Zc9rzgGRFcxNBKOgr7KnVwZw_A4kkx4R9zq1oON8aP4y00EY0AuIJYRdCs9v9oYNKrFasQoMXwuLiw5lh0Z8J6Jh8u8pjDNnP31p0oBYsjTQTPUE1MXVqgAuWNjrhtEFuouXKR

And it is empty, and you are in its parent directory (you can use cd to go there and pwd to check what directory you are currently in), then you can remove it like this:

rmdir -- -9tDCcQrfg8u8e.AlOYZ7DX0q-ZRR77j9q8Gq0z1A62Sh25BS0pYZEby6JDVvtMZavFTCUgQUpjuJUCZ0pKspQLd40O3Zc9rzgGRFcxNBKOgr7KnVwZw_A4kkx4R9zq1oON8aP4y00EY0AuIJYRdCs9v9oYNKrFasQoMXwuLiw5lh0Z8J6Jh8u8pjDNnP31p0oBYsjTQTPUE1MXVqgAuWNjrhtEFuouXKR

Or, if it's owned by root or you otherwise don't have permissions to remove it:

sudo rmdir -- -9tDCcQrfg8u8e.AlOYZ7DX0q-ZRR77j9q8Gq0z1A62Sh25BS0pYZEby6JDVvtMZavFTCUgQUpjuJUCZ0pKspQLd40O3Zc9rzgGRFcxNBKOgr7KnVwZw_A4kkx4R9zq1oON8aP4y00EY0AuIJYRdCs9v9oYNKrFasQoMXwuLiw5lh0Z8J6Jh8u8pjDNnP31p0oBYsjTQTPUE1MXVqgAuWNjrhtEFuouXKR

Notice that there is a space after the -- argument. That is important.

Or you can use the full path of the directory. Then you don't have to worry about what directory you are in when you run the command and the -- is optional. For example (based on what you showed in a comment):

rmdir /media/me/702E29F142F/-9tDCcQrfg8u8e.AlOYZ7DX0q-ZRR77j9q8Gq0z1A62Sh25BS0pYZEby6JDVvtMZavFTCUgQUpjuJUCZ0pKspQLd40O3Zc9rzgGRFcxNBKOgr7KnVwZw_A4kkx4R9zq1oON8aP4y00EY0AuIJYRdCs9v9oYNKrFasQoMXwuLiw5lh0Z8J6Jh8u8pjDNnP31p0oBYsjTQTPUE1MXVqgAuWNjrhtEFuouXKR

(Or with sudo rmdir, as above.)

Some names may contain characters that require quoting.

If that doesn't help and you continue getting the same No such file or directory message, then the problem is that you aren't successfully naming the directories. Presumably their names contain unusual characters.

It's not obvious that this is the case based on what you have shown but it is a common problem so I'm including it just in case. If your directory names contain spaces or other characters treated specially by the shell like line breaks, *, or $, then you should enclose the names in single quotes. This will be sufficient so long  as the names themselves do not contain any single quotes.

More generally, if you've used cd to get to the directory that contains these directories, you should be able to get a list of entries in that directory (including the subdirectories you're interesting in removing) by running:

ls -1b

This differs from an ordinary ls command in two useful ways:

The -b flag causes the paths  to be printed with escape sequences which can be pasted between $' '. No space should appear between the initial $ and the opening ' character.
The -1 flag makes ls list one entry per line. That can help decrease confusion about where one filename ends and the next begins.

This should enable you to  write commands that remove, rename, etc. these directories. If they are truly empty, you can then use the rmdir command to  remove them. You may need to run this command as root, which you can do with sudo.

Here's a deliberately oversimplified illustration of what commands you might run. Supposed ls -1b listed:

abc\ def
ghi\njkl
pqr\b\b\bstuv
$$$$$$$\b\b\b$$$

In the first case there is a space. In the second case there is a newline (a line break). In the third case, there are three backspace characters. In the fourth case, which there are both $ and backspace characters.

To remove those directories you could use:

rmdir -- $'abc\ def'
rmdir -- $'ghi\njkl'
rmdir -- $'pqr\b\b\bstuv'
rmdir -- $'$$$$$$$\b\b\b$$$'

As above, you may need sudo.

rmdir can take multiple filenames but if you use one command per removal then it may be easier to understand whatever error messages you receive, if any.

In those particular examples, the directory names did not start with - and the -- flag was not necessary. But it did not do any harm.

$' ' versus  plain ' '

Unlike quoting with ' ', quoting with $' ' causes backslash escapes like \n and \b to be expanded.

'ghi\njkl' identifies a file whose name is literally:

ghi\njkl

In contrast, $'ghi\njkl' identifies a file whose name is:

ghi
jkl

If you're running a graphical file browser, you may be able to drag from  it.

With some graphical file browsers (such as Nautilus, i.e., "Files") and some terminals (such as GNOME Terminal), there is an even easier way to get a usable absolute path to a file in a terminal command that you are writing.

This will work on most Ubuntu systems that have a graphical user interface installed but it will pretty much never work when you're logging in remotely via SSH.

You can drag the folder from the file browser window into the terminal window to paste the full path to it in the terminal. With your mouse over the terminal window, release the button.

For this to be useful, the best approach is to write the command you want to run first. For example, write this and include a space at the end but don't press Enter yet:

rmdir --

Then drag the folder from the file browser window into the terminal window. If your file browser and terminal emulator support it, you should see a path pasted, with \ or ' based quoting automatically provided. You can then press Enter to run the command. Even if the command does not succeed, this will usually give a more useful error message than No such file or directory.


Xubuntu 18.04 does not detect external monitors connected via USB-C hub

Dell's D6000 dock requires a driver to be installed on Windows, and I note that there is an equivalent driver available for Ubuntu 16.04 and 18.04.

This probably isn't the answer for you on Xubuntu given it isn't the standard Ubuntu, but at least it might explain why the dock isn't working in your OS.


How to make dhclient forget its last DHCP lease?

This did the trick for me(for eth0, run from sudo su):

dhclient -r -v eth0 && rm /var/lib/dhcp/dhclient.* ; dhclient -v eth0


Does opening a new terminal tab use equivalent system resources to opening a new window when running scripts in parallel?

It is never fully equivalent in terms of resources (I assume system resources), because a window is different than a tab. Whether, for 16 windows or tabs, it will make any practical/relevant difference is another matter. You of course can test.

There are other ways to save resources. You can also run a single terminal, and run the 16 processes in the background. Yet (much) better in terms of saving resources is to avoid running a graphical server all together. Have the system boot to a terminal and run the processes there. This will save you several hundreds of megabytes of RAM to start with.


Ubuntu 14.04 apt-get dist-upgrade error on bcmwl-kernel-source

It looks like my Broadcomm Wireless drivers do not play well with latest Ubuntu 14.04 updates.

I just removed debian packages bcmwl-kernel-source and dkms.

The packages might very well run fine, but apt-get upgrade hangs, and I don't want to to deal with contantly freezing updates.

Now I can run 'sudo apt-get dist-upgrade' and smooth sailing.


Is there a way to cycle through workspaces?

Ctrl + Shift + ArrowKey works.

You can also do:

Super+S gives you a overview, and then you can double click the workspace you want.


Run these commands in a terminal

sudo add-apt-repository ppa:ubuntuhandbook1/audacity
sudo apt-get update
sudo apt-get install audacity

Source: http://ubuntuhandbook.org/index.php/2015/04/install-audacity-audio-editor-2-1-0-in-ubuntu-from-ppa/


How to convert Kilobytes to Megabytes or gigabytes through terminal?

The shell does fixed-width integer arithmetic with no check for  overflow.  So, when doing a calculation that might involve either large numbers or fractions, bc is a good choice.  To get megabytes:

$ echo "scale=2; $(sudo fdisk -s /dev/sda6) / 1024" | bc
13641.75

To get gigabytes:

$ echo "scale=2; $(sudo fdisk -s /dev/sda6) / 1024^2" | bc
12.70

The assignment scale=2 tells bc to display two decimal places.


how can I find connection info of an application which is currently downloading at top speed?

I think that the best tool is nethogs.

Unfortunately, the version available in Ubuntu 14.04 is broken, so you have to compile it yourself: See Nethogs → creating socket failed while establishing local IP - are you root?.

After that, just run:

sudo nethogs wlan0

where wlan0 is the name of the interface you want to monitor.

Use q to exit.


I did run apt update && apt upgrade and then finally kernel module installed on my machine successfully.


Nautilus: Mark files in directory as favorite

When I don't feel like using Shotwell for photo selection, my workflow goes like this:

Create a new directory, say fav
Open fav and the folder with pictures in two tabs (or, if an older Nautilus, or using Nemo, in two panes)
Hold Ctrl and use the arrow keys for navigating through the pics (usually, only tapping →), and tapping Space to select pictures of interest.
Periodically, hold CtrlShift  and drag selected pictures to other pane/tab to create links in the fav folder.


How do I get Chromium to show PDFs using Evince?

In /etc/mozpluggerrc.d edit the 40-global_defs.conf and add

### Evince
define(EVINCE, [repeat swallow(evince) fill needs_xembed: evince "$file"])

Now in  /etc/mozpluggerrc.d/62-documents.conf , the GV() & ACROREAD() (not necessary though) needs to be replaced with EVINCE() as

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file

  EVINCE() << previously ACROREAD()

    repeat noisy swallow(Xpdf) fill needs_xembed: xpdf -g +9000+9000 "$file"
    repeat noisy swallow(okular) fill needs_xembed: okular "$file"
        repeat noisy swallow(epdfview) fill needs_xembed: epdfview "$file"

  EVINCE() << previously GV()

    repeat noisy swallow(evince) fill needs_xembed: evince "$file"

Save and try opening PDF files in Chromium , it will open with evince.

Thanks to this Original Source


This is a bug in the package, you need to file a bug on dgen:

https://bugs.launchpad.net/ubuntu/+source/dgen/+filebug

And then add the information of the packages it's trying to remove.

OP has filed the bug here: https://bugs.launchpad.net/ubuntu/+source/dgen/+bug/1016944


I think there is no user named node. try this

cat /etc/passwd | grep node

if it prints node, this works

user=${SUDO_USER}
sudo -su ${user} node

if not create user named node, sth like this

adduser node
user=${SUDO_USER}
sudo -su ${user} node

and finally your scripts.sh will work.


It depends how you start X after disabling it at boot time, I think.

If you invoke a display manager such as lightdm (i.e. sudo service lightdm start) then you will need to stop the service again (sudo service lightdm stop).

On the other hand, if you start a desktop session via xinit (i.e. using the startx command), then simply exiting from the session (using the desktop's Log out... function or a commandline equivalent such as gnome-session-quit) should return you to the CLI prompt.


That's not possible, I'm reasonably sure.

But you can, as a workaround, use Gnome-Terminal. Press F11 to get the terminal into full screen mode. As soon as you hit any key, the mouse cursor disappears, giving you the full old-school feeling. :-)

Related question (Unanswered) on the Unix Stackexchange: TTY On External Monitor


What system information is useful in an emergency?

Anything that stops you from logging in (even to the console) or seeing your screen is most probably a hardware problem. Hardware is also less likely to change between when you save the information and when you need it, which makes it more useful to troubleshoot than software configuration files which can change often.

The two hardware info outputs I recommend storing are:

sudo lshw > ~/lshw-output-20120612.txt
sudo lspci -v > ~/lspciv-output-20120612.txt


Mounting external drive fails because operation not completed from Windows

Seems that the slowdown you experienced is symptom of your hard drive failure. To rescue data, you need expertise to identify the failure on your hard drive. Best you can do in that situation is try to duplicate your hard drive as soon as possible to another, every rescue attempt makes your data more compromised. To duplicate drive, you can use dd or in case your drive fails to read sectors: ddrescue. If you cannot get your data out (due to hardware errors), i suggest contacting data recovery specialist if the contents matter.


How to debug nullmodem connection between Norton commander in DOS and NC on DOSBox on Ubuntu?

Problem found.

After I put two paperclips in the left upper and middle upper port of the nullmodem cable connector and put them in my mouth (with one hand over the keyboard) i found there was no data.

Faulty cable

A new cable and test confirms there is data now. When i send data in cutecom my teeth rattle and hands shake entering the data.

I started up both Norton Commanders and it works like a charm now.

(Faulty cable thrown into garbage bin.)


How to Prevent users from copying files to usb..?

The solution is to blacklist the USB storage driver. Users will not be able to read or write files through USB sticks. This not only protects your corporate information from theft but also reduces chances of viruses entering your system.

There isn't a single parameter for blacklisting USB storage because it can vary between kernel versions.

A good write up is on AskUbuntu: how-do-i-disable-usb-storage This Q&A covers Ubuntu 12.04 through 16.04. It covers different blacklisting methods and different USB storage driver names.


My wired internet connection has stopped working

In Ubuntu does the router assign your computer an IP address? If you open a terminal and type ifconfig you should see something like:

eth0      Link encap:Ethernet  HWaddr 01:02:03:04:05:06
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::42:5dff:fe30:2342/64 Scope:Link
          inet6 addr: 2a02:1024:2048:3096:221:5dff:fe30:2342/64 Scope:Global
          inet6 addr: 2a02:1024:2048:3096:5015:f0ad:4336:5938/64 Scope:Global
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:424242 errors:0 dropped:0 overruns:0 frame:0
          TX packets:424242 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 Memory:f4600000-f4620000

If the "inet addr" shows a 192.168.x.x or 10.0.x.x address then you're at least getting an address from the router (meaning DHCP is working).

If you're not getting an IP address from the router, check your network connection settings: click the networking up/down arrows

click Edit

When the window appears click the Wired Connection 1 and Edit

Change to the IPv4 Settings tab and make sure it's set to Automatic (DHCP) (provided you're using DHCP). Also check the checkbox that says Require IPv4 addressing for this connection to complete is selected.

In your case it looks like you are getting an IPv6 address, but no IPv4 address. Some VOIP routers have issues with their IPv6 implementation. Windows tends to default to IPv4 which might explain why things work when you use Windows and not when you use Linux (which seems to be ONLY getting IPv6). Much of the world is moving to IPv6 but there are still some broken/buggy routers out there with bad implementations of IPv6. (Note: I'm using Xubuntu, your screens might be slightly different for Ubuntu).


Referring a source pydev project to another pydev project fails in eclipse

Just keep unique names for root packages in both referred and referring projects. Dont keep same package names for root packages, then it works properly.


Can't enable "Make discoverable PulseAudio network sound devices available locally" on PulseAudio Preferences

This thread helped:
https://bugs.launchpad.net/ubuntu/+source/paprefs/+bug/829051/comments/56
Just do the following:
sudo ln -s /usr/lib/pulse-13.99.1 /usr/lib/pulse-13.99

And then make sure that pulse-13.99 exists:
ls -1 /usr/lib | grep pulse


Install mod_proxy to get ProxyPass to work

In the end I guessed that the module proxy_http in the mods-enabled directory might work, and used the command:

a2enmod proxy_http

My Proxy statements work now.


sed command fail to understand with special chars

sed -e 's/^OR//' removes the first two characters of a line if they are OR since ^ starts matching from the start of a line.


You are looking at an issue, a bug, in gedit.

Steps to reproduce:

1) Open a somewhat larger text file in gedit in a window that is not maximized
2) Move the cursor to the last line
3) Maximize the window

Expected behaviour: the window is maximized and one sees the current line (the last line) at the bottom.

Observed behavior: the last displayed line is a few lines above. One does not see the line with the cursor.

When you use the left/right arrow keys, the line stays out of sight, which indeed is confusing. However, as soon as you press a left/right arrow key, or start typing, the line pops into view.

If this issue is not known to the gedit developers, it may be worth reporting it, although allegedly, it is not a severe issue.

I cannot reproduce, however, where you appear to suggest that you never can reach the last line. There is a bug reported at Debian in 2016 where the user cannot see the very last line without adding a return to the last line, but I cannot reproduce that in current gedit 3.28.1 in Ubuntu 18.04.


Ubuntu 20.04 Server 64-bit - Raspberry Pi 4 - The network icon shows me disconnected while in reality I am properly connected to the internet

I have found the answer at this link:
ubuntu server and networkmanager
You have to create a file /etc/netplan/01-network-manager-all.yaml and then write in it:
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager

Run:
sudo service network-manager restart

or reboot.


How do I upgrade OS to version 16 now that I have the ISO file

First of all, Backup Everything. I suggest to backup because you never want to run a full system upgrade without the safety of knowing your data is protected somewhere.

Ubuntu recommends to use the Ubuntu Software Updater rather than downloading the ISO.

Here is the small tutorial from Ubuntu's website. http://www.ubuntu.com/download/desktop/upgrade

While I too suggest using the built in upgrade functionality of Ubuntu, if you want a reliable ISO "burner" tool then Etcher is a great option. Etcher is simple to use and has automatic validation after the process.


Install ubuntu touch as 2nd rom GT-I9300

Siyah only supports Samsung touchwix ROM and cyanogen 10.1 based roms. Siyah is no longer in development, but googymax has a similar kernel which works with STweaks too, but I don't think it will support Ubuntu touch, but you can always try it out.

Regards


Sadly, other than that, there is no configurator for Razer devices (other than one that is now quite a bit outdated), and according to Razer, they have no plans to port their Synapse to Linux.
As for installing Razercfg, all the instructions are in the README file, but I guess I can summarize it for you:
The following is required in order to install:

Python 2.5 or 2.6 (should be installed by default)
libusb (1.0<)
QT4 Python Bindings (python-qt4 in the Debian/Ubuntu repos)
CMake  (2.4<) (cmake in the Debian/Ubuntu repos)

Extract the archive, then, in terminal, move to the directory you just extracted. Next, type cmake, then make. After that, you will want to switch to root (sudo su) and then type make install.
Again I'll say it: all of this is in the README file that comes with razercfg. It's not terribly difficult to follow the instructions in it, but just in case it is, this guide should be a bit easier to follow.


Dash becomes black after startup in Saucy

Try the following, as I believe it is related to issues with Intel iGPU drivers which ship with Ubuntu by default, as a number of other Intel users are having this same problem.

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

This will add the oibaf PPA, switch the obaif PPA to Raring as it currently doesn't support Saucy yet, then upgrade all of your open source graphics drivers to the latest 'Updated and Optimized' open source graphics drivers.


There are 2 directories where you can put your extensions, one for manually installed ones and the other one for automatically installed ones.
You should not touch this last one, and you should put everything in:
/home/[USERNAME]/.local/share/gnome-shell/extensions/.
The one you should not touch is: /usr/share/gnome-shell/extensions/.
After this, you should activate the extension from tweaks or the extensions app.


Try resetting the configuration as follows:

vlc -I qt4 --reset-config --reset-plugins-cache


Grub can not read an encrypted partition. Encrypting the root partition requires a specially set up /boot partition that is not encrypted so that grub can boot, mount and decrypt the root partition.

This is not something done by an update. You likely acquired some form f malware/virus. A reinstall is the easiest recourse.


Ubuntu goes black after kali tools installation reboot

Whick Kali Tools you were trying to install?

If you were using repositories hosted on launchpad.net e.g.

deb http://ppa.launchpad.net/wagungs/kali-linux/ubuntu YOUR_UBUNTU_VERSION_HERE main
deb-src http://ppa.launchpad.net/wagungs/kali-linux/ubuntu YOUR_UBUNTU_VERSION_HERE main

Kali tools are not supported for Ubuntu 14.04. You can check the link

https://launchpad.net/~wagungs/+archive/ubuntu/kali-linux

Latest Ubuntu version supported is 13.04.


Can bash get out of sync with the filesystem?

The only experience I've seen with something like this was when a directory was being removed and a new one created. AIX and Solaris had this issue years back. If you have an open shell session in a removed directory you can get unpredictable results back that look like a file system getting out of sync.

bash1: mkdir test1
bash2: cd test1
bash1: touch test1/testfile
bash1: ls test1
testfile
bash2: ls
testfile
bash1: rm -rf test1
bash2: ls
???(unknown results)???

The encrypted file system sounds like something to review as well.  Have you tried in an unencrypted file system?

Sorry I cannot post comments yet.  Not enough points.


System performance drops when even 1 core is busy on Ubuntu 18.04 or 18.10

Try forcing your application to use the last system core your processor has available.  Make sure it is an actual core VS a hyperthread.

For example, do a ps and learn the process Id of this simulation.  Then do:

taskset -p 0x14

I believe that should put it on the last core (no hyperthread) for a single core.  You can do multiple cores as well, just need to tweak the taskset parameters.

Also, try running "top" and pay attention to processor usage to confirm that the program you're running is actually using 1 core.


Yum install fails on Ubuntu EC2 instance

Ubuntu is based on Debian, which uses apt not yum which is what Red Hat uses. The Debian equivalent of:

yum update -y

Would be:

sudo apt-get update

As for your results when running apt-get install yum

Err http://us-west-2.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libnss3 amd64 3.14.3-0ubuntu0.12.04.1
403  Forbidden

Would seem to indicate you don't have access to that file (I get the same forbidden error myself).

apt-get update should resolve your 404 errors, which are probably just caused by an unsynced or outdated package index.

I'm not entirely sure how Amazon operates their EC2 servers, but you should be able to install a LAMP stack withtaskel see: What's the easiest way to set up a LAMP stack?


Is there a public calendar for key Ubuntu events?

Here's is the official calendar:

http://ubuntu-news.org/calendars/fridge/

And here are the instructions. Note that some teams have their own team calendars as well, but generally speaking anything important is put on the fridge calendar.


Unable To Install VMware WorkStation 8 on ubuntu 12.04

Follow below commands one by one after opening a terminal

sudo apt-get install patch
mkdir vmw_patch && cd vmw_patch
wget -O- http://weltall.heliohost.org/wordpress/wp-content/uploads/2012/01/vmware802fixlinux320.tar.gz | tar -xz
./patch-modules_3.2.0.sh

Related Question:

Is VMware 8 compatible with Ubuntu 12.04?


how to know process pid of bash function running as child?

Try $BASHPID instead of $$. One of the two occurrences of $$ in the man page is to explain when it differs from $BASHPID, including "subshells that do not require bash to be re-initialized", which may include your background function processes?


Basically, GRUB bootloader is the software that loads the Linux kernel. (It has other uses as well). It is the first software that starts at a system boot.

When the computer starts, BIOS first run a Power-on self-test (POST) to check hardware like memory, disk drives and that it works properly.

Then BIOS checks the Master Boot Record (MBR), which is a 512 byte section located first on the Hard Drive. It looks for a bootloader (like GRUB). The hard drive's partition tables are also located here.

Then you'll be prompted by the GRUB menu which can contain a list of the operating systems installed (in the case of dual boot), or perhaps the different kernels installed in a Linux distro.

When you choose which distro or kernel you want to use, GRUB loads the selected kernel. The kernel starts init (or systemd), which is the first process to start in Linux. init then starts other processes like network services and other that you might have configured to start at boot time.

The boot process contains alot of defined expressions and terms, way to much to add in a simple answer like this. Google is your friend!

Remember that this is a very basic explanation of the boot process and GRUB's role in it.

This youtube video provides a pretty nice introduction to the linux boot process, including basic information on the GRUB Bootloader:

Understanding the Linux Boot Process - CompTIA Linux+, LPIC-1


If I understand the question correctly, you would like to be able to switch workspaces independently for each screen, so that for example the left screen could be on workspace 1 and the right screen on workspace 3. This is supported by some window managers, most notably XMonad, and I personally find it extremely convenient in a dual-head setup. Moreover, it's perfectly possible to integrate XMonad with GNOME without sacrificing usability.

On my home machine I currently have a much simpler setup, with the default window manager. I like to have a music player visible on one of the screens at all times, so I just pinned the player to the visible workplace in order to emulate a “separate workspace”. This doesn't really solve a problem, but might be helpful anyway.


Kubuntu 17.04 throttles CPU clock speed, while ElementaryOS doesn't

I would use cpufrequtils to check how ubuntu is configured

sudo apt-get install cpufrequtils

then check what is set now on ubuntu

sudo cpufreq-info -p

You can check the different policy

sudo cpufreq-info -g

will return something like

conservative ondemand userspace powersave performance

now set to on demand or performance

sudo cpufreq-set -r -g performance

The -r flag is used to set the change for all ("all hardware related") cores


How to make NVIDIA GEFORCE 710M a default graphics on Ubuntu

If you want to keep your Nvidia optimus technology to save battery life, you could use Bumblebee from apt-get as Danatela said. Then, optirun name-of-the-program will allow you to set name-of-the-program program to run with your Nvidia GPU.

If you don't care about battery life, all you have to do is to switch from Nvidia Optimus to you Nvidia GEFORCE in the BIOS.


You can install OpenJDK 6 using sudo apt-get install openjdk-6-jre and set it as default using sudo update-alternatives --config java and then selecting the OpenJDK 6 one.


WiFi keeps disconnecting while using a Proxy

It could be a problem with your proxy server , please check your account with some other OS'. (Like a windows os or something like that)


How can I access my Windows from Grub again?

You may need to reconfigure -
To boot to Windows, if Windows is installed on first drive/partition, enter in grub command line:

insmod chain
insmod ntfs
set root=(hd0,1)
chainloader +1

More info: https://www.gnu.org/software/grub/manual/html_node/Chain_002dloading.html#Chain_002dloading for more details.


From what I know: Yes, it's a safe way to do it, it's exactly the same as saying sudo shutdown now -h -H.

It's the same on Windows and any other OS. If you long press the shutdown button, that's an unsafe way of doing it.


Use the command

sudo passwd <your username>

This is does not  check for security, so it should let you change your password to the one before.


HP LaserJet 1020 always asks for driver install

@Vnuk: I have the same printer and went through the same problem.  Run the utility with sudo rights from the console:

sudo hp-plugin-ubuntu

That way it will download and install the plugin without issues.


Try to install the new version of Ubuntu (v. 14.10) and you should solve the problem, because it was wirtten to fix the problem of the UEFI boot introduced with the release of Win 8.

Moreover, check the model of your PC and be sure you can do that; for instance, if you own an HP/Compaq it is likely enough you cannot install 2 partitions on your PC cause of a building stuff.

Anyway, click here to find the right guide to the installation procedure.


The short answer is "no".

The long answer is "yes but . . ." You've re-partitioned the drive with a different type of data structure (ext4) that Windows can't recognize, so the original partition table that tells an operating system what is data and where it is is gone, and some of the data has been overwritten by the new version of Ubuntu you've installed. Much of your original data is likely still on the hard disk, but there is no way to find it, and every time you use the drive for anything, even booting the computer from it, more of this remaining data that you can't get will be over-written. It is possible (but exceedingly difficult) to recover some of the data in situations like yours, but it's not something you can pick up with a quick Google search, and it's something that gets harder the more you use that computer. At the very least, you'll need another disk to boot from, perhaps a Live DVD like you installed Ubuntu from, or you could remove it from that computer and use it as a second drive in a different computer so you can read from it without writing to it.

As you can see, this is not going to be easy. Backup often!


How can I type and read Thai language in text mode of Ubuntu, (no GUI mode)?

You can type Thai text quite normally inside programs and whatnot that are unicode compliant (for example, vi and nano).

However, the commands must still be run in English, as the system does not know what the translation of each command is to Thai. Note that you can usually pass arguments (like --name <name>) in Thai, but this depends on the application at hand.

In order to do this, you just need to set your keyboard layout to Thai format, and make sure your SSH client can forward and see the Thai letters and unicode symbols correctly. You can do this by setting your locale.

Edit your ~/.ssh/config (or whatever SSH config file you use) on your side of the link and add the below lines:

Host *
SendEnv LC_*

Restart your shell session, and be sure your local shell actually does support Thai.


How can I test the system footprint of applications?

You could simply do time command, it will give you something like this:

$ time sleep 3
real    0m3.001s
user    0m0.000s
sys 0m0.000s

If you need more output, use /usr/bin/time -v:

$ /usr/bin/time -v sleep 3
Command being timed: "sleep 3"
User time (seconds): 0.00
System time (seconds): 0.00
Percent of CPU this job got: 0%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:03.01
Average shared text size (kbytes): 0
Average unshared data size (kbytes): 0
Average stack size (kbytes): 0
Average total size (kbytes): 0
Maximum resident set size (kbytes): 2192
Average resident set size (kbytes): 0
Major (requiring I/O) page faults: 1
Minor (reclaiming a frame) page faults: 181
Voluntary context switches: 3
Involuntary context switches: 1
Swaps: 0
File system inputs: 16
File system outputs: 0
Socket messages sent: 0
Socket messages received: 0
Signals delivered: 0
Page size (bytes): 4096
Exit status: 0


It is possible that normal upgrade notifications may have been disabled.
Please check Softwares & Sources > Updates > Notify me of a new ubuntu version
Select 'For any new version'.
If it still doesn't work try this from the command line:

do-release-upgrade

If this doesn't work either, you can post the output of the command for further looking into.


You download an .ISO and need to burn this to a DVD or an USB stick; depending on what your server has available. Then, with the DVD in the system you reboot it and it will start the installation where you end up with a "dual boot" system.

Or you install a virtual machine (VM) in Windows 8 (ie.VM Ware or virtualBox) and install Ubuntu from within the VM.

Mind you: if you want it as a dual boot you need to turn off BIOS settings like "fast boot" and need to shutdown W8 without using "hibernation".

  There were no .exe or .msi files in the disk

Why would a Linux installation be an .exe or .msi? Those are Windows extensions.


I've fielded this question a few times over the past few years, and my rule of thumb is to explain that there are many laptops for which it is nearly impossible to install the correct drivers to put it to sleep properly without encountering the problem you describe (or worse).  In such cases your only option is to configure your power settings to do something besides putting the computer to sleep when the lid is closed.

Under "System Settings", "Power", you can select the correct action for what to do when the lid is closed.  Your options should include such choices as, stay on, go to sleep, or shut down.  I never got in the habit of closing my laptop without shutting it down first, so I've never had that problem.


You're misunderstanding what rsync does. Unlike what the name suggests, it doesn't really sync anything on its own. It works almost the same as cp, except that it when it encounters the same file on the destination, it only updates it if it has changed. That is helpful when you're copying over a network, because it can save bandwidth. It does not, however, monitor files.

A better solution in your case is to move your .emacs directory to ~/Dropbox/.emacs, and have ~/.emacs be a symbolic link to it:

$ mv .emacs ~/Dropbox
$ ln -s ~/Dropbox/.emacs .emacs

Then you don't need any local syncing.


How can I convert my root partition from BTRFS to EXT4?

I'm just going on the available tools, not experience or documentation. You might want to test this with a partition (even just an image) you don't mind losing if it all goes wrong. Don't attempt this without taking a backup.

btrfs-convert has a roll-back function to undo a conversion. I'm not sure if this works for partitions that weren't converted to btrfs with btrfs-convert.

Start by unmounting the filesystem. If it's essential to the system, boot into a LiveCD.
Install btrfs-tools

sudo apt-get install btrfs-tools

Roll back the conversion

sudo btrfs-convert -r /dev/sdXn


Mongod server not woking due to the following error

Try this :

ps wuax | grep mongo

You should see something that looks like this

Savio           10592   0.5 0.4 2719784 35624   ?? S     7:34pm   0:09.98 mongod
Savio           10911   0.0 0.0 2423368   184 s000 R+   8:24pm   0:00.00 grep mongo

or find word mongod.

and then

sudo kill 10592

after that start mongod again.
for me its work, for error addr alredy use.


Can't switch back from noveau driver to nvidia proprietry driver

Thanks Samik for your reply but I found a solution for this problem and it worked, at least for me.

What I did was copy all the nVidia drives files (.deb files) from my /var/cache/apt/archive and pasted them on the Desktop, then opened a terminal and typed the following:

cd Desktop
sudo dpkg -i *.deb

Then waited for the installation to complete, then I typed sudo nvidia-xconfig, then restarted my system.


Gedit taking 20 seconds to start up on i3

I figured it out.

Instead of having exec i3 in my ~/.xinitrc, I replaced it with dbus-launch --exit-with-session i3, that way dbus was correctly initialized.


Two docks appearing after mac os customization

I also have a problem like this... but I have two identical docks on top of each other!

Disabling the Gnome extension Dash to Dock fixes it, but loses the d2d changes I install it for!


why is a "Dynamic User" appearing in my "Users"?

I think that's a new thing with GNOME 3.28.  I think its for a "Guest" user.  I recall reading a bit back somewhere about this feature.  Anything done in this account is NOT persistent.  So browser stuff, ssl keys, etc are not kept.

I am on my mobile killing time waiting so I could be wrong.  But I am rather confident this is what you are referencing.


Where are logon and startup scripts for graphical settings located and how are they managed?

Programs that start at login in a graphical environment are called from .desktop launcher files in ~/.config/autostart and in /etc/xdg/autostart/. Here are the specifications for the autostart launchers. It's basically just a special case of the normal .desktop specification


Here we shall take www as the service for routing. Use mangle table of iptable for modifying the www packets.

sudo iptables -t mangle -A OUTPUT -p tcp --dport 80 -j MARK --set-mark 0x1

We are marking all packets with destination port 80 as 0x1 .

Now save and restart iptables.

service iptables save
service iptables restart

Next, create a new IP route table in /etc/iproute2/rt_tables by just giving an entry

100 wwwtable

Write rule for www packets.

ip rule add fwmark 0x1 lookup wwwtable

Add route at new table wwwtable. All other traffic will go through the
default gateway, which can be seen by ip route show command.

We copy all entries except default gateway entry from main table.

sudo ip route show table main | grep -Ev ^default | while read ROUTE ; do ip route add table wwwtable $ROUTE; done

Add default gateway entry for www packets to table wwwtable

sudo ip route add default dev ppp0 table wwwtable

Use ip route show table wwwtable to show all routes at wwwtable.

Repeat everything for https on port 443.


You can either

Try opening the file using an editor (like gedit) and see if it helps you see the link's target.

Use lnkforward (Kubuntu Only)

Use Strings
strings filename.lnk
Gives out lots of information, including the target location.

Example
[1940][DC++]$ strings Uninstall.lnk
home
nemo
.wine
drive_c
Program Files
DC++
uninstall.exe
C:\Program Files\DC++\uninstall.exe


Your setup looks fine. I guess that you are affected by issue 42: [VGL] ERROR: Could not open display :8 if a program forks and exits optirun.

This bug occurs when running an application with optirun which detaches. Workaround: open a shell and then run the program:

optirun bash
yourprogram


So is it true that HP printer no longer work with Linux at all?

As far as I can tell that simply means that HP does no longer officially support Linux drivers. That's far from saying that HP printers don't work on Linux.

Looking at HPLIP project news page, updates are coming at constant pace http://hplipopensource.com/hplip-web/news.html

Before buying a new printer/scanner search "linux [printer-model-number]" to check if it is working on linux. That is a common practice for any device actually, not only printers.


How do you dim desktop screen 20.04 LTS?

I suggest you to use brightness-controller which allow you to modulate brightness easily on ubuntu

sudo add-apt-repository ppa:apandada1/brightness-controller

sudo apt-get update

sudo apt-get install brightness-controller


We'll need more details, although I suspect you've already worked through this issue.

Type dmesg and append the last few lines output to this bug for more help.


How can I install PS3 joypad in wireless - bluetooth- mode (Steam compatible)?

QTSixA has Bluetooth support for PS3. There also have been a few patches for the Linux kernel a while back that should make it work out of the box without any extra drivers, that would however require a more current version of Ubuntu.


First of all, go into your BIOS settings by pressing DEL or F2 or F10  after you power ON . A screen would come up with various options. Search for UEFI or Secure boot option across it,and disable it. Save and exit.

Follow instructions
Boot-Repair


Dual boot UEFI Windows 7 and Ubuntu 12.04 (both 64 bits). W7 entry doesn't appear in GRUB

Find where the windows bootloader resides by mounting the efi partition:

sudo mount -t vfat /dev/sdx1 /mnt/efi/

And search for bootmgfw.efi. Then, find the UUID of the drive:

sudo grub-probe --target=fs_uuid /mnt/efi/EFI/Microsoft/Boot/bootmgfw.efi

Add this UUID to /etc/grub.d/40_custom:

menuentry "Windows x86_64 UEFI-GPT" {
    search --fs-uuid --no-floppy --set=root UUID
    chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
}

Finally run update-grub.


Error in creating lxc container on Ubuntu 16.0.4LTS 32bit

I was able to fix this issue. The problem was with the openssl installation on my distribution.
Few days back, I was messing around with openssl and its ca certificates. that seem to have messed up my system-wide openssl.
I reinstalled the openssl and everything worked fine.

It was little work to find out the cause though. the lxc-download template script does not throw any informative errors, so I had to look around a bit. And eventually found out that the ca certificate verification was failing.


Try activating all software sources in Software & Updates:


If you child.sh print on standard output $create_sql value, you could get it in parent script:

  create_sql=`./child.sh "$dictionary"`

After this line, you should test child.sh exit value with $? and if it returns 0 you could use $create_sql variable.

This approach is useful when script is like a function, otherwise is better follow muru suggested answer.