How can I check if a directory contains packaged files?

dpkg -S ... can work well here. It's something I would normally use to check which package a specific file comes from but here we can use:

$ dpkg -S /usr/local/lib/python2.7/
dpkg-query: no path found matching pattern /usr/local/lib/python2.7

This works because packages specify their file paths in full. If one contains a file /usr/bin/file it will specify the following as its paths:

/usr
/usr/bin
/usr/bin/file

I looked to see if /usr/local/ had any packaged files (because it really shouldn't IMO) and found:

$ dpkg -S /usr/local/
hl2250dnlpr, wine, shatter, cupswrapperhl2250dn, open-sankore: /usr/local

How very curious.


How do I rip a dvd including menus and extras to a menu driven divx file (or any lossy format that supports menus)?

Try Dvdrip.

  Dvdrip is a full-featured DVD copy program written in Perl. It
  provides an easy to use, but feature-rich Gtk+ GUI to control almost
  all aspects of the ripping and transcoding process. It uses the widely
  known video processing swissknife transcode and many other Open Source
  tools. dvd::rip itself is licensed under GPL / Perl Artistic License.1

To Install Dvdrip, do that from the USC

1Source: Ubuntu Documentations

Another program is HandBrake.  I don't think it can do menus, but take a look at it, you might use it for other projects.

I just stumbled upon AcidRip DVD Ripper.  You can install it from USC.  From reading about it, I think it can do menus, but I'm not sure.  I* will test it once I'm done with the project I'm working on.

Take a look at this:

  k9copy provides the following features:

  The video stream can be compressed to make the video fit on any    configurable target size
  DVD Burning
  Transcode DVD using mencoder or ffmpeg with configurable presets
  Creation of ISO images
  The possibility of choosing which audio and subtitle tracks to copy
  Title preview (video only)
  The ability to preserve the original menus 1

1Source:Ubuntu Apps Directory


Plot simple functions like sine of x with IPython

In Ubuntu 16.04 and earlier open the terminal type:
sudo apt install ipython-notebook python-numpy python-matplotlib

The latest version of IPython Notebook is now known as the Jupyter Notebook. You can optionally install Jupyter Notebook instead of IPython Notebook. In Ubuntu 14.04/16.04/16.10 follow the instructions in this answer to install Jupyter Notebook by upgrading IPython Notebook to Jupyter Notebook. In Ubuntu 17.04 and 17.10 you can install Jupyter Notebook from the default Ubuntu repositories with the command sudo apt install jupyter-notebook jupyter-core python-ipykernel. In Ubuntu 18.04-19.10 you can install Jupyter Notebook from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter jupyter-core python-ipykernel. python-ipykernel is necessary for running Python 2.x programs in Jupyter Notebook, which otherwise supports only Python 3.x. In Ubuntu 20.04 and later you can install Jupyter Notebook from the default Ubuntu repositories with the command sudo apt install python3-notebook jupyter jupyter-core. If Jupyter Notebook is installed, the command to start Jupyter is jupyter notebook and the first line of code to enable plotting in the current Notebook is %matplotlib inline.
Follow these steps to generate the sine wave plot in the example from matplotlib.org.

Open the ipython-notebook web browser interface. From the terminal run:
 ipython notebook --pylab

The --pylab option was removed when they transitioned from IPython to Jupyter notebook. Instead use jupyter notebook to start Jupyter.

Make a new notebook. From the IPython Notebook interface click the New Notebook button. A new notebook tab will open in your default web browser. From the new notebook tab select File -> Rename, rename your new notebook to any descriptive name like sine_wave and click the OK button.

Copy the example Python code for plotting a sine wave listed below and paste it into the sine_wave notebook to the right of where it says In [1]: using the keyboard combination Ctrl+V. Paste the whole code block together, not one line at a time.
 import matplotlib.pyplot as plt
 import numpy as np

 t = np.arange(0.0, 2.0, 0.01)
 s = np.sin(2*np.pi*t)
 plt.plot(t, s)

 plt.xlabel('time (s)')
 plt.ylabel('voltage (mV)')
 plt.title('voltage (mV) vs. time (sec)')
 plt.grid(True)
 plt.savefig("plot-voltage-vs.-time.png")
 plt.show()

plt.savefig("plot-voltage-vs.-time.png") saves an image of your plot without all the extra window chrome in your Home directory.

Click the black triangular-shaped Run button ( ▶ ) on the menu bar to run the code block.

Your output plot will appear in a small popup window that looks like the popup window in the below screenshot.

Repeat steps 3. and 4. to run a new code block (In [2]:). Try pasting the following simple Python code after In [2]: and running it.
 import matplotlib.pyplot as plt
 import numpy as np

 x = np.arange(0.0, 2.0, 0.01)
 y = np.sin(2*np.pi*x)
 plt.plot(x, y)
 plt.show()

The error message ImportError: No module named 'matplotlib' was caused by using Python 3 with Jupyter that was installed for Python 2.x. It is possible to use Python 3 in Jupyter Notebook for Python 2 by adding the kernel for Python 2. If you're running Jupyter on Python 3, you can set up a Python 2 kernel like this:
python2 -m pip install ipykernel
python2 -m ipykernel install --user


Installed Ubuntu and lost access to Windows

If you using EFI, install grub-efi: apt-get install grub-efi
Use "Separate /efi" option of Boot-Repair.
Then force your BIOS to boot into Grub EFI partition

This works for me every time. Good luck!


Command not executing after installation Ubuntu 18.04

Finally find the solution. It was npm issues. i won't giving me any error but just won't working says command not found. So it fixed by reconfiguring npm directory. Here is ref. https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally


Windows 8 Dual Boot Ubuntu 12.10 with UEFI broken Windows boot manager

Just to flesh out a couple of details:

1) Get hold of USBs with Windows 8 Pro and Ubuntu 12.10.

2) Enter BIOS (F2)

3) Switch Sata configuration to AHCI (better for SSDs than IDE)

4) Turn off Fast boot, turn on Legacy CSM and the PXE oprom option

5) Turn off Secure boot control

6) Boot to Ubuntu using the USB and remove leftover RAID data (see eg here

7) Gparted may show errors with one or both of the disks - you need to reformat the disks as MBR partition tables rather than GPT - (eg here)

8) Create partion for Windows 8 on first SSD.

9) Boot Windows 8 in non-UEFI mode (in the bios you can change the BBS order to put the USB at the top, then go to the Save screen and there should be two USB boot options - choose the one which doesn't say UEFI in front of it) and install.

10) Boot Ubuntu in non-UEFI mode - it should recognise Windows 8 installation. Proceed as normal, with the bootloader on /dev/sda.


What Permissions Are Used For Scripts On Startup?


Not able to hide hidden files / folders from nautilus broswer

Go to the preferences (edit -> preferences) then click the

[✔] Show hidden and backup files

option, so it is unchecked.


Restore synchronized files/folders from Ubuntu One

All you need to do is sign into Ubuntu One in your new install of Ubuntu. This will start the syncing process to your new installation.

The files may take a little time to appear in the Ubuntu One folder, but they will eventually appear. There are ways you can check the syncing progress too from the indicator.

This also works for any other computer you might have too, say if you want to sync files between two machines.


Is it possible to do a USB File Transfer on a Motorola Droid X2?

Turns out you can do it just by selecting "USB mass storage". :)


How to reach the "software sources" dialog from Plasma Discover

In Kubuntu 20.04 it seems that the "software sources" dialog disappeared for good. This is unfortunate because Kubuntu 20.04 happens to be a long term support (LTS) release and the user must open the "software sources" dialog to allow updates to normal releases (i.e. update to 20.10 instead of waiting for 22.04 LTS).
kdesudo was deprecated and software-properties-kde is now called software-properties-qt. So in Kubuntu 20.04 starting sudo software-properties-qt from a console did the trick.
In case you want to try at your own risk: after modifying the upgrade channel from LTS to normal releases you can force the upgrade from Kubuntu 20.04 to Kubuntu 20.10 with pkexec do-release-upgrade -d -m desktop -f DistUpgradeViewKDE. Removing -d will only let you upgrade after Kubuntu 20.10 is officially released, which will happen next week (October 22nd, 2020). But sometimes Kubuntu fails to find the new release and -d must be used even after the official release date.


Blank blue screen after trying to fix plymouth logo

In this situation I would boot using a live cd and go through each step of the article to make sure it matches what you have done on your own machine if everything matches then remove the changes you have made to get back to a working installation.

Hope this helps


Ethernet connection not working on Ubuntu 20.04 / 20.10

Try this: Go to Settings-Network. With the Ethernet, wire plugged in, on the Wired section, toggle the switch on. Click on the little gear next to the switch and make sure that "Connect Automatically Lil peep half pink half-black" is toggled on.
Click the network connection or Wi-Fi icon on the panel at the top-right corner of your screen to access the NetworkManager menu, then choose a network. If you need to view information about your connection for troubleshooting purposes—your computer's IP address, for example—click Connection Information.


Wayland doesn't allow for running X apps as root by default. Run the following command first:

xhost si:localuser:root

Then "sudo ./install" should perform as expected.


Kubuntu no hibernation button/settings in KDE

Something like this could help, if you are unable to find the hibernate button.

Create a python file on desktop and name it something convenient like hibernate.py.
Paste the following code into the file and save it

#!/usr/bin/python3
import os
os.system("sudo systemctl hibernate")

Go to terminal and navigate to that folder and then run chmod 700 hibernate.py.
Now to hibernate just double click on the file hibernate.py, and it will hibernate.

So basically we made the script executable and double clicking the file will run the part inside the os.system parenthesis in terminal, which will hibernate the PC.
If you want to store this executable file somewhere else and access it with a shortcut somewhere on the desktop, you could try this answer.


I found the issue. I had to upadate the autopilot vm with the command : apt-get update && apt-get upgrade.

The initial version has bugs.


virt-install says name is in use, but virsh list --all is empty. Where is virt-install finding this name?

You are using different URI's in each command. Either add -c qemu:///system to your virt-install command, or change it in your listing to use qemu:///session. To undefine use the command virsh -c qemu:///THECORRECTURI undefine android.


As it turns out, purging and then reinstalling the wpasupplicant package fixed this problem.


Launching root user installed application as a standard user

When you install an application as a root user, the data directory is owned by root. Therefore, a standard user can't write to it.
To solve this login to root and navigate to ~/.local/share/ and locate the application data files' folder. It should have the same name as the application. Use ls -la ./<application_folder_name> to determine the owner of the files. It should be root.
Run  chown -R <user>:<user> ~/.local/share/<application_folder_name> to change the ownership file property. Remember to change user to your standard user name and group. Example; my user name is justech and application_folder to your own application_folder's name. Therefore, I will edit this to sudo chown -R justech:justech ~/.local/share/nano if nano was my application folder's name.
After this you are good to go.
Success!
For reference purposes, see this page.


Upgrade Error: Ubuntu Server 19.10 to 20.04 - Raspberry

I'm having the same problem for a week, it seems that when upgrading it fetches information from the "wrong" repository (http://us.archive.ubuntu.com/) and I can't figure how to change this destination to the http://ports.ubuntu.com which is the repository currently having Fossa arm64 Package.
I tried also changing the URL located in /etc/update-manager/meta-release, used during the upgrade process to fetch the new mirror, with no success because the content URL redirects to a list of distros each with their correspondent release-URL, for example for Focal Fossa:
Dist: focal
Name: Focal Fossa
Version: 20.04.1 LTS
Date: Thu, 23 April 2020 20:04:00 UTC
Supported: 1
Description: This is the 20.04.1 LTS release
Release-File: http://archive.ubuntu.com/ubuntu/dists/focal-updates/Release
ReleaseNotes: http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/ReleaseAnnouncement
ReleaseNotesHtml: http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/ReleaseAnnouncement.html
UpgradeTool: http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz
UpgradeToolSignature: http://archive.ubuntu.com/ubuntu/dists/focal-updates/main/dist-upgrader-all/current/focal.tar.gz.gpg```


Upgrade problem from Ubuntu 14.04 to 15.04

Solved by downloading Ubuntu Server 16.04 ISO, and installed over the old bad Ubuntu installation.

Did not format /dev/sda1 system partition, reassigned as root partition, so I kept the /home/user content, did not lose them.
I had to recreate the /etc/fstab, because it got overwritten.

So I saved almost all data, except the settings in /etc and earlier installed packages, which had to be installed again.

I hope this solution helps others with similar problems.


Ubuntu Server not reading /etc/network/interfaces

My focus was to get static networking to work, period, no matter the name.

I found that the udev script that creates the 70-persistent-net.rules was in fact white-listing everything BUT em1, so it was not being generated. I white-listed em* to resolve that issue.

I then had to use ifup to find out that the /etc/network/interfaces file had been generated with an extra carriage return on the 2nd line and thus was causing the network device to fail on start (line 2 was supposed to be on the end of line 1 behind the comments).

I tried doing a fresh install, and again the /etc/network/interfaces file had an automatic return on it. Removed that and everything functioned correctly after that. Was able to set a static IP and have it start correctly. I changed the name of em1 to eth0 after that, but I did resolve my issue by removing that carriage return.


The answer from Arkaduysz's works if you correct the second line. the gksu would try to change root's settings I think.:

Install:

sudo apt-get install gnome-color-chooser

run it:

gnome-color-chooser

Go to "Specific" tab, check and setup background/foreground colors in tooltip box. Apply & Close.

To fix the color issue in the eclipse package explorer (white font on light grey back), choose "global" tab, and check standard > inputfield > selected and set it to black.


On the purple splash screen, press the up key on your keyboard, it will show at which step it's getting stuck.

Also try booting the LiveCD with the "acpi=off", "noapic", "nolapic" and "nomodereset" boot parameters. All is explained here: https://help.ubuntu.com/16.04/installation-guide/i386/ch05s04.html


Can't partition my hard drive for Ubuntu

If you have free space then skip to step2

step1: shrink the Windows volume from Windows Disk Management in Adminstrative Tools. That will give you free space.(don't use Gparted)

step2:

Downoad GParted Live, here
Burn it to a CD and boot from it, then use the freed disk space after shrinking Windows drive (or if you have free initialy) to resize Ubuntu drive.


Problem after Logging screen. Ubuntu 13.04

Try to completely remove your ATI drivers from your system:

sudo apt-get purge fglrx*

Remove your xorg.conf

sudo rm /etc/X11/xorg.conf

Reinstall xorg completely

sudo apt-get install --reinstall xserver-xorg-core libgl1-mesa-glx:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:amd64 libgl1-mesa-dri:amd64

Re-configure Xorg

sudo dpkg-reconfigure xserver-xorg

Reboot

sudo reboot

by Bruno Pereira

Now you should reconfigure Unity.
It will remove Unity completely.

sudo apt-get install ppa-purge
sudo ppa-purge ppa:unity-team/staging
apt-get install unity

Install Unity again.

sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install unity
sudo reboot

by Justinas Dūdėnas and mpm

It works for me just great.


I had the exact same problem but I managed to fix it.This is because Ubuntu uses completely different bootloader. To fix this follow the steps below:

start Windows 7. click on the start button and search "command prompt" (without quotations). Right click on command prompt and click run as administrator. a popup will come up. click yes.
now type the following in command prompt (without quotation marks) :
bootrec /fixmbr
bootrec /fixboot
By the way Don't restart Yet! Now open up EasyBCD. Click on "Add Entry" on the left menu bar. Click on the "Linux" tab. On the "Type" section select GRUB2. Now erase where it says "Neosmart Linux" and type "Ubuntu". Last of all select the partition on which you have Ubuntu installed in the last box.
Now click add entry. You are all done! By the way make sure windows 7 is your deafult os. Also make sure in the entries menu "skip boot menu" is not selected and count down from 30 is.

Thanks! Please post back if you successfully fixed it or not! If you have any issues please also post back! see ya!


You can read both files together line by line to get your desired output. ( I assume you don't have any other unwanted lines in these files )

while read -r line1 && read -r line2 <&3;
do
    echo $line1
    echo $line2

done<users.txt 3<mails.txt

users.txt is read using standard input file descriptor 0

mails.txt is read using our given file descriptor 3

Output:

johnny
johnny@email.com

james
james@email.com

clara
clara@email.com

brandon
brandon@email.com

steve
steve@email.com

louis
louis@email.com

daniel
daniele@email.com


Failure to boot Ubuntu in a dualboot setup

You need to re-install the grub. Try this to see if it works. https://help.ubuntu.com/community/Grub2/Installing#Reinstalling_GRUB_2

But for me the best method would be using boot repair. It practically fix everything for you just follow the instructions.

https://help.ubuntu.com/community/Boot-Repair


You need to follow the linux instructions.

To get the code, make sure git is installed then open a teminal and run:

git clone https://github.com/ajpalkovic/e.git -o e-text-editor

Once that has finished, run:

cd e-text-editor/external
sudo ./get-packages-ubuntu.sh bakefile
./get_externals_linux.sh
./build_externals_linux.sh debug
cd ../src
make DEBUG=1
./e.debug


Ubuntu 16.04 ethernet doesnt work automatically

The alias for your device, 1969:e0b1, we assume, was added to the alx driver beginning in the 4.8.0-xx kernel version. If alx doesn't drive your device, that suggests that you are running an earlier kernel version than 4.8. Confirm:

uname -r

There are three ways you can get the driver to load and drive your device automatically. First, upgrade to a 4.8 kernel as described here: Old kernel with Ubuntu 16.04.2 update

Second, you can download and install Ubuntu 17.04, the latest release. It uses kernel version 4.10 and alx contains the alias for your device.

Third, if you are unable to do either, make an edit to /etc/rc.local:

gksudo gedit /etc/rc.local

Use nano or kate or leafpad if you don't have the text editor gedit. Right above the exit 0 line, add:

modprobe alx
echo '1969 e0b1' > /sys/bus/pci/drivers/alx/new_id

Note that sudo is not required or even possible in rc.local. Proofread carefully, save and close the text editor.

You should be all set.


How can I substitute colons when I rsync on a USB key?

Use rdiff-backup instead of plain rsync. It will automatically detect and substitute for characters that aren't supported on the destination disk, and also put them back as they were when you restore to a unix filesystem.  It produces an unpacked directory  that looks just like the origin plus one extra metadata directory.


How to enable VT-X to adjust the processor of a vm

I would recommend upgrading your VirtualBox to the latest.  I'm running 3.2.12, and I can change the settings.

Also you may want to check to see if there is a BIOS update to your system.


Can I put Ubuntu on an ASUS VivoBook F202?

I'm dual booting into Ubuntu 13.10 along with Windows 8.1 on my F202E, and it's running pretty well.

With the standard installation, the touchscreen works. But it seems to work more like a touchpad. i.e. the touch inputs are scaled over the entire available display space. This becomes an issue when you're trying to use it when connected to an external monitor, but otherwise it's usable.


Broken Sudo and no write privilige on file system

Please, enter in secure mode and edit sudoers:

Switch on your computer.
Wait until the BIOS has finished loading, or has almost finished. (During this time you will probably see a logo of your computer manufacturer.)
Quickly press and hold the Shift key, which will bring up the GNU GRUB menu. (If you see the Ubuntu logo, you've missed the point where you can enter the GRUB menu.) *
Select the line which starts with "Advanced options".
Select the line ending with "(recovery mode)", probably the second line, something like:

Ubuntu GNU/Linux, with Linux 3.8.0-26-generic (recovery mode)

Press Return and your machine will begin the boot process.
After a few moments, your workstation should display a menu with a number of options. One of the options (you may need to scroll down to the bottom of the list) will be Drop to root shell prompt. Press Return with this option highlighted.
The root partition is mounted read-only. To mount it read/write, enter the command

mount -o remount,rw /

If you have /home, /boot, /tmp, or any other mount point on a separate partition, you can mount them with the command

mount --all

* If you reboot, there is no need to hold the Shift key in step 3. The GNU GRUB menu will continue to be displayed automatically on each boot until a normal startup of Ubuntu completes.

Source: https://wiki.ubuntu.com/RecoveryMode


Installing ubuntu 14.04 along with windows 8 in legacy mode

If your Windows installation is setup up to boot UEFI and you plan to keep Windows (which isn't a bad idea), then the best way is to install Ubuntu in UEFI mode too. This way detection should work, otherwise GRUB isn't able to detect and chainload the Windows UEFI bootloader.

UEFI and MBR-booting are different, incompatible architectures.

To solve your problem, you could install the UEFI version of GRUB in your current installation, which would replace GRUB-MBR, but you would also need to make some configuration changes, therefore it's better to install Ubuntu in UEFI mode anew.

Also I don't know of any 32-Bit Windows 8 OEM installations. Typical Windows 8 laptops from major manufacturers should feature a 64-Bit CPU¹  and 64-Bit OS. There should be no reason to install a 32-Bit anymore.

¹ If you actually have a computer that shipped with Windows 8 and has a 32-Bit CPU, then plase tell us the model number of you computer.


How do I cut out an object with Inkscape?

You need to use the 'clip' feature.

Open or import the picture you want to crop. Take the following as an example:

Place another object over it. This new object should have the shape (boundary) of the final cropped image. The hexagon in the following:

Select both (or all) the objects.
From the menus, select Object > Clip > Set. This should be the outcome:

Another example:

Source of the images: Inkscape Wiki


From man 8 shutdown:

   Once  TIME  has elapsed, shutdown sends a request to the init(8) daemon
   to bring the system down into the appropriate runlevel.

   This is performed by emitting the runlevel(7) event, which includes the
   new  runlevel  in  the  RUNLEVEL  environment  variable  as well as the
   previous runlevel (obtained from the environment or from /var/run/utmp)
   in  the  PREVLEVEL  variable.   An additional INIT_HALT variable may be
   set, this will contain the value HALT when bringing the system down for
   halt and POWEROFF when bringing the system down for power off.

Then, each and every daemon process recognizes the change in RUNLEVEL, and takes appropriate action. This could be anything from a quick exit to a configuration save to a cache flush or even a whole database freeze.

Depending on what level of logging you have set up for each daemon. you may see some information in /var/log/* and subdirectories of /var/log/.


How to download and install Utorrent for Ubuntu 14.04

You have to change the permissions of the executable file.

Suppose you extracted .tar.gz to a directory utorrent in home directory and the executable file is named as utorrent-1.0 and it is in utorrent directory.

You will have to execute following set of commands for executing utorrent-1.0

Open terminal (Crtl+Alt+T) and execute following commands.

chmod +x ~/utorrent/utorrent-1.0

The above command will add executable attribute on utorrent-1.0 file

cd ~/utorrent && ./utorrent-1.0

The above command will execute utorrent-1.0

The example is arbitrary, replace utorrent with name (or path) of directory where you extracted files and replace utorrent-1.0 with executable file located in the said directory.


you can try by adding to /etc/network/interfaces

post-up /sbin/route add -net 10.50.140.0 netmask 255.255.255.0 gw 10.50.243.75 dev eth0

you can take help from another askubuntu question How to set static routes in Ubuntu Server?


How can I remove Ubuntu from my dual-boot and replace it with another distribution?

There is no need to remove Ubuntu before you install openSUSE; Its installer will offer you to use the old Ubuntu partition on the hard drive.

If you want to check which hard drive and partition this is, in Ubuntu, go to System → Administration → Disk Utility. Find your hard disk and parition and look for the "device" field. The openSUSE installer will let you install there, and wipe out all of the data that was there before. It will also install a new boot-loader and detect all of the operating systems on your computer.


Ubuntu installer doesn't detect partition on Win7 (Warning: Can't have a partition outside the disk!)

You probably need to partition it from the live CD, follow the link to the ubuntu HowtoPartition page.


How to restore Session Buddy for Chrom* sessions?

Your data is saved in your chrome profile folder. To go there, type :

chrome://version/ in your chrome browser
open a terminal, and navigate to the Profile Path given by the page mentioned above
backup the folder : myprofile/databases/chrome-extension_edacconmaakjimmfgnblocblbcdcpbko_0
you should be able to restore it by copying to your new profile folder

Source


How to set a memory limit for a specific process?

I think this can be done using cgroups:

Create a cgroup named mpigroup (or whatever name you choose) with a memory limit (of 50GB, for example):

cgcreate -g memory,cpu:mpigroup
cgset -r memory.limit_in_bytes=$((50*1024*1024*1024)) mpigroup

Then, if mpiexec is already running, bring it into this cgroup:

cgclassify -g memory,cpu:mpigroup $(pidof mpiexec)

Or execute mpiexec within this cgroup:

cgexec -g memory,cpu:mpigroup mpiexec -16 ...


Instead of running IE over Wine, have you tried switching Firefox's user agent to IE? You can get the add-on at the following address:

https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/

There are also a couple of similar extensions for Chrome/Chromium:

https://chrome.google.com/webstore/search-extensions/User-Agent%20Switcher

There is also an answer to a question that gives you instructions to do it manually.


Need help installing Ubuntu16.04.2 desktop

I think the disc will be better , that is how i installed Ubuntu.
you can also use USB memory stick
remember to backup any important document and  files

1- Restart your computer and wait for that first screen to pop up. Often, it'll say something like "Press F12 to Choose Boot Device" somewhere on the screen. Press that key now.
Give it a moment to continue booting, and you should see a menu pop up with a list of choices on it. Highlight your CD or USB drive and press Enter.

2-  then follow the instruction on the Ubuntu instillation


My Ubuntu installation did not result in a dual boot menu option

Sorry I can't paste links here from my device. But you may just want to reinstall Grub (ask Google) from your USB or your live CD.
If it doesn't work, maybe your PC is «tattooed», you may want to look for it too.


BIOS clock getting changed by Ubuntu - cant sync time with BIOS

Found the solution! I read HERE that:

"Operating systems store and retrieve the time in the hardware clock located on your motherboard so that it can keep track of the time even when the system does not have power. Most operating systems (Linux/Unix/Mac) store the time on the hardware clock as UTC by default, though some systems (notably Microsoft Windows) store the time on the hardware clock as the 'local' time. This causes problems in a dual boot system if both systems view the hardware clock differently"

The steps to resolve this issue by making Linux use 'Local' time were to:

gksudo gedit /etc/default/rcS

add or change the following section

# Set UTC=yes if your hardware clock is set to UTC (GMT)
UTC=no


key_load_public: invalid format with scp or git clone on Ubuntu 15.10

Check the file /Users/alexzeitler/.ssh/id_rsa. What is there? How did it get there?
It should be your private RSA key, isn't it? And is there something in /Users/alexzeitler/.ssh/id_rsa.pub? Is it valid public key?
If you don't use these keys, remove both of them and the message will disappear. If you are using them in different way, move them somewhere else. The same if they are in different format.
The public part is probably corrupted, so you can recreate it from private one using this command:
ssh-keygen -f ~/.ssh/id_rsa -y > ~/.ssh/id_rsa.pub

###hostkeys possibility
The other possibility is that client is trying to read server public keys for HostBasedAuthentication. Don't you have it allowed in /etc/ssh/ssh_config ?
It would be one of these files missing or corrupted:
/etc/ssh/ssh_host_ecdsa_key.pub
/etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_rsa_key.pub

Your sshd server is not complaining?


12.04 Ubuntu: configuring laptop to hook up to TV using HDMI cable?

I have an Asus Zenbook Prime with an Intel HD integrated GPU. My machine has the same issues with video and sound settings not automatically switching when I plug in a TV over HDMI.

To resolve the video I can either press the external monitor hotkey (FN+F8) to cycle between Laptop only, TV only, Mirrored, and Extended desktop modes. Your laptop may not have this function button so you can also launch the Displays control panel either directly or from the System Settings application. This should identify both of your displays, which you can turn on and off independently or check the Enable Mirroring box to simply mirror you laptop display.

Sound over HDMI can be tricky. An HDMI output device may appear in the Sound control panel in System Settings, but on my machine this doesn't happen. To resolve this, I use PulseAudio Volume Control. You can find this by searching for it in the Ubuntu Software Center. To use it, launch the app and click on the Configuration Tab. There should be a drop-down menu for your sound card labeled Profile, select Digitl Stereo(HDMI) Output from this menu.

Once this is done, the Sound control panel should show both the built-in speakers and the HDMI output and you should be able to switch between them as often as you want from there while you are plugged in to the HDMI output. On my laptop it also doesn't automatically switch back to the speakers, you may need to manually select them in the Sound control panel to go back to analog sound output.


Gnome Screensaver lock screen command not working...What can I do to fix this? ubuntu 14.04

It seems that somehow my user got added to the nopasswordlogin group. Removing my user from this group would solve the problem so I solved this by going into the terminal and typing in the command line:  sudo gedit /etc/group and deleting my user name from the nopasswdlogin group in the text file and then saving the file again. Now I can lock the screen and the system requests a password on the ubuntu login screen. The screen wouldn't lock before because there was no password with which to lock the screen. The system didn't request a password because the user was in the nopasswordlogin group. Thanks.

Kind Regards


Can't resize existing partition with gparted

To be able to extend a partition, you need free space adjacent to it.

In your case you would have to move /dev/sda3. This can take a very long time.

Extend the extended partition (/dev/sda4) to include the free space.

Finally extend /dev/sda5.


"systemctl status apache2" Failed to start the Apache HTTP Server

Don't post images of text. Edit ( https://askubuntu.com/posts/1134426/edit ) your post, copy-and-paste your text, select it, and choose the {} formatting tool.

Second, Read your error messages! They tell you that there's a syntax error on line 25 of a file, and hint at the correction.

Third, Read your logs. Inspect /var/log/apache2/error.log for more information.

Fourth, read about the "CustomLog" command at https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#customlog and you'll see the problem.


How to login into a machine via putty using a script?

Create a launcher server.desktop with the following content:

[Desktop Entry]
Name=Server Name
Exec=ssh user@server.domain.com
Terminal=true
Type=Application

and give it execution permissions.

Obviously you should put the real user and the real server.domain.com in the Exec= line.

To allow to choose the username, substitute the Exec= line with the following:

Exec=sh -c 'user=$(zenity --entry --title="Set username" --text="Username: " --entry-text="$USER"); if [ -n "$user" ]; then ssh $user@server.domain.com; else exit; fi'


Lenovo X200s volume buttons stopped working on Ubuntu 12.04

Maybe this helps: pull off the power brick, remove the battery, press on/off for at least ten seconds, reassamble, turn on.
Btw: the similar problem I had definitely was a thinkpad bug, not an ubuntu bug. Happens with windows aswell.


I had the same problem with Ubuntu 20.04 and ns 3.33.
I solved this by manually editing bakefile.xml.
It seems that Bake.py uses this file as its input to determine which packages to seek and, more to the point, which files in the packages to use as indicators of presence of the packages.
The problematic entry was:
<attribute - 'dependency_test' name="dependency_test" value="(_gv.so or _graphviz.so or _graphviz.x86_64-linux-gnu.so)"

I used apt-file list python3-pygraphviz to search for the referenced .so files but only found _graphviz.cpython-38-x86_64-linux-gnu.so.
Therefore, I changed the above line in the XML file, to:
<attribute - 'dependency_test' name="dependency_test" value="(_gv.so or _graphviz.so or _graphviz.x86_64-linux-gnu.so or _graphviz.cpython-38-x86_64-linux-gnu.so)"

This fixed the problem for me.


Chroot jail setup

Create user to be jailed.

$sudo adduser acer

For setting chroot we need to set sudo privilage to the users.

Add the user in sudo group

    $sudo adduser acer sudo

Create folder to setup a user in jail

    $sudo mkdir /chroot

The jail user can access only whatever inside the /chroot folder

This means we need to provide something in there,unless the user only can see empty folder

Just create basic necessary things

    $cd /chroot

    $ sudo mkdir bin dev etc home lib usr var

    $sudo mkdir etc/pam.d home/acer lib/security var/log usr/bin

We want to copy the software to /chroot that the jail user can able to use

Bash command

    $which bash
    /bin/bash
    $sudo cp /bin/bash /chroot/bin
    $ldd /bin/bash
    #This ldd command is used to list the library function
    linux-gate.so.1 =>  (0xb772d000)
            libtinfo.so.5 => /lib/i386-linux-gnu/libtinfo.so.5 (0xb76f0000)
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76eb000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb753c000)
            /lib/ld-linux.so.2 (0xb772e000)

Copy this lib file to chroot lib directory

$sudo cp  /lib/i386-linux-gnu/libtinfo.so.5 /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libdl.so.2 /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libc.so.6 /chroot/lib
    $sudo cp /lib/ld-linux.so.2 /chroot/lib

ls command

$which ls
    /bin/ls
    $sudo cp /bin/ls /chroot/bin
    $ldd /bin/ls
    linux-gate.so.1 =>  (0xb771f000)
            libselinux.so.1 => /lib/i386-linux-gnu/libselinux.so.1 (0xb76e1000)
            libacl.so.1 => /lib/i386-linux-gnu/libacl.so.1 (0xb76d8000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7529000)
            libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb74eb000)
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb74e6000)
            /lib/ld-linux.so.2 (0xb7720000)
            libattr.so.1 => /lib/i386-linux-gnu/libattr.so.1 (0xb74e0000)

Copy this lib file to chroot lib directory

    $sudo cp /lib/i386-linux-gnu/libselinux.so.1 /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libacl.so.1  /chroot/lib
    $sudo cp  /lib/i386-linux-gnu/libc.so.6 /chroot/lib
    $sudo cp  /lib/i386-linux-gnu/libpcre.so.3 /chroot/lib
    $sudo cp   /lib/i386-linux-gnu/libdl.so.2  /chroot/lib
    $sudo cp  lib/i386-linux-gnu/libattr.so.1 /chroot/lib
    $sudo cp /lib/ld-linux.so.2 /chroot/lib

su command

    $which su
    /bin/su
    $sudo cp /bin/su /chroot/su
    $ldd /bin/su
    linux-gate.so.1 =>  (0xb7737000)
            libpam.so.0 => /lib/i386-linux-gnu/libpam.so.0 (0xb770d000)
            libpam_misc.so.0 => /lib/i386-linux-gnu/libpam_misc.so.0 (0xb7709000)
            libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb755a000)
            libaudit.so.1 => /lib/i386-linux-gnu/libaudit.so.1 (0xb7535000)
            libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7530000)
            /lib/ld-linux.so.2 (0xb7738000)

Copy this lib file to chroot lib directory

    $sudo cp /lib/i386-linux-gnu/libpam.so.0 /chroot/lib
    $sudo cp  /lib/i386-linux-gnu/libpam_misc.so.0 /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libc.so.6  /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libaudit.so.1 /chroot/lib
    $sudo cp /lib/i386-linux-gnu/libdl.so.2 /chroot/lib
    $sudo cp /lib/ld-linux.so.2 /chroot/lib

Add some system configuration files and additional libraries to the chroot

    $cat /etc/passwd | grep acer > /chroot/etc/passwd
    $cat /etc/passwd | grep root >> /chroot/etc/passwd
    $cat /etc/group | grep acer > /chroot/etc/group
    $cat /etc/group | grep root >> /chroot/etc/group
    $cat /etc/shadow | grep acer > /chroot/etc/shadow

Copy nsswitch.conf file to /chroot

    $sudo cp /etc/nsswitch.conf /chroot/etc/nsswitch.conf

Inside the nsswitch it should looks like the follow

    passwd: files
    group: files
    shadow: files
    hosts: files
    networks: files
    protocols: files
    services: files
    ethers: files
    rpc: files
    netgroup: files

We copy the configuration files necessary for the PAM system to operate so that the authorization in the jail can work

    $sudo cp /etc/pam.d/common-account /chroot/etc/pam.d/
    $sudo cp /etc/pam.d/common-auth /chroot/etc/pam.d/
    $sudo cp /etc/pam.d/common-session /chroot/etc/pam.d/
    $sudo cp /etc/pam.d/su /chroot/etc/pam.d/

We add some additional libraries required by the PAM and the name service switch facilities

    $sudo cp /lib/libnss_files.so.2 /chroot/lib
    $sudo cp /lib/libnss_compat.so.2 /chroot/lib
    $sudo cp /lib/libnsl.so.1 /chroot/lib
    $sudo cp -fa /lib/security/ /chroot/lib

We need to create login.defs file in /chroot/etc/ directory.This file defines some setting for the login process

    $sudo vim /chroot/etc/login.defs

Add the following line in to the login.defs file

    SULOG_FILE /var/log/sulog

If we did not do this the su command would attempt to use the syslog utility,which is not available in the jail setup and the entire process would fail.

Create the script that will put our user in jail,whenever he login in to the system

Create file jailshell in /bin directory,outside the jail

    $sudo vim /bin/jailshell

Add the following script in to that file

    #!/bin/bash
    sudo chroot /chroot /bin/su acer

Make it executable

    $sudo chmod  +x  /bin/jailshell

To put script in action,we need to edit the /etc/passwd file (which is outside of the jail).

Change /bin/bash to /bin/jailshell in  user acer

    $sudo vim /etc/passwd
    acer:x:1003:1003:,,,:/home/acer:/bin/jailshell

Set user acer in jail's home directory

    $cd /home/acer
    $sudo cp -fa ./ /chroot/home/acer

The following could also be useful

    $sudo cp /etc/bash.bashrc /chroot/etc/
    $sudo cp /etc/localtime /chroot/etc/
    $sudo cp /etc/services /chroot/etc/
    $sudo cp /etc/protocols /chroot/etc/
    $sudo cp /usr/bin/dircolors /chroot/usr/bin/
    $sudo cp /usr/bin/groups/ /chroot/usr/bin/

Everything done.Now test the login

    $su – acer
    password:xxxx
    [sudo]password for acer:xxxx
    acer@Snovabits:/$ ls
    bin dev etc home lib    usr var


How do I scroll-back in a virt-manager virtual machine console?

In a virtual terminal console TTY1... TTY7 we can scroll up/down a whole page (but not a single line) using the following key combination:

Shift + PageUp: scrolls back one page

Shift + PageDown: scrolls down one page


When using non-interactively, most standard commands, include grep, buffer the output, meaning it does not write data immediately to stdout. It collects large amount of data (depend on OS, in Linux, often 4096 bytes) before writing.

In your command, grep's output is piped to stdin of sed command, so grep buffer its output.

So, --line-buffered option causing grep using line buffer, meaning writing output each time it saw a newline, instead of waiting to reach 4096 bytes by default. But in this case, you don't need grep at all, just use tail + sed:

tail -f <file> | sed '/string/s/stuff//g' >> output.txt

With command that does not have option to modify buffer, you can use GNU coreutils stdbuf

tail -f <file> | stdbuf -oL fgrep "string" | sed 's/stuff//g' >> output.txt

to turn on line buffering or using -o0 to disable buffer.

Note

stdio buffering


I tried dual booting Windows 10 and Ubuntu 18.04 and accidentally deleted Windows

You can instead use the testdisk tool as described here, maybe you can recover your old Windows with it.

I had such a case but I deleted Ubuntu rather than windows, the tool helped me to restore all data without any problem because I didn't write data on that disk after the accident.


gnome-shell 20-30%+ CPU usage permanently (v.3.26.1 on 17.10)

Another solution is to upgrade all extensions (via https://extensions.gnome.org), and then to disable them one by one and see if it solves the problem. Most of the time, it comes from a faulty extension.


Why is it that aa full deployment will require a minimum of 10 servers?

The reason for this is that OpenStack is not really meant for a 2 node cluster. It is meant to scale to thousands of nodes. It has many disconnected components, including mysql, rabbitmq, several API services, etc. For your case of "just trying openstack out" you can simply use the local provider to install everything on one box rather than MaaS which wants to put every component of OpenStack on its own machine (and there are about 9 components, plus 1 for juju/maas).

Have a look at this page to help configure the local provider:

https://jujucharms.com/docs/stable/clouds-LXD

And then follow these instructions:

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

Except instead of setting up MaaS, and generating/downloading the environments.yaml from MaaS, you just put this in:

default: local
environments:
  local:
    type: local
    default-series: precise
    data-dir: /home/youruser/.juju/data

All of the services will end up in their own containers on the same box, which will have some limitations (like nova volumes not working right).


Whether Page Border Options are available in Libre Office Writer 5?

Choose Format -> Page -> Borders.

See this for further help.


Installation problem - missing boot manager

You need to access your BIO's most machines use F-2 and change the boot order in order to boot up from the USB drive. Then when you start up your machine hit F-12 and choose the USB drive and proceed with your installation


This error is probably due to wrong version of setup.exe of the Turbo C++. Usually windows programs give this message when trying to run in DOS environment.

You can try to run the setup using wine:

wine setup.exe


VM Ware is a 3rd party application. And they do not provide a debian installer to be included into our software center. Instead they create a binairy bundle to install it.

So...

Visit this link

Pick the latest version in the dropdown box. That would be 6.0.4.
Download the correct version for your system. I would expect it to be "VMware Player for Linux 64-bit". Details of the file:

FILE NAME VMware-Player-6.0.4-2249910.x86_64.bundle
BUILD NUMBER 2249910
RELEASE DATE 2014-10-30
CHECKSUMS
MD5SUM: d047a2ff96e8150c4c947cb7b3e4cec8
SHA1SUM: 8a470d44ed163ebafe2f9614e193e35138aef328

While downloading: this software has some dependencies. You can install them with:

sudo apt-get install build-essential linux-headers-`uname -r`

When the download is done make the file executable and execute it.

chmod +x VMware-Player-6.0.4-2249910.x86_64.bundle
sudo ./VMware-Player-6.0.4-2249910.x86_64.bundle

(if you download the 32 version change the file name).
It will start a graphical installation:

After this I quit the installation. On my work system I have 12.04 with 4.0.4 version and used this OMG Ubuntu article to install it (I needed to do that with the patch). That patch might be needed for 14.10+6.0.4 too and it might not work for 14.10. Ask another question regarding that if it does ;)


Your Ubuntu host is probably obtaining its IP address by way of DHCP. This will give you a new address more often than not.  To rectify this, get the MAC address of your VM's virtual NIC with ip link.  Then, take that MAC address to your router, and set ip a DHCP MAC/IP reservation (the nomenclature may vary depending on the make and model of your router) to assign it an IP that will neither change, nor conflict with any other devices or hosts on your network.


Ubuntu 20.04 Dark Theme option doesn't get selected under Windows Color in Settings>Appearance

I think your Yaru themes are incomplete. I fixed mine with:
sudo apt-get --reinstall install ubuntu-session

sudo apt-get --reinstall install yaru-*


How to install Mongodb PHP extension in Ubuntu 16.04 LTS

To install the mongodb extension, do:

sudo apt-get install php-mongodb


installing ubuntuGNOME 16.04 on Thinkpad T440?

any advice??

Yes: Just try it, but make sure you use a recent distribution and kernel (>= 4.10, as with that version the support for mobile processors and power management has greatly improved). For Thinkpads the chances are usually good that most hardware works out of the box, and you can find support for the rest.


Resolved.  I finally managed to get it to install.  After getting a UEFI capable video card, I enabled secure boot, then install Ubuntu to the SSH again, still connected to the SAS controller.
After that install the system boots correctly.


apt-get install build-essential failed with 404 error on Ubuntu 18.04

Figured out.  It's some kind of weird docker thing.  I have a stock official ubuntu image on the system, which was downloaded a while ago.  Now I was trying to build a docker image based on the the stock official ubuntu image. In that Dockerfile, I have "FROM ubuntu:18.04", then RUN apt-get install -y a bunch of packages.  When I tried to build a docker image with that Dockerfile, I got that error message in my original post.  Now, if I docker rmi -f the stock ubuntu image I had on the system, then tried to build a docker image using the SAME Dockerfile, it went all fine.


Your wifi should work after running this command in terminal sudo apt-get update && sudo apt-get install bcmwl-kernel-source

If you have no connection to the internet the bcmwl-kernel-source can be found on the DVD/USB you installed from in /pool/restricted/b/bcmwl/


how to install java 3d 1.5.2 in ubuntu for vm ware work station

Open a terminal and install the Java 3D API:

sudo apt-get install libjava3d-java

And install Java 7 (OpenJDK) with

sudo apt-get install openjdk-7-jdk

Or Oracle 8 Java with

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer


"cannot open /dev/mapper/cryptswap1: no such file or directory" no matter what I try when encrypting swap file!

There is not much use of encrypted swap anyways, if you plan to really use it. If not and it is just for safety reason then try doing sudo cryptdisks_start cryptswap1 after you make the clean swapfile setup. Remember the swapfile needs to be there too! UUID and such is not really important and usually just confuses the system when you reset swapfile.

If it fails, try rerunning the sudo ecryptfs-setup-swap, resetting swapfile again, then again sudo cryptdisks_start cryptswap1. Sometimes it fixes the issue.


How to set /usr/bin/i586-mingw32msvc-g++ to gww?

You don't need to change your $PATH since /usr/bin is already in your path. You could actually run the command as
i586-mingw32msvc-g++ filename.cpp

That's not very pretty though, so instead, do one of
1. Make an alias for the command.
Open ~/.bashrc and add this line:
alias gww='/usr/bin/i586-mingw32msvc-g++'

Now, open a new terminal so that .bashrc is re-read (or source it manually with source ~/.bashrc) and you will be able to use gww as the command's name.
2. Make a link to it in /usr/bin.
You can create a symlink to the compiler and name the symlink gww:
cd /usr/bin
sudo ln -s i586-mingw32msvc-g++ gww

Both approaches will let you invoke i586-mingw32msvc-g++ by running gww. You can use the one you prefer. The main difference is that the 1st approach will make it available to your user only, while the second will be system-wide.


How to connect my Android phone in USB Debugging mode?

If you have set enabled USB Debugging in Developers Options on your devices, just connect your phone with PC by USB.

USB Debugging would turn on automatically an you would see an icon in phone's notification bar

Linux doesn't need any additional drivers like Windows.


Why does this script not open parallel gnome-terminals on a server?

gnome-terminal running locally uses a background "factory" server which owns the actual terminal windows; the gnome-terminal command itself exits after contacting the server over DBus and telling it to launch a window.  When running remotely, it does not have the ability to communicate with a factory server, so it sets up the window itself and must continue running until that window is closed.

If you put the command in the background with & you will get the effect you want regardless of remote or local (or use of --disable-factory which would cause the local ones to behave like the remote ones).  You probably want a final wait command in the script in that case.


How to login to SSH and have username and password automatically entered?

Unfortunately, I have no control over the servers so usernames/passwords have to be used.

No, your servers likely have key-based authentication enabled. See How can I set up password-less SSH login? on setting it up, so you can skip using passwords and use keys. (If you absolutely must use passwords for some insane reason, see another answer in that post using ssh-pass.

Then, you can create entries in ~/.ssh/config like so:

Host proxy1
     Hostname some.server.or.ip
     User foo
     LocalForward 8888 localhost:2222

Here proxy1 can be any name you choose, but Hostname should contain the actual server hostname or IP. (See man ssh_config for more options.) Having done that, in a terminal, do ssh proxy1 in a terminal to start the port forwarding, and press CtrlD to quit (or run exit).

Or see Create a .desktop file that opens and execute a command in a terminal on how to start commands in a terminal from a shortcut (or "launcher").

Of course, putty is available for Ubuntu.


Unable to install Kile(LATEX) in ubuntu 16.04

I installed from the live preview ppa:kile/livepreview , the steps should be the same though.

add repository.

sudo add-apt-repository ppa:kile/livepreview
sudo apt-get update

install okular first.

sudo apt-get install okular

then install kile.

sudo apt-get install kile

if it still gives errors regarding missing dependencies and broken
packages, use fix command in apt-get.

sudo apt-get install -f


Settings window doesn't show up on Ubuntu 20.04.1 LTS

Disable/remove all other workplaces except the current one and try again, if doesnt work or if the instance create a new workspace itself, then

Remove and reinstall gnome-control-center using sudo apt-get remove --purge gnome-control-center and then install using sudo apt install gnome-control-center

Reboot system

Caution:  You may lose the trivial gnome settings you already applied.


Ubuntu 14.04.2 boots, then freezes after 1-2 mins. Mouse pointer still moves

Discovered the problem is with the nouveau display drivers that Ubuntu uses by default. Once booted, I quickly activated the nVidia third party drivers before it froze. Restarted and have had a more consistent experience since.


Gtk.TextView lost default cut-copy-paste signal handlers in a quickly project. How can get back?

its a bit late, but there's this nifty new TextEditor in the quickly.widgets (You need to seperately install them with apt-get)

Here is a blog post about it: http://theravingrick.blogspot.ch/2010/06/new-quickly-widget-text-editor.html

Good luck with it!


How to stop Alt from triggering Global Menu?

You can go into Settings > Keyboard and change the shortcut or disable the shortcut there


Ubuntu Touch Nexus 4 Bluetooth doesn't work

Bluetooth transfer is still not included in Ubuntu Touch. Developers are currently working on it and most probably this feature will be ready with the OTA-10 update which should arrive in March, 2016. See this bug report for details.


In Unity there are admittedly subtle but clearly visible indicators on the Launcher that show a running application, and the active window:

In addition, in 11.04 and above, when there are multiple windows for that app you will see multiple pips (2, or 3 for 3-or-more windows).


Find and replace special characters in a directory

s/\.\.\\\.\.\/\/media\/usr\/part\/dir\//g

This sed command is wrong, because it has a missing \ before the first /, which leads the preceding \ to escape it as a literal / (changing the pattern and "eating" the separator) and, for the purpose of replacing a single occurence of ..\..\ on each line, it has an excessive g switch at the end; in any case it's missing the replacement of the \ characters with the / character part.

Use this one instead; I've took the liberty of changing the separator to get rid of a likely sudden leaning toothpick syndrome and to change ; with + to improve the command's performance over a huge number of files:

find /home/user/directory -name \*.m3u -exec sed -i 's|\.\.\\\.\.\\|/media/usr/part/dir/|; s|\\|/|g' {} \+

Output:

~/tmp$ cat playlist1.m3u
..\..\path1
stuff
..\..\path2\path2
stuff
..\..\path3\path3\path3
stuff
~/tmp$ find . -name \*.m3u -exec sed -i 's|\.\.\\\.\.\\|/media/usr/part/dir/|; s|\\|/|g' {} \+
~/tmp$ cat playlist1.m3u
/media/usr/part/dir/path1
stuff
/media/usr/part/dir/path2/path2
stuff
/media/usr/part/dir/path3/path3/path3
stuff


It seems like the filename is solr6.2.0.tgz, but you're trying to unpack solr-6.2.0.tgz.


Nothing is wrong. Your computer is noticing that it is warmer than it wants to be, and firing up the fan to cool off. How long has it been since you have cleaned the computer (physical cleaning of fans, heat sinks, general dust removal). A local computer shop could do this for money. What sort of environment does it run in? Can you improve external ventilation?

Is there a system activity pulse (more computing -> more heat) with the same frequency?


Trying to do dual boot install: The test of the file system with type ext4 in partition #1 of SCSI2 (0, 0, 0) found uncorrected errors

It sounds like your disk is dying. Replace it immediately -- buy locally (don't wait to have something shipped by mail order). Also, the temperature warning suggests your case may have inadequate ventilation, so you may want to look into adding a fan or installing the new drive in another slot (assuming this is a desktop and not a laptop). If you need more advice on this issue, you should post photos of the interior of your case, showing where your disk bays are and any existing fans.


Lubuntu with an Ubuntu desktop: system menu not visible 14.04

The mac doesn't have a system menu in the upper right corner so please uninstall the mac theme first...

We'll take it from there and update your question and my answer to take you further.


Instructions for installing libdvdcss on ubuntu 15.10

Installing libdvdcss

  Legal warning: Check with your local laws to make sure usage of
  libdvdcss2 would be legal in your area.

From Ubuntu 15.10 onwards, libdvd-pkg is available to ease the installation of libdvdcss.

Install the libdvd-pkg package (no need to add third party repositories) via Synaptic or command line:

sudo apt-get install libdvd-pkg

Then run the following commands to complete the libdvdcss installation:

sudo apt-get update
sudo apt-get upgrade

Source


Nvidia drivers wont work on normal boot but works on recovery mode

Just needed to disable auto-login.
Settings > User > unlock > disable auto-login
thanks here and thus there


Audio stops working when I unplug my headphones on Ubuntu 20.04

I am running into the same issue, I have the same thing on Linux Mint 20.
When I was running ubuntu 20.10 I don't recall having this issue. On first plug in it works fine, I select headphones. If I remove and reinsert them in the combo jack no sound works. I have to go to sound settings and switch audio input devices back and forth and it works again. Hopefully that helps until someone more knowledgeable says something.


How do I install nvidia GT 440 graphics drivers on Ubuntu 12.10

To install the nvidia drivers, do the following:

Open the program Terminal.
Run the command sudo apt-get install linux-source.
Run the command sudo apt-get install linux-headers-generic.
Run the command sudo apt-get install nvidia-current-updates.

Reboot your computer.  You should have the nvidia driver installed now.  Normally there is an easier, graphical way to do it, but there is a bug that causes problems doing it that way...


Three Questions Concerning Booting From USB

(i) The Ubuntu LiveUSB houses a READ-ONLY filesystem. All changes you make will be lost at restart. An additional read-write partition for persistent data storage is fairly easy to create, but you will need a larger USB drive.

(ii) Some versions of Ubuntu will fit under 1.85GB, others will not. See http://cdimage.ubuntu.com for the options and sizes. Advice: Get a slightly larger USB stick, and try the 19.10 Ubuntu Desktop image (2.3GB).

(iii) See (i).

There are many convenient ways to try Ubuntu. If you are using older hardware, than a lighter flavor might be more appropriate. If you are using newer hardware, booting the .iso in a Virtual Machine might be simpler than mucking about with USB drives. Ubuntu, like Windows, rewards the resources that you let if have - more resources means a smoother experience.


How can I get the ESSID name only that I connected with?

I don't know if this is the best solution, but try this:

For the essid name:

iwconfig wlan0 2> /dev/null | awk -F\" '{print $2}'

For the access point mode (as requested in the comment):

iwconfig wlan0 2> /dev/null | awk -F: '/Mode:/ {print $2}' | awk '{print $1}'

For the link Quality (as requested in the comment):

iwconfig wlan0 2> /dev/null | awk -F= '/Quality/ {print $2}' | awk '{print $1}'

For the channel, (as requested in the comment) try this:

sudo iwlist wlan0 scanning essid ESSID | grep Channel | head -1 | awk -F: '{print $2}'

Make sure to replace ESSID with your essid:

For the address, (as requested in the comment) try this:

ifconfig wlan0 2> /dev/null | awk -F: '/inet\ addr/ {print $2}' | awk '{print $1}'


No 'Adobe Flash Player' in Software Center

Is the Multiverse repository already enabled? Check in Software and Updates  (the fourth line of repositories). If not, do sudo add-apt-repository multiverse && sudo apt update or enable by clicking on it then clicking [Close].

Once Multiverse is enabled, run sudo apt install flashplugin-installer then close Firefox if it was open.

Relaunch Firefox and go to https://helpx.adobe.com/flash-player.html ; scroll down to section 5. Verify whether Flash Player is installed . Hit "Activate Adobe Flash" and click on "Allow Now" to enable flash player only for a current website or click "Allow and Remember" to enable Flash Player on all websites.

Do you see animation? If so, it installed OK.


I had this same problem, just rebooted the server and ran the command:

sudo maas-import-pxe-files

and, problem solved.


USB mobile broadband dongles in Ubuntu (14.04)? Where to start?

Ubuntu generally supports mobile broadband USB dongles. So let's start with:

How it should work

The dongle gets detected

You get the following window that asks for the SIMs PIN. Enter your PIN, check Automatically unlock this device and click Unlock.

If you've made it this far, you know that your dongle is supported.
Create a new Mobile Broadband connection

Select New Mobile Brodband connection... from the network indicator.

This will bring up the mobile broadband setup wizard.

   Alternatively you can click Edit Connections..., then click the Add button in the Network Connections menu and select Mobile Broadband as the Connection Type, which will then also bring up the wizard shown below.

Follow the instructions and choose settings according to your country and provider/carrier. Mine looks like this:

Done

That's basically it, you should have a working Internet connection in a few seconds when you hit the Continue button.

Troubleshooting - The easy part

The SIM card is blocked

Put the SIM in another device like a phone and enter the PUK when asked for. If that somehow does not work, you will need to call your providers/carriers customer support hotline.
Installing the Windows driver on Windows

Rumor has it that this works for some devices and has to be performed only once when the device is completely new and hasn't been used before. This is only needed to change the mode of the dongle. (See explanation about usb-modeswitch below.)

Troubleshooting - The difficult part

Remember, you don't have to go through very time consuming and probably frustrating troubleshooting. If your WiFi already works, buy a mobile Wi-Fi hotspot.

The dongle doesn't get detected

If you don't get the window shown in step 1, then it might be that the SIM card is blocked (see paragraph above), not properly inserted (e.g. upside down) or the dongle itself is not detected due to usb-modeswitch issues.

The thing with USB modes on these devices is, to first present the dongle as a read only storage device with an (outdated) driver that you could install and then change the mode so that the device can be used as it was intended. However you almost never need to install these drivers. The situation in most cases is, that Linux already has a driver, but somehow cannot activate the mobile broadband modem part of the dongle.

The following links might be helpful for further troubleshooting:

https://help.ubuntu.com/community/MobileWirelessBroadband
https://wiki.ubuntu.com/NetworkManager/Hardware/3G
https://wiki.archlinux.org/index.php/USB_3G_Modem

Determining which device you are using

You should also find out which dongle you have (as you can see in the example it's not always quite obvious and the lsusb output may also not be accurate), search for it online and provide maker and model name along with to Ubuntu version you are using when you ask a new question, thus helping everyone finding questions already asked and corresponding answers.

There are only a few manufacturers of these dongles, namely Huawei and ZTE, but a lot of carriers re-brand them. Here is how it looks on mine:

It's a Huawei K5320. (A very old device. This is not meant to be a recommendation.)


Unity System Settings / Sound app in LXDE

Starting with 14.04, Ubuntu introduced the unity-control-center to replace the gnome-control-center.

You can obtain the classic style controls you desire by installing and using unity-control-center instead of gnome-control-center

Execute the following commands to install the unity-control-center:

sudo apt update
sudo apt install unity-control-center

Run the following command to open:

unity-control-center &


Not able to resolve DNS at 8.8.8.8, though ping works

I resolved this by reinstalling my entire operating system. I switched to the LTS line in case the issue was partially caused by some system update.


Any way to check a PS3 controller's battery on Ubuntu?

You can simply use the Dual Shock 4 battery percentage extension for Gnome. Although the name mentions DS4, it also supports DS3 (which I am using) and should soon support DS5 with recent kernels.
Behind the scenes, this extension simply relies on the power supply subsystem, and more specifically the file located at:
/sys/class/power_supply/<controller_identifier>/capacity


Can't boot into Windows 8 after installing Ubuntu

Please update your grub and next time when you boot into ubuntu, select recovery mode and upgrade grub bootloader.. And then, reboot.. I think it should solve the problem.


How to identify the module supposed to claim a device by vendor/product ID only?

If you restate the problem as "How can I run modinfo on all (or some) modules and select some of the output for further use?", you could use this trick (I've left the commands I used to figure out how to get to the final result):

ls /lib/modules
ls /lib/modules/$(uname -r)
ls /lib/modules/$(uname -r)/kernel
find  /lib/modules/$(uname -r)/kernel -type f -name '*.ko' -print
for i in $( !! ) ; do
for i in $( find  /lib/modules/$(uname -r)/kernel -type f -name '*.ko' -print ) ; do
   j=${i##.*/}
   j=${j%%.ko}
   echo $j
   modinfo $i | egrep 'filename:|alias:'
   echo ""
   done

This trick can be used elsewhere, have fun!


I'm installing Ubuntu, and all I see is a spinning wheel. What could be the problem?

check the ISO image you downloaded, it could've gotten corrupted by some windows viruses while writing it to a USB flash and it is also good and not harmful to restart the process again and also  checking the md5sum of the ISO is important


After formatting Windows 7 there is still dual-boot screen

Those entries are still showing because you installed Wubi (Ubuntu inside Windows) in a partition which you didn't format. As a result the Ubuntu boot information was at the root of the partition there (for example, if you installed in E:, the boot files are still in E:). Windows 7 scanned for other OSes  during installation and added Ubuntu in the list. (It is same as adding Windows XP).

  How can remove this dual boot and instal new version ubuntu along win 7? Can anyone help me with these?

I recommend removing the Ubuntu files at that partition, mainly ubuntu.disk and swap.disk file and then install Ubuntu via Wubi in the same old partition. Alternatively, You can just format that partition (You should backup your data first, if you have there) and install Ubuntu via Wubi there.


Turning Ubuntu 12.04 entirely Grey/B&W/Monoscale

I've been playing around with the "Opacity, Brightness and Saturation" option under Accessibility in ccsm and have been able to set all windows to a saturation of 0, but the Dock and Dash don't seem to be affected by the change. A work around might be to change the Icon set to one of the High contrast versions that exist on the system or by finding one of your liking on the internet.

Here's how. CCSM-> Accessibility-> (Enable) Opacity, Brightness and Saturation. This will cause Compiz to have a little fit, give it time and it will repair itself.

In the OBaS settings go to the saturation tab. Under "Window specific settings" click New, in the next dialog box enter "type=any" without quotes, and set the Window values to 0. Click close and the results should be instantaneous.


I think you'll need to add Terminal=true


1.
You can install Steam from the software center and do not need to install wine for it.

Many games like Counter Strike : Global Offensive etc work natively on Linux.

2.
Otherwise, you can install open source FPS like Assault Cube using the Terminal.

sudo apt-get install assaultcube

3.
You can also run windows games using PlayOnLinux. To install -

sudo apt-get install playonlinux


Date always resets to 11 Feb 2016 on Odroid XU4, running Ubuntu MATE 16.04

If you don't have the RTC backup battery, the system will not preserve the time. You can purchase one here: rtc-battery.

However, the time should be kept if you maintain the ODROID XU4 connected to the power supply. If this does not work, I could think this is a hardware fault. Other thing you could try, is using an external RTC module, or run an script in every reboot to sync the clock using Internet for example.


Unable to update any software packages in VMWare Ubuntu

Give the following a shot:

sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

This will delete corrupted packages and reupdate.


You are in the unity desktop.Options are differents giving that it is based on Gnome 3 shell for the moment (on the other way, as you prefer). Now you've got other "features" like search you application (google like) etc.

You can give Gnome shell a try but if you want another desktop experience, you can switch to xubuntu-desktop which I think may suit best you needs to folder's icon changing.


You can install Simple, Shibboleth and Openid plugins by:

sudo apt-get install wordpress-xrds-simple wordpress-shibboleth wordpress-openid


Upstart creates two processes instead of one

Try dropping the quotes around /bin/cat. So do:

exec ncat -l 7 -k -e /bin/cat

The reason I say this is that the documentation says:

  Any special characters, e.g. quotes or `$' specified  will  result in the entire command being passed to a shell for expansion.

In this case there's no need to call the command via the shell, so let's make it simpler so that you don't use the shell.

If you do want to use the shell, then you might explicitly use a script...end script stanza and explicitly use a shell exec command in there instead.

I'm not sure why you're getting your original behaviour, but I think you may be able to fix it by avoiding use of a shell in the first place.


How to make Ubuntu detect my system jack as speakers so I can have 5.1 sound?

for 5.1 you must have hdmi or 3 color jacks . 5.1 cant work with only 1 jack . if you have hdmi you can use it hdmi-supported sound sytem or you can a translater hdmi to your cable


What are the steps to create an Ubuntu Live CD with the Server version?

For Ubuntu Server there is no such thing as a Live CD, aside from the fact that if you select "Install Ubuntu Server", let it boot, and then leave it at the first install screen you can switch virtual terminals and get to a login prompt that way.

Normally Ctrl-Alt-F2 should switch you to a virtual terminal -- anything in the form of Ctrl-Alt-Function key where Function key is anything from F1 to F7 should work.  To switch back to the installer, try Ctrl-Alt-F1.


Is it possible to stop laptop's battery from charging?

that dependes of the laptop and his design cause in my work repairing laptops some times even if the motherboard is death the battery still reach charge, because it works with a independent IC chip.


How to turn on Network Discovery and Share between computers with Samba

To share resources (File Sharing) between 2 or more computers on the same LAN you need Samba which by default comes with Network discovery (After having Samba installed) activated. It will work for your local network but you need to remember to set the workgroup to the one the network is using.

To install Samba, first you either have to "Share a folder", I recommend sharing anything inside your home folder so it is less trouble because of permissions, this can be a folder in your desktop for example. You can share it by right clicking the folder and selecting Sharing, Ubuntu will guide you through a couple of Sharing questions that involve installing Samba and setting the correct permissions.

The other way to install samba is by literally installing samba ;). Either with Software Center or in the terminal typing the following: sudo apt-get install samba <-- Didn't see that one coming did you!

Now to edit the Samba configuration and make sure you are on the same network workgroup. The workgroup should be the same for all machines in your LAN. This way, they can actually take advantage of the network discovery between Windows and Ubuntu or Ubuntu and Ubuntu machines.

Edit your smb.conf file: sudo nano /etc/samba/smb.conf
Find the line in the [Global] secion that reads workgroup

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
 workgroup = WORKGROUP

Change the value of workgroup to the one your network workgroup is using or set a new name for the workgroup you would like to be working on, for example:

workgroup = myhomenet

Save the file and restart the Samba service: sudo service smbd restart

Enjoy the power of weird network discovery ^^

This should be enough to have an Ubuntu to Ubuntu LAN working but in cases where Windows is involved and just in case Windows does not see your Ubuntu PC, add the following to your [Global] section in your smb.conf file:

local master = yes
preferred master = yes

And of course restart your Samba service.

If still it does not see it, in Windows look for the Advanced Sharing Settings found in the left panel in the Network and Sharing Center. While in there choose the option Enable file sharing for devices that use 40 or 56 bit encryption. This is only an issue in Windows Vista and Above, if you have Windows XP it should work correctly.

After this, to access any other computers on the Network you can open the File Browser and select Browse Network :


How do I install a FlatPak for a specific user?

You can do this using the common Linux command Substitute User (su) or the Substitute User Do (sudo) command. Here are examples:

Installing a FlatPak with su

su user2 -c flatpak install --user com.skype.Client

You will be asked for the password of user2 to become that user.

Installing a FlatPak with sudo

sudo -u user2 flatpak install --user com.skype.Client

Assuming you are an admin user or a user that has "sudoer" rights, you will be asked for your password in which case you will then become user2 to run the command.

Step-by-step

You can also combine the two by becoming root first and then becoming another user:

sudo -s    # you will become root
whoami     # will print root
su user2   # you will become user2
whoami     # will print user2
flatpak install --user com.skype.Client


A CIFS mount cannot override the permissions settings of Samba or the underlying Linux permissions.
Your "music" share definition allows only "erik" access to the share. Since the Music subfolder - on the server - is likely owned by "erik" everything should work.
Except you stipulated force user = nobody in your share definition. That "forces" "erik" to become "nobody" which likely has no write access to that folder.
Either remove the force user = nobody line from your [music] share or change it to force user = erik
Then restart smbd


I realize this is an old post, but I am still installing Ubuntu Server 14.04 and have found this issue as well. As far as I can tell it is from booting with EFI/UEFI media, as Rod Smith has stated.

I ran the install using a USB jump drive with the Ubuntu Server 14.04.4 ISO and the intention of installing in BIOS mode. In the BIOS menu I selected to boot from USB. The install ran normally and I created the partitions as desired (using 500mb ext2 in raid1 for the /boot partition) but I could not change the boot flag. Also, the partitioner did not ask for primary/logical partitions. The installer ran until the GRUB install, then failed. I attempted this multiple times with install variations with the same result.

Next I ran the install from a CD with the same ISO. I set up the partitions the same way and was able to set the bootable flag to on and also select primary/logical. The install then worked as expected and the GRUB install worked with complaint.

I am still new to installing and have not figured out all the details of BIOS/UEFI, but as far as I can tell this is where the issue lies.


Try installing the latest version of Plasma as a backport:

sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt update && sudo apt full-upgrade -y


First make the backup of following two directories:

cp -R ~/.gconf/desktop/gnome/accessibility/keyboard/ ~/.gconf/desktop/gnome/accessibility/backup_keyboard

cp -R ~/.gconf/desktop/gnome/peripheral/keyboard/ ~/.gconf/desktop/gnome/peripherals/backup_keyboard

Then remove the original two directories:

rm -r ~/.gconf/desktop/gnome/accessibility/keyboard/ ~/.gconf/desktop/gnome/peripherals/keyboard/

Finally restart your system.

You should get a new keyboard settings. Just give it a try..

Thanks ubuntuser for your suggestion :)


I don't use Unity but given what I know of its mechanics, this should work:

unity

You'll want to stick that in a run box (Alt+F2) rather than a terminal or it'll break when you exit the terminal.

If you want to run it from a terminal use:

setsid unity


ZFS Diff - diff delegated permission is needed

This issue is resolved by granting diff permission in ZFS to the user in question by issuing the following command:
sudo zfs allow <user> diff <zpool>/<dataset>

eg: To grant diff permission to jblogs on dataset rpool/USERDATA:
sudo zfs allow jblogs diff rpool/USERDATA


Ubuntu 13.10: How to disable Nvidia graphics (nouveau)?

I found a way to do this: here is a very nice guide on how to turn off the NVidia card. But use it with caution! When I followed this guide, I couldn't boot my system anymore, there was Kernel panic. But here is a workaround. Just change:

# echo "blacklist nouveau" >> /etc/modprobe.d/blacklist

to:

# echo "blacklist nouveau" >> /etc/modprobe.d/blacklist.conf

and it should work. At least it worked for me.


I was able to retrieve all the settings by running an strace on the process id. The following command helped:

    :~/dos$ sudo strace -p <pid> -t -v -o dump.txt

    pid- process ID of my process
    t - adds a timestamp to the system call trace
    v - expands the termios structure which basically contains the serial port settings, without this flag the structure will be truncated
    o - output the trace to a dump file specified

This not only gave me all the setting related information,but also gave me the protocol specifics such as what IOCTLs (TIOCM_RTS, TIOCM_DSR etc) Thanks to everyone who helped me out here!


Running a Adobe AIR application on a headless remote server

How to run a Adobe AIR application on a headless server

The problem is not that you are trying to run it from a terminal. The problem is that there is no graphical display running on the machine. You seem to be running on a headless server.

I'm aware of two possibilities:

If you connect with ssh, you can add the -X option and allow the Adobe AIR application to use your local display
You can fool Adobe AIR into believing that there is a display running by installing xvfb. Use the script bellow which I've copied from this post:

Copy this code into a file named xvfb_wrapper.sh:

#!/bin/sh
#
# Author: Matthew Wilson, rPath, Inc.
#
# This could probably be done more elegantly in Python...

pid=''
for ((d=0; d < 20; d++)); do
    DISPLAY=:$d
    Xvfb -ac $DISPLAY > /dev/null 2>&1 &
    sleep 2
    jobs -l %1 > /dev/null
    pid=$(jobs -l %1 2>&1 | grep Running | awk '{print $2}')
    if [ -z "$pid" ]; then
        continue
    fi
    if ps $pid > /dev/null 2>&1; then
        break
    fi
done

if [ -z "$pid" ]; then
    echo "unable to start Xvfb"
    exit 1
fi

trap "kill -9 $pid" SIGINT SIGTERM EXIT

export DISPLAY=$DISPLAY

$*

Call chmod +x xvfb_wrapper.sh to give it execution rights. Call your application with the xvfb_wrapper.sh in front of it. In this example this would be:

sudo xfvb_wrapper.sh "Adobe AIR Application Installer" -silent -eulaAccepted MyAirApp.air

Edit: Added information from comments and the script from link.


The medium can't be used as the requested device type

You're going about this the wrong way, you are trying to add an ISO image as a CD/DVD drive. Instead, first, create the new VM, using Debian 32bit as the OS type. Then, once this has been created, go into the VM's Settings and choose the "Storage" tab. Once there, select the "Empty" item under the IDE controller:

Then, click on the CD icon on the top right, and select the 1st choice,

In the dialog that will appear, select the Kali .iso, save the settings and then boot the machine. It will boot from the .iso you just selected and you should be able to istall with no problems.


Best practice when mounting a new disk within an existing mount?

By definition, every mountpoint except / is within another mountpoint. Your /home, for example, is a mountpoint in another mountpoint. There's nothing special about that whatsoever. This is safe, common and standard. So just create your mountpoint and add the new filesystem there.

First, move the current contents of /home/mythtv somewhere else, then mount the new drive to the now empty /home/mythtv directory and then move the data over.


Unable to mount My Passport 1TB hardisk in Ubuntu 14.04

On your external harddrive, the master file table (MFT) and its copy (MFTMirr) are seemingly no longer consistent.

You might want to fix it using the Linux tool ntfsfix on the command line.

Hook the drive to your Linux machine.
Open a terminal by holding the ALT and the CTRL down while pressing the t key.
In the terminal, enter which ntfsfix and press RETURN to launch the command. If you receive a line like /bin/ntfsfix, this means that the tool is already installed and can be used to fix the problem. This should be the case.
Fixing a problem like the one you describe requires special rights a normal user doesn't have (for good reasons). Consequently, the repair operation has to be carried ot with super user priviledges. This is achieved by prefixing the command you want to use with sudo, which means super user do.
Since the external hard drive was not mounted, you need to call it by its device name. From the error message that you gave, we read that it is /dev/sdb1.
To sum it up: Enter sudo ntfsfix /dev/sdb1 in the terminal and press RETURN. You will be asked for your password. Enter that and press RETURN again.

Good luck!


Using XAMPP in Ubuntu while installing it in Fedora

You can't do that. You need to install it again. You might however share the DocumentRoot.


How do I run Clam TK antivirus in 16.10?

Start ClamTk. Push the Scan a directory button.

Click once on File System, then click OK

To update the ClamTk user interface, click on the gold star in the main ClamTk window, which brings up the About information. Click on Homepage and that will take you to the user interface's software page. Find the deb installer for Ubuntu. Download it. Install it.


Can I call other dpkg or apt-* commands within my preinst scripts?

You are correct. Maintainer scripts are not supposed to make any changes to the apt or dpkg states, other than the changes that will be made when installing the package anyway.

Installing a file into /etc/apt/sources.list.d, though, is fine. Most packages that fill a role like "install this package to add the APT repository X to your system" simply do that (as opposed to calling add-apt-repository). It's also common to drop the GPG public key used to sign the repo into /etc/apt/trusted.gpg.d.

If you want to make it simple for the user to perform the additional installation steps for your software, you might just want to ship a script which does the job, and tell the user to run the script manually.

But if you really, really want to call apt-get update or apt-get install, etc automatically, and you don't mind that your package will be wholly unacceptable in Debian or Ubuntu proper, and your users are ok with the package acting that way, then you could perhaps put something in /etc/cron.d which checks for any existing apt or dpkg locks, and if none are held, performs your additional installation steps and arranges for those steps not to be performed again. I don't recommend that approach.


Peewee MySQL problem after upgrade to 19.10

Fixed by:

pip3 install pymysql

Apparently mysqlclient is not enough anymore.


Ubuntu 13.10 is coming on October 17, and even though its not a LTS version, i recommend you wait for just a few more days for this release


How to set up VIA chrome9 screen driver?

Via chrome9 was to have been detected during the installation, because X.org supports this device using Openchrome driver xserver-xorg-video-openchrome. That's why I guess your problem is unusual.

Try to install the driver again, but now using the open-source version. Open a terminal and type:

sudo apt-get install xserver-xorg-video-openchrome

If the package was installed, try to restart your box (don't use Ctrl + Alt + Backspace).

But if not installed, you may found a bug. Go to launchpad.net and open a bug. Don't forget to provide lspci to help solve it.


configure: error: avahi development headers not found

You need additionally libavahi development packages. Without knowing what you try to compile I can only give you a list of available packages. Check this link.

But I believe, you need libavahi-glib-dev:

sudo apt-get install libavahi-glib-dev

The missing header file avahi-glib/glib-malloc.h is in this package.


I ran into this problem after upgrading from 12.04 to 14.04. I was thinking same direction as you, patching the issue with a link. Maybe the location you chose was wrong?

I used find to locate libudev.so.1 : /lib/i386-linux-gnu/libudev.so.1

Them I solved my problem with this link:

 ln -s /lib/i386-linux-gnu/libudev.so.1 /lib/i386-linux-gnu/libudev.so.0

When using find you need to be careful; either use the full exact name, or use wildcards and put the name in quotes


For 12.10

You can disable the help browser by opening "System Settings" -> "Keyboard" and switching to the "Shortcuts" tab, then under "Launchers" turning "Launch Help Browser" to "Disabled".

However some applications, for example the terminal, have their own help settings you will have to turn off as well.  For the terminal, open the "Edit" menu and click on "Keyboard Shortcuts".  Scroll to the bottom and change the key for "Contents" under "Help".  To turn the shortcut off, select it and then hit backspace.


How to completely turn off session saving?

From man gnome-session:

  The gnome-session program starts up the GNOME desktop environment. This  command
         is  typically  executed  by  your login manager (either gdm, xdm, or from your X
         startup scripts). It will load either your saved session, or it will  provide  a
         default  session  for  the  user  as defined by the system administrator (or the
         default GNOME installation on your system).

  The default session is defined in the GConf keys  under  /desktop/gnome/session.
         When saving a session, gnome-session saves the currently running applications in
         the $XDG_CONFIG_HOME/gnome-session/saved-session directory.

  gnome-session is an X11R6 session manager. It can manage GNOME  applications  as
         well as any X11R6 SM compliant.

(Emphasis mine)

By default $XDG_CONFIG_HOME is ~/.config so that is where the saved applications data is stored.

Remove all the files in that folder to "forget" the last running applications:

rm ~/.config/gnome-session/saved-session/*


Systemctl command to display a summary of running services

You could use some of systemctl's options:

-t, --type=
       The argument should be a comma-separated list of unit types such as
       service and socket.

       If one of the arguments is a unit type, when listing units, limit
       display to certain unit types. Otherwise, units of all types will
       be shown.

       As a special case, if one of the arguments is help, a list of
       allowed values will be printed and the program will exit.

   --state=
       The argument should be a comma-separated list of unit LOAD, SUB, or
       ACTIVE states. When listing units, show only those in the specified
       states. Use --state=failed to show only failed units.

       As a special case, if one of the arguments is help, a list of
       allowed values will be printed and the program will exit.

So probably you want:

systemctl --type=service --state=active list-units

Which lists all active services including those which have exited. If you're only after the ones running at this moment you could use:

systemctl --type=service --state=running list-units


Plenty of AMD graphics drivers, including R9 270s, will not work with Ubuntu 16.04 LTS - I have an AMD A10-7700K Radeon R7 graphics driver, and Ubuntu 16.04 LTS does not work. I booted from DVD and pressed Try Ubuntu Without Installing and my monitor blacked out. I did a clean install of Ubuntu 14.04 LTS and everything is working perfectly fine. I highly recommend going with 14.04 LTS and not 16.04 LTS.

EDIT: By the way, Kubuntu 16.04 and Ubuntu 16.04 are the same thing, except Kubuntu uses the KDE desktop environment. If Ubuntu 16.04 will not work with most AMD graphic drivers, then Kubuntu will not work with them either.


How do I turn off effects so VNC can paint properly?

When you use Unity, the effects are ON and you cannot disable them. The reason is that Unity is a Compiz plugin itself, so if you disable the effects (Compiz), Unity will freeze up.

When you log in into Classic GNOME (GNOME Panel), you get by default no desktop effects (Compiz is not running). In addition, there is no tab to enable the desktop effects.
However, you can still run from the command line the command compiz --replace & and get desktop effects. You can switch back to no desktop effects by running metacity --replace &.


running python script with limited command privileges (help)

You could use this to change the script's ownership

sudo chown username:users bot.py

Or you can use this below, however it's better to find the minimum correct permissions you need for the file instead of granting it all permissions for everyone

sudo chmod 777 bot.py


How to change the value of a variable in a section of a file only?

Try:

$ sed '/^\[aaa\]/,/^\[/{/^\[/b; s/aaa/NEW/}' file.ini
[aaa]
a= b
c= NEW
e = f

[bbb]
a = b
c = aaa
e = f

How it works

The overall command looks like

/^\[aaa\]/,/^\[/{...}

The pair of two regexes separated by a comma, /^\[aaa\]/,/^\[/ defines a range of lines starting with a line that starts with [aaa] and ending with the next line that starts with [.  For any line in that range, but only lines in that range, the commands in curly braces are executed.  Those commands are:

/^\[/b

The regex /^\[/ looks for lines that start with [.  For those lines, the command b is executed.  b stands for branch and tells sed to branch past (skip) the rest of the commands.
s/aaa/NEW/

For any other line in the range, this tells sed to replace any occurrence of aaa with NEW.

In more detail, /^\[aaa\]/ is a regex that a literal [ at the start of a line followed by three a followed by a literal ].  The [ and ] must be escaped with a backslash because, without the backslash, [ and ] are regex active characters.  The regex /^\[ matches any line that starts with [ where ^ is a regex-active character that matches at the start of a line and \[ matches a literal [.


ESX 5.5 and Virtual Ubuntu, no internet connection

Which Switch Module are you using on the c3000?

I would check there to see if the MAC Address from the Ubuntu VM is even making it to the Physical Switch/Virtual Connect in the chassis.

If it is, then the problem is likely Layer 3, or the uplinks, or outside the chassis.
If the MAC is not showing up in the Switch Module, then it's something on the VMware to VM side of things.


HP LaserJet printer not recognized in 12.04 with hplip installed

Download and install HPLIP directly from the HP OPEN SOURCE website.
http://hplipopensource.com/hplip-web/downloads.html

Click on DOWNLOAD HPLIP.
Find the downloaded file and right click on it and select PERMISSIONS. Select MAKE EXECUTABLE. Click OK.

Right click on the file again and select OPEN then EXECUTE. Follow the instuctions.

*Reason it works is mainly because it detects and installs dependencies that the apt-get or software center version won't.


How can I list all files and folders beyond a specified size limit?

find /home/stephenm/ -maxdepth 1 -size +20k -exec du -h {} \;

That should list anything over 20k in /home/stephenm

to recurse into sub directorys drop the -maxdepth 1 option.


Backup live server, migrate to new hard drive (simulating recovery from hard drive failure)

Well I didn't get very much input into my problem, but I uncovered a solution and will post it here for posterity. The clue came from this article

I needed to add two modules to /etc/initramfs-tools/modules
1) sata_nv which is what makes the SATA controller where the GPT drive connects, work
2) usbhid just in case I get dumped into a busybox shell again.

Then simply:
#: update-initramfs -c -k <kernel version>; reboot; profit


Use cases of readlink -f vs. readlink -e

First of all, both will canonicalize file names that includes:

Converting all relative paths to absolute paths
Converting all symbolic links to actual hardlinked paths on the filesystem hierarchy

The main differences are:

-f will canonicalize a path that may contain a non-existent filesystem portion only at last e.g. a directory or a file, non-zero exit status otherwise; on the other hand, -e will only work only if all components exist in the filesystem, non-zero exit status otherwise
Any trailing / is ignored in -f, -e treats trailing / as a directory

So, practically:

Use -e when you want to make sure of any path must exist e.g. you need the exit status to do any further logical operation, a if-else test precisely
Use -f when you do not want the path to exist strictly now, but you need the full path later e.g. you want to create the resolved file afterwards when a process is running or a filesystem is mounted and so on.
Use -e with a trailing / to check for a directory entry explicitly as -f ignores trailing /