Boot fails with "Loading initial ramdisk ..."

Again an idea from @heynnema (thanks!)

lsinitramfs didn't work on all 3 non-working initrd.img files (149, 151, 153).

root@gan:~# lsinitramfs /boot/initrd.img-3.13.0-153
/boot/initrd.img-3.13.0-153

gzip: /boot/initrd.img-3.13.0-153: not in gzip format
cpio: premature end of archive

Then this here this morning ...

root@gan:~# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.13.0-151 linux-headers-3.13.0-151-generic
  linux-image-3.13.0-151-generic linux-image-extra-3.13.0-151-generic
Use 'apt-get autoremove' to remove them.
The following packages will be upgraded:
  amd64-microcode
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.3 kB of archives.
After this operation, 2,048 B disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://xx.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64-microcode i386 3.20180524.1~ubuntu0.14.04.2+really20130710.1 [26.3 kB]
Fetched 26.3 kB in 0s (387 kB/s)
(Reading database ... 132952 files and directories currently installed.)
Preparing to unpack .../amd64-microcode_3.20180524.1~ubuntu0.14.04.2+really20130710.1_i386.deb ...
Unpacking amd64-microcode (3.20180524.1~ubuntu0.14.04.2+really20130710.1) over (3.20180524.1~ubuntu0.14.04.1) ...
Setting up amd64-microcode (3.20180524.1~ubuntu0.14.04.2+really20130710.1) ...
Updating microcode on all online processors...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4.11) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-153-generic

Booting worked again !!!

lsinitramfs now as well!

root@gan:~# lsinitramfs /boot/initrd.img-3.13.0-153-generic
/boot/initrd.img-3.13.0-153-generic
.
sbin
sbin/biosdevname
...

Updated other initrd.img files also (149 and 151).

root@gan:/boot# update-initramfs -c -k 3.13.0-151-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-151-generic
root@gan:/boot# update-initramfs -c -k 3.13.0-149-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-149-generic

All 3 were accepted now by lsinitranfs.
All 3 could be used for booting.

Hence, the source of the issue was amd64-microcode. This took 2 weeks for a fix to appear.

For testing purpose, I manually built initrd.img-3.13.0-153-generic using update-initramfs. The result was not exactly the same as the one built by apt-get update, but it worked as well.

Thanks for all the help!


How to forcefully delete files (system files)

How to delete an SD CARD

Hi,

... try the "dd" command. It securely overwrites all with zeros. First, get the device by :

sudo fdisk -l
Your device will be something like sdX.
(sdX --> only an example device name)

and be sure to identify the right device. Then use "dd" to overwrite the sd card with ZEROs:

sudo dd if=/dev/zero of=/dev/sdX

While dd is working  on your sd card, you won't see a progress bar , so wait until dd has finished :o)

alternatively try this "shred" command (it takes time !!!):

sudo shred -vfz -n 100 /dev/sdX

You will find here an example, how to use "shred" with sd cards.

Kind regards


For some reason you trying to download Ubuntu 6.06 aka Dapper Drake which is of course not supported for some time. You should check your Software Sources or check file /etc/apt/sources.list.

Looking at your file:

deb-src http://archive.ubuntu.com/ubuntu dapper main multiverse
deb-src http://archive.ubuntu.com/ubuntu dapper-updates main multiverse
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner

These lines need to be commented out:

sudo nano /etc/apt/sources.list

add a # in-front of the lines above i.e.

#deb-src http://archive.ubuntu.com/ubuntu dapper main multiverse
#deb-src http://archive.ubuntu.com/ubuntu dapper-updates main multiverse
#deb http://archive.canonical.com/ lucid partner
#deb-src http://archive.canonical.com/ lucid partner

Save.

Run

sudo apt-get update && sudo apt-get upgrade

Reboot

Then perform the upgrade as per:

How do I upgrade to a newer version of Ubuntu?


Why when setting display to 1280x1024 it set's the display on 1920x1200?

You can find out the rest of parameters with the command:

cvt 1028 1024 60

Copy all the line starting with "Modeline" except this word.


SSH and VPN Cisco connection working on one laptop but not on another. Both laptops using Ubuntu 14.04. Where is the difference?

To connect to vpnc without using the vpnc manager install vpnc using

sudo apt-get install vpnc

Then create a file mycnf.conf containing the following information

IPSec gateway xx.xx.xx.xx
IPSec ID xxx
IPSec secret xxx
Xauth username xxx.xxx
Xauth password xxx

where xxx need to be replaced by your network and account details.
You may not need to use all the settings (all the lines),
or you may need to add more settings (more lines) into that file.
This depends on your network properties.

Then replace the default vpnc configration file by running

sudo mv mycnf.conf /etc/vpnc/default.conf

Then connect with

sudo vpnc-connect

To disconnect use

sudo vpnc-disconnect

This does not give the answer to the question, but it provides a solution to the problem. Apparently, there is something going wrong with the vpnc manager based on package network-manager-vpnc. Unfortunately, I was not able to find what. Also, note that this answer has already been posted here: CISCO VPN configuration steps. What is new here is that network-manager-vpnc may not work whereas vpnc may do.


Why does a custom PPA offers to update gnome keyring?

You'd have to ask the person who maintains the PPA why they are adding that to the PPA. A person who runs a PPA can put whatever they want into it.

Are PPA's safe to add to my system and what are some "red flags" to watch out for?


What software was used to make the Software Center mockups?

Those specific designs are made by hand by Matthew Paul Thomas on graph paper.


when you did apt-get remove php5 you have just removed the meta-package.

To list all php5 packages you have installed you need to do: dpkg -l '*php5*' and then remove all installed, or just do apt-get remove php5-common, which will remove "base" package which is the dependency of all other php5 packages in the dependency chain and thus remove all installed php5 packages.

Cheers,
Ondrej


How can I disable USB autosuspend for a specific device?

Ubuntu 16.04 (Xenial Xerus)

sudo apt install tlp
sudo lsusb

Find the USB device's input id - it should look like 1234:5678.

Edit the file sudo vi /etc/default/tlp and add your device's input ID to USB_BLACKLIST by adding the following line with your device's input id like so:

USB_BLACKLIST="1234:5678"

Ubuntu 14.04 (Trusty Tahr)

As mentioned here at hecticgeek.com, the trick consists of two parts:

Using lsusb to ascertain the device IDs of the USB devices you wish to disable autosuspend for.

And then adding them to AUTOSUSPEND_USBID_BLACKLIST in the /etc/laptop-mode/conf.d/runtime-pm.conf (usb-autosuspend.conf until Ubuntu 14.04) configuration file (details are well documented in there as well).


After numerous attempts I found a way to get my LBP1120 to work by using 32 bit driver instead of 64 bit one. Following:
Can't get my Canon LBP printer to run under Ubuntu 14.04 my solution to the problem is as follows:

Installing the Linux capt driver

dpkg --add-architecture i386
apt-get update
apt-get install libstdc++6:i386 libxml2:i386 zlib1g:i386 libpopt0:i386
apt-get install cups

wget # I will fix soon but Linux_CAPT_PrinterDriver_V260_uk_EN.tar.gz

# Now the system is prepeared for 32 bit driver
dpkg -i Linux_CAPT_PrinterDriver_V260_uk_EN/32-bit_Driver/Debian/*.deb

Configuring LBP1120

lpadmin -p LBP1120 -m CNCUPSLBP1120CAPTK.ppd -v ccp://localhost:59687
lpadmin -p LBP1120 -E
ccpdadmin -p LBP1120 -o /dev/usb/lp0

# Not sure if works flawlwslly but this should start ccpd driver on boot
update-rc.d ccpd defaults

Now you should connect the printer and try to get two numbers of command:

/etc/init.d/ccpd status

by starting (from my experience I do this until it works) and stopping:

 /etc/init.d/ccpd stop
 /etc/init.d/ccpd start

Now if you have managed to get the two magical numbers then you are ready to open captstatusui with:

captstatusui -P LBP1120

and see if your printer shows that it is ready to print. If you at this point get the message:

Check the followings:
-Is the printer turned on?
-Is the cable correctly connected?

then try to detach other USB peripherals (for example Logitech K360 had interfered)


Symbolic link can't find the needed executable files

Ok, thanks to @"Jacob Vlijm" I solved the problem. Just create a script in the folder where your "$PATH" points to, and add a single line command that states:

~/full/path/to/openttd

And name it as whatever you want, then, simply run the script by writing the name of it in the console.


Ok so by running

sudo dpkg-reconfigure keyboard-configuration

(which I had tried before), I needed to select the French-Switzerland default package, as the Macintosh one does not work ('cannot find "fr_mac" in "macintosh_vndr/ch".'). Better than before at least.


Streaming a playing song to other users via Banshee or Rhythmbox

The task you are asking for is setting up an internet radio stream. This can best be achieved by running an combination of Icecast2 with Ices2 (for OGG Vorbis streams) or Darkice (for mp3).

By this doing so we are able to broadcast the sound of our local sound card over the internet using a well established and stable protocol independent of local music players  used (you could even broadcast the sound from a microphone).

See also this answer for a guide to a basic setup or visit the Icecast documentation site for further details.


Install "Gnome Alsa Mixer" from the software Center and try adjusting the volume labels though it.


Bluetooth Atheros 0cf3:3004 does not work in Ubuntu 14.10

There was a problem with this device, but it has been fixed. You just need to upgrade your kernel using routine procedure. Run in terminal:

sudo apt-get update && sudo apt-get upgrade

Then turn off your computer and turn it on again. This is needed to reset bluetooth chip.

After that bluetooth should work.

There is also an issue sometimes that bluetooth can not be turned on using System Settings applet. In this case turn it on by the indicater at the top of the screen.


Go into BIOS setup and change boot order so that sdb drive comes first.


Scanner part of USB multifunction printer/scanner not found

The sane-pixma library implements a  SANE  (Scanner  Access  Now
  Easy)
         backend  that  provides access to Canon PIXMA / i-SENSYS / imageCLASS /
         imageRUNNER multi-function devices (All-in-one printers) and the  Canon
         CanoScan  Flatbed/TPU  scanners.   The  backend implements both the USB
         interface and network interface (using Canon's  BJNP  and  MFNP  proto
         cols).  The  network  interface  supports scanners over IPv4 as well as
         IPv6 (MFNP over IPv6 is untested).

This backend is required in order to get your scanner to work under sane

While I do not have your scanner and cannot test, it appears that you are missing the libsane-pixma.so library that supports the Canon Pixma MG5700 series for sane. The package that contains it is libsane-dev, is in the repositories and can be installed with the command sudo apt install libsane-dev

You can confirm that you have the file with the command find /usr -name *.so | grep pixma

Sources:

http://www.sane-project.org/man/sane-pixma.5.html

https://packages.ubuntu.com/xenial/libsane-dev


How can I convert a drive from ext4 to NTFS without losing the data?

There is no way to convert a drive directly from ext4 to NTFS file system without losing all the data that is stored on the drive. All of the data on a drive that is not backed up and stored somewhere else will be lost when the drive is reformatted.


You're not going to like this answer: You can choose between low-latency or monitoring.

Why? Well, to be able to make a low-latency kernel, some things are taken out of the kernel..

That being said, this is open source, so if you really want to have CPU frequency tracking in a low-latency kernel, build your own kernel and #undefine a few #define statements!

Hint: grep --directories=recurse --ignore-case latency linux-3.18.3/* | grep --ignore-case "#define"

(Yeah, I only looked through the most recent stable kernel, not yours...)


I had the exact same problem, here is how i fixed it.
Blueman somehow fixes the default bluetooth manager (bluez), but u will have two bluetooth icons
Blueman has a plugin named AppIndicator that allows it to show in the system tray.
So all you need to do is remove the plugin's files (to hide blueman's tray icon) & use the default bluetooth manager (bluez) to transfer files:

sudo rm '/usr/lib/python2.7/dist-packages/blueman/plugins/applet/AppIndicator.pyc'
sudo rm '/usr/lib/python2.7/dist-packages/blueman/plugins/applet/AppIndicator.py'

Then restart/logout to see the results.

I hope this helps


How can I install Ubuntu One for Windows onto a memory card or USB flash drive?

Ubuntu One must be installed into the OS in order to access the cloud. If you have Windows installed on a USB, then YES.

The personal cloud that brings your digital life together. For Windows XP, Vista and 7.

also available for iPhone and Android

Source


You haven't provided specifics as to your box - are you using uEFI, Secure uEFI or BIOS in booting?  I'll assume BIOS and walk through a common process I do.
For my own boxes (where I QA-test and install releases many times per week) and often have 1-6 (GNU/Linux but mostly Ubuntu flavors) systems installed on a box, the last installed will always end up owning the grub and after validating all is good with the last QA-test install (& reporting the test on iso.qa.ubu.com...),
I boot the system I want to own grub and
sudo update-grub
sudo grub-install /dev/sda

I use the first update-grub command so it's made aware of my last install and any changes (say a Lubuntu hirsute daily which may have a later kernel than the prior install present).  Secondly I make that OS take ownership of the MBR (master boot record) of the disk the BIOS system boots (in this example it's my Debian Bullseye/sid; I don't test on my primary system which runs Lubuntu).
I've assumed BIOS for this, following steps I do very regularly on one box in particular  but adjust for your specific box; on some it won't be /dev/sda


How to set LibreOffice to suggest corrections for UK English?

It's pretty straightforward to setup British spell checking- I did it a while ago as I am in the UK, so it's pretty important for me. My version of Libreoffice is exactly the same as yours: the default 3.5.x series version for 12.04.

For some reason this UK dictionary isn't included with the Ubuntu packaged version, even though it is when you download it on Windows and the UK spell checking is enabled.

Please go to the official list of dictionaries and choose kpp-british-english-dictionary and download it to your desktop or downloads folder. Now open that downloaded file with LibreOffice itself and you will be presented with this screen:

Now, make sure that it is enabled, and restart Libreoffice and open Writer, select English UK and it will auto highlight your mistakes as below, as long as the other settings are set to English UK in Tools > Options > Language Settings > Languages.

Also, it is important to make sure AutoSpellCheck is enabled.

On getting also thesaurus/synonyms, there is already this answer.


Install gtweakui
Then goto System > Preferences > gTweakUI-Nautilus.

Under the Desktop, check Use Nautilus to draw desktop.
Alternate Way:

Press Alt+F2 and type gconf-editor and click run.

Navigate to apps/nautilus/preferences on the right side you will see show_desktop be sure you have check mark there.

You can execute the following command in terminal instead,
gconftool-2 --set /apps/nautilus/preferences/show_desktop --type bool 1

This will enable right click in your Desktop.


Disk very slow after going from 9.04 to 10.04

Maybe it has to do with a bad kernel issue: http://ubuntuforums.org/showthread.php?t=1039476

I'll try later installing a server kernel to see if it solves the issue.

Edit: Actually older kernels still do have this issue. Maybe a server kernel?


How to automatically mount 2nd internal Hard Drive

If you want to mount the second hard drive automatically you will have to change things at this point :D. There should be no reason to have it symbolically linked anywhere for a second hard drive.

If it is mounted at /media/username/a bunch of numbers  and you have that linked to a folder off the root called /SecondDrive ... you don't need to do that you can actually automatically mount it on the root called /SecondDrive. It isn't that difficult I will run you through the steps and if you want.. after you see the answer you can reply with where you want it mounted, the information you gathered from following the steps and I will tell you the exact line that has to be added to your /etc/fstab

First terminal and type  sudo blkid this will spit out a bunch of lines which may be wrapped and hard to read .. i suggest opening the terminal full screen or making it quite wide so you can get all the lines without wrapping. You will have an output that looks something like this

dev/sda1: LABEL="boot" UUID="e8b77b10-fd99-4c90-845d-310e8afc25df" TYPE="ext2" PARTUUID="00098acd-01"
/dev/sda5: UUID="c5653896-3d1b-48b4-855a-e76e6d88711a" TYPE="swap" PARTUUID="00098acd-05"
/dev/sda6: LABEL="root" UUID="0ae6d08b-d9c5-4109-9100-9a18fb068b2e" TYPE="ext4" PARTUUID="00098acd-06"
/dev/sda7: LABEL="home" UUID="ddffd3ed-205b-447d-852d-4552619e35d3" TYPE="ext4" PARTUUID="00098acd-07"
/dev/sdb1: UUID="720824B65B01A6C4" TYPE="ntfs" PARTUUID="21039491-01"
/dev/sdc1: LABEL="storage" UUID="0AED64E911A2FB1E" TYPE="ntfs" PARTUUID="e071ab3f-01"

Look for the partition you want to automatically mount and take note of the UUID and TYPE of the partition.

For example if I wanted to mount /dev/sdc1 I would open gedit or something you are familiar with to type text .. and copy the UUID and TYPE UUID="0AED64E911A2FB1E" TYPE="ntfs" then paste it into the editor so I can easily copy it when I need it

Now say I want it mounted right off / and I want to call it storage

I would first have to make an empty folder located at /storage if one didn't already exist .. if one does exist it needs to be an empty folder.

sudo mkdir /storage

We now have everything we need

Now we need to open /etc/fstab. This has to be done as root and I myself like to use gedit over a terminal to edit this  so next in terminal type

sudo gedit /etc/fstab

This will contain all the partitions that mount at boot. You would need to add a line after all the others

The prefered format of the fstab that you have to worry about is UUID, mount point and type

So at the end of the file after everything else we would add the UUID a space then the mount point a space then the type .. .there is more but you don't have to concern yourself about it just remember to add the stuff I printed out after the type in my example full fstab line :D  With the information we got from block id (blkid) and where we decided to make our mount point the line would look like this

UUID=0AED64E911A2FB1E /storage ntfs defaults 0 2

note that there is no quotes like blkid printed out so make sure if you paste in the UUID  and type from the information we pasted into the editor for later use, that you remember to remove the quotes.

save the file and .. make sure the partition/drive isn't already mounted previously .. then type

sudo mount -a

you should not get any errors and you should see the drive/partition mounted at /storage  (if you already had files on it you would see them now and the drive would be mounted) ... at this point every reboot the drive/partition would be mounted at /storage

Do not use this method to automatically mount a USB partition because if it is not plugged in during boot it can majorly slow the boot process or even cause the system to stop responding. This method should only be used for permanently installed hardware


Nautilus tags/labels/marks/columns for folders/files

This can be achieved with extended attributes:

setfattr -n user.xdg.label -v "red" file.txt


More Wireless problems in 16.04 LTS (Connection Desperation)

I am writing this in order to hopefully help you and the inevitable searchers understand more about the process of identifying and correcting wireless problems. It is fruitless to blindly apply fixes found around the internet forums without verifying that your device is the same device referred to; either with lspci for internal devices or lsusb for USB devices. As you see, random fixes intended for devices other than your own are not ever helpful.

This is your wireless device:

ID 050d:2103 Belkin Components F7D2102 802.11n

And here are its drivers:

rtl8xxxu               73728  0
rtl8192cu              69632  0
rtl_usb                20480  1 rtl8192cu
rtl8192c_common        53248  1 rtl8192cu
rtlwifi                77824  3 rtl_usb,rtl8192c_common,rtl8192cu
mac80211              737280  4 rtl8xxxu,rtl_usb,rtlwifi,rtl8192cu
cfg80211              565248  2 mac80211,rtlwifi

I said driverS because there are two possibly conflicting drivers loaded. Let's blacklist one and see if connectivity improves. From the terminal:

sudo -i
echo "blacklist rtl8192cu"  >>  /etc/modprobe.d/blacklist.conf
exit

Reboot and tell us if conditions are improved.


Ubuntu 16.10/17.04 + Kaby Lake (7700K) + NVIDIA drivers = black screen

We faced a similar problem. The solution was to boot into recovery mode and install Cuda 8 (which includes the nvidia graphics driver) from there. You need some preparation (e.g. download Cuda 8 as *.deb and safe it on a USB drive).
By doing so on a freh Ubuntu installation, there was no need to manually set nomodeset or to blacklist stuff. It was all done by the CUDA installation.
Worked on 14.04. and 16.04. LTS

I strongly advise not to install the Nvidia driver on Ubunntu via the .run scripts. You need to reinstall the driver after every Kernel update.


You can do pitch shift with the gstreamer plugin soundtouch. A project that probably uses this feature is playitslowly .

See also:

GStreamer and music processing

For on-the fly pitch shifting it may be possible to set up a LADSPA filter for your sound output (e.g. TAP pitch plugin):

How can I apply a LADSPA plugin to a PulseAudio stream?
Apply LADSPA filter to only one channel of multichannel output with Alsa and PulseAudio


"(XEN) Not enough memory to relocate the dom0 Kernel image" (not iSCSI/HBA issue)

I had exactly the same issue and ended up trying pretty much the same thing.  Under Xen 4.2.1 and kernel 3.7.9 try setting the line in /etc/default/grub:

GRUB_CMDLINE_XEN_DEFAULT="dom0_mem=512M,max:512M no-real-mode e820-verbose"

This seems to get around the memory problem, although I find it then hits other problems (comes up with just 1 CPU and then hangs running the script/local-premount - these may be due to my config though).


NUC5i3RYH and Kingston 120 GB SATA Industrial Solid State Drive

Response from Kingston tech support:

"From the description you provided, it appears as though your product SM2280S3/120GBK has developed a fault and we recommend that you replace it through your point of purchase."


Dependency issues when trying to install qgis python-qgis qgis-plugin-grass

As stated in the error message /usr/lib/qgis/crssync: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory, you need to install libmysqlclient18.

If you are using Ubuntu 14.04, then sudo apt-get install libmysqlclient18.

If you are using Ubuntu 16.04, then libmysqlclient18 is not available anymore (replaced by libmysqlclient20). You may follow the answer at https://superuser.com/questions/1101426/installing-libmysqlclient18-on-ubuntu-16-04


How to get rid of the white frame around the window? Gnome-screenshot

It does not appear that there is a white border around your screenshots.

The gray and white checkered pattern you are seeing indicates transparency (see-through)

The windows on your desktop have semi-transparent shadows around them. These shadows are captured when you take a screenshot of the window.  If you were to post the images on a black or colored background, there will not be a white border.

Note that the screenshot of the screenshot you uploaded here does not have the checkered pattern, but has a shadow when posted here on AskUbuntu where the default background color is white.


I changed the window type of an application in KDE to "Desktop". How can I get it back?

If you open "System Settings", you can open the "Window Behavior" program and see and modify all your existing window rules in the "Window Rules" tab.


How do I run an executable in a directory I added to PATH?

The leading ./ forces Bash to search for the exectuable in the current working directory (~).

Make sure your user has execute permission on it: if you're the owner (you should be since apparently you either downloaded Clang's binary or compiled Clang from source):

chmod u+x ~/Documents/Clang/clang to grant the permission to yourself;
chmod ug+x ~/Documents/Clang/clang to grant the permission to yourself and to the owner group;
chmod a+x ~/Documents/Clang/clang to grant the permission to yourself, to the owner group and to everyone else.

And then just type the name of the executable:

clang

% cat ~/tmp/script.sh
#!/bin/bash
printf 'foo\n'
% PATH=$PATH:~/tmp
% ./script.sh
bash: ./script.sh: No such file or directory
% script.sh
foo


Failed to activate swap /swapfile keeps happening

If you turn off the PC using the poweroff command the filesystem does a clean shutdown which writes the last bits to the harddisk. If you just cut the power, the next time Ubuntu will do a filesystem scan (fsck) and fix whatever it can. That mode may mount the whole file system be in read-only. A reboot will go back to the normal mode. If the files themselves are set to read-only you have to add the write flag like this sudo chmod +w /swapfile
The swapfile is an overflow space for memory, after a reboot the content isn't worth a thing, so you can remove the file and recreate it, I would use these commands, this one is 4Gb feel free to make it bigger
rm -rf /swapfile
dd if=/dev/zero of=/swapfile count=4 bs=1G
mkswap /swapfile
chmod 777 /swapfile
swapon /swapfile


GnomeBaker CD/DVD writer no longer lets me burn DVD's or CD's

There are a few possible causes of this error.  Writable disks have an area reserved for calibrating how much power to use for burning (called the OPC area).  The error you are getting means that that drive can't manage to write a test pattern to that area to calibrate itself.  The most common cause of this error is a bad disk, and the second most common cause is a dirty lens in the drive.  Try a different disk from a different section of the package (bad ones tend to show up on top due to higher UV exposure).  If that doesn't work, assuming the drive can still read CDs, go get a cleaning disk and follow its instructions.

If the disk you are using is a rewritable medium (CD-R, DVD+/-R, etc) it sometimes happens (especially with CDs) that the OPC area fills up after multiple sessions with only fast blanking.  Running a full erase can sometimes bring the disk back into a usable state.


Ubuntu 16.04 -ImportError: No module named 'UbuntuDrivers'

It seems you have mistakenly deleted Python library packages for core Ubuntu Drivers. Try reinstalling ubuntu-drivers-common package.
sudo apt-get install --reinstall ubuntu-drivers-common


Install ODBC connector for PostgreSQL on Ubuntu Server 12.04

Like most software projects, installation instructions in the PostgreSQL manual only apply if you have followed the rest of the instructions in the PostgreSQL manual. In other words, if you've installed from source as the manual describes. If you installed from distro packages, then the installation instructions in the PostgreSQL manual that refer to a source code installation do not apply and you must use distro-specific methods to install components according to your distro packaging.

Needless to say, the PostgreSQL team cannot possibly provide instructions for all distros and packaging methods, but I want the docs to make it clearer for new users that later parts of the source install docs do not apply if you didn't install from source.

In this case, you will need to install a package for Ubuntu that contains the postgresql odbc driver for unixodbc. apt-cache search postgres odbc reveals that the package is called .... odbc-postgresql.

So:

apt-get install odbc-postgresql

BTW, you might prefer to look into PL/R, which is R embedded within PostgreSQL.

I'm going to propose a patch to the Pg manual to address this point of new user confusion.

In this case a manual amendment would not help you, because you're reading a 10-year-old version of the manual. See the version links on the top of the page? Yeah. You're reading the manual for version 7.2, released in 2002-02-04. (It's annoying that Google likes to return old versions but we can't do much about it without causing other problems).


How to transfer all settings to a new installation?

As I understand, an upgrade will only keep the personal files like music and documents but the system wide settings will be cleared.
A clean install is default settings and so any settings you had previously is obviously gone.


$ sudo add-apt-repository ppa:nilarimogard/webupd8
$ sudo apt-get update
$ sudo apt-get install youtube-dl

Update: Similarly, instead using any third party PPA, you can use curl or wget command to install latest version of youtube-dl script as shown.

$ sudo curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
OR
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

After downloading the script, set the executable permission.

$ sudo chmod a+rx /usr/local/bin/youtube-dl


How to install downloaded scanner driver

First download drivers from http://support.epson.net/linux/en/iscan_c.html
Extract the .tar file with - tar -zxf iscan-bundle-1.0.0.x64.deb.tar.gz
move into directory with - cd iscan-bundle-1.0.0.x64.deb/

run sudo bash install.sh

`Hope This works !


The problem in the space in your path.  The launcher only sees the first part of the path as the www argument, and rightly notices that this isn't a directory in which it could find an index.html file.  It also helpfully points out that it got the second half of the path as an additional argument, but doesn't know what to do with it.

You can fix this with one of the following:

Escaping the space in the path by preceding it with a backslash.
Quoting the path.
Not using spaces in your paths.

I recommend #3.


Tiling window management - triple tiling

In compizconfig-manager, the "grid" plugin has a property called "Cycle through multiple sizes" under "Resize Actions" tab. I checked it and it works as I expected.
This video helped me figure it out


You can use sed to replace word-boundary-delimited "ERROR", "DONE" and "FINISHED" strings with the same string enclosed in ANSI color escape sequences (you could alias the command in ~/.bashrc for convenience; as you can see this works in Zsh, but since it's the terminal that interprets the escape sequences this would work in any shell running in an ANSI / VT100-compatible terminal):

sudo apt-get update |& sed 's/\bERROR\b/\x1B[1;31m&\x1B[0m/; s/\bDONE\b/\x1B[1;32m&\x1B[0m/; s/\bFINISHED\b/\x1B[1;34m&\x1B[0m/'

sudo apt-get update |&
    sed '
        s/\bERROR\b/\x1B[1;31m&\x1B[0m/
        s/\bDONE\b/\x1B[1;32m&\x1B[0m/
        s/\bFINISHED\b/\x1B[1;34m&\x1B[0m/
    '


Masking a service will prevent it from starting.

To unmask a service run:

systemctl unmask name.service

Source:

How to Manage Systemd Services on a Linux System | How To Geek


Don't run GUI apps via rc.local, it's a command-line only script.
All your commands are blocking, append & at the end of each line
sudo is redundant, because rc.local runs as root already


How can I change the priority of a launchpad PPA?

Can I suggest you ppa-purge the PPA you want to default the software version back to the default lucid repository version.

Next, re-edit your software-sources (sudo nano /etc/apt/sources.list) and remove the # from the PPA line-entry.

Run just an update - NOT an upgrade.

sudo apt-get update

Install the software you want.

sudo apt-get install [software package]

Then re-open source-sources file and readd the # to the PPA so that no further updates are received.

For lucid, you can install ppa-purge by enabling the backports repository - again - do this from your software-sources file.


I was able to fix the issues by changing the system defaults for Python 2 and Python 3 back to their original versions using update-alternatives. As I have now learned, it is a bad idea to change the system versions of Python; doing so can cause a whole host of issues.

I don't yet understand why advancing a couple minor versions (ie. 3.5 > 3.7) causes such trouble and would love to know more if anyone reading this can fill me in.


Now that you have deleted the user accounts, neither deluser nor userdel will know anything about them or their home directories, since the corresponding /etc/passwd entries are gone. Just manually delete the directories once you have backed up any valuable data:

sudo rm -r /home/user1 /home/user2 ...

You could, of course, have deleted the directories while deleting the user like the other answers suggested.


Couldn't load specified math lib(s) when using a script from CPAN

It probably means you are missing perl modules.

Crypt::DH wants either Math::BigInt or Math::BigInt::GMP or Math::BigInt::Pari. Try to install these and watch out for warnings.

(cpan> install Math::BigInt, cpan> install Math::Pari, cpan> install Math::PMG)

If you get a

WARNING! No GMP libraries were detected!

then you might be missing header files for libgmp (the development package for libgmp).


If the BIOS does not allow you to boot from USB or DVD use the following methods:

A. Upgrade your BIOS (refer to your manufacturer's web site for more information)

OR

B. Hardware solution:

remove the hard drive from the laptop, put it in an external enclosure
Boot from DVD/USB on another machine and install on the (now external) HDD
move the external HDD back into your laptop.

Note:

What you're trying to do is possible, but complicated: extract the ISO file into a separate partition, make that partition bootable, boot from that partition, install on another partition, remove the ISO partition.

However you already have to have a grub installed on your hard drive and manually edit grub.conf all through the process above. (Which is something even I wouldn't do: too complex, too much work, too many things can go wrong)


Boot into new linux kernel 4.1.4 Ubuntu 15.04

sudo update-grub

Updates grub, as the command suggests.


How can I drag & Drop a JPG-File into Scribus?

This may be related to these two bugs #9452 #12597. Until this is fixed it may be best to use the new Picture Browser found in Scribus 1.5.0 and above.

First, download and install Scribus 1.5.0. A PPA is available from here. With it now installed, open Scribus and being a new document. In the Extras menu option click on Picture Browser:

In the picture browser navigate to the folder containing your images:

You can now easily click and drag an image from the Picture Browser into you document:


I downloaded ubuntu 15.04 from canonical's website but wubi is ignoring that file and downloading ubuntu 14.10 x64 amd

You will want to install from a Live USB or from a CD. A live USB disk can be created easily with unetbootin. WUBI is no longer supported. You can read more about this here:

Official Ubuntu Forums

Another good run-down is located here.

If you need help with the Ubuntu installation process then this page is a good starting place and we can then help with more specific questions if needed. Also, as I've been asked before, I have no idea why WUBI is still included when it doesn't usually work and is no longer officially supported.


If you search for flash player alternative only because the adobe flash plugin for linux is outdated, you could install the latest version of the adobe flash player through pipelight which allows you to use its supported plugins nearly as if you use windows browser.

then you could keep the plugins up-to-date using sudo pipelight-plugin  --update


Can not mount NTFS Partition on Ubuntu 18.04 LTS

Formatted the HDD with Windows 10, and default the cluster size 4096KB. Ubuntu 18.04 can mount it normally.
More information, Ubuntu 20.041 can mount the HDD format with 128KB without installing 3rd tool.


Why does the cursor freeze in terminals?

This is not a bug, but a feature to save energy. Refer to this bug report on launchpad:

The cursor in active terminal window stops blinking after ten seconds.

You can even stop the cursor blinking, refer to this question to see how:

How do I disable the blinking cursor in gnome-terminal?


How to install Ubuntu OS on USB, without booting & Ubuntu OS running inside Win XP 32 bit & Win 7 home premium 64 bit?

It's not possible to run Ubuntu inside of a Windows environment without a vm or emulation. If you want to be able to take the USB to another computer that doesn't have Virtualbox installed, then you might try to just install Virtualbox on the USB with Ubuntu.


Evenote using Wine does not work on Ubuntu 15.10

According to the WineHQ database, Internet Explorer 8 may need to be installed through winetricks before the official Evernote application will work properly under Linux: https://appdb.winehq.org/objectManager.php?sClass=version&iId=33338

There is more information about downloading and using winetricks here: https://wiki.winehq.org/Winetricks , or you can just use PlayOnLinux (available through the official Ubuntu repositories), which bundles Wine and Winetricks with a nice GUI interface.

Other possible options for a Linux Evernote client include the open-source third-party applications NeverNote and NixNote.


Can't create a large VeraCrypt partition in hard drive "found a atari partition in /dev/mapper/veracrypt1"

Well, that's not that weird... Before encrypting your drive, you probably created a new partition table.
When I create a new partition table on a drive with GParted, I get the following possible values :

So usually I choose msdos or gpt, but atari is obviously a possibility. Maybe you created the partition table without noticing this setting ?
So I would suggest to back up the drive content (if there is any...), reformat it by creating a new partition table, and encrypt it again with Veracrypt.


gnome--terminal -e option not executing?

The ampersand-backgrounding method didn't seem to work as expected. I switched to setsid instead and it seems to work.

gnome-terminal --tab -t "MyPC" -e "sh -c 'setsid firefox;bash'" --tab -t "MYPC2" -e "sh -c 'ls;bash'"

Also, you only need bash, not exec bash.


Run scripts in a folder from "Run Application" launcher in ubuntu

Scripts you put in your ~/bin folder should run by simply typing their name, pressing AltF2however:

If the image is from your computer (which I doubt, it seems an old one): simply type the scriptname, not necessary to include the path (which would be wrong in this example, since the script is in ~/bin, not in /usr/sbin, like in your image.
Make sure the script is executable
if you (need to) run the script with sudo privileges, you should install gksu first:

sudo apt-get install gksu

and the run them with the command:

gksu <scriptname>

(As mentioned: I assume the image is not from your computer)

Explanation:

Since you do not run the script in a terminal, you should give Ubuntu another way to ask for your password, like gksu.


After flash player update, videos speeds up on YouTube

Firefox:

I had same issue. Follow these steps for glory:

Completely uninstall flash plugins:

sudo apt-get purge lightspark swfdec-mozilla mozilla-plugin-gnash adobe-flashplugin flashplugin-nonfree flashplugin-installer

rm -f /home/**/.mozilla/plugins/*flash*so

rm -rf /home/**/.wine/dosdevices/c:/windows/system32/Macromed/Flash

sudo rm -f /usr/lib/firefox-addons/plugins/libflashplayer.so

Install flash replacement:

sudo apt-get install mozilla-plugin-gnash

Restart your browser and have fun.

Chrome:

killall pulseaudio

pulseaudio


Virtualbox VT-x error though virtualization seems enabled already

Sorry, i solved it in between and forgot to report here. VT-x wasn't enabled, i just followed as tuto to enable it for my model of laptop and everything runs perfectly since. Thanks for the help anyway!


Trying to update Ubuntu 14.04 LTS Error Code (1)

The problem was a package called: "GNU-Debugger". After removing it everything worked fine.


HP MFP M225Dn can print but cannot scan - Ubuntu 14.04

I provide you with a generic answer, short of being able to thoroughly troubleshoot yr issue. Being generic the answer is long.

Assuming that:

yr networked scanner is switched on.
yr device is connected to:
a) the network as a stand alone LAN device (direct LAN-setup).
b) a computer and shared over the network: that computer is referred to as the LAN-server. All other networked computers are called LAN-clients. Setting this up differs from what follows. That case is not covered here.
packages hplip, sane-utils, libsane as well as libsane-extras are correctly installed. The latter requires the universe repo to be enabled.
you have added user saned to groups lp and scanner with:

In terminal

$ sudo adduser saned {scanner,lp}

In reality only one of those two groups (lp, scanner) is needed, but you can safely add saned to both. It won't hurt. HP scanners of type MFP tend to be added to lp, others to scanner. This is required when scanning from a USB connected all-in-one shared on the network, i.e. through a scan-server. I have not verified that it is required for stand-alone LAN scanners. Again if not, it won't hurt.

you have edited /etc/sane.d/dll.conf, to try to enable the correct scan-driver for yr device. Try looking for "The following backends are not part of the SANE distribution ..." in that configuration file. Below that you'll find commented lines corresponding to scanners that are either not directly supported (untested) or partially supported. Uncomment lines as you deem appropriate, save file.

From the Ubuntu community's Scanning-HowTo:

Ensure the device can be pinged.
Run the hp-setup wizard which installs printer, scanner, HpAllInOne and any other features.

In terminal:

$ sudo apt-get install python-qt4  # required only for Ubuntu 14.04
$ sudo hp-setup

For Connection Type choose "Network/Ethernet..."
If the device is not detected, click "Show advanced options", tick "Manual discovery" and supply the scanner's IP address.
Check the scanner is now recognized:

$ scanimage -L

Alas, if yr scanning device is still not detected:

Determine the URI of the printer

Inside a terminal window, execute:

 $ hp-makeuri IP-ADDRESS

where "IP-ADDRESS" should be replaced with the IP address of your printer. This will show the CUPS (printing) and SANE (scanning) URIs for your printer.

Access yr networked scanner (two approaches):

a) temporarily access scanner by supplying  the SANE URI to xsane every time you execute it:

$ xsane SANE-URI

where "SANE-URI" is the SANE URI returned by hp-makeuri.

b) make scanner permanently accessible, if CUPS is configured to use the 'hp' backend to access the printer instead of the 'socket' backend. This can be done by editing printers.conf:

$ sudo vim /etc/cups/printers.conf

and replacing the 'socket' DeviceURI with the 'hp' URI returned by hp-makeuri. Restart cups after making this change:

$ sudo /etc/init.d/cupsys restart

HTH. Please, report details if this does not work for you, but remember that StartPage is yr friend.


You can either index the files through the mounted file system, if it is acceptable, or index on the server and use the Recoll webui: https://github.com/koniu/recoll-webui

jf


Where can I get the iso file needed for installing UUI?

The answer depends on what you want to do with UUI. I assume you are are planning to use it to create a bootable USB stick for Ubuntu installation. In this case, there's a guide at http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-windows with step-by-step instructions.

On the same page (and on any other subpage of ubuntu.com) you'll find a big download button in the orange menu-bar at the top. Download the DVD image of the Ubuntu version you'd like.

A .iso file is a premastered CD or DVD disk image (more precisely, it's a file containing an ISO 9600 filesystem). These can either be burnt to an optical medium using any CD/DVD writing software, or read directly to access the contained files (you can think of it as being similar to unzipping a .zip file, although it's technically different). UUI extracts the files within the .iso to a USB drive and then installs a bootloader on the USB drive, in order to allow you to boot from it.


How to add any language keyboard in Ubuntu 16.04

In Language Support you can change the display language. The place to change the keyboard is: System Settings -> Text Entry.


Why does Unity become slow when switching between the Menus?

Yes, it is an understood problem. No, you can't fix it, unless you're a programmer.

To explain the technical details, application menus in Unity are broadcasted over D-Bus, and depending on the menu complexity and toolkit implementation, this can result in noticeable lag. XUL (the backend for Firefox and Thunderbird) is notoriously bad in this regard.


You can't technically modify the PXE config file in/from MAAS. You have to manually edit it. Every time you add node to MAAS, a PXE config file will be created for one of the MAC Address of the node. In your case, and based on your logs, you would have to edit the following file:

/var/lib/tftpboot/pxelinux.cfg/01-00-1d-09-f0-4b-c2

And add

noacpi noapm pci=noacpi lba acpi=off apm=off

to the append line. It should look something like::

append initrd=/images/precise-i386/initrd.gz  locale=  locale=en_US priority=critical text  auto url=http://192.168.122.1/cblr/svc/op/ks/system/node-1577c5ae-957c-11e1-9a87-58946bf1d72c hostname=node-01001s09f04bc2 domain=local suite=precise noacpi noapm pci=noacpi lba acpi=off apm=off

Hope this helps!


Left Shift on Ubuntu with apple keyboard is activating shortcuts instead of the normal Shift key

sudo dpkg-reconfigure keyboard-configuration

Choose the 104-key layout.
sudo service keyboard-setup restart


How do I install drivers for the Alfa AWUS036H USB wireless adapter?

The ALFA AWUS036H adapter is based on the Realtek RTL8187 chipset. The drivers should be built into Ubuntu, but you may want to try installing the latest from Realtek:

Download the "Linux driver for Kernel 3.0.0/3.1.0/3.2.0" from the Realtek website here.
It will open in Archive Manager; extract the rtl8187L_linux_1041.0209.2012 folder to your Downloads folder.
Open a terminal with Ctrl+Alt+T, and type/paste the following, one line a time:

sudo apt-get install build-essential linux-headers-`uname -r`
cd Downloads/rtl8187L_linux_1041.0209.2012
make
sudo make install

Then reboot, and your AWUS036H should be detected.


Why does my deja dup restore run out of space?

Deja Dup retains older backups, so you can restore from a long time ago. This means that on your drive there are several copies of the backups. If you only use it for backups then fine. Deja Dup will automatically delete older ones once it gets full. Otherwise open up Deja-Dup and click the schedule tab in settings, and set it to only keep backups for a week. Then clear the drive and run a manual backup.


How can I see the properties of every folder I open?

Yes, its your file manager that displays that information. I assume you are using nautilus right now, try thunar it shows those info by default.

sudo apt-get install thunar


How to change the binding of Windows key which runs Unity's Dash?

You can disable the super key using the command:

gconftool --set /desktop/unity/launcher/super_key_enable --type=bool 0

(Since GNOME 3 settings are in dconf instead of gconf, and unity became a plugin. The method thus became: dconf write /org/compiz/profiles/unity/plugins/unityshell/show-launcher '""')

Then you can define a keyboard shortcut with your preferred method to launch the following command:

dbus-send --type=method_call --dest=com.canonical.Unity2d /Dash com.canonical.Unity2d.Dash.activateHome

This will trigger Unity Home Dash


find binary linked to a process which crashes soon as launched?

If you cannot put a trace, I'd suggest you temporarily rename B, C, and D. Assuming A will tell you that B, C, or D are missing, you should get the info you need.

If it doesn't tell you but still generate an error saying the next process is missing, you may try to rename just B and C and see what happens. Then try again with just B and D. At that point you should know whether B, C, or D is the culprit.

Also, you may be able to manually try each one and see if only one or even all have problems starting.


What if I accidentally run command "chmod -R" on system directories (/, /etc, ...)

In short: you can't, reinstall your system.

I mean, Posix permissions are used and relied on heavily; there's a multitude of places in the filesystem where wrong permissions would break the OS (SUID flags) or even worse, make it exposed security-wise (/etc/ssh/ssh_host_rsa_key) while it appears to be working OK.

Hence, such a recovery is hard to do properly. Miss one thing — and you screw it up. You already screwed up your sudo chmod command (if that's your friend rather than you, she might as well learn some Linux lesson, too) — and that's a very simple of a command. Proper recovery would demand way more commands and way more vigilance. Even if you use someone's script.

So trust me, just reinstall. It's a safe bet and guaranteed to keep you out of trouble.

Finally, some tips relevant here.

First: reinstalls will be less painful if you setup your /home on a separate partition next time. Actually, they will be a breeze.

Second: consider doing crazy Linux science in a virtual machine like the VirtualBox, and do your snapshots.

Third: chmod -R . works. A dot by itself . is valid directory name. There's no real need to append that slash. You could've avoided the catastrophic risk of skipping the dot entrirely;
mere chmod: missing operand after ‘755’ VS a ruined system.


a= cut -f 1 abc.txt

This doesn't work, this will assign the word 'command' cut to the variable a. The correct syntax is

a=`cut -f 1 abc.txt`

Now you can run the command

echo $a

and check the result. Works

The second command

cut -f 1 abc.txt >a

This will redirect the output of the command cut -f 1 abc.txt into a newly created file named a and not a variable a.


According to the WebUpd8 website:

  Update: Jupiter has been discontinued. I suggest trying TLP instead.

To install it, open a terminal (press Ctrl+Alt+T) and run:

sudo -i
add-apt-repository ppa:linrunner/tlp
apt-get update
apt-get install tlp tlp-rdw
tlp start

Make sure to read what the WebUpd8 website has to say about TLP or what the TLP FAQ says.

If you absolutely must have Jupiter, it's available via the JoliCloud PPA repository.

Note that the following assumes:

You're using Ubuntu 13.04 or later.
You're OK with completely unsupported software.
You realize the software is discontinued.

To install it, open a terminal and run:

sudo -i
add-apt-repository -y ppa:jolicloud-team/ppa
cd /etc/apt/sources.list.d
mv jolicloud-team-ubuntu-ppa-*.list jolicloud-team-ubuntu-ppa.list
sed -i "s/$(lsb_release -cs)/raring/g" jolicloud-team-ubuntu-ppa.list
cd -
apt-get update
apt-fast install jupiter

If you're installing to an Asus Eee PC, run the following as well:

sudo apt-get install jupiter-support-eee


Clamav eternal suffer to update the version

Most Ubuntu software follows a 'snapshot' model. Once a new release of Ubuntu occurs, the software receives only security and serious bugfixes; no new releases. Example: 16.04 is two years old, and most software in 16.04 is also two years old.

However, ClamAV is one of the exceptions to that snapshot model. All supported releases of Ubuntu are upgraded to the latest ClamAV...after testing

You DON'T need to run the latest ClamAV to have the latest virus definitions. Like other AV products, ClamAV automatically updates those regardless of the application's version number.

Currently, 0.99.2 is the current ClamAV in ALL supported releases of Ubuntu. 0.99.3 is currently undergoing testing in 18.04 -proposed. When testing is complete, 0.99.3 will be rolled out to all supported releases of Ubuntu.

If you really need updated ClamAV right now (most folks don't), then go to the upstream ClamAV website and build from source instead of using the Ubuntu packages. Uninstall the Ubuntu packages before installing from another source to prevent conflicts and errors.


I'm sorry for your loss. Here is a tutorial on the standard process for resetting an Ubuntu user password in a situation like this. Just note his username from the login screen, follow these steps to change his password, and then you can log in with that new password.
https://itsfoss.com/how-to-hack-ubuntu-password/


How to move files between Ubuntu and iPhone

I don't know whether there's any difference between versions, but I can simply access the files of my iPhone 5s via the file manager when it's plugged over USB (using the AFC protocol).

I'm using iOS 9.2 beta, I have no idea whether it works on 9.1 or earlier.
I can access the device from Nautilus' sidebar, if it doesn't show up, try navigating to the following address:

afc://<your iPhone's UDID>/

Also, most music players (at least Rythmbox, Banshee and Clementine) support music synchronization over AFC (Apple File Conduit).

EDIT: I just learned I can easily synchronize my pictures using tools like gThumb.


How to use custom ~/.xsession with gdm3 in Ubuntu 18.04 Bionic?

I can run ~/.xsession with gdm by creating /usr/share/xsessions/xsession.desktop containing

[Desktop Entry]
Name=XSession
Comment=This session uses the custom xsession file
Exec=/etc/X11/Xsession
Type=Application
DesktopNames=GNOME-Flashback;GNOME;
X-Ubuntu-Gettext-Domain=gnome-flashback

and then selecting XSession from the sessions menu when I log in.

(I wasn't able to find a package containing such a file, but it's easy to create it yourself once you know what to do).


For dual boot follow these steps to install Ubuntu alongside Windows 10
(taken from https://verdictforu.com/2016/09/06/how-to-dual-boot-ubuntu-16-04-and-windows-10/)

Step 1: Prepare Windows Machine for Dual-Boot

The first thing you need to take care is to create a free space on the computer hard disk in case the system is installed on a single
partition.
Login to your Windows machine with an administrative account and
right click on the

Start Menu -> Command Prompt (Admin)

in order to enter Windows Command Line.

Once in CLI, type diskmgmt.msc on prompt and the Disk Management utility should open. From here, right click on C:(or whichever
partition you want) partition and select Shrink Volume in order to
resize the partition.
C:\Windows\system32>diskmgmt.msc

On Shrink C:(or your selected partition) enter a value on space to shrink in MB (use at least 20000 MB depending on the your partition
size) and hit Shrink to start partition resize as illustrated below
(the value of space shrink from below image is lower and only used for
demonstration purposes).
Once the space has been resized you will see a new unallocated
space on the hard drive. Leave it as default and reboot the computer
in order to proceed with Ubuntu 16.04 installation.

Step 2: Install Ubuntu 16.04 with Windows Dual-Boot

Download Ubuntu 16.04 LTS ISO file.
Download ISO file of Ubuntu 16.04 LTS from their official
website
Once the ISO file is downloaded, burn it into a USB pendrive or DVD
and Boot your system with bootable USB Pen drive or DVD.

Select ‘Install Ubuntu’ to start installation.

Preparing to Install Ubuntu 16.06 LTS
In case your system is connected to the Internet and wants to
install third party tools during installation, you can select both the
options as shown in below snap otherwise leave the options uncheck.

Now it’s time to select an Installation Type. You can choose to Install Ubuntu alongside Windows Boot Manager, option that will
automatically take care of all the partition steps.
Use this option if you don’t require personalized partition scheme.
In case you want a custom partition layout, check the Something else
option and hit on Continue button to proceed further.
The option Erase disk and install Ubuntu should be avoided on
dual-boot because is potentially dangerous and will wipe out your
disk.

On this step we’ll create our custom partition layout for Ubuntu 16.04. On this guide will recommend that you create two partitions, one for root and the other for home accounts data and no partition
for swap (use a swap partition only if you have limited RAM
resources or you use a fast SSD).
To create the first partition, the root partition, select the
free space (the shrink space from Windows created earlier) and hit on
the + icon below. On partition settings use the following
configurations and hit OK to apply changes:

Size = at least 20000 MB
Type for the new partition = Primary
Location for the new partition = Beginning
Use as = EXT4 journaling file system
Mount point = /

Create the home partition using the same steps as above. Use all
the available free space left for home partition size. The partition
settings should look like this:

Size = all remaining free space
Type for the new partition = Primary
Location for the new partition = Beginning
Use as = EXT4 journaling file system
Mount point = /home

Create a Swap partition and give a size to swap, mostly it is
double of your ram size. so if ram is 2 gb swap should be 4 gb.

If you don't want to create a swap partition than hit the Install Now button in order to apply changes to disk and start the
installation process.
A pop-up window should appear to inform you about swap space.
Ignore the alert by pressing on Continue button.
Next a new pop-up window will ask you if you agree with committing
changes to disk. Hit Continue to write changes to disk and the
installation process will now start.

On the next screen adjust your machine physical location by selecting a city nearby from the map. When done hit Continue to move
ahead.

Next, select your keyboard layout and click on Continue button.

Pick up a username and password for your administrative sudo account, enter a descriptive name for your computer and hit Continue
to finalize the installation.
This are all the settings required for customizing Ubuntu 16.04
installation. From here on the installation process will run
automatically until it reaches the end.

After the installation process reaches its end hit on Restart Now button in order to complete the installation.
The machine will reboot into the Grub menu, where for ten seconds, you will be presented to choose what OS you wish to use further:
Ubuntu 16.04 or Microsoft Windows.
Ubuntu is designated as default OS to boot from. Thus, just press Enter key or wait for those 10 seconds timeout to drain.

After Ubuntu finishes loading, login with the credentials created during the installation process and enjoy it. Ubuntu 16.04 provides
NTFS file system support automatically so you can access the files
from Windows partitions just by clicking on the Windows volume.

That’s it! In case you need to switch back to Windows, just reboot the
computer and select Windows from the Grub menu.
Images are taken from - Tecmint and Linuxtechi
Hope it helps you to dual boot Ubuntu with Windows 10.


Realtek rtl8723e wireless card will not connect

I have one of these laptops and it is working for me (albeit slowly) on 3.5.0-27-generic.

Did you try a

make clean

This will clear out all the old object files before making the driver with.

make
sudo make install

Failing this working try removing the directory and then untaring the driver and doing:

make
make install


Cannot Add PPA Behind Proxy Ubuntu 14.04

You need to export your proxy environment variables using

export http_proxy=http://username:password@host:port/
export https_proxy=https://username:password@host:port/

and then tell sudo to use them using:

 sudo -E add-apt-repository ppa:webupd8team/y-ppa-manager

or open your /etc/sudoers file (using sudo visudo) and append

Defaults env_keep="https_proxy"

to the end of the file.

I have a blog on this, have a look at it for more details.


Can Stand-alone deb packages be updated?

No, manually installed packages can not be updated automatically.

However whenever a package we had installed manually will become available through our software sources we will get an update if the version in the repositories was higher.

To obtain similar comfortable updates for any application that did not make its way to the repositories we can watch out for a personal package archive (PPA) that may provide up-to-date versions of an application we need.

For ubuntu-tweak the "offcial" PPA repository with build for Ubuntu <= 14.04 can be added by:

sudo add-apt-repository ppa:tualatrix/ppa

or through the Software Center File > Edit > Software Sources....

We then also have to update our apt cache and can install the application with:

sudo apt-get update
sudo apt-get install ubuntu-tweak


How do I shrink a window that exceeds the boundaries of the display?

Mouse, left button: point it at the gray part between "replace in path" and the checkbox for "match case", hold it  and drag the window to a section of the screen where you do see the bottom right corner edge. Then you should be able to shrink it by moving the bottom right corner.


After many searches and try some ways I get this it's mpossible to scroll with fingerprint.


PyGObject, venv and Ubuntu 20.10: ImportError: libffi.so.7: cannot open shared object file: No such file or directory

I had a similar issue with libffi.so.6 but this was for 20.04, check my solution here https://stackoverflow.com/a/63329830/6881647
You can try the same thing on 20.10 by downloading the package from here
https://mirrors.edge.kernel.org/ubuntu/pool/main/libf/libffi/libffi7_3.3-4_amd64.deb and installing it. This will put the 2 files (libffi.so.7 and libffi.so.7.1.0) inside of /usr/lib/x86_64-linux-gnu/ and it shouldn't overwrite anything.
Can you explain why you consider this to be difficult and unsafe? It's a simple deb install and as far as the unsafe part goes the package is provided by Ubuntu mirrors, not some third party or something.


How to use pam_blue with lightdm, and unity-greeter?

Install pam-blue:

sudo apt-get install libpam-blue

Add the pam module to lightdm:

sudo sed -i 's/^\(@include common-auth\)$/auth\tsufficient\tpam_blue.so\n\1/' /etc/pam.d/lightdm

Get the mac address and bluetooth name of your phone (the bluetooth name must not contain spaces) then open the bluescan.conf file:

sudo vim /etc/security/bluescan.conf

You should edit the file so it looks like this:

general {
  timeout = 5;
}
user = {
  name = Phone;
  bluemac = 00:18:13:9E:E0:DF;
  timeout = 5;
}

replacing "user" with your Ubuntu login name, "Phone" with the name of your bluetooth device (no spaces allowed) and "00:18:13:9E:E0:DF" with the devices mac address.

Next time you are at the login screen and click your name there will be a 5 second delay while pam finds your bluetooth device, if it does a login button will be shown, if not the regular password prompt will appear.

See:
french website on pam-blue and bluetooth login and locking


I had the same issue,
 But then figured it out that the network adapter was switched off with the explicit function key provided by the laptop manufacturer when I was using windows. The blue tooth in Ubuntu started working after it was enabled in the windows boot


How to add more space to my ubuntu 10.04 installation

Have you tried to expand the linux partition ? Can you install and use the palimpsest utility ?
Also you can do this with gparted just expand your partition. (not the small swap partition!)


Take a snapshot with "PrtScn" Key doesn't work with classical Gnome

It works, but the screenshot is saved in your ~/Pictures folder.


Very poor performance after  downloading Kazam screencaster

Take a look at Recordmydesktop which is available in the Ubuntu Software Centre and came highly recommended to me. I have been using it extensively and have created over 50 screen casts with no issues. Its simple to use and intuitive.

As to the performance of your system and whether Kazam is causing it is questionable as it could be any number of things.

Also, take a look at this question (how can I improve overall system performance) as it may help you with your performance issues

Linked Question:

How to record my screen?


How Can I connect USB Printer in Virtual Box OSE Win XP

After having installed Virtual Box together with the Oracle Extension Pack and the Guest Additions we are able to activate USB devices attached to the host by right clicking the little icon on the right bottom of Virtual Box Manager to select the USB device:

By doing so the USB device will be deactivated from the host. After installing the appropriate drivers on the guest you will have full access to the device from the guest.

Note: On the host users need to be in the group vboxusers to allow access on USB devices from the guest. Run sudo usermod -a -G vboxusers <YOUR_USER_NAME>, logout and login again to get the effective change.

An alternative method to enable printing without use of USB is to enable network printing in the host and add the new network printer to the guest.


I am booting Ubuntu 15.10 from a Transcend Jetflash USB drive. getting kernal vesamenu.c32 not found

Try this fix that other people encountering this (same?) problem already were helped by: https://askubuntu.com/a/154293/479652


I advise you to read and follow the very detailed instructions at Installing Broadcom Wireless Drivers on this site.  This is the best resource on the net for installing Broadcom drivers.

If that helped, flag your own question as a duplicate…


C++ is enough to implement this kind of function.
besides ,you should choose a gui library for show.
Shell is not necessary。


Turns out that it was locked (saw it after I ran the "hdparm -I /dev/sda" command, thanks to @FedonKadifeli). So then I ran the command

hdparm --security-unlock PASSWORD /dev/sda

using the password I used initially ("p") and it unlocked. Then I entered the command:

time hdparm --user-master u --security-erase PASSWORD /dev/sda

Essentially, I had left the procedure in the middle.

Afterwards it was visible in gparted without errors and warnings, so I was able to create a partition table and format it to ntfs normally. I closed the terminal (even though it still warned me about a process running) and the disk is fine again. Files are wiped and I don't know if the secure wipe succeeded but at this point I don't care. I will just connect it to a windows PC and just use samsung magician.

Maybe this question is due for a duplicate question flag but anyway. I'm glad I saved my drive and this was the way.

Lesson from this: Not messing with hdparm again.


Can't type my pass in "terminal" to install steam

Ubuntu terminal will not show *(star) or even white space while you typing password.
just type and press enter.


In my AMD chipset experience, you will need proprietary drivers and although you have not specified what version of Ubuntu you are running, I can direct you to AMD's driver downloads. The package I used can be found at http://support.amd.com/en-us/download/desktop?os=Linux+x86#amd-catalyst-packages and the newest beta driver is at http://support.amd.com/en-us/kb-articles/Pages/Latest-LINUX-Beta-Driver.aspx as well.
Each page lists the necessary requirements; especially make sure your kernel is supported and if you are running 64-bit then make sure 32-bit libraries are installed.
I would suggest choosing the first of the links as playing with betas is almost always a bad idea for the average user. Both list the Radeon HD 6000 series as supported. Either download should include a script to run, which opens either a graphical interface or will work in a terminal, I've done both install types successfully.


Duh.

I accidentally clicked Install with "Replace Mac OS X" selected, and it gave me an option to use the other drive instead of the Mac OS X drive.

Case closed.


Open file from terminal in specific application

xdg-open is, of course, designed to use the default applications. To use non-default applicaitons, I think you have three options.

1) Type programname filename as usual.

2) Do this outside of the terminal by a right-click in Nautilus and using open with.

3) Use your own script in the terminal. Let's assume you have a reasonably short list of default programs you might want to choose from.

#!/bin/bash
read filename
myvar=$(zenity --list --text="Chose a non-default program" --column="Programs" firefox gedit)
$myvar filename &

This would let you specify a file name, then choose the program to open it with. This is the minimal implementation, so it might need some additional work. But try it out.

There may not be a lot of benefits to this approach, but it gives you control over the process and options to suit whatever needs you have.


cant move copy or delete files on other disk on Ubuntu 18.04

Ubuntu cannot change files on a disk or partition that is in an "unstable" or hibernated state. If Windows is not completely shut down properly, Ubuntu will access these partitions as read-only

To fix this problem, boot up Windows, search for the "fastboot" Windows option, and disable fastboot.

Next, make sure to completely power off Windows and do not hibernate.

Then, when you turn your computer back on and boot up Ubuntu, you should be able to move, copy, and delete files.


You can install Battery status applet in ubuntu,using the following commands in your terminal,

Adding repository
sudo add-apt-repository ppa:iaz/battery-status && sudo apt-get update
sudo apt-get install battery-status

Updating repository
sudo apt-get update

Installing Battery status
sudo apt-get install battery-status

After installation right click on your panel → Select Add to Panel  → And then add Battery Applet


Connecting to the internet with ubuntu 11.10

1) If you have an Android device (from 2.2 or rooted 2.1), you can enable Wifi tethering and Ubuntu recognize it instantly; then you insert the shared password and you're done; if you want to connect exclusively by bluetooth, then you should take a look to these 2 offical guides:

https://help.ubuntu.com/community/BluetoothSetup
https://help.ubuntu.com/community/BluetoothDialup

If you have an iPhone, here is a program that lets you tether with it:

https://apps.ubuntu.com/cat/applications/natty/ipheth-utils/

2) When you plug in a network cable connected to a router, Ubuntu recognize it without problems and you can browse the internet after less than one second; so I think this should be a problem with your router or external modem.


Changing fonts don't apply to all places

What you need is font substitution. Because those texts have predefined fonts for them and as long as your system can recognize Ubuntu font (which was the defined font for that notice), those will be rendered as such.

Create a file in ~/.config/fontconfig/conf.d folder with name say 09-replace-ubuntu.conf (the name should end with .conf extension). The content of the file should be like this

 <?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
  <match target="pattern">
    <test qual="any" name="family"><string>Ubuntu</string></test>
    <edit name="family" mode="assign" binding="same"><string>Segoe UI</string></edit>
  </match>
</fontconfig>

What it does is it whenever the system queries for Ubuntu font and it responds with your preferred/overridden choice, here it is Segoe UI.

Here is a picture of the same notice with replaced Segoe UI font.


Short keys to make a line comment in shell script Emacs?

comment-dwim command is usually bound to Alt; (M-; using emacs notation). Just mark the lines you want to comment before pressing. The way Emacs will comment the line depends on the current major mode.

If you want to know more about commenting code, you can read this article from the official documentation.


I get what you are asking. You want a browser based GUI without all the added stuff that a typical Desktop Environment provides; however, since it's still a GUI that you are looking for (you will be attaching a monitor and drawing graphics on it, aka a head) you can't call it headless. Maybe call it a "tiny-head" server ;-)

A desktop environment (such as GNOME, KDE) or any other GUI is composed of multiple pieces, here is a quick overview.

I think what you would need is a display server (such as xorg), and possibly a windows manager. Maybe also a display driver and display manager. However you won't need all the other stuff provided by a DE such as taskbar, file manager, etc. since you will be using your browser applications for that.

Anyway, I just realized this question is over a year old so you might have figured this out already.


Ubuntu for phones - is there a terminal similar to the one known from PC's?

There is a fully functional Terminal app in the Ubuntu store, and the Nexus device images come with it pre-isntalled. It is based on the KDE terminal app's components, and gives you a normal Bash shell just like you would expect on a desktop.


How to press ENTER in Nano on Ubuntu-touch via abd?

You must use phablet-shell command rather than adb shell. It open a console with the device too. Then, you can put enter in nano and save files.


How to fix Firefox so that it load certain sites like Netflix?

I tried several of the possible options in the official Firefox site, but this was the one that got it working:

  In the address bar, type about:config and press Enter.
  The about:config "This might void your warranty!" warning page may appear.

  Click I accept the risk! to continue to the
  about:config page.
  In the Search field, enter network.dns.disableIPv6
      In the list of preferences, double-click network.dns.disableIPv6 to change its value from false to true.


It sounds like you have accidentally enable High Contrast mode "For the vision impaired". To turn this off, follow these steps.

Right-click on the Ubuntu desktop
Click "Change Desktop Background"
When the settings window appears, click the drop-down menu next to "Theme"
Select "Ambience (default)"

If the "Ambience (default)" theme is not available in the drop-down menu, type
 sudo apt-get install light-themes
into the terminal, and check again.


Without having access to the router, I do not see this happening.

first you have to think about the network, your public server sits on one side of the firewall, and has a public IP address.  then the server you want to have serve up some of the pages is on the inside of the firewall and has a non-public IP address.

Unless you can access the router/firewall and put in the rule that says requests coming to http://www.example.com/whatever are to be routed to internal address of xxx.xxx.xxx.xxx, then I really do not see this being able to be accomplished.

If you are able to accomplish this, then your corporate network security guys need to be fired, because there is a big hole in the firewall.

To anyone else looking at my answer, this is a corporate network, and this person has no access to the firewall or router to set rules for routing to servers on the inside.

So the final answer is to go to your network security people, or whoever controls your firewall, and ask them to create the rule to allow internet traffic to come to your server on the inside of the firewall, but you will need to make sure that server is very secure.

I hope this helps.
Chris


Can't start ubuntu 11.10, Stops at login screen!

I share the same opinion as deckoff. It is most probably a video issue. You may try installing Ubuntu from alternate-cd.

ubuntu-11.10-alternate-i386.iso for 32 bit version, or
ubuntu-11.10-alternate-amd64.iso for 64-bit version.

It installs using an entirely-text-based installer, however, it doesn't support installing within windows. You will need a separate partition. (Someone correct me if I am wrong here)
Then run sudo apt-get update && sudo apt-get upgrade


In Ubuntu 18.04 and later open the terminal and type:

sudo apt install python-cryptography  # for Python 2.x (default)

or

sudo apt install python3-cryptography # for Python 3.x

Note: If your default version of Python is 3.x, you may need to run python2 $(which idf.py) menuconfig in the Step 7. Configure section of ESP-IDF Programming Guide - Get Started instead.

If you are using Ubuntu 16.04 please comment, so that I will add instructions about how to install the python3-cryptography version 2.1.4 for 18.04 in 16.04.


Connection refused is a generic socket/service related error, it is typically shown when establishing a socket where the remote endpoint has no listener on the desired port.

In this case the remote server must not have the ssh daemon running, so does not have anything listening on port 22 (presumably), or a highly unlikely possibility is that the ssh daemon itself is having issues.

So make sure the ssh daemon is running (and functioning properly) on remote host you are trying to connect to.


How can I collect all svg icons from my computer?

If you want to make a copy of them all in to one directory try the following:

sudo updatedb
mkdir $HOME/svg
locate *.svg | awk -F'/' '{X=NF-1;Y=NF-2;Z=NF-3}{ system("cp "$0" '$HOME'/svg/"$Z"\"-\""$Y"\"-\""$X"\"-\""$NF) }'

That will copy all SVG files into an svg folder in your home. You can of course adjust those paths as needed. Since a lot of the System SVG's (Icon sets) are the same name among theme. This will copy them into the SVG folder like so:

This /usr/share/icons/Humanity/actions/22/mail-read.svg becomes ~/svg/Humanity-actions-22-mail-read.svg meaning you can view them in one Nautilus folder without having to traverse often cumbersome directory structures.

Another alternative - to keep all your SVGs in the same location, but have them update when theme icon-sets get updated - would be to symlink them all to that folder. As long as you performed a "Save-As" instead of overwriting icons when working on them:

sudo updatedb
mkdir $HOME/svg
locate *.svg | awk -F'/' '{X=NF-1;Y=NF-2;Z=NF-3}{ system("ln -s "$0" '$HOME'/svg/"$Z"\"-\""$Y"\"-\""$X"\"-\""$NF) }'


Here is the Ubuntu 18.04 method of installing Wine 5.  It appears on this website.

I will detail the steps:

Enable 32 bit support:

sudo dpkg --add-architecture i386

Add repositories for Wine:
Download the GPG key of the official Wine package repository:

wget -nc https://dl.winehq.org/wine-builds/winehq.key

Add the Wine GPG key:

sudo apt-key add winehq.key

Add the official Wine package repository:

sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

Download the OpenSUSE Wine repository’s GPG key:

wget -nc https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key

Add the GPG key:

sudo apt-key add Release.key

Add the OpenSUSE Wine repository:

echo "deb http://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04 ./" | sudo tee /etc/apt/sources.list.d/wine-obs.list

Update the APT package repository cache:

sudo apt update

You’re ready to install Wine 5:

sudo apt install --install-recommends winehq-stable

Press Y and then press Enter

Once Wine 5 is installed, you can configure it.

winecfg


Can't get Epson Perfection V500 drivers to work

Install the common scanner drivers:

sudo apt-get install sane xsane xsane-common sane-utils libsane libsane-common libsane-dbg libsane-dev libsane-extras libsane-extras-common libsane-extras-dbg libsane-extras-dev

Then use the scanner with the application simple-scan


"error: no init found. Try passing init=bootarg" error after video driver update

Your ubuntu partition is missing. Are you sure this is a complete list of your partitions? Did you have a second hard disk that doesn't show up now?

Provide the output from sudo fdisk -l /dev/sda to check if there is unallocated disk space, maybe you can recover your partition if you accidentally deleted it.


Bash script to run python script for all images in all subdirectories

From Super User they tell us how to loop through sub-directories:

for d in */ ; do
    echo "$d"
done

Using this reference you can use nested for loops:

for d in */ ; do
    for file in "$d"/*.jpg
    do
        python modifyImage.py /"$file" /"$file"
    done
done


Error (network unreachable) resolving './DNSKEY/IN': 2001:7fd::1#53

Edit file /etc/default/bind9:
# run resolvconf?
RESOLVCONF=yes
# startup options for the server
OPTIONS="-4 -u bind"

And then restart bind9 :
# service bind9 restart


getting error installing rockpi4b-rk-u-boot-latest on ubuntu with latest kernal

I don't see an official Uuntu package for 18.04 on arm64 kit.Looks like you are out of luck as it's only available for Fedora or ALT Linux.Not supported in this forum


Can I lower the graphical strain of GNOME Shell?

First of all, you cannot use metacity and GNOME-Shell together :).

GNOME-Shell depends on Mutter, and if Mutter does not support turning down its effects, then neither does GNOME Shell. The best you can do then is ensure that you configure everything around it to be optimal for its performance.

Some tips:

Ensure that you are using the latest/best driver for your graphics (chip/card).
Do not run too many intense applications at a time. Even background applications can affect the speed of a system.
Do not use too many extensions at a time.
Make good use of workspaces. 3D window managers have a lot of work to do already, so its good to have fewer windows "active" at a time.
Ensure that your graphics applications are configured correctly if they support it.

For example, in games, you can turn down the graphics if possible.
Use programs like Blender in fullscreen mode.
If you can, use texture compression (your system must support it).


Mount hard disk restricting permissions to particular users

I am assuming you only want to use this drive to store data. I'm also assuming your kids don't have sudo - obviously all bets are off if they do.

Choose a mount point for the drive and create it, for example

sudo mkdir /media/stuff

If the drive is already in your /etc/fstab, modify the line to use this mountpoint. You will need to use sudo to edit the file. Please make a backup copy before editing. See the fstab wiki page for more information.

If the drive is not in /etc/fstab, then add a line for it. First run

sudo blkid

And get the UUID for the drive. This is a long ugly string of characters. The new fstab line should be something like:

UUID=long-string-of-chars-from-blkid  /media/stuff  ext4 defaults 0 2

Now just set permissions on the mountpoint so that only root has execute permission on it. If a user has no execute permission on a directory, they cannot enter it or any directory below it.

sudo chmod 700 /media/stuff

Now add ACL permissions for yourself and your wife (replace me and mywife with the proper usernames).

sudo setfacl -m me:rwx /media/stuff
sudo setfacl -m mywife:rwx /media/stuff


(Automatically connect eligible plugs and slots of snap "snap-store") stuck

For me, Snap-store installed successfully after taking some time on "Automatically connect eligible plugs and slots of snap "snap-store". Time depends on your internet speed.


Announce downtime to your users
stop samba on old server
copy data to new server
copy samba config to new server
start samba on new server and look at the logfiles

If everything is OK, announce the move to your users, if not, open an new question with the specific error message(s).


Getting error while trying to install skype in Ubuntu 12.04 LTS

Delete skype (recommended Completely removal), Download it from http://www.skype.com/en/download-skype/skype-for-computer/ , and reinstall.


Dual boot Windows 10 and Ubuntu on different hard drives

First, is your Ubuntu in EFI mode ?
You can check with this

[ -d /sys/firmware/efi ] && echo EFI || echo BIOS

I do not think it can detect EFI boots if it is in BIOS mode.


It seems that your DVD was not new/empty. I'd suggest to try with a new disc. As a "plan B" I'd use an USB to make a bootable USB (using Unetbootin) in order to install the new OS.


That's due to a bug in Apt. To install it, open a terminal (press Ctrl+Alt+T) and run:

sudo apt purge ttf-mscorefonts-installer
sudo chown -R _apt:root /var/lib/update-notifier/package-data-downloads/partial
sudo apt install ttf-mscorefonts-installer
sudo chown -R root:root /var/lib/update-notifier/package-data-downloads/partial


Why can't I see the new group that I belong to when opening a new terminal?

group changes are not visible in existing shells.

they only showup in login shells after the change.

Its simplest just to logout your desktop session and login again.

or you can run this to simulate a login shell

bash -l


How to get the current size of my Ubuntu installation?

Perfect list of how to achieve this could be found for example here:
http://ubuntuforums.org/showthread.php?t=599424


try holding down the super (windows) key.


SSHFS is a FUSE filesystem. These are managed by a user-land process which runs as the user who mounts the filesystem: that sshfs process you run doubles as the filesystem driver. By default, most FUSE filesystems only allow the mounting user to access files inside.

In order to be able to access files through sshfs, you need three things:

The user who is authenticated over ssh on server1 must be able to access the files.
The user who tries to access the sshfs filesystem on server2 must have the necessary access permissions.
The user who tries to access the sshfs filesystem on server2 must be allowed to access that filesystem.

As I wrote above, only the mounting user has that last permission. You can relax this by adding -o allow_user to the sshfs command line, but this won't solve the other two problems. Note that -o allow_user only takes effect if /etc/fuse.conf contains user_allow_user or you are running sshfs as root.

On server2, you need to either run sshfs as the www-data user (whom you will have to give access to the SSH private key), or enable allow_user and arrange for the local www-data to have access to the files it needs. There are several ways to do that: through the uid option, or by passing -o default_permissions, or by passing -o umask 770,gid=www-data. If you enable allow_user, make sure that you don't end up allowing www-data to access more files than it should, and that you don't end up allowing other users to see or modify what they shouldn't. Running sshfs as www-data has the advantage of simplicity, you have a far better chance of not accidentally being too permissive.

For problem #1, you need to ssh into the www-data account on server1, or to allow the account that you use to access those files. There is some benefit in not allowing remote logins to system accounts such as www-data, because these make for poor auditing (you can't know who actually used the account). However, it's not out of the question, and it is somewhat easier to set up. If you don't want to allow remote logins to the www-data account, add salamis¹ to the www-data group, make sure that the filesystem on server1 is mounted with the acl option (add it to the relevant entry in /etc/fstab if necessary), and add an ACL to www-data's files:

setfacl -d -m group:www-data:rwx -R /path/to/www-root
setfacl -m group:www-data:rwx -R /path/to/www-root

¹  If that's your account on server1, I didn't understand from your question whether salamis was a user on server1, on server2 or both.


Can I run Ubuntu only on power cable without battery?

Whether a laptop can function when the battery is removed depends on its hardware. Some laptops can work normally when connected to the power source via the adaptor with the battery removed, and some laptops can't function if the battery is either removed or worn out. If the store where you are shopping for a laptop has floor demonstration models, ask a shop worker to take out the battery and check if it works before you buy it.


Accidentally moved the home Directory to another folder

The "-t" means that "Foxit\ Reader/" is the target to move the files to. And the next argument is assumed to be the source from where to move it from.

From the manual:

 -t, --target-directory=DIRECTORY
          move all SOURCE arguments into DIRECTORY

You can fix this by doing:

sudo su
cd /opt/"Foxit Reader"/
ls -l *

and visually confirm you see a list of users (that are directories) (not Desktop, Pictures etc) and not files. Then you can do ...

mv * /home/


How do I allow more than 3 DNS servers in Ubuntu 16?

You can use dnsmasq to add any number of additional DNS servers. Here's how to do it.

First install dnsmasq:

sudo apt install dnsmasq

Edit configuration file and add Your dns servers there (f.ex at the end of the file):

sudo nano /etc/dnsmasq.conf

server=8.8.8.8
server=8.8.4.4

Save the file and now edit the file (and add 127.0.0.1 as a nameserver) :

sudo nano /etc/resolv.conf

nameserver 127.0.0.1

Restart dnsmasq (or even better reboot PC):

sudo service dnsmasq restart

Verify if dnsmasq responds to DNS queries (look for SERVER, should be 127.0.0.1):

dig google.pl

;; SERVER: 127.0.0.1#53(127.0.0.1)

NOTE: Sometimes Network Manager can override the /etc/resolv.conf file so You can make it read-only:

sudo chmod -w /etc/resolv.conf

NOTE 2: It is possible that You will have to disable build-in dns

sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved


Shell use value from for loop to set files' name

Because _ is a valid character for a variable name, you need to use the ${varname} syntax to let the shell know the end of the variable name. Otherwise, you have $i and $_logfile as variables, but the latter is empty.

The syntax $i$ does not exist.

Use:

setsid python main.py 1>data/${i}_logfile.txt 2>&1

  Note that $variable is actually a simplified form of ${variable}. In contexts where the $variable syntax causes an error, the longer form may work. (via)


How to create fifth drive for ubuntu on Win7?

It's a BIOS and hardware limitation, not an operating system one.  You can only have four primary partitions on any physical hard drive.

The solution is to delete one of the primary partitions and make an extended partition in its place.  You can then have as many logical partitions inside the extended partition as you want.

You can do all of this with a good partition editor such as Gparted.  Don't forget to backup the data on the partition before you delete it - it won't be there after you hit the delete button!


Where should I start in tracking down Firefox malware

I don't think there's much value in tracking down exactly what the problem is. Of course there is always some value but I can't guarantee you'll ever find out what the problem is.
In Etcher-Sketch terms, it's easier to just shake it until you have a blank canvas and then, if you want, you can pull back some of the less-likely-to-be-infected things (general settings, bookmarks, etc).
But the easiest install vector for malware in Firefox is through its extensions manager. You can check the extensions.ini file in the active profile for anything suspicious, but as I say, it may bear no fruit.
To get things back to normal, let's shake Firefox:
Nuke the old profile.
Here's a little script that moves the old profile to another location. I'm making this up as I go, so there might be a bug or two in it. You should be able to copy and paste this into a terminal.
cd ~/.mozilla/firefox/
export FFPROFILE=`cat profiles.ini | grep "Path=" | sed 's/^Path=//'`
mv $FFPROFILE $FFPROFILE.BAK
rm profiles.ini

When Firefox next launches, it will create a new profile.
Save bookmarks, saved passwords, etc
After firefox has created the new profile, you can go to ~/.mozilla/firefox/ in nautilus and copy back some of the files into the new profile and then deletes the profile configuration file so that Firefox has to create a new profile. Start by closing Firefox and then punch these lines into a terminal:
cd ~/.mozilla/firefox/
export FFPROFILE=`cat profiles.ini | grep "Path=" | sed 's/^Path=//'`
export OLDFFPROFILE=`ls -1 | grep .BAK`
cp $OLDFFPROFILE/*.sqlite $FFPROFILE/

You can of course do both these parts manually. It's actually easier to do it manually, you just need to know your way around the filesystem a little better. I was just thinking of you needing to do push this off to somebody else... it might just be easier if they copy and paste it into a terminal... Or you do it via SSH.


OBS Studio Screen, Still Comes Black When I Running Under Xorg

Follow steps:

Open obs.
In "scenes" tab on right bottom of screen. press "+" sign and select "Screen Recorder".
In "Sources" tab next to "scenes" tab press "+" sign and select "Windows capture(Xcomposite)". and double click on this.
Now a properties widow will open. Here you can select the desired window like web browser or LibreOffice or desktop (which is already open) to record.

Hop this will help you.


Install Ubuntu alongside an other version of Ubuntu (one drive only available)

You probably don't need 925,4G for Ubuntu 12.(04) . So you can run GParted from live-cd or USB : 1) Reduce sda2 to required size for Ubuntu 12 . ........ 2) Create sda4 as "Extended". .......  3)  Add partitions for new Ubuntu version(s) : The maximum number of partitions is 15 total, if the partition table is DOS.

Gparted http://distrowatch.com/index.php?distribution=gparted&release=all&month=all&year=all


Ubuntu Install Issues - boots to purple screen

Few tips(may not be the exact answer) based on my past experience:

Disable secure boot completely in BIOS
Switch off hibernation feature of Windows 10
Please make sure that the .iso you have downloaded in not corrupted
may be you can try it in another computer.
In case you have a graphics card, provide the information and also
information about the overall system configuration


How can I access my google drive or external hard from windows bash?

If your external drive is d:

sudo mkdir /mnt/d
sudo mount -t drvfs d: /mnt/d

Mounting Mount Google Drive File System is not supported yet.
https://github.com/Microsoft/WSL/issues/2999


Upper half of laptop screen becomes black when I plug in an external LCD

I have resolved the issue, though still think that is a bug.

So, I connected the second monitor, it connected black and half of the laptop screen went black as well. But I left it as it is, just restarted the whole system, and it worked: after the restart both displays shows well. I can disconnect and reconnect the second one, and it works.

P.S. Just tried everything to make it work and found this way...

Edit: In fact, it is enough to just log off/log in with the connected second monitor, and it works.

Edit-2: See also the comments above. Basically, I think the best way is to connect the monitor before logging in, and if it does not work try Alt+F2 and "unity --replace" as an alternative, otherwise log out/in.


Samba adds your folder to active directory, which is what Microsoft uses for network drives. Unfortunately, there is no good way to tell you how to configure the .conf or how to set it up, so I will point you to some useful resources.

Basically, you install Samba, and monkey around with the smb.conf until you get it working. A word of advice: back up your smb file!!

The community put together this about the basics. It links to many useful documents.

This seemed like a very promising start, and gives you a good idea of what to do, but didn't work for me.

Finally, if that doesn't work, the docs on Samba are here. It is a book with the html of chapters.

If none of that gives you a start, I will update my post with more details.


OK This wasn't actually as hard as I thought.

The .bsx file is the self-extracting installer, so first you have to un-gzip it:

gzip -d /path/to/file.bsx.gz

Then give it executable permissions

sudo chmod +x /path/to/file.bsx

Then run it!

sudo /path/to/./file.bsx


How can I make Ubuntu 100% installed and portable

(please note this answer is a best guess, so take it with a grain of salt)
You would to boot from a different Ubuntu live USB, with the destination USB also plugged in, but empty. You would need to either create custom partitions using the installer, or, if it recognizes the USB as a destination for install, simply choose the USB. After installing to the USB you would need to do the normal steps of booting from a USB to use it.


Editing the default boot item in grub menu, a definitive answer?

The definitive guide is the community wiki (link below).

But in summary - GRUB_DEFAULT takes either a numeric or a string value.  Numeric values reflect the boot order options (menu entry values) described in /boot/grub/grub.cfg

For example - in my grub my GRUB_DEFAULT value is set to the value 6 (six):

If you look at /boot/grub/grub.cfg and count the lines starting with the the text menuentry where the first entry is zero, the second is one and so on you'll see that the value of six corresponds to what you see in the grub screen.

N.B. I've truncated the file to just show lines starting with the text menuentry

Setting by a string value is useful if you want to make windows the default boot.

You only make changes to GRUB_DEFAULT in the file /etc/default/grub

In both cases - run sudo update-grub to regenerate the file /boot/grub/grub.cfg - this is the file that grub itself uses but you should not change yourself.

Linked Question:

How do I set Windows to boot as the default in the boot loader?
https://help.ubuntu.com/community/Grub2


Ubuntu 15.04 network manager causing slow boot

I faced the same problem before, NetworkManager taking about 8 seconds. There are three ways to solve this problem:

Disable connecting automatically for your connection

edit connections > select your connection > edit and disable
connecting automatically

You can simply disable Enable networking from network indicator.
You can disable the service by running this command

systemctl disable NetworkManager-wait-online.service


Realtek Wi-Fi and Bluetooth both are not detected in Ubuntu 17.04

The device is currently supported. See the github repository for instructions.

To my knowlegde the WiFi is working, but I'm not sure about the BT.