How to configure route so ping will go from one machine to another

Enable forwarding

First activate the IPv4 forwarding in your "Jack" server.

To enable it on the fly you can use :

echo 1 > /proc/sys/net/ipv4/ip_forward

To enable it permantly, edit the file /etc/sysctl.confand uncomment the line with net.ipv4.ip_forward = 1. Then reload the conf : sysctl -p /etc/sysctl.conf.

Define default gateway

After, you have to define the "Jack" device as the default gateway in your two VM.

To perform that you can edit directly the file /etc/network/interfaces.

Example :

auto eth0
iface eth0 inet static
        address 192.168.3.254 # VM 1
        netmask 255.255.255.0
        gateway 192.168.3.222 # Interface of jack in the sub net of VM1

You can add a default route on the fly with the command ip route (with this command you can, if you want, only specify the route for the subnet of each VM).

sudo ip route add default gw 192.168.3.222 eth0

Debug/Confirm

You can check your IP address with the command ip address. Ensure that your IP is correctly defined.

You can check your route with the command ip route. Ensure that the default route for both of your VM is the "Jack" IP.

Then, ping from each VM to their Gateway (Jack). And finally ping each VM. Done.

If this does not work, check the Firewall and edit it if required :

sudo iptables -L

Hope this answer help and sorry for my english.


I ended up adding trusty-update and trusty-backports to /etc/apt/sources.list
 and and then added main, restricted, universe and multiverse to all of them

deb http://security.ubuntu.com/ubuntu trusty-security main restricted multiverse universe
deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted multiverse universe

deb http://security.ubuntu.com/ubuntu trusty main restricted multiverse universe
deb-src http://security.ubuntu.com/ubuntu trusty main restricted multiverse universe

deb http://security.ubuntu.com/ubuntu trusty-updates main restricted multiverse universe
deb-src http://security.ubuntu.com/ubuntu trusty-updates main restricted multiverse universe

deb http://security.ubuntu.com/ubuntu trusty-backports main restricted multiverse universe
deb-src http://security.ubuntu.com/ubuntu trusty-backports main restricted multiverse universe


how to set up sublime text 2 as environment variable sublime

I think you are confusing the term environment variable, it seems like you want to place the a command to start Sublime Text in your path.

From the Sublime Text installation page:

sudo ln -s /path/to/sublime_text /usr/bin/subl

Note that you must use the full path or this will not work. Suggested place to extract the downloaded file to is /opt.


I used to have this problem on an XPS 15 9550 with ubuntu 16.04.
I tried to update to 16.10 to see if the problem was solved, but the upgrade did not go well so I reverted to 16.04 (thanks to Timeshift).

However I solved it by following ComBin's answer here

sudo apt-get purge xserver-xorg-video-intel

(actually I also removed the file
"/usr/share/X11/xorg.conf.d/20-intel.conf", which I had previously tweaked)

The solution is basically to remove the intel driver and resort to modesetting, it should be the default behavior in new ubuntu versions (maybe it already is in 16.10, I didn't check):
https://www.phoronix.com/scan.php?page=news_item&px=Ubuntu-Debian-Abandon-Intel-DDX

Note that this also solves problems with the switching of gpu via nvidia-prime (see here)


How to install ubuntu without touch screen support on a touchscreen laptop

To disable the touchscreen, follow these steps after you install Ubuntu :

Edit /usr/share/X11/xorg.conf.d/10-evdev.conf.
Add Option "Ignore" "on" to the end of touchscreen section.
Reboot.


In my case I have a problem with grub rootdelay. After 20-30 sec try to hit Enter write exit (you didn't see it on screen) and hit Enter. System should run OK. Then you need to
modify grub config.

But if it can't work try something else from this thread.


Fixing "The ext4 file system creation in partition #1 of SCSI5 (0,0,0) (sda) failed

Those beginners that has a same issue with mine, I just want to share this solution that solved to my problem "The ext4 file system creation in partition #1 of SCSI1 (0,0,0) (sda) failed"  I know that this is so very annoying because every time the last part of the installation, the worst part is it suddenly failed, I tried many many times installing that OS and spent couple of hours, not just hours but days. I already read lots of threads or Forum and done what they have shared but still it doesn't fix my problem, until such time that I just tried to FORMAT my UBUNTU HARD DISK thru Disks Utility, taraaannnn PROBLEM SOLVED.

Here's what I did;

I downloaded the UBUNTU ISO File from Official Site.
I made a Bootable USB using my other UBUNTU PC which has a Start Up App that can create start up bootable usb (maybe you can use a Universal USB Installer Bootable if you are using windows or mac).
How to make a bootable usd using Start Up? I just Plugged In my USB unto my other Ubuntu PC wherein the ISO File was saved on my USB.
Click the Dash and just type Start Up, select the ISO FIle then just Click and browse the ISO File on my USB, click create image disk, after this I already have a Bootable USB Ubuntu OS.

How to Install?

I plugged In my USB unto my PC that has an issue, restart the pc,
then when the menu appeared immediately press the DEL on your
keyboard so that you can go to BIOS Settings, go to BOOT, look for
UEFI Boot Option Priority then change Boot Option to you USB name, click
enter and Go to Exit click Save and Reset. Thats it.

On my part after save and reset there is a error code, I just click the TAB  from my keyboard and type LIVE then my pc will automatically reboot.
Now, when you are now on your desktop, click the DASH and type Disk Utility.
Click the Hard Disk, then click the (negative icon beside settings icon so it will stop, click the settings icon and click format, just format that drive until it is freely from space. I mean just format until it no file content.
Now, Go back to your Desktop just double click Install Ubuntu, click Continue, Click Erase and click continue, the next option will show up is the COUNTRY AREA, just click click click continue, then wait for a few minutes for installation.

Once the installation was successful, reboot again your PC and go to BIOS SETTINGS, go to BOOT and change Bootable USB to PC or PC Boot wherein youve change it a while ago. then Go to Exit agin Save and Reset. Thats it.

Sorry for my bad english, I was so very tired while I am typing this message. Thank you!


Where is .sql file located on Lamp Server using Ubuntu 14.04?

you can search for it, you can use the find utility:

if you know the full name this would be so easy. Suppose the name is database.sql so you can search for it:

find / -name database.sql

you can get rid of the errors "Permission denied" by redirecting the errors to null.

 find / -name database.sql 2>/dev/null

Now if you don't know the exact name this would be exhausting for you to determine which is your file, but you can get every .sql file in your system:

 find / -name *.sql 2>/dev/null


How can I clear the PREROUTING rules in my iptables?

To fix your situation install netfilter-persistent and then proceed to remove those rules again with your previous commands.

Now to get iptables to reload and be duly informed of the new state of iptables rules you either do:

sudo iptables-save > /etc/iptables/rules.v4
sudo ip6tables-save > /etc/iptables/rules.v6 # for ipv6

Or:

sudo dpkg-reconfigure iptables-persistent


How to install an HP C4700 Photosmart printer

Take the disk and make a Christmas tree ornament out of it

Open a terminal by pressing ctrl+alt+t

Enter the command

hp-setup

Follow the instructions on the screen


Try to fully unregister and re-register.

sudo apt-get uninstall landscape-client
sudo mv /var/lib/landscape /var/lib/landscape.old
# Remove any duplicate computer in LDS UI
sudo apt-get install landscape-client
# attempt to re-register anew.

I know you have probably done something similar, but the /var/lib/landscape part you may have not known about.


Ubuntu 20.04 Everything freezes except for mouse pointer

In /etc/profile, I would add this:
setxkbmap -option terminate:ctrl_alt_bksp
Then, logout and login.
The next time you freeze, you can try entering Ctrl-Alt-Backspace to restart the desktop instead of having to reboot.  In addition to getting you back to business faster, it tells you that X is still alive during a freeze.  Not sure why "ctrl + alt + F1 does nothing".
A similar situation is also a current challenge for me on a Raspberry Pi 4 8GB with the Xubuntu desktop.
Good luck with a resolution.


grub rescue prompt after installing grub into sdb

So what is sdb?

I'm afraid that you installed GRUB in your USB.

  I thought, USB drive was sda, and my hard drive sdb. Is it possible?

Not always. You had to check first using fdisk -l.

  How can I fix it?

With the little information you supplied, I'm afraid that your disk (or just the MBR) is badly damaged. Normally, the GRUB installation are flawless, unless you:

Haven't shutdown Windows or any other installed OS.
Have a dirty NTFS partition.
The disk MBR is damaged.

I recommend you to get a Live system (instead the minimal) and try to repair your GRUB using boot-repair.


Allow "root" program to run without privileges

Open up a terminal and execute sudo visudo.

Then you can edit the sudoers file where you can specify who can execute which command as root with and without password. At the end of the file you paste either this line

nonprivilegeduser ALL=NOPASSWD:/usr/sbin/pm-suspend-hybrid

for every user to be able to execute that command as root without password, or

Your_Username ALL=NOPASSWD:/usr/sbin/pm-suspend-hybrid

for only your user to be able to do this (of course you have to adjust it for your user). Then you save the file (should be Ctrl+O) and exit the program (Ctrl+X).

At last, you have to edit your command to read sudo pm-suspend-hybrid instead of gksudo pm-suspend-hybrid.

NOTE: There should also be the possibility to do this with dbus (doesn't require sudoers editing) but this solution has the advantage that it works with every UI.


Ubuntu partition: exited with non-zero exit status 32

Get a newer version of e2fsck. You can not use an older version of e2fsck to check a filesystem created with a newer e2fsck. Well, sometimes you can but not in this case.

I would assume that likely means you have an Ubuntu installed with a kernel >3.6 and use a live usb with kernel <3.6. Version 1.43 of e2fschk got metadata_csum added to the feature and that was around kernel 3.6.

So create a new live session. Live sessions should be used on the system you created them for. Not as a tool for every install. New install = new live session installer.


I had a similar error. Not exactly the same, but the solution was to remove the lxcs.

rm -rf /var/lib/lxc/offending-container-xx
rm -rf /var/lib/juju/containers/offending-container-xx

If someone comes across a similar error, hopefully this will help.


How do I run a script after OpenVPN has connected successfully?

network-manager-openvpn does not provide such functionality, you have to use openvpn directly.

Pass --script-security 2 --up /path/to/your/script to it when connecting. If you're using a configuration file located at /etc/openvpn/, append the next lines to your configuration file:

script-security 2
# run /etc/openvpn/up.sh when the connection is set up
up /etc/openvpn/up.sh

From the OpenVPN manpage:

--script-security level [method]
              This  directive offers policy-level control over OpenVPN’s usage
              of external programs and scripts.  Lower level values  are  more
              restrictive,  higher  values  are more permissive.  Settings for
              level:

              0 -- Strictly no calling of external programs.
              1 -- (Default) Only call built-in executables such as  ifconfig,
              ip, route, or netsh.
              2  --  Allow  calling  of  built-in executables and user-defined
              scripts.
              3 -- Allow passwords to be passed to scripts  via  environmental
              variables (potentially unsafe).
       --up cmd
              Shell  command  to run after successful TUN/TAP device open (pre
              --user UID change).  The up  script  is  useful  for  specifying
              route  commands  which  route  IP  traffic  destined for private
              subnets which exist at the other end of the VPN connection  into
              the tunnel.
Script Order of Execution
       --up   Executed after TCP/UDP socket bind and TUN/TAP open.
       --down Executed after TCP/UDP and TUN/TAP close.

There are more events for script execution, those can be found on the manual page.

Create /etc/openvpn/up.sh, and give it execute permissions (say, 755 or 700). Example content for adding an IPv6 address and route (shown for educational purposes, do not copy it directly):

#!/bin/sh
# add an IPv6 address to device $dev (environment variable)
ip -6 addr add 2001:db8::1:2/112 dev $dev
# and the IPv6 route for this net using gateway 2001:db8::1
ip -6 route add 2001:db8::1:0/112 via 2001:db8::1 dev $dev

Note that this up script is run as root. If you have not specified a User and Group setting, OpenVPN will run scripts like down as root too.


Nginx Logs - No access to /var/log/nginx

It's not a good idea to change permissions or ownerships of directories within the /var/log/*, add your user to the adm group or use ACLs, to give your user the necessary permissions.


Read only file system when changing computer

Fixed issue by installing ntfs-3g and executing ntfsfix

sudo apt-get install ntfs-3g
sudo ntfsfix -d /dev/sd..


Why is my cursor position offset in FireFox on my main screen?

I believe I've discovered the problem.
Wrote a small script to print the cursor location while on that page.
function getMousePos(evt) {
  console.log("x : " + evt.clientX + "  y: " + evt.clientY);
}
addEventListener("mousemove",getMousePos);

I just opened the console and then pasted that in and then began examining the x,y values.
Ha, but that wasn't the solution.  I scrolled up in the console and saw the following error message given by FireFox:
FireFox Console
[-- This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. www.linkedin.com --]


This happens on Windows too. Its from the steam servers being flooded by downloading the same thing. Its not an Ubuntu bug. Try changing the location settings and check if they are right and just be patient.

It DOES happen in Windows because it happens to me.  Its a application issue, it's not localised to any OS.  Its the steam servers being flooded from the same download, or just the servers getting throttled.

It doesnt seem like your internet is the issue, but it could be cutting in and out but I honestly doubt it.


Mounting OneDrive on Ubuntu Linux command line

Mount OneDrive on Ubuntu

This instruction follows RCLONE - Microsoft OneDrive

1. Download and install Rclone

sudo apt install rclone

or download the latest one

wget https://downloads.rclone.org/v1.42/rclone-v1.42-linux-amd64.deb
sudo apt install ./rclone-v1.42-linux-amd64.deb

2. Add a new OneDrive remote to Rclone

rclone config

Select the New remote option by entering  n and pressing the  Enter key:

$ rclone config
Current remotes:

Name                 Type
====                 ====
mega                 mega

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> n

Enter a name for the new remote, here onedrive is used:

name> onedrive

After pressing the Enter, a list of supported cloud storage services is displayed. You need to select the Microsoft OneDrive option by entering its corresponding number ("16" right now but it may change in the future):

Type of storage to configure.
Choose a number from below, or type in your own value
[snip]
...
...
xx / Microsoft OneDrive
   \ "onedrive"
...
...
[snip]
Storage> onedrive

For the next two steps, press Enter without entering any information since there's no need to enter the Microsoft App Client ID or Secret:

Microsoft App Client Id
Leave blank normally.
client_id>
Microsoft App Client Secret - leave blank normally.
client_secret>

Choose the OneDrive account type (enter  b for Business or p for Personal OneDrive accounts):

Remote config
Choose OneDrive account type?
 * Say b for a OneDrive business account
 * Say p for a personal OneDrive account
b) Business
p) Personal
b/p> p

Depending on your setup, you'll have to enter auto configuration or manual for the next step. For desktop users, type y  to use the auto configuration:

Use auto config?
 * Say Y if not sure
 * Say N if you are working on a remote or headless machine
y) Yes
n) No
y/n> y

A new tab should open in your default web browser, asking you to give Rclone access to your OneDrive account. Allow it and you can close the tab.

Rclone runs a webserver on your local machine (on port 53682) to retrieve the authentication token. You may need to unblock it temporarily if you use a firewall.
Now you'll need to check if everything is correct and save the settings by typing y:

[onedrive]
type = onedrive
client_id =
client_secret =
token = {"access_token":"GoKSt5YMioiuCWX1KOuo8QT0Fwy+Y6ZeX7M","token_type":"bearer","refresh_token":"7OMvoEAO3l*8BbhS2AMxpTbJW0Y6np9cdql!bwEdYAhJ6XBG0tnR0UK","expiry":"2018-07-26T15:15:13.696368366+03:00"}
--------------------
y) Yes this is OK
e) Edit this remote
d) Delete this remote
y/e/d> y

Exit the Rclone configuration by typing q:

Current remotes:

Name                 Type
====                 ====
onedrive             onedrive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q> q

3. Create a new folder

mkdir ~/OneDrive

4. Mount OneDrive

rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive

You can stop and unmount it by pressing Ctrl + c  to close Rclone.

5. (Optional) Mount OneDrive on system startup

To mount OneDrive on startup, open  Startup Applications, and in Startup Applications click Add.

After clicking Add, use the following:

Name:    Rclone OneDrive Mount
Command: sh -c "rclone --vfs-cache-mode writes mount onedrive: ~/OneDrive"

There are other ways of mounting OneDrive automatically, like adding a line in your /etc/fstab file, using systemd, etc.


First identify that you are indeed in fastboot, you can do this looking at the screen and noticing:

A Start label with something resembling an arrow pointing to the power button.
An open android.
Text with device information.

With the cable plugged in, run:

fastboot devices

If it doesn't return anything while in fastboot mode it's most likely a permission problem, by running

sudo fastboot devices

you can prove that it is. To get this working and continue your workflow either use sudo or make sure the proper udev rules are in, to create on, look at dmesg while in fastboot mode and identify a line similar to:

New USB device found, idVendor=18d1, idProduct=4ee0

If you have adb-android-fastboot installed you can look at:

/lib/udev/rules.d/70-android-tools-fastboot.rules

to replicate them in /etc/udev/rules.d/ or propose a fix with a patch to android-tools, the easiest way to do this is through a bug in https://bugs.launchpad.net/ubuntu/+source/android-tools/+filebug


Not able to locate initial-status.gz. What might be the problem here?

As I've seen mine is the last thing created in that folder while installation. May be it didn't reach that step, see with:

sudo ls -lt --time-style=full-iso /var/log/installer/

If this is new installation , you may look for:

ls -lt --time-style=full-iso /var/lib/dpkg/status*

Ubiquity compresses status file at the end of installation process. status-old file is a backup copy.

Be aware that /var/lib/dpkg/status & /var/lib/dpkg/status-old reflect current and previous of the packages respectively and they are updated with each package installation/removal operation. In other hand, /var/log/installer/initial-status.gz is left as it was after Ubuntu (system) installation.That's why I said "if your installation is new/fresh".

If it is relatively new (few days even with some package operations), you may filter out the packages you have added/removed by yourself from:

zcat /var/log/apt/history.log*
zcat /var/log/dpkg.log*

dpkg.log will more complete then apt/history.log because apt uses dpkg which does all package basic tasks.


How to convert .avi video to .mp4(for Motorola Milestone, Android 2.3.4) with Avidemux

I just downloaded MoboPlayer and MoboPlayer Codec for ARMV7VFP3 from Android Market. It reads the .mp4 files and it also reads .avi(xvid) and .srt(subtitles), so I don't even need to convert the videos. If anyone can't play their videos on their Android phone, I suggest MoboPlayer(It's available from Android Market for free).


no text entry or keyboard capabilities in firefox browser when running in firejail, or regular usrspace after reboot

I had same problem with chromium and skypeforlinux on ubuntu 16.04.1
I have solved this by adding GTK_IM_MODULE=xim in firetools settings like this

GTK_IM_MODULE=xim firejail skypeforlinux
GTK_IM_MODULE=xim firejail chromium-browser

so run from terminal with command line below or go to firetools and press right button on firefox icon and select Edit option to set

GTK_IM_MODULE=xim firejail firefox


Editable annotations on terminal like sticky notes

Maybe not what you're looking for exactly, but I have a script to add a string to the beginning of the bash prompt. It's called shellname.sh and looks like this:

#!/bin/bash -x

if [[ -z "$ORIG_PS1" ]] ; then
  export ORIG_PS1="$PS1" ;
fi

export PS1="($1) $ORIG_PS1"

Then I can call source ~/testname.sh "Shell Name Here". Note that you have to use source instead of running it directly so it can effect the local environment. For example:

stokastic@home:~/test#
stokastic@home:~/test# source ~/shellname.sh "build shell"
(build shell) stokastic@home:~/test#
(build shell) stokastic@home:~/test# echo "now my shell name is on the left"
now my shell name is on the left
(build shell) stokastic@home:~/test# make


Ubuntu 13.10 and Windows 7 - can't get back to Windows

Can you post the result of those 2 commands

fgrep menuentry /boot/grub/grub.cfg
sudo fdisk -l


How to import Qt app into Quickly on 10.04?

As pointed out in the comments, you can use the Qt application template. However, Ubuntu 10.04 is not supported, so I'd recommend upgrading to Ubuntu 12.04.


How do I update from 9.10 to the newest verson?

If you are looking to update to at least 12.04 from 9.10 you are looking at 3 system updates, I really don't recommend doing this. What I do suggest is download yourself a copy of the latest ISO and make a bootable ISO. From there you will have to boot into the USB or DVD so you will need to go into your BIOS and enable USB booting or Change the boot device priority if it doesn't work right away.

If you need help making a bootable Ubuntu USB Drive.. here.

If you need help installing Ubuntu.. here

If you really must upgrade through the terminal then you need to follow these steps

 1. vi /etc/apt/sources.list
 2. Replace each maverick universe with precise universe
 3. aptitude update
 4. aptitude full-upgrade

But seriously this is probably going to break the installation but I really suggest making a bootable USB or DVD, it will be much faster and safer.


How do I check whether a PPA package has been tampered with?

Install the devscripts package.
Go to the PPA page and find the source package files associated with the package that you're interested in. Find the one that ends .dsc.
Run the command dget url_of_dsc_file.  This will download and unpack the source code used to build the package into a directory. Rename this directory to ppa.
Get the original source code to compare the PPA against. This could be the original upstream tarball from the project website that corresponds to the version you're using, or perhaps the most recent official Ubuntu release of the package (you can find a link to the latter .dsc from https://launchpad.net/ubuntu/+source/source_package_name). Download and unpack this, then rename this directory to upstream, using dget to download from a .dsc if needed.
Now compare the upstream and ppa directories to see if any malicious changes have been introduced in ppa that were not present in upstream. You could use meld for this, which is a graphical diff viewer. apt-get install meld, then run meld upstream ppa. It will show you which files are new, changed or removed, and you can double-click on a file to see detailed changes in an easy-to-review format.

Since PPAs are built from source on Canonical's infrastructure, you can trust that the binary you have installed from the PPA matches the source that you review as above, provided that you trust Canonical. This should be acceptable given that you trust Canonical to build Ubuntu in the first place.


"ModuleNotFoundError: No module named 'apt_pkg'" trying to install Moka

See zhazha's answer on python-dev installation error: ImportError: No module named apt_pkg - Stack Overflow for a solution. In short:

cd /usr/lib/python3/dist-packages
sudo ln -s apt_pkg.cpython-36m-x86_64-linux-gnu.so apt_pkg.so


How to remove a File from /usr/share/applications on Ubuntu 16.04 LTS

The name you are interpreting as a file name is the name provided for the Desktop Launcher.  The actual file is a file with a *.desktop extension.

You can locate the name of the launcher file (*.desktop) from the terminal by entering the /usr/share/applications folder, then search the contents of the desktop files for the filename.

Since I don't have your program installed I'll use a program installed on my computer as an example of the steps for the search.  I'll search for the Terminal launcher.  When you perform the steps, use JDownloader for your search string.  You can use more characters of the name if it brings up too many hits.

(The line with the $ prefex represent commands typed.  The other lines are terminal output.)

$ cd /usr/share/applications
$ egrep -l "Terminal"
debian-uxterm.desktop
debian-xterm.desktop
emacs24-term.desktop
exo-terminal-emulator.desktop
gnome-terminal.desktop
mono-runtime-terminal.desktop

Those are the files that have Name=Terminal as an entry in the *.desktop filename.  Now I pick from the output list which one I want to delete.

Since there are more than one, I'll examine the file first with Gedit.  In this case:

 $ gedit gnome-terminal.desktop

If that's the one you can remove it with:

$ sudo rm gnome-terminal.desktop

Usually I move a system file to a temporary area before deleting it.  Then I make sure the change performs as expected.  Then I permanently delete the file.

The GUI way:

I presented the terminal method in my first example, because that was your method in your question.  You can also use a GUI search, which may be substantially easier.

Bring up the /usr/share/applications folder in a file browser.  This will show the files by there Launcher Name, not the actual file name.  This is the name you are seeing in the Launcher.  After you have brought up the list of file, you can point and click to delete.

$ sudo -H nautilus /usr/share/applications

Note:

You could also remove the file by uninstalling the application you installed that brought the Launcher to your system.

Since the file, from your description, is installed in /opt, it's an indication that it didn't come from the default repository.  So you'll have to look in package's Readme description to find the steps for uninstalling.


Had the exact same problem:  after adding Chinese in Language Support, Chinese was still not showing as an input option to add in Lubuntu 14.04.  Specifically trying to add via IBus Preferences which can be launched via Preferences menu -> Keyboard Input Methods, or by right-clicking the LXPanel's language keyboard digraph (ie "US") on the bottom right and selecting Preferences ... then selecting the Input Method tab and then Add but Chinese did not appear in the list of languages.

Ultimate solution was to
 - 1) ensure Chinese was successfully added in Language Support, and that Language Support was updated (automatically checks when you launch the GUI via the Preferences menu)
 - 2) THEN do a good ol' reboot (logout would probably work fine, too).

Violà! 成功！ Chinese appears third on the list, after English and Arabic

(Note: from within PRC this instance i first had to connect to a VPN for Language Support to auto-update properly, but it's worked in the past without.)


Installation on new laptop DELL Inspiron 5491 freezes

I have the same computer and for me it works with "noapic" on Ubuntu 18.04 and 19.10, and with "nolapic" on other distro.

Once 19.10 installed, it works great except the touch screen which is not reconized and the sleeping mode (suspend). I spent hours on it with no sucess for the moment. if you found any tips let me know.


bionic: dpkg options does not work using apt-get dist-upgrade

You need to add DEBIAN_FRONTEND=noninteractive
The command should be:
DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade

If you don't want to add it every time you run the command you can make the environment variable persist for your session:
export DEBIAN_FRONTEND=noninteractive

And then this works:
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" dist-upgrade


Cannot boot from Ubuntu live usb (pcie bus error)

I have failed with Rufus (and some other programs) to create a Ubuntu Live USB stick from Windows but when I used balenaEtcher I succeeded. If even that fails, then try the Universal USB Installer. My failures may be due to my total lack of knowledge in Windows.


Why did Apport make my bug report private?

To expand on fluteflute's answer, which is mostly right, the automated retracer does not set the bug public. It merely adds a stack trace to the bug so that it is more clear where the problem lies.

The sensitive information is kept in the bug report, as it can be invaluable to a developer working on a fix. The bug is reviwed by members of the ubuntu-bugcontrol team who will evaluate the bug and either keep the bug private, and assign specific developers, or remove the sensitive information if it is not helpful to solving the issue, and then mark it as public.


What is the most authoritative file/process for managing IP addresses on an 18.04 server?

Make your networking changes to the /etc/cloud/cloud.cfg.d/50-curtin-networking.cfg file as if you were putting them in the yaml file.

Then do the following:

sudo cloud-init clean
sudo cloud-init init
sudo netplan apply

This will process your 50-curtin-networking.cfg file, generate the 50-cloud-init.yaml file and apply the yaml file netplan configuration.

In this way, you can write your networking config in the 50-curtin-networking.cfg file as the comments imply you should do.

A lot of the confusion between setting networking up in the 50-cloud-init.yaml file vs the 01-netcfg.yaml found in the /etc/netplan directory comes down to the installer used for Ubuntu 18.04 LTS.

The live installer uses cloud-init, whereas the alternate installer does not.

So for networking your installer choice changes how you will set up networking.

ubuntu-18.04.1-server-amd64.iso -> 01-netcfg.yaml
ubuntu-18.04.1-live-server-amd64.iso -> 50-curtin-networking.cfg


Reduce size of a WSL installation (Ubuntu 18 on Windows 10)

WSL is a full OS, so it takes up more CPU/MEM/DSK than CygWin but less than a VM

So it depends on your use case:

if all you need is tail on Windows, you just install the GNU Utilities for Windows.
If you need something more advanced, you install CygWin,
If you want to have snaps, containers, ... you install WSL
if you need all the whistles and bells of both Windows and Ubuntu you go:

dual-boot if you have <16G of RAM
or
Virtual Machine with Ubuntu as a host and Windows in a VM if you have lots of RAM (24G or more)

if you need only one or a few Windows utilities¹, you install Ubuntu without Windows but with wine
If you need Ubuntu, just wipe Windows because Windows takes up much more space  on your hard drive than Ubuntu!  >:-)

Having said all that, you can always do the following to strip WSL of stuff that you don't need:

apt list --installed
apt purge WhateverYouDontNeed
sudo apt autoremove
sudo apt autoclean

;-)

¹ Definition of "utility": a small application that does not exist under Ubuntu E.g. Notepad++, DNSBench, ...  Office is not a utility: it's a hog: go dual-boot ;-)


Is there a way to enable Ubuntu Keyboard shortcuts in Kubuntu?

I think you have to assign them manually. As far as I know there is no such possibility to import the Ubuntu keyboard shortcuts directly.

But I had a similar problem creating a keyboard shortcut(ksc) to open my konsole with the ksc Control+Alt+t so I started searching and came up with the following solution:

Open a terminal and enter following commandssudo apt-get install xbindkeys xautomation
Create a file named .xbindkeysrc in your home folderkate ~/.xbindkeysrc
Copy and paste following content to open your terminal with the ksc Control+Alt+t and after that save and close the file."konsole"Control+Alt + t
Start xbindkeysxbindkeys
Press Control+Alt+t to find out if the ksc is working
If the command is working add xbindkeys to Autostartcd ~/.kde/Autostart/ln -s /usr/bin/xbindkeys xbindkeys

If you want to find out the name of a key, just enter following command in the terminalxbindkeys -kand press any key or combination.


I have fixed this problem by enabling IOMMU in BIOS. This seems to be a motherboard specific issue.

Forum thread: http://ubuntuforums.org/showthread.php?t=2111223&p=12503485#post12503485

  Just wanted to add to this thread in case in helps someone -- I have
  also been experiencing this bug (Networking and USB not working with
  64-bit Linux kernels on the Gigabyte 970A-D3 Rev. 3.0 motherboard). I
  originally posted about it in this thread if you want gory details.

  Note that my motherboard is a D3, not a DS3, though they are almost
  identical.

  Also note my motherboard is Rev. 3.0. The Revision is important as it
  has a different bios than the earlier Revs; also, I did not have this
  problem with the earlier Rev that I used briefly.

  Further note, 32-bit kernels work fine, it's only the 64-bit ones that
  don't have successfull Networking and USB.

  And further note - the same problem exists in the current 13.04 Raging
  64-bit kernel as well.

  The good news: I was able to get my system working by setting IOMMU to
  ENABLED in the bios (it was set to disabled by 'optimized
  settings'/defaults).

  YMMV. I figured out that I should play with this setting by going
  through this thread and the similar launchpad bug mentioned earlier (
  ), though I don't know if anyone else solved it by the same method.

  Not 100% sure where this bug should be reported to. Its not strictly a
  Ubuntu bug, it affects all 64-bit kernels (that I tried, at least). I
  guess it might be considered primarily a gigabyte bug. Not sure. I do
  feel, though, that it would be better if the kernel gave some more
  useful warning / debug messages in this case so people could diagnose
  it better. I ended up spending many hours working on this.


How can I use ReinerSCT Standard Chipcard Reader with Jameica/Hibiscus in Ubuntu 14.04 64bit?

I solved the problem by creating the file

~/.jameica/cfg/de.willuhn.jameica.services.SysPropertyService.properties

and manually configuring the location of libpcsclite.so.1 in this file by adding the following line:

sun.security.smartcardio.library=/lib/x86_64-linux-gnu/libpcsclite.so.1

After restarting Jameica the reader was correctly found automatically and I can finally do all my homebanking using Linux.

You may also want to have a look at this page (German):

http://www.willuhn.de/wiki/doku.php?id=support:list:kartenleser


Fixed!

Still not completely sure what was going on, didn't do anything to the system or add any new repos since the last update but after kernel upgrade any time I tried to use apt-get or aptitude or dpkg to install/purge the stated in the OP package the system froze cause of memory lack, even if it was a .deb package.

I managed to fix this with Y-PPA-Manager, firstly disable the PPA with the causing package (in my case noobslab/icons) then sudo apt-get update after that start Y-PPA-Manager go to Advanced and choose Try to fix all GPG BADSIG errors. Wait until the process is completed. That's it. In the end:

sudo apt-get purge masalla-icon-theme
sudo apt-get autoclean
sudo apt-get autoremove

Then re-enable repository and update the package list and everything works as normal.


How can I change Ubuntu server IP Address to web address?

Conventionally name resolution, that is the mapping of IP addresses to host names and vice versa, is done by a DNS (Domain Name System) server.

You probably have an internet router that provides DNS for your local network. There is an offside chance, that your router allows you to add entries to its DNS, but usually customer grade hardware does not offer this. Won't hurt to check, since this would be the easiest way.

As this will probably not be possible, there are multiple ways to go

Note: the domain .local refers to a system known as m(ulticast)DNS, aka zeroconf/bonjour/avahi - for technical details see the RFC. It provides name resolution and service announcement if there is no dedicated DNS server available, although on OS X(bonjour) and Ubuntu (avahi) it is enabled by default.

Update: I found the avahi method not immediately viable and setting up a local DNS only makes sense if it can run as the primary DNS for the network.

Most operating systems maintain a hosts file, which contains entries like IP hostname. You could manually add an entry (replace x's with the proper IP!)

192.168.x.x dev.robi

to /etc/hosts on each client on the LAN. This method is straightforward, but a little impractical, if IPs or hostnames change frequently.
As noted above, the avahi-daemon is running by default on Ubuntu. You can configure the machine to announce itself under multiple names, but there needs to be a mDNS client running on each machine in the LAN, that should resolve the new hostname (on Windows machines, Apples bonjour service is installed with iTunes).
Give it a try by adding

192.168.x.x dev.robi.local

to /etc/avahi/hosts and restart the service with sudo service avahi-daemon restart. Now try if the new hostname is resolved e.g. by pinging it from another machine.

Update: The described method to use avahi to setup an alias does not work! Avahi will not allow to bind multiple hostnames to the same IP, as it will always try to register a corresponding PTR, which leads to a collision. This is expected and good behavior.
However, there exists an extension avahi-alias which allows to register aliases (CNAME). Unfortunately, those aliases will not be recognized by (at least) Windows clients, but as long as you're only running clients with avahi, this provides a real option.

To install avahi on a Ubuntu system, do

sudo apt-get install avahi-daemon libnss-mdns

Setup a local DNS server. I would recommend dnsmasq. It can be installed with sudo apt-get install dnsmasq. It comes with a DHCP server which you will want to disable. Its config is stored in /etc/dnsmasq.conf. To disable DHCP set

no-dhcp-interface=eth0

where eth0 is the interface connecting to the LAN.
dnsmasq automatically reads /etc/hosts, so add your hostname to hosts like stated above. Finally add the machine running dnsmasq to the list of DNS servers on each client.

Update: You probably have a DNS server running already, e.g on your internet router. The clients will send DNS queries to that server. You cannot simply add a secondary DNS to your clients config, as it will only ever be queried if the primary DNS is unreachable. Unless you're running an always-on machine that can become the primary DNS for the network, there is no way to make this work.

In Summary: In a Linux-only environment, where you can run the avahi-daemon on each client, the avahi method actually provides a solution. I tried this myself.

Since you probably cannot turn a machine into an always-on DNS server, installing and configuring dnsmasq is not advised.

Still, the most straightforward if a little cumbersome method, is to add an entry to the hosts file on each client!

Your recent problem with DNS resolution probably comes from running dnsmasq. I now actually discourage using dnsmasq, since it will not solve your problem. Stop the service sudo service dnsmasq stop. Then try host -v ro.archive.ubuntu.com. It should resolve using Google's DNS 8.8.8.8 as configured in resolv.conf.

Furthermore, if you go with the hosts method, do not append the domain .local, as it is reserved for mDNS. Instead, just put

192.168.0.5 dev.robi

in /etc/hosts, not dev.robi.local.


Total UUID failure, all attempts at rescue failed for a variety of inexplicable reasons

Found the answer here!
“initramfs” error on boot ONLY on Dell XPS 13 (boots fine on other computer)

BIOS --> System Configuration --> SATA Operation Changed from RAID to AHCI.

I'm still not sure what triggered this -- seemingly some kind of automatic update, as my initrd files had recently been altered. But changing from RAID to AHCI seems to have fixed it persistently.


AMD Graphics card not getting used in Ubuntu 16.04 Lenovo Thinkpad E460

With Ubuntu 16.04 LTS, AMD graphics cards won't work properly with older computers.  If you want to use your graphics card, downgrade to Ubuntu 15.10, or if you want the long term support, use 14.04 LTS.


It looks like you've installed the PPA version from ppa:mj-casalogic/Bumblebee. You're possibly seeing something like:

  FATAL: Error inserting nvidia_current (.../nvidia-current.ko): No such device

This is caused by executing ACPI methods in the wrong order which messes up the PCI configuration space and thereby confusing the machine. Therefore, acpi_call has been removed from Bumblebee 3.0 since there is a better alternative for nvidia Optimus laptops.

For installation instructions of Bumblebee, see Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?


To revert the change run

sudo sed -i -e 's/GRUB_TERMINAL/#GRUB_TERMINAL/g' /etc/default/grub

Or when you edit /etc/default/grub, just add a # to the GRUB_TERMINAL line.

Then run

sudo update-grub

The reboot

FWIW sed is a powerful command and substitues one sting for another, so all the sed command is doing is commenting out , or removing the comment (#) from the GRUB_TERMINAL option.

example :

echo GRUB_TERMINAL
GRUB_TERMINAL

echo GRUB_TERMINAL | sed -e 's/GRUB_TERMINAL/#GRUB_TERMINAL/g'
#GRUB_TERMINAL

echo GRUB_TERMINAL | sed -e 's/GRUB_TERMINAL/#GRUB_TERMINAL/g'| sed -e 's/#GRUB_TERMINAL/GRUB_TERMINAL/g
GRUB_TERMINAL

the -i command edits the file /etc/default/grub in this case


External monitor not detected on 13.04 on a Dell XPS 13 via Mini DP

did have the same pb : this was due to a file "60-plugable.conf" in /usr/share/X11/xorg.conf.d which included a restricted X11 setup. By removing that file (move it to a safe place in case you are scared...) and rebooting all went fine again.


Unable to install software or update the system after half installed java

Thanks to Projjol for the solution.

He said,

You have a package that was not installed correctly or is broken. You have to remove linux-image-extra-3.8.0-19-generic.

I would suggest that you use the following code: gksudo nautilus /var/lib/dpkg/info Now find all files starting with names linux-headers-3.8.0-19 and delete them. Then:

sudo apt-get -f install

sudo apt-get update

sudo apt-get dist-upgrade

sudo apt-get install linux

Your system should work fine then.


Ubuntu GNOME 17.04 - Icons not displaying on projected screen

You need to adjust your display settings to "mirror" the outputs.

Bring up your dash screen and type Displays.
Click the Displays icon
From there, you need to select the Mirroring option. Go through the settings carefully. It should give you "Mirror Outputs" or "Displays" or something like that. I am not a GNOME user so I do not recall the exact wording.

This way, what you see on your screen will be mirrored on the "extended" display - whatever that might be - a projector, an LCD screen, a video switcher etc.

Pay close attention to the "Primary" output option. You do not want to set the primary output to be the projector / LCD etc.

UPDATE: Here is a screenshot that I downloaded and modified - I have highlighted the mirroring option. Original screenshot can be obtained here.

To get to this screen, you may need to click on the "Arrange Combined Displays" button.


Problem ANDROID_HOME when build APK iOnic

When you invoke any command via sudo, sudo, for security reasons, resets the command's environment. See man sudo;man sudoers.

Must you use sudo for this? Why?

Could you achieve the same thing by finding the group access, and adding yourself to the group?

ls -ld
sudo adduser $USER group

For now, and this is NOT the recommended way (because it's probably incomplete),

sudo env PATH=$PATH ANDROID_HOME=$ANDROID_HOME $(type -p ionic) cordoba ...


Unable to initialize frontend: dialog when using ssh

I believe it has something to do with the fact that apt-get autoremove is being run in a non-interactive shell. See Is it possibe to answer dialog questions when installing under docker?

The solution appears to be to prefix the command with DEBIAN_FRONTEND=noninteractive:

ssh <remote_srv> "DEBIAN_FRONTEND=noninteractive apt-get autoremove"


I have deleted python files in usr/bin and cant reinstall it

I would suggest trying to run the live CD, find those files you deleted, and copy them to your installed /usr/bin folder.  This should not be too hard to do.  You can probably mount your installed partition using Nautilus, open it, and try copying using the GUI.  If there is an error due to permissions, you may need to use the terminal to copy the files to (I believe) /media/*/usr/bin using "sudo cp", where the asterisk will be the name of the partition for your installation.

As a novice, you should not be deleting files that require root/admin authority (ie, using sudo or equivalent) without either knowing absolutely that it's OK, or at least copying it to a temporary folder for a while to make sure it's OK.  That is why only certain users are allowed to do that.

Edit:  More details

I booted my live CD (12.04), and I do see python 2.7 in the directory you specified.  I don't think you need the previous version.

Using Nautilus, I was able to click on my real installation, and it automounted to /media, as expected.  The files in /media/usr/bin are owned by root, so nautilus can't copy the files, unless it's run as root.

To reproduce the files, do this:

Make sure your installation is mounted by clicking on it in
Nautilus, where you should then see the symbol for mounted
partitions, a sort of up-arrow with a line under it.
Run the bash terminal to get a command line, and enter cd
/media/*/usr/bin, where the asterisk is the name you see in
Nautilus; you can press tab to autocomplete so you don't need to
type in the name.
Enter the command sudo cp -P /usr/bin/py* ., which will copy the
python files to the current directory, and preserve the links
(python links to python2.7).

This should replace the deleted files.

You might be able to reinstall it using the software center or apt-get if you were to reinstall it rather than install, or uninstall it first.  I think the error may be that it thinks it is installed, so it doesn't copy a new version of the file.  Then, it tries to access the file, and it's not there as expected.


Yes, dpkg-reconfigure resolvconf resolved my problem with a malfunction DNS. I think my problem originate from using Fortinet SSL VPN client.


Can't see Ubuntu partitions in Windows disk manager!

When installing using wubi the filesystem is just a file in your windows C: drive. You can use some tools to mount this in windows. Wubi is only meant to test Ubuntu and isn't good as a long term solution. So your best bet is to back up any user data onto a USB and remove wubi from add and remove programs in windows. This will unintall ubuntu. Then download the ubuntu .iso image, and write it to a usb or dvd, and use that to install properly to a separate partition. Don't try and do any partitioning yourself, the installer can manage it for you if you select install alongside windows 7.


How do I configure smuxi-server to run as a normal service?

Create an upstart configuration file:

sudo nano /etc/init/smuxi-server.conf

start on runlevel [2345]
stop on runlevel [016]

exec /usr/bin/smuxi-server

Now, smuxi-server will start on boot and you can control as any service (upstart job).

sudo service smuxi-server [start|stop|restart|status]
sudo [start|stop|restart|status] smuxi-server

That was the minimum configuration, To learn about available options see Upstart Intro, Cookbook and Best Practises


Generating several random numbers within a range

If you mean the rand from the rand package (as opposed to the one from OpenSSL), it doesn't support a lower bound, only an upper bound. What you can do is the shift-lower-bound-to-zero-then-add-lower-bound trick:
$ rand -N 10 -M 100 -e -d '\n' | awk '{$0 += 100}1'
170
180
192
168
169
170
117
180
167
142

-N is the number of random numbers you need
-M would be the upper bound of the numbers rand outputs, so (max - min = 100)
-e -d '\n' sets the delimiter to a newline. That's for convenience of processing by awk.

The awk code then takes each line and adds 100 to it.


Installed Wine on Lubuntu 11.10 via synaptic. It's not listed anywhere though. What went wrong?

WINE is not a regular program like you might be expecting. It is essentially a set of libraries and helper programs that allow you to run Windows programs on Linux. You can try running some Windows programs (for example 7zip) on your system to see how it works (just download the file, mark it executable in the properties window, and double click it to run it).

You should see a new menu category called "Wine" in your Lubuntu menu. It won't have much in it, but if you need to configure WINE you can do it from there.

Also, try running winecfg. That should bring up the configuration dialogue.

PlayOnLinux - A GUI for WINE:

If you would like to use a GUI for WINE, that provides the option to install many Windows applications (including Office programs, games and more), you can install PlayOnLinux. It is available in the repository, but if you want the latest and greatest version, you will need to add the PlayOnLinux repository and install it from there:

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_oneiric.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt-get update
sudo apt-get install playonlinux

Please see this page if you need to install the repository for a version other than Oneiric (11.10).


Then I'm asked for the URI...what is it?

It (the URI being asked for) is the URL in the browser that you have posted - which by the way, is now a security risk to your OneDrive account as you have posted your response code token (not good) - please change your OneDrive account password urgently.
Additionally, your question + answer is detailed here: https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#authorize-the-application-with-your-onedrive-account
Also - make sure you install the onedrive client the correct way - ie: do not install via sudo apt install onedrive without using the Ubuntu PPA. If you do not use the PPA you will install an out-of-date version with known issues. Refer to https://github.com/abraunegg/onedrive/blob/master/docs/INSTALL.md for the correct details to install the client on Ubuntu
Additionally, as a side note, the client identifier you are currently using indicates you are using the 'skilion' codebase and that client contains major defects that put you at risk of data loss. The ;skilion' client was abandoned by the developer in 2018 and despite a new version release in Oct 2020, these defects remain.


How do I enable thumbnails for 'webm' files?

What file manager? This may be a simple matter of a missing feature. I know that Thunar and elementary's pantheon files use tumblerd to get thumbnails, and that an earlier version could not thumbnail webm files.

What version of your file manager and Ubuntu do you have?


Run this in terminal:

 sudo apt-get update && sudo apt-get install gparted && sudo gparted

It will ask you for your password once, then it will install a graphical partition editor.

In the top right-hand corner, there's a drop-down menu that'll let you choose the disk you want. Choose the HDD you want to install Windows on.

Then, from the top menu bar, choose Device ==> Create Partition table. A dialogue box will pop up with a warning. I gather from your question that you intend to wipe out all data on your 2TB HDD and put Windows on it. If this is the case, continue by clicking "OK". If not, you should update your question to reflect the partitioning scheme you desire on the 2TB HDD.

Choose "msdos". It'll take a minute to run.

You should now have ~2 TB of unallocated space. Right click the space, click "add new", then format it to "Fat16", "Fat32", "exfat" (if available), or "ntfs". Any one of those should do.

Then reboot your computer and try to install Windows on that HDD.


Suspension on my computer under Ubuntu 14.04 LTS 64 bit won't work properly

By editing the /etc/default/grub file I succeeded in resolving the issue:

First of all backup your file on your Desktop:

sudo cp /etc/default/grub /home/username/Desktop/grub
Then edit the /etc/default/grub in order to change two lines
in the way below ; so run:

sudo gedit /etc/default/grub

  GRUB_CMDLINE_LINUX_DEFAULT="quiet"
  GRUB_CMDLINE_LINUX="acpi_sleep=nonvs"

Run:

sudo update-grub
Restart your pc. You could need restarting it a few times before
suspension comes back working properly.
Should anything go wrong or this method not work, run this command:

sudo cp /home/username/Desktop/grub /etc/default/grub
sudo update-grub

I hope this solution can help as many people as possible. See you around. Bye.


This is caused by the way the two operating systems set the hardware clock. Ubuntu uses UTC, and Windows localtime. to fix this error, please visit:

Why does time change in Ubuntu after installing Windows

and go to the first answer.


Unable to get spyder to work with python3 (properly*)

When installing spyder with pip3; PyQt4 packages was needed:

sudo apt-get install python3-pyqt4

Having installed that gave me the much wanted spyder IDE, working in version 3 and python3.5.

When launching spyder with terminal I get:

void DBusMenuExporterPrivate::addAction(QAction*, int): Already tracking action "Project explorer" under id 124

But a post in github (with a much relevant difficulty) reassured me: https://github.com/spyder-ide/spyder/issues/3521


Desktop effects reset to none, no title bar

This happens when compiz is not running.

compiz is the window manager that has all the desktop effects, so if it's not running, the windows won't have any decoration (title bar) and you won't see any effects.

I don't know why it would not run, though.


Paswordless Rsync Over SSH Without Key Authentication [Un-Safe]

maybe try  sshpass.

seems simple enough to use... it's available through apt as well.

I was looking for something like this before I copied my keys around, but since I've got my key everywhere I need already anyway, I haven't taken the time to try this.

Do note the disclaimer on that tutorial there regarding the visibility of your password though.

For everyone who needs to do this:

sshpass -p 'sshpassword' rsync --progress -avz -e ssh test@remhost:~/something/ ~/bak/


gpg-agent: how to limit the passphrase cache retention time

Let me begin by saying I had the exact same issue...

I found and post a solution for configuring GPG passphrase cache retention time on Ubuntu on another question.

There is however a minor issue with the second method (disabling the GPG component of the GnomeKeyring) and Thunderbird/Enigmail: when the cache is cleared, you may get a message saying the password is wrong before any actual prompt for it; just click OK (to retry) and you will get the prompt.


My system time resets to January 2007. How can I solve this?

Maybe you should try changing your motherboard's battery.
It's a possible cause.


Certain websites not displaying correctly in chromium (ERR_INSECURE_RESPONSE for all images and css)

It's a known bug:

https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1641380
https://bugs.chromium.org/p/chromium/issues/detail?id=664177

The bug has been squashed upstream, and they say that "the updated package should be released soon".

Edit to update status "This bug was fixed in the package chromium-browser - 53.0.2785.143-0ubuntu0.14.04.1.1145" (source: https://bugs.launchpad.net/ubuntu/+source/chromium-browser/+bug/1641380)


Difference between ls -l , ls -ltr and ll?

First of all, the mentioned commands do not generate the same output. Here are the details:

ll : There is no command like ll, in Ubuntu it is an alias for the command ls -alF. you can find it by:

$ type ll
ll is aliased to `ls -alF'

-a option is to show hidden files (will show . and .. too)
-l option is to show the output as a long list along with various attributes e.g. permissions, file sizes, use, group, modification time etc.
-F will append one of */=>@| to the entries, it is basically used to differentiate files from directories as it will append / to the directory entries

Example :

$ ll
total 24
drwxrwxr-x 4 chayan chayan 4096 Jun 25 13:53 ./
drwxrwxr-x 3 chayan chayan 4096 Jun 25 13:34 ../
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:35 data/
-rw-rw-r-- 1 chayan chayan   88 Jun 25 13:50 filenames.txt

ls -l : As mentioned earlier -l will show the entries as a long list along with various attributes.

Example:

$ ls -l
total 16
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:35 data
-rw-rw-r-- 1 chayan chayan   88 Jun 25 13:50 filenames.txt

ls -ltr :

-t option will sort the entries by modification date (with newest first)
-r will reverse the sorting order.

As -t will sort by modification time with newest first, -r will cause the reverse i.e. oldest entries will be shown first now.

Example (Adding a file and a directory to make it clearer) :

$ ls -lt
total 16
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:50 log
-rw-rw-r-- 1 chayan chayan   88 Jun 25 13:50 filenames.txt
-rw-rw-r-- 1 chayan chayan  208 Jun 25 13:49 move.sh
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:35 data

$ ls -ltr
total 16
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:35 data
-rw-rw-r-- 1 chayan chayan  208 Jun 25 13:49 move.sh
-rw-rw-r-- 1 chayan chayan   88 Jun 25 13:50 filenames.txt
drwxrwxr-x 2 chayan chayan 4096 Jun 25 13:50 log

Check man ls to get more idea.


I don't think your system in helped by having both Network Manager and Wicd competing for control. I recommend you remove Wicd. Let's create the .conf file. In a terminal:

gksudo gedit /etc/modprobe.d/local-b43.conf

Use nano or kate or leafpad if you haven't the text editor gedit. Add a single line:

options b43 allhwsupport=1

Proofread carefully, save and close the text editor. Reboot.

If it still doesn't work as expected, from the terminal:

sudo -i
rm /etc/modprobe.d/local-b43.conf
echo "blacklist b43"  >>  /etc/modprobe.d/blacklist.conf
echo "blacklist ssb"  >>  /etc/modprobe.d/blacklist.conf
exit

Reboot and tell us the result.

Your /etc/network/interfaces asks eth0 to start automatically, however, you are using wireless. Please do:

gksudo gedit /etc/network/interfaces

Change the file to comment out the eth0 stanza:

auto lo
iface lo inet loopback

#auto eth0
#iface eth0 inet dhcp

Proofread carefully, save and close the text editor. Reboot and test.


How to map "mouse wheel up / down" to the express buttons of a Wacom graphics tablet with xsetwacom?

I've decided to use + and - (from the numpad) instead of mouse wheel up / down. Those keys are used by many programs for zooming without a mouse.

# Numpad '+'
xsetwacom set "Wacom Intuos BT S Pad pad" Button 3 "key 0xffab"

# Numpad '-'
xsetwacom set "Wacom Intuos BT S Pad pad" Button 8 "key 0xffad"


The easiest solution for this would be renaming the grub boot entry so that you can identify from the boot menu to which Ubuntu you've to chose right?

So the easiest way to achieve is here:

First install grub-customizer in any of the Ubuntu, best you chose the first from the list. Execute these commands in terminal:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update && sudo apt-get install grub-customizer

Open grub-customizer and rename the list of your OS under List configuration tab. You've to right click and chose rename option:

Clsoe the window, it will prompt for saving etc.. Chose Save & Quit option.
Update grub and restart your system.

sudo update-grub && sudo reboot

From the next boot if you get the changes reflected it means that you've done. Obviously if you don't get any changes then you've to do the same but this time you've to chose second from the list. Hope you can understand what I'm saying. :)


You can use OS-Uninstaller

  OS-Uninstaller is a small graphical tool to perform a clean and quick
  uninstall of any operating system (Windows, MacOS, Ubuntu, other Linux
  distribution..) of your computer.  OS-Uninstaller is a free software, licenced under GNU-GPL. OS-Uninstaller


How long can ubuntu work on a usb drive?

Depends on the USB drive. Cheap USBs such as consumer Lexar drives may die fairly quickly, and are fairly slow.

However, there are some, such as the Sandisk Cruzer Extreme that are basically SSDs, and have much higher tolerances than cheaper drives.

I recommend that when permanently installing Ubuntu on a USB drive that you use a light distribution such as Lubuntu and disable journaling. This will significantly reduce write cycles to the drive- however, disabling journalling puts you at a far higher risk of disk corruption. Make sure to make backups!


One solution I found is the accepted answer from Capturing ONLY desktop audio with ffmpeg : Install pavucontrol, start recording with ffmpeg -video_size 1280x1024 -framerate 25 -f x11grab -i :0.0 -f pulse -vcodec mpeg2video  -thread_queue_size 512 -ac 2 -t 02:00:00 -i default (or whatever), go to pavucontrol, choose Recorings and change Lavf56.15.102 (or whatever) to Monitor of Internal Audio Analog Stereo. Worked for me.

I'll accept an answer which is able to do this without using pavucontrol for change of recording every restart.


How can I get the source code of the sound drivers in ubuntu?

The source code for the driver is freely available from several places, including in the Ubuntu archive itself.

However, you cannot simply take that source code and compile it on Windows, expecting to have a driver for your Windows platform. The open source driver in the Linux kernel is a driver for Linux only, and not for other operating systems.

You will need to get the driver for your sound card for Windows 7, from the manufacturer of your sound card.


Dual monitor resolution changing after reboot with AMD CCC

I tried this method and it works.

Open a terminal and type:

gksudo gedit /etc/X11/xorg.conf

In your xorg file, go to this section:

    Section "Screen"
    Identifier "aticonfig-Screen[0]-0"
    Device     "aticonfig-Device[0]-0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Virtual   1680 1680
        Depth     24
    EndSubSection
    EndSection

add this code or modify:

virtual 1680 1680

try changing these values with a number higher than your resolution of monitor.
Restart the computer.

source: How can I set up dual monitor display with ATI driver?


I am running ubuntu usb edition right now, and it works fine. But I partitioned entire flash drive in one partition and also made a small partition for linux swap. I also installed bootloader on the pendrive, and not the hard disk, and it works. I prefer to press F12 to access the boot screen at start-up, and then select Boot from USB Flash. I could change BIOS settings to place usb boot first but I like it this way better. You may have to press a different key to enter boot screen at startup but it's the same.

Don't forget this one - leave no Fat32 or NTFS free space on the pendrive, I mean you have to partition entire usb flash disk for linux as you find it fit (i find it convenient to make a large single partition ext3 or ext4), and also make a max. 1-2 gb partition for Swap, and then boot the live DVD, and install your system. You may have to format partition again during ubuntu installation, and maybe make some other changes, but on the whole it should work just fine in the end.

Also, don't forget to use the correct iso image for your machine, 32-bit or 64-bit, pae or non-pae and so on.

When asked where you want to place bootloader, choose the usb stick, do not choose the hard disk, I mean place bootloader on the same usb stick where you installed ubuntu.

Good luck with this one, Grzegorz!


Ubuntu 16.04.2 - Connection reset by peer when ssh right after reboot

The way I solved the problem is I went to the host machine and ran a few commands.

sudo mkdir /var/run/sshd
sudo chmod 755 -R /var/run/sshd
sudo service ssh restart

I got connected to the machine after that.


Why does my USB mouse seem to randomly quit working?

If your mouse itself is flaky windows will handle this gracefully and ubuntu will sometimes not.  I had that problem with a logitech mx518.  The cable was bad and ubuntu is (was?) a little iffy on disconnecting and reconnecting your mouse over and over.


Until you find a better option, just run

nvidia-settings

From a terminal or the run dialogue.

Edit: I'm using the old panels-based system and I just found its link sitting in a group called "Other" under Applications. No idea how that's translated in Unity but it should be in there somewhere.


No "Install Alongside OS X" option when installing Ubuntu

I was able to successfully install Ubuntu along side with MacOS X (on Mac Mini 2010) with install option of "something else", here I am giving process I followed for the same:

created bootable USB as mentioned above and then installed reFInd in Mac using admin privileges.
Reduced partition size of Mac HD using disk utility. I have kept 100gb free for Ubuntu, (Note: this free space is not partitioned or Formatted). Shutdown mac after this step.
Started mac with install usb plugged-in into usb port. In reFInd screen select Ubuntu and proceed with installation of Ubuntu.
In Ubuntu install wizard selected "Something Else”, you will not see option for “install alongside with OS X”.
Wizard displayed list of available drives and it showed 100gb free space as "free". Selected option to partition this free space then completed setup of swap area, I have first selected 20 gb of 100gb as "SwapArea". As a next step partitioned remaining 80gb of free space with root directory as /.
Selected 80gb partition for ubuntu install and went ahead with next steps with no issues.

I had some issues with system recognizing my bluetooth keyboard & mice, but otherwise entire process was smooth. I recommend plugging in usb keyboard and mice for install process, Also install on ethernet instead of wi-fi.

Good luck with installation process!

Vinay


Full Ubuntu Flash Drive install won't boot

(1) Make sure that USB stick is inserted before entering BIOS. And consider that some computers list the USB drives under harddisk, so that one should change harddisk boot priorities to enable boot from USB.

(2) How do you install Ubuntu on the USB flash? And consider that the flash will work only on the computer from which you installed Ubuntu on it.


hosting codeigniter project to linux server

Create Directory for your Project

sudo mkdir -p /var/www/myproject

Set Permissions

 sudo chown -R $USER:$USER /var/www/project

Add your Project files in /var/www/myproject
Create Virtual Host

sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/myproject.conf

Next open your Configuration File

sudo nano /etc/apache2/sites-available/myproject.conf

Update your Site URL & Project Root Directory in myproject.conf file

ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/myproject

Enable Virtual Host

sudo a2ensite myproject.conf

Restart Apache

sudo service apache2 restart

That's all, Next Point the DNS & check your Site


How Do I Fix No Sound On Ubuntu 17.04 64bit

Try these

    tar -xvf 0001-LinuxPkg_5.18rc8.tar.bz2
    cd Rt-Linux-HDaudio-5.18/
    tar -xvf alsa-driver-RTv5.18rc8.tar.bz2
    cd alsa-driver-RTv5.18/alsa/
    sudo apt install gcc g++ build-essential patch
    ./configure --with-cards=hda-intel
    make
    sudo make install

Then reboot computer

If you encounter any error, please post that error as code in the end of your question.

Update 1

Related to

    When attempted to install file through terminal using the commands given by an answer below, after the command line make the following error was given :

      error: macro "DATE" might prevent reproducible builds [-Werror=date-time]
             "Compiled on " DATE " for kernel %s"

Try Solutions from

How to disable -Werror=date-time/macro "__DATE__" might prevent reproducible builds

And you can't do make install without successful make and without superuser permissions. try sudo make install. (i have a habit of doing most of admin work from root shell)

Update 2

Also try these with sudo

sudo modprobe -r snd_hda_intel
sudo modprobe snd_hda_intel probe_mask=0x1ff

from https://unix.stackexchange.com/questions/373777/realtek-alc1220-audio-chipset-on-linux-mint-18-1


Windows 10 fall creators update seems to corrupt Ubuntu partition

I received the following boot error on an Ubuntu 16.04/Windows 10 dual boot PC after the Windows 10 Fall Creators Update was installed automatically by Microsoft;

    error: unknown filesystem
    Entering rescue mode
    grub rescue> _

I solved it by a) running Ubuntu using the live CD (Ubuntu 16.04 installation disc) and b) reinstalling grub.

a) Run Ubuntu using the live CD:

Warning: modifying the bios can damage your system

Ensure that your computer's bios is set to boot from the optical media drive first (if a disc is inserted)
Insert Ubuntu Live CD, and restart computer
Choose to start Ubuntu using the live CD (don't reinstall Ubuntu)
If the Ubuntu live session is buggy (for example the compiz graphical user interface flashes), then ignore the user interface and open up a terminal directly (e.g. Ctrl-Alt-F3). Login to the terminal using username ubuntu and no password.

b) Reinstall (Repair/Restore) Grub:

I followed these instructions (from http://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd);

Warning: Using the sudo command, especially from a Live CD can do serious damage to your system. Read all instructions and confirm you understand before executing any commands. When pasting into the Terminal, use Ctrl+Shift+V, NOT Ctrl+V.

Find out what partition your Ubuntu Installation is on. It is usually an EXT4 (linux) Partition. Here are some methods to do this;

i) GParted

launch GParted (included in the Live CD)
Find out the Ubuntu partition (sdXY)

ii) fdisk

sudo fdisk -l
Find out the Ubuntu partition (sdXY)

iii) Terminated Ubuntu Installation [NOT RECOMMENDED]

Use live CD and select to "Install Ubuntu" (without actually installing Ubuntu);
[Welcome] Choose the language you wish to perform the installation and click on Continue button to proceed further.
[Preparing to Install Ubuntu] Next, leave both options from Preparing to Install Ubuntu unchecked and hit on Continue button again.
[Installation Type] Check the Something else option and hit on Continue button to proceed further.
Find out the Ubuntu partition (sdXY)
Click Quit

Mount the partition your Ubuntu Installation is on. Replace the XY with the drive letter, and partition number, for example: sudo mount /dev/sda1 /mnt.

sudo mount /dev/sdXY /mnt

Now bind the directories that grub needs access to to detect other operating systems, like so.

sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys

Now we jump into that using chroot.

sudo chroot /mnt

Now install, check, and update grub. This time you only need to add the drive letter (usually a) to replace X, for example: grub-install /dev/sda, grub-install -recheck /dev/sda.

grub-install /dev/sdX
grub-install --recheck /dev/sdX
update-grub

Now grub is back, all that is left is to exit the chrooted system and unmount everything.

exit &&
sudo umount /mnt/sys &&
sudo umount /mnt/proc &&
sudo umount /mnt/dev/pts &&
sudo umount /mnt/dev &&
sudo umount /mnt

Shut down and turn your computer back on, and you will be met with the default Grub2 screen.

This enabled grub to load properly and boot into Ubuntu. To enable grub to boot into Windows again, I had to c) detect the Windows partition and reupdate grub (from GRUB does not detect Windows);

c) Detect the Windows partition and reupdate Grub:

Detect the Windows partition:

sudo os-prober

Reupdate grub:

sudo update-grub


Ipod crashes after transfering music from Rhythmbox

I had the same issue with my iPod touch. The only fix I could find was to connect it to iTunes. The database schema the Touch uses is somewhat obscure; it's possible that Rhythmbox's developers haven't gotten it down pat yet.


Kindle Paperwhite (10th Gen.) not recognised on Ubuntu 18.04

Make sure the USB cable you are using isn't a cable designed only for charging. Sometimes USB cables that come with wall chargers don't actually have the pins/wires in them to make a data connection.
Check that the Kindle is set to MTP mode if this is an option for your device instead of "Camera" or "Charge Only"


ipv6 doesn't work until I restart radvd on the firewall

Probably be better to understand how things are breaking, but your question was to restart the service without manual intervention; so that's what I'll work with.

Create a systemd service & timer to execute a script which restarts the radvd service.  Copy all the below into a single file onto the Linux GW, chmod 700 the file and execute it using sudo. Obviously change the "24h" to "12h" in the timer part or some other number of hours that suits:

#!/bin/bash

cat <<'EOF'> /root/radvd-restart.sh
#!/bin/bash
#
systemctl restart radvd.service
EOF

cat <<EOF> /etc/systemd/system/radvd-restart.service
[Unit]
Description=Restart radvd Service
[Service]
User=root
Group=root
Type=simple
ExecStart=/bin/bash /root/radvd-restart.sh
[Install]
WantedBy=multi-user.target
EOF

chmod 644 /etc/systemd/system/radvd-restart.service

cat <<EOF> /etc/systemd/system/radvd-restart.timer
[Unit]
Description=Executes /root/radvd-restart.sh every 24 hours
[Timer]
OnUnitInactiveSec=24h
Unit=radvd-restart.service
[Install]
WantedBy=timers.target
EOF

chmod 644 /etc/systemd/system/radvd-restart.timer

systemctl daemon-reload
systemctl enable radvd-restart.service
systemctl enable radvd-restart.timer
systemctl start radvd-restart.service
systemctl start radvd-restart.timer

Again, would be better to understand how things are broken, but this will meet your requirements to stop having to manually kick the service to get it working.


Remove line from a file which is named in another

With awk:

awk 'NR==FNR {a[$0]; next}; {if ($1 in a) next}; 1' f1.txt f2.txt

Input the file with just a single column as the first argument, and the one to check for (first column) membership as the second argument.

NR==FNR {a[$0]; next}, here NR==FNR will only be true for the first file, then we are saving each line into array a so that we can do membership test for the first argument of the second file, then we are going to the next line without any further operation on the second file
{if ($1 in a) next}; 1 will be executed only for the second file, the one to check, here we are checking if the whitespace separated first argument is in the array a, if present then going to the next line otherwise printing the whole line.

Example:

$ cat f1.txt
NM_000031
NM_000032
NM_000033
NM_000034
NM_000022
NM_000035
NM_000036
NM_000037
NM_000023
NM_000038
NM_000039
NM_000040
NM_000041
NM_000042

$ cat f2.txt
NM_000014 3
NM_000015 0
NM_000016 0
NM_000017 0
NM_000018 0
NM_000019 28
NM_000020 0
NM_000021 0
NM_000022 0
NM_000023 0
NM_000024 8
NM_000025 0
NM_000026 0

$ awk 'NR==FNR {a[$0]; next}; {if ($1 in a) next}; 1' f1.txt f2.txt
NM_000014 3
NM_000015 0
NM_000016 0
NM_000017 0
NM_000018 0
NM_000019 28
NM_000020 0
NM_000021 0
NM_000024 8
NM_000025 0
NM_000026 0


Unfortunately, CBS has made a change on their end that now blocks Linux users. Currently, there are only two options:

You can subscribe to CBS All Access through Amazon Prime (I have not personally tried this)
Or you can use a Windows/Mac OS to watch CBS programs.

Personally though, I would suggest you simply cancel your service and tell them it's because they've blocked you.

References:

Quoted from the email I received from CBS support:

  Looking at your viewing activity, we see that you are using a computer running the Linux operating system. Please be advised that we do not currently support this operating system.

A few other threads can be found online from people who were able to watch from Linux and are now unable.
Reddit comment of a Linux user watching via Prime (Archived link)
List of requirements to watch CBS in your browser (Archived link)


How to access shares from Android device with KDEConnect using the command line

Mconnect is a KDE Connect protocol implementation in Vala/C available via github.com. It doesn't need KDE libraries and comes with a client that lets you easily share files from the command line with e.g.

 mconnectctl share-file /org/mconnect/device/0 /path/to/file

See the linked github page for more.

You should be able to use mconnectctl to test whether a specific device is paired, e.g. for a phone called Motorola Moto G Maciek connected to /org/mconnect/device/0:

mconnectctl show-device /org/mconnect/device/0 | awk '/Motorola Moto G Maciek/{f=1}/Paired/{{if(f){g=1}}}f&&g{print $2;exit}'

This will return true if paired and can be used in a script.


Can't enter password in nagios3 installation wizard

You could try another terminal, say xterm.

In any case, the password that is being asked here is for basic authentication via your (usually Apache) webserver. It is saved using htpasswd files, so you can set a blank password now and always set it later. Install apache2-utils, and then run:

sudo htpasswd /etc/nagios3/htpasswd.users nagiosadmin

(You can also run sudo dpkg-reconfigure nagios3-cgi, to go through the configuration steps again.)


Why isn't lo-menubar installed by default in LibreOffice?

From what I've read, there may be cases where it does not work correctly. For now, at least, it is not enabled by default:

https://bugs.launchpad.net/lo-menubar/+bug/760879
https://bugs.launchpad.net/ubuntu/+source/lo-menubar/+bug/739184


GParted resize partition Error - e2fsck: Possibly non-existent device?

Apparently I was able to resize the root "/" partition while my OS was running and "/" was mounted.

Root file system /dev/sda8 extended to 48.83 GB:
http://imgur.com/lINIUwn

Contrary to what I read everywhere on GParted official docs and forums, it is possible. I have restarted my system and verified it using disk-usage-analyser & gnome-disk utility.

Anyone knows how was this was possible?
I'm willing to share further details.


Is full partition encryption the only sure way to make Ubuntu safe from external access?

Truecrypt is not the solution for an encrypted Ubuntu system, LUKS is the Ubuntu solution for disk encryption. You can use the alternative installer CD to enable it on a fresh install.

Note that an encrypted partition can still be destroyed, the encryption prevents unauthorized access to files, but does not protect it from being damaged. If data reliability is really an issue, consider buying another (external/internal) HDD for installing Ubuntu/Vista on it. Remember to put it on a safe place, though.


You will initially have to use the "nomodeset" to simply get into the installer / preview!  I have ONE monitor displaying correctly and working great.

Trouble is I have TWO 28" Samsung Monitors and the HDMI one is the only one working.  The Display Port monitor does not show anything, black screen, but Ubuntu THINKS it's working.

I used the Synaptics Package Manager to download and install the latest nvidia and then the system upgraded it one more time for me.  After all that I have a great looking screen, on ONE monitor, and even had to reduce the resolution because Ubuntu in 4K was just WAY too small for text and reading anything.

Still trying to figure out how to get the other monitor to show something, but it appears 16.04 and GTX-970 are not very compatible.  Merans I just might have to go back to Mint.  THAT works.  Mint 18.2 was working till it crashed and would not boot, so I thought I would try Ubuntu. Not such a good idea as it turns out.


Buttons do not respond in Motif programs

The problem was with the compiz package used by Unity 3D.  Unity 2D does not exhibit the issue.  As of 14-Feb-2012 the issue has been corrected. If you can update to the current fixed versions from a terminal window by doing:

sudo apt-get update
sudo apt-get upgrade

Or use the graphical "Update Manager" to install the latest versions.

You can get more information on the Ubuntu web site under:
  Bug #890947


Formatting an ext4 partition with a 16KB block, possible?

You need to use mkfs.ext4 with -C 16384 and also -O  bigalloc. From man mkfs.ext4:

  -C cluster-size
  Specify the size of cluster in bytes for filesystems using the
  bigalloc feature.  Valid cluster-size values are from 2048 to 256M
  bytes per cluster.  This can only be specified if  the  bigalloc
  feature  is  enabled. (See the ext4 (5) man page for more details
  about bigalloc.) The default cluster size if bigalloc is enabled is 16
  times the block size.

The default cluster size would be 64KiB (16x4) if using 4096 byte blocks, as found in /etc/mke2fs.conf. This only applies if bigalloc is enabled at all; otherwise the cluster size is the block size.

Depending on the number of files you expect, you may also wish to set -i inode_ratio. The default is 16KiB+ on most systems, so you won't run out; but it may be inefficient if the average file is much larger.

The version of ext4 in your system's kernel must support the bigalloc feature, added in Linux 3.2.


How to get a proxy for DBus object that is not well known?

The add_signal_receiver function can be used without specifying a bus name. This can be useful for capturing signals when the bus name, interface or specific signal name is unknown.

session_bus = dbus.SessionBus()

session_bus.add_signal_receiver(self.do_something,
                                signal_name=None,
                                dbus_interface=None,
                                bus_name=None,
                                path=None)

The above code calls the do_something method every time a signal is received on the session bus.

In my original question, I stated I wanted to respond to 'AboutToShowGroup'. However, after closer inspection of the 'com.canonical.dbusmenu' interface, I realised it is in fact a method and not a signal. I have since chosen another signal to react to.


Ubuntu stuck at boot screen and login loop after changing locale

Open a console window with Ctrl+Alt+F1, log in there, and run the command sudo locale-gen to regenerate your locales based on the original locale definitions.


My computer won't boot from usb, is that possibly because it currently runs ubuntu server?

This is not an answer to your USB problem, but ...

You don't need to reinstall to get desktop, just run:

sudo apt update
sudo apt upgrade
sudo apt install ubuntu-desktop

in a terminal. This will install Unity desktop.


Ubuntu 14.04 - Redshift fails to launch on startup

Here's what I did to get it to work:

1) Under applications, go to Startup Applications. If an entry for Redshift already exists then click on it and then click on edit. Otherwise, click add. Set name to Redshift and set the comment to whatever you want. For the command, enter:

gtk-redshift -l manual

Click save.

2) In your home folder press ctrl+h and that should list all of the hidden folders(folders beginning with a '.'). Go into your .config folder and create a new file and call it redshift.conf. Paste the following:

; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
;brightness=1.0:0.5

; The location provider and adjustment method settings
; are in their own sections.
; This is an example lat long for Portland, OR
[manual]
lat=YOURLAT
lon=YOURLON

; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
;[vidmode]
;screen=1

Go here to get your latitude and longitude and replace 'YOURLAT' and 'YOURLON' with the respective values. Save and close the file. Restart computer and Redshift should have started(indicated by the lightbulb icon the the menu bar).

So, hopefully this helps someone. If this is against the rules or anything for whatever reason I apologize. Hopefully this helps someone out there.


Try to install from another CD or a USB flash drive. I'm running Lbuntu 11.10 on my older dektop (256 mb RAM,Pentium 4 2.3 Ghz). Your configuration is good enough to run any version of Ubuntu. So, please try another CD or USB flash drive.Let me know, what happen.


I found a solution on the Pygame wiki:

  Python 3.x

  #install dependencies
sudo apt-get install mercurial python3-dev python3-setuptools python3-numpy python3-opengl libav-tools libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsmpeg-dev libsdl1.2-dev libportmidi-dev libswscale-dev libavformat-dev libavcodec-dev libtiff5-dev libx11-6 libx11-dev fluid-soundfont-gm timgm6mb-soundfont xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic fontconfig fonts-freefont-ttf

# Grab source
hg clone https://bitbucket.org/pygame/pygame

# Finally build and install
cd pygame
python3 setup.py build
sudo python3 setup.py install

# Run some tests
python3 -m pygame.tests
python3 -m pygame.examples/aacircle
python3 -m pygame.examples/aliens
python3 -m pygame.examples/freetype_misc
python3 -m pygame.examples/glcube
python3 -m pygame.examples/sound
python3 -m pygame.examples/stars

You can also check installation by running import pygame in IDLE.


samba user accounts. specific user permissions vs guest access permissions

I'll give you a couple of ways:

But First: Remove the guest account = samba-guest line from smb.conf. There already is a guest account set up by default and it's name is "nobody". You can verify this yourself if you want:

testparm -sv /dev/null | grep "guest account"

** One way to do this is with a share definition that looks something like this:

[Test]
path = /mnt/Test
guest ok = yes
read only = yes
write list = jim
create mask = 0755

Just make sure that Test is owned by jim:

sudo chown jim /mnt/Test

It will be read only to everyone but jim. If your clients are running either Linux or macOS they will always be offered a choice of connecting as anonymous / guest or with a user name. Worse case you can use Connect-to-Server in either OS to force credentials. Windows is the problem child since it will not be prompted to what it sees as a guest share. One way around this is to "map" the "drive" which is the closest thing in Windows to Connect-to-Server.

** Another way is to force a credentials prompt for everyone ( guest ok = no ) but still only allow a write by jim:

[Test]
path = /mnt/Test
guest ok = no
read only = yes
write list = jim
create mask = 0755

Here the guest user would submit the user samba-guest with it's samba password.

** And remember to add these user(s) to the samba password database:

sudo smbpasswd -a jim
sudo smbpasswd -a samba-guest


Ubuntu can't find my bash-script at /usr/bin/

TL;DR Start your script with trans.sh, that's the full name.

Explanation

rwxr-xr-x  1 root root         131 Jun 27 12:30 trans.sh*

rwx

The owner root has read rights
rwx

The owner root has write rights
rwx

The owner root has executable rights

rwxr-xr-x  1 root root         131 Jun 27 12:30 trans.sh*

r-x

The group root has read rights
r-x

The group root doesn't have write rights (-)
r-x

The group root has executable rights

rwxr-xr-x  1 root root         131 Jun 27 12:30 trans.sh*

r-x

All others have read rights
r-x

All others doesn't have write rights (-)
r-x

All others have executable rights

And more

The name of your script is trans.sh and not trans

/usr/bin$ ll | grep trans.sh
-rwxr-xr-x  1 root root         131 Jun 27 12:30 trans.sh*

/usr/bin$ trans
No command 'trans' found, did you mean:
 Command 'ctrans' from package 'ncl-ncarg' (universe)
 Command 'trang' from package 'trang' (universe)
trans: command not found

If you start $PATH, than the content of $PATH will be executed, therefore No such file or directory.

$ $PATH
bash: /home/vitaly/soft/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:
No such file or directory

To show the content of $PATH use this command

echo "$PATH"


You are referring to a .desktop file. These files can be used to run commands, applications etc.

The most basic version of a .desktopfile:

[Desktop Entry]
Name=Some Name
Exec=<command>
Type=Application

In your case, you want to run a series of commands, using sudo. In that case you need:

[Desktop Entry]
Name=Some Name
Exec=/bin/bash -c "command1&&command2&&command3"
Type=Application
Terminal=true

You need to save the file with the extension .desktop, e.g. run_commands.desktop. To use these files from the desktop, make it executable.

Explanation

To use complicated commands in a .desktopfile, the Exec= line should look like:

Exec=/bin/bash -c "command1&&command2&&command3"

to chain commands in a .desktop file, as if each command would be on a new line in a script, you have to use && between the commands.
If you use sudo in a command, you need to either set:

Terminal=true

so the commands will run in the terminal and ask you for the password, or you need to use gksu instead of sudo, so gksuwill ask you for your password. In that case, you would have to install gksu, which is not by default on your system:

sudo apt-get install gksu

If the command is too complicated or too long to handle in a .desktop file

If your series of commands is too long to handle in a .desktop file, write them in a small script, like you did, and call the script from the .desktop file. The Exec= line in the .desktop file should then look like:

Exec=/bin/sh mobi_mani.sh

EDIT if you need to run commands in the terminal

You can also use the following to run commands from the terminal:
Set in the .desktopfile as Exec= line:

Exec=gnome-terminal -x /bin/bash -c "<command1>&&<command2>&&<command3>"

Then, assuming you use gnome-terminal, go to Preferences (gnome-terminal) > Profile Preferences > Title & Command, then from the dropdown list "When command it finished" > keep terminal open:

This practically cannot fail.


Telegram (Desktop) - Can't input Chinese

It's better if you use fcitx instead of ibus it way more consistent when it comes to input into qt applications.

Two other options is to use different telegram clients ither you can use sigram or install pidgin with a telegram plugin.


Problem while installing .deb package using Ubuntu Software

I don't often use Ubuntu Software, but from my experience Ubuntu software is painfully slow. For alternative, considered try gdebi. To install, press Ctrl+Alt+T to go to a terminal and type:

sudo apt-get install gdebi

Other ways is installing via dpkg, followed by apt-get install -f to fix missing dependencies:

sudo dpkg -i ~/Downloads/file.deb

In the past, you needed to change the working directory to the folder that contained the .deb file and run separate commands for dpkg and apt-get. In 16.04, though, you can simply use the apt command:

sudo apt install ~/Downloads/file.deb


No such file or directory when I type "cd desktop"

The path names are case sensitive.

Therefore, it should be

cd Desktop

instead of

cd desktop


Printer DNP DS-RX1 doesn't print second file or page, end with error [Job N] Printer Status: Idle

Many thanks to the driver developer - Solomon Peachy, he fixed that bug.

git clone git://git.shaftnet.org/selphy_print.git
cd selphy_print
make && sudo make install

By the way he wrote to me:

  One thing that I would strongly recommend is filing a Ubuntu bug to
  request in the 14.04 LTS release they upgrade to gutenprint 5.2.10-final
  (rather than -pre2).


How to share files between two Ubuntu 14.04 computers

I was able to share between two Ubuntu 14.04 computers.  I checked the share option on the appropriate folder on one computer.  Then on the other computer I used Files --> Network --> Connect to Server and entered the server address as smb://ip.  Is this exactly what you tried?


I’ve been hacked and Ubuntu has been loaded to a FTP server. Lost admin privileges.

At this point, there is no way to 100% insure you're safe without entirely formatting the drives and reinstalling. Anything less is potentially unsafe, so that is the route I suggest you take.


/dev/sdb is your USB drive, and GParted is showing it correctly. It should be mounting fine in Nautilus. The USB drive is also bootable.

With the information you gave us in your question, that's the best I can do.

EDIT: Reformat the disk, as we know that works :)

EDIT 2: You can use unetbootin to make a Windows Install USB that is bootable.


How do I install gtk-v4l on Ubuntu 16.10?

You cannot install the mentioned package since the ppa you added does not have the release package for yaketty yet. So you can wait for a few weeks, it will probably be updated for the 16.10 release.

PPA for libv4l v4l-utils


What is Ubuntu's equivalent of an exe file?

You can use:

apt-get install -d

To download software and dependencies without installing them. The .deb files (pretty much equivalent to Windows .exe installers), are then downloaded to /var/cache/apt/archives/

Unless you've issued apt-get clean pretty much anything you've ever installed via apt-get should have the .deb files stored there.

Also you can install the .deb files via dpgk -i but you have to remember to install the dependencies (and their dependencies and so on), first. Or you should also just be able to double click a .deb file in your file browser and Software Center should take care of it for you.

For example: I want to install gedit (which is included with Ubuntu normally so it won't download tons of dependency .deb files). But I have a system that, for whatever reason, doesn't have gedit and has no internet connect.

So first, on a computer connected to the internet, I run apt-get install --reinstall -d gedit (because if you try running apt-get install -d gedit on a system with gedit already installed to the latest version it just tells you it is already installed), which then goes through the normal process of downloading the package (in this case there are no dependencies), and then stops.

Then I locate the file under /var/cache/apt/archives/ ...

... and move it to the computer which needs gedit installed and install it, in this case using the Software Center.

Or I could install it using cd /var/cache/apt/archives and dpkg -i gedit_3.10.4-0ubuntu4_amd64.deb


How can my TFTP server host files larger than 2GB?

You can get the source for the HPA tftp/tftpd with apt source tftpd-hpa.

Have you tried transferring a file >2G with the hpa tftp client? If that succeeds, the culprit is the PXE boot code, and there is very little you can do about it.

In any case, PXE is not supposed to load the entire filesystem image; it should just load the kernel and initrd, and access the filesystem image with NFS.


How to build a PPA from a git repository?

The first step you want to master is how to: Package New Software.  That is taking either your compiled executables or your icon theme and turning them into a .deb package that apt-get can use.  Once you have your icons in a .deb file then see the PPA link in that same page.


Screen freezes upon screensaver when playing video


How to remove remove windows boot manager

You can remove Windows Boot Manager by running in terminal

sudo efibootmgr -Bb 0000


Looks like the easiest thing to do is to change the Grub order.
What you have to do is to go into your terminal and write:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
gksu grub-customizer

Then go to the Grub Customizer program and press the option to boot to the mac and press the up arrows on the main menu to make it go on the top of the menu.
Then restart your computer.


connection to wifi public fails after captive portal login, kubuntu 18.04

Getting to a wifi login page at hotspots

The Problem: The wifi icon on the top right shows '?' with no wifi connection. This is because you first need to reach that wifi network's log-on page in order to accept the terms and conditions etc. But no browser shows that page. Solution 1:

Settings > Privacy > connectivity Checking > Off.

The above is enough to show some log-in pages. Some however (e.g. gwr on-train wifi) also require solution 2:

Settings > Wi-Fi > select the settings (click the cog icon) for the network you are trying to reach. Go to the IPv6 tab. For IPv6 method select 'Automatic, DHCP only' (instead of the default setting 'Automatic'). Click Apply.

It may also help to do:

Settings > Network > Network Proxy - Off. (Click on the settings button with the cog icon on it.)


How to run Ubuntu touch apps on Ubuntu desktop?

It's all done with the help of a PPA. All you have to do is to open a terminal and run the following command (you will need to be root):

sudo add-apt-repository ppa:ubuntu-touch-coreapps-drivers/daily
sudo apt-get update
sudo apt-get install touch-coreapps

When the installation finishes, you can find the application in Unity Dash. According to Alan Pope, the apps have been tested on Ubuntu 13.10 and Ubuntu 14.04.

Source: http://linux.softpedia.com/blog/How-to-Test-and-Use-Ubuntu-Touch-Core-Apps-on-the-Ubuntu-Desktop-433742.shtml