cannot rename, delete, create new though I have Create and Delete file access

sudo mount -o remount,rw '/media/windowsDrive/Work from ubuntu'/

is not correct. It should be (mind the /')

sudo mount -o remount,rw /media/windowsDrive/

Having write access is all fine but only works for writable media and yours is mounted as READ ONLY.

Regarding

Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.

You need to umount the partition before you can mount it.

sudo chmod 777 -R /media/windowsDrive/Work\ from\ ubuntu/

Please don't. Directories 755 and files 644 is more than enough permissions. Again: this will not work on a read only filesystem.

Do a

umount /dev/sda9

1st and see if there are any errors then manually mount the partition using

sudo mount -o remount,rw '/media/windowsDrive/Work from ubuntu/'

and see if there are any errors. Linux will NOT mount a filesystem it considers dirty. If that is the case you will get a notice about running checkdisk under windows. If so do that and you should be able to mount the partition.


Where can I find the most up-to-date apt-get package list for my distribution?

You can find all the packages depending on the build installed here:

Ubuntu Packages Search

But Oneiric Ocelot is the Codename for 11.10, so it is probably just downloading the security updates for your version.  I wouldn't be worried about anything.

EDIT: After looking here:
Ubuntu oneiric-updates. It possibly looks like a pack of drivers but I may be mistaken


Will the D-Link GO-USB-N150 Wireless N 150 Easy USB Adapter work without problems in Ubuntu?

Booting Linux

Ubuntu can be sort of memory intensive for an old pc.  The first step is to make sure you have at least 512 mb of ram.  For other requirements check here https://help.ubuntu.com/community/Installation/SystemRequirements.  The good news about an old pc is that most of the hardware should be figured out.  However, there is a chance that you may need to rely on some legacy drivers for things like graphics.  I would recommend against installing ubuntu desktop.  Look at lubunuhttp://www.lubuntu.net/ and xubntu: http://xubuntu.org/ as they are FAR less processor/memory intensive.

However, I would recommend that you look into something more lightweight like archbang http://archbang.org/.

What you might want to try first is see how your computer handles one of the light live distros such as slitaz which only requires 16mb of ram: http://www.slitaz.org/en/.

You can burn any of these options onto a cd as per the distro specific instructions.

Now, as actually installing/booting a cd, you are going to need to edit your bios.  This depends on your computer but the process is usually similar.

The ubuntu wiki has a guide for this https://help.ubuntu.com/community/BootFromCD The process is the same for most distros.

Installing

Here you need to choose if you want to keep xp.  If not any installer will have the option to wipe your hard drive and just install linux.  However, if you want to keep xp your are going to need to partition your drive. https://help.ubuntu.com/community/HowtoPartition

Wireless

As far as the adapter you are using, you should check out this http://ubuntuforums.org/showthread.php?t=2013323


Intel NUC running Xubuntu spontaneously suspends and won't wake up

How do you know it suspends? Can you wake it up somehow ? You write you can't right ? Seems more like freezing. How about memory problem ? Try to run mem test. Most of distros have it on live cd. Check the volage of you memory chips. Maybe try to install xubuntu with just one memory plate.

I have xubuntu runnig in production NUC for about year and I didn't see any freeze up yet.


Cannot bootup windows 7 after upgrading to ubuntu 12.04

Is "recovery-partition" (installed by vendor) linked to your Bios resp. to your Win7 ? - (I had that too 1 year ago.) if it got deleted by Ubuntu-update, then you might rescue your Win7 and Ubuntu datas with a backup by live-system like knoppix on to an usb-harddisk.

  dd if=/dev/sda of=/media/name-of-usb-disk

Then make complete new hard-disk (partition-table) with seperated partitions for each Win7 and Ubuntu (with gparted). Before new installation of Ubuntu, then install Win7 on ntfs-partition (first boot-partition). When Win7-installation is complete, then install Ubuntu on e.g. ext4-partition. I think this is easiest solution for this. Looks humblesome but works (simply goes the whole hog).


You want to manually partition your drive. This just means that you will split (i.e., partition) your harddrive into two sections, one for Windows, and one for Ubuntu. Then, when your computer starts, you will have the option to select which partition to boot to. (This is exactly the concept behind dual-booting.)


Can't connect to a wireless network from Ubuntu but I can from Windows

Thes problem has suddenly solved after some upgrades using a wired connection. I'm afraid there might be due to a problem with certain packages, as it was suddenly solved from my two computers on the same day and since I could connect to the same wifi from an older kubuntu version without problems.


After resizing my windows partition of a dual boot windows/ubuntu, my ubuntu is corrupted

You can reinstall the Ubuntu 18.04 and it give the option about the old version data and program. So you don't erase all previous data and files and reinstall Ubuntu 18.04.


How to increase/decrease indentation in Libreoffice?

First, check if the "Formatting" toolbar is visible: Menu "View" -> "Toolbars". If there's no tick left of "Formatting", left-click to make it visible.

The "Formatting" toolbar has the following buttons by default (undocked / free-floating view):

To increase / decrease indent, you may use the two buttons:

,

or use the shortcuts CTRL+N / ALT+N to increase / decrease the indentation.

Since the "Formatting" toolbar has a quite large number of buttons, it may not be displayed completely, as in the following example:

In this case, just click on the small arrows at the right, to access the "hidden" buttons:


Landscape - update_security_db.sh: connection to the other side was refused

I had same situation. I used landscape-server on a server with a host name which contains upper-case letters, and I changed the upper-case letters to lower-case  letters in host name. And then, I purged landscape-server-quickstart and reinstalled it. That solved the situation.

sudo apt purge landscape-server-quickstart
sudo apt purge rabbitmq-server               # remove rabbitmq settings too.
sudo apt autoremove
sudo apt install landscape-server-quickstart

landscape alert - script with issues : update_security_db.sh


You are trying to install apache2 , upgrade or restore it ?
this error is more of "reinstall" issue .

ATTENTION IT IS A TRICK

Using the console is more efficient

I suggest you to check if some dependency or file of apache2 is still in your system

sudo dpkg -l | grep apache2.2-common

will list all the dependencies of apache2.2-common package, if any try to remove it manually. By,

sudo dpkg -r *dependency name*

or

sudo apt-get remove *dependency name*

Once finished proceed to purge it,

sudo apt-get remove --purge apache2.2-common

or at least try to touch the missing file to bypass the problem

touch /etc/apache2/mods-available/cgid.load

I'm sure you have also removed other files too, So proceed step by step on all your missing configurations


I fixed my bluetooth problems by following this tutorial. I had to install blueman in Ubuntu. It can be done by running the command in terminal:

sudo apt-get install blueman

After that, run the Blueman Bluetooth Manager and bluetooth will work.


ubuntu 18.04 has experienced an internal error when running in virtualbox

I downloaded the Ubuntu installation media and did my own installation from scratch and everything was fine.


Can't install tar.bz2 file due to "no such file or directory" error

It looks like you're in your home directory but your file probably downloaded in the Downloads directory or something similar.

You need to be in the same directory as the file or specify by doing tar xjf Downloads/blah.tar.bz2

A good trick I use instead of typing it all out is just type in the first few keys and hit Tab and the shell will autocomplete the filename for you. If you do that and the file doesn't complete, you know you're in the wrong directory.


How do I install a newer version of Oracle JDK?

You can just download a new version, untar it into /usr/lib/java/ near the old java version and update symlinks by "sudo update-alternatives" like in your tutorial.
And don't forget to change env varible JAVA_HOME to new java directory (/usr/lib/java/< new_version >).


How to remove Gnome desktop from Regular (Unity) Ubuntu 15.04

I did the exact same thing on 15.04 and this is how I got it to reverse.

Log out and open a TTY1 terminal by pressing Ctrl + Alt + F1 then run the following command:

sudo dpkg-reconfigure lightdm

When asked to, choose "lightdm", then run this

sudo apt-get purge ubuntu-gnome-desktop
sudo apt-get autoremove
sudo reboot

The last command as you can tell will restart the computer. After this the GNOME boot animation may remain but the rest will be just the way it was before installing the GNOME desktop environment. The "reconfigure lightdm" command changes the login screen back to Ubuntu default by changing the display manager from "gdm" (GNOME Display Manager) back to Ubuntu's official "lightdm". I hope this works for you.


Your question is quite similar to "How can I install and download drivers without internet?", but only regarding a different networking device.

However, I think this is not going to solve your problem, since your device should be supported out of the box by the ath9k driver included in Ubuntu. Did you use an updated 12.04.1 image? That may resolve some issues. Try that out if you can't go online with that machine to run updates.

If that fails too, try using a workaround as explained here: "Ubuntu 12.04 wifi is not working (Atheros AR9485) [closed]"


Generally this can be done but there are some disadvantages:

there's a filesize limit (4GB)
you can't store any special file attributes like owner, permissions etc (this shouldn't be a problem for documents and videos though)
some sync tools like rsync don't work well when they can't check or set some of the files' attributes
old filesystems like FAT are more prone to fragmentation and file corruption

As an alternative you can install an ext3 driver on Mac/Windows or use NTFS (which doesn't suffer from problems number 1 and 4).


usb-creator fails - cannot generate usb disk

In above case it's a bug in Kubuntu 14.10, so in this particular case the below procedure will not work!

Workaround to circumvent the bug: use the below procedure on another machine not running Kubuntu 14.10:

Most of the time when a DVD/USB burnt from an official release doesn't work, is because of a bad download.

Therefore type the following command:

apt-get install coreutils
md5sum kubuntu-14.10-desktop-amd64.iso

(above an example for Kubuntu, your exact .iso file name will differ) and you will get a number back like this: a48e3fc0c36a735b2c77e430d985e1e0

Compare that to the official Ubuntu hashes and if it's different (you'll see it immediately, that's why I provided a failed hash above) just download it again...


If hard disk disk has partitioning scheme as gpt then we can do UEFI installation of any os

And if it is having msdos or mbr then we can do installation in legacy.

Now legacy (bios) or UEFI are the low level softwares and are firmware types which boots before your os.

So you got the pair
Gpt -> uefi
Msdos or mbr -> bios or legacy.

It seems that your hdd is in second case ie
Msdos and legacy firmware.

Every os has 2 copies while booting in a bootable disk.These are one for legacy and other for uefi.
So you have selected uefi copy of ubuntu and installing on legacy firmware hence it is forcing installation in uefi.

It will not harm your other system most probably .just it will not boot normally
You have to go into bios for staring that os.

So i think
You should reinstall it as
Select legacy copy of the os (option which in other than uefi disk )which is in bios ie
When you join your disk to pc
Enter into bios for boot menu
And in that you will get those options
Select that and install...

Hope it could help you
Forgive it something went wrong..


It is possible you've customized Ubuntu 16.04's suspend settings in one of a few places but assuming you haven't you set it System Settings -> Power:

If this is set correctly chances are your screen saver is kicking in which will also require a login. It can easily be mistaken as suspend operation. Access it through System Settings -> Brightness & Lock:


How can I get the Huawei E160 modem to work on 12.04?

I got the Huawei e160 working out of the box under Ubuntu 12.04.
from a clean install with all the updates.

Just make sure there is no pin code on the simcard!

Put your simcard in any mobile phone first, on it and check if you need to put a pin code. If thats the case, do it, and then via the mobile phone settings get rid of that pin code.
Now it should work out of the box


Ubuntu, by default, installs the open-source driver for your video card; the dialog you saw suggests you to install the proprietary closed-source driver provided by Ati. So, it is not necessary for you to do this operation, until you are not experiencing graphic problems with the open-source driver or if you don't have particular needs (the open-source driver often doesn't offer 3D acceleration for most video cards, then if you need it, you can try installing the proprietary driver). The same applies also for Nvidia video cards.


Is it possible to play from Google Play (Music) in Rhythmbox?

There is a daap plugin for Google Music here that is currently unmaintained: https://github.com/dpogue/gmusic-daap. From the author:

  Unfortunately the DAAP library I started with doesn't support some of the options that iTunes looks for. It works with Rhythmbox and Banshee on Linux, and someone told me that it worked with an Android DAAP client. [1]

Another option: I'm working on an unofficial api for Google (Play) Music, and it currently supports everything needed to build such a plugin. The author of the linked daap plugin is working with me.

It's in Python, and there's a C# port in progress. I may port some features into Java, too.

Here's the link: https://github.com/simon-weber/Unofficial-Google-Music-API.


Want to install ubuntu for my lenovo 20332

You want Ubuntu Desktop, as opposed to the server version. Since you are new, I suggest you go for the LTS release. Currently the newest is 16.04 (2016,April). LTS are long-term-support versions, which ensure you can run them for a few years instead of months without having to upgrade the distribution.

Get the image for Ubuntu 16.04 LTS on the official download page, burn it to a DVD or write it to a USB flashdrive. The instructions for doing so can be found on the same download page when you scroll down a bit. If you run into any problems feel free to come back and open another question.


How to fix desktop reloading during logout/shutdown/restart after upgrading to 11.10?

I've found what is going wrong on my system.
If I close properly Tomboy by using "Quit" before logout/shutdown/restart, everything works fine (no desktop reloading and no need to wait 25 seconds more).

For information, Tomboy is launched at startup on my session.

Even if the symptoms are not exactly the same and I'm using the 32-bit edition of Ubuntu 11.10, it might be linked to this bug : 816950

A bug has now been opened for this problem : 880299

I'm going to try to reproduce the problem on a fresh install...


Input text at the cursor (in any window)

AutoKey from google code. You should install it from source. Please follow the below instructions after downloading and extracting the source from here. For instance you extracted to the Desktop:

cd Desktop/autokey-0.90.4/ # could be any version but we'll use this one
sudo apt-get install build-essential cdbs python-central # important
dpkg-buildpackage -us -uc # this command will create new deb files outside autokey source folder
cd ../
sudo dpkg --install autokey-gtk_0.90.4-0_all.deb autokey-common_0.90.4-0_all.deb

OR

sudo dpkg --install autokey-qt_0.90.4-0_all.deb autokey-common_0.90.4-0_all.deb

After running dpkg, there could be another dependency errors, so will have to run another command:

sudo apt-get install -f

Now your good to go. Run autokey and configure.

Sample below, you see the folder My Phrases, when you press CTRL+F7 (configured already) you will be prompted options to select like Addresses, First phrase .... It's only up to you how you configure it.


dpkg: can't install, yet dependency is already at the newest version

libtasn1-3-bin:i386 does not exist in Xenial, as the package libtasn1-3-bin is for all, so this package you have downloaded cannot normally be installed on Xenial. Maybe try looking for another one.


I had the same issue and looked into /var/log/mysql/error.log, then discovered I used an invalid variable name (so, in my case, the error was [ERROR] unknown variable 'mywrongvar=value')


Ubuntu 12.04 does a restart instead of a shutdown

I have had exactly the same problem on my Acer V5-571G: the laptop shuts down, turns off its power LED, and then starts again after a few seconds.

The problem seems to arise from incorrect work of pm-utils (which are replacement for laptop-mode-tools). But if you write on into /sys/bus/*/devices/*/power/control, the kernel takes control over power management at the specified devices - and somehow this makes the hardware to shut down correctly.

So I have written a script:

#!/bin/bash

case "$1" in
  stop) for i in /sys/bus/*/devices/*/power/control ; do echo on > $i ; done
  ;;
esac

exit 0

and to make it being executed every time before shutdown I've placed it under name K32power-control-on into /etc/rc0.d directory (don't forget to make the script executable, sudo chmod +x K32power-control-on). After that the laptop shuts down ok.

I think that there are only a few buses/devices which need to have 'on' value written to their power/control, so the list of devices in the script can be restricted, but I just didn't investigate further.


Wireless not working at all, thinkpad x240, intel 7260, ubuntu 14.04

You need to compile and load rtl8192ee driver manually. After that I could get my wifi working. But the ethernet controller i218-LM still does not work.


How do I write a function in Python with a filename as an argument?

Try:

import numpy

def loadfile(filename, i):
   return numpy.loadtxt(filename, usecols=(i,))

As an example, consider this file:

$ cat nums.txt
1 2 3
4 5 6
7 8 9

Then, observe loadfile successfully read in a column:

>>> loadfile('nums.txt', 2)
array([ 3.,  6.,  9.])

Notes

The def line of a function definition must end with :.
The arguments to a function need to be variables, like filename, not fixed strings like 'filename.py'.
This will run but doesn't do what you want:

def loadfile(x, i):
    f = numpy.loadtxt('x', i)
    return(f)

The above takes x as an argument but then ignores it and attempts to load a file name whose name is the single character x.
This won't work either:

def loadfile(filename.py, i):
    f = numpy.loadtxt('filename.py', usecols=(i))
    return(f)

filename.py is not a valid name for a simple variable.  Even if it were, the code doesn't attempt to use that variable name.  Instead, it tries to load a file whose name is the string of characters filename.py.


I had the exact same issue after an upgrade from 16.04 to 16.10. As a workaround, I have disabled the indicator-datetime and it seems to work (I just can't see the time anymore, but it's a minor annoyance). To disable it, "System Settings -> Date and Time -> Clock tab -> uncheck Show clock in the menu bar checkbox". I don't understand why it does it only with one of my users, but not with other users on the same computer (linked to a user setting?). I have found other people with the same issue in much older versions of Ubuntu. So a recurring bug ?


How to install the StackExchange Data Dump Viewer?

Firstly open a terminal (Ctrl+Alt+T).
Install Bazaar (bzr) and other required dependencies by pasting this (Ctrl+Shift+V) in the terminal:

sudo apt-get install bzr qt4-qmake libqt4-dev libqtwebkit-dev

Get all the code:

bzr branch lp:aubrowser

Now navigate into the directory:

cd aubrowser

Now compile the code:

./compile_everything

Now start the conversion wizard:

convert/convert

A window will open. Paste data/posts.xml then follow through the wizard.

Now close the terminal, open Nautilus and browse to the aubrowser folder inside your home folder and run the AskUbuntuBrowser file (by double clicking on it).

Tada!


Cannot connect to my local ubuntu file server with SSH SFTP or Samba

Both router are configured like dhcp server? Maybe you have 2 host with the same ip address. Try with apr-scan to see your local network hosts. If you need to install sudo apt-get install arp-scan. Do arp-scan from server. Also check status of firewall sudo ufw status. You can edit question and put output from arp-scan.


How to force Steam Games to load libraries from Steam Folders

You don't need to do anything special. Running games from within Steam runs them with the libraries provided by the Steam client.

However, when you run things manually on the CLI in this manner, the environment is not set up to use the Steam Runtime. The reason you got the missing library error, is because you don't have the i386 version of the libraries installed, but you are attempting to run a 32-bit program.


16.04 - sudo nautilus does not open in unity bar

First killall nautilus processes:

sudo killall nautilus

Then re-install the data package:

sudo apt-get install --reinstall nautilus-data


When you customize a CD in this manner (creating usually a DVD sized image), it will be in essence an image of an installed system squashed into a compressed image.

When you install on a new system, all the programs you installed (and changes made to the underlying system) will be carried over.


Ubuntu Gnome VS Fedora Gnome (Workstation)

The differences will be extremely subtle.

Ubuntu, before the 11.04 release, used the GNOME shell. But it kept alive after Unity's release with Ubuntu GNOME.

The GNOME shell used by Ubuntu is basically the same used by Fedora. The things that may change are the shell's version and the default theme used on it.

The GNOME project is one of the oldest initiatives to bring a full desktop experience. There was a time when a Linux user had to choose between KDE and GNOME. There weren't other relevant DEs at all. Ubuntu still uses lots of GNOME applications and resources, and the project is rock solid. So it probably won't be abandoned (not in a near future).

The same happens with Ubuntu GNOME: just like you, there are tons of people who dislike Unity or simply prefer to use other Desktop Environments. And while Ubuntu and GNOME keep being popular, Ubuntu GNOME will prosper. By the way, it is maintained by a separate community; Canonical does not develop it, but instead gives official support to the project.


How can I configure the terminator terminal to always be on top?

Switching from Ubuntu to Xubuntu fixes this issue.


it will work if you open it through steam now, because suddenly turning off the computer can make the program file corrupted by deleting essential bits & pieces that were running before you suddenly turned the computer. If you try opening through steam AND tells you to install, do it, because the corrupting of the file must have been so bad that it became fully unreadable by the computer in a way.

TIP: you turned the computer in such a way in first place because it too hot right? Try to minimize the amount of applications that are running in the background to keep the computer cool as well as put it on top of a very heat absorbing material so as to make sure it's not the computer that gets heated up.


Firefox dark theme has a white bar on top (17.10)

Firefox has no control over the white bar you mentioned, it is dictated by your "Applications" (GTK+) theme.

To change the theme open (GNOME) Tweaks and go to "Appearance" section. Select a different theme (which has a dark title bar) for "Applications" under Themes.

You can get more themes from sources like GNOME-LOOK.ORG.


The easy way: Install Nvidia drivers, CUDA, CUDNN and Tensorflow GPU on Ubuntu 18.04

I just installed Tensorflow GPU on Ubuntu 18.04. There are a lot instructions for it, however I think the fastest and easiest way is usually not used and I want to share it:

NVIDIA DRIVER:

ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
nvidia-smi

CUDA:

Normally: "sudo apt install nvidia-cuda-toolkit"
However this installs version 9.1, too new at the moment and tensorflow will not run. Instead download CUDA 9.0: https://developer.nvidia.com/cuda-90-download-archive?target_os=Linux&target_arch=x86_64&target_distro=Ubuntu&target_version=1704&target_type=runfilelocal
Then run (Additional Details on the first line can be found at: How can I install CUDA 9 on Ubuntu 17.10):

sudo sh cuda_9.0.176_384.81_linux.run --override
sudo ln -s /usr/bin/gcc-6 /usr/local/cuda/bin/gcc
sudo ln -s /usr/bin/g++-6 /usr/local/cuda/bin/g++
cd ~
sudo nano .bashrc

add at the end of the file:
export PATH=/usr/local/cuda-9.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
CTL+X to save and exit

CuDNN:

register at nvidia developers https://developer.nvidia.com/cudnn
Download 9.1 runtime & developer library for 16.04 (Files cuDNN v7.1.3 Runtime Library for Ubuntu16.04 (Deb) & cuDNN v7.1.3 Developer Library for Ubuntu16.04 (Deb))
Open the files with software manager and install them.
Check with:

cat /usr/include/x86_64-linux-gnu/cudnn_v*.h | grep CUDNN_MAJOR -A 2

Install libraries and tensorflow:

sudo apt-get install libcupti-dev
pip3 install tensorflow-gpu

Check:

in tensorflow check for GPU support
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))

Note: Start tensorflow or your development environment from terminal, otherwise for me it does not load the PATH variables.


Ok, for point 1, the solution is quite easy:

chgrp developers /opt/dev

For points 2 and 3, I suppose you'll need ACL. So, the first thing to do is to edit /etc/fstab to give the option acl to the mountpoint of /opt/dev. If /opt/dev is not on a separate partition you'll need to enable ACL for the whole root filesystem.

Then you'll have to follow this answer.

chmod g+s /opt/dev

should be equivalent to chgrp developers /opt/dev (and doesn't set the sticky bit, s sets the suid bit).

Then proceed with setfacl:

setfacl -d -m g::rwx /opt/dev  //set group to rwx default
setfacl -d -m o::rx /opt/dev   //set other

to set advanced permission criteria for files and directories. To be honest, I couldn't find a way to set separate file and directory permissions, but I'm pretty sure it's doable. You can try this tutorial to have more information about the topic.


Lubuntu & modem-manager : crash on reboot

I found the problem !!!
Add "blacklist qmi_wwan" to /etc/modprobe.d/blacklist-modem.conf file
Reboot
It works!


Hide my system information from web pages

One common "fingerprinting" method used by web sites to identify users involves querying your browser concerning what fonts are available.  If you've installed any fonts that aren't in the base packages of your OS, the exact list greatly narrows the number of other characteristics a site can gather to say "This is the John Smith who lives at 1234 Home Lane in Anytown, USA."  There are other queries that can be added to this, as well.

The obvious-seeming way to defeat this kind of "system fingerprinting" is to do your browsing with a 100% box-stock, unmodified install running in a VM.  That way, all the sites will get is "This user is using Ubuntu 18.04 in English, on Eastern Standard Time and in US dollars, without any user modifications."  Not, perhaps, as generic as "straight from the USB stick" Windows 10.1, but by this point even a dynamic IP address gives away more than the system fingerprint.


How to backup Ubuntu in a remote Ubuntu system?

deja-dup backup tool works great. You can backup/restore from a remote host using sftp, windows share, samba share and so.


How does update work with programs installed from .deb file

This is indeed kind of complicated. First, apt is a front-end to dkpg which actually handles installing/removing packages. So, /etc/apt/sources.list (and any files in /etc/apt/sources.list.d/) are read by apt, not dpkg.

Now, when you download a .deb file manually, you are bypassing apt and will use dpkg -i packagename.deb to install it instead. This means that apt's database will not be updated and that the apt system will have no knowledge of the package you installed. In other words, apt-get upgrade will never update any manually installed packages.

Having said that, chrome is actually an exception to the rule. When you go to its download page, you will see this message:

At the bottom is this note:

  Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don’t want Google's repository, do “sudo touch /etc/default/google-chrome” before installing the package.

This means that the .deb package includes a script that will add Google's repository to your system (specifically, it will create a file at /etc/apt/sources.list.d/) thereby ensuring that chrome will be updated when you use apt-get.


How to open the ports on firewall in Ubuntu?

Thanks everyone for the opinions and suggestions.
Fortunately I've solved my problem.

The problem is because, I didn't assign the policy for the incoming traffic.

I installed the fire starter (firewall gui)
Then, in fire starter GUI, I added the policy in inbound traffic with the allowed ip
address : 0.0.0.0/0
Then, I added all the ports that I wanted to open :
20,21,22,23,25,80,443
After I clicked on the apply the changes button, I can connect the
ports from outsides successfully.

Thanks you all, anyway.


Firefox still refuses to work with 144hz. I found this website that lets you check what fps your monitor and most importantly browser is running in. You can see that firefox caps out at 60 fps. Chrome and other chromium based browsers apparently don't have this issue on my system, so best I can suggest is to switch to a chromium based broswer.


How to convert a .glade file to a .py file

It is possible to build GUI dynamically from Glade file using PyGTK Gtk.Builder class

  The Gtk.Builder class offers you the opportunity to design user interfaces without writing a single line of code. This is possible through describing the interface by a XML file and then loading the XML description at runtime and create the objects automatically, which the Builder class does for you. For the purpose of not needing to write the XML manually the Glade application lets you create the user interface in a WYSIWYG (what you see is what you get) manner

See this is a nice tutorial: Python GTK+ 3 Tutorial: 20. Glade and Gtk.Builder

Example:

from gi.repository import Gtk

class Handler:
    def onDeleteWindow(self, *args):
        Gtk.main_quit(*args)

    def onButtonPressed(self, button):
        print("Hello World!")

builder = Gtk.Builder()
builder.add_from_file("builder_example.glade")
builder.connect_signals(Handler())

window = builder.get_object("window1")
window.show_all()

Gtk.main()


Is there a teminal command to get the most recently created file or folder?

If you're running Zeitgeist you could use the following script:

#! /usr/bin/env python

from zeitgeist.client import ZeitgeistDBusInterface
from zeitgeist.datamodel import Event, Interpretation, TimeRange, \
 StorageState, ResultType

zg = ZeitgeistDBusInterface()
events = zg.FindEvents(
 TimeRange.always(),
 [Event.new_for_values(interpretation=Interpretation.CREATE_EVENT)],
 StorageState.Any, 1, ResultType.MostRecentEvents)

last_event = Event(events[0])
last_subject = last_event.get_subjects()[0]

print last_subject.uri


My Ubuntu gets stuck in a login loop due to the incompatibility with nvidia driver

Nvidia nForce 430 (GeForce 6150SE graphics) is legacy hardware for which Nvidia no longer has a recommended Linux driver version. On top of that it was just entry level hardware at the time of its release, meant to office tasks and not much else.

Keeping the default open-source nouveau driver is recommended but not enough, a light Desktop Environment (e.g. LXDE in Lubuntu) is also required because the hardware is incompatible with any modern 3D DE like Unity, KDE or Gnome.

For better performance a cheap discrete graphics card can be added.


Try this

sudo passwd

It will ask you ur username
Enter username of account u want to make root

It will ask you password

Enter password

And probably that should do the job


How could I see applications' Upload/Download speeds

you can use with nethogs tool. it is a command line tool

for example sudo nethogs wlan0 will give you the usage of wlan0...


Cannot scan with Canon TR4550 : SANE_STATUS_DEVICE_BUSY error

Replying to myself as I got it to work : I just connected the printer using Wifi ! (which is recommended by Canon by the way)
I uninstalled the scangearmp2 driver as it seemed to be useless (not detecting scanner, see above), then I disconnect USB cable, and use WPS method to connect the printer to my wifi network (yesterday, I tried entering wifi password with printer keyboard, and it was a mess, thus I used my USB cable...).
Nothing else to do, all is working fine now :
pascal$ scanimage -L

device `escl:https://192.168.1.29:443' is a Canon TR4500 series flatbed scanner
[~]
pascal$
[~]
pascal$ simple-scan -d
[+0,00s] DEBUG: simple-scan.vala:1720: Starting simple-scan 3.36.3, PID=26141
[+0,00s] DEBUG: unsetenv() is not thread-safe and should not be used after threads are created
[+0,02s] DEBUG: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
[+0,07s] DEBUG: app-window.vala:1906: Loading state from /home/pascal/.cache/simple-scan/state
[+0,07s] DEBUG: app-window.vala:1885: Restoring window to 676x421 pixels
[+0,13s] DEBUG: scanner.vala:1539: sane_init () -> SANE_STATUS_GOOD
[+0,13s] DEBUG: scanner.vala:1545: SANE version 1.0.31
[+0,13s] DEBUG: scanner.vala:1606: Requesting redetection of scan devices
[+0,13s] DEBUG: scanner.vala:828: Processing request
[+0,54s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+8,06s] DEBUG: scanner.vala:341: sane_get_devices () -> SANE_STATUS_GOOD
[+8,06s] DEBUG: scanner.vala:353: Device: name="escl:https://192.168.1.29:443" vendor="Canon" model="TR4500 series" type="flatbed scanner"
[+8,36s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+12,86s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,19s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,34s] DEBUG: simple-scan.vala:1536: Requesting scan at 300 dpi from device 'escl:https://192.168.1.29:443'
[+14,34s] DEBUG: scanner.vala:1674: Scanner.scan ("escl:https://192.168.1.29:443", dpi=300, scan_mode=ScanMode.COLOR, depth=8, type=single, paper_width=0, paper_height=0, brightness=0, contrast=0, delay=3000ms)
[+14,34s] DEBUG: scanner.vala:828: Processing request
[+14,66s] DEBUG: app-window.vala:1981: Saving state to /home/pascal/.cache/simple-scan/state
[+14,98s] DEBUG: scanner.vala:889: sane_open ("escl:https://192.168.1.29:443") -> SANE_STATUS_GOOD

Good thing to have this resolved !
EDIT : during investigations, I updated libsane-common from sane-project web site. Not sure this was required, but better to mention :
pascal$ sudo apt show libsane-common
[sudo] Mot de passe de pascal :
Package: libsane-common
Version: 1.0.31+git20210131-focal0

EDIT 2 : I has an issue to detect the scanner from a VM (QEMU) in hosted mode. That was resolved editing /etc/sane.d/escl.conf file, and adding a new device line like below :
device https://192.168.1.29:443 "Canon TR4550 Serie"

(as shown with the scanimage -L output from the host above).


Is there a way to estimate if the addition of a ppa will be harmful?

Adding a ppa will not affect how the system runs.  All it does is give the system another place to look for packages.  The only way you could mess anything up is by installing the packages in the ppa.  Ubuntu usually looks for ppa's at http://launchpad.net/ and there is usually information on the ppa's web page.


Moved a directory to an unknown .../ place (three dots)

You renamed the directory cakephp in /opt/lampp/htdocs/cake to .... Your command was perfectly valid, therefore it did not produce an error.

You should be able to find the directory at /opt/lampp/htdocs/cake/.... Note that files/folder starting with a dot are hidden (hence you need to use, e.g., ls -a /opt/lampp/htdocs/cake to see it).


Anki does not run on Ubuntu Budgie 18.10

I can reproduce your issue on Ubuntu MATE 18.10.

So the problem really exists. I reported it to launchpad as bug 1819063.

We can fix it with installation patched version of Anki from PPA:

sudo add-apt-repository ppa:torkvemada/torkvemada
sudo apt-get install anki

Afterwards it will launch normally.


How to create a secure boot enabled USB flash

Maybe this will help you?
How to customize the Ubuntu Live CD?
You can customize the base image and install it in the USB.


Loaded 12.10 wireless connects but does not load internet

This guy up here is crazy. lol
What kind of wireless card are you using? A lot of times the Ubuntu built-in kernel driver is jacked up. So, you end up having to install a different driver and blacklist the default one. If you give me the device name I'll try to pinpoint a driver for you.


To fix the $ login after creating the user use ...

 usermod -s /bin/bash $USER

Or when creating I myself tend to use the following ...

useradd -d /home/$USER -s /bin/bash -G group -m $USER

If you want another shell replace /bin/bash for that shell.


16.04 Update not offered via update manager

Updates to the newest LTS are usually offered when it hits in this case 16.04.1. This is done because LTS releases often run in production enviroments and they want stable releases.

To have a check you can simply do from terminal

do-release-upgrade -c

or

do-release.upgrade -cd

this will check if there is an actual release. If yes run the command

sudo do-release-upgrade

or respective if you did -cd

sudo do-release-upgrade -d

Using -d will get you a development version which can be an option to get the upgrade going just make sure youre getting the 16.04 and nothing else from that branch.


from flask_mysqldb import MySQL gives import error : ImportError: No module named flask_mysqldb

You'll have to install it first. It's not packaged in Ubuntu repositories, so you'll have to use pip2.

pip2 install flask-mysqldb

or if you want to install it systemwide

sudo pip2 install flask-mysqldb

Further documentation is provided by the project itself


Is there a list of software vendors that Ubuntu makes use of?

Companies? Ubuntu is open source - and all upstream projects are open source (and have a compatible licence) in order to be considered for inclusion. Refer https://www.ubuntu.com/licensing which highlights the open-source, few companies release full code in open-source but often only parts (eg. Microsoft keeping control) thus make inclusion impossible.
Most corporations provide only binary-blobs so cannot be included in 'main' or 'universe', and thus go into 'resticted' or 'multiverse' which users can use if they so decide (but require download as not included on install media).  See https://help.ubuntu.com/community/Repositories/Ubuntu
Upstream is the Gnome Project (https://www.gnome.org/foundation/), Debian (https://www.debian.org/),  Open Document Foundation (https://www.documentfoundation.org/) & lots of other projects, but few companies unless you see links to Linux Foundation thru use of Linux kernel source. Microsoft & corps are generally downstream (users of open-source)
Microsoft & companies may be members of foundations & organizations that support open-source, for example if you look at https://www.linuxfoundation.org/membership/members/ you can see the whole list of companies that provide $s that help create the code. They are supporters and suppliers (except of $s). If they throw in enough $s they can have a seat on the board (which Microsoft does), but supporters and suppliers are not the same.
There are benefits (and reduced costs) to being involved in the creation of open-source code you use, which companies at first don't realize (happily just take & use) slowly realizing having to re-patch & support older versions costs more than pushing changes upstream and making patches live thru upgrades, but this takes time to realize.
I'm assuming your research involves companies/corporations - which are downstream users on open-source projects generally, usually supporting the projects through $s (either direct to foundations, or paying for developers to write code for inclusion into the open-source project; which do not get recorded against any company, the code-changelog only shows developer).


Lock the drive:

eject -i 1

Unlock the drive:

eject -i 0

From man eject:

 -i on|1|off|0
        This  option  controls locking of the hardware eject button. When enabled,
        the drive will not be ejected when the button is pressed.  This is  useful
        when you are carrying a laptop in a bag or case and don't want it to eject
        if the button is inadvertently pressed.

Mind that this command is available for users on the system so you might also want to create an alias to override the normal eject. And not all versions of eject support locking (the version in Ubuntu 15.04+ does; below that I am not sure).

What the command does is a ...

echo 1 | sudo tee /proc/sys/dev/cdrom/lock
echo 0 | sudo tee /proc/sys/dev/cdrom/lock

so you can also use that.

And these is also a 3rd party script you could use called cdctl.

15:04 (oldest Ubuntu I have):

$ eject --version
eject version 2.1.5 by Jeff Tranter (tranter@pobox.com)
$ eject -i 1
CD-Drive may NOT be ejected with device button
$ eject -i 0
CD-Drive may be ejected with device button


sync Iphone6 IOs9 with ubunutu 14.04 64bit

It is sad, but this is actually Apple's doing. Ubuntu has been able to sync to iDevices for quite some time, via libimobiledevice. However, most new versions of iOS use a new database that doesn't work with Linux. (According to tech support, that was intentional on Apple's part.)

Assuming you have libimobiledevice installed, you can check if your Apple device is compatible. Plug it into your computer, and then run the following in the Terminal.

$ ideviceinfo -q com.apple.mobile.iTunes -k DBVersion

If that reports a version greater than 4, unfortunately, iTunes is your only option. [That or taking your iDevice out to a firing range for some target practice and getting an Android. That works too.]

Workaround: I am able to "sync" music with my iPod Touch using Google Play Music. It's actually pretty slick, and less annoying than iTunes ever was - no cords or tethering required!

Install the free Google Play Music app on your iDevice and pair it with your Google account. Then install Google Music Manager on your Ubuntu computer and have it monitor your music folder. It will upload all of your music to the cloud (which stores up to 50,000 songs for free).

You can play all your music, even Ogg Vorbis, via the internet on your iDevice with the app, and you can select individual tracks to store offline on the mobile device.

Side benefits: you can play your entire music library online with a web browser (play.google.com/music) you can buy tracks directly from Google Play, and the paid version works just like Spotify (stream anything). Plus, it's a handy backup for your music in case your computer ever dies.

You'll never need Apple Music or iTunes again. :P


Ligntzone 4.2.0 install on ubuntustudio 20.04 LTS

The LightZone has its own PPA on LaunchPad.

You can install the application version 4.2.0-0ppa1focal2 by running the following commands in the terminal:

sudo add-apt-repository ppa:lightzone-team/lightzone
sudo apt-get update
sudo apt-get install lightzone


Battery icon missing in gnome-shell panel

Make sure it is installed with sudo apt-get install indicator-power
If that doesnt help try gsettings list-recursively|grep settings-daemon and look for  org.gnome.settings-daemon.plugins.power active false if it is false use the following command:
gsettings set org.gnome.settings-daemon.plugins.power active true.


Breakdown of /var/log/auth.log, what is ssh2?

(brute force)

This means that the selection attempt was made from EXTERNAL IP and was not successful.

  + Install
  Fail2ban
  DenyHosts

.....

lastb

1) What is "sshd[port?]"?

The authlog log file contains the following information:

• date and time: Feb 27 03:02:36;
• server name: bullit;
• remote access server: sshd;
• process pid: 18408;
• username: (phusermv);
• IP address: 77.222.44.2;

2- What is "ssh2"?

2 - SSH1 and SSH2 protocols / As already mentioned, sshd can work with the SSH1 and SSH2 protocols. However, the use of unsafe SSH1 is highly discouraged. You can make sshd work only with SSH2: Protocol


How do I wipe a hard disk completely using a Live CD?

Wipe and gparted are separate programs. You can install wipe using this command.

sudo apt install wipe

If you don't have internet you can do it manually using dd.

dd if=/dev/zero of=/dev/sda bs=100M

instead of /dev/sda type your hard drive file which is in this format:

/dev/sdx

and specify bs according to your ram.


Online-accounts not recognized by gnome-shell-google-calendar

I have the same problem and I guess this is a bug related to Ubuntu 13.04. My other apps which use the online accounts have stopped working too.

When launching the script manually, the following stacktrace is thrown:

Logging in as 'xxx@gmail.com'...
Error logging in as 'xxx@gmail.com'
'xxx@gmail.com' may not be a GNOME online account. A list of existing accounts is below.
If you do not see a list of accounts, then you first need to add one.
For more information, see http://library.gnome.org/users/gnome-help/stable/accounts.html
Traceback (most recent call last):
File "./gnome-shell-google-calendar.py", line 477, in <module>
account = oauth.oauth_prompt()
File "/home/tnaessens/gnome-shell-google-calendar/oauth.py", line 13, in oauth_prompt
'/org/gnome/OnlineAccounts')
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 248, in __init__
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.OnlineAccounts was not provided by any .service files

When I went looking in the dbus-1/services directory, there was no org.gnome.OnlineAccounts.

Solution: I fixed this by downloading gnome-online-accounts and by restarting the .py file. It asked for my account, I entered it and it immediatly started synchronizing.


Can't get an older school iMac to boot from USB or even pull up start manager

Older Macs used to use the C key to boot from the CD/Superdrive, which shoudl also give you access to the USB if the option key is not working.

However I found booting older Macbooks to give issues when using the original bootloader. In which case you could also use rEFInd boot manager, this can be installed into OSX and then allows you to choose what bootable device/partition to use including USBs.
http://www.rodsbooks.com/refind/


Do the ubuntu core/snappy images have checksums/hashes?

Yes. Each version and derivation of Ubuntu has checksums.

Please see here.

Ubuntu Core Example

Go to the link above.
Select the link next to ubuntu-core.

Select the version you want. In this example, we'll pick 16.04.

Select the branch you want. There's only one listed, so we'll pick beta-2.

The next page shows all the files relevant to that version and branch. The *SUMS files contains the checksums. The *gpg files are the detached GPG signature relevant to each checksum file respectively.

Verification

Based on the example above, here is the SHA256SUM file.

4c78cc17b21d47f5b808556d1485bab783e1e080b1d587517819dddf0e8b53f0 *ubuntu-core-16.04-beta2-core-amd64.tar.gz
c8c8733f235d734550326d7584e3eccfbc9bb5ff0f15341fa89962f7589494be *ubuntu-core-16.04-beta2-core-arm64.tar.gz
46d047b59bb71af61e31f4d5fe90d271d9dca1a0ee6b31fd4a5a67c3de793780 *ubuntu-core-16.04-beta2-core-armhf.tar.gz
b16853573b8d83d570511899bddae9b468bdf86532603a6de6881911663f13e7 *ubuntu-core-16.04-beta2-core-i386.tar.gz
1712246003dc1b46ab25143cf0d476a95a76467c052da2b11d119238d0c1dc43 *ubuntu-core-16.04-beta2-core-powerpc.tar.gz
1c46e0582648bfe221322cae88a4420820c163c07660b2e53719ae0ec966a93d *ubuntu-core-16.04-beta2-core-ppc64el.tar.gz

Each file on the right has their checksum on the left.

What follows is me verifying the integrity of the files via the sha256sum command.

norman@laptop:~/Downloads$ ls
SHA256SUMS.txt
ubuntu-core-16.04-beta2-core-amd64.tar.gz
ubuntu-core-16.04-beta2-core-arm64.tar.gz
ubuntu-core-16.04-beta2-core-armhf.tar.gz
ubuntu-core-16.04-beta2-core-i386.tar.gz
ubuntu-core-16.04-beta2-core-powerpc.tar.gz
ubuntu-core-16.04-beta2-core-ppc64el.tar.gz
norman@laptop:~/Downloads$ sha256sum -c SHA256SUMS.txt
ubuntu-core-16.04-beta2-core-amd64.tar.gz: OK
ubuntu-core-16.04-beta2-core-arm64.tar.gz: OK
ubuntu-core-16.04-beta2-core-armhf.tar.gz: OK
ubuntu-core-16.04-beta2-core-i386.tar.gz: OK
ubuntu-core-16.04-beta2-core-powerpc.tar.gz: OK
ubuntu-core-16.04-beta2-core-ppc64el.tar.gz: OK
norman@laptop:~/Downloads$

Conclusion

You can apply this method to any of the other Ubuntu versions / branches.

If you have any questions, don't hesitate to ask.

And have a great day!


Problem with DNS in Ubuntu 12.04 and Mullvad VPN

Mullvad has futzed with /etc/resolv.conf. If I understand correctly you are no longer using Mullvad. Disable and/or de-install Mullvad. Then, to restore resolv.conf,

sudo dpkg-reconfigure resolvconf

and reboot.

Background: The Mullvad component /usr/share/mullvad/dnsconfig.py moves /etc/resolv.conf away to /etc/resolv.conf.pre-mullvad and writes a new /etc/resolv.conf. This presumably happens just after the VPN connection is established. To clean up, it moves /etc/resolv.conf.pre-mullvad back to /etc/resolv.conf. The problem with this is that in Ubuntu 12.04, /etc/resolv.conf is a symbolic link which should never be touched; programs like Mullvad should interface with resolvconf to update the resolv.conf file. If the machine is ever rebooted without Mullvad being stopped cleanly then the symbolic link is gone and /etc/resolv.conf is an obsolete file. Bad. To repair the damage (as I already said) run sudo dpkg-reconfigure resolvconf and reboot. To avoid recurrence, either don't run Mullvad, or contact the Mullvad developers and ask them to make Mullvad interface with resolvconf, or edit /usr/share/mullvad/dnsconfig.py yourself to do that.


Terminator not executing command while Lxterminal does

If lxterminal does work as you say, I'm inclined to think it's a bug.

The way you have written the commands, you should be using -x instead of -e:

terminator -x nano /some/path

If -e is used, the full command has to be given as a single string:

terminator -e "nano /some/path"

From the terminator manpage:

-e, --command=COMMAND
      Runs  the  specified  command  instead  of your default shell or
      profile specified command

-x, --execute COMMAND [ARGS]
      Runs the rest of the command line instead of your default  shell
      or profile specified command.

Terminator is similar to XFCE Terminal or GNOME Terminal in this respect.

On second thought, it seems lxterminal is following xterm's behaviour, but not documenting it clearly. From man lxterminal:

-e STRING --command=STRING --command STRING
   This option specifies the program (and its command line arguments)
   to be run in the terminal. Except in the --command= form, this must
   be the last option on the command line.

man xterm says it more clearly:

-e program [ arguments ... ]
       This  option  specifies  the  program  (and  its  command  line
       arguments)  to  be  run  in the xterm window.  It also sets the
       window title and icon name to be the basename  of  the  program
       being  executed  if  neither -T nor -n are given on the command
       line.  This must be the last option on the command line.


systemMonitor@gnome-shell-extensions.gcampax.github.com is a very outdated extension. This is the reason of javascript errors.


Pendrive cannot boot Error "kernel image not found: vesamenu.c32

Yeah look first of make sure you are using the correct Version of Ubuntu to make your bootable pendrive. For eg. If you have a 64 bit laptop, it is better you go with 64 bit one.

If you don't know how to check this. Go to your windows computer, type msconfig in start and click on msconfig. It will clearly mention if you have a 64 bit or 32 bit system.

Next you can use unetbootin to create the bootable usb.

Next important thing is that you check you have a correct boot sequence, i.e your usb is at top then followed by Hard disk. This is important.

Also make sure, you have not connected any other flash drive when u are installing, as it can cause confusion. I think this should suffice your problem. If not don't hesitate to follow up.


Black screen except for mouse cursor on Thinkpad Edge 15

I occasionally have the same issue.

Try hitting Alt+F2 and then typing unity --replace.


rufus how to boot ubuntu in pen drive without destroying pendrive

You should always use a pen drive that has no info on it you need or want.
Copy the info off the pen drive first.
It is not saying destroy as in it will be broken and toss it out, it is saying it will format the drive.


preseed late_command script: realm could not connect to system bus

I could do what I want by creating a service which run last. This is probably not the best way to do it, so I'd still like to solve this issue. In the meantime, here is how I did it :

in postinst.sh :

pam-auth-update --package --enable mkhomedir
wget --quiet http://my.server.adress.com/join_ad.sh -O /root/join_ad.sh
wget --quiet http://my.server.adress.com/firstbootsetup.sh -O /root/firstbootsetup.sh
chmod 760 /root/join_ad.sh
chmod 760 /root/firstbootsetup.sh
touch /root/firstboot.flag
wget --quiet http://my.server.adress.com/firstbootsetup.service.rename.txt -O /etc/systemd/system/firstbootsetup.service
systemctl enable firstbootsetup.service

in firstbootsetup.service.rename.txt :

[Unit]
Description=FirstBootSetup
ConditionPathExists=/root/firstboot.flag

[Service]
Type=idle
RemainAfterExit=yes
ExecStart=/root/firstbootsetup.sh
ExecStartPost=/bin/rm -f /root/firstboot.flag

[Install]
WantedBy=multi-user.target

in firstbootsetup.sh :

#!/bin/bash

/root/join_ad.sh
rm -f /root/join_ad.sh

in join_ad.sh :

#!/bin/bash

realm discover mydomain.com

/usr/bin/expect << EOF
set timeout 10
spawn realm join --user=usertojoinad mydomain.com
expect "Password for usertojoinad:"
send "TheJoinAdPassword\r";
expect eof
EOF

Note: I started with this post https://serverfault.com/questions/853396/run-script-on-first-boot


EC2 ubuntu instance is full but can't find why

The bulk of the usage was in /usr/src.

Apparently there were lots of linux header files in there amounting to 3GB!

Did the following:

sudo apt-get update
sudo apt-get -f install (cause there were some unmet dependencies)
sudo apt-get autoremove

ubuntu@:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  linux-aws-headers-4.4.0-1022 linux-aws-headers-4.4.0-1039 linux-aws-headers-4.4.0-1041 linux-aws-headers-4.4.0-1043
  linux-aws-headers-4.4.0-1044 linux-aws-headers-4.4.0-1048 linux-aws-headers-4.4.0-1049 linux-aws-headers-4.4.0-1052
  linux-aws-headers-4.4.0-1054 linux-aws-headers-4.4.0-1055 linux-aws-headers-4.4.0-1057 linux-aws-headers-4.4.0-1060
  linux-aws-headers-4.4.0-1061 linux-aws-headers-4.4.0-1062 linux-aws-headers-4.4.0-1065 linux-aws-headers-4.4.0-1066
  linux-aws-headers-4.4.0-1069 linux-aws-headers-4.4.0-1070 linux-aws-headers-4.4.0-1072 linux-aws-headers-4.4.0-1074
  linux-aws-headers-4.4.0-1075 linux-aws-headers-4.4.0-1077 linux-aws-headers-4.4.0-1079 linux-aws-headers-4.4.0-1083
  linux-headers-4.4.0-1022-aws linux-headers-4.4.0-1039-aws linux-headers-4.4.0-1041-aws linux-headers-4.4.0-1043-aws
  linux-headers-4.4.0-1044-aws linux-headers-4.4.0-1048-aws linux-headers-4.4.0-1049-aws linux-headers-4.4.0-1052-aws
  linux-headers-4.4.0-1054-aws linux-headers-4.4.0-1055-aws linux-headers-4.4.0-1057-aws linux-headers-4.4.0-1060-aws
  linux-headers-4.4.0-1061-aws linux-headers-4.4.0-1062-aws linux-headers-4.4.0-1065-aws linux-headers-4.4.0-1066-aws
  linux-headers-4.4.0-1069-aws linux-headers-4.4.0-1070-aws linux-headers-4.4.0-1072-aws linux-headers-4.4.0-1074-aws
  linux-headers-4.4.0-1075-aws linux-headers-4.4.0-1077-aws linux-headers-4.4.0-1079-aws linux-headers-4.4.0-1083-aws
  linux-image-4.4.0-1022-aws linux-image-4.4.0-1039-aws linux-image-4.4.0-1041-aws linux-image-4.4.0-1043-aws
  linux-image-4.4.0-1044-aws linux-image-4.4.0-1048-aws linux-image-4.4.0-1049-aws linux-image-4.4.0-1052-aws
  linux-image-4.4.0-1054-aws linux-image-4.4.0-1055-aws linux-image-4.4.0-1057-aws linux-image-4.4.0-1060-aws
  linux-image-4.4.0-1061-aws linux-image-4.4.0-1062-aws linux-image-4.4.0-1065-aws linux-image-4.4.0-1066-aws
  linux-image-4.4.0-1069-aws linux-image-4.4.0-1070-aws linux-image-4.4.0-1072-aws linux-image-4.4.0-1074-aws
  linux-image-4.4.0-1075-aws linux-image-4.4.0-1077-aws linux-image-4.4.0-1079-aws linux-image-4.4.0-1083-aws
  linux-modules-4.4.0-1077-aws linux-modules-4.4.0-1079-aws linux-modules-4.4.0-1083-aws
0 upgraded, 0 newly installed, 75 to remove and 205 not upgraded.
After this operation, 3214 MB disk space will be freed.

After removing those header files, usage is down to 3.3GB. With 1GB swap that's around 2GB of various files which I think is quite reasonable.

Filesystem      Size  Used Avail Use% Mounted on
udev            488M     0  488M   0% /dev
tmpfs           100M   11M   89M  11% /run
/dev/xvda1      7.7G  3.3G  4.5G  42% /
tmpfs           496M     0  496M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           496M     0  496M   0% /sys/fs/cgroup
tmpfs           100M     0  100M   0% /run/user/1000


Temperature rise in Ubuntu (with open source drivers)

I have the exact same problem on both my VAIO CR31 and ThinkPad since I installed Ubuntu a while ago. I'm afraid I don't have a neat solution that fixes the problem at its root but I can tell you what I did to circumvent the computer from heating up so much that it shuts down automatically.
Obviously, you can use an extra fan, that's what I do sometimes, but it's a bit sad at the same time. I came from Windows and still have them set up as dual boot. What works for me is to start Windows and fo to the Settings for "Power and Energy" or what it's called. I tuned it down from "high performance" to "medium". For some reason that I don't understand, it seems as if the system remembers this for all OSs. When I then start with Ubuntu, it's a bit slower of course but it's much cooler as well and doesn't shut down so easily. I reckon Ubuntu doesn't get the power management right and simply runs hyper-power all the time when Windows left the setting that way.
Hope it helps!


How to remove Python 3.8.2 from Ubuntu 18.04 LTS, without damaging preinstalled versions of Python 2.7 and Python 3.6?

Installing Python by compiling alongside the default version it can lead to a good amount of issues because of all the Python libraries shared with the default version, and even some Ubuntu packages depending on the default versions of their Python dependencies.

Using a virtual environments tool like pyenv gets rid of all these issues. It allows you to create an isolated environment using mostly any Python version, isolating its installed packages from other environments and the system itself. You can activate the environment (which overrides commands as python for the custom version) and deactivate it at any time.

Just a hint, the Ubuntu dependencies can be a bit tricky to find on the docs, so here they are:

sudo apt-get install -y build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev python-openssl git


Can't install Kubuntu 18.04 on a ASUS FX503VD gaming laptop

My model is GL503VD and I just now managed to install 18.04 by doing nothing but as follows:

Deleting --- or $vt_handoff parameters right after quiet splash
After deleting the above adding acpi_osi=! parameter right after quite splash
boot

Going by this link it seems that there is an unresolved driver issue with trackpad and or backlight with this laptop model and Ubuntu 18.04.


The problem has been resolved by re-installing the "net-tools" package. The possible cause of such issue might be a skewed previous installation.

$ sudo apt-get install --reinstall net-tools

P.S.: At the time during my research for solutions on this issue, I found that I need to know which package the command belongs to. Here is how you do it:

$ dpkg -S `which ifconfig`


Those settings are saved in your home directory, not system-wide. Check out ~/.config/monitors.xml for the file.


How to give USB access to VirtualBox when non-root

Okay, what worked for me was to use synaptic to completely uninstall (including configuration files) the commercial virtual-box 4.3 and install the virtualbox (open source edition).  I then had to uncheck usb2 support, but my devices were then found (not grayed out) and I didn't need to use root either.


I found a solution of sorts...

I just had to switch to the basic Gnome Display Manager GDM3 instead of LightDM, with the following terminal command:

sudo dpkg-reconfigure gdm3 , which brings up a selection box

For some reason GDM copes better with Deepin Desktop than LightDM does - I am now able to login to other desktops as well as Deepin, including Gnome and Unity.


Server stops accepting connections after ~120,000 active on 18.04.3

Turns out it was an AWS limitation. Apparently talking between EC2 instances inside the same VPC has an active connection limit of around 120,000. Making them use a public IP to communicate got rid of the limit. I wasn't getting any errors in Ubuntu because the OS was not limiting anything.


How to enable NTFS write support on mounted partitions in Ubuntu 18.04?

to mount the partitions in read-write mode:

run ntfsfix /dev/sdaX to resolve the problem. then remount the partitions.


Need to Remove 16.04 without damage to 14.04

Open gparted and remove the partition(s) you used to install 16.04 on to.

In gparted look at the label names. It will show 14.04 and 16.04 for the operating systems. The other partitions (if you made a /home or any other) you need to identify yourself.

From 14.04 do a df -H and write down the "sda" with the numbers and size of those partitions. That will make it easier to identify the 14.04 partitions for you.

Besides that: make a backup of your 14.04 personal files. If you mess up a restore is possible.


implement gnome-cupertino theme at its best

Several things are responsible for what we see on screen:

the desktop background (to the extent its visible)
the "gtk" theme
the icon theme
the window manager theme

The "gtk" theme affects most of the window that you see in your program except for regions such as the title bar, the maximize/minimize/close buttons (to the left or right of the title bar), and the thickness and color of windows borders.

(I maybe stating the obvious here but you need to make sure that you're installing the GNOME theme that is appropriate to your GNOME version. Of late, there have been significant changes in the GUI of GNOME apps. The theme you linked to has been updated to accommodate GNOME 3.6.x.)

What you have installed is the gtk theme. So, only specific aspects of your program's window are affected. If you want the "whole appearance", you may have to download the relevant icon theme and possibly even a window manager theme. I'm afraid you'll have to do this on your own by contacting the gtk theme's developer and asking about the icon theme and the window border theme. The link you provided has some information on this.


How I configure client LDAP on Debian and Ubuntu (probably Mint, etc. too).  This assumes you have a working LDAP server with at least one user and group.

sudo apt install etckeeper # Well you should do that first but it's optional.

The package libpam-ldapd is newer and better than libpam-ldap (without the "d" on the end):

sudo apt install libpam-ldapd

Fill out the "LDAP server URI:" field. If the server is on the same machine as the client, you can use the default ldapi:///.

Fill out the "LDAP server search base:". This is usually the dc= domain components.

Select at least the passwd, group and shadow check boxes.  You can choose to put more types in your client configuration if you like.

/etc/nsswitch.conf is automatically configured for you.

PAM is automatically configured for you.

Set binddn and bindpw in /etc/nslcd.conf to the DN and password of an account that can bind.

Set rootpwmoddn in /etc/nslcd.conf to the admin account DN. No admin password is needed in /etc/nslcd.conf if you choose a non-admin account for binddn.

Run sudo pam-auth-update. Then check the check box for "Create home directory on login" (leave the other check boxes as-is).

Reboot (or maybe just restart nscd and nslcd).

There may be a short delay before LDAP responds.

mc@openldap:~$ sudo systemctl restart nscd
mc@openldap:~$ sudo systemctl restart nslcd
mc@openldap:~$ id puppy
id: ‘puppy’: no such user
mc@openldap:~$ id puppy
id: ‘puppy’: no such user
mc@openldap:~$ id puppy
id: ‘puppy’: no such user
mc@openldap:~$ id puppy
id: ‘puppy’: no such user
mc@openldap:~$ id puppy
uid=10000(puppy) gid=10000(puppies) groups=10000(puppies)

$ sudo passwd puppy
LDAP administrator password:
New password:
Retype new password:
passwd: password updated successfully

mc@openldap:~$ su - puppy
Password:
puppy@openldap:~$

Source: https://wiki.debian.org/LDAP/PAM


How to disable the Ubuntu One file manager ribbon for specific folders?

Right click on the folder in question, and then goto Ubuntu One > Hide Ribbon


Is it safe to clone the current used disk

As it is safe to bitwise clone an unmounted hard drive using dd we should not do so from a mounted drive which is in use. This is especially true for the mounted system drive.

  It is not recommended to clone the system drive of a running system because we inevitably will have data inconsistencies from cloning files where the system will currently write to.

Nevertheless it is possibly to almost clone a running system after we had excluded our used system files from being copied.

It is at least the content of system directories below we should exclude from our backup copy. The content of these directories will be created on boot time but note that the directories will not be created, therefore we have to copy these, but exclude their content Source:Arch Wiki:

/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found

We may also want exclude the trash, or other directories from /home/ to speed up the backup process.

Such an exclusion can nicely be done with rsync  resulting in a command similar to this:

sudo rsync -avxAX /* /backup/directory --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found}

This command should further be adapted to meet our personal needs (see [manpage for the rsync command]. Note that we may want to omit the option -x in case we also want to copy a source on multiple filesystems. We then should also exclude .gvfs to avoid copying GFVS mounted contents there.

Of course the master boot sector, partition boot sectors, partition tables, and format of the source drive will not be copied by this. We will have to partition the backup drive before we are able to "clone" the source with rsync. We may also have to install Grub to this drive in case we want to also be able to boot from this drive.

Still many files from the source system may not be really needed in the cloned system (think of old packages, kernels, etc.). Therefore rather than cloning a system we may be better off performing a backup of our source to restore it somewhere else.

How to backup settings and list of installed packages


"Authentication required to refresh system repositories" in Ubuntu 19.10

This happens when using xRDP (remote sessions or Hyper-V enhanced sessions) into Ubuntu. The remote sessions are more restrictive than local sessions for the same user, and this fixes it.

For Ubuntu 19.10, do this in a terminal

sudo bash
cd /etc/polkit-1/localauthority/50-local.d
nano 46-allow-update-repo.pkla

and then put this inside the file

[Allow Package Management all Users]
Identity=unix-user:*
Action=org.freedesktop.packagekit.system-sources-refresh
ResultAny=yes
ResultInactive=yes
ResultActive=yes


Ubuntu One for Android without Google Account?

It isn't the very latest version, but there is a .apk file for version 1.0.5.1 of the Ubuntu One Files client available here:

https://launchpad.net/ubuntuone-android-files/trunk/u1f-1.0.5.1

You should be able to install this the same way as you would any other non-market piece of software.

I don't think we've currently got policies in place to publish .apk files in parallel with uploads to the market at the moment.


Ubuntu 14.04 doesn't start after installation

Your problem seems to be that there's no Ubuntu/GRUB entry in your EFI's NVRAM-based boot loader list. This problem is most often caused by a defective EFI. I recommend you try each of the following, in order, until one works:

Check for a firmware update (most manufacturers call it a "BIOS update"), apply it, and re-run Boot Repair. I don't hold out a lot of hope that this will help, but it might.
Reset the firmware to defaults, manually re-apply any tweaks you've made, and re-run Boot Repair. Again, this may not work, but it's worth trying.
If the computer is new enough, return it to the store for a refund, since the firmware is defective.
If you get this far, you must apply an ugly hack that involves renaming boot loader files. There's an option on the Advanced page of Boot Repair to do this, called something like "Back up and rename EFI files."
As a last-resort option, you could install a boot loader or boot manager on a USB drive and use it. My own rEFInd boot manager should work for this; there's a USB flash drive image you can download and write to a small USB drive.

One more point: Your Boot Repair output indicates that it was unable to mount some partitions, including the critical EFI System Partition (ESP). There may be some one-off explanation for this, but the usual cause is the use of Fast Startup and/or Hibernation in Windows 8 or later. See this page and this one to learn how to disable these features. There's a chance that you'll need to disable these features to make any of the preceding fixes work (except of course for the return-to-the-store "fix").


Ubuntu 18.04 goes to aeroplane mode when I close the lid

I had the same problem. (Do you have a HP laptop?)

The next steps will test if you have the same problem as I had and also will provide solution. It is based in a very useful comment from usser "ebin92" on reddit about this topic.

TEST

We gonna check if the open/close lid event is sending scancodes and, if so, remap them

Open a terminal and type: <journalctl -f>
Then open and close the lid, and check in the terminal for an unknown scancode (in my case they were "e058" and "e057")
Remap the scancodes that your lid are sending to DISPLAY OFF code (you can remap it to another keycode if you want)
For that, use >> setkeycodes [SCANCODE] [KEYCODE]
In my case, >> setkeycodes e058 245 e057 245

Try again opening and closing your lid and if the problem is solved, lets make it permanent.

PERMANENT FIX

We are going to enable a new systemd service to remap the scancodes on boot up

Open a terminal and go to /etc/systemd/system. Execute next steps as superuser
Create a new file with name format "YOURNAME.service". In my case it was "lidbehaviour_override.service"
Put inside the attached content (see below) and edit the keycodes to your case
Give to the file execution permissions, running >> sudo chdmod a+x FILENAME
In my case >> sudo chdmod a+x lidbehaviour_override.service
Test everything is fine running the service. For that:
· reload the daemon configuration (all you have modified in systemd) with sudo systemctl daemon-reload
· run the new service with sudo systemctl start YOURNAME.service
In my case systemctl start lidbehaviour_override.service
· Open and close the lid
If everything went right, then make the service starts on boot up sudo systemctl enable YOURNAME.service
In my case systemctl enable lidbehaviour_override.service

SYSTEMD SERVICE CONTENT

[Unit]
Description=Fix aeroplane mode on/off when lid opens/closes

[Service]
ExecStart=/usr/bin/setkeycodes e058 245 e057 245

[Install]
WantedBy=multi-user.target


Headphone and Speaker both works together in 12.10

In your terminal run alsamixer.   Once in alsamixer use the left and right arrows to navigate to the speaker or headphone and reduce the volumes appropriately.


Very long boot up in Ubuntu 20.04.1 LTS desktop

There are several actions you can do to improve boot time like disable not necessary services and not necessary snaps.
You can try  first verify which service / snap take longer time with:
lsblk -f

systemd-analyze blame

systemd-analyze critical-chain

Very often services as e.g. Network manager takes a lot of time (in this case waiting for a internet connection) during booting and may be turned off to speed up boot time.
you can disable it with:
sudo systemctl disable NetworkManager-wait-online.service

Don’t worry, once you log in, you’ll have wifi
working normally, so only when you've completed boot you can switch on your internet connection.
If you want to revert the change, you can use this command:
sudo systemctl enable NetworkManager-wait-online.service

You have to be careful disabling services because It may have dangerous consequences. It is very important that you know well what you are doing and the risk to make your system instable.
Check also installed snaps because they take a long time during booting to be mounted, so you can verify if you have snaps not used and old versions installed marked with "disabled" to gain free disk space with:
snap list --all

you will have a list like this:
Name                             Version                     Rev   Tracking         Publisher   Notes
canonical-livepatch              9.5.5                       95    latest/stable    canonical✓  -
core                             16-2.46.1                   9993  latest/stable    canonical✓  core
core18                           20200724                    1885  latest/stable    canonical✓  base
gnome-3-28-1804                  3.28.0-17-gde3d74c.de3d74c  128   latest/stable    canonical✓  -
gnome-3-34-1804                  0+git.3556cb3               60    latest/stable/…  canonical✓  -
gtk-common-themes                0.1-36-gc75f853             1506  latest/stable/…  canonical✓  -
kde-frameworks-5-qt-5-14-core18  5.68.0                      4     latest/stable    kde✓        -
okular                           20.04.0                     98    latest/stable    kde✓        -
rambox                           0.7.6                       14    latest/stable    ramboxapp✓  -
snap-store                       3.36.0-80-g208fd61          467   latest/stable/…  canonical✓  -
snapd                            2.46.1                      9279  latest/stable    canonical✓  snapd

I saw that additional snap I had installed slow down boot time so at the end I've removed all kde snaps that I've had installed leaving only canonical system snaps.
If you want for  example unistall kde snaps you can type command like:
sudo snap remove okular
sudo snap remove kde-frameworks-5-qt-5-14-core18

In my case leaving only rambox snap installed by myself I've checked my boot time:
systemd-analyze

the output is:
Startup finished in 9.042s (firmware) + 4.861s (loader) + 3.600s (kernel) + 24.641s (userspace) = 42.146s
graphical.target reached after 24.366s in userspace

At the end I've reached a boot time of about 25 seconds.


django-admin --version can not find installed version

One reason you cannot find the Django is because you installed it in one virtual environment and now looking for it in another place.So suppose you are in the directory Codes.
$ cd Codes

Then first you create a virtual environment:

$ virtualenv env

Then you activate the virtual environment:

$ source env/bin/activate

Once activated, your terminal will look like this: (env) $
Now install django inside env:

(env) $ pip install django

SO you have Django INSIDE THIS env, each time you want django, you need to activate this env. So suppose, you close this terminal and open a new terminal:

Then you 1st activate the environment:

$ cd Codes
$ source env/bin/activate     # <--- do this whenever you need django
(env)$ django-admin --version
2.2.7 # <---  django version

I hope this works.


Can the unity panel calendar show my local public holidays?

The only possible solution I can think of is the following:
Evolution, as I am aware, features synchronization with Google Calendar (I use Thunderbird myself so I cannot guarantee how well it works). Google Calendar has plenty of options, including subscribing to public calendars, amongst those I am sure there is one for your region's holidays. The solution would be subscribing to that specific calendar in GC, then synching the calendar with Evolution. All of Evolution's marked dates should automatically be added to the panel calendar entry.

Here are a few links I hope you find helpful:

http://www.google.com/support/calendar/bin/answer.py?answer=37098 - How to add a public calendar to GC

http://ubuntuforums.org/showthread.php?t=1599583 - How to sync GC and Evolution

http://email.about.com/od/googlecalendartips/qt/Move_All_Events_from_One_Google_Calendar_Calendar_to_Another.htm - In case the synchronization doesn't pull the public calendar entries, it needs some further fiddling, but it should work.


Ubuntu freezes, what's the shortcut to solve the memory leak problem?

The Alt+F2, rEnter possibility to restart Gnome Shell still exists in Ubuntu 20.04. However, as it always has been, this option only works if you are running Gnome Shell on top of Xorg instead of Wayland.
That it does not work for you may happen because you are running Ubuntu on Wayland. To change to an Xorg session, log out, then before logging back in, select the "Ubuntu on Xorg" session by clicking on the cog in the right bottom corner before logging back in.


As suggested by Zacharee in the comment above the chrome extension 'Force custom fonts' does the job of changing the font on every webpage as you like and works better than the inbuilt chrome customization font setting.


This is an answer which is very hard to say, only way to find out is to try a recovery.

But to be honest it is very unlikely since the new installation most likely overwrote existing data in most cases and if there is really something to recover it may be mostly partial and or incomplete.

So as a final verdict i would rather say if you're not willing to spend countless money on specialists in data recovery you should chalk the data up onto a new lesson learned: always make backups!


Well, first of all, you are killing the wrong program. Your script has sudo killall dockey & but you want to kill docky, not dockey. That said, there is absolutely no reason for sudo, docky has been started by your user so you can kill it without any special privileges. You also don't need to send it to the background (that's what the & does).

You haven't explained why your script doesn't work but what is probably happening is that you run it and you see nothing happening (please always explain what the symptoms are when asking questions). This is because you are sending the sudo ... command to the background with &. sudo expects a password:

$ sudo ls
[sudo] password for terdon:

So, when you run it, it will provide a prompt asking for a password. Since you are running it in the background, you will never see that prompt and the script will be stuck, waiting for you to answer.

I don't use docky and I have no idea if you can do this without restarting it but restarting seems to be the simplest option. Just change your script to:

#!/bin/bash

gconftool-2 --get  /apps/docky-2/Docky/Interface/DockPreferences/Dock1/Autohide | grep -q None &&
    gconftool-2 -t string -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/Autohide "Intellihide" ||
    gconftool-2 -t string -s /apps/docky-2/Docky/Interface/DockPreferences/Dock1/Autohide "None"

killall docky && docky

The && means AND, in other words "run the next command only if the previous one was successful". The || (OR) is the opposite, "run the next command if the previous one failed. So, the script above will first query gconf for the current state of Autohide. The grep will only be successful if that matches None. If so, it is set to Intellihide and if not, it is set to None

Note that && is not the same as &. The & sends commands to the background as described above and is not needed unless you want to send something to the background. For more details on the various shell operators, see here.


How to delete a non-empty directory in Terminal?

Use the below command :
rm -rf lampp

It deletes all files and folders contained in the lampp directory.
In case user doesn't have the permission to delete the folder:
Add sudo at the beginning of the command :
sudo rm -rf folderName

Otherwise, without sudo you will be returned permission denied. And it's a good practice to try not to use -f while deleting a directory:
sudo rm -r folderName

Note: this is assuming you are already on the same level of the folder you want to delete in terminal, if not:
sudo rm -r /path/to/folderName

FYI: you can use letters -f, -r, -v:

-f = to ignore non-existent files, never prompt
-r = to remove directories and their contents recursively
-v = to explain what is being done


LibreOffice 4.2.7.2: This document contains macros

Go to Tools-->Options-->Libreoffice-->Security-->Macro Security-->Low
Tell me if that solves your problem.
Note:This choice will remove any layer of security that you have so be careful what files you are using.


Linux kernel 3.5.0-18 update is not working with NVIDIA driver 304.60

I was able to solve this by following rft183's approach here:

Desktop does not show when I installed nvidia drivers!

Basically, install the linux-source and linux-headers-generic packages, then reinstall the nvidia-current-updates package (it worked for me just by providing the --reinstall flag, I didn't need to remove the package). Then reboot.


How I can retrieve emails and websites from csv files in command line?

A plain-text based, definitely more verbose python option:

#!/usr/bin/env python3
import sys

f = sys.argv[1]; out = sys.argv[2]

with open(out, "wt") as wr:
    with open(f) as read:
        for l in read:
            for s in l.strip().split(","):
                if any(["@" in s, "www" in s, "http" in s]):
                    wr.write(s+"\n")

Or, just for fun, a bit more compressed:

#!/usr/bin/env python3
import sys

with open(sys.argv[2], "wt") as wr:
    with open(sys.argv[1]) as read:
        [[wr.write(s+"\n") for s in l.strip().split(",") if any(["@" in s, "www" in s, "http" in s])] for l in read]

To use

Copy the script into an empty file, save it as get_stuff.py
Run it with the source file and targeted output file as arguments:

python3 /path/to/get_stuff.py <input_file> <output_file>

Result:

DR@example.com
http://www.example.com
DR1@example.com
http://www.example.com
DR2@example.com
DR3@example.com
www.example.com
DR4@example.com

Comparison on time

Interesting to see is that on smaller files (like in the example), the sed option is faster, but on bigger files the python option is faster:

on a file of 150.000 lines:

sed

real    0m0.073s
user    0m0.068s
sys     0m0.000s

python

real    0m0.046s
user    0m0.044s
sys     0m0.000s

On a 10-line file:

sed

real    0m0.003s
user    0m0.000s
sys     0m0.000s

python

real    0m0.037s
user    0m0.032s
sys     0m0.000s

(I should mention I have an ancient box, all times should be shorter on a serious machine)

The idea could be that especially if you need to extract data from many smaller files in a loop, use sed, on bigger files in a loop, use python.

On a single file, small or big, the difference between 0.073and 0.046 is totally irrelevant.

Additionally

Below a version to extract the same data from a whole (plain) directory of files.

#!/usr/bin/env python3
import sys
import os

dr = sys.argv[1]

def extract(f, out):
    with open(out, "wt") as wr:
        with open(f) as read:
            [[wr.write(s+"\n") for s in l.strip().split(",") if any(
                ["@" in s, "www" in s, "http" in s]
                )] for l in read]

for file in os.listdir(dr):
    f = os.path.join(dr, file); out = os.path.join(dr, "extracted_"+file)
    extract(f, out)

From each of the files, the script will create a new file with extracted data. From a file:

somefile.csv

it will create a second file, named:

extracted_somefile.csv


ath error - Could not stop RX, DMS failed to stop

It's a known problem with the wireless drivers, not ubuntu specific.
(e.g.: search for openwrt, you'll find they have problems also)

Worst thing that happens is that the wireless connection drops out.
Annoying but for most users nothing to serious.

Updating to a newer ubuntu version (e.g. 11.10) should help. Although
not all problems are solved yet.


SSH login problem under 12.04 server edition

SSH by default is logging failed connection attempts to /var/log/auth.log.
Since you just installed the system, nobody disabled it, and you cannot login.

Conclusion: You are getting connected somewhere else (on your router/firewall).

I would guess you are trying to connect over the internet (say from home to work) but you are stumbling on some network gear which also has SSH running.

You could add some more information in your post for better troubleshooting.


How can I install ubuntu from the Gparted boot disk?

I assume that your gparted  disk is a live CD (or DVD) with gparted according to this link:

gparted.org/livecd.php

It means that the basic linux tools should be available, for example dd, which can do the job for you.

dd is a very powerful tool, but also very dangerous. It does what you tell it to do without questions. So if you tell it to wipe your family pictures ... and it is a minor typing error away. You can use it, if you know what you are doing, and you check and double-check, that you will write to the correct target device, the flash drive.

You can identify the drives and find the flash drive with the following command lines,

df
sudo lsblk -f
sudo lsblk -m

Then you run the following command lines. Change the current directory to where you have the iso file, maybe 'Downloads'

cd
cd Downloads

Maybe in another drive. In that case you must mount the partition where you store the iso file, and change directory to where it is

sudo mount /dev/sdxn /mnt
cd /mnt/path-to-iso-file

where x is the drive letter, n is the partition number and 'path-to-iso-file' is the path to the iso file within that partition, so for example /dev/sda1 and /mnt/home/bcbro/Downloads

Then you run the dd command line, where you should use the actual file name of the Ubuntu iso file (instead of 'ubuntu-file.iso')

sudo dd if=ubuntu-file.iso of=/dev/sdx bs=4096

where x is the device letter for the flash drive, so for example /dev/sde.

If you want to play safer, you can install dus into your live gparted system (yes, I know, it is only temporary, but anyway), and let it wrap a safety belt around dd. In this case it is probably easiest to install dus via a tarball according to the following link,

help.ubuntu.com/community/mkusb/gui/tarball

It should be enough to download dus.tar.gz, the minimal version. Follow the instructions at the link above. If the installer wants you to install some other programs, please do so. Otherwise there might be problems to run dus.

Now you are ready to use dus alias mkusb-dus, either from the command line, or via the menu, 'guidus'. See the mkUSB-quick-start-manual-12.pdf


How to use Intel N2800 / GMA 3650 in 12.10?

It looks like 12.10 is not and will not be supported :(

http://communities.intel.com/message/160444#160444


System > Preferences > Start-up applications would work only during log in to your desktop and not during boot.

It's better to set it as cron task: run crontab -e to assign new cron task. Add following line, assuming /path/to/directory/* is yours.

@reboot rm -rf /path/to/directory/*

@reboot is executed on startup.


LiveCD hangs when removing boot CD for burning another

Tom is correct in that when using Ubuntu from a Live CD, you must keep the Ubuntu Live CD in the drive the entire time.  You basically have two options:

1- If you have and can connect a second CD/DVD drive, you can run the Ubuntu Live CD from one drive and burn with the other.

2- Create a Live USB (again, as Tom mentioned).


Ubuntu doesn't save state after hibernation

I fixed it. Turns out my resume file wasn't updated to account for the new UUID! I followed everything in the link below and hibernation works again.

https://askubuntu.com/a/196365/123256


Can I make new tabs open in my default Chrome(ium) profile?

ATTENTION!
The description below applies to Google Chrome. For Chromium instead of ~/.config/google-chrome  you have ~/.config/chromium!

In ~/.config/google-chrome/ you will see your profile folders. Let's say, you have beside the default (named Default) an another one called d3vid which you want to make default.

I give you two options:

Rename the Default to something else, and your profile to Default: mv Default Default_old; mv d3vid Default
Move Default to a better name, and create a symlink to your preferred profile: mv Default My_cool_profile; ln -s ~/.config/google-chrome/d3vid ~/.config/google-chrome/Default


Please help new install 12.10 black screen

Let things load up (I know you can't see it). When you think it has (couple of mins fine) do

    `Ctrl+Alt+F2`

This will bring up the console. Login and then you can attempt to correct the problem. Probably likely to be graphics related. When you installed did you let the install disk boot up to the op system or did you just go straight for the install? If you went straight for the install the system may just be wigging out with your particular laptop.


Replace string in multiple files at once

You can replace the string in scripts using sed.

If all scripts are in a folder, you can run sed with * wildcard

sed -i 's|/projects/old/|/new_partition/projects/|g' *

Or if you want to specify filenames

sed -i 's|/projects/old/|/new_partition/projects/|g' filenames_separated_by_spaces

If you want to manipulate all the .py scripts in the subdirectories of current directory, you can add find

find . -name '*.py' -print0 | xargs -0 sed -i "" 's|/projects/old/|/new_partition/projects/|g'


Holding Click On Window Titlebar While Changing Workspaces in 11.04

Maybe you can live with Ctrl+Shift+Alt and Arrow to move the current window to another workspace?


nvidia prime in NVIDIA X Server Settings (in 16.04.1)

Maybe the installer did not recognize that the computer has a hybrid graphics solution.
Normally the package nvidia-prime should be installed alongside the NVIDIA drivers automatically - to do it manually, open a terminal and execute the following command :

sudo apt install nvidia-prime

Now you can find the tab PRIME Profiles in the NVIDIA X Server Settings application.

Update addressing your comment that the package nvidia-prime is already installed

Maybe something went wrong during the first installation process of the NVIDIA drivers.
Therefore un-install and re-install the packages nvidia-prime and nvidia-settings :

sudo apt purge nvidia-prime nvidia-settings
sudo apt install nvidia-prime nvidia-settings

As you did not provide further information about your graphics hardware, NVIDIA Prime is only effective when the computer has an integrated intel AND a dedicated NVIDIA graphics adapter.

Update addressing the comment in which you provided information about the hardware

As you have very new graphics hardware - using the latest stable drivers may solve the issue.

First uninstall every NVIDIA related software you have installed on your operating system :

sudo apt purge nvidia*
sudo reboot

After the restart install the latest official NVIDIA drivers 375.20 from the long-lived branch :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt install nvidia-375 nvidia-prime
sudo reboot


Bash scripting - how to concatenate the following strings?

In one go:

printf '%s%s\n' "$(grep -Pom1 'extended model.*\(\K\d+' <(cpuid))" \
                "$(grep -Pom1 'extended family.*\(\K\d+' <(cpuid))"

The above leverages process substitution (<()), and command substitution ($()).

The two command substitutions are replaced with the STDOUT of the commands inside
cpuid command is put inside process substitution, the STDOUT will be returned as a file descriptor, grep will do the necessary matching on it, we have used grep with PCRE (-P) to get only (-o) the desired portion, and -m1 will stop after first match to avoid repetition
printf is used to get the output in desired format

Example:

$ printf '%s%s\n' "$(grep -Pom1 'extended model.*\(\K\d+' <(cpuid))" "$(grep -Pom1 'extended family.*\(\K\d+' <(cpuid))"
30


My sshd_config file is empty is this correct?

I think the problem is a bit more simple than currently being suggested. Look at your command again:

sudo vi etc/ssh/sshd_config

There's no leading /. That means vi is trying to open <current-path>/etc/ssh/sshd_config so unless you're at /, it won't work.

The fix is to just specify the proper path:

sudo vi /etc/ssh/sshd_config


Had to upgrade Postgres on Ubuntu; now, how to access old, missing databases?

Unless you've removed the old 9.3 cluster there should be 2 clusters running:

$ service postgresql status
9.3/main (port 5432): online
9.4/main (port 5433): online

(or use pg_lsclusters to display existing PostgreSQL clusters).

PostgresSQL commands accepts -p argument to distinguish which DB cluster you're using (it accepts also Unix socket path). You can export old data using (assuming that the old DB runs on port 5432):

su - postgres
pg_dump -p 5432 my_db -f my_db.dump
# import data into new DB cluster
pg_restore -p 5433 -d my_db my_db.dump


Does Linux support capturing tcp packets without being super user?

It is possible to capture packets without being root, but you need to have the CAP_NET_ADMIN and CAP_NET_RAW capabilities. Basically you have to become root (so that you get all of the capabilities), then drop all of your capabilities except for those two, and drop root privileges too.

For managing the user ID that UNIX commands run as there are convenient tools like sudo. Unfortunately there are no standard tools to manipulate capabilities from the shell in the way that is required here.

This page describes what you need to do at the C level and this one contains a HOWTO to set up Wireshark to work this way.


how to make a new account on mysql server?

If you don't have any data in the database worth saving you can remove the package entirely and set from scratch:

sudo apt remove --purge mysql-server-*
sudo rm -rf /var/lib/mysql*
sudo rm -rf /etc/mysql*
sudo apt install mysql-server

Also be aware that newer versions of MySQL have a different setup mechanism than older ones using mysql_secure_installation to create the first user.


Where in System Settings do I set a static IP?

I don't have a good place to upload pictures to illustrate, but I'll try to talk you through it as best I can. I downloaded a copy of Kubuntu 15.04 just so I could help you with this!

In order to access the network settings for a specific connection and add a static IP, do this:

Click the network connection indicator in the system tray
You should see something like Wired Connection 1 (I'm doing this from a VM, so please adjust accordingly)
Select that connection and in the upper right of that dialog, click the  button that looks like two sliders. This will open up the advanced options for that connection.
Select the connection in the list and hit the edit button at the top.
Select the applicable tab, IPv4 or IPv6 and change the Method combo box to Manual.
Then add your static IP information (IP address, netmask, and gateway) into the listbox at the bottom by pressing the "+ Add" button.
Add your DNS servers as well and you should be all set!


Directory /opt is optional. It is not being used for anything in the standard Ubuntu distro so somebody decided not to create one.

Not a big deal. Just create it with sudo mkdir /opt

Edit

As suggested by waltinator a better command would be mkdir --mode=755 /opt


dual boot with ubuntu 16.04 in primary and windows 7 in extended partition

Windows needs a primary partition to boot from, not a logical partition like sda6.  You might be able to use sda2 (converted to ntfs) as a Windows boot partition,and leave the bulk of the Windows on sda6, but instructions for that are inappropriate for this site.  Backup, Wipe the disk partitions, install Windows first, shrink Windows partition, and install Ubuntu, which does not care if it is in a logical partition.