Ubuntu 18.04 USB 3 flash being seen as a USB 2

Your output shows USB 3.0 on Bus 03 running at 5000 Mbps (5 Million bits per second).

Breaking down the USB speeds I'll use my system:

$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 5000M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        |__ Port 4: Dev 3, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 3: Dev 8, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 1: Dev 4, If 0, Class=Printer, Driver=usblp, 480M
        |__ Port 1: Dev 4, If 1, Class=Vendor Specific Class, Driver=, 480M
        |__ Port 4: Dev 9, If 0, Class=Hub, Driver=hub/4p, 480M
            |__ Port 4: Dev 10, If 1, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 4: Dev 10, If 2, Class=Human Interface Device, Driver=usbhid, 12M
            |__ Port 4: Dev 10, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        |__ Port 2: Dev 6, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
    |__ Port 4: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 12M
    |__ Port 5: Dev 5, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 5: Dev 5, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 7, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 7, If 1, Class=Video, Driver=uvcvideo, 480M

Bus 04: USB 3.1, 10,000 Mbps (10 Gbps)
Bus 03: USB 2.0, 480 Mbps
Bus 02: USB 3.0, 5,000 Mbps (5 Gbps)
Bus 01, Port 4, Device 10: USB 1.0 12 Mbps


Have you tried running liquidsoap in daemon mode?  ie. with "-d" parameter?

http://manpages.ubuntu.com/manpages/precise/man1/liquidsoap.1.html


Take a look at https://superuser.com/questions/679725/how-to-correct-512-byte-sector-mbr-on-a-4096-byte-sector-disk
Your disk is the advanced format type of 512 logical/4096 physical, so you should define all your partitions on multiples of 4096 for aligned boundaries, not 512.


How can I see which set of backups Déjà-Dup has already saved?

In System settings, select Back up and get in to the program.
Click Restore and a new window will be opened which is asking "Restore from where?"
Select your own back up location and click Forward. After a short analyse, you will be able to see the dropdown list of the avaliable dates.


Dual boot encryption and shared data drives

I would suggest not possible or at least not as easy as you would be wanting.  Ubuntu uses a specific set of libraries to mange encryption/decryption when logging in/out of the user account.  This method would not be available in the Windows OS.

To access an encrypted drive in Windows you would need some tools that replicate how Ubuntu encrypts the data as well as having the key available to do the decryption.  Last I saw Windows would not even see a Linux filesystem type let alone be able to read the key from it.


Those are directly the files you need to run the program. For opening Popcorn Time, just run from the extracted folder:

./Popcorn-Time

However, if you want to know where to save all those files with the other programs, a good place would be /usr/share.
So, let's say the folder where you extracted the files is ~/popcorn-time. Then, you'll have to run this in a terminal:

# Copy the whole folder into /usr/share, using recursive option
sudo cp -r ~/popcorn-time /usr/share/popcorn-time
# Create a symlink to the binary file
sudo ln -s /usr/share/popcorn-time/Popcorn-Time /usr/bin/popcorn-Time

From now on, you'll be able to run popcorn-Time on the Terminal, and it'll open.

Finally, if you want to have an icon in the launcher, create a new file in your home directory, named popcorn.desktop, and write the following in it:

[Desktop Entry]
Name=Popcorn Time
Comment=Watch torrent movies instantly!
Exec=/usr/bin/popcorn-time
Terminal=false
Type=Application


Which DNSExit client to download for Natty (11.04)? Rpm or Deb?

You must use the .deb package. Simply double click the downloaded file and the ubuntu software center will appear. Wait a moment and you are able to click on "install".


Is Ubuntu spyware (referring to article by Richard Stallmann)?

I will address your 3 main points one at a time:

It does meet the four freedoms of free software.  You can run whatever your want (provided that it's within the law), you can get the source code and tweak it and redistro it.
Just because Canonical encourages the use of non-free software doesn't discredit them.  That's like saying "Because Microsoft encourages you to use non-free software (like Office)" or "Because Apple encourages you to purchase iLife."  It's just not a valid reason to discredit them.
Yes the queries are sent back for processing, but so are Google searches, yet nobody's boycotting Google for that.  Just because software send queries for server-side processing doesn't mean that they keep a record of that and use it or sell it.  And any solicitations that they give you in those searches can be disabled (I believe they are by default).  In the Ubuntu Software Center, you must explicitly enable software recommendations.

So this is not to say that you are 100% under the radar, but my point is that Ubuntu is at least as privacy-respecting as any other product.  If you really are concerned about being tracked by someone, maybe you should consider not being worth being tracked!


Simple Hand Made Persistent USB that Boots either BIOS or UEFI

Simple Hand Made Persistent USB
Making a Grub2 booter that uses Persistent partitions is easy.*

Boot Installed Ubuntu or Live USB.
Insert Target USB.
Start GParted.
Create a GPT partition table on Target USB.
Create a 1MB BIOS boot partition on the left, formatted as unformatted.
Add a 300MB FAT32 EFI boot partition next to it.
Add an ext4 root partition large enough for the Ubuntu ISO's contents, (~ 3GB for 20.04).
Create an ext4 partition labeled casper-rw
Add a NTFS data partition if desired.
Apply all operations.
Flag partition 1 bios_grub.
Flag Partition 2 boot, esp
Close GParted.

Open the ISO's folder as Administrator, open the ISO using Archive Manager.
Extract the ISO's contents to the Target's root partition.
Drag and drop the boot and EFI folders from Archive Manager window to the EFI boot partition.
Edit sdx2/boot/grub/grub.cfg adding set root=(hd0,3) after the first line that starts with menuentry.
Add a space and the word "persistent" after ---.

Install grub, if in BIOS mode or booted from USB drive run:
  sudo mount /dev/sdx2 /mnt

  sudo grub-install --boot-directory=/mnt/boot /dev/sdx

If in UEFI mode on installed system, boot into the Target drive and run the above.

*Booting based on mkusb by sudodus


Try this to get the very latest driver from nvidia

Add the  PPA for nvidia

sudo apt-add-repository ppa:ubuntu-x-swat/x-updates

Update software sources

sudo apt-get update

Download the driver

sudo apt-get dist-upgrade

Then reboot

This fixes many nvidia issues so may help you


How can I automatically mute an application when not in focus?

(Automatically) mute sound of a specific application if its window is not in front

I tested the script below on Rhythmbox, doing the job without a single error.

Running the script below in the background will pause the targeted process if its window is not in front (within one second), muting sound if it comes with the application.
Whenever the window gets in front again, the process is resumed where it was, and sound works again.

If the targeted process/application does not run at all, the script switches to a longer period (mode), checking only once per five seconds if the targeted application runs or not. This way, the script is extremely low on juice if it has no job to fulfill.

The script

#!/usr/bin/env python3
import subprocess
import time

# ---set the proc to pause when not the active window
wclass = "rhythmbox"
# ---

def get(cmd):
    # just a helper function to not repeat verbose subprocess sections
    try:
        return subprocess.check_output(cmd).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

while True:
    # the longer period: application is not running (saving fuel)
    time.sleep(5)
    front1 = ""
    while True:
        # if the application runs, switch to a shorter response time
        time.sleep(1)
        # get the possible pid, get() returns "None" if not running,
        # script then switches back to 5 sec check
        pid = get(["pgrep", wclass])
        if pid:
            front2 = wclass in get([
                "xprop", "-id", get(["xdotool", "getactivewindow"])
                ])
            # run either kill -stop or kill -cont only if there is
            # a change in the situation
            if front2 != front1:
                if front2 == True:
                    cm = ["kill", "-cont", pid]
                    print("run") # just a test indicator, remove afterwards
                else:
                    cm = ["kill", "-stop", pid]
                    print("stop") # just a test indicator, remove afterwards
                subprocess.Popen(cm)
            front1 = front2
        else:
            break

How to use

The script needs xdotool to get information on the frontmost window:

sudo apt-get install xdotool

Copy the script into an empty file, save it as pause_app.py
In the head section of the script, set the process name to pause (replace rhythmbox).
Usually this is the same as the (first section of) the WM_CLASS, but in your case, I am having doubts if this should not be steam or something else. Run to make sure

ps -u <yourname>

to make an educated guess, and subsequently

kill <pid>
(the process id)

to check.
Run the script by the command:

python3 /path/to/pause_app.py

and check if all works as expected.
If all works fine, add to Startup Applications: Dash > Startup Applications > Add. Then add the command:

python3 /path/to/pause_app.py

Note

The script can be easily edited to target multiple applications, but first please see if this is what you need.

Alternatively

If you'd prefer to mute the sound in general once the targeted window is not in front, replace the command to pause the application by the command to mute (/unmute) sound. The script then becomes:

#!/usr/bin/env python3
import subprocess
import time

# ---set the proc to pause when not the active window
wclass = "rhythmbox"
# ---

def get(cmd):
    # just a helper function to not repeat verbose subprocess sections
    try:
        return subprocess.check_output(cmd).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

while True:
    # the longer period: application is not running (saving fuel)
    time.sleep(5)
    front1 = ""
    while True:
        # if the application runs, switch to a shorter response time
        time.sleep(1)
        # get the possible pid, get() returns "None" if not running,
        # script then switches back to 5 sec check
        pid = get(["pgrep", wclass])
        if pid:
            front2 = wclass in get([
                "xprop", "-id", get(["xdotool", "getactivewindow"])
                ])
            # run either kill -stop or kill -cont only if there is
            # a change in the situation
            if front2 != front1:
                if front2 == True:
                    cm = ["amixer", "-q", "-D", "pulse", "sset", "Master", "on"]
                    print("sound") # just a test indicator, remove afterwards
                else:
                    cm = ["amixer", "-q", "-D", "pulse", "sset", "Master", "off"]
                    print("no sound") # just a test indicator, remove afterwards
                subprocess.Popen(cm)
            front1 = front2
        else:
            break

Usage is exactly similar to the first script.


How to change icon for mounted devices in Unity/Nautilus?

Replace the existing icon files with the icon file of your choice (I have a steam-punk truck for all my USB HDDs (defined in fstab) and a steam-punk Zeppelin for USB sticks. (my ancient phone gets detected as a USB drive, so I didn't bother changing that one neither)
Yes, udev! No don't ask: I didn't bother, I used solution 1 (much less work).
/usr/share/pixmaps and its subdirectories.

You can also have a look here for more advanced options.


Then you haven't installed it correctly; try installing with this command:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

If that doesn't work, then try this fix:

sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
sudo /etc/init.d/apache2 reload


Can't access SMART on an external HDD from gnome-disk-utility

I have found that some external hard drive interfaces do not support the SMART function. I have two interfaces/cases.  If I put a drive in one I get no support. Put the same drive in the other and SMART function works just fine.


It may be that the AMD CPU doesn't have the virtualization extensions

egrep '(vmx|svm)' --color=always /proc/cpuinfo

Since you have an AMD, if you don't have svm in there, then you can't load kvm-amd.

It might be disabled in the BIOS, many vendors disable it by default.


How to setup Canon InkJet Pixma IP 1300?

Just installed the same printer on Quantal 32bit edition (canon pixma IP1300)....
These are the steps you should try:

1) Add repo:

sudo add-apt-repository ppa:michael-gruz/canon-stable

2) Remove the printer installed in cups. And disconnect the printer.

3) sudo apt-get install cnijfilter-ip2200series

4) restart cups:

sudo service cups restart

5) chose printer ppd driver when installing the printer:

/usr/share/cups/model/canonip2200.ppd

6) print test page > succes.

Hope i helped you.


What permissions does DocumentRoot directory of Apache Server requies, if its outside /var/www

To change to a directory, you need +x permission on that directory. To read content of a directory, you need +r on the directory.

To change to /home/username/Desktop/work/wp/, you have to give the world execute on the whole path, and read on the wp directory.

chmod o+x /home/username
chmod o+x /home/username/Desktop
chmod o+x /home/username/Desktop/work
chmod o+rx /home/username/Desktop/work/wp

will give these permissions to other, which is all users not in your group.


Screen turn off/crazy when I adjust my screen brightness continuously on a Dell Studio 1558

It seems to work with acpi_backlight=vendor boot option.

https://answers.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+question/196784

How do I add a kernel boot parameter?


I feel kind of stupid, but I forgot to set the execute bit.

Now the script works.

I used chmod +x


How can I build a bootable ISO with my specific customisations?

For bare metal installs of Ubuntu 20.04 server I user the automatised server installs.. Then I plug in the standard ubuntu 20.03 iso and the cloud-init cidata USB and it does an unattended boot.     If your motherboard has IPMI that it will probably support remote mounting of ISO images and this can be used remotely.
Automated Server Installs
This allows you to configure cloud-init files that detail what and how you want the machine to be install and provisioned.  Its very powerful.
if you install a machine manually it will store a copy of the cloud-init file to recreate that machine in /var/log/installer in a file called auto install-user-data.  Thats a good starting point for what you need todo.
Autoinstall Quickstart guide


Ubuntu 13.04 and Windows 8 Dual Boot GRUB options/problems

Boot managers offer you different systems to boot. UEFI is a boot manager unless you have the 'buggy' UEFI one's where they hard code the UEFI to only boot Windows.
Grub is both a boot manager and a boot loader.
EasyBCD is a boot manager.

UEFI also uses NVRAM so it remembers previous entries. You probably have to manually houseclean old entries with efibootmgr.

Your entry with bkpbootmgfw.efi is the actual Windows efi file renamed by Boot-Repair for the buggy UEFI. It makes shim have the Windows efi filename so UEFI can boot grub. If you can boot the ubuntu entry in UEFI undo the rename. And undo rename before any Windows updates as it will overwrite file and Boot-Repairs backup may be older version on lead to issues.

Grub2's os-prober also found old BIOS type boot entries, that has been fixed with 13.10, but you may want to turn os-prober off so it does not add incorrect entries.

Remove Duplicate Firmware Objects in BCD and NVRAM

http://technet.microsoft.com/en-us/library/cc749510%28v=ws.10%29.aspx

UEFI NVRAM boot entries are cached in the BCD store
BCD has 1:1 mappings for some UEFI global variables
Any time {fwbootmgr} is manipulated, NVRAM is automatically updated

Some systems work better to register grub/shim from inside Windows - for those that keep resetting Windows as default

Grub not showing on startup for Windows 8.1 Ubuntu 13.10 Dual boot

bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi

https://coderwall.com/p/vfyqkg

sudo efibootmgr -v

The "-v" option displays all the entries so you can confirm you're deleting the right one, and then you use the combination of "-b ####" (to specify the entry) and "-B" (to delete it). Examples #5 is delete:

http://linux.dell.com/cgi-bin/gitweb/gitweb.cgi?p=efibootmgr.git;a=blob_plain;f=README;hb=HEAD

http://software.intel.com/en-us/articles/efi-shells-and-scripting/

In /etc/default/grub I added this:

sudo cp -a /boot/grub/grub.cfg /boot/grub/grub.cfg.backup
gksudo gedit /etc/default/grub
GRUB_DISABLE_OS_PROBER=true

You can change back to false or remove entry if your grub gets updated to add correct entries. With your version, you have to use Boot-Repair or manually add correct entries to boot Windows.

If from UEFI you can boot ubuntu entry:
To undo & to rename files to their original names, you just need to tick the "Restore EFI backups" option of Boot-Repair.


I think the best you can get is based on the links of
https://medium.com/linux-operation-system/5e6fac849ea3

It actually does not have "desktop" but using gnome-terminal to start like firefox, nautilus, or google-chrome, ... etc. for desktop Apps. BTW I install ubuntu-gnome 14.04 not ubuntu 14.04. So I do not have to install gnome-classical or -fallback ...etc. Good luck.


How to add 0.0.0.0 in hosts file before every domain in gedit?

One small nitpick: if you're using a GUI application like gedit, always use gksudo instead of sudo to avoid root possibly owning some of your files, messing things up.

For example, gksudo gedit /etc/hosts.

Move the cursor to the line before the first line you want to precede with 0.0.0.0.
In the Search menu, select Find and Replace….
In the Find field, type \n.
In the Replace with field, type \n0.0.0.0\t.
Press the Find button.
Press the Replace button repeatedly until all the lines you wanted to add 0.0.0.0 to are complete.

You can speed things up with the Replace All button, but that will add 0.0.0.0 to the front of all lines, even if they already have 0.0.0.0; not handle the first line of the file; and add a line at the end of the file with just 0.0.0.0 in it.


how to make a static binary of coreutils?

Per this comment on bug #640734, there is a workaround that you may try:

$ cd /usr/lib/gcc/x86_64-linux-gnu/4.8
$ sudo cp crtbeginT.o crtbeginT.orig.o
$ sudo cp crtbeginS.o crtbeginT.o

Also, add -fPIC to the command above:

make SHARED=0 CFLAGS='-static -std=gnu99 -static-libgcc -static-libstdc++ -fPIC'

Once you're done with the compilation just restore the original file like this:

$ cd /usr/lib/gcc/x86_64-linux-gnu/4.8
$ sudo cp crtbeginT.orig.o crtbeginT.o
$ sudo rm crtbeginT.orig.o


Problems creating a desktop entry for a shell script

Here are some tips that can help you solve your problem:

Replace Exec=/path/shell.sh with Exec=sh /path/shell.sh or Exec=bash /path/shell.sh
Add execution permission to the .desktop file

sudo chmod +x /usr/share/application/<your_desktop_file>

Also unless you want that launcher to be available system-wide (ie: to all users) you can place the .desktop file in ~/.local/share/applications. As that folder is located in your home folder you don't need sudo to create/edit the file.


Have you tried booting the install DVD on a different computer in order to verify that it is an issue with the GPU/Driver as opposed to an issue with the install medium?
If the problem is indeed a lack of out-of-the-box support for your graphics card, you may need to perform a installation in text-only mode. As far as I know, there is no "Alternate Installation" (i.e. text-only) .iso image of Edubuntu available to download, so if you have your heart set on upgrading from 11.10 to 12.04, I think your options are: 1) Start the update before you go to bed/work/wherever, so the time will not be an issue, or  2) perform a text-only installation of the standard Ubuntu desktop using the Alternate Install .iso here, then activate whatever drivers with which you are currently having success on 11.10, and proceed to essentially convert your new Ubuntu installation to Edubuntu with the very simple instructions here. The latter option would obviously take longer and be more of a hassle, though there are certainly positive things to be said about fresh installations as opposed to upgraded installations in most cases.


I finally managed to get it work after creating /etc/OpenCL/vendors/nvidia.icd file and libnvidia-opencl.so.1 inside. I also switched back to nvidia-current driver before but I'm sure it still would work with experimental ones.
I found a solution here.


aphotspot is working but my android device cant connect to the ssid

Turn off firewall with sudo ufw disable.


How to install FLTK library on ubuntu 14.04

For anyone looking for a way to make working this code on Stroustrup's book "Programming: Principles and Practice", appendix D, there is a little mistake in the header:

#include <FL/Fl.h>
#include <FL/Fl_Box.h>
#include <FL/Fl_Windows.h>

but in Ubuntu (or better said: in Linux) you should be very careful with your cases, so you should have

#include <FL/Fl.H>
#include <FL/Fl_Box.H>
#include <FL/Fl_Windows.H>

To check what is the EXACT name of a header, just look on /usr/include/FL/

To have an executable from this file (in this post, main.cpp), one just have to use

$ fltk-config --compile main.cpp

which generates the executable main

$ ./main

and a simple window will show.

By the way, on Kubuntu 14.04 I installed FLTK with

$ sudo apt install fltk1.3-dev

which is version 1.3.2 (new enough for my needs).


It looks like a GTK+ theming issue. The Ubuntu themes (viz. Ambiance and Radiance) sometimes exhibit glitches like this in a GNOME session (here's another issue).

As a workaround you may switch to another GTK+ theme, for example Adwaita, the GNOME default. To do that follow the steps below.

Open GNOME Tweak Tool (if it's not installed you may install it by running sudo apt-get install gnome-tweak-tool).
In the Appearance section select "Adwaita (default)" in the box next to GTK+.

You may try using other themes, gnome-look.org is a good source to find themes.


Is Samba read/write rate performance on Ubuntu 20.04 capped at around 11MB/s?

Turns out the network performance degradation wasn't caused by SAMBA.   It was a general network bandwidth issue on a particular server's ethernet interface, caused by a large IPv4 IPTABLES rules file.


I had this exact same problem earlier this month. Bootloops immediately after loading initrd on 2/3 of my blades, otherwise works fine. 16.04 loads fine.

I kid you not, my solution (after exhausting everything rational) was to tell maas to use the 18.04 hwe low latency kernel. This makes absolutely zero sense, but everything started working by the second deployment attempt.

It's very strange that such a problem

a) still exists with maas and the current LTS release

b) that the normal kernel works perfectly on 1/3 of my (as far as I know, identical) blades

c) that changing kernel type somehow fixes it.

It's interesting that you have an alternate solution. I wonder if the 18.04 low latency kernel selection alters the entire build such that the initrd is packed differently?


Resize windows by dragging around corner locaions?

In the standard Ubuntu Desktop, you achieve this by right clicking the window while you press down the "Window Action Key", which by default is the Super key. You will resize in any directions if you are close enough to a corner, otherwise you will resize the closest border you are pointing at.
You can change the window action key in Gnome Tweaks, Windows tab.


How to reset password Ubuntu from command prompt?

You can not reset a password without remembering your last password. You can however change your password if you do remember it by executing:

passwd


Mate, use gnome-screenshot instead of mate-screenshot

I resolved the same issue by adding the --interactive option

gnome-screenshot --interactive


From Xubuntu's QA Experimental PPA

As mentioned by DK Bose, xfwm4-4.13 is available in the Xubuntu Experimental Repository. This might not be the bleeding edge release but allows for an easier install

sudo add-apt-repository ppa:xubuntu-dev/experimental
sudo apt-get update

and install it

sudo apt-get install xfwm4

From Debian Experimental

xfwm4-4.13 is available in the Debian Experimental Repository and is always the bleeding edge version that is installable from debian experimental. Note that this release might be unstable and possibly unusable. And since ubuntu uses the same packaging system (apt) as debian, one can add that to their sources and it would work.

This is however not recommended as the precompiled packages present in experimental would cause conflicts with the current versions of the packages in the ubuntu repositories, hence it's best to use apt's build-from-source features to get only xfwm4 and it's dependencies

To do this, open up your /etc/apt/sources.list and add this line

deb-src http://httpredir.debian.org/debian/ experimental main contrib non-free

now on the terminal, run the following commands to add the keys necessary for apt to trust the repository

gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553 7638D0442B90D010 04EE7237B7D453EC
gpg -a --export 8B48AD6246925553 7638D0442B90D010 04EE7237B7D453EC| sudo apt-key add -

now run

sudo apt-get update

to build all the dependencies for xfwm4

sudo apt-get build-dep xfwm4

and then to install it

sudo apt-get source --compile xfwm4


shopt works in command line, not found when run in a script

To form an answer from the comments:

Many people out of habit run their scripts with sh instead of bash. This is a good practice if portability is a concern, but many people do so because they're copying something they've seen without understanding it.

Unless your script needs to run on a non-desktop Linux system (e.g., running shell scripts on Android devices is quite different), I recommend using the Bash shebang line at the beginning:

#!/bin/bash

This line, when it's the first line in the script, determines which interpreter (shell such as bash or sh, Python, etc.) is called to execute it. If you use the above line, you'll get the same behavior (almost) as you do from the command line, assuming you use the default shell. If for reasons of portability or preference you use a different shebang line, be aware that you'll have to consult the documentation for the shell you've referenced, even if the shell you reference is a symlink to Bash.


Is there a way to install softwares (offline) using some one else's apt-archives?

I will suggest you to use a software called QApt.
QApt is a great software for installing local deb files that ubuntu uses for its packages.
To install QApt click here
Also take a look here http://jontheechidna.wordpress.com/2010/07/05/introducing-qapt-and-the-muon-package-manager/


GNOME 3 privacy settings in Ubuntu 13.04

You can indeed change the privacy settings in Gnome3.
Firstly open system-settings click on Privacy and then click Screen Lock.

You can also change the settings using dconf-editor
Open dconf-editor and navigate through org-gnome-desktop-notifications.


Follow these steps to make the IP address of a system static:

Open interface file (sudo vi /etc/network/interfaces)
Look for

auto eth0
iface eth0 inet dhcp

Replace the above commands with

auto eth0
iface eth0 inet static
address 192.168.1.100(Enter desired ip here)
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

Then enter

sudo ifdown eth0; sudo ifup eth0


Resolver: LAN, VPN and WAN name resolution

I guess the reason why you can't use your LAN DNS when using the VPN is that the resolver only makes two attempts by default:

From resolv.conf manual:

  attempts:n
  sets the number of times the resolver will send a query to its name servers before giving up and returning an error to the calling application. The default is RES_DFLRETRY (currently 2, see ). The value for this option is silently capped to 5.

So its is trying the two DNS Servers provided by your companys VPN first and than returns an error. You could set attempts to 3 so your LAN DNS is also taken into consideration.

The downside to this is, that it slows down your DNS requests by waiting for the last server to finally answer. And you are sending all your DNS request to your company - thats an impact on performance and your privacy as well.

I would recommend to use dnsmasq.

You could add upstream DNS server by domain in a dnsmasq conf with an specified domain like this:

server=/lan/192.168.0.1

And by default dnsmasq polls upstream servers from the /etc/resolv.conf.

From the Notes section of the dnsmasq Manpage:

  ... By default, dnsmasq reads /etc/resolv.conf to discover the IP addresses of the upstream nameservers it should use, since the information is typically stored there. Unless --no-poll is used, dnsmasq checks the modification time of /etc/resolv.conf (or equivalent if --resolv-file is used) and re-reads it if it changes. This allows the DNS servers to be set dynamically by PPP or DHCP since both protocols provide the information. ...

So if your VPN Client change the resolv.conf you are able to use both if you could keep your dnsmasq on top of the resolv.conf.

But i guess this is not how the VPN is editing you resolv.conf so i would try to disable the DNS capabilities of the VPN and add the DNS Servers of your company manually to your dnsmasq config:

server=/myworkplace.com/192.168.1.10
server=/myworkplace.com/192.168.1.11
server=192.168.0.1

In this case all your queries for the internet and lan going to 192.168.0.1 and all queries for myworkplace.com are going to your companys DNS.


Have you tried the following?

resample-method = speex-float-1
enable-remixing = yes

enable-lfe-remixing = yes


I assume that the program tries to save something to a system directory or in a directory you don't have permissions to write.

You have two options:

Modify the program in order to save whatever it saves to your home directory where you have write permissions.
Run the program with elevated (root) privileges using: sudo python your_program.py you will have to provide root's password each time you run the program this way though.


Keep original timestamps of files downloaded with nautilus

As a workaround, wget does that by default. From the manpage(manual page):

   --timestamping
       Turn on time-stamping.

   --no-use-server-timestamps
       Don't set the local file's timestamp by the one on the server.

       By default, when a file is downloaded, it's timestamps are set to
       match those from the remote file. This allows the use of
       --timestamping on subsequent invocations of wget. However, it is
       sometimes useful to base the local file's timestamp on when it was
       actually downloaded; for that purpose, the
       --no-use-server-timestamps option has been provided.

For nautilus, you may want to submit a bug report (feature request): https://bugzilla.gnome.org/browse.cgi?product=nautilus


You can use the option --regex (-r) of locate:

locate -r '/log$'


Inserting a HDD from Windows 8.1 to Ubuntu 16.04 not accessing the Windows partition data

It is likely the system did not install the tools needed to use NTFS formatted disks since you had no Windows disk connected to it. It would have installed those tools if you had the disk connected to the system when you installed Ubuntu.

You can install NTFS support with

sudo apt-get install ntfs-3g

After that reconnect the drive and see if it shows content.


Looks like you lost execution permissions on your /var/www/html directory, at least for your current user.

On directories, the execution permission bit determines whether you have permission to stat its contents, i.e. to retrieve information about the files and subdirectories inside it.

Simply add the execution bit for everybody on that directory and it should be fine again:

sudo chmod +x /var/www/html


Can I have two internal disks - one ext4 and one ntsf?

The short answer, yes you can.

You can mount an NTFS drive in Linux, but you won't be able to mount the drive directly in windows since windows cannot recognize the ext4 file system.

See Mounting Windows Partitions, also The Ubuntu installation guide, and finally Install Ubuntu 13.04


xfreerdp remoteapps, mouse doesn't work correctly

Remove +smart-sizing from your command line.

It resizes the picture of remote desktop according to actual xfreerdp window size, so the position of cursor on the remote desktop may depend on some proportional ratio, hence the offset becomes visible.


Why Gsettings isn't enough to reset my nautilus settings?

Don't believe this is a bug, gsettings should enable/disable that option & you'd see the change immediately

You could try toggling it once with the set command, set to true, then back to false.

User gsettings are stored in 1 file - ~./config/dconf/user

Though you can't read that file easily, you could move or delete it, then do a log out/in & see


I think the problem is on the server side because I experience the same issue right now. If you want to know what exactly Ubuntu One is doing, then start a terminal and run the following command:

tail -f ~/.cache/ubuntuone/log/syncdaemon.log


Ubuntu 18.04 - Screen goes black when rotated to portrait mode

Solved updating to Ubuntu 18.10.

I can now pick-up the laptop, rotate it to portrait mode and the screen follows.


Security measures regarding specifically online shopping and banking

+1 for the question which affects many of us. I can only say the following:

Even with today's technology and security measures there will always be a way to bypass them, be them an easy task or a difficult nearly impossible one. At the end, they can be done (See in google stuff like wikileaks, information leak, etc..). With this in mind I will add that having an SSL connection (Secure Socket Layer, although I am guessing a TLS 1.x will be used) is very secured. Even more in Ubuntu (Or any other Linux Distro) since, not only are the standards applied but they even get updated faster and with any new security measures.

Add to this that you will be using a VPN will give you even more security.

Having that, plus a secured OS like Ubuntu (Very secured since you are going to load it from a Live USB, which is like a Paranoid Security Level PSL) gives you a HUGE security measure over the PC you would be using. Of course the only downside is the connection to the place you would be connecting and the connection to it.

You can have a very secured system, but if the connection to the other end is compromised, it lowers your security. It lowers even more if where you are connecting has already been compromised.

So from what I can read from your question, the only 2 things left to think about would be:

Am I connecting to a secure site?
Is the connection I am using secured (Like somebody capturing packets like crazy)
Do I have somebody behind me with a gun?

This are questions that can help you when having a more secured way of connecting. Now a good question to ask yourself is:

Do I need so much security just to check my bank account that holds 100$?
Am I Bruce Wayne that I need so much security?

I can give you an example of my father that uses Ubuntu + Firefox to connect to Bank of America and other 3 banks. He pays all bills, does transfers, payse credit card, etc.. This is like 3 years ago (Since he got Ubuntu ^^).


How to check network usage over past X minutes

OK, solution found by using rx_bytes and tx_bytes (received and transmitted bytes, can also use packets or check for dropped packets, see: http://xmodulo.com/measure-packets-per-second-throughput-high-speed-network-interface.html)

The script:

#!/bin/bash

R1=$(cat /sys/class/net/eth0/statistics/rx_bytes)
T1=$(cat /sys/class/net/eth0/statistics/tx_bytes)
sleep $test_time
R2=$(cat /sys/class/net/eth0/statistics/rx_bytes)
T2=$(cat /sys/class/net/eth0/statistics/tx_bytes)

tot=$(( (R2 + T2 - R1 - T1) / 1024 ))

echo $tot

Example of use (remember to throw in the amount of time in seconds):

test_time=10 ~/test.sh

This would check how many KB were sent/received over a 10 second period. Of course you can edit the script to include only R or T if you just want the sent or received value etc. This command will work from another .sh file or within the terminal, over SSH etc.


I can't boot after deleting the first ubuntu?

Without error messages or more detailed explanations of what happens, it is really hard to tell what the computer is doing. However, a possible cause of errors is that your boot loader (GRUB) cannot find the old version of Ubuntu and fails while it is trying to create the boot-up menu.

You can try to recover the system using various commands from a LiveCD, but if you don't want to deal with all that, a simpler solution is to just install the new one again. It gets you up and running with the least amount of fuss.


Problem installing Ubuntu 16.10 from USB Stick

Some of the error messages you get for installs really aren't that helpful.
Also, not every USB stick actually works as a bootable medium - it depends on the make you are using. FAT32 is what you need and 32 GB is plenty.

Did you try the Linux Live USB Creator? You can download it here to create a new bootable USB after reformatting the stick.

Your PC Configuration link wasn't visible.  What CPU is it in the machine? Sometimes you have to force the processor to use physical address extension (PAE) if it's very old (like the Pentium M 780 i'm using on this machine).

The other, possible easier, option is to burn a rewritable DVD with the .iso file for Ubuntu 16.10 using a burning utility (e.g. IMGBURN, xfburn) on a slow speed (4x). Then set the bios to boot off the DVD.


Does anyone know of a wireless N card that works out of the box?

This is an attempt to create a, more or less complete listing of wireless devices with information about the chipset they are based on and whether or not they are supported in Linux., there are places where you can find this kind of information :

Linux Wireless wiki
Linux wireless LAN support
* WifiDocs * WirelessCardsSupported


Is it possible to retrieve the mentioned drives?

The "drives" under sda1 are actually the EFI boot files in your EFI boot partition which allows you to boot Windows on your computer in UEFI mode. These files contain no data from a Windows installation so you would be unable to retrieve anything useful from them and since the normal Windows NTFS partitions were formatted you are unable to boot into Windows using those files either.


What are the GCC and clang versions available in Ubuntu 18.04?

Thanks to the commenters, I checked Ubuntu's package server:

Default compiler: GCC 7.4.0
Can install: GCC 4.8.5, GCC 5.5.0
Can install from the "universe" repositories: GCC 6.4.0, GCC 8 (version string 20180414, not quite sure what that means)
Can install: clang 6.0 (default version), clang 3.9.1, clang 4.0.1, clang 5.0.1

If you add the toolchain-r PPA, you can also install GCC 8.1.0.


Alias cd and ls with support for spaces and arguments

When you write $*, you've lost: this erases the distinction between spaces in an argument and spaces to separate arguments. Use "$@" instead, which expands to one word per argument.

function cd {
  builtin cd "$@" && ls
}


Grails is located in your home folder's .gvm/grails. Go to your home folder from intelliJ and right click it, you will have the option to show hidden folder's. There you will find .gvm/grails. You can point intelliJ to the current folder located there which is the symbolic link to whichever grails you make default using gvm or you can point to any grails version you like.

Hope this helps.


Well, The only way to use iTunes in Ubutnu is using Wine, but you will be alone if you try to use the USB capabilities since those patches are not included in the source and is highly likely that it would work either way. So, the most logical solution, look for a native media player that supports your iPod or use a virtual machine and install Windows + iTunes.


Resize the window control buttons (close, restore, maximize)

This is something which is managed by your theme. The reason for this is because themes use bitmap images which are not scaleable so for each button size a theme author must provide the images which are pre-scaled to that size. I'm not 100% sure but I believe this is something newer themes may be able to get around by using SVG images (but either way this setting will still be in the same place)

If you don't see an option to alter the button size in your theme 'Window Decorations' tab then it won't be available. The best way to get the button size you want is probably going to be to choose a theme you like.

Another alternative which you may or may not prefer is to adjust the DPI settings for your desktop. Unfortunately, you haven't mentioned the desktop you use so I can't really help anymore unless I wanted to list instruction for each desktop (which I don't). If you manage to find this setting though it'll allow you to effectively 'zoom' the entire screen. This will enlarge everything (not just the buttons). Personally, I like to do this because it makes everything nice and big yet the resolution stays high so it is still nice looking.


Ubuntu 14.04 bootable drive ignored during booting up (Eee PC 1000HG)

From practicalrambler:

  Tapping the Esc key upon booting is supposed to bring up a boot menu -
  but no luck.

  Turns out by default, it was configured to "quick boot". To change
  this:

  Turn off your Eee PC.
  Turn it back on, tap F2 immediately. This should get you into the BIOS Setup menu.
  Scroll over to the "Boot" tab.
  Select "Boot Settings Configuration".
  Use the minus key to change "Quick Boot" to Disabled.
  Press F10 to Save and Exit.

  Upon rebooting, hit Esc and you will be presented with a Boot Device
  selection menu.

  This method was tested on a 1000h, however I suspect these steps will
  also work for many older ASUS Eee PCs. "Quick Boot" may be listed as
  "Quiet Boot".


Why has wireless disappeared after my 12.10 upgrade?

Please hook up the ethernet temporarily and do:

sudo apt-get install --reinstall linux-headers-generic linux-headers-`uname -r`
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl

The backticks are on the left side of my US keyboard on the same key with ~. It it working now?


Autoconf in part of the basic functionality of IPv6.  RA announcements are not DHCP, and the RA server does not assign addresses. RA is much closer to the IPv4 auto-configuration done on the 169.254.0.0/16 IP range.  If privacy is enabled, your IPv6 address will change over time.  Your old address will be retired and eventually removed.

You can disable ipv6 autoconf easily with the command:

sudo sysctl -w net.ipv6.conf.all.autoconf=0

Substitute all with the interface name to disable one interface.  Replace autoconf with disable_ipv6 to disable IPv6.  Create a file in /etc/sysctl.d with the variable assignments you want to have the setting applied during startup.

To find all the ipv6 related settings run the command:

sudo sysctl -a | grep ipv6 | less


Function to find filenames containing a string

Nice function :) Assuming you want i to indicate a case-insensitive search, one way could be

contains() {
   find . -maxdepth 1 -iname "*$1*"
}

It's very important to quote * when passing to find, (as well as your $1 of course) to avoid it being expanded by the shell, which will cause the command to go very wrong if there are matching filenames in the current directory.


wayland is in Official Ubuntu Repository. You can install it by:

sudo apt-get install libwayland0

Also visit : Ubuntu Updates for Repository & PackageHead information.


On Ubuntu 18.04 I had to use from the terminal:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

To get to the Terminal I used the command key and then typed in "terminal" and hit enter. Hope this helps someone else caught with their mouse down.


How do I move the window menu to the window title bar in Ubuntu 18.04?

You can do that using (GNOME) Tweaks (previously known as (GNOME) Tweak Tool). First install it if it's not installed by running

sudo apt install gnome-tweaks

(or sudo apt install gnome-tweak-tool).

Then launch Tweaks, go to "Top Bar" section and toggle off the "Application Menu" option.


You can find some answser in the eCryptfs Ubuntu doc : you have to reconfigure the automatic mount of your data.

  strange directories with coded name

Is the actually encoded data.


I was having a similar issue in Ubuntu 12.04 with Thunderbird 12.0.1. At least in my case, the origin of the problem was two-fold:

the option "Default system sound for new mail" works only if sound effects are enabled in Ubuntu. If you want Thunderbird to play the default system sound from the Ubuntu theme, but do not want to enable the sound effects, just provide this path /usr/share/sounds/ubuntu/stereo/message.ogg in the option "Use the following sound file".
whenever you change the path to the sound file, it is crucial to restart Thunderbird, otherwise it plays no sound at all.

My suggestion is therefore to select the sound file manually and restart Thunderbird. If it still doesn't work, I think you should file a bug report in launchpad, see here how. This might be a possible duplicate of this very old bug.

Note that the "Choose sound" menu has an hard-coded filter for wav files. In order to select an ogg file you'll have to specify the location explicitly by clicking on the pencil icon and providing the sound file location.


You can download Ubuntu Touch 15.04 (Vivid Vervet) Daily Builds from here.


Are there ubuntu meetups being held to discuss and fix bugs?

Yes, community events to discuss Ubuntu, get installation/upgrade help, and generally collaborate are announced at the Ubuntu LoCo Events page.

In terms of focused development effort, that happens at platform sprints and the Ubuntu Developer Summit (UDS), which are announced at the Ubuntu Summit page. There isn't much installation troubleshooting happening there, though.


Screen Display in Ubuntu (with DisplayLink adapter)

These links might help you out.

Have a look here:
http://www.displaylink.com/downloads

Some info on open source drivers (Libdlo)
https://libdlo.freedesktop.org/wiki/

Good luck!


I think your best option is to use a different tool to identify small size differences. It's relatively easy to write a shell script to that extent:

#!/bin/bash
set -eu
dir1="${1%/}" dir2="${2%/}"
sizedifflimit="${3:-20}"
difftool="${4:-meld}"

find "$dir1" -type f -printf '%s\t%p\0' |
while read -rd '' size1 file1; do
    file="${file1:$((${#dir1}+1))}"
    file2="$dir2/$file"
    size2="$(stat -c '%s' -- "$file2")"
    sizediff=$(($size1 - $size2))
    if [ "$sizediff" -ne 0 -a "${sizediff#-}" -lt "$sizedifflimit" ]; then
        $difftool -- "$file1" "$file2"
    fi
done

Usage:

bash size-diff.sh DIR1 DIR2 [SIZE-LIMIT] [DIFF-TOOL]


Reboot failure after upgrade from Ubuntu 8.04 LTS to 10.04 LTS

I solved the problem: I switched monitor from VGA to DVI.


Finally got it to install correctly. I needed to mark all packages for complete removal from Synaptec, then remove the original PPA via Ubuntu Tweak, then reinstall the PPA using the instructions on the project page.

sudo add-apt-repository ppa:cardapio-team/unstable && sudo apt-get update && sudo apt-get install cardapio


You likely need flash player.

Open a terminal (control-alt-t), and type the following:

sudo apt-get install flashplugin-installer

Once it's done installing, exit the terminal and then restart your browser.

You may possibly need to enable multiverse for this to work, see this link for how: How do I enable the "multiverse" repository?


"Detected 1 CUDA capable device(s)" although there are 1x GTX 1080 and 1x GTX 1080ti installed

After updating nvidia driver from version 375 to 381 my second GPU is now detected.


Ubuntu Software Center - unable to see installed software

open your terminal with CTRL+ALT+T and type as

sudo apt-get install --reinstall software-center

hope that helps.


By pressing Alt + Grave.
*The Grave button is the button above TAB usually.


How to access remote desktop from a Windows PC to Ubuntu?

Well, there are several options to access Ubuntu GUI from a Windows machine...

Teamviewer is pretty good, secure and user-friendly but it takes HUGE amounts of RAM on the Windows Machine (never bothered to look on the linux part but I guess it's not much better).
VNC (real, tight, tiger...) is incredibly lightweight, fast and easy to use but, because of it's pretty weak security, it should only be used within well-secured LANs
X2go is, IMHO, a pretty good compromise and my personnal favorite (thought it does NOT work correctly with Unity, but LXDE, MATE or XFCE will work perfectly, please make sure you install one before you continue).
Note that the Windows client is 32bit and won't work on 64bit-only architecture (Itanium...) but that's kinda specific.

Here is a small Howto deal with the somewhat tricky installation of X2go for Ubuntu Trusty (14.04 LTS), based on my own experience (ymmv)

Before even starting, check your /etc/apt/sources.list file with your favorite text editor (sudo it, of course).
Make sure that, among the deb http://whatever.ubuntu.something/ubuntu trusty lines, at least ONE must end with main universe.
If you're not sure, or if no line seems to match and you freak at the idea of messing up , just add the following line:
deb http://de.archive.ubuntu.com/ubuntu/ trusty main universe
Save and sudo apt-get update

Now, let's start
First, make sure you can add the repository:
sudo apt-get install software-properties-common
(this should tell you last version is already installed but better be sure than sorry)
Now add the repository
sudo add-apt-repository ppa:x2go/stable
sudo apt-get update
Now, let's install X2go:
sudo apt-get install x2goserver x2goserver-xsession
If you have installed LXDE, you may add the x2golxdebindings package (there is also a x2gomatebindings for MATE, but not yet for XFCE, which is not a very big deal anyways).

The X2go Windows client installer can be downloaded here (there's also clients for Mac OS X if you need it):
http://wiki.x2go.org/doku.php/download:start

Configuring the client is easy: server address, username and session type (LXDE, XFCE or MATE ar recommended: others are note working proprely, as said before).
You will probably have to accept a SSH key on your first connection.

NOTE: upon connection your client may get an error stating stdin is not a valid TTY.
In that case, get on the server and sudo edit your root's .profile and locate a single line stating mesg n.
Delete that line and replace it with the following:
if 'tty -s'; then
  mesg n
  TTY="tty"
else
  TTY='not a tty'
fi
Save, exit and
sudo /etc/init.d/sshd restart
to apply changes.
Should work


Problems in creating wifi hotspot in ubuntu 16.04 for android device

To avoid the error "Your adapter does not support AP (master) mode" you should use another wi-fi card driver with AP mode support instead the default driver. How to do it ?

Detect the model of your wireless card:

lspci -nn

You should find a string like this:

09:00.0 Network controller [0280]: Broadcom Limited BCM4312 802.11b/g LP-PHY [14e4:4315] (rev 01)

Find the card manufacturer in this list:

https://wireless.wiki.kernel.org/en/users/drivers

and select the item with "yes" in the "AP" column. For example,  I've selected "b43" driver for my BCM4312 LP-PHY card:

https://wireless.wiki.kernel.org/en/users/drivers/b43

Find your card in this list by Device ID ([14e4:4315] e.g.)
If you see "yes" in the "Supported?" column, you can use this driver for your wi-fi card. Otherwise, you should look for another driver. If the suitable driver is absent, you cannot create wifi hotspot in Linux. :-(

The driver install method depends of your card model. If you'll say me the model, I'll try to help you.


Yes you can exexute complex scripts via ssh

#!/bin/bash -e

ssh_cmd="$(cat <<-EOF
    cd /var/www/test.com/backup;

    if [ \$(ls  | wc -l) -lt 3  ]; then
        echo "less"
    elif [ \$(ls -t *.tgz|awk 'NR >3'|xargs rm -f) ]; then
        echo "deleted"
    else
        echo "something else"
    fi
EOF
)"

ssh -t test@192.168.94.139 "$ssh_cmd"

This example uses a bash here document to generate the command string. In any case, passing scripts via ssh is error prone, because the quoting and escaping of variables is difficult (mind the backslash before the commands). If the script gets too complex, it is better to copy it via scp and then execute it on the target host.

I did not try to fix your script, but here is an example on how counting and deleting on a remote host could work:

#!/bin/bash -e

tmp_dir="$(mktemp -d)"

ssh_cmd="$(cat <<-EOF
    cd "$tmp_dir"

    cnt_tgz=(\$(find . -type f -name "*.tgz"))
    if [[ \${#cnt_tgz[@]} -lt 3 ]]; then
        echo "less"
    else
        rm "\${cnt_tgz[@]}"
        echo "deleted"
    fi
EOF
)"

touch "$tmp_dir/1.tgz"
ssh -t localhost "$ssh_cmd"
touch "$tmp_dir/2.tgz" "$tmp_dir/3.tgz"
ssh -t localhost "$ssh_cmd"

The ls -t *.tgz will not work, since the globbing is only happening on the local system. Also using ls for counting files is not a good idea, since it also returns entries like ., .. and directories.


debian package creation without a configure script

Edit your debian/rules to include an override of dh_auto_build and dh_auto_install:

#!/usr/bin/make -f

%:
    dh "$@"

override_dh_auto_build:
    cd $(CURDIR) && make

override_dh_auto_install:
    cd $(CURDIR) && make install
    cd $(CURDIR) && cp ./proj_bin debian/proj/usr/bin
    dh_install

It may requires some modifications but the basic idea is to call your Makefile from the debian/rules and install the binary in /usr/bin.

Note:

spaces before the cd and dh commands are tabs, don't replace them.
replace proj_bin by your binary name (I assumed only one)


Errors shown in terminal when editing files with gedit

First, you shouldn't use sudo with GUI programs. Use gksudo instead.

As for the warnings: they are harmless. They just say that gedit tries to save a file at a location that does not exist. If you want to make them go away, you got to create that location:

sudo mkdir -p /root/.local/share


Why I'm not able to install wine on x64?

It's almost the same problem reported in this question. There's a conflict in wine package dependencies. Try the following:

sudo apt-get install aptitude
sudo aptitude install wine gettext:i386-

This will skip the installation of conflicting package. For better explanation refer to my answer to that question.


Lmms missing vestige on ubuntu 20.04 lts

To use the Vestige plugin, you have to install via AppImage on Ubuntu 20.04.
Go to the LMMS downloads page and click the Linux 64 Bit LMMS 1.2.2 button.
That will download lmms-1.2.2-linux-x86_64.AppImage
In order to run it, you will first need to make it executable
chmod +x ./lmms-1.2.2-linux-x86_64.AppImage
from there you can run it with ./lmms-1.2.2-linux-x86_64.AppImage


A correct and up-to-date PGP public key must be installed to use the apt.postgresql.org repository. Based on the error messages, it looks like that is what is failing in your case.

https://wiki.postgresql.org/wiki/Apt has instructions on how to install it, essentially:

sudo apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update


Can't ssh into server, connection refused

I'm not sure about MobaXterm, but I know PuTTY stores known server SSH fingerprints in the registry, and some versions made it quite difficult to connect to a server if its fingerprint had changed (and weren't very verbose in their diagnostic output).

Could it be that the fingerprint for your server has changed and your terminal program is protecting you from bad things?


Allow mouse events to pass through terminal

Why this is not possible

What you ask, is essentially impossible. To make the explanation simple, there are two types of graphical desktops: stacking and tiling. Unity is an example of stacking desktop, where you have a stack of windows ( kind of like cafeteria tray stack ) , where the currently active window is the top one.

The mouse behavior has been defined in X11 such that clicking on a window brings it to the top of the stack. While there are ways to keep window below others (most notably with wmctrl), there is no way to click through  a window without raising it into focus. This is not up to tweaking unfortunately - unless you are willing to create some form of new layer for GUI yourself, and so far I've not heard of any such project.

If you request so, I can even place bounty on this question, but I can bet there will be no answer which satisfies your exact requirements.

Somewhat of a workaround

One can do this: set transparent terminal window to minimum size, set it as "always on top" and click on *anything around the window itself.

In this screenshot you can see two approaches to this : one via default right click on window border and via wmctrl command. The last one can allow for scripting approach to this , but the basic premise is the same - you have to click on anything around teminal itself.

Possible alternatives

There are drop down terminals such as Guake. You can have a drop down terminal linked to F12 key, with window that retains position on top, and you can click on anything around it
Use split screen with terminal and the desired other window linked together

Guake example


Found a solution. Running:

sync && sudo sysctl -w vm.drop_caches=3 && sudo sysctl -w vm.drop_caches=2

would clean the cache, and the system will be able to hibernate a second time after a re-boot.

I don't now what or why something was accumulating in memory. It should be a stack system, where new entries drag out entries not needed anymore.

Wilf's tips are still valid for a system using the swap space when running. I am using it only for hibernating That means, I had 2 GB, but were only using 1 GB. Had I a need of 3 GB for example, I wouldn't be able to hibernate my 2GB RAM computer using a 2GB swap partition.


gnome applications wont start in Fluxbox desktop in Ubuntu 13.10

I could get gnome applications to start again by adding /usr/lib/x86_64-linux-gnu where the
libatk-bridge-2.0.so.0.0.0 was to my LD_LIBRARY_PATH.
That fixed the error I was seeing and allowed me to launch gnome applications in Fluxbox.

export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"


Connecting Dell 1660w printer to wifi in Ubuntu14.04

Posting for posterity's sake. I was able to print to my Dell 1660w (which is networked) by installing the following package:

sudo apt-get install libcupsimage2:i386

Downloaded the DEB driver for the Xerox Phaser 6000B: http://www.support.xerox.com/support/phaser-6000/downloads/engb.html?operatingSystem=linux

Installed the Dell 1660W using the above driver by specifying Phaser 6000B in CUPS. It worked!

Side note: I attempted to use dcoffin's HBPL driver (http://cybercom.net/~dcoffin/hbpl/) but had no success. Was able to compile, install, and specify the printer driver in CUPS but all print jobs would report completed immediately with nothing actually printing.


How can I use the grep command to extract line which is the next line of greping line?

You can use grep -A1 'expression'

From the manual:

-A num
--after-context=num
    Print num lines of trailing context after matching lines.

In your case:

grep -A1 "!        lat" foo | grep -v "!        lat"

should work to extract the second line only.

Note:
You can use grep -P '^! {8}lat' instead of typing many . This is less error prone. The -P flag enables perl style regular expressions and {8} (There is a space before the '{') matches exactly 8 spaces.


How do I run WarCraft Frozen Throne (DOTA)?

Try forcing OpenGl mode in the game when you start it.

For a quick test you can just open a terminal (Ctrl+Alt+t) and type this to start the game forcing OpenGl

wine ~/.wine/drive_c/Program\ Files/Warcraft\ III/Frozen\ Throne.exe -opengl

If it works, drop a comment so we can find a more permanent solution


I think you might find some information you're looking for here:

www.ubuntugeek.com/boot-up-manager-bum-graphical-runlevel-editor.html

And here:

www.marzocca.net/linux/bum.html

In brief, Boot-Up Manager might serve the purpose well, and it can be installed in this way:

apt-get install bum


On a linux system what is the purpose of the .profile file

The profile file is dotfile (filename starts with a period, so the command ls will not show it by default) that the shell being used looks for and executes when the user logs in and starts the shell session. The file will contain the users customisations for the shell, such as their shell prompt and any aliases they have made. It is usally located at ~/.profile (specifically ~/.bash_profile for bash) however modern shells usually have more advanced configuration options and often have plugin managers (fsh and zsh are notable examples)
Thats all I know about it hope it helps


The specific feature you asked about is not availaale, but here are a couple of alternatives:

When nautilus is open at the relevant directory, just start typing the first few letters of the file name. This will highlight the file.
Using the following tools you can use the clipboard and skip the typing, as follows:
Install these: sudo apt-get install nautilus-scripts-manager xdotool xsel
Then create the following nautilus-script in the nautilus-scripts-manager directory.

#!/bin/bash
 xdotool type $(xsel -o -b; sleep .3)

Next, assign a short-cut key to run the script.
It is very practical to use a short-cut key which is local to nautilus. You can do this via a combination of nautilus-scripts-manager's sub-menu item for this script (under nautilus' File menu), and a gnome short-cut key manager tool, which is described in this link: "Editable Menu Accelerators" (on a per app basis).

Set up a short-cut key, eg. Ctrl-Shift-S, and then just copy the filename to the clipboard. amd run the script via the short-cut key. This will "type" the text in the clipbooard, as though you typed it, and the nautilus auto-search feature will pinpoint the file and highlight it.

More: You could modify the script to strip out the filename from the downoad link... This means that you could sometimes(often?) just copy the download link to the clipboard.


I cannot download from Ubuntu Software and failed to fix child error

The most likely reason that you can't install tinc VPN from the software center is that you don't have the Universe Repository enabled After enabling it you should be able to install tinc normally as it's freely available for your version of Ubuntu in the Universe repository. A quick glance at your commands and output indicates that you've misunderstood the instructions. For example sudo chown username:username /var/snap/tinc-vpn/tinc -R in this context username means your username so in your case the command would be sudo chown graeme:graeme /var/snap/tinc-vpn/tinc -R based upon your output and prompt. As far as the error creating child process for the terminal you may find this answer useful. You may also wish to go over the instructions again as shown below:


determine the total number of the user's input

Save the inputs in an array by using -a option of read and then count the number of elements of the array:

$ read -a year
2015 2016 2010

$ echo "${#year[@]}"
3

$ read -a year
2010 2019

$ echo "${#year[@]}"
2

Or use wc -w, no need for array:

$ read year
2013 2015 2017

$ wc -w <<<"$year"
3

Or you can set the positional parameters using set and then have a count:

$ read year
2015 2016 2017 2018

$ set -- $year

$ echo "$#"
4

To save it in a variable:

var="${#year[@]}"  ## For array

var="$(wc -w <<<"$year")"  ## For "wc -w"

var="$#"  ## For "set"


How to set "Notify me of a new Ubuntu version" on command line

Here is how you can do it from command line.

sudo sed -i 's/=lts/=never/g' /etc/update-manager/release-upgrades


Installing problems with Dell Vostro 3460

I "solved" the problem running the Ubuntu as live CD (using a pen drive) and uninstalling the RAID (I really don't remender the specific command that I used). After that I was able to install Ubuntu, but every boot was showing a Intel blue screen asking to solve RAID issues (to make all drives as no RAID, ok I did that, no RAID, you won...). After  that a got ubuntu installed and no RAID at all.

I am wondering right now that am not using the 32GB cache and geting low performace... Dell was supposed to be Ubuntu certificated, but not for my new Vostro =(


Install Unity Tweak Tool by running the following in a terminal:

sudo apt-get install unity-tweak-tool

Start Unity Tweak Tool via Dash or run unity-tweak-tool in a terminal.
In the Window Manager section, press the General icon.

In the Animations section, set Window Animations to off.


How to configure plank(dock) on Lubuntu 18.04.1 LTS

Found the solution. You just have to right-click at the edge of the dock(at the very end of it) and the options will pop up. Hope this helps someone out there.


Dimming the backlight is irreversible on a Samsung Q210 notebook, what do I do?

A very similar issue happened with a Toshiba I was working on. After updating Ubuntu it was solved. Just update your Ubuntu with th latest packages and you should be find. The kernel right now for 11.10 is 3.0.0-18


type this in terminal.

sudo apt-get install psensor


How to display WIFI setup menu from command line

You can open it using /usr/bin/nm-connection-editor


My my system is HP 240 G3 notebook
I updated my Windows from 8. 1 to 10 induction I am not getting about bios and uefi
Ubuntu version is 18. 04. 1


Ubuntu Persistent Installed on USB looses Grub on reboot

In UEFI mode, the installer will install the bootloader into the internal drive, whatever you specify.

I suggest this way to avoid that: remove (or disconnect) the internal drive before you start installing. Then the system will regard the target drive (the USB pendrive) as the 'internal' drive and install the bootloader (the EFI partition with its files) where you want it.

After the installation you shutdown and insert (connect) the internal drive again.

Otherwise you can identify and copy the relevant files from the internal drive to an EFI partition in the USB pendrive, but it is more difficult.

See also this link and links from it,

askubuntu.com/questions/912254/bootable-ubuntu-usb-with-custom-kernel/912280#912280


Are nvidea-cuda SDK binaries in ubuntu repositories up to date?

Up to date or not?

This usually is checked in a simple manner:

check package version
compare version with what's on producer/vendor site

Checking package version

3 options:
1. apt-cache policy nvidia-cuda-toolkit
2. apt-cache madison nvidia-cuda-toolkit
3. apt list nvidia-cuda-toolkit

Nvidia

I found two great links which are too lengthy to be copied here verbatim:

https://gist.github.com/wangruohui/df039f0dc434d6486f5d4d098aa52d07
https://gist.github.com/zhanwenchen/e520767a409325d9961072f666815bb8

But they detail the installation procedure in a very nice manner and with lots of explanation.

Quoting just the relevant parts:

  As of 04/11/2018, the latest version of NVIDIA driver for Ubuntu 16.04.4 LTS is 384

  Install CUDA 9.0 [...] CUDA runfile installer can be downloaded from NVIDIA's websie,

  Download the "cuDNN v7.0.5 Library for Linux" tgz file (need to register for an Nvidia account).

So, binaries from Ubuntu repositories are used only for the driver.


why my rule in udev/rules.d does not set the mode and group

Three yrs later but still...

You are trying to use a hot-swap capable NTFS-drive (USB) with specific rwx privilege. For that I believe, you should set a udev rule so that it actually mounts yr volume with said permissions.

The rule:

SUBSYSTEMS=="usb",ATTRS{idVendor}=="0x15ba",ATTRS{idProduct}=="0x002a",ACTION=="add",RUN+="/bin/mkdir -p /media/arm_usbtiny", RUN+="/bin/mount -o relatime,utf8,gid=7,umask=0002 /dev/%k /media/arm_usbtiny"

Here yr drive gets mounted at /media/arm_usbtiny. Change that to whatever you like.
Determine what numeric gid goes for your lp group. On my Ubuntu 14.04 boxes, it is 7by default. It may be different on a different release. To check that in terminal (CTRL-ALT+T):

$ awk -F\: '/lp/ {print "Group " $1 " has gid=" $3}' /etc/group

In the udev rule, umask=0002 is equivalent to MODE=0664


the command you are looking for is :

sudo apt purge postgresql-client-common

purge is different from remove as it will also remove the dependencies that only this app uses.


It isn't affected by that since the launcher is hidden. However, on a narrow screen (screen is tilted, so it becomes 1080x1920) it becomes needlessly long, just as it would be if it were flat in a wide screen setup.

But there are many other reasons to use Unity in any case. The keyboard support is awesome, for instance. So the answer to your question is that Unity is very useful on any screen that is at least 800x800. Smaller than that would be more difficult, I think, but that has more to do with Gnome than Unity.

You can add other panels and stuff if you like to, by the way. For instance, if you want a taskbar like Gnome 2 and Windows XP, then you can install http://apt.ubuntu.com/p/xfce4-panel. Afterwards, press alt+f2 and run xfce4-panel to start it. Obviously, if you wanted to use it, then you'd add it to startup applications. The point is that you can combine Unity with other things, like awn or ...


Minecraft crashes when creating a new game

This is a known bug with minecraft+ATI fglrx drivers, nothing you can do about it will solve this combination, not even Oracle's JRE, its not a Openjdk problem.

You have 2 options:

Remove fglrx drivers and try to run with standard ones
Install Wine, install Oracle's Windows Java-jre on your wine bottle and run minecraft with it wine java.exe -Xms256M -Xmx256M -jar /opt/minecraft/Minecraft.jar

Recommend the 2nd one, gl.


Ubuntu prevent automatic workspace switching

What you're trying to do is impossible without downloading the source and programming it in yourself.

See:

gsettings list-recursively | grep-red --ignore-case "switch" | grep-blue --ignore-case workspace
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Control><Alt>Down']
org.gnome.desktop.wm.keybindings switch-to-workspace-1 ['<Super>Home']
org.gnome.desktop.wm.keybindings switch-to-workspace-2 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-3 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-4 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-7 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-5 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-8 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-9 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-6 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-10 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-11 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-12 ['disabled']
org.gnome.desktop.wm.keybindings switch-to-workspace-left ['<Control><Alt>Left']
org.gnome.desktop.wm.keybindings switch-to-workspace-last ['<Super>End']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Control><Alt>Up']
org.gnome.desktop.wm.keybindings switch-to-workspace-right ['<Control><Alt>Right']

No setting to change that behaviour...


Rootkit on port 60001 !? Tiger says so - how do I verify?

Whenever you want to see what process is holding a port open, use the lsof command. For a tcp port use lsof -i tcp:80 and for a udp port use lsof -i udp:53. The info will provide all the info you require as to process name, pid, and ownership. For example:

cyberfarer@Quadraphenia:~$ sudo lsof -i tcp:80
[sudo] password for cyberfarer:
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
apache2 2723     root    3u  IPv4  16241      0t0  TCP *:http (LISTEN)
apache2 2751 www-data    3u  IPv4  16241      0t0  TCP *:http (LISTEN)
apache2 2752 www-data    3u  IPv4  16241      0t0  TCP *:http (LISTEN)
apache2 2753 www-data    3u  IPv4  16241      0t0  TCP *:http (LISTEN)
apache2 2754 www-data    3u  IPv4  16241      0t0  TCP *:http (LISTEN)
apache2 2755 www-data    3u  IPv4  16241      0t0  TCP *:http (LISTEN)

Fast, easy, and without needless scrolling and deciphering.


Which free 2D game engine for Ubuntu is the best choice for me?

A good choice is PyGame, which you can use to write games in Python.

To get started, you can use Quickly:

Have a look at the getting started page in the Ubuntu App Developer site for a 5 minute quickstart
Use the PyGame template by running this command on a terminal: quickly create ubuntu-pygame my-game (where my-game is the name of the game you want to create)
Learn more from using PyGame on this session from the last Ubuntu App Developer Week.


You should choose something else.

The along side option, creates space from C: drive and install it there. If you try to do so now, it will take space from 64gb partition. Not the 15GB.

After choosing something else, do the following,

In the window, identify the 15gb partition. it should be marked as sda2
Select it in the list, click on Delete.
Then, click on New, select file system as SWAP from the dropdown list, (partition type logical or primary doesn't matter as 4 primary partition can be there)  give size around 1GB/2GB as swap space. If you have 1GB ram, I suggest 2GB as swap space. Click OK
Now, click on the remaining space (13GB), select file system as  ext4 , mounting point / (root symbol). Click ok
Make sure booloader location is pointing to your correct disk sda
Now proceed with installation.

Good luck.


Combine 2 commands into 1 Custom command?

Usually alias is used to make a short custom command for one or more long commands. See How to create a permanent "alias"?

You can combine two command as,

command1 && command2

Then command2 will be issued if command1 is successfully executed. So make an alias like,

alias ServerStart='cd /path/to/.Server && java -Xmx7168M -Xms7168M -jar server.jar'

Source ~/.bashrc as . ~/.bashrc. After that the command ServerStart will issue both the commands together for you.


Problems installing unetbootin on ubuntu 16.04

if you just want burn image easy to USB drive.

You can use etcher as alternative unetbootin

i like this for simple UI


19.10 is EOL since July 2020. See here for all releases and their end dates.
You should get yourself a LTS version - which will be supported for a longer period of time.
Ubuntu 20.04 will be supported until 2025, its EOL even later


Touchpad doesn't work after upgrade to 11.10

After I installed UBUNTU 11.10 shortcut key for “disable touchpad” didn’t worked. It’s big problem because when I am typing, always touching to touchpad ! After a huge research I found this:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

After installation, open the indicator from Applications -> Accessories -> Touch pad Indicator and set your touch pad in top-right

This helped enable the touch pad


using cifs and cannot paste to folder or change ownership

3 possibilities:

[1] The server changed the share definition of [arduinoIDE] to allow  read only access to the username / password you are sending.

[2] The server changed the permissions of whatever directory the [arduinoIDE] share points to allowing only read access to username / password.

[3] This one depends of what OS is running on the server but if it is Linux try this as your mount command:

sudo mount -t cifs -o username=xxxxxx,password=xxxxxx,uid=morbius,nounix //192.168.10.10/arduinoIDE /media/arduinoIDE

Change morbius to your Linux local login user name.


I had the same issue as you after installing chrome on Ubuntu 16.04 and enabling GPU rasterization in chrome://flags fixed it for me. Hope this helps


Is it possible to have two different resolutions in two different windows?

No. That is not possible. You can only have one resolution per monitor.
But putting each window on a different monitor with a different resultion is possible.


They've undoubtedly banned it because somebody on the other end of it was spamming or performing other undesirable behaviour. You've got two choices:

Get a new IP. If you're on a dynamic allocation (which you probably are) rebooting the router might get you a fresh one.
Talk to the Forums Community Council, explain the situation and request they unblock the IP.

We're not the same people here so can't help you directly.


Ubuntu 16.04 - Couldn't find any package by glob and regex [VPS]

Finally got it working with the following command:

dpkg -i openvpn-as-2.1.4b-Ubuntu16.amd_64.deb


Note! This answer is outdated since at least ubuntu 14.04. See other answers for current situation and if they prove correct then upvote them furiously. Also post comment so I can put link here to current correct answer.

For 14.04 see https://askubuntu.com/a/759048/1366

For 16.10 see https://askubuntu.com/a/857154/453746

Old answer from 2011:

The cleaning of /tmp is done by the upstart script /etc/init/mounted-tmp.conf. The script is run by upstart everytime /tmp is mounted. Practically that means at every boot.

The script does roughly the following: if a file in /tmp is older than $TMPTIME days it will be deleted.

The default value of $TMPTIME is 0, which means every file and directory in /tmp gets deleted. $TMPTIME is an environment variable defined in /etc/default/rcS.


There is a PPA for natty though this article warns that it's a development release, may cause problems, etc. so there is some risk at this point.  If you go for it I'd like to hear your results.


Ubuntu LTS performance is good but sometimes slow

Usually when the update program is running it will download all the new sources and process them which takes a bit of processing power to do, and then if you click update it will run through each one and install them...  It's only natural that things may slow down during this process...


I believe the command you are looking for is gnome-session-quit --power-off:

This is the same dialog as in 11.04, but it has been redesigned.


Answering debconf questions from a custom GUI in Python? (Custom Front-end)

It seems that the debconf-set-selections command from the debconf-utils package is suitable for this.

The format is simple: debconf-set-selections [filename]

If filename is not provided, then it takes its input from stdin. The format for the answer lines themselves are also simple: < packagename> < question_name> < datatype> < value>.

So, if you wanted to install the mysql-server using a predetermined password, then you'd create a file such as this one (mysql-prefs.seed)

mysql-server-5.5    mysql-server/root_password          password    my_root_password
mysql-server-5.5    mysql-server/root_password_again    password    my_root_password

Then you insert these answers into the debconf database by running debconf-set-selections mysql-prefs.seed. Finally, you just install the package as normal: sudo apt-get install mysql-server -yq and the MySQL root user's password will now be "my_root_password".

I don't know if this is the best way to do it, but it certainly works and it's easy enough.


Windows 7 reboots without warning after installing Ubuntu

This most likely is caused by the different versions of firmware Ubuntu and Windows are using for some devices.

Some devices (touchpads, tv-tuners, wifi adapters etc.) require certain firmware to be uploaded into them before they can be used. This is usually done by the device driver. The firmware is stored in the device's own memory and can survive a "warm" reboot. On boot, the driver checks if the firmware is already present and does not re-upload it - so, if you reboot into Windows after Ubuntu, and vice-versa, the system may mistakingly attempt to use a wrong firmware version, which causes all sorts of problems.

I mean, a hard-reboot is maybe a bit too extereme, Windows should've handled this more gracefully :)

There are 2 solutions I know about:

a cold restart (maybe even waiting for a few minutes after shutting the system down, disconnect the battery if it's a laptop)
do not boot into Windows. Who needs it anyway?

I use the second option.


Nope. This is as is...

You get the 'file' etc only when you have the desktop active. Otherwise this part of the panel is used by the currently active item (browser-> title, USC->usc options etc etc).


I got the solution...
At the place where it says "Downloading language packages", there is a arrow to the left of message.

By clicking on array, there appears a small window at bottom and a bottom at right most side at the level of "Downloading language packages" that says "Skip", by pressing that button one can skip that step.

I cant paste a screen shot,as system is installing Ubuntu.


Install JUnit with Oracle Java 7 already instaled

As Oracle JDK is not availabe in the default repositories, it is not listed in the dependencies or jUnit. So to "install" it you have to download the .jar's and place them where Oracle JRE could find them.

Supposing you installed JRE on /usr/local/java the correct place should be /usr/local/java/jdk<version>/jre/lib. So a command like this should suffice:

sudo cp /path/to/junit_jars/*.jar /usr/local/java/jdk<version>/jre/lib

And for Junit you have to just include the jar into your program classpath. You can download the jar from here.


There are a large number of log files (/var/log/xxx) written to the disk that you may never or infrequently access so from that point of view I believe your theory is correct.

I'm about to change the configuration from write-through to read-only to see if that helps load enhanceio earlier in the boot process when initramfs loads the file system as read-only.

If anything is discovered more info will be posted.


Ethernet not working on a Dell Inspiron 14z

In my case (Ubuntu 12.10 with Inspiron 14z), just installing the linux-backports-modules-cw-3.6-quantal-generic package solved the problem.  Here's the magic command:

sudo apt-get install linux-backports-modules-cw-3.6-quantal-generic

p.s.:  This seems to be a duplicate of:  12.04 does not detect eth0(Atheros AR8162 )


To answer the question directly. Yes, you may set a separate partition and install to that particular partition another OS. This will directly effect the MBR. You will need to upgrade the bootloader.ie:GRUB

The other option is to install the Kubuntu-Desktop package in the current Ubuntu OS then log out and select Kubuntu. log back in to a fresh new experience.

To do this using the terminal sudo apt-get install kubuntu-desktop or use the software center


Use the command :

vlc --version

Most of the programs (i have used) provide their version by the --version option.

Also you should check the man page of the commands to get details idea about them.

EDIT :

There are many ways to check where a binary file is stored, vlc in this case :

type -a vlc
command -v vlc
which vlc


First, backup all your data on both the Windows and Ubuntu partitions.
Second, install gparted if you don't have it installed already. Third, use gparted to resize your Ubuntu partition.

gparted is a powerful program. You can delete partitions, resize partitions, reformat partitions, and wipe your data beyond all hope of recovery.


How can I exclude all subdirectories but include files of a directory in rsync?

Try this command:
rsync -a -f"- */" -f"+ *" /home/user/ destination/

man rsync
-f, --filter=RULE           add a file-filtering RULE

The rule to include all files* and exclude the dirs */
Another approach to use the regular copy cp
cp /home/usr/* /destination

you can get rid of the errors about dirs using redirection
cp /home/usr/* /destination 2>/dev/null

This will only copies the files inside your home without the directories


GUI program to record internet radio with songs tags (title, artist, etc.)?

You can use StreamTuner2 with [Streamripper (https://apps.ubuntu.com/cat/applications/streamripper/) (Install streamripper) to record Online Radio Streams.

To Grap Streamripper in terminal just do this:

sudo apt-get install streamripper

Streamripper and streamtuner2 are Linux applications that work in tandem, allowing you to listen and record streaming radio.

Streamtuner2 is a basic application used primarily for playing internet radio from any number of sources including Xiph, basic.ch, punkcast.com, Google Stations, Live365, and SHOUTcast. It will use streamripper to record and an external player to play a stream.

Streamtuner2 can add favourite stations to bookmarks. New stations can be added by selecting some station, right-click, Edit, 'New', and, after setting a new name and URL, OK and then Reload button.

Clicking the play button after selecting a station will start the radio station in external player. The same happens when double-clicking a station in a list.

Clicking the record button after selecting a station will run streamripper in a terminal window and by default each track will be saved separately in the Home folder.

To set custom folder for recordings in Streamtuner2, under 'Edit-Properties-Recording application', edit the line under 'Application' by adding -d path_to_folder at the end (like x-terminal-emulator -e streamripper %srv -d /home/user/Audio/Recordings). There can be added many other custom commands that streamripper allows - see below on more options.

Search function doesn’t work as it should.

To save in a custom folder by using just streamripper in a terminal (CLI, without Streamtuner), open the terminal in that folder.

Multiple instances of streamripper (that is recording of multiple tracks) can be run at the same time in separate terminal windows.

On more options in Streamripper there are  Ubuntu Guide, Reference,Tutorial, Ubuntu Man Page, My Ubuntu Blogspot.

Streamripper sits stealthily in the terminal recording and parsing all of the music piped through your system into MP3s. Leaving Streamripper running all day will rack you up a healthy dose of your favorite tunes. By itself streamripper is able to record streams with the command:

$ streamripper <URL>

What is particularly nice about the combination of Streamripper and streamtuner2 is that once you choose a station to record, you can exit streamtuner2 leaving only a tiny, non-obtrusive terminal window for Streamripper.


I think there's a typo in that instruction. It should be: /usr/include/pcap/bpf.h and not /usr/include/pcap-bpf.h since there's bpf.h file provided by the pcap library. So you need to install the library first:

sudo apt-get install libpcap0.8-dev

and then do:

ln -s /usr/include/pcap/bpf.h /usr/include/net/bpf.h


Specifications and Standards

The KDE (*1) is using Freedesktop specifications: https://www.freedesktop.org/wiki/Specifications/ . In this case - Desktop Trash Can Specification: https://www.freedesktop.org/wiki/Specifications/trash-spec/

By the 'Trash directories' (short):

A system can have one or more trash directories.
An administrator can create an $topdir/.Trash directory.
If an $topdir/.Trash directory is absent, an $topdir/.Trash-$uid directory is to be used as the user's trash directory for this device/partition. $uid is the user's numeric identifier.
When trashing a file, if this directory does not exist for the current user, the implementation MUST immediately create it, without any warnings or delays for the user.
If both (1) and (2) fail (that is, no $topdir/.Trash directory exists, and an attempt to create $topdir/.Trash-$uid fails), the implementation MUST either trash the file into the user's “home trash” or refuse to trash it.

At here, with the Dolphin file manager, 'trashing' the 'TrashTest.txt' file:

The /.Trash-$uid is created.

Does your user and the KDE session have the right to create the needed /.Trash-$uid ?

*1) There is no KDE5. There are KDE Frameworks 5 (KF5), Plasma 5 and the KDE Applications. The KF5 and the plasma version can be looked from the KInfocenter: https://www.kde.org/applications/system/kinfocenter/ . The KDE Applications version can be looked from the application help page.


How to expand a drive partition using unallocated space?

You are not able to do it because your extended partition table starts in the middle of the disk and there is no more room in your extended partition table.

No standard tool allows you to do what you want to do. But it is possible.

It is very difficult to give you exact commands for two reasons:

There is not enough information at the moment.
It is a risky process, it can go wrong - loosing all data.

But I can give you an idea how you can solve it.

BACKUP FIRST!

First you need to save your partition schema:

sudo fdisk /dev/sda

use command p in fdisk to print partition table.
Copy-paste it and keep it safe. You WILL NEED IT! And SAFE means better save it USB stick or some other external storage and not to the disk you are about to modify. You can print it too.

Next, you need to create new partition table, that is o command in fdisk. You will end up with empty partition table - everything is gone! That is normal and no need to worry about it. Everything will keep working as long as you stay in fdisk.

Next you create new extended partition table, that is n (like new) and e (like extended) commands. You can choose any number you want (1-4) or you can look up what sda+number you had previously - that is entry in partition table with type Extended. It should not matter but to be sure, use the same number.

Now you have extended partition table across your whole disk. But still no partitions.

Next you re-create sda5-sda7 partitions. It THAT ORDER!

Choose n (like new) and l (like logical).
Enter sda5 Start from your saved info as value to First sector
Enter sda5 End from your saved info as value to Last sector

If you get message like this location has file system marker and do you want to clear it then answer NO! Or you will loose your filesystem. DO NOT CLEAR! This is very important.

Repeat the same steps again. Next one will be for sda6 and then sda7.

If one of your partitions had Boot flag - that is (*) in Boot column in saved fdisk info, then add that back. a command will do that.

You can use p command again to verify that sda5-sda7 look EXACTLY the same as in saved info. If not, go make corrections. As long as you are in fdisk and have not saved anything you can start again by making empty partition table with o command.

If you need to change type then that is done with t command. Default is 83 Linux and that is ok for most linux data partitions, except swap should be 82 Linux swap.

If everything looks ok and ALL START/END/SIZE NUMBERS MATCH EXACTLY, only then you can use w command to write it to disk.

If everything went well, you have extended you extended partition table. Try to reboot and if everything starts ok, you have not broken anything.

Even after that you still have the same situation like before - with the exeption that now you can move/resize sda7.

Open gparted or any other GUI partition tool of your choice and move sda7 to start of the disk and then resize it to use all available space. But that again is a process that has possibility to go wrong. So BACKUP first!

And again. This is very risky operation, specially if you are unsure what you are doing and why. Just a little mistake, like a typo when entering numbers can cause you to loose access to partitions or even worse, loose data!

Another important note!

You can only resize partition if free space right AFTER the partition on the disk. So after all that you need to move your partitions around so all free space is right after the partition you want to resize. I assumed that sda7 is the first partition on your disk (that means start sector is the smallest number). If not, you have to move every partition.

So yes, it can be done. But it is difficult and there is a high chance that a small mistake can cost you all your data.

If you do not feel ok with this procedure - do not do it!


From the information you provided based on terdons questions I conclude the following problem:

You expected the default gateway to be 192.168.70.1 when it actually is available at 192.168.70.2.

To fix this, try the following configuration for /etc/network/interfaces:

# The primary network interface
auto ens33
iface ens33 inet static
address 192.168.70.10
netmask 255.255.255.0
gateway 192.168.70.2
dns-nameservers 192.168.70.2

Note: You could still use google's DNS IPs for the values in dns-nameservers. If you want to do so, use the following configuration:

# The primary network interface
auto ens33
iface ens33 inet static
address 192.168.70.10
netmask 255.255.255.0
gateway 192.168.70.2
dns-nameservers 8.8.8.8 8.8.4.4


mdadm.conf file needed? How to create and where?

The little I know it appears that Ubuntu is different when it comes to where the mdadm file is placed. I have also seen the /etc/ location suggested in Linux Foundation documentations but when running on Ubuntu I discovered that it has it's own stored in the location /etc/mdadm subfolder.

So I would suggest you use that location and seen in this document, where Ubuntu location is different. The command would be

sudo mdadm --detail --scan --verbose | sudo tee -a /etc/mdadm/mdadm.conf


Unmet dependencies. Libc6 The package system is broken

I had similar issue on freshly installed Ubuntu 20.04.2 desktop 64bit, the difference is that libc6 ...9.3 was installed but my packages (g++ build-essential etc) could not be installed beceause libc6-dev could not be installed because it required libc6 ...9.2 which was older then the one installed
 libc6-dev : Depends: libc6 (= 2.31-0ubuntu9.2) but 2.31-0ubuntu9.3 is to be installed

So I just downgraded libc6 (and libc-bin too, because it seems very related to me) to version 2.31-0ubuntu9.2 this way:
sudo apt install libc6=2.31-0ubuntu9.2 libc-bin=2.31-0ubuntu9.2

Now my packages could install :) so it seems to work, let's see if we don't have much problems - but I guess not because this is a tiny change in libc (on the other side libc is very important)
BUT I DON'T KNOW WHAT WILL HAPPEN IN THE FUTURE:

Will it in future updates hold this package fixed to still old version?
Does anyone know how to unfix this version?
Even if I could somehow unfix it from this version, then will ubuntu have this issue in the future?
Does anyone know if it is some bug in Ubuntu packaging repository? I repeat: this was on a totally fresh Ubuntu 20.04 desktop

Some other places to look for inspiration:

https://serverfault.com/a/993629/445123
https://serverfault.com/a/1005063/445123


resolv.conf did not reset after VPN disconnection

In a terminal do sudo dpkg-reconfigure resolvconf and reboot.


The default xfce screenshooter (with Xubuntu) does exactly what you need. Once you take the snap you can save it into your drive or upload to Imgur with no login whatsoever.

(it says "Upload to Imgur" in Spanish)

Here's the file to download and install: http://goodies.xfce.org/projects/applications/xfce4-screenshooter


Unless you need the source code for some reason (curiosity, etc.), yes, they can be safely removed.


Unable to boot Live CD with hard drive attached

ACPI needs to be turned off during boot.  When booting to the LiveCD, before selecting Try Ubuntu without installing, press the F6 key for Other Options and select acpi=off.  Press ESC to exit the Other Options menu, and press Enter to continue the boot.

For further help about selecting Other Options from a live boot, refer to https://help.ubuntu.com/community/BootOptions


Unable to Merge Win7 Partition with Unallocated Space Released from Xubuntu

Your extended partition starts just after the Win 7 partition.

You need to reduce the size of the extended partition before you'll be able to enlarge the Win 7 partition.

So using a live CD/DVD/USB open Gparted, resize the /dev/sda3 partition first. Then it should be possible to enlarge /dev/sda2.


Setting up network for two places with different static IP addresses by script

You can call it from the file /etc/rc.local. You can either add the lines to that file or call the script there. Whatever you choose you have to add it above the line 'exit 0'.

BTW: I suggest you add a wait command after the first network restart because it can take a few seconds for the network to start. If the ping comes to early you can get an incorrect result.


Stop Ubuntu 20.04 from writing automatically in exponent after "^": a¹ --> a^1

Try the German (dead grave acute) keyboard layout.


It also closes automatically once it has run your command.
Add /bin/bash at the end of your script to keep the terminal open.

You can also add a && sleep 10 to keep the terminal open 10 seconds and see what's going on.

Alternatively, add another line containing read at the end of the script to keep the terminal open until you press Enter.


Okay, This happened hundred times with me. While Burning the iso, it creates the iso size partition in usb and copies the data into that partition and makes it read only.

Follow the GUI procedure ~>

Open Disks from dash.

Select the usb drive from sidebar.

Then click on the three dot on top-right corner and click "Format Disk..." and complete it.

Then click the on "+" icon, left the all field as default and simply click "create".

Then click the gear icon and select "Format Partition" and complete the process.

Remove the USB drive and reinsert.