Unmet dependency with tzdata & tzdata-java in 12.04

What's Happening: You have a version conflict.

dpkg: dependency problems prevent configuration of tzdata-java:
tzdata-java depends on tzdata (= 2016g-0ubuntu0.12.04); however:
Version of tzdata on system is 2016j-0ubuntu0.12.04.

Let's look at which version of tzdata is in the Ubuntu repos:

$ rmadison tzdata
 tzdata | 2012b-1              | precise          | source, all
 tzdata | 2016j-0ubuntu0.12.04 | precise-security | source, all
 tzdata | 2016j-0ubuntu0.12.04 | precise-updates  | source, all

So far, so good You are clearly running 12.04, and tzdata is clearly the latest available version.

Now let's see if your version of tzdata-java matches 12.04

$ rmadison tzdata-java
tzdata-java | 2012b-1              | precise          | all
tzdata-java | 2016j-0ubuntu0.12.04 | precise-security | all
tzdata-java | 2016j-0ubuntu0.12.04 | precise-updates  | all

Uh-oh. The latest tzdata-java is 2016j, not 2016g.

The Problem: Your tzdata-java is either from some non-ubuntu source, or (more likely) it's required by some other non-Ubuntu software on your system.

One Solution: Uninstall tzdata-java and all software that requires it. That software is no longer compatible with your release of Ubuntu. If you wish, you can ping the upstream source of that software - perhaps they have a compatible version available.

sudo apt-get remove tzdata-java

Be sure to read the list of removed packages carefully. Refuse the removal and return here if you have questions about what will be removed.


determine the correct repository to add for a specific package

You can just download the deb package from there, just select the architecture for your system, and if you click on overview you can see where is the package located, universe.


juju error: flag provided but not defined: --force-machine

Fixed it. Actually --force-machine has been replaced with --to in this new version of JuJu


How do I download a corrupted package again?

Try removing firefox in the Software Center then reinstall.

Or open a terminal and run:

sudo apt-get remove firefox

This will also uninstall firefox and its packages then you can reinstall.


How to uninstall Ubuntu from an ubuntu only system

This isn't really a case of uninstalling Ubuntu, just that of installing Windows.

Stick the Windows CD in, and tell it you want to use the whole disk when it asks how you want things arranged. That might involve asking it to delete the existing Ubuntu partition (it's been years since I've actually looked at the Windows installer).

In short: much what you did with Ubuntu, just with a different CD :)


Mounting one linux machine on to another

From our short conversation below your question I think you need a combination of several techniques:

getting your files to sys2
remote-controlling sys2 while physically sitting in front of sys1
optionally: sharing the workload between both systems

As getting too deep into each of these would hit the boundaries of one question, I only point you at some ressources and after that you might come back with new questions on details of them.

getting your files to sys2

there are various solutions to this problem:

samba/cifs (share the folder on sys1, mount it on sys2 - https://help.ubuntu.com/community/Samba/SambaServerGuide / https://askubuntu.com/a/101037/555486
sshfs ( https://help.ubuntu.com/community/SSHFS )
nfs ( https://help.ubuntu.com/lts/serverguide/network-file-system.html )
syncing (as in replicating them using tools as rsync, syncthing, etc pp - please just use some search engine to find help on those)

which one you would like to use in the end is totally up to you, each has its down- and upsides. for example cifs, sshfs and nfs are slower all the time, while replicating will take some time, but calculations should afterwards be a lot faster than using a network-filesystem.

remote-controlling sys2 while physically sitting in front of sys1

to control a linux machine from another there are some different options as well:

VNC/RDP/some other form of graphical remote desktop protocol
remote shell/terminal protocols (SSH, RSH, Telnet)
job scheduling systems (which are overkill on your two systems setup)

VNC - https://help.ubuntu.com/community/VNC
RDP - https://help.ubuntu.com/community/xrdp
SSH - you already seem to know about that
RSH/telnet - well, stick to SSH if you not that already

Fazit

Well, thats mostly it: get your files to sys2 and execute the jobs there. Afterwards transfer your results back.

Optional workload balancing

Depending on the type of workload you might find solutions to use both systems to do part of the jobs:

distcc (can divide the task of compile huge programms to several machines)
distributed computing projects at wikipedia: https://en.wikipedia.org/wiki/List_of_distributed_computing_projects (just fyi)

If I yould know more about the actual tasks you want to load onto sys2, I might be able to help you find a fitting solution to sharing the workload on both systems.


$ apt-get install git , this command is not running

Open a terminal (Ctrl+Alt+T) and type:

sudo apt-get install git

Then hit Enter.

This will install the git package.


Removing a device from the web site does not disconnect the device if it is currently connected to the service. You'll need to "Disconnect" that device from within the control panel, and then remove the device from the web site. Or you can just click the "Remove" on the devices tab of the control panel, from the device you wish to remove, to remove it.


On what events the "install" hook get triggered

Any time a new 'unit' is created the install hook is run, so deploy, add-unit etc. Its job is to install anything required for the proper operation of the charm on a new machine or container.


Run:

sudo dpkg --configure -a

EDIT:

As the original message says, you have to repair the error (run the above command) regardless.  However, if you do want to install the Sun JRE, you use tab to get to the OK.


Why A Mismatch Between ubuntu-drivers list and Additional Drivers List?

There is no "mismatch".

"X.Org X Server -- Nouveau display driver" is a default open-source driver. When you select this option, all proprietary drivers are uninstalled.

ubuntu-drivers list command shows only available proprietary vendor drivers.

And your output does not mean that any of proprietary drivers are installed.


How can I open the "About GNOME" window?

Simply put, there is no such window any longer. Particularly with Ubuntu, and more over if you're using the Gnome3 PPA, the multiple components which make up Gnome are a number of different versions. Many of the applications like Files (aka Nautilus) have an 'About' under their menu, however their version may not match other components.

Just as an example, my Files shows version 3.8.1, whereas my Gnome contacts shows version 3.6.2. Long and short of it however is that gnome-shell itself has no gui representation of its current version.


How can I find out what the settings in /sys/bus/usb/devices//power mean?

Please check here: http://tomoyo.sourceforge.jp/cgi-bin/lxr/source/Documentation/usb/power-management.txt?v=linux-3.11.10 I suggest you do:

sudo -i
echo -1 > /sys/bus/usb/devices/3-4/power/autosuspend_delay_ms
exit

If that fixes it for you, then make it persistent:

gksudo gedit /etc/rc.local

Right above the line exit 0, add:

echo -1 > /sys/bus/usb/devices/3-4/power/autosuspend_delay_ms

Proofread, save and close gedit.


building a pro in qtcreator gives "qtWidgets: No such file or directory"

It is possible that the default qt build Kit has been set to qt 4.x rather than qt 5.x when qtcreator was installed. To update this;

qtcreator - options - build & run - Kits - Manual - Desktop (default) - Qt version

Change Qt version from qt 4.x.. to qt 5.x.. in PATH (qt5).


If you have access to TTY, could you post the output of:

ps ax | grep dm

Then go with:

Reboot and press Shift to get Grub menu.
Select Recovery Mode → dpkg (Repair broken packages), Reboot
Not yet, again reboot and press Shift to get Grub menu.
Select (upstart mode). (let me know)
Not yet, again reboot and press Shift to get Grub menu.
Select Recovery Mode → dpkg (Repair broken packages)
Drop to Shell, then run:

sudo apt-get remove sddm
sudo dpkg-reconfigure lightdm

and set lightdm as default, then reboot.


How to configure multiple domains to point to separate virtual machines with a single IP?

This sounds a little like my setup I have in place on my network.  I have multiple web facing services on my home servers but on different system IPs.

I have a dedicated nginx server on one system that handles all the inbound traffic on the public IP over ports 80 and 443, and reverse-proxies to the backend servers on my network where things are (which are Apache, nginx, and lighttpd, so it's not necessarily specific for the backends).  I currently do this for a GitLab instance and an OwnCloud instance on separate IP addresses, and a server that's currently off (previously ran a test instance of MediaWiki).

  NOTE: This answer is written with the idea that the system doing the reverse-proxying defined below is a separate system, and not one of your existing server configurations.  If it's one of your existing servers, then do not change the existing configurations, except to add a new one for the individual site that is not on that server, rather than setting up new configurations for each server. I also suggest the use of nginx; you can do this on whatever web server you want, I just know how to rapidly do this in nginx.

(1) Install nginx on one of the servers, or set up another one

I use nginx, and the nginx-core variant for this, but you can use Apache or any web server you're comfortable with and know how to configure (but since I use nginx, I'm using nginx instructions here).  I also use ssl-cert to create a junk self-signed cert for the default catch all to use.

sudo apt-get install nginx nginx-core ssl-cert

(2) Configure that nginx server for a 'default' catch-all for invalid domains.

First, let's do some changes for the default catch-all site.

sudo rm /etc/nginx/sites-enabled/default
sudo touch /etc/nginx/sites-available/catch-all

Put this into the /etc/nginx/sites-available/catch-all file:

server {
    listen 80 default_server;
    listen 443 ssl default_server;

    server_name _;

    include snippets/snakeoil.conf;

    return 404;
}

This is a default 'catch all' for any type of connection to the IP address for any domain we haven't configured on the nginx instance to listen for the connections.  This way, we can serve a "Not Found" for any invalid domains being directed here.  We will explicitly define all domains we say are OK in individual configuration files.  For now, though, let's enable this catch all, then start setting up individual domains.

sudo ln -s /etc/nginx/sites-available/catch-all /etc/nginx/sites-enabled/

(3) Configure nginx for individual permitted sites and their reverse proxies

  For this example, I am going to use www.foo.co.uk and www.bar.co.uk per your post.

Basically, I'm going to give you an example file that you can use for the reverse proxy configuration.  This should work with most reverse proxy setups, though the individual sites you're running may have slight nuances that I can't help with here.

For each site you want to reverse proxy, start by creating the file with the domain name.  I'm going to use the two domains you stated as examples.

sudo touch /etc/nginx/sites-available/{www.foo.co.uk,www.bar.co.uk}

In each of the two created files, you can put this in place.  Just update the information accordingly wherever my comments are (they're preceded by #):

server {
    listen 80;

    server_name DOMAINNAME;  # Replace DOMAINNAME with the actual domain

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $remote_addr;

        # Replace this INTERNALIPADDRESS:PORT with the IP and port
        # combination for the server on your network handling the
        # above-specified domain name.
        proxy_pass http://INTERNALIPADDRESS:PORT/;
    }
}

Once created, we once again need to activate them.

sudo ln -s /etc/nginx/sites-available/www.foo.co.uk /etc/nginx/sites-enabled/
sudo ln -s /etc/nginx/sites-available/www.bar.co.uk /etc/nginx/sites-enabled/

Now that we've activated the sites, let's make sure there's no configuration errors here.  If this command spits out anything other than 'the configuration file syntax is ok' and 'configuration file test is successful', then you need to address those errors:

sudo nginx -t

If there's no error notices and you get the "OK" and "Successful" messages, then restart the nginx process to make all the configurations actually take effect.

Ubuntu 14.04 and earlier:

sudo service nginx restart

Ubuntu 16.04:

sudo systemctl restart nginx

(4) Configure port forwarding on your network to forward ports 80 and 443 to the server you just set up this reverse-proxy server on.

In the example I just wrote, let's say that the server I put nginx on is 192.168.100.200.  On your router, set up port 80 and port 443 to route to that IP address.  If you don't intend on using HTTPS, then only forward port 80.

(5) Point the DNS for your domains to your public IP address at your home.

This is pretty self explanatory, but make sure the DNS A record points to the IP address that your router gives you on the Public Internet.  (Go to ipchicken.com or similar to get your IP address if you don't know it)

(6) You're done, as soon as the DNS propagates.  Test from any system NOT on your home network (such as a computer on a public wifi at a coffee shop or something).


Ubuntu 17.10 not recognizing Broadcom wireless adapter BCM 4360 [14e4:43a0]

Changing to -generic kernel, then running the following when booted fixed it for me:

sudo apt-get install --reinstall bcmwl-kernel-source


How to setup LVM cache on ubuntu 14.10 server

LVM Cache should be the best deal at this moment, it has incorporate all the underlying functionality. I wrote a passage about that to list down the procedures to setup LVM Cache.

https://www.jimmysyss.com/build-my-fusion-drive-with-lvm-cache/

The idea is sparing around 10-20GB for LVM Cache, several MB for the Cache Meta and configure "Write-back" mode for performance.


How to mount a local directory to a remote directory on a remote server

Yes you can use SSHFS, a tool that uses SSH to enable mounting of a remote filesystem on a local machine.

See https://help.ubuntu.com/community/SSHFS for full instructions.

You will need to install and run an SSH server on your local machine and install SSHFS on your server.


Sometimes (quite frequently) Chromium doesn't start up

I recently got ubuntu 13.04 and it happened to me a few times so I just installed normal Chrome and it sorted all my issues and I haven't had any problems since.

Hope this helped.


VirtualBox Headless: Unable to create hostonly network

I have figured out with some trial and error, that the "--hostadapter1" in the command

vboxmanage modifyvm "centos604" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nic2 hostonly --hostonlyadapter1 vboxnet0 --ostype RedHat_64

should actually be replaced with the "--hostadapter2"

vboxmanage modifyvm "centos604" --memory 512 --acpi on --boot1 dvd --nic1 bridged --bridgeadapter1 eth0 --nic2 hostonly --hostonlyadapter2 vboxnet0 --ostype RedHat_64

And it works fine.


Can juju add-machine be used to prepare a machine for service deployment?

If you're using constraints at all, I think you've hit a consequence of this bug -- none of the existing machines will be matched.

You can work around it with the --to parameter to deploy or add-unit:

$ juju deploy mysql --to 3
$ juju add-unit mysql --to 4


What's the point of having /vmlinuz and /initrd.img?

This is for certain scripts that update (boot related actions) so they will automatically go for the newer upgraded kernel rather than the old kernel if the kernel was upgraded.

The files and the (symlinks) are needed for modules contained in the kernel during the boot process.

If you remove one or both vmlinuz and initrd.img the system you may need to re-run your boot loader [grub] because grub relies on the symlinks to continue its next process> Uncompressing Linux... Ok, booting the kernel.

To get an Idea of how the system works look here: http://www.ibm.com/developerworks/library/l-linuxboot/index.html


How to remove Grub Rescue from my friend's laptop

If the computer came with Windows 8, it's almost certainly booting in EFI mode, which means that older recovery instructions intended for Windows simply will not work. Instead, you should use a tool designed to edit the EFI boot order. In your situation, the easiest solution is likely to be to use the firmware itself; many EFIs provide an options page on which the boot order is listed. You'll probably see ubuntu as the first entry, with Windows Boot Manager somewhere below that. Use the firmware's tool to change the order, then save the changes and reboot. Unfortunately, not all computers provide this functionality, and even those that do vary greatly in their user interfaces, so you'll have to poke around until you find the right option -- and it's not guaranteed that you will find it!

If the option isn't present, you can:

Boot into an Ubuntu live disk.
Launch a Terminal window.
Type sudo efibootmgr to see the list of boot entries. Note the BootOrder line and locate the entries for ubuntu and Windows Boot Manager.
Type sudo efibootmgr -o ####, where #### is the number associated with the Windows boot manager. (You can add other options, perhaps just cutting out the ubuntu item and leaving the rest intact.)
Reboot.

It's possible to do something similar in Windows using EasyUEFI or the Windows bcdedit command, but as Windows is not currently booting, you'd need to use a Windows emergency disk, and I'm not sure of the exact procedures.

Another option is to mount the EFI System Partition and delete the EFI/ubuntu directory from it. With it gone, the computer will skip the Ubuntu entry and move on to the next one, which is probably Windows.

All of this assumes an EFI-mode boot. If the computer is booting in BIOS/CSM/legacy mode (because Windows was upgraded from an earlier BIOS-mode Windows 7 install, because it was self-installed in BIOS mode, because it came from a "mom & pop" computer shop that installed in BIOS mode, etc.), another recovery procedure will be required. In brief, you must re-install the Windows boot loader to the MBR of the disk. IIRC, the Windows command bootrec /fixmbr should do this; however, I'm far from an expert on this task and I may be wrong or missing some critical step.


Automatically dim brightness if battery is low

This script works for me for doing exactly this. The drawback is that it will continue to set the brightness level even after increasing it manually, when the battery is low, and it does not check if the ac adaptor has been connected.

/etc/acpi/events/battery_changed

event=battery.*
action=/etc/acpi/actions/dim_screen_on_low_battery.sh

/etc/acpi/actions/dim_screen_on_low_battery.sh

#!/bin/bash

BATTERY_LOC="/sys/class/power_supply/BAT0/"
VIDEO_LOC="/sys/class/backlight/acpi_video0/"

percent_left=$((100 * `cat /sys/class/power_supply/BAT0/charge_now` / `
                       cat /sys/class/power_supply/BAT0/charge_full`))
#echo "$percent_left% battery remaining"
if [ $percent_left -lt 20 ] # Adjust the battery limit.
# Adjust the dimmed brightness level.
then echo 50 > /sys/class/backlight/acpi_video0/brightness
fi


Depending on what your executable do, I think that you should specify the full path for dataset/filename:

./executable -i /path/to/dataset/filename

For example, if dataset/filename is in your home directory, you can use:

./executable -i ~/dataset/filename

or:

./executable -i /home/<your_user_name>/dataset/filename


Is it possible to create AWS RDS server using juju?

In order to use AWS RDS someone has to write a charm for that specific service.

I searched the charm store: https://jujucharms.com/store

and was not able to find a charm that will leverage RDS directly, you'd have to use a generic instance with either MySQL, Percona, or MariaDB.

If you're interested in modifying the existing MySQL charm to use RDS you can find documentation on how to do that here:

https://jujucharms.com/docs/stable/authors-charm-writing

Any help providing RDS would be much appreciated!


That -m is a flag to indicate a loadable module is about to be implemented.

It will always be immediately followed by the name of the loadable module; in your case, a deprecated module called state.  Since the state module is deprecated, consider learning and using the module that replaces it called conntrack.


Permissions fail to change, even using sudo nautilus

This problem has occurred to me too, but never bothered to correct it the GUI way. However, you can change the folder permissions, if that is the problem, by opening a terminal and then typing the following:chmod 775 <folder_name>This gives the normal folder permissions to the folder given by the name folder_name. If it asks you to be root, then prepend the command by sudo. To know more about the chmod command, have a quick look at this Wikipedia page, it gives a good detail and couples it with examples which can help you understand it better. To just know about the numerical options, have a look here. Hope this helps.

EDIT: Added links to make it a little more explanatory.


Audio stops when using Audacity on Ubuntu Studio 18.10

Open Ubuntu Studio Controls and click "Stop Jack" to make sure Jack is stopped (Audacity doesn't use it). That should make your audio settings the default.

Otherwise, try the following troubleshooting steps:

https://help.ubuntu.com/community/Sound
https://help.ubuntu.com/community/SoundTroubleshooting
https://alsa.opensrc.org/DmixPlugin


Those lines belonged to an older version of SonarQube. If you are using SonarQube 5.x, there is no need to set those lines. Check the updated post on http://mamikon.net/blog/installing-sonarqube-ubuntu/


I don't like to resurrect old threads, but the OP forgot to prepend with -J the flag in the file netbeans.conf:

-J-Dsun.java2d.opengl=True

These are my configuration flags, and netbeans runs smoothly:

netbeans_default_options="-J-server -J-Xverify:none -J-XX:+AggressiveOpts -J-XX:+UseConcMarkSweepGC -J-XX:+CMSClassUnloadingEnabled -J-Djava.net.preferIPv4Stack=True -J-Dawt.nativeDoubleBuffering=True -J-Dsun.java2d.opengl=True -J-Xss32m -J-Xms64m -J-Xmx256m -J-Dsun.java2d.noddraw=True -J-Dsun.java2d.dpiaware=True -J-Dsun.zip.disableMemoryMapping=True"

For more info: See this guide on the Oracle website


super + w used to open window manager on Ubuntu 16.04

Simply tap (press and release) super to get to the Activities overview with running windows.

Then use arrow keys to select a window and then enter to bring it into focus.


QCA6174 not working in Ubuntu 16.04 after running upgrade yesterday

I got it working with the help of a guy from Ubuntu Forums, here.

Here is the code:

sudo rm /lib/firmware/ath10k/QCA6174/hw3.0/*
sudo wget https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/board-2.bin?raw=true /lib/firmware/ath10k/QCA6174/hw3.0/board.bin
sudo wget https://github.com/FireWalkerX/ath10k-firmware/blob/7e56cbb94182a2fdab110cf5bfeded8fd1d44d30/QCA6174/hw3.0/firmware-4.bin_WLAN.RM.2.0-00180-QCARMSWPZ-1?raw=true /lib/firmware/ath10k/QCA6174/hw3.0/firmware-4.bin

And reboot.

Note that you need to download the board-2.bin and rename it to board.bin.


I guess you have a file named selenium.jar but no file called selenium in your current folder.

If you run

 ps aux | grep [s]elenium.jar

the shell will try to replace [s]elenium.jar with matching files names from the current folder. If there is a file called selenium.jar that will match and [s]elenium.jar will be replaced by selenium.jar.

The shell will then execute the command with the replaced value, i.e.

ps aux | grep selenium.jar

To avoid this quote the regex to protect it from the shell:

ps aux | grep '[s]elenium.jar'


Will upgrading disrupt online backup software (Crashplan)?

Crashplan support recommends uninstalling the program first then reinstalling once you have upgraded you OS.

This can be done by running the uninstall script located in the Crashplan-install folder.

Once you have reinstalled you can adopt your previous backup for your upgraded system.

Reference


How to make transmission work for all users

When the dialog window to choose the program pops out, you need to select /usr/bin/transmission-gtk


After a quick debug of selectively disabling extensions it came down to my initial attempt at fixing/tweaking the original gnome-shell theme.

Specifically the installation of the remove rounded corners extension.

While toggling this extension I noticed that every time I re-enabled it my shell theme would revert back to default. so un-installing does the trick.


I changed the username by changing /etc/passwd

You have to change the username in /etc/shadow too.  Then the name/password will match and should work.  Check the /etc/group and /etc/gshadow files too for the  old username, and change if necessary.  Then check the /etc/sudoers file,... etc.
  Probably, you should just have added a new user (useradd), added the new user to sudoers, and when things work, delete the old user.


In fact, verbose is missing in the command, so there was no output explicitly but it is not really failed. Let us check this fact:

$ sudo grub-probe --target=cryptodisk_uuid -d /dev/sda
$ echo $?
0

So the output of echo $? confirms that the command was successful but no output displayed because verbose option is missing.

So, you must run the command with verbose option in order to display an output as follows:

$ sudo grub-probe --verbose --target=cryptodisk_uuid -d /dev/sda
(or)
$ sudo grub-probe -v --target=cryptodisk_uuid -d /dev/sda

That is it!


Emergency prompt after Upgrading from Ubuntu 14.04 to 16.04

One thing you could try is to repair your grub with the boot-repair-disk utility:

download boot-repair-disk .iso file from here
burn it on a DVD or USB stick
boot your PC from it
Select "Recommended repair" that solves the majority of bootsector/GRUB/MBR problems

more information on : https://ubuntuforums.org/showthread.php?t=1831869


How to install node.js version 10 on Ubuntu 18.04

I am using nvm to switch between nodejs versions.
https://github.com/nvm-sh/nvm
Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
restart terminal
Install node 10.x:
nvm install 10
Switch to node 10.x:
nvm use 10
Check node version:
node -v


How do I set "all windows" by default when left clicking on a application that has more than one window?

Launch Terminal and run the following command

gsettings set org.gnome.shell.extensions.dash-to-dock click-action 'previews'


Many but not all X220s have a hardware or firmware issue that causes them to lose the wifi device after sleep.  It affects windows also.

Hibernate should be OK.  If you have an SSD drive installed, that doesn't hurt too much, and fortunately the x220 has an MSATA drive as well as the 2.5" drive bay


How to give nopasswd access to multiple commands via sudoers?

I have solved the issue by creating a new group for limited admin rights... name of that group is LimitedAdmins after that I updated the sudoers file as below.

The line I appended is:

%LimitedAdmins ALL=NOPASSWD: /usr/bin/apt-get*, /etc/init.d/apache2 restart

This is the complete /etc/sudoers file:

# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of directly modifying   his file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults    env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL

#includedir /etc/sudoers.d
%domain_name\\administrators ALL=(ALL) ALL
%LimitedAdmins ALL=NOPASSWD: /usr/bin/apt-get*, /etc/init.d/apache2 restart

It works perfectly fine in case if your system is domain or not.


Try this command:

sudo dpkg-reconfigure lightdm

and choose  kdm as default.

If this doesn´t work, try with other answers here.

PS: As you said you´re new on Ubuntu, I recommended you to download .deb files when you want to install something new on Ubuntu.


downloading mysql-server and now my terminal is red

I'm not sure what is the cause of problem. However if you want to install mysql-server you can simply use another terminal like xterm which should be installed by default or other ones like: xfce4-terminal, terminator, etc.

The other solution might be using other utilities for software installation things like: apt, aptitude, etc.

You can also try to reconfigure the gnome-terminal that might be helpful:

sudo dpkg-reconfigure gnome-terminal.


Does Aptitude package manager also need the dependencies and repositories needed by APT to install software?

aptitude is just kind of an extended command-line frontend for apt. It uses the same functionality internally, so both manage the exactly same packaging system with the same available repositories.

There is no difference if you have installed a package through apt or aptitude.


Try This And Tell Me The Results (I dont think it works for ubuntu 13.10 Try it at your own risk)

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-319

Source: http://linuxg.net/how-to-install-nvidia-319-32-drivers-on-ubuntu-13-04-12-10-12-04-and-linux-mint-15-14-13/


Is it possible to change mount options of an existing encrypted Ubuntu 18.04 installation using a live stick?

Unfortunately, I could not fix the original error. As suggested by @GeorgeUdosen, I booted with liveusb. I was able to decrypt my original drive using udisksctl unlock -b /dev/sda3/. The drive was automatically mounted and I could copy my files to an external drive. Afterwards, I reinstalled Ubuntu 18.10.


Screen brightness changing randomly every 2-3 seconds

Turn off settings > Power > Automatic brightness


How do you change the default Unicode shortcut CTRL SHIFT U to something else?

Open System Settings -> Language Support and change Keyboard input method system to None.

Log out and in again.


How to limit localhost to local browsers?

When you are binding the port for the service just specify the interface IP as: 127.0.0.1 instead of 0.0.0.0.

Here is a reference about the INADDR_ANY.

Without sample code I am guessing that you have bound the interface with INADDR_ANY.


Doubs and problems with dual boot with windows 8.1

Installing on the external disk will be just like installing on an internal disk. There should be no limitations on what hardware it can use. The only difference will be in speed. Depending on how the external disk is connected, it will not be as fast at booting or loading files as an internal disk. Connections like eSATA or USB 3.0 could be closer to the performance of internal disks.

You will only need to plug in the external drive when you want to boot Ubuntu or access it from Windows. Windows will not need the drive to boot, and even if you set up the BIOS to boot the external drive first, and the external drive is not attached, it should move on to the internal drive.


There is an open source project called yakyak which is unofficial Google Hangouts client for Linux, Windows and macOS. It might work  as google meet is formerly known as google hangouts.  If you use snap you should be able to install just with
sudo snap install yakyak


How can I play Flash videos from YouTube louder?

I have the exact same problem with my favorite song. here is a list of solutions I know:

Put on a set of headphones if you have any, and mess with the volume on both systems. (You can only do it with the Computer sometimes because only some headphones have the ability to get volume turned up and/or down.)
If you have any speakers, connect them to your computer and mess with the volume on both systems.
Find another way to watch the video without youtube. if there's any free downloads, you can get the song directly to your computer and hear it from there, it usually has louder sounds in when I do that.

Hope this helped!
( Sorry for bad english, I am from Denmark )


Alias to go to newest folder in a folder

Double quotes allow the alias contents to be evaluated at definition time - use single quotes to postpone evaluation until runtime:
alias res='var=$(ls --directory /path/to/results/res* | tail -n 1); cd $var'

See also:

Command in .bash_profile returns outdated result

date command not resolving properly in bash alias


Terminal Command to install apps on ubuntu-touch?

There is currently no command line tool to install applications from the store, and currently no way to automatically re-install previously installed applications.


Macbook 13" mid 2010 wifi card BCM432b not working...Tried every guide in this forum

The correct driver for this adapter is bcmwl-kernel-source. Run

sudo apt install bcmwl-kernel-source

and reboot.


Touchpad of Acer Aspire E5-551G not detected on Ubuntu

For me the easiest was to update to 14.10 but the right click is missing. Or if you are more advanced user update the kernel to 3.17-4*. The device is still Unknown.


Can I install Microsoft Office? If so, how?

Try PlayOnLinux.

Note that the first few images are from myself, and the rest are from here since I don't have a MS Office 2010 CD.

The following tutorial also works in Ubuntu 12.10.

Download PlayOnLinux using the commands:

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

Click Install.

Search for the Microsoft Office version you want to install (in our case, it's MS Office 2010).

Click Install.

Click Next.

Choose Other. I'll assume that you have your MS Office 2010 CD.

Insert your CD and type /media/cdrom in the blank space. Replace cdrom with the name of the CD. Then click next and MS Office 2010 will be installed!

Although you can install MS Office, I recommend using LibreOffice (which is installed by default).  It's a free Office Suite that is compatible with all your office files.


Turning off the "activities" hotcorner at the top left?

You need to install No Topleft Hot Corner extension:

https://extensions.gnome.org/extension/118/no-topleft-hot-corner/


Nautilus suddenly looks different after a restart

You're using nautilus 3.6. Chances are you added the gnome3 ppa, which has this version of nautilus.
You should check if your icon pack has an upgrade for nautilus 3.6, or you can purge the gnome3 ppa.

If you have installed the gnome3 PPA, these are commands to restore old Nautilus:

$ sudo apt-get install ppa-purge
$ sudo ppa-purge ppa:gnome3-team/gnome3


The problem was related to the USB 3.0 ports. The log files had thousands of errors in them after boot, so they weren't much help troubleshooting.

Moving the Live USB to a non-USB 3.0 port fixed all of the problems, albeit with slower load times.

HP z240 uses intel USB 3.0 controller, C230 chipset, PNP id: PCI\VEN_8086&DEV_A12F&SUBSYS_802F103C


I recommend that you don't install the snap version of Spotify due to some bugs like here or here that might cause it not to launch, other than the performance issues associated with Snap but rather do this:

curl -sS https://download.spotify.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

This is the same client as the snap and you can update it with your usual system update/upgrade.


LibreOffice will not save or create office files on my NAS drive

Open Ubuntu Software Centre.
Find Libre Office.
Click on 'Permissions'
Set 'Read/Write files on removable storage devices' to ON.


SOLUTION:

edit /etc/grub.d/00_header to resemble:

if [ "${recordfail}" = 1 ]; then
  set timeout=0     # <----edit this integer so that it is 0 [zero]
else
  set timeout=3
fi

the default for set timeout is -1 which of course is "wait forever".


Has anyone compiled eSpeak Text-to-Speech?

Ubuntu should already have Orca installed. Press ALT+F2 to access to the Launcher and type 'Orca', it should be there.


My version of resolving this issue:

Remove/comment all unnessesary trusty sources from your
/etc/apt/sources.list.
Run sudo apt-get update and verify
that apt-cache policy snapd is now have the Candidate: 2.32.9
that you need. try to sudo apt install --reinstall snapd.
Optional. If you still have Sub-process /usr/bin/dpkg returned an
error code (1) error, clean the cd var/lib/dpkg/info with sudo
rm ./snapd* and reinstall the snapd sudo apt install --reinstall
snapd.
Verify that the Installed version is 2.32.9 snap
--version.


Launchpad: Missing build dependencies even though dependency should be contained in uploaded package

I'd advise you against trying to backport gcc-4.7 from raring to precise. It is introducing x32 architecture and expects intrusive changes to glibc which are not safe to run on precise.

Instead if you want to use the raring compiler on the precise box, you can do that trivially with a chroot:

$ apt-get install ubuntu-dev-tools
$ mk-sbuild raring
$ schroot -u root raring-amd64
$ gcc-4.7 -v

Which will get you a raring environment with raring's complier et. al.

ps. if you are really interested in how bootstrapping was done: well one needs to upload staged (incomplete builds) of binutils, glibc, gcc in the correct order a few times until all intermediate packages are available to start doing full builds.


What does the libkwinnvidiahack4 package do?

After a serious bit of Googling I came across this post:

  The only purpose of this file is to be later in the link order than
  (nvidia's) libGL, thus being initialized by the dynamic linker before
  it, allowing it to set __GL_YIELD=NOTHING soon enough for libGL to
  notice it.

Given that the quote is from a certain M-Graesslin, Martin is the chief maintainer in this area, so is a sure-fire source.

Indeed, looking at the source-code

apt-get source libkwinnvidiahack4

This is actually the kde workspace module.

kwin/nvidiahack.cpp is the source module in question - its a small module in itself

Since this hack is still in 13.04 - and is part of the core build, yes its still needed and its purpose is to ensure library linking for the OpenGL component of KDE is done in the correct functional order.

In terms of what the module does - it looks like it defines a runtime environment variable __GL_YIELD

From the freedesktop spec

  OpenGL yield behavior

  There are several cases where the NVIDIA OpenGL driver needs to wait
  for external state to change before continuing. To avoid consuming too
  much CPU time in these cases, the driver will sometimes yield so the
  kernel can schedule other processes to run while the driver waits. For
  example, when waiting for free space in a command buffer, if the free
  space has not become available after a certain number of iterations,
  the driver will yield before it continues to loop.

  By default, the driver calls sched_yield() to do this. However, this
  can cause the calling process to be scheduled out for a relatively
  long period of time if there are other, same-priority processes
  competing for time on the CPU. One example of this is when an
  OpenGL-based composite manager is moving and repainting a window and
  the X server is trying to update the window as it moves, which are
  both CPU-intensive operations.

  You can use the __GL_YIELD environment variable to work around these
  scheduling problems. This variable allows the user to specify what the
  driver should do when it wants to yield.

Thus the hack is to never wait and always paint on the OpenGL composite surface - most probably to stop graphical artifacts from appearing.


Automation of installing programs from source

Linuxbrew

  Linuxbrew is a fork of Homebrew, the macOS package manager, for
  Linux.

It is exactly what you are looking for.

You may check Homebrew page to understand What Does Homebrew/Linuxbrew Do?


Gnome-classic language turned into Chinese, how do I change it back to English?

Solution:

Edit /etc/default/locale:

LANG="en_US"
LANGUAGE="en_US:en"

Edit ~/.pam_environment:

LANG=en_US
Language=en_US

Logout and Login or Reboot.


Setting IP to static results in some unreachable ports

I've tested this every which way for the last month. Solution:

Virtualmin will only work if networking is setup in webmin on 18.04.

Meaning setup netplan only from Webmin-Networking-Network Configuration. Then the proper readable netplan .yaml file will be created.


Wireless and Ethernet, both are not working in Ubuntu 12.04 & 12.10

This answer worked for me, when I had wifi problems on a dell recently:

Please get a temporary wired ethernet connection and do:

  sudo apt-get remove --purge bcmwl-kernel-source

  sudo apt-get install linux-firmware-nonfree

Here is my question
 How do I get WiFi working on my Dell Inspiron 1501?


No, the program cannot detect the size of an image with no header.

You have just the pixel data; the information as to whether 200 pixels are a 10x20 image or a 20x10 image is just not in the file.

What you can do is find out how many pixels the image has, and try formats that make sense, trying the ones first that are common or are expected with your use case.

What you know about the size is
pixelcount = width x height

You could also just try a series of formats that are possible in terms of pixels = width x height, and look at them whether they make sense as an image of the kind you expect. That does not work in the general case, but should work in practice.


windows accidently deleted, ubuntu installation help

In the menu that you have mentioned, choose the item(partition) on which you wish to install Ubuntu and proceed.


Resolution Changed -> Unity Launcher now in wrong location

This sounds like a hardware issue - but some preliminary checks should be made:

Double check the maximum resolution of the monitor via the box it came in/manual
Check if using Nvidia graphics that both nvidia-settings and /etc/xorg.conf resolutions agree with the resolution you were expecting.
Any other graphics cards, have a look at the "Monitor" window - both the monitor should be recognised and the correct resolution displayed.
Double check cabling from the PC to the monitor - could be loose/faulty

Once you are satisfied with these checks - have a look at the Monitor itself.

Most monitors have a button(s) that you can change the position of the screen vertically and horizontally as well as the width and height.

For sharpness issues - look for a setting that says "Auto" or "Fine".


This is your wireless card:

03:00.0 Network controller [0280]: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter [168c:0036] (rev 01)
    Subsystem: AzureWave Device [1a3b:2130]
    Kernel driver in use: ath9k

That card is NOT a Dual Band*  card.  It only works on the 2.4GHz spectrum.  It will not work with 5GHz wireless networks.

* (dual band means the card works with both 2.4GHz and 5GHz networks)

  So I'll never reach the maximum internet speed on my laptop? –  Lurrdock (comments)

Speed isn't necessarily determined by which band your wireless card is on.  True, 5GHz band will be less cluttered, but you have to be closer to the access point because 5GHz doesn't travel as far, and doesn't penetrate walls and structural obstacles as well.

So, we go back to the speed of the wireless standards.

The current "standard" of wireless is N.  It's not new, but it's still the standard.  (AC is the latest standard, but N is still the most prevalent standard in use).

The maximum speed of a Wireless N(+) network theoretically is 150Mbps down/up over a single wireless channel.  (Wireless N, with the correct wireless card and router pairing, can support triple-channel bonding, which can get you a theoretical 450Mbps speed by connecting with three channels to the router/accesspoint).  However, this only refers to the data rate between a computer and the wireless access point/router and the rest of the internal network (such as computer-to-computer on your home network only) - it does not actually mean you'll get those speeds when surfing the internet or using it for things outside your internal network.

Here's where that bottle neck comes into play.  The maximum speed of the average residential connection to the Internet (in the USA region I'm in) appears to be between 25 and 54Mbps download speed.

Even with the Wireless N standard, most networks are never going to see the full potential speed a wireless standard would give them.  This is partly due to ideal conditions not existing - radio frequency collission because of radio waves, structural obstacles between a given computer and the wireless access point, etc. are all factors in why wireless networks don't actually give you their maximum rated theoretical speed.

An example of this is my network.  My network is a 150Mbps download, 25Mbps upload, from Comcast, and I never see those speeds over wireless, even with my computer right next to the Wireless Access Point, due to signal interference, and many other radio-related issues.  The only way to really achieve those speeds is through Ethernet connections to my switches and my network, which can reach up to 1000 Mbps up/down (Gigabit!).  However, speed is also impacted by number of devices on the network, so I have several devices that share the network.


You need to install Nvidia drivers. Run

sudo apt-get install nvidia-352 nvidia-prime

and reboot.


Figured it out right after posting this. I had to change a "UEFI priority list" in my BIOS.


The 4G/LTE Huawei E3276 modem does not work on Ubuntu 12.10

Bad news my friend. This device does not run on Linux. It is not compatible. I knnow this because I had a client with the same one.

These USB modems are hit & miss. Some work with Linux, some do not. It is always best to research such things before you buy.

If it is possible, I would reccomend going instead with a portable hotspot because they simply create a wifi network for your devices to connect to Thus, your OS doesnt matter as much. or if you have an Android phone, check to see if it has hotspot or tethering capabilities, many do. But as a rider to this, check with your carrier to make sure tethering is allowed on your plan.

I have the Mifi 2000 from virgin, & it works great & right now is on sale for $20 on the virgin mobile website. (I paid $80 for mine, so get it while its cheap).


How do I create a swap partition for hibernation?

Make a backup of all your important data before attempting this.

You need to boot from your installation media and use the Gparted application to shrink the filesystem, it is generally recommended to have a swap partition double the size of your RAM. Once you have shrunk the filesystem you should right-click on the now "unallocated space" and format it as swap. Once done, hit the "Apply all operations" button and reboot.

Now you should be back in your main Ubuntu system.

You need to run the gksudo gedit /etc/fstab command and add a line like this:

/dev/sdXY swap swap defaults 0 0

Of course, change the XY to the correct settings for the system.

Finally, reboot or run sudo swapon /dev/sdXY to use the swap without rebooting.


This issue was due to low configuration of VM.
I updated machine's config to  12GB RAM and 4 VCPUs and MAAS is able to detect subnets.


What is the least insecure way to store a password that is used by a script?

Instead of hardcoding the password in the file, store the password in a separate file and protect the file (chmod 700 or chmod 500) so that only the authorised users can access it.

Retrieve the password with cat /dir/to/file/with/.password instead of reading the file and storing the content of it into a variable.


I can't play facebook videos on firefox in Ubuntu 16.04

I've had this problem in the past with videos on all versions of Ubuntu & Firefox, YouTube seems to work fine but nothing else like nfl.com, facebook and news websites videos.

I’ve recently installed Ubuntu 18.04 and it seems to have cured this problem by going to the Ubuntu software icon, and going to the add-ons category, then select the codec tab and found 12 gstream selections with 6 already installed. I installed 2 of the first ones, and my problem was solved: I can now play any video from any website.


How to re-read pulseaudio client configuration without rebooting?

In the case Pulseaudio is in system mode, you need to be root to restart it, so use "sudo" before your commands or run them in a root terminal:   sudo su -
You can try  additionally to your commands:

  sudo alsa force-reload

as Pulseaudio  is based on the underlaying Alsa .


Copy files and directories without files content

From man cp

  --attributes-only
                don't copy the file data, just the attributes

So , if you want to copy all folders and files that are in somedirectory

do  cp -R --attributes-only somedirectory  destinationdirectory


How Can I Set the Unhide Speed of the Gnome-Classic Panel?

You need to use dconf-editor from the package dconf-tools and set the properties manually. When the package is installed, press alt+f2 and run dconf-editor. Find Org > Gnome > gnome-panel > layout > toplevels. That will contain "bottom-panel" and "top-panel", each with its own settings, like animation-speed, auto-hide, auto-hide-size, hide-delay, etc.

Play with those settings and restart gnome-panel by pressing alt+f2 and running killall gnome-panel.


You can create a shortcut to your matlab installation by doing :

sudo ln -s /<path-to-your-matlab>/matlab /usr/local/bin/matlab

For example if your matlab folder is in your Download folder, run :

sudo ln -s /home/Arturo/Download/matlab /usr/local/bin/matlab

Once you have created this shortcut, you will only need to type matlab in a terminal to open Matlab.


Why does the script for installing nodejs 6_x installs 8_10?

I found out that Ubuntu 18.04 already has nodejs 8_10 in its apt repository.

root@ip-172-31-18-129:/home/ubuntu# apt-cache policy nodejs
nodejs:
  Installed: 6.14.1-1nodesource1
  Candidate: 8.10.0~dfsg-2ubuntu0.3
  Version table:
     8.10.0~dfsg-2ubuntu0.3 500
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
     8.10.0~dfsg-2ubuntu0.2 500
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
     8.10.0~dfsg-2 500
        500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
 *** 6.14.1-1nodesource1 500
        500 https://deb.nodesource.com/node_6.x bionic/main amd64 Packages
        100 /var/lib/dpkg/status

I installed the specific version I wanted by:

apt-get install nodejs=6.14.1-1nodesource1


The hint came when @Coolguy3289 mentioned VNC..
I had shied away from VNC after reading that it isn't secure - but, given I am connecting via an ssh tunnel, it is safe.
So, having vino installed all I had to do was disable xrdp then change the type of connection within Remmina from rdp to 'Remmina VNC Plugin'.
I am now happily taking control of the active desktop session on the server.


How to use root permission while copying, moving and extracting files

When I want to run nautilus as root I use sudo -H nautilus and I get the file browser with root privileges.

Don't use sudo without the -H in this case though.


How to install boot repair tool in ubuntu 14.04 live?

This is all covered in the boot-repair documentation.

The first step is getting an internet connection. An ethernet connection will probably be automatic but you'll probably need to toy around with network manager to get a WiFi connection up.

Then just open a terminal and run:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo sed 's/trusty/saucy/g' -i /etc/apt/sources.list.d/yannubuntu-boot-repair-trusty.list
sudo apt-get update
sudo apt-get install -y boot-repair
sudo boot-repair &

If add-apt-repository isn't working, there's almost certainly something wrong with your network connection. Stop there and either fix it or just download an ISO that has boot-repair on the image.

The repository mentioned above currently only contains versions for 12.04, 12.10, 13.04 and 13.10. The second command should make it available for 14.04. If you're using an older version than these (or you've download a 14.10+ pre-release ISO), you can:

Alter the sed command depending on your release,

. /etc/lsb-release
sed "s/$DISTRIB_CODENAME/saucy/ -i /etc/apt/sources.list.d/yannubuntu-boot-repair-$DISTRIB_CODENAME.list

Download an ISO that is supported,
Just download an ISO that includes it (as above), or
Manually download the deb from the package list and install that.


How to access multiple online cloud storage accounts from a single program?

Look at InSync it's not open source, but it's free (for now, at least), and has linux support, obviously.


sudo dpkg  --remove-architecture arm64

If you have crosscompile tools on your System you will get an error similiar like

Architektur »arm64«, is in use, can not be removed

an overview gives

dpkg -l | awk '/:arm64/{ print $2 }'

If so you can remove them with sudo apt-get purge $(dpkg -l | awk '/:arm64/{ print $2 }') and remove the architecture sudo dpkg  --remove-architecture arm64


Chrome menu > Settings > Advanced > Web Content, and you can change the font size.

You can also use the zoom feature, though this will change the size of everything, text and images.  Either hold control and use the scroll wheel to change the zoom, or you can change it from the Chrome menu's top directory.


Most probably the problem is of broken packages
Try fixing it using

apt-get apt-get -f install

or apt-get autoclean

apt-get clean

this function removes all the packages from cache
or try recovering it

dpkg-reconfigure <package_name>

i hope this should help and if does not try purging virtual box

apt-get purge

i hope these all codes should help if not then post some out put of function apt-get -f install


I have used ISObuster in my windows days to accomplish that.  It will allow you to do data recovery of your video files that are on your DVD's.  You can try that under Wine, or look at AcetoneISO.


The second or third options. fglrx driver is the stable version of AMD's proprietary driver. fglrx-updates driver will be possibly less stable, but will get you driver updates sooner. Either is better than the open source Xorg driver.


What does this mean in gnome-shell.css ? And also specifically what is "ems"

An em is the width of the character M. Well, that's the etymological reason, anyway. It is a measurement of size in relation to your font size. Gnome Shell uses CSS, which is the same language that most all webpages use. This means there are buckets of places to find information about how it's used. This link has examples, for example (: http://www.guistuff.com/css/css_units.html


How long will Ubuntu Classic be supported by Ubuntu? I.e. is it deprecated?

GNOME 2.32 has been replaced by GNOME 3.2 in 11.10.

GNOME 2.x is where the classic desktop session came from, and is no longer maintained by the GNOME Foundation. They do however maintain a "fallback" mode that is similar to the old "classic" desktop:

How to revert to GNOME Classic Desktop?

As long as the fallback mode exists you'll probably be able to install it in Ubuntu via a method like this. "Deprecated" is probably too strong a word since it'll be available in the repositories, but by default the fallback mode for the Ubuntu desktop is now Unity 2D.


AppArmor blocks logging set up through iptables for guest account - How to enable?

I think your intention is clear here and in the other question you linked to: log URLs of websites visited by anyone using any application as the guest user.

Suggesting iptables logging to achieve this task isn't correct. iptables (without some obscure, performance-limiting extensions) works on the IP protocol, not on the application level.

I've also seen suggestions in the URLs suggested as comments - responders suggested only capturing packets with SYN flags (new connections). That too, results from a misunderstanding described above.

The way to achieve what you want is:

Install a web proxy (preferably lightweight, such as tinyproxy).
Add iptables rules that redirect outgoing connections made by only a specific user to ports 80,443/tcp to the local proxy.

What I had in mind is described here (not my post). This way you get a web proxy log which has all the HTTP requests logged. You won't get logs related to SSL protected traffic though, which is a good thing.

To reiterate: URLs are not part of the IP or TCP header structure, thus something working on the IP/TCP level isn't going to be able to show you this data, unless it has some TCP dissector (tcpdump/wireshark are able to do this but not iptables alone).


What is the procedure for installing a print driver for an Epson ET-16500 printer?

Download deb files from http://download.ebz.epson.net/dsc/search/01/search/searchModule

according to your arch (i386 or amd64), copy them to your Home directory and install them using

sudo dpkg -i *.deb

If you get error messages regarding unmet dependencies, run

sudo apt install -f

There are both printer and scanner drivers for your printer.

The scanner driver is now provided as a directory with some deb files and an install script. You can either copy the deb files from there as I mentioned before, or use the install script with sudo.


Large delay between release of package update and availability in update manager

The date in the changelog is not the date on which the updated package was released. That's merely the date on which whoever made the change modified the changelog for their commit. By the time that commit gets merged into Ubuntu's repos, it might have spent quite a bit of time in testing (for example, in a PPA somewhere, or in Debian sid/testing). Then it spends time in -proposed, making sure it broke nothing when in Ubuntu's repos. Then it finally moves on to -updates (or -security, as the case may be).

You can check the Ubuntu packaging code and publishing history for details.

In this specific case:

The commit in question (same as the top changelog entry):

author      Mauricio Faria de Oliveira <mfo@canonical.com>  2018-09-18 15:21:44 (GMT)
committer   usd-importer <ubuntu-server@lists.ubuntu.com>   2018-11-06 18:43:17 (GMT)

From the publishing history:

2018-11-19 19:48:20 IST Published   Xenial  updates     main    misc    4.3.0-1ubuntu3.16.04.4
2018-11-07 00:13:17 IST Published   Xenial  proposed    main    misc    4.3.0-1ubuntu3.16.04.4

So the changes only made it into Ubuntu's repos on November 6. The day after, it was uploaded to -proposed, and 12 days later, to -updates. Between timezones and mirror updation frequencies, it took a couple of days more to reach you. Not that long.


How can I bring all windows of an application to the front?

You can use wmctrl for this:

There is a shortcut for all windows, e.g. if you just want to undo going to the desktop:

wmctrl -k off

If you really need to bring up just a specific app, you can use a script, as follows, but
it will bring up all windows on all workspaces.  E.g. to bring up all gnome-terminals, you could do

pids=" $(pidof gnome-terminal) "
wmctrl -lp | while read id a pid b; do
  test "${pids/ $pid }" != "$pids" && wmctrl -i -a $id
done


Yup, I've had this before as well and it sometimes happens on cheap low-end laptops with cheap non-powered adapters.

I've never had this happen with externally powered ones so it's a hardware problem on the Acer that was probably solved in the Windows driver (more power output to the port) that hasn't found its way into the Linux driver yet.

Your solutions are:

file a bug with both Intel and nVidia
buy an externally powered HDMI to VGA adapter for the Acer.


After starting a particular LXC container with a static IP, no default gateway route is configured

I've been working on this issue for a while now.
I am running 12.04 LXC 0.7.5 on the host and a mixture of 12.04 and 11.04 in the containers.

I had zero success with editing: /run/networking/ifstate as it seems to not persist after a container is restarted.

I solved the problem by commenting out the following line of the containers config file:

lxc.network.ipv4 = 10.1.3.10/16

Another solution that worked for me was to install LXC 8.0 via backports. You'll first need to enable backports in /etc/apt/sources.list.

sudo apt-get install -t precise-backports lxc

LXC 8.0 allows for the containers config file to configure the default gateway.

lxc.network.ipv4.gateway = 10.1.0.1


Is it possible to get tab completion with sftp?

Thanks to shellholic's answer, I was able to make it (somewhat) work for sftp. First, create the file /etc/bash_completion.d/sftp with the following content:

# custom sftp(1) based on scp
# see http://askubuntu.com/questions/14645/is-it-possible-to-get-tab-completion-with-sftp
#
_sftp()
{
    local configfile cur userhost path prefix

    COMPREPLY=()
    cur=`_get_cword ":"`

    _expand || return 0

    if [[ "$cur" == *:* ]]; then
        local IFS=$'\t\n'
        # remove backslash escape from :
        cur=${cur/\\:/:}
        userhost=${cur%%?(\\):*}
        path=${cur#*:}
        # unescape spaces
        path=${path//\\\\\\\\ / }
        if [ -z "$path" ]; then
            # default to home dir of specified user on remote host
            path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null)
        fi
        # escape spaces; remove executables, aliases, pipes and sockets;
        # add space at end of file names
        COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
            command ls -aF1d "$path*" 2>/dev/null | \
            sed -e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\\\\\\\\\&/g" \
            -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
        return 0
    fi

    if [[ "$cur" = -F* ]]; then
        cur=${cur#-F}
        prefix=-F
    else
        # Search COMP_WORDS for '-F configfile' or '-Fconfigfile' argument
        set -- "${COMP_WORDS[@]}"
        while [ $# -gt 0 ]; do
            if [ "${1:0:2}" = -F ]; then
                if [ ${#1} -gt 2 ]; then
                    configfile="$(dequote "${1:2}")"
                else
                    shift
                    [ "$1" ] && configfile="$(dequote "$1")"
                fi
                break
            fi
            shift
        done

        [[ "$cur" == */* ]] || _known_hosts_real -c -a -F "$configfile" "$cur"
    fi
    # This approach is used instead of _filedir to get a space appended
    # after local file/dir completions, and $nospace retained for others.
    local IFS=$'\t\n'
    COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* 2>/dev/null | sed \
        -e "s/[][(){}<>\",:;^&\!$=?\`|\\ ']/\\\\&/g" \
        -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' -e "s/^/$prefix/") )

    return 0
}
complete -o nospace -F _sftp sftp

Then in bash you need to execute . /etc/bash_completion.d/sftp in order to load the script.

All I really did was copy/paste the scp completion script from /etc/bash_completion.d/ssh and replace scp occurences with sftp.


How to add the logs to a crontab with time stamp

why not just

0 * * * * (/bin/date && /home/backup.sh) >> /var/log/backup.log 2>&1


If possible you would use the drivers in the standard ubuntu repositories as they are considered more stable and tested and better supported.

Use the highest version of the nvidia driver available unless you have a specific reason not to do so.

See https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia

Install them with additional drivers.

Support is available, but somewhat limited as the nvidia driver is a propriety closed source driver, see https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia#Filing_bug_reports

If for some very good reason you need a beta driver or are testing the beta driver , use a ppa. This would be less stable and unsupported if you have a problem and, depending on the ppa, may include other experimental graphical drivers.

As advertised in the ppa - https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

The driver from the ppa is intended for testing by experienced users and is unsupported.

  WARNINGS:

  This PPA is currently in testing, you should be experienced with
  packaging before you dive in here:

and

  You can update your system with unsupported packages from this
  untrusted PPA

untrusted means might break ubuntu and unsupported means you are on your own if you have problems.

The advantage of using the ubuntu repositories and ppa are ease of installation and removal.

If for some reason the ppa does not work or if you so desire to install the driver manually download and install the driver from nvidia. You will have to maintain the driver with each kernel update and there will be no support. Doing this can break ubuntu and you are on your own.

You are confused in part as you are looking to multiple sources of information. Always start with the official documentation first https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia#Filing_bug_reports and use 3rd party sources if and only if you have a problem with the official methods.


Ubuntu 12.04.3 installer UEFI not recognizing Windows 8

This is a common issue. Use the "Something Else" option. Although it references Windows 7, this question and answer should help.


OK couple of points:

You don't need the /usr/bin added. Shell will find wmctrl by itself. That's for very specific cases that may involve portability.
Add ampersand at the end of firefox command. The script will proceed only if the previous command exits. Since firefox doesn't exit, the script waits for it.
As Oli pointed out, better way is to use class name. I've done multiple scripts with wmctrl where i find hex id of the window by referencing class name.

Personally I'd do it this way:

#!/bin/bash
firefox http://www.google.de &
sleep 3
WM_ID=$(wmctrl -lx | awk '$3~/Navigator.Firefox/ {print $1}')
wmctrl -i -r $WM_ID -e 0,0,0,500,800

Here we open firefox , let it run in background, then we extract hex id of the window that matches class Navigator.Firefox. In wmctrl -lx field 3 is wm_class, and field 1 is hex id. awk helps us to extract field 1 here. Finally we reference that numeric id, inside the final wmctrl statement


Open a file from the console with a windows program ubunto subsystem

You can launch windows programs from wsl, try

touch test.txt
notepad.exe test.txt


Unable to add firewall rule "Duplicate Profile"

There is a bug pertaining this message Bug Report!

Quote:

  You have 2 apaches profiles in your /etc/ufw/applications.d : apache2.2-common and apache2-utils.ufw.profile.
   Remove one of them

Try it and let me know.


Strange file ownership after rsync W7/U14.04

I'm not sure about the rsync options but you should be able to chown the entire partition recursively or you can just chown the directory recursively as you have described without issue because the permissions don't apply to Windows.

sudo chown -r zarkov:zarkov /media/storage/photos

Once you have used chown to correct permission they should stick so you shouldn't have to do this again (on that directory). As I said before, you can recursively chown the entire directory so that you shouldn't have permission issues with that directory anymore.


Epson supply the driver from here

if you click ACCEPT and then select the 64bit deb file (assuming you are using 64bit ubuntu) epson-inkjet-printer-escpr_1.6.20-1lsb3.2_amd64.deb

installing that should trigger the system to register the printer and allow you to print


Host completely freezes when I spawn a Vm on virtualbox

As stated on: VirtualBox 5.0.40 crashes the whole host since update to kernel 4.13.0-26-generic

Check the virtualbox version with the command:

apt-cache policy `dpkg -S VirtualBox | head -n1 | sed -e 's/://g' | awk '{print $1}'`

Ans the kernel version with the command:

 uname -r

There is a posibility an unsupported version of virtualbox form the kernel. I would suggest using virtualbox 5.2 version or later. Please follow the link above in order to look for instructions on how to install it.

In my case when that happened I had the 4.13.0-26-generic kernel and virtualbox version 5.0.40-dfsg-0ubuntu1.16.04.2.


Get past times new roman font installation

Press TAB to highlight the OK button. Now press Enter. You can't use your mouse cursor in the terminal, so it's handy to know the general keyboard operations.


What is the exact meaning of the following ifdown eth0 and ifup eth0 output?

This looks like a typical set of DHCP client operations when a DHCP address is released (on ifdown) and then acquired (on ifup).

The listening and sending parts are related to which interfaces is the DHCP client going to operate on (send requests and listen for responses).

xid is defined in RFC2131 - it is a transaction number that allows the DHCP client and server to be  on the same page during the message exchange.

Your client is broadcasting DHCPDISCOVER where 255.255.255.255 is the broadcast IP address of the local network. This allows it to find the DHCP server (if such exists on the local network).

Port 67 UDP is a standard DHCP port.

The DHCPREQUEST is sent by your client to the server in an attempt to renew its last known IP address. DHCPOFFER is sent back by the server with the requested IP address by your client. The client acknowledges it back to the server with DHCPACK and finally assigns the UP address to eth0.


Shell script password with special chars

Your password needs to have the special characters escaped. So if your original password is xgT{uic[Is?uJ+it will have to become xgT\{uic\[Is\?uJ\+ (A slash before the special characters).

You might also want to look at something already written to do this such as AutoMySQLBackup, but I'm not sure if you need daily, weekly or monthly backup rotations. However the same rule applies, if the password has special characters those special characters need to be escaped.

Hope that helps!


As you've confirmed that you have Git Bash installed, we can confidently identify the problem.  Edit:  I see in the comments that you figured out how to fix it, but I was almost done writing up the answer, so I'll leave it in place.
Short answer:  Start WSL using the wsl command, not bash.  That will avoid any confusion between WSL and Git Bash.
Longer answer:
When you type "bash" at the Start menu, it finds the Windows Application with "bash" in its name, which is "Git Bash".  When Git for Windows is installed, it adds several programs to the Start Menu (unless, of course, you select "Don't create a Start Menu folder"), including, of course Git Bash.  Perhaps older versions of Git for Windows just called it "Bash", but the latest version uses "Git Bash", to avoid confusion.
On the other hand, when you run bash at the command-line, it is not looking for Start Menu entries; it's looking for executables in your PATH.  bash.exe is an older, no longer recommended way of starting WSL, of course.  While you can still use it, the better option is to switch to the newer wsl.exe (or just wsl) command.  This will avoid any confusion, plus give you a large number of additional options (see wsl --help), such as:

Backing up your WSL instances
Starting with another user using wsl -u root without needing to sudo
Run a command without starting a shell at all (really by making the command run as the shell) with wsl --exec (e.g. wsl --exec chsh, wsl --exec tmux, etc.)
Change the WSL version being used
(Soon, in preview) Mount additional drives, either Windows or virtual
And much more


TouchPad Multitouch is not working on 14.04

I did this via command line and it fixed my touchpad in 14.04 for horizontal scrolling with multitouch, after reboot:

gsettings set org.gnome.settings-daemon.peripherals.touchpad horiz-scroll-enabled "true"


try to keep the two questions separate.

anyhow, for the last question, see my solution here for a similar scenario
19.04 gnome-session login after screen blank -- impossible without mouse

and if you dont have the showallwindows tweak, those coordinates should get you to the top right of the screen, and then do a mouseclick, using your designated keyboard shortcut. then it would be down arrows to your username, right arrow and enter logout

another one would a shortcut for

shutdown now

"shutdown may be used to halt, power-off or reboot the machine" That might require a sudo though.

or simply bring up the terminal with it's shortcut key and type it in.


dpkg: invoke-rc.d: initscript mysql, action "start" failed

Solution from Titanicx worked for me. Ran

dpkg -S etc/mysql

to see that mysql-common was the problem. Removed MySQL completely:

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean


There is a better solution: convert your latex document to rtf using pandoc.

A correct conversion is not sure, because it only understand a subset of latex.

It is available in the official Ubuntu repos.


"Error: initrd too big" no boot in Ubuntu

From the comments...

memtest ran clean on 64GB RAM.

Lets check your file system for errors.

To check the file system on your Ubuntu partition...

boot to the GRUB menu
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors
type reboot

If for some reason you can't do the above...

boot to a Ubuntu Live DVD/USB
start gparted and determine which /dev/sdaX is your Ubuntu EXT4 partition
quit gparted
open a terminal window
type sudo fsck -f /dev/sdaX # replacing X with the number you found earlier
repeat the fsck command if there were errors
type reboot


Shut Down:

sudo shutdown -h now

or

sudo halt

or

sudo halt -p

Restart:

sudo reboot


per display scaling (HiDPI) not working for some reason

It seems different scaling on different monitors only works on Wayland display server. But nvidia driver default settings prevents Wayland to run, so old Xorg display manager is used.

Solutions:

1) You can use opensource nouveau driver instead of nvidia driver. It works slower but scaling works fine.

2) You can change nvidia drivers setting: Add modeset=1 option to /etc/modprobe.d/nvidia-graphics-drivers.conf file
so last line should look like
options nvidia_384_drm modeset=1

Next run $ sudo update-initramfs -u and restart.

(source: No way to choose wayland in GDM using UbuntuGNOME 17.04)

Also you can enable fractional scaling (like 150%):
http://www.omgubuntu.co.uk/2017/09/enable-fractional-scaling-gnome-linux

Solutions 2 works for me on NVidia 960. my 4k monitor scaling=150% while 1080p monitor scaling=100%.


Unable to install proprietary nvidia drivers on Xubuntu 20.04

You need to black list your nouveau driver when your linux boots up cause of some dependency problems nouveau drivers are not best suited for some graphics card.
After successfully booting up you had to switch from opensource driver that was that nouveau driver to proprietary driver by nvidia .
Please follow this link for how to blacklist that driver
What does modprobe.blacklist=nouveau do?


No, the packages you need are not installed by default but are available in the normal Ubuntu repositories. You can use sudo apt install.

Be sure to have the C++-Compiler installed:

g++

For C++ programming you need to install the development version of the important GNOME libraries. Those contain the header files and additional linker information:

libgtkmm-3.0-dev
libgstreamermm-1.0-dev

In addition, you will want to install the documentation packages of this libraries so you can view them in the API browser (devhelp):

libgtkmm-3.0-doc
libgstreamermm-1.0-doc
devhelp

-- Source

I recommend you also install gnome-devel-docs to look at some demos. After installing, run

yelp help:gnome-devel-demos


It has happened to me a few times that game CD/DVD's do not read properly with wine.
And it happened with RA3 too. I think it is a wine problem because Linux reads the CD/DVD ok? But the game does not?

A CD/DVD reading error in either wine or Linux can stop this game from
installing, with errors about missing files etc.?

Use a DVD copy if you have one, or copy the whole DVD to a temp folder.
Pull up a terminal, and it goes something like this:

mkdir ~/Temp/RA3

cd /media/$USER/RA3    (or wherever your DVD is mounted)

cp -r * ~/Temp/RA3

And it may take a while so have a cuppa or something. Just make sure that all files have been copied by comparing the size/s.
And then run AutoRun.exe from there.
Worked for me in wine v3.0.2.


Follow the directions here

You're basically re-installing grub on the boot drive.


If you are just install a fresh installation on the SSD there isn't anything critical for a beginner user. There is some optimisation you can perorm if you are a serious user (I haven't bothered), and instructions can be found on easy linux tips.

If you are planning on using both the SSD and the HDD then you may want to set the home directory to the HDD. Plenty of examples of how to do this, here is one AskUbutu post Dual Boot with SSD and HDD Storage


Why does my Acer 4310 run so slowly with Ubuntu 12.04 when it was lightening fast with Ubuntu 10.?

The bare minimum of system requirements rarely leads to a acceptable level of performance.

Things you can easily do to increase performance include:

A) Adding more RAM

B) Replacing the hard drive with one that packs more data onto a single track (higher capacity) or one with a faster rotational speed (a 7200 RPM drive will typically outperform a 5400 or 4200 RPM drive for obvious reasons).

C) Replacing the hard drive with a SSD (this approach will not only increase performance by being limited only by the speed of your interface (SATA-150) but also by drastically reducing seek time from 10's of ms to a fraction of a ms as there are no moving parts (heads to reposition to the appropriate track)


You can't write to your Documents folder because you have the w bit turned off, and the t (sticky bit) turned on.  You can fix your Documents directory back to the default with:

$ chmod 0755 ~/Documents

As far as your previous files you'll have to try to recall the names of some of the files that you are sure were previously in your Documents folder and locate one.  When you find the one, the others should be in the same folder.

You can do this with:

$ locate -ir "locate -ir "Intel.*pdf"
/home/users/l/j/ljames/Documents/IntelliApp Releases.pdf
/home/users/l/j/ljames/Documents/IntelliApp Releases2.pdf
/home/users/l/j/ljames/Documents/IntelliApp Releases3.pdf
/home/users/l/j/ljames/Documents/IntelliApp Releases4.pdf
/home/users/l/j/ljames/Documents/IntelliApp Releases5.pdf
/mnt2/datadrive/extroot/home/users/l/j/ljames/Documents/IntelliApp Releases.pdf
/mnt2/datadrive/extroot/home/users/l/j/ljames/Documents/IntelliApp Releases2.pdf
/mnt2/datadrive/extroot/home/users/l/j/ljames/Documents/IntelliApp Releases3.pdf
/mnt2/datadrive/extroot/home/users/l/j/ljames/Documents/IntelliApp Releases4.pdf
/mnt2/datadrive/extroot/home/users/l/j/ljames/Documents/IntelliApp Releases5.pdf
/opt/Adobe/Reader9/Browser/intellinux/nppdf.so
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/AcroForm/adobepdf.xdc
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/AcroForm/PMP/libpdf417pmp.pmp
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/Annotations/Stamps/Words.pdf
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/Annotations/Stamps/ENU/Dynamic.pdf
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/Annotations/Stamps/ENU/SignHere.pdf
/opt/Adobe/Reader9/Reader/intellinux/plug_ins/Annotations/Stamps/ENU/StandardBusiness.pdf

The above example is a regex search using locate.  In the above example I know I saved an "Intelli" document as a .pdf file.  So locating that document will show the directory where I could look for other documents in the same area.

The $ is the command prompt, with the command following the prompt.  The text after the commandline is the output of the command.


Format USB external disk for Ubuntu using OSX diskutil

Through the Disk Utility UI (OS X 10) I just formatted a 32gb USB to Mac OS Extended (Journaled, Case sensitive) and my Ubuntu 14.04 LTS can read the files on it.


How can I add a new screen resolution to an old laptop?

Please note the following approach shall work within Ubuntu on Xorg. For Ubuntu on Wayland you could try this approach: Wayland how to set a custom resolution.

I did a little research and I think the native resolution of Esprimo Mobile V5335 is 1280x800. I think the refresh rate should be 59 or 60 Hz, but maybe I'm wrong.

About the refresh rate in man cvt is written:

refresh - Provide a vertical refresh rate in Hz.
          The CVT standard prefers either 50.0, 60.0, 75.0 or 85.0Hz.
          The default is 60.0Hz.

How to calculate, generate and set new mode using cvt and xrandr

In the examples below I use resolution 1280x800@60Hz.

1. Use the command cvt to calculate the new modeline:

$ cvt 1280 800 60

# 1280x800 59.81 Hz (CVT 1.02MA) hsync: 49.70 kHz; pclk: 83.50 MHz
Modeline "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

2. Use xrandr to create the new mode:

xrandr --newmode "1280x800_60.00"   83.50  1280 1352 1480 1680  800 803 809 831 -hsync +vsync

Please note "1280x800_60.00" is the name of the mode. If you wish you could change it as desired, for example "1280x800_custom_1".

3. Use xrandr to find your output name. Just execute xrandr without any arguments. The output name should be VGA1, DP1, HDMI1, HDMI-1, LVDS1, LVDS-1, etc. For our example, let's assume the output name is LVDS-1.

4. Use xrandr to add the new mode to the list of modes of your output:

xrandr --addmode LVDS-1 1280x800_60.00

5. Activate the new mode:

xrandr --output LVDS-1 --mode 1280x800_60.00

In the worst case, if the screen image disappears, just power off and power on the computer.

6. When you find the right mode, you can make the changes permanent with one of the methods described here: Adding newmode with Xrandr - "800x480_60.00".


How can I access docker daemon from within a docker container?

Found several way to do it. You can mount your docker daemon socket in container, as below.

docker run -it -v /var/run/docker.sock:/var/run/docker.sock ubuntu:latest sh -c "apt-get update ; apt-get install docker.io -y ; bash"

if you are using docker-compose then you can mount using Volumes.

/var/run/docker.sock:/var/run/docker.sock


How to remove that wierd line on the side?

This problem can be solved via following theese steps:

Press Ctrl+Alt+F1
Login with your user credentials
Type DISPLAY=:0 unity --replace

And you are good to go!


How can I make sure one Upstart job stops before another Upstart job stops?

You can use these options within job A:

Stop before depended-upon service

stop on stopping B

Start after depended-upon service

start on started B

Reference: http://upstart.ubuntu.com/cookbook/#stop-on


Cannot see any applications except the menu bar

Shut down VM (13.10), then in Parallels 9 config for the VM, go to >Hardware>Video, and "Un-check" 3D acceleration.

Restart Ubuntu 13.10. You will now get a Completely Black screen. Shut down Ubuntu once more.

Again, in Parallels config for the VM, go to Hardware>Video and "Re-Check" 3D acceleration. Restart, and, Viola, back in business (No black screen and everything properly updated).


How do I fix a stalled installation of Adobe Reader DC using PlayonLinux in Xubuntu 17.10?

I installed Adobe Reader DC on Ubuntu 18.04 twice: once with wine and again with PlayOnLinux. Both times Reader installed properly except for an error alert just at the end, which I dismissed. It did everything i tried except -- critically -- print, when it would freeze, and could only be stopped by killing it.


Installing Chrome OS Desktop Environment on my 32bit computer

first install 64-bit ubuntu, 32-bit or not

then

http://www.omgubuntu.co.uk/2012/11/how-to-run-chromeos-in-ubuntu

fix issues by

Google-chrome which is needed to run this build of chromium os must share some features, including sandbox(a hunch). Open Nautilus using sudo power. Browse to filesystem to /opt , there are two folders of our concern chromeos and google. Open google in new tab copy all the contents of /opt/google/chrome folder and paste into /opt/chromeos. nautilus will give you the folder and file conflict notification. MERGE FOLDER BUT SKIP FILES.It will only copy missing files. Now you have chrome-sandbox in chromeos. Now exit and remove the line "--disable-setuid-sandbox /" in chromeos file located in usr/sbin/chromeos if you have edited before. Delete Chrome-os folder in home and start a fresh copy typing chromeos in terminal.

creds to paudelanup


In a nutshell , there exists part of memory responsible for containing current look of the screen or "frame", hence it's called framebuffer.

Under Linux ( if we remember that Unix philosophy of "everything is a file" ) actual framebuffer device to which you can  write (as root) is /dev/fb0.
The graphical X server and several other programs, such as fbi and fbterm are capable of writing to it. I've used here on this site to answer such question as:

How can I customize a full-screen console background (TTY)?

Frankly, I am not quite sure why the answer you linked enables it through the /etc/initramfs-tools/conf.d/splash. According to this, framebuffer support is something that will be enabled in the kernel modules. Here's my output of dmesg log for example: it shows that memory for framebuffer is allocated, despite the fact that i do not have /etc/initramfs-tools/conf.d/splash

$ grep -i 'frame.*buffer' /var/log/dmesg
[    0.847413] vesafb: framebuffer at 0xd0000000, mapped to 0xffffc90001000000, using 3072k, total 3072k
[    1.016865] Console: switching to colour frame buffer device 128x48
[    1.185527] fb0: VESA VGA frame buffer device
[    7.648201] Console: switching to colour frame buffer device 170x48
[    7.730459] radeon 0000:01:05.0: fb0: radeondrmfb frame buffer device

Perhaps the answer you linked works on the cited solutions from previous years, but it's not guaranteed that the information is still relevant - linux kernel has added support to a lot of modules and changed to support a lot of different hardware, so potentially solutions changed

Consider asking an actual question related to your Nvidia graphics. It will save you more time than figuring out all the small details


I have had this, but only in 16.04 (not 14.04). I fixed it by booting with systemd by going into Advanced Options for Ubuntu in the GRUB menu and selecting my-kernel-version (systemd). Then once I booted I made systemd the default boot:

sudo apt-get install systemd-sysv


Warning
You want to install an edge plug-in.  This answer is technically correct, but it will, in all probability, break packages that auto-install the pepper plug-in in chromium.  So, use at the cost of putting your system in an inconsistent state.

Of course I assume you installed chromuim from dev channel

to install libpepperflash on chromium, open your terminal and write the following:

chromium-browser --ppapi-flash-path=/opt/google/chrome*/PepperFlash/libpepflashplayer.so --ppapi-flash-version=11.3.31.323

To always have the correct Flash Player version in Chromium:

open your profile

vi  ~/.profile

add this to the end:

export PEPPER_FLASH_VERSION=$(grep '"version":' /opt/google/chrome*/PepperFlash/manifest.json| grep -Po '(?<=version": ")(?:\d|\.)*')

Now open chromium settings:

sudo vi /etc/chromium-browser/default

And replace CHROMIUM_FLAGS="" with the following:

CHROMIUM_FLAGS="--ppapi-flash-path=/opt/google/chrome*/PepperFlash/libpepflashplayer.so --ppapi-flash-version=$PEPPER_FLASH_VERSION"


Can't install primus:i386 package on Ubuntu 13.10 x86_64

On my 64-bit 13.10 laptop after installing nvidia-experimental-310 (which actually installs 319.60) bumblebee and primus were already there by default.

bumblebee and bumblebee-nvidia are 64-bit. primus and primuslibs:amd64 are 64-bit, but primuslibs:i386 and primuslibs-ia32 are both 32-bit.

In order to get steam to run (to find libGL.so.1) I had to create /etc/ld.so.conf.d/steam.conf containing:

/usr/lib32
/usr/lib/i386-linux-gnu/mesa

Note that after adding or modifying anything in /etc/ld.so.conf.d/ you have to: sudo ldconfig

In order to get glxspheres (which is 32-bit) and optirun glxspheres to work I had to cp steam.conf glxspheres.conf in /etc/ld.so.conf.d/ and install libglu1-mesa:i386 and libxv1:i386. Note that glxspheres64 or optirun glxspheres64 worked before or after doing this.

However, I am new at Optimus graphics, so I have yet to have primusrun work for 64 or 32-bit graphics (it works for primusrun glxinfo). The following all core dump with no error message about why:

primusrun glxgears
primusrun glxspheres
primusrun glxspheres64

Different steam games may need certain launch parameters to use the fast nvidia graphics instead of Intel graphics (which is very slow). To get to launch parameters go to Steam Library, right click on a game on left, and go to Properties. On General tab click "Set Launch Options" For Source games (tf2 specifically, but also likely cs and hl2) the following launch parameters worked for me exactly "as shown" in one line (%command% is an automatic substitution):

LD_PRELOAD="libpthread.so.0 libGL.so.1" _GL_THREADED_OPTIMIZATIONS=1 optirun %command%

I started steam normally (using Intel graphics) and when I launched tf2 it used nvidia graphics. Not sure if it matters, but in /etc/ls.so.conf.d I also symlinked steam.conf to hl2_linux.conf (sudo ln -s steam.conf hl2_linux.conf) then: sudo ldconfig, just it case it needed to find 32-bit libs.

For other games you may need to experiment or search for parameters that work.


I use Stacer a Linux System Optimiser and Monitoring graphical tool downloadable from the Ubuntu Software Centre.

In particular, it shows Services, Processes and Resources which may help you identify any specific issues with your system.

The graphic shows a fairly high CPU usage but if I close the Shutter selection tool, it reduces to about 3% which is about normal for me but it just highlights how easy it is to experiment whilst using a powerful graphical tool such as Stacer.


The D in the STAT column means it's in an in "Uninterruptible sleep". That usually translates to something waiting for an IO command. These cannot be interrupted by kill.

You might be able to jimmy it back to life by unmounting your SSHFS mount. In general, using SSH with Sublime is a bit tricky. There is a paid-for addon that claims to work well but I would work locally. Either rsync or script something up to deploy (Fabric+Git is great).


build wine 32bit from source on ubuntu 12.04 64bit

To pass this error, you need to install X11 library development headers, for instance:

sudo apt-get install libx11-dev:i386

However when configuring wine, it won't solve the problem completely, as you'll get another error about FreeType 32-bit development files not found which would be more challenging (unless configuring --without-freetype).

So the easiest way is either to install wine binary package or build 32-bit wine on 64-bit machine using LXC (Linux Containers) as described in here.


Ubuntu 16.04: restore screen refresh rate after suspend/resume

It can get confusing with the many different ways you can put the computer to sleep with acpi, gnome's gsettings, pm-utils, power management (or something like that) and systemd.

In your case you need to create a script in /lib/systemd/system-sleep that looks like this:

#!/bin/sh

case $1/$2 in
  pre/*)
    echo "Going to $2..."
    # Place your pre suspend commands here, or `exit 0` if no pre suspend action required
    exit 0
    ;;
  post/*)
    echo "Waking up from $2..."
    # Place your post suspend (resume) commands here, or `exit 0` if no post suspend action required
    sleep 2
    xrandr -r 60
    date > /tmp/resume.txt
    ;;
esac

To ensure the script is created with the right permissions, copy and existing script and then edit it:

cd /lib/systemd/system-sleep
sudo cp wpasupplicant tv_refresh
gksu gedit tv_refresh

The sleep 2 pause may be unnecessary for you but for my setup it was necessary restoring sound from laptop back to HDMI TV.

The echo lines are optional but are handy because they show up in /var/log/syslog.


Still cannot mount android phone to Ubuntu 14.04

I have a Galaxy S5 and I found that jmtpfs worked fine (whereas standard mtpfs didn't work).

One off:

sudo apt-get install jmtpfs
mkdir /path/to/my/mountpoint

Each time you want to connect:

[Connect USB cable]
sudo jmtpfs -o allow_other /path/to/my/mountpoint

when finished:

sudo fusermount -u /path/to/my/mountpoint


Do yourself a favor, and do a fresh install of Ubuntu 20.04. Upgrades are not always seamless. Installing a fresh system ensures that the whole system can be setup as the developers intended and tested. At the same time, your system for once is thoroughly cleaned up. You will end up with a solid new system that will serve you reliably for many years to come.
A fresh install removes all files on the system. Obviously, but also before doing any other system intervention, you need to make sure your backup of your personal files is up to date, because you will need to place the data back. Your personal data, once lost, are lost forever. An operating system, on the other hand, is downloaded anytime and installed in under one hour.


Run dpkg-reconfigure lxd and set up IPv4 and/or IPv6 networks.


The solution was to regenerate the boot images with update-initramfs (thanks Denis).

For all kernels (if you have more than one installed)

update-initramfs -u -k all

For the currently used kernel (if you don't want to touch the others)

update-initramfs -u

After this, the options were set because I saw a boot-time error about "enable_huc" parameter being invalid (dmesg). However, systool still doesn't show the options.


search the newest libgtk-dev file in the debian package repository and download it.

gtk.h should be in the package.


Virtual Box does not need DKMS to install but with DKMS the kernel modules will be reinstalled after a kernel upgrade.

After a fresh install it is always a good idea to perform an update of all packages for bugfixes (you have 182 package in the queue there):

sudo apt-get update && sudo apt-get dist-upgrade

Then you may have to load the virtualbox kernel modules only if you had removed DKMS from the default installation.

If this did not resolve your issue you may have installed an incompatible version of Virtual Box still. This needs to be purged before we can install an up to date version. Removing Virtual Box depends very much on how you had installed it in the first place. You may have to run e.g.

sudo apt-get purge virtualbox

or

sudo apt-get purge virtualbox-<xxx> # replace <xxx> with the version installed

After that we can re-install the latest version of virtualbox as depicted in the answer below (I recommend the latest bugfix release from Oracle rather than the version from the repositories):

How do I install the VirtualBox version from Oracle to install an Extension Pack?


I'm going to skip bashing you for allowing some random clueless guy on a random website to tell you what files to delete from your machine. I think you already get the idea.

If you did not download ANY files from their website, chances are you haven't compromised your OS installation yet. Otherwise all bets are off and you should reinstall your machine, no exceptions if you want to be safe, that is.

Reinstall packages you broke by deleting their parts earlier

First of all - you need to reinstall the packages files from which you have deleted. You can do this by verifying your packages with debsums:

sudo debsums -c

It's going to take some time. This is its output after I've manually removed /usr/bin/zipnote that belonged to the zip package.

$ sudo debsums -c
/usr/share/icons/hicolor/icon-theme.cache
debsums: no md5sums for libaudio2
/var/lib/nvidia-common/last_gfx_boot
debsums: missing file /usr/bin/zipnote (from zip package)

You can see the /usr/bin/zipnote as a missing file. You can also see /var/lib/nvidia-common/last_gfx_boot file which has a different checksum. You could choose to reinstall the relevant packages just to be safe. You can find out which package owns that file by running:

$ dpkg -S /var/lib/nvidia-common/last_gfx_boot
nvidia-common: /var/lib/nvidia-common/last_gfx_boot

Then after you get the list of packages that you need to reinstall run:

sudo apt-get install --reinstall package1 package2 packageN

Fix ia32-libs

First verify the state of this package. It can be removed but there can be some parts of it left. Run:

dpkg -l ia32-libs

if it's anything other than

un  ia32-libs       <none>               (no description available)

run:

sudo dpkg --purge ia32-libs
sudo apt-get update
sudo apt-get upgrade #(optional but strongly recommended)
sudo apt-get install ia32-libs

And finally download and install Google Earth:

wget http://dl.google.com/dl/earth/client/current/google-earth-stable_current_amd64.deb
sudo dpkg -i google-earth-stable_current_amd64.deb


Restoring quick response icon of documents

Try editing the file ~/.config/user-dirs.dirs and adding the Documents menu back in.
Here's mine:

# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/Templates"
XDG_PUBLICSHARE_DIR="$HOME/Public"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"