Pratik is not 100 % correct; Unison does have a nice GUI:

It can be helpful in getting you started.

However, it is also possible to run from the command line, which makes it easy to put in a cron job, so that you can schedule it to run every 15 minutes or whatever you want. You'll typically create a profile with a certain name, you can do this in the GUI, but then you can run that profile from the commandline like

unison -batch name_of_your_profile

This is useful since you can then make a cronjob out of it. Type crontab -e, then paste in the line

*/15 * * * *      /usr/bin/unison -batch name_of_your_profile   &> /tmp/unison-cron.log

and exit the editor. Your unison command will now run every 15 minutes, and output any errors to the file /tmp/unison-cron.log.

Actually, it seems like there's even a GUI for cron, Gnome Schedule(friendly intro to it here). Never tried it, but I guess it makes running Unison from cron even more user-friendly …

See also the Ubuntu wiki page on Unison.

Unison is quite powerful, I've used it for a long time to sync stuff between two laptops, a desktop and a remote server … It's quite good at ensuring you get the newest and correct content, and if there's a conflict it's easy to merge. It's not a backup tool, though; if you delete everything on one end, you'll find it deleted on the other end too ;-)


Logitech keyboards should work out of box with unifying transmitter. But if you have to configure it manually, you should install the "solaar" package.

Installation

sudo apt-get install solaar solaar-gnome3

If you are running Ubuntu before 16.04, you have to add repository before:

sudo add-apt-repository ppa:daniel.pavel/solaar
sudo apt-get update

How to use

The "solaar-gnome3" package provides a gnome application which can be used to add or remove devices from Logitech's Unifying dongle


Why does rebooting with control alt delete not require superuser privileges

Ctrl-Alt-Del combination only works when you're at the physical keyboard connected to the machine (as opposed to being connected to a remote machine via an SSH session). So it only works if you have physical access to the machine. In this case, asking for a password makes no sense - you can just use Reset button or even unplug the machine from the wall socket or pour a cup of coffee inside it - all those actions will effectively shut it down without asking for a password.

You can disable this feature if you want: see Console Security in Ubuntu wiki


How to find a string of multiple line in shell script?

One possible way might be to replace grep by pcregrep (available from the 'universe' repository), which supports multiline matches, and then instead of searching for the literal string

Time series prediction with ensemble models

search instead for the perl compatible regular expression (PCRE)

Time\s+series\s+prediction\s+with\s+ensemble\s+models

where \s+ stands for one or more whitespace characters (including newlines). Using the bash shell's built-in string substitution capabilities to perform the latter step

pdftotext "$file" - | pcregrep -M "${string// /\\s+}"

If you can't use pcregrep then you might be able to get the output you want using plain grep with the -z switch: this tells grep to consider the input "lines" to be delimited by NUL characters rather than newlines - in this case, effectively making it treat the whole input as a single line. So for example if you only want to print the matches (without context)

pdftotext "$file" - | grep -zPo "${string// /\\s+}"


Wily Werewolf (15.10) and newer:

You don't have to do anything. You are using systemd by default.

Trusty (14.04) and older:

You are out of luck. Ubuntu repositories do not provide the systemd binaries for versions before Utopic, despite the fact that their sources do generate the files. You can learn more about this in this answer.


There's a bug report on Launchpad about this issue: Bug #1329629
https://bugs.launchpad.net/ubuntu/+source/account-plugins/+bug/1329629


shell - cut: you must specify a list of bytes, characters, or fields

You are just missing the - sign before your -f argument to cut.  I was able to run your script and have it function properly after making that one modification.


Click in the power icon at right corner of your taskbar and chose "System Settings". You can access "Displays" icon when you open System Settings:


ubuntu root password set in recovery mode not working

Graphical root logins are not supported. This is separate from root logins in general, which work fine when enabled, though we usually discourage them since sudo gives you the same power and has some advantages (see below).

The specific mechanism that's stopping you from logging in graphically as root--assuming you're entering root's password correctly--is that your display manager is configured not to allow them. You could attempt to reconfigure it so it does (your display manager is probably GDM). But even if you do, graphical root logins are likely to work very poorly if at all, because this is not a use case that is supported or tested in Ubuntu.

Graphical root logins should also be avoided because they involve running a lot of stuff as root unnecessarily. Even if they worked perfectly, users would still be well-advised never to use them under any circumstances. (This is why no effort has been undertaken to make them work in Ubuntu.)

When you log in graphically, you should do so as a non-root user. When--if--you log in as root, you should, and can, do so non-graphically. Although you could use the same method you used to set a password for root to set one for another user, you don't have to. Since you've enabled root logins, you can set a password for a non-root user efficiently and without rebooting:

Switch to a text-based virtual console by pressing Ctrl+Alt+F2.

(In general, Ctrl+Alt+Fn switches to the virtual console ttyn. When the virtual console you're switching from is text-based, you can omit Ctrl from this key combination, though you don't have to.)
Log in by entering root as the username and the password you set for root as the password. This is a non-graphical login. Based on the information you've provided, there's no reason to expect this to fail.
Run passwd user to set a password for some non-root user account user. Replace user with the actual username.

Or run adduser user to create a new user user. Enter the requested information. The real important bit is the password, though most people will want to put something in for the full name field too.
Switch back to the virtual console on which the GUI is running. This is usually tty7, so press Ctrl+Alt+F7.
Log in as the user whose password you set.

Since you have the root account enabled, you can run su in a terminal to get a root shell from which you can run commands as root. Use su - if you want this to behave as an initial login shell. The shell you get from su or su - lasts as long as you like (i.e., until you run exit in it or otherwise quit it), but it is best to use it only for administrative tasks that a non-root user couldn't directly perform. su -c 'some-command' runs a single command as root rather than starting a shell. (When some-command is just one word, i.e. when there are no command-line arguments, you can omit the quotes.) When you use su, you enter root's password, as you would when logging in as root. You must enter it each time you run su.

With that said, sudo and pkexec--rather than root logins and su--are the generally recommended way to perform administrative actions on Ubuntu. I recommend you consider adding a non-root user to the sudo group (an existing user or a new user), which makes that user an administrator. Then that user can run commands as root with sudo (and pkexec). One way to do this is to run usermod -a -G sudo user in step 3 above. Or perhaps your existing non-root user account is already in the sudo group; you can run groups user to check.

To run a command as root with sudo, you would usually use sudo some-command. Even when some-command consists of multiple words, it need not (and must not) be quoted. This is one of the ways that sudo is easier than su -c.

You also do not have to enter your password every time; instead, you need only enter it to use sudo in a terminal where you have not used sudo in the last several minutes. This way, it is efficient to run commands as root only when you need to, because you can interleave sudo commands with other commands, without having to type your password many times as you would with su -c instead of sudo, and without ending up running all commands entered into that terminal as root, as you would if you used su to get a root shell.

If you do want a root shell, you can get one with sudo -s, which is much like what you get from su, or sudo -i, which is virtually identical to what you get with su -.

When you use sudo, you enter your password, not root's password. Therefore root need not have a password set; the root account can be "disabled," yet you can still run commands as root with sudo.

If you decide to switch entirely to this recommended method--that is, if you administer your system in the way most Ubuntu users (and a sizable fraction of Debian users) do--then you can then re-disable root logins by running sudo passwd -dl root. This will keep you from logging in as root or becoming root with su, but you can still become root with sudo, including with sudo -i.


This problem usually occurs when the hard disk drive is having a failure, necessarily physical.

Somehow the drive is experiencing an issue when trying to get the buffering from the video in the hdd, this can be caused by delays in the hdd and/or bad sectors allocating data.

For a test: If the problem is happening exclusively in a single file, please make an exact copy of the file, then try to run the new file, if the problem persist in the new copy then you are experiencing a problem with your codecs (try installing/updating (removing/reinstalling) restricted extras). If you are absolutely sure that there is no problems with the codecs try using a lighter video player (dragon player and gnome player come to my mind).

If your problem is happening with whatever video you choose from your hard disk drive, then you may be experiencing a major problem with the delays on your hard disk drive. Then I will recommend the usage of a tool like HDD Regenerator in order to check the HDD performance and determine if there are sectors failing/delaying and they can be recovered.

WARNING! The usage of tools like HDD Regenerator will result in the loss of data if you run the process directly in the HDD without backing up/cloning your partitions/disks. Make sure you do a complete BACKUP/CLONING before running this tool.

HDD Regenerator will erase everything in your hard disk drive in order to do the needed changes so you can redo from start again.

Based on your comments to this answer I can change parts of this in order to provide further support.

Good luck!


The issue is grub was not correctly updated to show the new OS version and kernel. You should not need to re-install.

Provided that you are using Grub2, open your terminal and enter the following command to update grub:

sudo update-grub
It will show a list as it configures the boot order which will look similar to this:

Generating grub.cfg ...
using custom appearance settings
Found linux image: /boot/vmlinuz-3.7.0-7-generic
Found initrd image: /boot/initrd.img-3.7.0-7-generic
Found Windows 7 (loader) on /dev/sda1
Found Debian GNU/Linux (6.0.7) on /dev/sda4
Found openSUSE 12.3 (x86_64) on /dev/sdb1
done

Once finished reboot your computer, grub should now have the new and correct entries.


Chromium config folder is missing in Ubuntu 18.04

If you installed the browser from the Software Center, you need to know there are two possibilities:

The one named "Chromium" is what is known as a snap version and you can read more about snaps here.

Notice the source is the Snap Store and the download size is 141.6 MB.

The one listed as "Chromium Web Browser" is the regular version, like most of your other software, from the repositories.

The source is the universe repository and its size is only 57 MB.

(By convention, if both a snap and a regular version are available for the same application, the snap version is listed above the regular version. See here.)

Your browser profile in the case of the second version, the regular version, will be in ~/.config/chromium as you pointed out in your question.

With the snap version, things are different. Snaps you install as a user will be in your home folder in the snap subfolder.

To find your profile folder for the snap version, point your file manager or terminal to ~/snap/chromium/471/.config/chromium.

Given the nature of snaps, you may find your experience a bit restricted in interacting with the rest of your system.

If you have indeed installed the snap version and wish to remove it, make sure it isn't running, open a terminal and execute snap remove chromium. You'll get an interface asking you for your password. Provide it and press Enter. Done. Keep in mind that everything in ~/snap/chromium, including your profile data, will be removed!


Acer Nitro 5 touchpad and keyboard are not working during Ubuntu installation

Try seeing what options are available in the BIOS that relate to the touchpad and keyboard. Usually you can open the BIOS on Acer machines by pressing the F2 or the Delete key during startup. There might be an option to change from "Advanced" to "Basic" or "PS/2". If so, you could try changing this and see if you have any luck back in Ubuntu.


How do you disable middle mouse click even after restarting?

This is what I do on Ubuntu 20.04 (uses Wayland by default) to disable my middle button or remap my middle button.
To find my device id:
$ xinput --list
⎡ Virtual core pointer                      id=2    [master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]
⎜   ↳ xwayland-pointer:17                       id=6    [slave  pointer  (2)]
⎜   ↳ xwayland-relative-pointer:17              id=7    [slave  pointer  (2)]
⎜   ↳ xwayland-touch:17                         id=9    [slave  pointer  (2)]
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ xwayland-keyboard:17                      id=8    [slave  keyboard (3)]

I had to do a couple test before I found the right id. For me, it was 6.
To see current button map:
$ xinput get-button-map 6
1 2 3 4 5 6 7 8 9 10

To disable middle button:
$ xinput set-button-map 6 1 0 3 4 5 6 7 8 9 10

To remap middle button to left click:
$ xinput set-button-map 6 1 1 3 4 5 6 7 8 9 10

In order to run at startup, create a file and make sure it's executable (chmod a+x):
#!/bin/bash
xinput set-button-map 6 1 1 3 4 5 6 7 8 9 10

Ubuntu and other GNOME based distributions come with an application simply called “Startup Applications”. It can be used for managing apps and scripts that run on a fresh system reboot or login.  So just do a search for it, open it and add the file you just created.


Ubuntu 20.04 - missing icon images for some applications

Desktop files are here: /usr/share/applications for software installed for all users, and $HOME/.local/share/applications and the corresponding icons here: /usr/share/icons and here $prefix/share/icons/


What files are run when I log into the desktop?

Actually this is a great question for Unix & Linux because it is not only related to Ubuntu.

There is a really nice answer on SuperUser which describes the Difference between .bashrc, .bash_profile and .profile. The accepted answer explains this pretty well. Here are some relevant parts from that answer:

  Bash is a Bourne-like shell. It reads commands from ~/.bash_profile when it is invoked as the login shell, and if that file doesn't exist¹, it tries reading ~/.profile instead.
  ...
  If the shell is not a login shell, it doesn't read ~/.profile. When you start bash as an interactive shell (i.e., not to run a script), it reads ~/.bashrc

There is also some information about logging in using X:

  On modern Unices, there's an added complication related to ~/.profile. If you login in a graphical environment (that is, if the program where you type your password is running in graphics mode), you don't automatically get a login shell that reads ~/.profile. Depending on the graphical login program, on the window manager or desktop environment you run afterwards, and on how your distribution configured these programs, your ~/.profile may or may not be read.

So if I understood your question correctly, you are asking what file is loaded if you log in in graphical mode (using lightdm, in this case your login screen is probably the Unity Greeter). And here I'm pretty sure that in this case it is .profile. The accepted answer from this question also tells us that:

  Most combinations of display manager (the program where you type your user name and password) and desktop environment read ~/.profile from the login scripts


How to Install Ubuntu Apps (e.g. Foliate ebook reader) on my Android device running Ubuntu Base image?

This answer does not require a rooted Android device.
General Software installation
Almost all apps in the official Ubuntu repositories (e.g. LibreOffice, GIMP) are also available for ARM, and the procedure for their installation is same as in a AMD64 desktop computer. By default, you are the root user in Termux, and you won't need sudo.
apt install name-of-the-app

 Mypaint in XFCE desktop in an Android phone
For some reason, Android does not allow running sandboxed apps distributed through snap and flatpak channels (Flatpak shows segmentation fault when one tries to add the flathub repo). I have not tried appimages.
Foliate
However, certain apps (like Foliate) need some special tweaks after its installation. Since snap and flatpak are not available, we can install Foliate with its PPA.
add-apt-repository ppa:apandada1/foliate
apt update
apt install foliate

At this point you will notice that it opens, but goes into an endless loop when one tries to open a book.
The workaround is to prevent sandboxing in Webkit, which Android does not allow for some reason. You can use Hacker's Keyboard or scrcpy to conveniently edit files in a phone.
Open a terminal, and enter the command
nano /usr/share/applications/com.github.johnfactotum.Foliate.desktop

(Alternatively, you can use a GUI text editor)
And change the the Exec entry to
Exec=WEBKIT_FORCE_SANDBOX=0 com.github.johnfactotum.Foliate %U

(previously it was Exec=com.github.johnfactotum.Foliate %U)
And, for the library view (at the end of the .desktop file),
Exec=WEBKIT_FORCE_SANDBOX=0 com.github.johnfactotum.Foliate --library

 Foliate running in XFCE desktop in a phone
Now exit and restart Ubuntu. Foliate would open books successfully.
I found that adding WEBKIT_FORCE_SANDBOX=0 to .bashrc does not work for some reason.

 Foliate in fullscreen mode. The screen resolution is manually set to 700x1500 to force portrait mode.
Tips/Workarounds:

Opening Books - Sometimes, Foliate opens the previously read book when you double click a new .epub file. The workaround is to use Open... in the Foliate menu, and select in the the book you want to open with the file manager.

Handling updates - The edited desktop file would be replaced when Foliate receives an update. You can copy the edited .desktop file to your desktop
cp /usr/share/applications/com.github.johnfactotum.Foliate.desktop /root/Desktop/

and restore it after Foliate is updated
cp /root/Desktop/com.github.johnfactotum.Foliate.desktop /usr/share/applications/

Portrait Mode - If you want to read books in portrait mode, change the screen resolution of VNC server to something like 700x1500 (you can find what best fits your phone screen with some trial and error.) Foliate would automatically switch to portrait mode.

Fullscreen Mode -- You can make Foliate fullscreen (Menu --> Fullscreen icon).

Text to speech -- You will have to enable sound to use Text-to-speech. See this question and answer for Google Text to speech (its quality is much better than espeak or festival)

Themes - The default looks of any DE installed in the Ubuntu Base image may not be very good. You can install GTK themes and Icon themes to make apps look better. Many good themes (e.g. Arc GTK theme and Papirus Icon theme) are already available in the official Ubuntu repositories.


How to install Cambridge dictionary without wine?

Software not intended for usage on Linux will not work with Linux.

All methods will envolve some sort of usage of Windows where virtualization with VMWare or VirtualBox is the best thing to use. Even far superior to WINE.

The best option to get rid of this (to me ;) ) unhealthy dependency you have on Windows is to take a plunge and try to get the hang of one of our native versions. Or to focus on a version that is independent of operating system.

This is a bit much to go on: https://askubuntu.com/a/417132/15811 but it is worth the effort ;)


You can get the manpages (the "manual") for a package with the man command.
If you run man ping in a terminal you will get a detailed description of the ping utility and instructions on how to use it.
In the manpage, there is the following entry:

ICMP PACKET DETAILS
An IP header without options is 20 bytes.  An ICMP ECHO_REQUEST packet contains an additional 8 bytes worth of ICMP header  followed  by
an  arbitrary amount of data.  When a packetsize is given, this indicated the size of this extra piece of data (the default is 56). Thus
the amount of data received inside of an IP packet of type ICMP ECHO_REPLY will always be 8 bytes more than  the  requested  data  space
(the ICMP header).

Oh, and time is calculated in milliseconds (ms)


Configuration of a bridge with a static IP with the netplan to be used with linux container

I've tried another guide. The trick is not to assign eth0 a separate address. Just leave it without addresses and your host will share IP with bridge.
But there's another problem. After reboot something break this config, the bridge loses its broadcast address and you don't have internet access unless you run netplan apply again.

I think that it may be due to some override from LXD (I'm using lxd bridge).


How to install ubuntu on MSI GE63 without 'acpi=off'

I had the same issue on the same laptop . In short: update the bios. You can find the update files here. Just remember to disable secure boot and fast boot again after updating the bios.


Switch audio outputs without using the GUI dialog for PulseAudio

You might find your solution here:

Audio output device, fast switch?

or here:

How to change pulseaudio sink with  "pacmd set-default-sink" during playback?


You can try typing startx in the terminal and see if that works.


How to correctly set environment variable (which may not exist)

From Ubuntu help:

Note: You can only set this environment variable inside an interactive shell. Since Ubuntu 9.04 Jaunty Jackalope, LD_LIBRARY_PATH cannot be set in $HOME/.profile, /etc/profile, nor /etc/environment files. You must use /etc/ld.so.conf.d/*.conf configuration files. See Launchpad bug #366728 for more information.

LD_LIBRARY_PATH is reset for security reasons.
You need to add a conf file in /etc/ld.so.conf.d/
See also:

How to set the environmental variable LD_LIBRARY_PATH in linux
How to set LD_LIBRARY_PATH permanently?
LD_LIBRARY_PATH specification
setting LD_LIBRARY_PATH for CUDA


google chrome runs stackoverflow without graphic

Your adblocker or a proxy / firewall seems to block the domain from which the CSS files are served.

Check your adblock/firewall/proxy logs and settings and allow connections to cdn.sstatic.net


Ubuntu 12.04 Cannot get Epson L210 to work with Scanner (Xsane)

Answer created by the OP (@user148966) in the comment above:

  Not 5 minutes after posting this I restarted my computer and I can now
  use Xsane. I had restarted several times before, s


Too many authentication failures VNC server and many connection with different ip

That's expected in public domain, there are many scanners and bot for different aims including attacks.
To minimize it:

Change the default port to one too far from know ranges
Allow only the IP's from your country if you are not using a VPN yourself.


Check if your filesystems are full; this may cause many side effects.


wifi firmware installation instruction procedure

firmware-b43-lpphy-installer is obsolete in new Ubuntu versions.

For this adapter you can install wl driver.

 sudo apt-get install bcmwl-kernel-source


How to install Evolution 3.6.2 from 13.04 into 12.10?

I've now created a PPA for Evolution. So you can use the latest stable release (currently 3.6.4) on Ubuntu 12.10.

To add/install it, simple open a terminal and enter:

sudo add-apt-repository ppa:support-bec/evolution
sudo apt-get update
sudo apt-get install evolution

No warranty for anything, this just works for me.


Please put this way

127.0.0.1 www.dailymotion.com
127.0.0.1 dailymotion.com
127.0.0.1 *.dmcdn.net
127.0.0.1 dmcdn.net

I can see that dailymotion video's comes from dmcd.net


I've installed the package "universalindentgui" with Synaptic Package Manager instead of trying to install the .deb file with Ubuntu Software Center.The Manager installed 8 other  packages but I think all of them were the terminal tools used behind the GUI (such as astyle , uncrustify etc). The Manager didn't however installed a package with a similar name to "libqscintilla" or any of listed in blueXrider answer.The application seems to work fine.


What does --prefix do exactly when used in ./configure?

When you install software with make install or sudo make install, different files are placed in different directories. Executables that provide commands the user is intended to run usually go in a bin directory, libraries usually go in a lib directory, manual  pages usually go in a man directory, and so forth.

When you run ./configure, the --prefix option lets you specify where those directories are. It is called --prefix because it lets you give the prefix that appears in the paths to each of the directories where files from the program or library that you are building are to be installed. Most configure scripts support --prefix, and omitting it and just running ./configure is typically equivalent to ./configure --prefix=/usr/local.

To answer this more fully, I've reproduced two sections from my answer to How to install tar file “globally”? (on Unix & Linux), which address this question specifically:

  Configuring Your Build

  When you have source code that is compiled by running ./configure
  and make, you will usually use make install (or sudo make install)
  to install it. This copies files from the build directory
  into the install location. When the thing you are installing provides
  executable commands, those executables are typically copied into a
  directory that is in $PATH or that you should consider adding to
  $PATH.

  Although building and installing software is often as simple as
  running ./configure, make, sometimes make check or make test,
  and then make install or sudo make install, you will sometimes
  want to pass options to the configure script to configure the build.
  In particular, as pfnuesel says, this is how you configure
  where the software is going to be installed. Even though the make install step actually installs the software, the locations where
  everything will be installed are typically established in the
  ./configure step.

  The most common option for this is --prefix. The default prefix,
  when you don't tell configure what to use, is usually /usr/local.
  (Occasionally, a program or library's source code defaults to some
  other prefix. Fortunately this is rare.)

  So ./configure is usually equivalent to ./configure --prefix=/usr/local.
  To install software in your home directory, you could use ./configure --prefix=/home/galahad (if /home/galahad is
  your home directory) or --prefix="$HOME". Then of course you must
  still build and install the software with make. I should say that
  not all software that is distributed in source code form is built this
  way. You should always look for documentation inside the extracted
  source code archive.

  What --prefix Means

  When you run ./configure --prefix=directory, you are
  indicating that the software should be installed under the
  directory directory. But this rarely, if ever, places loose files in directory. Instead, it places files that serve different
  purposes in the different subdirectories of directory. If those
  subdirectories don't exist, it creates them.

  Executables usually go in directory/bin, though they
  may go in directory/sbin if they're commonly used for
  system administration or they may go (more rarely, these days) in
  directory/games if they are games. Libraries go in
  directory/lib or another similarly named directory like
  directory/lib32. Header files go in
  directory/include. Manual pages go in
  directory/man. Data files used by the software go in
  directory/share.

  That's what it means for directory to be a prefix. It's the
  parent directory that contains the locations in which different files
  will be installed. It thus appears as a prefix in the absolute
  paths of most files and directories created by running make install
  or sudo make install.

  There are some exceptions to this. Systemwide configuration
  files--which are sometimes created when installing the software that
  will use them, though not always--usually go in /etc. This is not
  typically affected by specifying a different prefix. Even if you
  install a lot of software in /usr/local, it will still mostly use
  /etc, and your /usr/local/etc directory will probably be
  nonexistent, empty, or contain very few files.

  On many systems, you can find more information about typical
  filesystem layout by running man hier. If you're using a GNU/Linux
  system you may be interested in the Filesystem Hierarchy
  Standard.


As you experience yourself, the Fn key of your laptop is not recognized by the operating system. It is a key that modifies the behaviour of other keys on the keyboard as defined by the manufacturer. You cannot access or redefine the Fn key in software.


System will not resolve domain.local websites

The short answer is to use something other than .local.

.local is used by Avahi by default; Avahi is the GPL implementation of Zeroconf -- see the Wikipedia article.

There's a brief guide here which describes reconfiguring avahi-daemon to use something other than .local. You'd need to do this on all your Ubuntu desktops.

Other possibilities are not to run avahi-daemon or to change /etc/nsswitch.conf to remove references to mdns.

Disclaimer: I haven't tried any of the above.


How to run a python definition inside a .py file from the shell?

You need to cd into the directory where your python file is located and then invoke the python interactive shell to be able to call and run functions interactively.

# cd to the directory
$ cd ~/Dropbox/emp/Python/

# invoke the python interactive shell
$ python     # use `python3` to invoke the Python3 shell

The Python interactive shell would look something like:

Python 2.7.6 (default, Mar 22 2014, 22:59:38)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Here you may import the module (your *.py file) and
run the functions written therein:

>>> from stromkosten_pro_jahr import stromkosten_pro_jahr
>>> stromkosten_pro_jahr(20,3)
[The output of function would be shown right here]

For more information, I would suggest to go through The Python Tutorial.


The setup showed this error

Installer file /home/hridesh/Desktop/full seems to be corrupted

Since the full path being used is "home/hridesh/Desktop/full netbeans 7.2 for linux in .sh format" it would seem that the installer is having problem with such a complex folder name.

Renaming the folder "full netbeans 7.2 for linux in .sh format" to something simple like "netbeans_installer" should solve the problem the installer is reporting.

cd Desktop
mv full\ netbeans\ 7.2\ for\ linux\ in\ .sh\ format netbeans_installer
cd netbeans_installer
./netbeans-7.1.2-ml-linux.sh


gcc Unable to exec gcc.real: No such file or directory

Your error was:

C compiler cannot create executables

This can usually be solved by installing build-essential :

sudo apt-get update && sudo apt-get install build-essential

If the problem still happens after that, please edit your question to show the error message and the complete and exact output of ./configure.


Facebook icon not visible in envelope menu

Appearance of facebook in the output of gsettings get com.canonical.unity.webapps allowed-domains indicates that you have accepted and installed the integration plugin.

gsettings get com.canonical.indicator.messages applications shows the list of applications that actually have an entry in the messaging menu. Facebook appears missing in your case.

Solution:
Check if the file /home/$USER/.local/share/applications/facebookfacebookcom.desktop exists. (replace $USER with your username.)

If it doesn't, remove facebook from com.canonical.unity.webapps allowed-domains (Use dconf editor. com>canonical>unity>webapps). This will cause firefox to prompt again, accept, and the desktop file should appear.

Open dconf-editor and add the filename facebookfacebook.com.desktop to com.canonical.indicator.messages applications. The facebook indicator should now appear in the messaging menu.


New user having trouble with simple software installation

You can download it from here.
It is a  "deb" file, which can be installed locally with the "gdebi package manager"
Please note that this way is not encouraged, since it is inherently insecure. You do not know what code you are downloading and what is does to your system.
Also accept that it might not work, if dependencies are not met. But if you really have to download code like this, look for .deb files, not for .rpm


How to convert pdf to multiple swf files

You can use the convert script from ImageMagick. If ImageMagick is not installed  then open a terminal and install it using

sudo apt-get install imagemagick

Then to convert a pdf file to swf issue:

convert filename.pdf filename.swf


Convert an image from grayscale to binary

Hm, it seems like that image is stored into the PDF as a bunch of long small "strips" of the complete image.  It also seems like there is a filter or set of filters applied in the PDF that makes the image to be shown as b/w instead of the graylevels that it really is.  You can open it in Inkscape, for example, to see some of this for yourself, as it seems like these filters aren't imported (I guess the same happened when you converted to PS or TIFF).

Turning it from a grayscale to a bitmap will probably require a bit of playing with contrast & such to get an optimal result (the scan isn't very hi-res to start with...).

You can import the PDF into The GIMP and play with various filters and colour-options, or maybe use similar functions in imagemagick to create a bitmap version.  It's difficult what filter/setting will give the best results...


By opening System Settings > Displays you can change your "primary" screen by dragging the black little bar to the display you want and hit the Apply button. Restarted my PC and i didn't have to use xrandr anymore ^_^

Better explanation than mine you can find here: http://www.thebinaryidiot.com/archives/2011/11/11/gnome-shell-3-2-and-multiple-monitors/


Is there is another way to Sync Between Computers?

There are various alternatives like google drive, Dropbox or owncloud.
They all have ubuntu clients and offer free space.


Unfortunately, the problem was in my college network, i used my phone hotspot and it worked. "AWESOME"


Alt+~ will allow you to switch between windows of the same app. i don't know how to turn it off permanently, but it will allow you to navigate them.

Additional hint:
 I have a German keyboard and a German Keyboard layout.
Nevertheless the Alt+~ works with the same key where the English keyboard has, so for German users it is Alt+^ .


Based on the answer to Gave up waiting for root device. Ubuntu 16.04 I tried burning a DVD rather than using the USB.

This worked fine.  After reinstalling from the DVD the system works and boots fine.

I don't understand why DVD vs USB should manifest itself this way but the system is now working.


my msi computer won't dual boot with ubuntu and windows and go straight to windows

At rhe startup sequence, press either F1, F2 or F8 multiple times.
Reason is there is a small time window to open the BIOS boot options menu. You should now be able to see a listing of possible boot options, e.g. windows, Linux.
Now you can choose to boot to a different one.
If you want to change your default boot options (which currently is Windows) you can Do that by going into the BIOS Setup. This one can normally ve accessed via your GRUB interface or the Boot options table. Often it is only called setup.
There you search for the option boot order and change it accordingly.


Default keyboard layout of a Gnome Terminal

Given that you enabled different input methods for different windows, it should be sufficient to replace the setxkbmap command in ~/.bashrc with:

gsettings set org.gnome.desktop.input-sources current 0

Please note that the number is the order number of the input sources you added, and  the 0 (zero) is just an example which presupposes that English (US) is the the first input source item. Change it to 1 if English (US) is the second one etc.


How to sudo apt-get install on multiple hosts simultaneously?

For administration of multiple machines I am using clusterssh. It allows parallel terminal sessions to all machines. In case you want to run a command specifically on one machine, you are able to select its window. In case you want to submit to a group of machines you can select all hosts which need to be addressed. Easy, isn't it ;) You can use a config file and assign a group of computers a nickname and start clusterssh with that nickname instead of the list of machine names/IPs.

I am using it for years now. Another possibility might be tmux, but I have to check the syntax for the parallel sessions.

Edit: I am recognizing that you tried to do a non-interactive installation. The clusterssh opens terminal sessions, so that will be interactive. Due to you did not state if interactivity or non-interactivity is a requirement, I hope than interactive terminals are okay for you


Intel GMA 4500M screen resolution problem

I have an Intel GMA 4500. I Googled for answers but nothing seemed to solve my problem.

Finally I came across this that says for acpi_osi=Linux, the brightness meter works in reverse, which was why my display started with a blank screen i.e. since it is reverse, max brightness = blank screen.

Following are a few interesting notes from the link:

Without i915.modeset=0 the backlight does appear to start in the off position. Hitting Fn-brighter once turns it back on. On my keyboard, brighter is Fn-left-arrow and dimmer is Fn-right-arrow, which is different than I usually see.
Starting with kernel modesetting gets me a graphical console that works fine
until X tries to start.
X won't start with kernel modesetting, either automatically or from runlevel 3. X -configure fails. With nomodeset 1024x768 is the only available resolution once logged in to a session. Of note, kdm comes up at the correct resolution with nomodeset but once the X session starts it falls back to 1024x768.
acpi_osi=Linux is required for the back light keys to function. I see no lasting benefit to having turned it on and off as described in Comment #18 - still doesn't work with it off here.
Same symptoms booting from the F15 DVD. nomodeset option works at reduced resolution, black screen with default graphical installer.

So if your display starts with a blank screen, try decreasing the brightness to check if the screen appears. My display works fine now, but in reverse.


Is there a way to rename an external hard drive?

The label is a property of the drive's filesystem itself - you need to modify that using GParted or other tools. Here are some instructions in Ubuntu wiki:

Open the System > Administration menu and see if there's an entry for GParted (previously Partition Editor).
If there is, launch it. If there isn't, install the "gparted" package and it should now appear in the menu. Enter your password when prompted.
Disk drives are divided up into partitions. To find the partition you want to re-label, you first have to find the disk drive that contains it, using the drop-down menu in the upper right. It will show a device name like /dev/sdb and the drive's total size in parentheses. After selecting a drive, you will see a list of all partitions on that drive.
If the partition is mounted (has a key icon next to it), right-click on the partition and select Unmount.
With the key icon gone, right-click on the partition and select Label. If you can't select it, install the ntfsprogs package.
Enter the new partition name and press Ok.
The label change is now pending, but has not been completed. Press the Apply button near the top of the window. After confirming, it should say "All operations successfully completed". The drive now has a new label.


Broken package after update: linux-headers, error: BrokenCount >0

I actually found the solution to my problems. It seemed that using root to launch nautilus caused all inodes to go up to 100%. Had to clean those up in the trashes of the root. So I did the following:

df -i

That gave me the following:

$ df -i
Filesystem     Inodes  IUsed IFree IUse% Mounted on
/dev/sda1      460560 456125  4435  100% /
udev            60125    491 59634    1% /dev
tmpfs           61943    403 61540    1% /run
none            61943      3 61940    1% /run/lock
none            61943      8 61935    1% /run/shm

woops! inodes in use 100%? that means lots and lots of tiny files stored somewhere. Where?

I used the command:

sudo du -h /* | grep '[0-9]M'

That gave a huge list of files which seemed ok except the fact that the root trashes was full of files in:

/root/.local/share/Trash/files/

So I ran:

sudo rm -r /root/.local/share/Trash/files/

and:

sudo touch /forcefsck

and then restarting to let the last command do its thing.

After that, running:

df -i
and df -Th

produced the following:

$ df -i
Filesystem     Inodes  IUsed  IFree IUse% Mounted on
/dev/sda1      460560 196674 263886   43% /
udev            60125    487  59638    1% /dev
tmpfs           61943    393  61550    1% /run
none            61943      3  61940    1% /run/lock
none            61943      8  61935    1% /run/shm

$ df -Th
Filesystem     Type      Size  Used Avail Use% Mounted on
/dev/sda1      ext4      7,0G  4,7G  2,0G  71% /
udev           devtmpfs  235M  4,0K  235M   1% /dev
tmpfs          tmpfs      97M  816K   96M   1% /run
none           tmpfs     5,0M     0  5,0M   0% /run/lock
none           tmpfs     242M  356K  242M   1% /run/shm

iNodes were back to normal and I actually saw a slight increase in disk space (from 1,1 to 2,0 Gb) That made the system very fast too so there was a positive side effect to fixing the issue since my computer now seems to be lightning fast!

I want to note that if you suffer from the same issue, any folder in your system might hold those tiny files that fill up your inodes. Carefully examining the list that is created using:

sudo du -h /* | grep '[0-9]M'

will help you find which folder needs correction.


After update chrome won't open desktop is read only

I'm too frustrated with this and not really receiving a lot of support, sorry for wasting your time im just going to buy a copy of windows tomorrow..


ubuntu 16.04 upgrade problem with virtualbox

Now that you are on Ubuntu 16.04, i suggest to remove and purge the old Virtualbox 5.0:

sudo apt-get remove --purge virtualbox-5.0

and then run the following:

sudo add-apt-repository 'deb http://download.virtualbox.org/virtualbox/debian xenial contrib'
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.1
sudo apt-get install dkms

Reference: https://www.virtualbox.org/wiki/Linux_Downloads#Debian-basedLinuxdistributions


why i can't find intellij IDEA in software center?

In Ubuntu 12.04 and Ubuntu 14.04 open the terminal and type:

sudo apt-get install intellij-idea-ce

The installation process of IntelliJ IDEA 13 Community Edition is pretty straightforward; you don't even have to give the software provider your email address.


Why is this Emacs package versioned at 46.1? 26 is the highest possible major version today

There are many issues and questions here, so I'll be brief but try to cover them all.

emacs is just a meta-package that points at the latest version of emacs... in Ubuntu (currently emacs24). The "46.1" is just a package version, deliberately high to displace older emacs packages. See apt show emacs for a bit more info.
You're overriding that emacs package with a lower version number package. Ubuntu prioritises the package version installed by version number. The highest will be the one that gets installed (when installing or upgrading), hence yours is constantly guzzumped.

You can see this in the apt-cache policy emacs output. The candidate is the higher version.
You can work around priorities with pinning, or fudging your version number (something higher than 46.1) but that does rather ignore the problem (and may leave a emacs24 package in place).
Your best option is removing the emacs package and just building and installing a emacs25 or  emacs26 package instead. You could also build an emacs meta-package that depended on your version-in-name package, but that's just a vanity. I wouldn't do that unless you're planning on distributing.
Regarding Ubuntu doing stuff without "without asking", check to see if automatic updates are turned on. Getting the latest available to it is the default behaviour so I think this is more a case of "not understanding what Ubuntu does" rather than a ghost in the machine, or worse.
And as for "why version 24, not 25 or 26?", Ubuntu and Debian beneath it both aim for stable, tested software versions. 26 is still in development and 25 didn't come out until September 2016.

Additionally, Ubuntu isn't a rolling-release so versions of Ubuntu with 24 will stay on version 24 for the lifespan of those Ubuntu releases (unless something really crazy happens). Security patches will be backported and applied if necessary but it'll still be 24.


My Ubuntu suddenly won't boot-- How can I access my files to do a reload without losing most of my data?

If you still have access to your Ubuntu install CD/Live USB, reboot and start up the installer. From there you can use the file browser to recover your files, then reinstall.


Ubuntu 20.04 touchpad not working on Lenovo Thinkbook

This is bad ubuntu code that can't work with the latest bios versions, but they won't tell you that here. You will be told that your equipment is bad and that you should think for yourself what to do. I ordered a new keyboard with a built-in touchpad before I found the answer to this question myself. And if you flash your BIOS to an older one, you will be told that it does not meet the security requirements.


Wireless doesn't work on a Centrino Wireless N chip in a Sony Vaio VPC-EG16FM/B

According to this you need to blacklist the acer-wmi module, first edit the blacklist file with a text editor:

gksudo gedit /etc/modprobe.d/blacklist.conf

Then add this line at the bottom:

blacklist acer_wmi

Then save the file and reboot.


Commands not working after editing .bashrc file

You should add the following entries:

CUDA_INSTALL_PATH="/usr/local/cuda"
PATH="$PATH:$CUDA_INSTALL_PATH/bin"

You don't need export in front of PATH variable in .bashrc file (export makes the variable available to sub-processes). When you use PATH=$CUDA_INSTALL_PATH/bin you reassign to the PATH variable only $CUDA_INSTALL_PATH/bin value and you lose the previous value (...:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:...) which is absolutely necessary. You can check your PATH value in terminal with:

 echo $PATH


Does the shortcut Ctrl-Alt-F... turn off the GUI or is it still running in the background?

When you switch to a "virtual terminal" by pressing Ctrl+Alt+F3 everything else remains as it was. So when you later press Alt+F2 (or Alt+Left or repeatedly Alt+Right) you get back to the GUI session and can continue your work.

In previous Ubuntu versions VT1 would be unused and the standard X session would run on VT7. Currently (at least from 18.04 onwards) VT1 is used for the display manager ("login screen"), the standard X session uses VT2. Hence we have VT3 as the first usable VT.


C drive partitoning/ formating simple volume

Go to computer management.  Right right click on the partition, and choose shrink.  That will let you make room on your drive.

You will then get a box asking you how much space you want to shrink.  Choose the amount that you like, and click on Shrink.


The exec line should look like this:

Exec=env PULSE_LATENCY_MSEC=30 LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype %U


Can't install Teamviewer due to libxtst6

According to this possible duplicate, you need to install the 32-bit version instead of the 64-bit. Read the first answer for more details.


SSH key-based auth asks for password on first login

I found the answer on another stack exchange.  The reason for this behavior is that the home directory is encrypted!
Why am I still getting a password prompt with ssh with public key authentication?

Is your home dir encrypted? If so, for your first ssh session you will have to provide a password. The second ssh session to the same server is working with auth key. If this is the case, you could move your authorized_keys to an unencrypted dir and change the path in ~/.ssh/config.

I tracked this by looking through /var/log/auth.log, and specifically, the line:
pam_ecryptfs: Passphrase file wrapped

Searching for that led me to the other stack exchange answer.


How to remove applications from start menu that are installed by Wine

If you go to the directory your application is installed, delete that but go to programfiles/users/startmenu/programs,[applicationfolder] and delete the folder it should no longer appear in the startmenu.


I had similar problem with modem ZTE MF112 produced for Russian mobile provider MTS. In Ubuntu 15.10 and in Ubuntu 16.04 LTS it is recognized as 19d2:2003 ZTE WCDMA Technologies MSM. Now I have partially solved my problem with it. It connects to mobile network and provides Internet, but sometimes it is necessary to unplug and again plug the modem three times for the system to see it. Try to take the following steps:

Install the usb-modeswitch package if it is not already installed.
In the folder  /usr/share/usb_modeswitch create a text document with the name 19d2:2000. Its content should be

  # ZTE devices

  ReleaseDelay=9000

  ReleaseDelay=9000

  TargetVendor= 0x19d2

  TargetProductList="0001,0002,0015,0016,0017,0019,0031,0033,0037,0042,0052,0055,0061,0063,0064,0066,0091,0108,0117,0128,0151,0157,0177,1402,2002,2003"

  StandardEject=1

  MessageContent="55534243123456782000000080000c85010101180101010101000000000000"

Edit the file /etc/usb_modeswitch.conf and set the option SetStorageDelay=6 in it. You can also uncomment the line EnableLogging=1 and then you will see the log file /var/log/usb_modeswitch.log with modem errors if they occur.


How do I change the chat and mail clients in the indicator area?

To remove Evolution and Empathy, use the Ubuntu Software Center if you don't need or want them anymore, also use it to Install Thunderbird and Pidgin, both of them will integrate into the Messaging menu next to the Indicators area on the top panel automatically without editing any file, and when opened click add to launcher to add them do the Launcher.


How can I hide the grub menu when the systems boots?

If you mean boot menu of grub2, you can do this :

Open file /etc/default/grub in any text editor, with su priviliegies.
Find option GRUB_HIDDEN_TIMEOUT_QUIET=false, and change it to GRUB_HIDDEN_TIMEOUT_QUIET=true
Save the file, and run sudo update-grub


Removing win8 ubuntu dual-boot and using just ubuntu

Yes, you could have a data loss.
You should make a backup of the full disk with something like clonezilla.

After that you should try to enlarge your linux partitions with Parted Magic.

Maybe you could make the backup with Parted Magic too because it contains already clonezilla.


Why do I have more users than I should on uptime

every terminal window you have opened also counts as a login. Open more terminals and type the command again and you will see how the number changes


The problem with locate might be an outdated database. locate uses a database to show you result and that database is not updated real-time. So new files are not added to it when created. They will get added when the database is updated.

sudo updatedb

updates it for you manually but this is also done daily by cron on a default Ubuntu. locate is not real-time but very fast. locate accepts wildcards.

locate *.jpg
/discworld/Downloads/Forbidden-Oasis.jpg
/discworld/Downloads/The-Exalted-Plains.jpg
/discworld/Downloads/The-Fallow-Mire.jpg
/discworld/Downloads/The-Hinterlands.jpg
/discworld/Downloads/The-Storm-Coast.jpg
/discworld/Downloads/The-Western-Approach.jpg

and

locate .t

should give you results if the database is up to date and there are any files ending with ".t". You can filter the results by adding a | grep Western (the example I show above would show 1 result; the last one would be shown) if you get too many results.

find is real-time and as a result it is slower than locate. find will show an error if you search location you are not allowed to search. The command in comments by @g_p is correct and searches from the current location files ending in ".t".

find . -type f -name "*.t"

which is not intended to find files but to find commands so is the wrong tool. whereis is also not intended to find files but you can use to find the binary, source, and manual page files for a command.


I am guessing that you are running the crashing process as root. If that is the case, change the domain from '*' to 'root'. The limit.conf lines that contain the wildcard (a.k.a. '*') does not affect the 'root' account.


The problem is solved by removing laptop-mode-tools.
Battery consumption had increased by about 20%, but this was solved by installing tlp.


What chat clients (that work on linux) support creating rooms?

By filling in the "Room" field with a non-existent room, you can create a chat room. I used Pidgin for this screenshot. To get to this dialog box I clicked "Buddies" then "Join Chat". Hope this helps.


jupyter notebook does not start off on Ubuntu 16.04

I installed using Anaconda on Ubuntu 14.04. It worked for me after I added anaconda to my Path. In the terminal, type the following:

export PATH=~/anaconda3/bin:$PATH


Weird Issue with RDP from Windows to Ubuntu 16.04

Make sure you set the colour depth on you client. Try setting it to 16 bits or higher manually, especially don't set it to 256 colors. I get a really weird display when I do that.


How can I include information in the line above when searching for a pattern in a line?

You can use the options -A1 and -B1 to let grep print the line after (-A) and before (-B) the matching line. Try the following command line,

grep -B1 created_at log-file|grep -A1 '^}'|grep created_at

I tested with the following input file named log-file

asdf
qwerty
...
},
"created_at" "date-with-near-}"
zxcv
some other string
"created_at" "date-without-}"
...

Testing sequence

$ grep -B1 created_at log-file
},
"created_at" "date-with-near-}"
--
some other string
"created_at" "date-without-}"

$ grep -B1 created_at log-file|grep -A1 '^}'
},
"created_at" "date-with-near-}"

$ grep -B1 created_at log-file|grep -A1 '^}'|grep created_at
"created_at" "date-with-near-}"


A method to find files is ...

sudo updatedb
locate sabnzbdplus

It will report any file still lingering with sabnzbdplus in the name.

Likely culprits ...

/etc/init.d/sabnzbdplus
sabnzbdplus.service

The 1st you can remove. The 2nd you can disable/mask/remove.


How to setup a file sharing service from ubuntu server over the net?

It may be late but I just found Owncloud on this post.


My HP LaserJet 2550L prints in color only now!

I found a solution.

This is most certainly a case of upgrades did not make it...

Anyway, what I ended up doing (after 2 years, yes!) is to go to the System Preferences, clicked on Printer and finally, clicked on Add Printer (I used the little drop down to make sure to Add Printer and not something else.)

That new printer has the usual option, which is mind bugging, but does the job:

When printing I can again click on Properties and then I see an option "Print Color as Gray" and just select On. I can again just print in black and white!


I cant install kali to virtual box using Ubuntu as host. I get this error:

Try running chmod 777 ~/Downloads/kalilinux-*.iso


Samba working via Nautilus, but not via mount

As @Organic Marble mentioned in the comments, the problem was, that the folder was mounted with root:root, so my user could not read or write it. Using uid and gid in my fstab mounted it as daniel:daniel.


Disable mouse acceleration on WINE/lutris

Your issue is most likely Wine as you seem to have already suspected. There's a MouseWarpOverride setting that can change how it handles the input from a mouse and often helps with issues like this. Winetricks can be used to change this (I believe it would be something like winetricks mwo=enable or mwo=disable or mwo=force), or there's some good Ubuntu-based directions here that can tell you how to make a .reg file and use it to change this setting, including for a single app or globally (and Winetricks only does so globally it seems). Excerpt below:

  I would do the mouse warp override as:

  REGEDIT4 [\HKEY_CURRENT_USER\Software\Wine\AppDefaults\executable name\DirectInput] "MouseWarpOverride"="force"

  Where .exe is the main executable of the program (e.g. Bioshock.exe - note: not the full path) that you to want to have mouse warping. I did a global mouse warping (to fix the problem of not being able to turn 360 degrees in Bioshock) however this ended up breaking other games...

  Global mouse warping is the key ( at your own risk ):

  REGEDIT4 [\HKEY_CURRENT_USER\Software\Wine\DirectInput] "MouseWarpOverride"="force"

  There are 3 values for the value:
  enable : (default) warp pointer when mouse exclusively acquired
  disable : never warp the mouse pointer
  force : always warp the mouse pointer

  Symptoms of an application not liking the "force"ed mouse warping include the mouse pointer bouncing around erratically in the middle of the screen and 'elastically' returning immediately to the middle of the screen...

  @OP but... I can't find it in my wine regedit, what should I do?

  @OP I can see AppDefaults or DirectInput in "\HKEY_CURRENT_USER\Software\Wine"

  @Bob Sorry my bad...

  You want to select one of the two options I gave you (an application specific override or a global override).

  Go into your home folder (in Nautilus).Create a blank document. Call this something like WINE_mouse_override.reg.Copy the information from one of the code windows in my post (beginning REGEDIT4).Paste this information into your newly created blank document - currently open in Gedit(I presume).Remember to insert in the executable name of your application (if using an application specific override)Open a terminal window (Gnome Menu - Accessories - Terminal).type or copy/paste into the terminal window:

  cd ~ wine regedit WINE_mouse_override.reg

  Then check in your WINE registry editor that the new key has been created...

  Bob


As pomsky suggested in hin comment I had to choose "ubuntu-sdk-15.04.4" in the manifest.json - File.


How do I install a mock Tango Control System server?

Astor is a Java application and therefore, it is part of the libtango-java package.
If you want Astor, you have to install this package.
Pb with sys/tg_test/1. DeviceProxy creation is a stateless action. It always succeed
(except in some rare case like wrong device name syntax). The error is reported only when
you access the device (what you did with "ping"). If you want to access the device
sys/tg_test/1, you have to start the device server in charge of this device. In your case, it is the TangoTest device server.


How can I install my own fonts from several subfolders?

From OP:

  I can answer my own question:

sudo find . -name "*.ttf" -exec cp "{}" /usr/share/fonts/truetype/ ";"

  and

sudo find . -name "*.otf" -exec cp "{}" /usr/share/fonts/type1/ ";"

  is what helped me.


Want sound only to headphones, when it plugged in, and in speakers else

As ALC1200 and ALC888 seem to be very similar (see this German Wiki Entry) you can try my solution for the Intel HDA ALC1200 on my Acer Aspire 5920 G laptop.
After upgrading to Ubuntu 12.04 Precise Pangolin from 11.10 my speakers continued to output the sound when plugging in headphones. In 11.10 the speakers were muted automatically when a headphone was plugged in.

I fixed it by adding a line to /etc/modprobe.d/alsa-base.conf :

options snd-hda-intel model=auto probe_mask=1

Now I've got a lot more options/controls when running alsamixer.
One is "Auto-Mute Mode". Set this to "Enabled" if it does not work out of the box.

stehpan


Can't edit files with Gedit while other text editors do

I suspected it was a dconf issue and what ended up solving it for me was paying attention to the error I was getting when launching from the command line.

(gedit:2498): dconf-WARNING **: 22:15:51.286: unable to open named profile (ibus): using the null configuration.

After a bit of reading on dconf I realized my install had no profile folder in /etc/dconf/profile which kinda makes sense since it was a non-standard install  So I made it and then created a profile file ibus in which i put

user-db:user
system-db:ibus

using of course another editor :-).

according to docs the first line will point to your userspace dconf user profile
https://developer.gnome.org/dconf/unstable/dconf-overview.html

according to my environment my DCONF_PROFILE=ibus by default so it looked for that now existing profile and loaded it.  The warning went away and now the editor edits!  Apparently without a r/w place for dconf settings gedit goes into ready only.

if the DCONF_PROFILE environment var is unset then according to the docs dconf/gsetting will use the user profile in user space by default thus bypassing what I did above. One can do that by deleting the file /etc/profile.d/set-dconfg-profile.sh

Since this was not a gedit specific fix I imagine it might cure a few issues with other gnome/gsetting apps.

so if the op still has this issue maybe they can check to see if they have this missing profile and create i, or otherwise set the DCONF_PROFILE by error.


Will Mir display server be able to launch X11 applications?

The Mir server will not be able to communicate with X applications but you will be able to run the Xorg server with a Mir backend that bridges X applications to Mir. This is the same solution as done in Apple (XQuartz), Wayland (XWayland) etc. The server will be called XMir.


External HDD shows up in /dev/, but inaccessible via [g]parted

looking from your attempt at mounting the drive, do you know what the filesystem is? its probably ext4 if you let ubuntu choose when it was formatted/installed.

if its ext4 then, given the scenario surrounding its failure, the problem is probably a bad superblock (i.e. the filesystem became malformed due to incomplete writing, etc.) the following command will identify the extent of the problem and tell you how it can be solved:

sudo fsck.ext4 -v /dev/xxx


Is there a way to move directory in the encrypted home to a second disk and keep the encryption ?

Creating a new encrypted folder and moving the files into it should work, it maintains them in an encrypted state on-disk the whole time. But it's the automatic decrypt on login that may be a problem.

Creating a custom PAM module that can take the login passphrase and use it to decrypt/mount anything else (eCryptFS, EncFS, LUKS, etc) would be a general purpose solution...

Normally, ecryptfs-setup-private would work, but eCryptFS does not support nested encrypted folders (one eCryptFS with one key, inside another eCryptFS with a different key) so having an encrypted home may cause problems, but you can try a few other answers and see if one works:

Script inside your home that runs at login

Since your home's already encrypted, having a script there isn't as bad as usual, you could even keep the passphrase in plaintext in the script too (normally a terrible idea, but encrypted home).

From How do I mount an eCryptFS encrypted partition on login?
Extra/general info How to run a command at login?

First, get a script to run at login:

A .desktop file in ~/.config/autostart will get run on login, telling it to run a bash script that mounts your encrypted folder should work. Since your home is already encrypted, you could store the other mount passphrase in the bash script, not perfect security but still encrypted on disk, if you didn't want to enter it each time.  For example ~/.config/autostart/test.desktop. A very basic one like this should work:

    [Desktop Entry]
    Type=Application
    Exec=/home/user/.config/autostart/runme.sh

Or to wait a few seconds before starting (ex. give the desktop time to initialize before prompting for a passphrase) and run as root, try this:

[Desktop Entry]
Type=Application
Exec=sudo bash -c "sleep 5; /home/user/.config/autostart/runme.sh"

Then, find a script to decrypt your other folder. If you're using EncFS then it would only be basically one line, but eCryptFS is different. The easiest might be to (temporarily) create a new user, have that user run ecryptfs-migrate-home or ecryptfs-setup-private and then copy the resulting encrypted folder to your new location.

The following script assumes it's a second encrypted home you want to mount:

#!/bin/sh -e
#
# ecryptfs-mount-single
# Modified by Xen2050 from:
#
#    ecryptfs-recover-private
#    Copyright (C) 2010 Canonical Ltd.
#
#    Authors: Dustin Kirkland <kirkland@ubuntu.com>
#
#    This program is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, version 2 of the License.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

error() {
    echo "ERROR: $@" 1>&2
    echo "Usage:  ecryptfs-mount-single [--rw] [encrypted private dir] [mountpoint]"
    echo "\tWill attempt to mount [encrypted private dir (.Private)] to [mountpoint]"
    echo "\twith standard options: ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    echo "\n\t--rw\tmount with read-write access (optional)"
    echo "\t[mountpoint] will attempt to be created if it does not exist"
    exit 1
}

info() {
    echo "INFO: $@"
}

# We need root access to do the mount
[ "$(id -u)" = "0" ] || error "This program must be run as root."

# Handle parameters
opts="ro"
if [ "$1" = "--rw" ]; then
    opts="rw"
    shift
fi

if [ -d "$1" ]; then
    # Allow for target directories on the command line
    d="$1"
    # Only supplying one directory
else

    error "No private directory found; it must be supplied."
fi

if [ ! -d "$2" ]; then
    mkdir -p "$2" || error "mountpoint $2 does not exist, can not create"
fi
    # mount directory on the command line
    tmpdir=$2

# Determine if filename encryption is on
ls "$d/ECRYPTFS_FNEK_ENCRYPTED"* >/dev/null 2>&1 && fnek="--fnek" || fnek=
if [ -f "$d/../.ecryptfs/wrapped-passphrase" ]; then
    info "Found your wrapped-passphrase"
    echo -n "Do you know your LOGIN passphrase? [Y/n] "
    lpw=$(head -n1)
    case "$lpw" in
        y|Y|"")
            # Use the wrapped-passphrase, if available
            info "Enter your LOGIN passphrase..."
            ecryptfs-insert-wrapped-passphrase-into-keyring "$d/../.ecryptfs/wrapped-passphrase"
            sigs=$(sed -e "s/[^0-9a-f]//g" "$d/../.ecryptfs/Private.sig")
            use_mount_passphrase=0
        ;;
        *)
            use_mount_passphrase=1
        ;;
    esac
else
    # Fall back to mount passphrase
    info "Could not find your wrapped passphrase file."
    use_mount_passphrase=1
fi
if [ "$use_mount_passphrase" = "1" ]; then
        info "To recover this directory, you MUST have your original MOUNT passphrase."
    info "When you first setup your encrypted private directory, you were told to record"
    info "your MOUNT passphrase."
    info "It should be 32 characters long, consisting of [0-9] and [a-f]."
    echo
    echo -n "Enter your MOUNT passphrase: "
    stty_orig=$(stty -g)
    stty -echo
    passphrase=$(head -n1)
    stty $stty_orig
    echo
    sigs=$(printf "%s\0" "$passphrase" | ecryptfs-add-passphrase $fnek | grep "^Inserted" | sed -e "s/^.*\[//" -e "s/\].*$//" -e "s/[^0-9a-f]//g")
fi
case $(echo "$sigs" | wc -l) in
    1)
        mount_sig=$(echo "$sigs" | head -n1)
        fnek_sig=
        mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    ;;
    2)
        mount_sig=$(echo "$sigs" | head -n1)
        fnek_sig=$(echo "$sigs" | tail -n1)
        mount_opts="$opts,ecryptfs_sig=$mount_sig,ecryptfs_fnek_sig=$fnek_sig,ecryptfs_cipher=aes,ecryptfs_key_bytes=16"
    ;;
    *)
        continue
    ;;
esac
(keyctl list @u | grep -qs "$mount_sig") || error "The key required to access this private data is not available."
(keyctl list @u | grep -qs "$fnek_sig") || error "The key required to access this private data is not available."
if mount -i -t ecryptfs -o "$mount_opts" "$d" "$tmpdir"; then
    info "Success!  Private data mounted at [$tmpdir]."
else
    error "Failed to mount private data at [$tmpdir]."
fi

Unmounting before/when logging out, and maybe removing the keys from the kernel keyring (with keyctl clear or purge, sudo keyctl clear @u clears all) are probably good ideas. I had a 2nd folder mounted inside an encrypted home, and logged out, it apparently unmounted the 2nd folder (not in /proc/mounts) but still showed up in mount.

Modified ecryptfs-setup-private

May have the most problems because of the already eCryptFS encrypted home...

From Encrypt custom eCryptfs folder on login/logout (with filename encryption) automatically

Use a ~/.Private underlying directory containing encrypted data (OR a link from ~/.Private to a different folder elsewhere), but change the mountpoint folder to a different one:

Run ecryptfs-setup-private then
Move/create a new mountpoint folder

mv ~/Private /path/to/new/folder

Change the contents of ~/.ecryptfs/Private.mnt (file containing path of the private directory mountpoint) to the new mountpoint folder

echo /path/to/new/folder > ~/.ecryptfs/Private.mnt

If the ~/.ecryptfs/auto-mount and ~/.ecryptfs/auto-umount files exist the folder will be automatically mounted/unmounted on login/logout.

For manual mounting/decrypting (password will be required), run ecryptfs-mount-private

For manual unmounting, run ecryptfs-umount-private


Shell commands or script to unzip, add text file and rezip

You don't even need to unzip the files, you can update an existing file:

zip -u existing.zip file.txt

from zip manual:

update (-u)
    Update existing entries if newer on the file system and add new files.
    If the archive does not exist issue warning then create a new archive.

If you want to add a complete folder, add -r.

To update a number of zip files, do something like this:

for z in *.zip; do
    zip -u "$z" file.txt
done

See this related question on U&L.


Purchasing a computer which Ubuntu can install on

I heard that there was a period where computers were being manufactured which contained Windows and nothing else could be installed on top of.

The terms to do a keyword search for this are lock-in, UEFI lock-in and locked bootloader.

  ...if the current laptops (i.e., running Windows 8.1) can accept grub?

Yes, most current laptops can accept GRUB, but there are a few laptop models which can't accept GRUB. There is a bug surrounding the UEFI implementation on certain laptops which caused them to be bricked after installing a Linux distribution in UEFI mode. That's how important it is to check the laptop model's compatibility with Linux before you buy. For more information about how to install Ubuntu as a dual boot OS on a Windows 8 laptop see: Installing Ubuntu on a Pre-Installed Windows 8 (64-bit) System (UEFI Supported).

  Of course, it would be nice if all of the hardware works

You can make a bootable USB from the Ubuntu installation ISOs, and then try out an Ubuntu live session instead of installing Ubuntu to check if all the computer's hardware devices work as expected in Ubuntu. Running an Ubuntu live session will not install anything on the computer's hard disk.


How to loop through arguments in Bash ($1 $2 $3 and so forth)?

It's a feature of bash:

for num; do ...

is a shorthand for

for num in "$@"; do ...

The documentation is at http://www.gnu.org/software/bash/manual/bashref.html#Looping-Constructs


ps does not work after upgrading to 14.04 (/usr/bin/dpkgd/ps: error while loading shared libraries)

When I update 12.04 to 14.04, the same problem. Finally solve it by following command.

sudo apt-get install procps
ln -s /bin/ps /usr/bin/ps


Why one's 127.0.0.0/8 addresses are available?

From the Wikipedia article on loopback:

  IPv4 network standards reserve the entire 127.0.0.0/8 address block
  for loopback purposes. That means any packet sent to one of those
  16,777,214 addresses (127.0.0.1 through 127.255.255.254) is looped
  back. IPv6 has just a single address, ::1.

Loopback means that data is sent to your own system. So, all of those addresses point to your own system.


How can I switch between Nouveau and INTEL video driver?

Yes you can. By default, the system will be use Intel as primary gfx of your system if you use Nouveau driver. If you want to use your Nvidia gfx you need to add DRI_PRIME=1 in front of your application launcher or executable like this one DRI_PRIME=1 yourApps.
You can try doing test in your terminal using command bellow

DRI_PRIME=1 glxinfo | grep "OpenGL"

This would give you output like this

OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NV108
OpenGL core profile version string: 4.3 (Core Profile) Mesa 17.0.7
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 17.0.7
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.7
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

This mean that you run glxinfo using Nouveau driver


Boot from gparted live cd http://gparted.org/livecd.php

If you dont't want to have /dev/sda5 partition any more right click on it and remove - this 100MB of data will be lost. (You can't do this right now because it is mounted). Right click on /dev/sda6 and resize.
or down size /dev/sda5 and then resize dev/sda6

Be aware that there is always risk, so make backups


please boot from a 'bootable USB' device (I do not mean reinstall)/ for example run Ubuntu live and if it works, then the problem is probably your HDD. Please give me feedback because I need to dig deeper into your problem... Thanks.


Ubuntu compatibility with Wacom tablet CTH-461

The easiest way to found out if it would work is to try the LiveCD, if it Launches, it will work.

Also see if everything works out of the box, if so, you don't need to configure anything.

As for Photoshop, if you install Wine and emulate windows, it should work, at least that's what people are saying in winehq database, but I suggest you to try Gimp, it's very similar to Photoshop (same layout as the old one form photoshop, before the CS versions came out) as it's native of linux.


Suggestion for a light weight distro of linux

If you want to stick to Ubuntu, there is Xubuntu that will be happy with this setup. Lubuntu is for even weaker machines, I run previous LTS on 64Mb of RAM.

If your are in for adventure, try Gentoo. It is not scary if you read manuals, and very rewarding in terms of result and understanding any Linux internals.


how to make a nautilus context menu script to play media files in local LCD TV

Yes, There two solutions.

the simplies is to use a control point like http://www.eezupnp.de/
With this control point you can play both files from media server like ushare and also from the hard disk directly
The other solution is to use nautilus context menu plugin from Coherence-Nautilus-Send file for playback This one is a little more complicated since the script that is on the web page is not working with mu Ubuntu 14.04. So here what has to be done:

sudo apt-get update

sudo apt-get install python-nautilus python-coherence

The plugin uses DBus to communicate with a Coherence instance.
To have a Coherence ControlPoint instance started automatically by the DBus daemon, download the file service file and copy/save it to
/usr/share/dbus-1/services

sudo wget http://coherence.beebits.net/browser/trunk/Coherence/misc/org.Coherence.service -o /usr/share/dbus-1/services/org.Coherence.service

Then download the plugin script file and save it to /usr/share/nautilus-python/extensions (as root)

After that restart the system. After reboot plugin should be runing. Open a folder with some videos, mouse right click on a file, context menu should be shown with "play with >" item.

If it is not working then try to restart nautilus.
open terminal CTRL+ALT+t

nautilus -q
nautilus

should show

  CoherencePlayExtension pid

If not then try to start coherence manualy in terminal

coherence -o use_dbus:yes -o controlpoint:yes


I installed Ubuntu 14.04 LTS and have problems with the password

try to recover the password through the root access,

here are the links

How do I reset a lost administrative password?

Lost Password - Ubuntu official documentation


You can try Wine, but per the Wine application database, Visual Studio generally works poorly under Wine:

From this Wine site page:

  What works
  nothing, install fails

  What does not
  n/a

  What was not tested
  n/a

http://appdb.winehq.org/objectManager.php?sClass=application&iId=892


Try the instructions here. The quick fix worked well. It was night and day. All I had to do was copy and paste a command into the terminal, but the permanent didn't work. I couldn't make a xorg.conf file.

https://www.cmscritic.com/how-to-fix-nvidia-screen-tearing-in-xfce-mate-kde-lxde-and-others/#/

  If you are running Xrce, LXDE, MATE or other desktop environments that
  are not running a compositor such as Compton and you have a reasonably
  new NVIDIA card, you are likely pulling your hair out trying to get
  rid of the awful screen tearing you are experiencing. This screen
  tearing typically occurs when you are running a proprietary NVIDIA
  driver under Linux and have one of the aforementioned (or any
  non-composited) desktop environments. Fortunately for all of us there
  is a fix, and I'm going to walk you through how to make that nasty
  NVIDIA screen tearing go away.

  I'm not going to get into the specifics as to why this happens because
  frankly, I have no idea and I'm more interested in how to make it go
  away.

  For me, the tearing is very obvious when moving windows back and forth
  or scrolling in Firefox.. to the point that it drives me (and I'm sure
  you as well or you wouldn’t be here) absolutely nuts. So why suffer
  any longer? Let's get rid of it, shall we?

  To test out and see if the fix works properly for you, open up a
  terminal and execute the following command (just copy it from here and
  paste it in):

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceCompositionPipeline = On }"

  Your screen may flicker for a second and you should then see a drastic
  improvement. Test out Firefox and moving windows. Did the fix work for
  you? If so, we’ll need to make it permanent as this is just a
  temporary fix for now but don't worry, I’ll show you how. If it didn’t
  work for you, you can try changing the line slightly to this:

nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"

  Note that in the line above, we just changed the
  ForceCompositionPipeline to ForeFullCompositionPipeline.

  Once you've determined that this does indeed fix your issue, we'll
  need to make sure it's permanent. If it didn't work or caused an
  issue, simply reboot and you'll be back to your normal desktop.

  Now that we've determined that our fix works, to resolve screen
  tearing once and for all, it's time to make the changes stick. First
  we need to make sure you have an xorg.conf present in the /etc/X11
  directory. To find out, type the following command into a terminal and
  press Enter:

ls /etc/X11

  If you see an xorg.conf file listed like below, proceed.

$ ls /etc/X11
app-defaults             xinit             Xreset      Xsession.d
default-display-manager  xkb               Xreset.d    Xsession.options
fonts                    xorg.conf         Xresources  xsm
rgb.txt                  xorg.conf.backup  Xsession

  If not, skip this next part but keep reading; I've got you covered
  further down under What to do if you can't find an
  /etc/X11/xorg.conf.

  For those with an xorg.conf listed, in the same terminal window, make
  a backup of the file by typing the following command and pressing
  Enter:

cp /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

  Now open the file with your favorite text editor (I'm a fan of nano
  text editor myself) as root and enter the following command:

sudo nano /etc/X11/xorg.conf

  This will open up your editor, you will then want to add a line below
  based on which one worked for you under the Screen Section, so it
  ends up looking similar to this:

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

  So, if of the two nvidia-settings lines above we tested, the one with
  ForceFullCompositionPipeline worked, use the example above, if
  ForceCompositionPipeline worked, simply use that instead in the
  example above.

  Some of you may already have an Option "metamodes" in your
  /etc/X11/xorg.conf, like in the example below for dual monitor
  setup:

Option "metamodes" "VGA-0: 1152x864_60 +0+0, DVI-D-0: 1680x1050_60 +0+864"

  If this is the case, simply change the line so that it look like this:

Option "metamodes" "VGA-0: 1152x864_60 +0+0, DVI-D-0: 1680x1050_60 +0+864 { ForceCompositionPipeline = On }"

  Reboot and your tearing should be gone!

  What do do if you can't find an /etc/X11/xorg.conf

  Now, for those of you who, like me, did not have an
  /etc/X11/xorg.conf (most people running Ubuntu, for instance), you
  may be panicking thinking that you won't be able to apply this fix.
  Not to worry, I had the same issue, and I won't leave you hanging.

  On my main machine, I’m running Linux Mint 18, but this should work
  with any distribution, I suspect. I did not have an xorg.conf, so what
  I did was launch the nvidia-settings tool and generated a new one by
  going to the X Server Display Configuration section and under file
  name enter /etc/X11/xorg.conf (uncheck merge with existing if it's
  checked as this is only useful in the instance of where you have one)
  and then click Save to X Configuration File.

  Save to X Configuration File

  This should generate one for you which you can then modify using the
  steps above.


ubuntu box just redisplaying login screen after update

Ok, I figured it out.  It was simply an error in my .bashrc.  I finally saw my .xsession-errors file.  It wasn't a recent change my .bashrc, but I recently changed my .profile to source it.  I believe the problem is that I'm sourcing it from Bourne shell, so some Bash-specific stuff fails.


Can't install Ubuntu 13.10; freezing on configuring bcmwl-kernel-source

If I am not mistaken, the Broadcom model for that laptop (Gateway MX6445) is the Broadcom BCM4318 (rev 2) which has a PCI:ID of 14e4:4318. If this is correct the correct package you should be installing would be the linux-firmware-nonfree as shown in the Installing Broadcom Wireless Drivers guide.

Can you confirm this package working, specially because of the (rev 2) part.


How to enable amd discrete graphics card?

Normally the official AMD driver (fglrx) handle correctly hybrid systems.

Another way to go, is to force the use of the discrete card by using a custom /etc/X11/xorg.conf.

Some ressources to help you :

the documentation on how to write this config file
you can try to understand the configuration provided in this post

Be careful, in the Device section you must use the adequate :

driver used : fglrx for AMD official binary or radeon for opensource (best for 2D)
options are relevant to driver you install, man radeon or man fglrx to see which options are available
PCI bus obtained for you 01:00.0 given the result you provided of lspci


Why are the top and bottom of print-outs cut off on Ubuntu 18.04.3 LTS with Brother MFC-J470DW?

I read elsewhere about PPD files having a manifest of all the supported paper sizes and margins, printable areas, etc.

So I tried editing mine and tweaking those:

sudo nano /etc/cups/ppd/Brother_MFC_J470DW.ppd

I found this line:

*ImageableArea Letter: "8.503937007874 62.362204724409 603.496062992126 729.637"

These seem to be X/Y coordinates forming a rectangle within the boundaries of the full letter paper size, which is defined elsewhere as:

*PaperDimension Letter: "612 792"

So I changed the ImageableArea line to this:

*ImageableArea Letter: "8.503937007874 32.362204724409 603.496062992126 765.637"

This reduces the Y offsets and makes the printable area longer. And it worked! The prints are no longer cut off. I'm not sure if this is a great solution (or what units are used in this manifest - maybe points?) but it's better than shrinking everything that is printed out.


I am not familiar with the HP Envy series touchpads, however, if the touchpad is a Clickpad (like MacBook Pro where the whole surface is also a button). You could run the following command in the terminal to see properties of the touchpad:

xinput list-props <device id>

where <device id> is the "device id" of your mouse, you can find it by running xinput list.

To change properties you should run:

xinput set-prop <device id> <property> <value>

If HP uses Synaptics touchpads, this page explains all the listed properties from xinput list.

Let me know if this helps.


With bash, you could do something like:

segment () {
  while true
  do
    read -t "$TMOUT"  # read input with a timeout of $TMOUT seconds
    printf -v output "%s\n" "$output" "$REPLY"  # append to already read output

    if (( $? == 0 ))
    then
      # timeout not exceeded, so we can continue reading
      continue
    fi
    # some error occurred, run specified command with existing output
    printf "%s\n" "$output" | "$@"
    if (( $? > 128 ))
      # timeout exceeded, so we discard mailed output and continue
      output=""
    else
      # some other error, end loop
      return
    fi
  done
}

You can use it like so:

tail -f /var/log/server.log | TMOUT=5 segment sendmail me@example.com


New windows from the dock in Gnome Shell

You may try one of the following in the dash:

[ctrl]+left mouse opens another instance of a program in the current workspace.

Middle mouse or mouse wheel click opens another instance of a program in a new workspace.

Drag and drop the program launcher (the one you would click on) to one of the workspaces on the right. The Program will be executed on that workspace.

I guess the best for you is to just middle-click the nautilus launcher a few times.


After clean install I cannot login using my chosen password

I have found that sometimes the installer doesnt honor keyboard layout and defaults back to US during my use of a dvorak keyboard. If you keep the default keyboard layout as a US layout yet type in your password as if you were using a swedish keyboard, does your new install accept that password?


Ubuntu 17.10 change default user on login screen

Actually it is not the second user that is highlighted but it is the one under the mouse pointer. And when you boot and don't move your mouse then the mouse pointer is in the center of the screen.

Hence, the user in the center of the screen is highlighted. On a two-user system this happens to be the second one.


Mount cifs of shared windows folder problem

Finally I got it to work.

I used the ip-address (192.168.1.11) instead of fileserver.

When ping:ing the fileserver name on the client I got ping response from another ip/computer (192.168.1.16) than I got from the host computer (192.168.1.11) !

Don't know why the dns name was linked to wrong ip on the client computer?


While python is not rly integrated with dpkgs alternatives solution, you can change the link for python in /usr/bin

~$ ls -lt /usr/bin/python
lrwxrwxrwx 1 root root 7 márc   4  2019 /usr/bin/python -> python2
~$ ls -lt /usr/bin/python3
lrwxrwxrwx 1 root root 18 szept 24 08:49 /usr/bin/python3 -> python3.5
~$ sudo ln -fs /usr/local/bin/python3.7 /usr/bin/python3

This is the fast and easy way.

If you add the source repository of 18.04, you may do apt-get source python and build your own python package. This will replace the installed python3.5, cause the package name is python3.

Another alternative to just install 3.7 from here:

https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa

Something like that:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get install python3.7

This will also wipes your python 3.5 for the same reason.


The tutorial you followed was for enabling per-user automatic drive mounting within the graphical desktop.  If you want the drive to be mounted at boot, regardless of user or graphical desktop, you do it with /etc/fstab, which is much simpler.

I'm not sure why the udisks method failed for you, but it isn't the approach I would take.

Your question seems to be confused about whether /etc/fstab is a file or folder.  /etc/fstab is a file, which you should edit with a text editor.

User-friendly documentation for it is available here:

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


Did you try checking the blacklist.conf file in the folder /etc/modprobe.d ??
Sometimes my wifi seems useless on various computers/ubuntu versions.
Usually putting a # in front of the next ones solves the problem for me.

blacklist eth1394
blacklist bcm43xx

( Yes, you need to ben root to do this of course :-)


Here's the installation guide: https://help.ubuntu.com/community/GraphicalInstall


You should have specified $DISPLAY environmental variable and user (may be ken in your case).

$ sudo crontab -e -u user

m h dom mon dow command
34 12 * * * export DISPLAY=:0 && /usr/bin/gedit /home/KEN/Desktop/ImaTXT


Can no longer login to Ubuntu using sudo

I did find a solution to my problem. I booted into the Grub menu by continually pressing 'shift' when booting up then went to advanced options and loged in to root which didn't require a password. Then I simply changed my password for both sudo and my user by typing 'passwd' for sudo then 'passwd user' for my user and not I have system back to normal.


Seems like you didn't install Java correctly. Follow this guide to install Oracle Java on Ubuntu 12.04 or alternatively install openjdk by running:

 sudo apt-get install openjdk-7-jdk


Can I use Unity with the dash and hud only? 12.04

If you don't like the unity launcher, you can use GNOME 3. It might be what you're looking for.

Just go to the Software Center, and find the GNOME Desktop Environment. After you download it, log out. At the log in screen click the little Ubuntu circle logo to chose gnome, then enter password to log in.

You can pretty much do the same for the other desktop environments out there. Or you can use other tools like Ubuntu Tweak to change the appearance of your desktop.


you need a LAMP solution, so you have to install Apache, MySQL (server version) and the required PHP version and it's modules for your software.

The path where you have to "install" your files is called "document root" and is defined in the Apache configuration file, which is usually /var/www/. You can open the file /etc/apache2/apache2.conf and simply read (and change) the location of the DR.

You can basically consider the PHP as a big plugin for Apache, so probably for all the settings regarding the organization of the files on the disk and the general setup you have to refer to apache2.conf file. But to manage the PHP functionality you can modify the file php.ini that is usually located under the /etc/php tree but it can easily be moved elsewere according to your version of Ubuntu, but in general you can find a php.ini under /etc/.

Always make a backup of these files if you are not sure about what you are really doing.

By default the address of your local webserver is localhost or 127.0.0.1 if you want to use an IP, you can type it as the address and reach your document root. If you have created a dir under the DR called test (as in /var/www/test/), navigate to the content of this folder simply by going to http://localhost/test/ or http://127.0.0.1/test/ in your web browser. In a nutshell every web address is relative to the DR.


Such setup is depending on the kind of content to be accessed via the web : strictly static, dynamic (PHP, ...), coming from an application server (tomcat, Jboss, ...)

For the load-balancing part, it is important to know if you need a cluster load-balancer (to avoid single point of failure at this level too), persistance of sessions, if you have ressources to put the load-balancer(s) outside the web servers.

You don't explain how you generate the content for your web server. If the content is generated once a while on an external device, it may not be necessary to have a shared storage or replicated storage for them. Just by pushing the new content to two servers instead of one from the machine where the developments occurs would suffice.

A compact approach would be to install Linux Virtual Server on both web servers, along with apache.

If the site is doing modification in the file system of the Apache document root, there can be numerous solutions, depending of your application :

Just perform rsync at regular interval between both server using crontab
Create an NFS share on a third server mounted as the document root of both Apache
If the content change a lot and you don't want to loose anything anytime, you can create a filesytem on a DRDB configuration, to do synchrone replication at block level of your document root.
Build a redundant shared storage box combining DRBD and a sharing mechanism (NFS = sharing at file level, iSCSI = sharing at block level). The choice of the method of sharing greatly depend of your application (number of parallel connections, amount of I/O, ...)

In conclucion, it is not easy to be detailed and exhaustive to answer your question as your input is too vague. The correct solution must be setup according to the requirements of the application which are not detailed here.


Open the terminal and type the following:
sudo -i
cd /etc/X11
touch xorg.conf
nano xorg.conf

then in the simple nano editor, write (or just paste) this:
Section "Device"
        Identifier      "Configured Video Device"
EndSection
Section "Monitor"
        Identifier      "Configured Monitor"
EndSection
Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
        SubSection "Display"
          Modes "1280x800"
        EndSubSection
EndSection

*Change the Modes "1280x800" for your needs
then save the file using Ctrl+O, then quit Ctrl+x.
Voila - logout and login again and resolution is fixed forever.
Thanks for the great wiki here:
https://wiki.ubuntu.com/X/Config/Resolution
Hopefully it helps your question.


Dell XPS 13 Ivybridge, turns off randomly when on battery

Proabably it is your battery that is failing.

To check this run:

upower -e

Identify your battery and run:

upower -i /org/freedesktop/UPower/devices/battery_BAT0

Change the battery "path" accordingly.


I strongly recommend that you do a "clean installation", whereby you back up your data, and then install from scratch, and restore your data.
But, since you have already said you don't want to do that, then I suggest you use sudo do-release-upgrade from one of the TTYs, which you can get to with Ctrl+Alt+F4.  Login with your sudo-capable user, then do sudo do-release-upgrade.
Like with any OS upgrade, I strongly advise you to back up your critical data that you don't want to lose. It is possible to lose your data during an upgrade, and you should ALWAYS back up your data.