Pause music on middle click at sound-indicator

It seems that short answer is no.

Source code:

static void
indicator_sound_middle_click (IndicatorObject * io, IndicatorObjectEntry * entry,
                              guint time, gpointer data)
{
  IndicatorSoundPrivate* priv = INDICATOR_SOUND_GET_PRIVATE(io);
  g_return_if_fail (priv);

  mute_widget_toggle(priv->mute_widget);
}


Chmodded 000 the home folder,now unable to log in

Try to log in via command line.

Upon login screen, hit ctrl+alt+F1 to switch to console tty and try to log in there with your normal account.

If this is successful you would eventually be able to apply sudo chmod 755 /home/username/

Let us know if this works.


Best way to list 100 first files in a directory sorted by time

You say that "ls piped to head takes an awful long time to complete".

The cause of this is not ls, but the number of files in your directory.  If you have 100,000 files in a single directory, any way of solving this problem would have to get information about all 100,000 files before it could even think about sorting them or printing any output.

If it's taking too long, the real solution is to split the files over multiple directories.

If you can't spread the files over several directories, is there any way you can narrow down the number of files to consider?  e.g. if the file names include a date, maybe you can include a wildcard so the system doesn't have to sort 100,000 files.  Or maybe they're sequentially numbered? (This may or may not help, but is worth trying.)

How many times are you trying to do this?  Maybe it's worth saving/caching the output for re-use.

Now, a question.

Are you sure you mean "creation time" and not "change time"?  Most tools can only display "change time", not "creation time".

Getting "creation time" is a very new thing, which requires an ext4 filesystem, and some tools that aren't easy to install.

If you want change time

Change time (ctime for short) means the time the attributes of the file last changed.

ls -c sorts by ctime.

You want the output in ascending order, not descending, so you need to reverse the output with the -r option too.

So you could do it like this:

ls -cr | head -n 100

A longer solution to the same problem using stat:

find . -mindepth 1 -maxdepth 1 -exec stat -c $'%Z\t%n' '{}' \; |
    sort -k 1n |
    cut -f 2 -d $'\t' |
    head -n 10 |
    sed -e 's/^\.\///'

but that runs slower than ls -cr on my system.

If you want modification time

Modification time (mtime for short) means the time the contents of the file last changed.

ls -t sorts by mtime.

Change ls -cr to ls -tr (best option) or change stat -c $'%Z\t%n' to stat -c $'%Y\t%n'.

If you need creation time

(crtime for short)

This is harder.

First, ensure the directory is on a filesystem that is formatted using ext4.  You can use tune2fs -l <device name> to check this.

Then, there is a new stat format called %W, which can help you here.  To get it, you'll have to download a version of GNU Coreutils released in October 2010 or after, extract it, compile it, and install it.

Then, depending on your kernel, this might work (haven't tried it).

find . -mindepth 1 -maxdepth 1 -exec stat -c $'%W\t%n' '{}' \; |
    sort -k 1n |
    cut -f 2 -d $'\t' |
    head -n 10 |
    sed -e 's/^\.\///'

See also:

stat read crtime from ext4
a Ruby script to access crtime on Linux

If you get errors about "'$\t'

The '$\t' notation requires bash or zsh: it will not work in dash or sh on Ubuntu.  If you really need to use those shells, you will need to change any \t to Ctrl+V, Tab and remove the leading $ from just before the opening quote.


How to set PcManFm as the default file manager in 16.04?

I SOLVED USING THIS COMMAND:

xdg-mime default pcmanfm.desktop inode/directory application/x-gnome-saved-search

and then edited /etc/mime.types and carefully review if nothing is left of nautilus. If it is, replaced it by pcmanfm.

source


How to launch a python GUI application from crontab or rc.local?

The solution is inspired by Starting Rhythmbox via crontab . This

XAUTHORITY=/home/name/.Xauthority DISPLAY=:0 /usr/bin/gtk-launch myapp

or this

XAUTHORITY=/home/name/.Xauthority DISPLAY=:0 gtk-launch myapp

works. Then you also need the file /usr/share/applications/myapp.desktop with the command inside:

sudo -b /usr/bin/python /my/application/gui.py

I use sudo -b to hide popping up terminal window.

The reason was that "the root in the terminal" and "the root in rc.local & crontab" have different environment variables. It is interesting that if I also set, say, DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-wpHtRgNiWP, taken from a user, then it does not work.


How do I open a terminal or console window on a new install?

I thought Ctrl-Alt-T opened gnome-terminal by default? I believe this also works in Lubuntu.

For Unity, you can hit the Super or 'windows' key and type 'term' or some variation on it to get several terminal options (depending on what you've installed).

In Unity you can also easily make a shortcut.  Hit super/windows key to open dash, type 'short' or 'shortcut' and it takes you to the keyboard shortcuts with a couple of mouse clicks.
I've mapped Ctrl-Alt-= to terminator using the custom shortcut option there.

Alt+F2 works in several desktop/windows environments.   In some versions of openbox or blackbox, you can hit F12 to open a terminal.


How to make "xinput --set-prop 11 "Synaptics Finger" 10 15 100" permanent?

I had the exact same issue.  As an alternative to Humpity's answer, I just made a shell script saved in my home directory then added it to my Startup Applications list.

"Startup script.sh":

#!/bin/bash
xinput set-prop "appletouch" "Synaptics Finger" 10, 20, 100

Then open the Startup Applications GUI (which should be installed by default in ubuntu) and add a new entry to the list with the command field like so:

"/home/user_name/Startup script.sh"


Ubuntu 14.04 mouse pointer does not move

I had this problem as well after running those commands. I pulled up a terminal, issued a sudo reboot, and all was well after that.


Request recommendation, Can Ubuntu be used for Home Media Server with desktop machine & how?

Yes, the machine seems perfectly fine if you don't want lots of people accessing it at the same time.
Supposing you want to access it from your macbook (is this correct?) locally, then you don't necessarily will need a GUI on your "NAS" , but it will make things easier.
So, step by step:

1:
follow this guide to install Ubuntu.
I would not necessarily use Ubuntu because you won't be spending much time in front of the desktop anyway, you could install something more lightweight.

2:
Set up WiFi on your installed linux distro

3:
In OS-X open your file browser and go to "network", there you should find your HP in the list of devices connected to your network.
Select it, log in with your account details and you should be able to access the files on your computer

If you have any more questions or want more details, just leave a comment


How do I disable touchpad when using a mouse

On Gnome-based distros, you should be able to disable the touchpad, if an external mouse is connected, by the command:
gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse

To get the current situation:
gsettings get org.gnome.desktop.peripherals.touchpad send-events

Options are:
enabled
disabled
disabled-on-external-mouse


I've powered off and on my Ubuntu instance on Scaleway and now ping or SSH timeout

It seems like the solution was a simple and stupid one.
Instead of "Use local boot" (considered normal mode, as it was and worked until this issue happened), I chose "Use bootscript" and picked "x86_64 mainline latest".


how to make byobu start with terminator by default?

Go into Terminator's Preferences > Profile > Command > Run a custom command instead of my shell and add it.

You need to F9 once it opens and set it as well.


Ubintu 13.04 hangs after install and reboot

After a reboot, please attach copies of your /var/log/dmesg and /ver/log/syslog files to this thread


Installing of jdk and jre 1.8 in Ubuntu 14.04

Try the following:

Install ppa-purge with sudo apt-get install ppa-purge

Then bash sudo ppa-purge ppa:webupd8team/java

Try to open your filemanager with gksu and delete the Java folders.

Next step is to install the ppa again WITHOUT the -y option.

You should be able to eccept the terms of service and install java.

If you are done check with java -version and javac -version if you are good to go.

Cheers


Unable to sudo apt-get install ubuntu-desktop --reinstall

First clear cache by sudo apt-get autoremove && sudo apt-get clear cache and then type sudo apt-get update && sudo apt-get upgrade.
I think this will definitely gonna work.


As Zviad suggested, DON'T USE UTORRENT!

Not only is uTorrent is in tight association with MPAA, it's full of ads, it's a botnet that records your IP and whatever you download.

use:

Deluge
qBittorrent

I'm not saying your problem is not fixable, but it's not worth it...


xfce: cant change layout switch key due to unsupported keyboard model

Test this:

Open Xfce 4 Settings Manager --- Menu --- Settings --- Xfce 4 Settings Manager

Click on the Keyboard icon.

Switch to the Layout tab.

Untick Use system defaults

Click the Add button and choose the appropriate keymap from the list.

Select the active layout.

If you need to switch between different layouts, installing the Xfce panel keyboard plugin might be a more convenient option.

Install xfce4-xkb-plugin from Ubuntu repos:

sudo -i
apt-get update
apt-get install xfce4-xkb-plugin

Right-click on the Xfce panel and choose Add new items

Select Keyboard and click Add

The keyboard plugin should appear in your panel.


Ubuntu 19.04 - I accidentally removed gnome icon themes

https://packages.ubuntu.com/bionic/ubuntu-desktop

shows

gnome-accessibility-themes
    High Contrast GTK+ 2 theme and icons

so sudo apt install --reinstall gnome-accessibility-themes

Ubuntu-mono themes are located in ubuntu-mono package  (https://packages.ubuntu.com/bionic/ubuntu-mono)
so sudo apt install --reinstall ubuntu-mono will re-install those.


No animation options showing in CompizConfig Settings Manager

1.---------------->

sudo apt-get remove compiz-fusion-plugins-extra
sudo apt-get remove compiz-plugins-extra
sudo apt-get purge compiz*

2.---------------->

Reset System

3.---------------->

sudo apt-get install unity-2d
sudo apt-get install ubuntu-desktop
sudo apt-get install ubuntu-desktop-2d
sudo apt-get install compizconfig-settings-manager
sudo apt-get install xserver-xgl
sudo apt-get install emerald
sudo apt-get install compiz-fusion-plugins-extra
sudo apt-get install git compiz-plugins-extra
sudo apt-get install compiz-plugins-extra
sudo apt-get install unity

4.---------------->

Reset System


Blocking MAC Address does not work on DHCPv6 request

iptables is the IPv4 implementation of iptables.  For the IPv6 version, you need to use ip6tables

Using the same command, but with ip6tables should make that work.

Remember to back up your rules, though, for both iptables and ip6tables, with iptables-save > /some/path and ip6tables-save > /some/path, or use iptables-persistent and then save the rules, so that you can recall the rules if the system restarts or something!


Files on Desktop keep rearranging after logging out, logging in, or after reboot/shutdown (16.04.1)

I fixed changing ownership (to my user) and permissions (755) to the file

.local/share/gvfs-metadata/home

The file was owned by root, probably for some bad operation like

sudo compiz --replace

That should be run without sudo permissions since compiz is a user owned process.
Same issue may occur with an improper use of "gksu".


How to increase space allocated to inode in XFS filesystem

We ended up cloning the drive to larger sized disk and then expanding it to some extent. Drives became mountable and we could continue using an osd device.


Gparted

The Gparted needs the root rights -> It is reading the settings from the root directory. You need to copy the '.gtkrc-2.0' file from your home directory to the /root/.


Automatically switching output audio device on 14.04

I don't know if a better solution exists but a udev rule may be what you are looking for.

Open the file /lib/udev/rules.d/90-pulseaudio.rules search for LABEL="pulseaudio_check_usb" and add your custom rule to the end of this block.

Have a look at this: How to change pulseaudio sink with  "pacmd set-default-sink" during playback?
Use lsusb to get your USB vendor and product ID (Example: vendor 0d8c product 0102 in Bus 001 Device 011: ID 0d8c:0102 C-Media Electronics, Inc. CM106 Like Sound Device)
The rule probably looks like below, but I haven't tested it and I wouldn't want it in my audio setup.

# My custom rule to switch to Schiit Fulla everytime it gets connected
ATTRS{idVendor}=="1234", ATTRS{idProduct}=="1234", RUN+="pacmd set-default-sink …"

To let the changes in the rule take effect you need to restart udev: What is the correct way to restart udev?
I'm not sure if 90-pulseaudio.rules is the right place for such a rule, I just know that I had to configure another device and use ENV{PULSE_PROFILE_SET} in conjunction with a custom conf file instead of the RUN parameter. The disadvantage of modifying this configuration file is that it will be replaced when the corresponding package gets updated.


How do I PREVIEW ONLY outstanding security updates?

To preview (edited the answer linked in user535733 comment: no sudo needed, and shouldn't escape $):

apt list --upgradable | grep "$(lsb_release -cs)-security"

To install:

sudo apt upgrade


Automatic synchronization of Ubuntu one on specific time every day

Referring to a similar question in Launchpad, it seems there is no official way of doing this.

But, you can always create a CRON job for doing this.

You can use the command-line tool u1sdtool for controlling your Ubuntu One Sync Daemon.

For eg, you can use:
u1sdtool --connect to connect to your Ubuntu One account and
u1sdtool --disconnect to disconnect from your Ubuntu One account

Say you want to start your synchronization at 3am in the morning and stop at 6am, then in effect you will be creating two CRON job entries.

  0 3 * * * u1sdtool --connect
  0 3 * * * u1sdtool --disconnect

References:
http://www.cyberciti.biz/faq/how-do-i-add-jobs-to-cron-under-linux-or-unix-oses/
https://answers.launchpad.net/ubuntuone-client/+question/93972


The PATH variable is used to find all commands your script will use but rather than adding new directories to it you have overwritten it with a single directory, replace your second line with the following:

PATH=$PATH:/var/lib/cloud9/autorun/loginbrillo

PATH is a colon seperated list, this will get the current value of PATH, append a colon to it and add your directory to it


how should I understand 'seek' and 'count' of dd command?

You just created a sparse file of that size.
https://en.wikipedia.org/wiki/Sparse_file
That means that an application can read a lot of zeroes from that file, yet it doesn't consume much disk space until an application actually writes data to it.
In this context, the seek parameter means "skip n blocks, then begin writing", leaving a "hole" at the start of the file, i.e. there is no disk space (yet) allocated to that part of the file.
Using /dev/zero as the input file seems to have the same effect. (Though I admit I hadn't expected that; I would have expected the file to be filled with actual zeroes occupying actual disk space).


Getting a black screen after instating Pantheon

Sometimes, you have to restart for the desktop manager to truly switch -- just make sure "Ubuntu" is selected when the machine turns back on.

If that doesn't work, try this:

sudo apt-get install ubuntu-desktop --reinstall
unity --reset


Internet not working (local network works) after upgrade to 14.04

Use the following command in terminal(Ctrl+Alt+T)to fix this issue.

sudo dhclient


In computing, the Executable and Linkable Format (ELF) is a common standard file format for executables, object code, shared libraries, and core dumps. In your question /sbin/init: ELF 32-bit LSB shared object identifies ELF as the format for a 32-bit shared object from a shared library. Your operating system is a 64-bit OS that has a 32-bit shared object somewhere in it. There is no contradiction in this.


Is it possible to assign a shortcut to "Switch Account" in the login screen of Ubuntu 14.04?

Yes.

Go to System Settings -> Keyboard -> Shortcuts -> Custom Shorcuts, then add a new one. In the "what command to be executed" line, type:

dm-tool switch-to-greeter

And then assign your chosen keypresses to it.

Reference


Can I deploy multiple controllers in LXD on a single host?

You can nest LXD containers..
So create two containers Huba and Buba  using
lxc launch ubuntu:20.10 Buba -c security.nesting=true
lxc launch ubuntu:20.10 Buba -c security.nesting=true

Now each of the containers can create its own containers but they will be isolated from each other or other containers at the same level..


Not able to Run Python script Program Error: /usr/bin/python3^M: bad interpreter:

You have a bad carriage return character at the end of the first line in your code as told by the following error message.
bash: ./mcb.py: /usr/bin/python3^M: bad interpreter: No such file or directory

The ^M is a carriage return character.  If you see this, you're probably looking at a file that originated in the DOS/Windows world, where an end-of-line is marked by a carriage return/newline pair, whereas in the Unix world, end-of-line is marked by a single newline. source
To get rid of the error make a new mcb.py file. Open the default Text Editor app, copy the code from your question and paste it into Text Editor (gedit in Ubuntu 20.04), save the code as mcb.sh, and run the code again with the following commands:
chmod +x  mcb.sh
./mcb.sh


How can I create an executable in Linux (beginner)?

Initially, you need to write a shell script.
Just open a text editor and write

#!/usr/bin
your command here

Next, all you need to do is just to create a .desktop file in Ubuntu.

Open your terminal and type as

sudo -i
cd /usr/share/applications/
nano <your_scriptname.desktop>

Then, it will give you an opened file and copy & paste these lines there one by one.

[Desktop Entry]
Type=Application
Terminal=true
Name=<what script name you want write here >
Icon=<any icon you want to give that iconspath>
Exec=<place here path of your script>

Save and close with CTRL+X+Y and hit Enter. You will have that script on your desktop as an application.

Like this, you can similarly create three applications for the three scripts you made.

I hope that helps.


This is normal, you have to install the flash plugin, by going to tools, add-ons, and then you should see plugins. click on this. search shockwave flash and there it should be. Click install and when it is done the problem should be fixed


Running Wine applications from different terminal paths yield different results?

The issue is that wine has an special command for this.
You must issue the

wine start /d <path>

where <path> is the directory to start in.

https://wiki.winehq.org/Start


The issue was that, as I was set up, my MaaS server did not have an APT cache.  Because there was not a cache, it did not have the libraries needed to recognize IPMI.  Once I connected the MaaS server to the net, it had access to the libs and worked correctly.

My next move is to create a apt cache on the server.


Problems with Desktop screen after login

Well, a little advice, a little help:

Unresponsive system - here's a set of what you can try before resorting to the power button.  One of the 'hidden' gems in here is holding the PrntScr and slowly typing "reisub"

I have a dv7 also, and the heat generated by the machine is terrible.  I've had to reflow the graphics chip down onto the motherboard twice, and when 14.04 came out, Ubunti could not recognize the graphics chip.  I never did get the proprietary drivers to work with that machine.

For me on my Pavilion, the graphics solution is a launchapd PPA by Oibaf - these are open source drivers, a bit more advanced(?) than those packaged by canonical, and perhaps less stable, but they work in my HP.


Are there any open source alternative to Landscape?

In addition to straight Puppet and Spacewalk, there is a puppet-based system called "foreman" that does most of what you're looking for.

while the screenshot does show CentOS and Windows clients, it does have Ubuntu support

I've used it and I recommend giving it a go.


How do I change the caption of the "Login" button?

Just not to let this go unanswered: The correct solution would be to provide a custom translation to the "unity-greeter" language file and replace each locale's rendition of "Login" with the same locale's rendition of "Start" for the login button text.

I did not do that, however, and frankly I don't know how to do it either. Instead, I actually ended up patching /usr/share/locale-langpack/da/LC_MESSAGES/unity-greeter.mo. This is a not 100% satisfactory hack, but it did work and bring me onwards, and it did get the users a "Start" rather than "Login" button.

It conceivably might be easier/more obvious to find out how to customize these GUI texts.


A quick Google search and I found this: http://hplipopensource.com/hplip-web/models/officejet/officejet_pro_8600.html

Looks like the latest drivers are for Ubuntu 15.10, as of 1/12/2016.

Click on the "Download HPLIP" button near the top of the page, and follow the instructions.


Ubuntu 12.04 cannot start, "saned disabled; edit /etc/default/saned"

It does look like a video driver issue that is causing plymouth and lightdm to fail to start. However, I think you'll find the machine has booted and is operational, albeit in text-only mode

You can go to a tty (terminal/commandline) by pressing CTRL+ALT+F1. You should see a prompt asking for your login an password. Login and try to re-install your graphics drivers.

If you're using NVidia, it's most likely

sudo apt-get purge nvidia-current

and

sudo apt-get install nvidia-current

After that, run sudo reboot.

source: After Upgrading to 12.04 I can't get to the login screen


Is it a good idea to install propriatery drivers?

I would suggest going with the proprietary nvidia driver. From my experience, that seems to solve system crashes. Also, you have to reboot the system after installing the new drivers for the changes to take effect.

However, if the system crashed after you had installed proprietary drivers AND rebooted for the changes to take effect, I would stick with opensource.


Is there a way to change the icon of a running application on the Gnome panel?

The solution is the same as for this Question:
How do I add a name to a launcher?
create a *.desktop file like I describe there and set the Icon to the path were you put the icon you want to use.
This will change the launcher icon system wide changing it just for the unity panel at runtime is not possible as far as I know


Finally got a way out of it i am running Ubuntu in gnome-shell environment .
In Gnome-shell all the unity facilities as dashboard etc, are not present .
also u can costomize the pane menu which is more or less like full filing my requirement.

for disabling right click i am using above command .


I entered

ls -s /acnl/data/stats/stats.json /var/www/html/json/stats.json

instead of

ln -s /acnl/data/stats/stats.json /var/www/html/json/stats.json

My bad!


Unable to view apache default page from outside local network

When you connect from your phone you have to connect to your external IP.

If you have access so you can login to the router you can see your external IP. You will have to forward port 80 on your router using "port forwarding" so that it forwards  any connection to your external IP to to port 80 on the IP of the server.

As for the new files you will have to change their permissions using chmod and chown

This guide should get you started on the right foot
https://help.ubuntu.com/lts/serverguide/serverguide.pdf


I believe that it is a very typical problem, which is caused not by any soft/hardware on your machine, but the interference on your router's radio signal. It means that other radio devices (most probably, routers of your neighbors, if you live in condominium) are distorting your router's WiFi waves. Try to change the channel, on which it work. This can be done at the Wireless settings section in your router administration panel. There are several channels, try all of them until problem solved or the interference hypothesis is eliminated.


I have decided to install Postman instead. This seems to do the same thing, which is what I need.


What is the next step in downloading Code::Blocks?

First of all, Code::Blocks is available in Ubuntu Standard repositories, therefore you can just do:
sudo apt-get install codeblocks

Or Download it from software Center

*But this is not the latest version. (13.12 is available here)

To get the latest version:

(16.01)
sudo apt-add-repository ppa:damien-moore/codeblocks-stable
sudo apt-get update
sudo apt-get install codeblocks

NOTE : There are several plug-ins you might need as per your requirements:
codeblocks-common : common files for Code::Blocks IDE
codeblocks-contrib : contrib plugins for Code::Blocks IDE
codeblocks-contrib-common : common files for the contrib plugins for Code::Blocks IDE
codeblocks-contrib-dbg : Debugging libraries for the Code::Blocks contrib plugins
codeblocks-dbg : Code::Blocks debugging libraries
codeblocks-dev : Code::Blocks development libraries (SDK)
codeblocks-headers : Code::Blocks development headers (SDK)
codeblocks-libwxcontrib0 : Code::Blocks shared libraries for wxContribItems
codeblocks-wxcontrib-dev : Code::Blocks development libraries for wxContribItems
codeblocks-wxcontrib-headers : Code::Blocks development headers for wxContribItems
libcodeblocks0 : Code::Blocks shared libraries
libwxsmithlib0 : wxSmith shared library (Code::Blocks plugin for RAD GUI editing)
libwxsmithlib0-dev : wxSmith development metapackage
wxsmith-dev : wxSmith development files (libraries)
wxsmith-headers : wxSmith development files (headers)

To install any of these : sudo apt-get install package-name


18.04 Error while booting. Hangs on line "stopping user manager for uid 123"

I backed up all her important data, wiped 18.04 off and installed 16.04 and ran all updates. Everything is working gloriously now.

She had been using 16.04 the past couple years and she wanted to update to 18.04... its been working fine for her the past month or two until this issue came about. She is much happier using 16.04 again.


How to build a Firefox .deb without webm support?

If you just want to disable WebM:

Open the URL about:config
Accept the warning
Search for media.webm.enabled and double-click on it to toggle the value. Set it to false.
Changes are immediately applied.

Otherwise there is no easy way to disable WebM without recompiling. Recompiling is as easy as:

sudo apt-get build-dep firefox
apt-get source firefox
cd firefox-*
editor debian/rules
dpkg-buildpackage -b -us -uc

At the editor step, adjust the configure options.


Minimal server configuration only to send logs via mail from scripts on Ubuntu

You may use smtp client software intended to emulate mail/sendmail commands - it does not requite installation of local MTA/SMTP server. You may consider msmtp or sendemail.

Another option is to install full blown MTA/SMTP server configured to relay all locally submitted messages to mailbox on another host without listening on smtp port 25.
[I may add more details if you are interested]


I found it. In the KDE settings, the color scheme is set to Breeze dark. After setting it to Breeze, ScidvsPc sees what I want. This probably happens with any non QT application.
Thank you for your attention.


Is there a better option other than NTFS for a shared HD between Ubuntu and Windows 7?

Well Ubuntu does supports other formats better than NTFS but windows only reads NTFS and FAT32 ... you don't actually have any other choices other than NTFS. FAT32 is a bad idea. You shouldn't be able to copy files larger than 4GB into the partition. The maximum file size on FAT32 partitions is (2^32)-1 bytes, or one byte less that 4GB.

So in short NTFS is an easy way to go :)


DNS Update on Ubuntu 16.10 How do I do this?

I was able to do this following instructions from a page posted by steeldriver yesterday :

[See What is the proper way to change the DNS IP? – steeldriver][1]

I almost had it on my own, I was not SAVE-ing my changes in the Network Connections section when I first tried this - before creating this thread.

Thanks all for the info though.  Much appreciated.


Cannot update software because of grub-efi-amd64-signed unmet dependency

Got the same error with the Software Updater on Ubuntu Budgie 20.10 this morning.
I manually updated though command line and when I got back to the updater it says that everything is up to date.
sudo apt-get update
sudo apt-get upgrade


Is there a bzr command to see all branches of a project on Launchpad?

I don't know of any bzr command that does this, but it's actually very easy to script using the Launchpad python API. For instance:

#!/usr/bin/env python
import os, sys
from launchpadlib.launchpad import Launchpad

cachedir = os.path.expanduser("~/.launchpadlib/cache/")
launchpad = Launchpad.login_anonymously('find_branches',
                                        'production',
                                        cachedir)

try:
    project = launchpad.projects[sys.argv[1]]
    for b in project.getBranches():
        if b.lifecycle_status not in ["Abandoned", "Merged"]:
            print b.bzr_identity
except KeyError:
    print "Project unknown... \nUsage: " + sys.argv[0] + " lp_project_name"

So with python find_branches.py deluge we get:

lp:deluge
lp:~vcs-imports/deluge/trunk
lp:~mvoncken/deluge/ajax-template-dev
lp:~deluge-team/deluge/master
lp:~shaohao/deluge/0.9
lp:~damoxc/deluge/master

You can run wild with it and do things like sort by date_created, date_last_modified, or create your own heuristic for what branches are interesting to you. See:

https://launchpad.net/+apidoc/1.0.html#branch


Schedule tomcat7 restart on Ubuntu 14.04.3 LTS

You can use a cron job for this. Create a shell script with these:

#!/bin/sh
/etc/init.d/tomcat7 restart

Then set up a job in the crontab:

0 0 */2 * * root my_script.sh

This will run the script at midnight, every two days.

This will "solve" your immediate problem. However I suggest to fix your application running on Tomcat, it is hardly ready for production, if it needs restarts like this.


Ubuntu 14.04 Variety wallpaper and the lockscreen background

Variety developer here.

Please note that it is the default behavior of Ubuntu to use your current wallpaper as login/lock screen background as well, depending on the paths and permissions over the image (e.g. if you use the Appearance settings to set one of the stock wallpapers, it will be set as login/lock screen background, regardless of Variety running or not). So following the steps below may or may not help you, but still give them a try:

Make sure you have unchecked the option in Customize -> Login Screen Support. Edit ~/.config/variety/scripts/set_wallpaper and remove the line gsettings set com.canonical.unity-greeter background "$WP".

Variety does not touch the draw-user-backgrounds setting.


How do I check the server location on Nord VPN?

Check your connection status with nordvpn status and note the country and city. You can use nordvpn countries to see the list of countries where servers are available, then you can pick a country and look at the cities (optional) with nordvpn cities United_States and connect with  nordvpn connect United_States Atlanta for city level or just nordvpn connect United_States.


How to add option to make a file executable in PCManFM's context menu?

Considering the example from the answer - of using the "Open with" option:

The command sudo chmod +x must run in a terminal (gnome-terminal -e "sudo chmod +x %f") or alternatively the line Terminal=true should be in a desktop file in ~/.local/share/applications/make_exec.desktop:

[Desktop Entry]
Name=Make file executable
Exec=sudo chmod +x %f
Icon=path/to/icon
Terminal=true
Type=Application
StartupNotify=true
NoDisplay=true
MimeType=text/plain;

For an application to appear in the context menu, it may need a desktop file in /usr/share/applications, but also you may need to edit as administrator /usr/share/applications/mimeinfo.cache and in the line of the intended file type to add the application.desktop.

So, in the present case, open /usr/share/applications/mimeinfo.cache and add make_exec.desktop to the line text/plain.

Considering the creation of custom actions - like in Thunar, Nautilus or Dolphin:

PCManFM supports custom actions.

Those created with Nautilus configuration tool (for Nautilus) appear in PCManFM too. These are .desktop files created in ~/.local/share/file-manager/actions. So, they can be added manually without the Nautilus tool.

The form of these files should be like those presented here or here.

So, for the present purpose, create the file ~/.local/share/file-manager/actions/make_executable.desktop with these lines:

[Desktop Entry]
Name = Make executable
Tooltip = Make this file executable
Icon = terminal
Profiles = make_exec;

[X-Action-Profile make_exec]
Name = Make executable
MimeTypes = text/plain;
SelectionCount = 1
Schemes = file;
Exec = sudo chmod +x %f


Try creating an Ext4 partition inside the win 8.1 disk, to do this use Gparted, after creating the partition boot ubuntu installation and install it in the ext4 partition,

Give some feedbak if it worked or not.


Your desktop has a static IP that is not within your router's subnet.

In plain English: your desktop has an network address that's not within your router's range of addresses, so they can't see each other.

You'll have to switch the desktop to DHCP first. Or change the router's subnet to match the desktop's then reboot all the other clients so they pick up new IP addresses in that subnet from the router.

To me, this sounds like poor planning from your IT department. Most corporate static IPs are 10.x.x.x while most home IP addresses are 192.168.1/0.x. This means that in most cases a desktop taken directly from work won't work at home without some reconfig that end users are most likely unfamiliar with.


For using Aircrack-ng you have to disable all processes that might interfere during operation in monitor (promiscuous) mode. To do so run the following command in the terminal:

sudo airmon-ng check kill

This will check and display all processes that will need to be terminated and also end them.

After restoring to managed mode you might face problems in your Wi-Fi connectivity, even after restarting the service network-manager usingsudo service network-manager start.

To restore Wi-Fi connectivity you must soft-unblock your desired Wi-Fi interface. To check the status of Wi-Fi interfaces:

sudo rfkill list all

To unblock all Wi-Fi interfaces:

sudo rfkill unblock all


Monitor and time a process that is already running and saving the total running time into a file

You can monitor a running process with e.g. PID 12345 and determine its total run time in seconds once it exited like this:

startdate="$(ps -o lstart= 12345)"
while ps 12345 &>/dev/null ; do sleep 1 ; done
bc <<< "$(date +%s) - $(date -d "$startdate" +%s)"

This first reads the lstart property of the process using ps which contains the exact start date as string. We have to remember this while the process is still running and store it in a shell variable named startdate.

Then we wait while the process is still running by checking the status of ps 12345 every second, as it will exit with a non-zero status if no matching process was found.

Once the process exited, we subtract the start time from the current time, both converted to seconds since Epoch, using bc and see the result as time span in seconds.


iMac doesn't boot from same usb that works on MacBook Air

Your iMac probably has a PowerPC processor -- making it's incompatible with the x86/64 build that you'd be using on your Mac Book Air (I assume that's what MBA means). Apple didn't even start using Intel processors until about 2006. Therefore, in order to install it on an iMac you'd have to find a PowerPC build of Ubuntu.

Have a look at the PowerPC FAQ on the Ubuntu Wiki. Looks like the only option for PowerPC currently is Lubuntu. The PowerPC ISO can be found here.


Regarding the first question:

  1) How I could install the GUI without internet (of course I have CD) ?

You might have been assumed that, you can install GUI softwares from the server CD, which is not the case. You need the packages files (which are basically .deb files) from an Internet enabled PC, and then use those files to install software on your PC.

Look at this question for detail instruction: How can I install software or packages without Internet (offline)?.

For your second question, I suggest you to create another separate question with mentioning your specific USB device. That is the recommended way for un-cluttering the site.


Ubuntu 14.04 update-pci ids /usr/share/misc/pci.ids.new is read-only

From this answer

sudo update-pciids

Verified working on my Ubuntu 16.04 machine.


How to store output of (mpstat) command in a variable in shell script

Its a tough one but still I am managed to get something for you.

This line will print CPU data in a variable named CPU

eval "$(mpstat | awk '{print $3}' | xargs | awk '{print $2"="$3}')"

after doing this execute echo $CPU

you will get

[root@localhost BASH]# echo $CPU
all
[root@localhost BASH]#

and for %usr you can use eval "$(mpstat | awk '{print $4}' | xargs | awk '{print "USR="$3}')"

look at below example

[root@localhost BASH]# eval "$(mpstat | awk '{print $4}' | xargs | awk '{print "USR="$3}')"
[root@localhost BASH]# echo $USR
0.11
[root@localhost BASH]#

I hope you understand how to do this and you can develop complete code for what you want.

Summary:

[root@localhost BASH]# cat  forsome.sh
#!/bin/bash
eval "$(mpstat | awk '{print $3}' | xargs | awk '{print $2"="$3}')"
eval "$(mpstat | awk '{print $4}' | xargs | awk '{print "USR="$3}')"
echo "Number of CPU's :"$CPU
echo "%usr value      :"$USR

[root@localhost BASH]# ./forsome.sh
Number of CPU's :all
%usr value      :0.11
[root@localhost BASH]#


Dualboot Windows 7 and Ubuntu 12.04 on UEFI Unable to Boot to Ubuntu

Just follow the 1st paragraph of the Ubuntu Community Documentation about UEFI: https://help.ubuntu.com/community/UEFI


pgAdmin4 stopped working after latest upgrade Ubuntu 16.04. 'Request' object has no attribute 'is_json'

Got the same problem.

My solution is not the best and easiest but it works.

I create new virtual env with python 3.8 and try to run PgAdmin. Ofcourse it failures because of unavailable python modules.
So I install module and run PgAdmin from terminal (like this "python3 /usr/share/pgadmin4/web/pgAdmin4.py") again then again and again...

Until I face the problem with import ImportError: cannot import name 'default_render_json' from 'flask_security.views'

The solution is here and it is pretty simple
https://forums.opensuse.org/showthread.php/539523-pgAdmin4-startet-nicht-mehr?s=75392d29ead60bd332ff6f2541467dba&p=2930160#post2930160

Also you have to install libpq to compile psycopg2

In summary my steps are:

sudo apt install libpq-dev
activate virtual env with python 3.8
pip install -r pip_freeze_output_file.txt
fix ImportError: cannot import name 'default_render_json'

pip freeze output is:

alembic==1.4.2
astroid==2.3.3
Babel==2.8.0
backcall==0.1.0
bcrypt==3.1.7
blinker==1.4
Brotli==1.0.7
cffi==1.14.0
click==7.1.2
cryptography==2.9.2
decorator==4.4.2
dnspython==1.16.0
email-validator==1.1.1
entrypoints==0.3
Flask==1.1.2
Flask-BabelEx==0.9.4
Flask-Compress==1.5.0
Flask-Gravatar==0.5.0
Flask-Login==0.5.0
Flask-Mail==0.9.1
Flask-Migrate==2.5.3
Flask-Paranoid==0.2.0
Flask-Principal==0.4.0
Flask-Security==3.0.0
Flask-SQLAlchemy==2.4.1
Flask-WTF==0.14.3
future==0.18.2
idna==2.9
ipython==7.13.0
ipython-genutils==0.2.0
isort==4.3.21
itsdangerous==1.1.0
jedi==0.16.0
Jinja2==2.11.2
lazy-object-proxy==1.4.3
ldap3==2.7
Mako==1.1.2
MarkupSafe==1.1.1
mccabe==0.6.1
paramiko==2.7.1
parso==0.6.2
passlib==1.7.2
pexpect==4.8.0
pickleshare==0.7.5
prompt-toolkit==3.0.5
psutil==5.7.0
psycopg2==2.8.5
ptyprocess==0.6.0
pyasn1==0.4.8
pycodestyle==2.5.0
pycparser==2.20
pyflakes==2.1.1
Pygments==2.6.1
pylint==2.4.4
PyNaCl==1.3.0
python-dateutil==2.8.1
python-editor==1.0.4
pytz==2020.1
simplejson==3.17.0
six==1.14.0
speaklater==1.3
SQLAlchemy==1.3.17
sqlparse==0.3.1
sshtunnel==0.1.5
traitlets==4.3.3
urllib3==1.25.8
wcwidth==0.1.9
Werkzeug==1.0.1
wrapt==1.11.2
WTForms==2.3.1


"unable to load kernel module nvidia.ko" BUT "modprobe -r nouveau" = FATAL (not found)

EDIT: Install the deb package using apt-get. The version available from apt-get is up to date and is the same version as the downloaded version from nvidia

Execute the following commands:

sudo apt-get update
sudo apt-get install nvidia-173
sudo reboot

Edit #2

To verify the version available from apt-get, run the following command

apt-cache search nvidia-173

if apt-get does not have the newest version, here' a link to the deb download for the latest version available from the "proposed" repo:

wget http://launchpadlibrarian.net/160095725/nvidia-173_173.14.39-0ubuntu0.0.1_i386.deb

After downloading, to install it run the following commands:

sudo apt-get install gdebi
sudo chmod +x nvidia-173_173.14.39-0ubuntu0.0.1_i386.deb
sudo gdebi nvidia-173_173.14.39-0ubuntu0.0.1_i386.deb


Problems connecting to Bluetooth headset - 14.04 - problem re-occurs

Had the same problem fixed it with:

pactl list cards short

to get the device id, then I did:

pactl set-card-profile X a2dp

where X is your device id

found it by reading
No A2DP streaming audio from 12.04 to Bluetooth headset


How to launch different firefox profiles via the keyboard using Unity

I eventually worked out a way to get what I want using .desktop files in ~/.local/share/applications that allows me to launch specific profiles from the dash.

The process for the facebook launcher is to copy the original firefox launcher into the above directory. Then edit two lines to give it a friendly name that the dash will match against, and a command that will launch firefox with the profile I want.

To copy the file:

mkdir -p ~/.local/share/applications/
cp /usr/share/applications/firefox.desktop ~/.local/share/applications/facefox.desktop

Then you need to edit two lines of the new file - Name= and Exec=. The Name line is near the top, and the Exec line is after lots of translations. Note that there is more than one Exec= line in the file, you want to edit the first one you find.

I edited them to be:

...
Name=Facebook Firefox Web Browser
...
Exec=firefox -P facebook -no-remote %u
...

Just to explain the Exec line, this is what you can type at a terminal to launch firefox, with:

%u being arguments that might be added by the desktop environment,
the -no-remote flag being required to allow more than one instance of firefox to run, and
-P facebook selects the profile to use.


How to assign unique MAC addresses to sub-interfaces

You can install macchanger

Then execute like following,

sudo macchanger --mac 00:11:22:33:44:55 <interface_name>

More details


Can't install ubuntu or lubuntu on macbook 1.1

I had the same problem with xubuntu and lubuntu on macbook pro 1.1, but finally installing 15.04 from the mini.iso (bootable usbstick created with unetbootin) worked for me. Nevertheless there are some boot issues from time to time.


HP Laserjet p1005 Printer quit working when I upgraded to Ubuntu 14.04 from 12.04

I faced the same issue, and after verifying the advice from Marc, I installed the latest
HPLIP (3.14.4 - the software Center installs 3.14.3 release) from http://hplipopensource.com/hplip-web/install/install/index.html and I now I have the HP LaserJet P1005 printing fine!.


Install gnome-system-tools with this command

 sudo apt-get install gnome-system-tools

or using the link gnome-system-tools

and then try using the old fried users-admin


Ubuntu Gnome 15.10-16.04 Dell XPS15 9530: Bluetooth doesn' work

Replacement firmware with newer driver solved the problem (see for instance here). Just be careful with names: The new driver should have the same name as the old one.


How do I convert my usb installation from legacy boot to uefi?

If a live or persistent live system
@C.S.Cameron's comments are relevant.

Save the casper-rw file or the content of the casper-rw partition.

The method he is describing is explained with more details at the following link,
https://help.ubuntu.com/community/Installation/iso2usb

If you want a persistent live system with a casper-rw partition, you can use mkusb to create it from the same Ubuntu iso file as the previous one. Then the content of the old casper-rw partition will work.

If an installed system (installed like into an internal drive)
It is possible to convert the boot mode from BIOS (alias legacy) mode to UEFI according to this link (as suggested by @MichaelBay in the comment to your question),
Which commands to convert a Ubuntu BIOS install to EFI/UEFI without boot-repair on single boot hardware?

An alternative (for other users, who read this in the future) is to create an installed system (or modify your current system) such that it can boot both in UEFI mode and BIOS mode. See the following link,
help.ubuntu.com/community/Installation/UEFI-and-BIOS
This way you make a system, that is portable between newer and older computers.


Where can I find more Ubuntu 13.10 unity scopes

Open up software-center, search unity-scope.


Ubuntu won't boot and get this on a black screen /dev/sda5: clean

Resolved, faced same issue.
Before doing this, turn on your internet, reboot PC and it will connect your PC to internet (if previously connected) or find, how connect internet via command after step 1, given below.

Press Ctrl+Alt+F1: Enter your Username & Password
Check gdm version: sudo service --status-all |grep gdm
Install your gdm (in my case it was gdm3): sudo apt install gdm3

All done...


Non existing Mount Points fails to automount on boot, How to fix this?

If you download Grub Customizer from the Software Centre, when you run the programme, you can edit the following on the General Settings tab.:

Un-check the look for other operating systems.
Set the Timeout to 0 Seconds


Not being a fan of the pcspkr beep, I use a beep from one of the system sounds with the installed pulseaudio server's paplay command.

First find a sound you like (you can browse /usr/share/sounds for some available ones for example) and create a reference to it

export BEEP=/usr/share/sounds/ubuntu/ringtones/Harmonics.ogg

Then have it available as a command

alias beep='paplay $BEEP'

Now just run beep whenever you need it. For example, to alert you when a command is finished:

find . | grep treasure ; beep


You forgot to add the release code name.

sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ $( lsb_release -sc ) stable main" >> /etc/apt/sources.list.d/google-chrome.list'


WSL 2 Won't Run Ubuntu - Error 0x80370102

FIRST you need to make sure you have enabled CPU virtualization in your BIOS.
These instructions will depend on your hardware.
For AMD CPUs, you will look for a feature called:
"AMD (AMD Secure Virtual Machine, AMD SVM)"
For Intel CPUs, you will look for a feature called:
"Intel (Intel Virtualization Technology, Intel VT-x)"
Here are the instructions for setting SVM on my computer. Note: this is for a MSI motherboard.

Go to advanced settings.

Go into the overclocking section.

Go into the CPU Features section

Toggle the CPU feature "SVM Mode" which enables CPU virtualization.

SECOND you are going to have to enable the Hyper-V Windows feature.
Here are my instructions (Note feel free to duckduckgo/google this separately):

Search for "Windows Features" in your taskbar.

Then look for "Hyper-V". Then enable it.

At this point you should be done and no longer get this error.


How can I further secure my system using 2 factor authentication?

You can use the open-source Pluggable Authentication Module (PAM) created by Google, known as the Google Authenticator. This module is available in the standard repositories, as well as from GitHub so that you can build from source. Coupled with the Android, iOS, or Blackberry App of the same name, it creates time-based, time-sensitive codes for authentication along with your password. Since it is a PAM module, it can be dropped in pretty much anywhere. Let's get started!

Installing

To start, you can install the PAM with the following:

sudo apt-get install libpam-google-authenticator

Simple!

Setting it up:

After it's installed, you will want to also install the corresponding mobile application for Android, iOS, or Blackberry (depending on your mobile platform). Each one is useless without the other. After you have the application you need for your mobile device, run the following in a terminal:

google-authenticator

This will start by asking you a few questions The first one is the only one which you must answer "Yes" to, and it asks if you want the codes to be time-based. After that, read each question and make the choice that makes the most sense to you.

Upon completing the initial set-up, you will see a very large QR code in your terminal, as well as some other information. The line that says "Your New Secret Key Is:" is a much needed line if you don't want to use the QR code for pairing your device, so don't close this window until you are set-up! The "scratch codes" this gives you are also important, as they are what you will use to log-in if you lose your mobile device. Write them down and store them somewhere safe.

Now, on your mobile device, open your Google Authenticator application and select "Set up account". You can either scan the QR code that was generated, or select "Use provided key". If you scan the QR code, everything will be automatically saved under an account named "your_user@your_host". However, if you select "Use provided key", you will have to enter a name, key, and type of token manually. The name can be anything you wish. The key would be the secret key previously generated. The type would be the default time-based. After setting it up, you will see the account on the main pane of the Google Authenticator app, as well as a circle-shaped timer next to it. That timer depletes every 30 seconds, and a new code is generated.

Enabling it!

Here comes the magic. Since this is a PAM module, it can be used in a variety of places. I will walk through adding authentication to sudo requests, SSH log-ins, and lightdm log-in. However, after reading this tutorial, you will be able to enable it elsewhere based on the same techniques.

SSH

I'm doing this one first because there is an extra step. The first thing you need to do is to edit your SSH config file:

gksudo gedit /etc/ssh/sshd_config

Search for the line that says:

ChallengeResponseAuthentication no

and change the "no" to a "yes".

Now, you need to edit the PAM module for ssh:

gksudo gedit /etc/pam.d/sshd

At the very end of this file, add the following line:

auth required pam_google_authenticator.so nullok

The "nullok" argument tells the system to not request a verification code if a user has not set-up two factor authentication. After that edit, go ahead and restart your ssh service:

sudo service ssh restart

sudo Requests

Edit the PAM file for sudo:

gksudo gedit /etc/pam.d/sudo

Add the following line at the very end:

auth required pam_google_authenticator.so nullok

Now every sudo request will ask for a verification code as well as a password.

LightDM (GUI Log-In)

Edit the PAM file for LightDM:

gksudo gedit /etc/pam.d/lightdm

Add the following line at the very end:

auth required pam_google_authenticator.so nullok

That's it! Everytime you log-in through the GUI, it will ask for a verification code after your password.

System-Wide and TTY Log-In

Even if you enable the above methods, it still won't ask for a verification code if you switch over to a TTY with CTRL+ALT+F#. To fix this, edit the common-auth PAM file:

gksudo gedit /etc/pam.d/common-auth

and add the following line to the very end:

auth required pam_google_authenticator.so nullok

Note: Since this common-auth file is included in all other auth type files, you need to remove the auth required lines from the other files. Otherwise, it will ask for the verification code twice and not allow you to log-in after.

Wrap-Up

As you could see, it was pretty easy to add this authentication in. If you use a display manager other than LightDM, you could easily just change the lightdm line above accordingly. Since your mobile device and your system shared this secret key already, they should always be in-sync. There is no interaction with Google servers, or any other internet resource for this set-up. Even if both devices were completely offline, the verification codes that show up in your application will be correct. Whenever you need to log-in through one of the methods you've enabled, just make sure to open up your mobile application and grab the current verification code.

Have fun!!


Can't access some websites unsing Ubuntu 16.04

First make sure these websites you are talking about are up. Check this  here.
Second, if these websites are indeed online, try to ping them. Open a terminal and type ping www.website.com.
If you get a reply, clear your browser's cache and try again.
If you don't (but you have Internet connectivity in general), then check your DNS settings or contact your ISP.


You're almost there. You need a \; on the end to let find know where the end of the command is.

find /opt/compiz-built/share/gconf/schemas -exec gconftool-2 --install-schema-file={} \;

For commands that can take multiple arguments at a time (eg if you wanted to just stat each filename) you can use \+ instead. This will build a compound argument which can execute a faster because it doesn't fork out for every single file:

find . -exec stat {} \+

That won't work here for your example though.

Just a test harness to highlight that quotes aren't required:

$ mkdir 1 2 1\ 2               # makes three directories
$ touch {1,2}/single           # puts a file in each of the two singles
$ touch 1\ 2/COMBO             # puts a file in the dir with a space
$ find -type d -exec ls {} \;
1  1 2  2
single
single
COMBO

If it wasn't handling quoting for us, we'd see this instead of COMBO:

1:
correct

2:
correct


You should try to remove the old kernels, i.e. the packages named linux-image-xxxxx-generic, where xxxxx is any old version that you are not using. In order to see which version you're using you can run:

uname -a


Are drivers available for NVIDIA GEFORCE 740M?

Ubuntu 16.04.2 perfectly supports the NVIDIA graphics. There are drivers available in the Ubuntu 16.04 repositories and to install the latest stable NVIDIA drivers for the GEFORCE 740M open a terminal and execute the following command : sudo apt install nvidia-375 nvidia-prime Reboot the operating system to activate and make use of the freshly installed NVIDIA drivers.

Additional information : Every Ubuntu system comes with the open source nouveau drivers pre-installed and if you don't play demanding games or use other applications which need a higher graphics hardware performance, you don't need to install the proprietary NVIDIA drivers. The package nvidia-prime is only necessary when the notebook has NVIDIA Optimus support.


Pycharm: run selection in *terminal* (not python consol)

You can just do this with the clipboard (Ctrl +C) then open the terminal with Alt+F12 then paste with Ctrl+V

You could wrap this up into a single command by defining a 'quicklist' in Setttings > Appearance & Behaviour > Quick Lists

Then assign that single key sequence using Keymaps which is in Settings


if you have access to any other linux distro at the time, you can install unetbootin and with that great tool you can make bootable usb disk from any linux image file. also there is a tool in ubuntu called startup disk creator. it does the same functionality, but unetbootin is the one I recom ;) in ubuntu you can install it by apt-get ;)


juju local openstack deploy - how to reduce the memory/number of lxc containers?

You don't need to use jitsu to deploy to specific machines.

juju help deploy

shows how to use the --to placement directive

Now to try to answer your other questions:

  Question 1: Will deploying to fewer containers require significantly less memory?

Yes.

  Question 2: Is it possible to host all openstack services in a single lxc container?

No I don't think so. The compute units I believe don't like being inside LXC themselves.

Also I think that the storage components don't like being in LXC containers either as they need access to the block device.

  Question 3: What is the minimum memory I need to deploy openstack? I'm only looking to create a demo environment for openstack so usage will be very low.

Not sure.

  Question 4: Is there a different way that I can reduce the guest memory requirements?

No, I think this is the best way.


Got stuck while updating to linux kernel 4.10.0-38

similar with me - got stuck while updating to linux kernel 4.10.0-38. When nothing happened for a long time I restarted the computer. But not even the restart was successfull, I could only restart in advanced mode, selecting the Ubuntu, with linux 4.8.0-36-generic option, (non of the linux 4.8.10 option led to a successfull restart.)

For me this helped:  askubuntu.com/questions/253244/reinstall-latest-kernel
 based on this I tried this:
sudo apt-get install --reinstall linux-image-generic linux-image-4.8.0-36-generic
It took time (0,5-1 hour) to install, but reboot was successfull afterwards.


Yes, you will need to disable Secure Boot in order to install specific drivers (due to kernel code-signing requirements). You could use custom signatures as well, though this does have the side effect of being a massive bloody pain.

As for malware... this one is a doozy. For all practical intents and purposes, Windows malware will not affect Linux significantly (if at all), unless run with wine, a virtual machine, or similar. Same goes for ransomware.

However, it's good to always understand the threats completely, and from every angle. It is theoretically possible for Windows malware to have specially-crafted portions for the explicit purpose of targeting Linux installations.

For example, a potential exploit path for a Windows/Linux virus contained within a .exe is Nautilus' EXE icon generation. In theory, a well-crafted malicious program could exploit this icon generator into running arbitrary code that would run and install some form of malware onto Linux. This combined with a few other exploits would allow for a full installation of malware onto your Linux machine without anyone even knowing. Such an exploit is more-or-less theoretical, but still a possibility. In order for this to work, the malware would have to be written with some awareness (and intent) to target Linux as well, even if its primary goal is to infect Windows computers.

The same principle can apply elsewhere, too. For example, a PDF that contains a malware bootstrapper could have Linux-specific instructions that are executed when you open your PDF. This already has been seen in the wild a couple times, so care is still advised.

As for ransomware. Linux is a pretty massive target for ransomware due to its nature and its widespread usage in large datacenters by major companies. Ransomware has already been seen in the wild for Linux, and this trend will only increase as time goes on.

It's important to remember that while Linux is more secure by default due to its multi-user design and isolation principles, it's not a replacement for anti-malware practices and common sense. You need to keep this in mind with any system and employ the standard common-sense principles of using a firewall, not clicking on weird links, and so on.


Destroy ssh tunnel if exists and create new one

Use a control socket

I just discovered what seems to be the most correct method from AutoSSH.

However Multiplexing is a very big subject and can be used for other things. Source

The idea in Bash script to setup... is to use and integrated method called Control Socket. Through this method you can command an old connection to die. However you will have to test if this will work even after a reboot.

What you are asking for:

Kill process on remote server

The tunnel is a process running on the remote machine. You can generate a script verifying that no previous instance of the tunnel is runnig.

Suppose that ssh -f -R XXXXX:localhost:YYYYY user@server -N is your original command. XXXXX stands for the port used on the remote server and YYYYY the port on your local machine.

Then you can check that no process is listening on port XXXXX on your remote server using lsof. However you will need to be able to use sudo in order to get the Process ID (pid) of the program listening on the port.

As soon as you find the pid using the port, you can just run at the server the command kill thePID.

Bash Script For getting the PID

The script bellow should should display the pid that is listening on XXXXX and save it on /tmp/remTunPID. If your user does not have sudo access it will not work, the PID will not be visible for security reasons.

Script:

#!/bin/bash
rPort=XXXXX
theUser=[replace with remote user name]
server=[replace with your server]
if [ -a /tmp/sshPID1 ]
   then
      rm /tmp/sshPID1
fi
if [ -a /tmp/sshPID2 ]
   then
      rm /tmp/sshPID2
fi
if [ -a /tmp/remTunPID ]
   then
      rm /tmp/remTunPID
fi
echo "Enter [sudo] password for ${theUser}:"
ssh -t $theUser@$server "sudo lsof -i tcp:${rPort} | grep  IPv4" > /tmp/sshPID1
while read -a A; do echo ${A[6]}; done < /tmp/sshPID1 > /tmp/sshPID2
cat /tmp/sshPID2 | grep -v pass | tee /tmp/remTunPID
if [ -s /tmp/remTunPID ]
   then
      thePID=$(cat /tmp/remTunPID)
      echo The process $thePID is running at $server listening to $rPort
   else
      echo No process is listening on $rPort at $server
fi

Change the values of rPort, theUser and server to the values of your remote port, remote user and server(domain or IP) respectively.

This command will prompt you for your sudo password in order to continue, but don't worry if you understand a bit of bash you can see that it is being requested directly by ssh with the -t option.

Actually Kill the Process

You could add a command to this script inside the if then else fi statement to kill the process:

if [ -s /tmp/remTunPID ]
   then
      thePID=$(cat /tmp/remTunPID)
      echo The process $thePID is running on $server and listening on $rPort
      echo Will attempt to kill $thePID
      ssh $theUser@$server "kill ${thePID}"
   else
      echo No process is listening on $rPort
fi

This should kill the process only if the port is being used. But it will kill the process even if your machine did not start the tunnel to begin with.

AutoSSH

AutoSSH seems to be a good tool to handle what you want to achieve. Maybe you should take a look.
SOURCE


Where are my Hard Drives/Local Disks on the COMPUTER/System Folder in Ubuntu 12.04?

If the disk are mounted, and you are just looking to where they are mounted, you can type:

mount

That will show you which device is mounted where.
If you want to see what drives are physically attached to your machine, but might not be mounted:

ls -al /dev | grep sd

The sd[abc...] files are your hdd's.


If I format Windows drives, will it affect Ubuntu (after I install Ubuntu alongside Windows10)?

The data is stored in a separate partition

You won't find the Ubuntu system data in Windows. They are in a separate partition completely hidden from Windows 10.

A drive, a hard disk drive (HDD) or a solid state drive (SSD) is a physical object. What Windows people call a drive, such as C:\ drive or D:\ drive are partitions.in either inside a single drive or in two separate drives.

Ubuntu (any Linux) uses a different partition naming scheme

Ubuntu uses /dev/sda1 or /dev/sda2 for two partitions on the same drive or /dev/sda1 or /dev/sdb1 for two partitions in two different drives. A default Ubuntu installation may use one or two partitions.

Windows 10 does not know anything about Ubuntu partitions

These partitions are formatted differently as compared with Windows partitions in a format called ext4. Windows cannot see partitions formatted this way. In a default Ubuntu installation a partition (it may be /dev/sda1, /dev/sda5 or /dev/sdb1 etc.) is mounted at the mount point /. To the user, the system partition is /. This is something similar to C:\ in Windows.

If you have C D E F partitions...

If you have a 1TB drive and 4 partitions C, D, E, F in Windows 10 each partition 250GB each, then you don't have any space to install Ubuntu. You will have to delete at least one of these partitions (not C, as you want Ubuntu along side Windows) or shrink one or more of them to make some unallocated space in your disk drive. Ubuntu installation will find that empty unallocated space and create the partition(s) it needs there.

After you install Ubuntu, formatting any of the Windows partitions C, D, etc. will not delete any data or system files in the Ubuntu partition /.

See Ubuntu Installation Root partition for more on the / partition.

See What is the meaning of the default directories in the Linux filesystem hierachy? for how the system files and personal data folders are structured within Ubuntu.

See What are the advantages and disadvantages of mounting various directories on separate partitions? for why one may mount various system folders as separate partitions.

Hope this helps


HP Elite Thunderbolt 3 Dock with HP Elite x2 1012

The problem was solved by disabling the dock security in BIOS (see comments).


No official flavor of Ubuntu supports 17.10 anymore. That said, look at System Settings > Removable Devices. This image is from Kubuntu 18.04:


You need to install two software packages to make the internet connectivity work consistently without breaking. They are wvdial and gnome-ppp (The front-end tool to configure wvdial).

1) Install wvdial package

Open terminal,(alt+ctrl+t) and type the following command

sudo apt-get install wvdial

2) Install gnome-ppp

sudo apt-get install gnome-ppp

3) Open gnome-ppp from the terminal.

sudo gnome-ppp

4)You have to enter your BSNL 10-digit mobile number in the Username & your password. Type *99# in the number row. Then press the Setup button below.

5) In the Setup window below, click the “Detect” button to identify the device ID of the USB port in which you have inserted your USB modem. The tool would automatically detect the Device, Type and Speed of your USB modem. Once it has deteced, please the “Close” button below.

Once this is done click on Connect!!!

You could also configure it through the terminal. This link should help you to configure it via terminal.

You could also try installing ixconn.you can get it here


Route all traffic (redirect-gateway) not working - OpenVPN

For anyone else with this problem, you most likely need to enable IP forwarding on the server as that will probably be off by default.

Put this in /etc/sysctl.conf:

net.ipv4.ip_forward = 1

And then run:

sysctl -p /etc/sysctl.conf

Now that takes care of your IP forwarding. If you're running a firewall (perhaps iptables) then you're probably going to want to get your NAT going so run this:

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

Put something like this into /etc/sysconfig/iptables to make it permanent:

*nat
:PREROUTING ACCEPT [0:0]
:OUTPUT ACCEPT
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
COMMIT

All going well your server is now forwarding your client VPN traffic. The next thing you're going to want to do is head your client browser over to whatismyipaddress.com to see that it's showing an Amazon address and then onto www.dnsleaktest.com and see how things are looking. If you're leaking out through Google you may want to consider running up a simple DNS caching server on your VPN server and point your client at that if anonymity is desired.

I hope that helps.


How do I install and reference QtLocation 5.0?

You are importing the library correctly, however I suspect you do not have the library installed in your system. You can check if you have the location library installed by running the command below in the terminal.

apt-cache policy qtdeclarative5-qtlocation-plugin

If you do not have it installed, you can install it by,

sudo apt-get install qtdeclarative5-qtlocation-plugin


ps aux|sort -k 4|tail -n 10

This will give you the ten highest memory using tasks. That will give you a clue where to look.


there is a far easier way. And as a pretty new User to Ubuntu, your should not install anything outside the package-manager.

JRE is already included in the Ubuntu packages. So for installing JRE, go to your Synaptic and look for these packages:

default-jre
default-jre-headless
gjc-4.8-jre-lib
icedtea-7-jre-jamvm
openjdk-7-jre
openjdk-7-jre-headless
openjdk-7-jre-zero

install these packages and JRE will be installed. And as a pretty new user, you should keep in mind: never ever install anything outside the package-managerSynaptic. The other save alternative to install software, is the Ubuntu Softwarecenter.

This is already installed by default and you can find it in your menue.


The solution in this page should work for you. At the bottom it shows you how to make it permanent -> Set Resolution ->

Let me know if it works for you, I know it is for 11.10 but it should work for your current version as well.


Problem with dual monitors and resolution

First save any work in case your screen turns off and won't turn on without restarting.  What I am going to suggest is temporary to begin with; you can make it permanent if it works.

Go to the terminal and run cvt 1920 1080 60.

This will output a string of text or two.  The last one should start with the word Modeline.  Copy from the first text after Modeline which should be "1920x1080_60.00" [...] to the end of the line (should end with [...] +vsync.

Then type in xrandr --newmode  and paste what you copied.

Then type in xrandr --addmode DVI-I-1 "1920x1080_60.00"

Then type in xrandr --output DVI-I-1 --mode "1920x1080_60.00".

To make it permanent:

If this works, create or edit the file ~/.xprofile and add the last three commands that you typed in into it.


You can use some less powerful DE's such as

Xubuntu/XFCE

Xubuntu is lightweight and contains a basic set of applications, Looks similar to gnome-panel .To install it

sudo apt-get install xubuntu-desktop

Lubuntu/LXDE

Lubuntu is very lightweight and is very basic. Resembles gnome-panel . To install it

sudo apt-get install lubuntu-desktop


Where can I find the icon for System Settings on the top bar?

The icon is system-shutdown-panel from the icon theme. The default theme is Humanity.


How to connect to free Starbucks wifi via command-line?

you can use iwconfig. I have done it with wep. normally this is enough

iwconfig ethX essid ESSID key open XXXXXXXXXX

and then call the dhcp client with dhclient3 ethx

I'm doing this from memory. But check the manual of iwconfig for more info

man iwconfig


Probably is the problem with libgcrypt11 Try to upgrade or rool back version of libgcrypt11.

Curent version of libgcrypt11 you can see with command

dpkg -s libgcrypt11


Can I hear sound with two output devices at the same time?

Yes, you can. To do so you can connect your headphones to the front panel audio jack and tv-speakers to the back panel of your PC.


ldd started to show me “not a dynamic executable”

Bug 1616609, ldd reports incorrectly "not a dynamic executable" when the executable's loader is not present , is probably the cause of the problem (as steeldriver suggested).  Reinstall the libc6-x32 package to get it back.  Do consider adding yourself to the bug, maybe it'll be fixed one day -- a patch is even suggested.


open system-monitor. got to Resources tab. here you can see network, processor, memory uses status. install the following applet witch show status on gnome-panel

https://launchpadlibrarian.net/72652905/indicator-multiload_0.1.orig.tar.gz

install: first cd to folder after extract file

sudo make
sudo make install


Can't login after adding script to /etc/profile.d

Stuff in /etc/profile.d is probably sourced by your window manager when you log in, and that probably uses /bin/sh, so target a POSIX shell, not bash, for scripts to be added there. Note that [[ is not found in the scripts that are in there now.

So,

choose [ ... ] over [[ ... ]]
use funcname() { ... } without the function keyword

dash is a POSIX (only) shell, so you might find the dash man page handy

Comments on http://pastebin.com/71XzaBk6

This is the primary error: Change

if [[ ! -f ~/.gtk-bookmarks ]]

to

 if [ ! -f ~/.gtk-bookmarks ]

the find_server_by_ip function can be simplified:

findserverbyip() {
    case "$(hostname -I)" in
        *[0-9].33.9.[0-9]*) share_server=serverB ;;
        *)                  share_server=serverA ;;
    esac
}

Also, this comment is misleading: the function returns nothing, it has a side effect.

# Return : echo Server to use

might as well remove the shebang line: this script doesn't get executed, it gets sourced.


Ubuntu 16.04, pbis, authentication token manipulation problem

After a lot of headache, research, reading, trial and error finally I have a solution for this problem.
Reading through the PBIS guides I found command

domainjoin-cli leave <user>

At the end it was that simple (like always when knowing). After I left the domain this way everything worked again as expected and I was able to use and change all my accounts and passwords.
I restarted, joined the domain again and everything works like a charm.
Unfortunately I don't know what exactly happens there, restarting the whole machine did not change anything, I had to leave explicitly.
I can only guess that some cache data was deleted that caused this weird problem.

I hope this can help anyone preventing time waste and headache.


How can I install Ubuntu in dual-boot with Windows on a ASUS S200E with UEFI?

According to http://paste.ubuntu.com/1361562/ , Boot-Repair has successfully setup your boot in UEFI mode.

Boot-Repair never (cannot) touches files related to login, so the "invalid password" error is due to something else.
Eg, if your password contains numbers or special character, try to type it with CapsLock enabled/disabled.


Wi-Fi drops or doesn't comment some times (AP-independent)

This is not a permanent solution. But you can try this on your temporary solution. Put your lap on standby or hibernate mode, than open it again it will connect and working fine.

I know this is not a permanent solution.  but it may help you for temporary recovery.  So please don't Vote it down.


According to your issue you had to disable unstable ppa/repos as instructed here

Then open a terminal and run:

sudo apt-get remove --purge vlc-nox
sudo apt-get autoclean
sudo dpkg --configure -a
sudo apt-get -f install
sudo apt-get autoremove
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install vlc

If you want to use more fresh version of VLC media player rather than in official Ubuntu repos, you can use Videolan official stable-daily PPA:

sudo add-apt-repository ppa:videolan/stable-daily
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install vlc

Addition:

Just for the others who face an issue upgrading vlc to 2.2.0 on 14.04LTS even occured to me with ppa:videolan/stable-daily it still had 2.1.6 version installed. To upgrade it to 2.2.0 version add this trusty-media PPA:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install --reinstall vlc

P.S.

Do remember this ppa contains also other media updates to see what exactly will be changed if you run an upgrade check with this command:

cat /var/lib/apt/lists/ppa.launchpad.net_mc3man_trusty-media_*_Packages | grep "Package:" | sort | uniq

If you want to purge it after you have installed vlc then:

sudo ppa-purge ppa:mc3man/trusty-media
sudo apt-get update


Setting up an extendable software raid 0 in Ubuntu

You have a lot of questions there :)
I'm going to try and answer (or suggest a trail of thought) for the following:

Is there a software raid option that will let me add drives to the array as i add then to my system without losing the data which will always be on the existing array. The new drives so always be empty.
Also, if there is such a software array option, would it be more efficient to add the second batch of 4 drives at once, or 1 at a time.

From what I can see in the mdadm (Linux Software RAID utility) man pages  the following applies:

From 2.6.35, the Linux Kernel is able to convert a RAID0 in to a RAID4 or RAID5. mdadm uses this functionality and the ability to add devices to a RAID4 to allow devices to be added to a RAID0. When requested to do this, mdadm will convert the RAID0 to a RAID4, add the necessary disks and make the reshape happen, and then convert the RAID4 back to RAID0.

Perhaps also have a look at this link for a fairly good "guide to mdadm"
I would suggest adding all the extra drives at once. Otherwise you will have to re-do the process 4 times and from past experience I know that any RAID changes can take a significant amount of time.


Lubuntu 14.04: how to avoid lock screen on closing laptop lid?

You're on the right track with logind.conf, but you only need to change this line from the default configuration:

HandleLidSwitch=ignore

(i.e. you don't need LidSwitchIgnoreInhibited=no).

In addition, you need to configure xfce4-power-manager to handle the lid switch. I found that the reliable way was to Quit it from the power manager icon menu before configuring it with

$ xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true

You'll then need to restart (unless there's another way to get logind to pick up its configuration, in which case I'd love to hear it!).

After this, the lid switch should operate according to the settings in the power manager.

I found this solution thanks to a comment on a bug linked by a helpful person in #xubuntu.

Note that this breaks screen locking on suspend.


How do I force Ubuntu to resynchronize the system time?

ntpdate is in the ntpdate package, which you could install via sudo apt install ntpdate. Then read man ntpdate.
As mentioned in the comments, one needs to install the package ntp instead of ntpdate in Ubuntu 18.04+.
Remember to tell ntp to stop before running ntpdate:
sudo /etc/init.d/ntp stop

and start ntp afterwards:
sudo /etc/init.d/ntp start


Signing up for Ubuntu One--it says "Please verify your email."

I think it means you need to go check that email address and click a link in the email you just got from Ubuntu One.


Creating Backup System Image of Bootable USB

Boot Live USB, plug in Source USB.

Open Gnome-Disks

Select the disk you wish to backup on the left.

Select the icon that looks like a stack of pancakes upper right.

Click "Create Disk Image" and enter a location where to save the image.

Use the pancake icon when you want to restore or clone the image to another drive.


Can't exec “locale”: No such file or directory

I read an article and followed the instruction, My problem is fixed so you must read it -   http://itsfoss.com/fix-exec-locale-file-directory/


Tool to list USB devices as tree in shell?

lsusb -t

This also shows the current speed, so you can see e. g. keybaord and mouse with 12 Mbps.


Short key for moving windows between monitors?

Yes, you can use the keyboard shortcut Super + Shift + Left/Right.


Upgrading ubuntu lead to a new, broken version, but the old one still runs

Lots of problems appearing after upgrades. Maybe try this:

Backup any files you have in the Ubuntu to a USB drive.
Enter Windows 7 and  uninstall ubuntu. From how you described your setup, this will probably remove both installations of Ubuntu.
Restart Windows, then use Wubi to install a fresh copy of 11.10.

Did this exact procedure earlier today. No more post-upgrade problems. Direct install seems to be the most trouble-free.

Does that help?


Where can I find the mon-* set of Amazon CloudWatch tools?

Many of the aws tools from amazon have made it into the Ubuntu archive.  Others have made it into the 'awstools-dev' ppa at

https://launchpad.net/~awstools-dev/+archive/awstools .

Neither of those have cloudwatch tools yet. These can easily be packaged.  If you're interested, I'm sure there are some people that would help you get started.


DHCP Server (v4_4_2) from sources fails to start

Missing configuration property. Please add --enable-paranoia to the configure flags.
./configure --enable-paranoia
            --prefix=/usr                                           \
            --sysconfdir=/etc/dhcp                                  \
            --localstatedir=/var                                    \
            --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases        \
            --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases      \
            --with-cli-lease-file=/var/lib/dhclient/dhclient.leases \
            --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases


I am Sure that You have the same problem as me
"Problem with GRUB"
GRUB2 is what is reqiured for the prompt at boot time .
I do not know how to fix it but you can pursue it to get a better responseto repair your computer


Permission denied apache even after chmod

Try:

sudo chmod -R 0644 /var/www

(if your apache configuration is like that)
Note: The last time I did this is about 1 year ago and I may have changed but I´m pretty sure that the options must be written before the mode.


It transpires that the unlock code is,

'0000', zero,zero,zero,zero

as is shown when creating an emulator using the terminal as shown in this article from David Planella,

http://www.slideshare.net/DavidPlanella/ubuntu-html5-apps-deep-dive?next_slideshow=1.


The graphical installer will ask you what to do. Among those options is to replace your existing Ubuntu installation. I think it'll even keep your files. As always, though, it is a good idea to have backups when you're doing things like that. But I think you should figure it out if you just boot 11.10 graphical installer.


Why am I unable to allocate more free space to the root file system?

Note: If you've got a recent UEFI computer, your SSDs/HDD should be in GPT format.

Note: From Windows, download Samsung Magician from here, and check the firmware in your Samsung SSDs.

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or lose data.

Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition
a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor
a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor
if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)
you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...

Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB, in “Try Ubuntu” mode
start gparted
move /dev/sda6 partition all the way right
resize /dev/sda5 right side all the way right
click the Apply icon


What's the best way to add a directory to LD_LIBRARY_PATH?

If you want this to be system-wide, you can add the directory to the ld.so configuration. This will make the dynamic linker always check that directory when looking for libraries to load.

To do this, just add a file in /etc/ld.so.conf.d/ (it should end in .conf), containing the full path of the directory.


How to remove Google virtual mount drive from Ubuntu 16.04?

Just like you, I tried this feature in Ubuntu 16.04. I thought it was nice but didn't want to use google-drive that way... then I was mildly annoyed by the fact that not even removing my google account and changing the settings on Online Accounts worked. I couldn't find the Files switch.

So I found this workaround, I hope this helps somebody.
Locate the file:

~/.config/goa-1.0/accounts.conf

and edit it. You'll see some blocks of text representing the same settings you could find on the Online Accounts menu shown by @nvelosa.

Find the flag Files enabled=true under the desired google account and change it to false.

In my case I immediately saw nautilus file explorer hiding the shortcut and finding myself annoyed no more.


Which APT repositories is required on Ubuntu 18.04

There are four main repository which you need to ensure you get the most of Ubuntu packages, it is.

  The "Ubuntu Software" tab displays a list of repositories or "Channels". The four main repositories are:

Main - Canonical-supported free and open-source software.

Universe - Community-maintained free and open-source software.

Restricted - Proprietary drivers for devices.

Multiverse - Software restricted by copyright or legal issues.

  For a detailed description of these repositories, see Repositories.

Considering you are upgraded from Xenial to Bionic, the repositories you own must have listed as Xenial version, you can simply all occurance of Xenial to Bionic.

sudo sed -i "s/xenial/bionic/g" /etc/apt/sources.list
sudo apt update

Also, creating a brand new source list may help. This will rename the old source list to sources.list.bak (in which you can return anytime), and create new sources.list—fill them with four main Bionic repository.

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
echo "deb http://archive.ubuntu.com/ubuntu bionic main restricted multiverse universe" | sudo tee -a /etc/apt/sources.list
sudo apt update


I accidentally deleted all bootloaders (Windows Boot Manager and GRUB)

Repair restore and reinstall grub 2 with a Ubuntu installation USB or DVD disk.

Boot from Ubuntu installation DVD or USB drive and choose 'Try Ubuntu without installing'.
Find the partitions of your Ubuntu Installation. If you are not sure which one, launch GParted (included in the Ubuntu installation DVD or USB)
or.
Open a terminal (Ctrl+Alt+T) and use the following command:

sudo fdisk -l

and find out the partitions.

sudo mount /dev/sdXX /mnt

XX being the partition where Ubuntu is installed.

for example: sudo mount /dev/sda1 /mnt.

If there is a separate boot partition.

sudo mount /dev/sdXY /mnt

XY being the boot partition

for efi boot.

sudo mount /dev/sdXZ /mnt/boot/efi

XZ being the efi partition.

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

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

Now we go to that using chroot.

sudo chroot /mnt

Now install, check, and update grub.

echo "nameserver 8.8.8.8" >/etc/resolv.conf
apt install grub-pc grub-common

This time you only need to add the drive letter (usually a) to replace X, for example:
for Legacy/BIOS boot:

grub-install --force /dev/sdX

for efi boot:

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

then

update-grub

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

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

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

for more see this link.

Windows is likely to be found by grub if not see here or  here

In such a case you may have to repeat the whole process of  Repair restore and reinstall grub 2 with a ubuntu live cd.


Keyboard very slow on Ubuntu 20.04 and 20.10 Gnome

Solved
......for CHERRY MX BOARD 3.0S
The problem has come while the Keyboard was connected to Windows 10 with the CHERRY gaming software. I don't know why this connection was a problem only for Ubuntu, but a reset to the keyboards original delivery state has help and the keyboard works very fine again.
OS: Ubuntu 20.04
Resetting CHERRY MX BOARD 3.0S to its original delivery state:
Press and hold the FN button and pause button for 5 seconds. The original delivery state is restored.


Blank screen after installing AMD driver's Ubuntu 20.04

The root of this problem is that, quite simply, the drivers aren't working properly. There can be all sorts of reasons for this, but the way to fix this is to remove the proprietary drivers and rely on the open source drivers.
As you're unable to get into the system the normal way, you'll have to use the recovery mode.
First, reboot the computer. While the computer is still booting, just as the BIOS screen is ending (some timing is required here) press SHIFT or ESC.
This will bring up a GRUB option screen. On that screen, select Advanced Options and press ENTER. Follow this by selecting (with the arrow keys) recovery mode and press ENTER again.
This will bring up a new screen and you'll select root and press ENTER once more. This will put you at a login prompt where you'll login with your username and password.
Note: When you type your password, nothing will appear on the screen - not even asterisks. This is the normal behavior and the expected behavior.
Once you have logged in, you'll uninstall your drivers. You'll run:
amdgpu-pro-uninstall

Followed by ENTER.
When that's completed, you can go right ahead and reboot.
sudo reboot

Again, press ENTER.
Rebooting should bring you back to the OS pre-driver installation. After doing this, you can wait until the next version of AMD drivers are released, install them anew, and see if they work properly. In the interim, you can see (see here) if xrandr will help you get the resolution you are aiming for.


mount requires using sudo and supplying proper settings for mounting. What I suggest is that you use udisksctl mount -b /dev/sdXY, where X is letter of your drive and Y is the partition number. It will be mounted automatically to /media directory, the exact mountpoint will be printed to the screen (stdout).

Sample process from my system:

1) Determine the  partition letter and number with sudo blkid or sudo lsblk -f

xieerqi:$ sudo blkid
[sudo] password for xieerqi:
/dev/sda1: UUID="86df21bf-d95f-435c-9292-273bdbcba056" TYPE="ext4"
/dev/sdb1: LABEL="System" UUID="F4F688B2F68876A0" TYPE="ntfs"
/dev/sdb2: LABEL="TI105866W0A" UUID="4EBAAE53BAAE36FD" TYPE="ntfs"
/dev/sdb3: LABEL="HDDRECOVERY" UUID="BC4ED40D4ED3BDF8" TYPE="ntfs"
/dev/sdb5: UUID="0ca7543a-5463-4a07-8bbe-233a7b0bd625" TYPE="ext4"
/dev/sdb6: UUID="3a6e2270-19a2-49d7-aab3-5efb92d3b3d0" TYPE="swap"
/dev/sdc1: UUID="6A32C4555E1C5B4D" TYPE="ntfs"
/dev/sdd1: UUID="BA02-AF80" TYPE="vfat"

2) Run the udisksctl mount -b /dev/sdXY command to mount your desired partition.

xieerqi:$ udisksctl mount -b /dev/sdb2
Mounted /dev/sdb2 at /media/xieerqi/TI105866W0A.

3) Navigate to the mount point with cd /media/user/mountpoint or use GUI file manager.

4) When done, unmount the partition.

$ udisksctl unmount -b /dev/sdb2
Unmounted /dev/sdb2.


I assume you are using the hard drive of your old computer in your new computer. So you're trying to boot from 12.04 live CD and and you're old 10.10 boots up? Obviously the computer did not boot from CD, it probably did not recognise the CD. Try creating a bootable USB stick with the boot media creator or unetbootin, there may probably be issues with your optical drive or the medium used for burning.

You're seeing that virtual terminal because the new system needs another graphics driver than the currently installed one. Is there a specific reason why you're using the old drive? It would be much simpler using the new drive, installing 12.04 on that and copying the files from your old home directory to the new one.


You should find (at least partial) solutions using Gnome-shell extensions
I'm using Multiple Monitor Panels, other interresting features available in Multi Monitors Add-On


How do I install Peazip? [dependencies not satisfiable]

The GTK version complains about dependency problems.
Try to install the QT version of 32 bits from Peazip. It installs fine.


Is it a good idea to switch Ubuntu flavours by apt removing the original one and apt installing a new one?

Problem: 'I installed Lubuntu, but only because that was the only Ubuntu flavour that I could put on my USB I had at the time.'

There are workarounds for this problem: If you only have a small USB pendrive or a CD drive (not DVD), most [or all] Ubuntu and Ubuntu community flavour iso files might be too big.

Use an Ubuntu mini.iso if you can boot in BIOS mode (alias CSM alias legacy mode).
Use an Ubuntu Server iso file and and avoid installing server packages. The 64-bit server iso file makes a boot drive that can boot both in UEFI and BIOS mode.

If there are still problems (for example with the graphics of the installer in UEFI mode), you can try a compressed image file according to this link.

In both cases the iso files are smaller than the iso files with graphical desktop environments (standard Ubuntu desktop and the community flavours Kubuntu, Lubuntu, ... Xubuntu).

The mini.iso file sizes are very small, typically around 60 MB,
the Ubuntu Server iso files sizes are less than 1 GB (as are most of the Lubuntu iso file sizes),
the sizes of the other iso files with graphical desktop environments are between 1 GB and 2 GB (typically smaller than or around 1.5 GB).

You can select xubuntu-desktop during the installation, or install it afterwards, when you have booted into the text mode interface, and then you will get Xubuntu.


So right after posting this I did the partitions one at a time instead of in a group and it worked with out any issues. I guess the issue is trying to execute multiple partitions in the process, doesn't work all that well.


"Error creating directory: Input/output error" in Lubuntu, and in Ubuntu

It is likely the permissions are not set correctly, so you won't have write access, especially if this is an NTFS partition. If the partitions are automatically mounted, they may be set to the uid/gid of the automounter's process (I don't have lubuntu but I suspect it is not your primary user).

For NTFS in particular, take a look at man ntfs-3g (online here) for the "uid=" and "gid=" options.

If you can open a terminal and cd to the problem partition, you can check ls -la and compare to the working ones (1st column shows permissions, 3rd and 4th columns of output are the user and group id respectively -- it may give you a hint about what is different between the partitions).


Default settings ?

At here, Kubuntu 13.10 - ffmpeg 2.1.4

The default, at here, is the PulseAudion Control: 'Built-in Audio Analog Stereo' and the capture doesn't have the sound.

I need to change the Alsa Capture to the Monitor of Built-in Audio Analog Stereo. Then the capture has the sound.

The drill at here:

a) Start the pavucontrol

The PulseAudio Volume Control or pavucontrol is:

:~$ apt-cache show pavucontrol

Package: pavucontrol

Priority: optional

Section: universe/sound
...

Description: PulseAudio Volume Control

 PulseAudio, previously known as Polypaudio, is a sound server for POSIX and
 WIN32 systems. It is a drop in replacement for the ESD sound server with
 much better latency, mixing/re-sampling quality and overall architecture.
 .
 PulseAudio Volume Control (pavucontrol) is a simple GTK+ based volume
 control tool (mixer) for the PulseAudio sound server. In contrast to
 classic mixer tools this one allows you to control both the volume of
 hardware devices and of each playback stream separately. It also allows
 you to redirect a playback stream to another output device without
 interrupting playback.

Homepage: http://0pointer.de/lennart/projects/pavucontrol/

b) Start the ffmpeg script

c) Pick a sound source

At here the pavucontrol has options:


For https://www.onenote.com/

Broken: Ubuntu 17.10 (Daily) + Firefox 55.0.2
Works : Ubuntu 17.10 (Daily) + Konqueror 5.0.97
Works : Ubuntu 17.10 (Daily) + Firefox
55.0.2 + user-agent switcher set to Windows and Chrome.

There are loads of switchers, but this is the one I used:

https://mybrowseraddon.com/useragent-switcher.html?v=0.1.9&type=install


How can I enable/disable Dash online results programmatically?

You can use dconf-editor to change this setting.  It's under:

com -> canonical -> unity -> lenses

and is called remote-content-search. As far as I know there are only two options none and all.  When set to all the slider is set to "On" in system settings and when it is set to none the slider is at the "Off" position.

You can change this via the terminal using gsettings.

gsettings set com.canonical.Unity.Lenses remote-content-search all

Will turn it on while:

gsettings set com.canonical.Unity.Lenses remote-content-search none

will set it to "Off".

Gsettings comes by default in Ubuntu and you can install dconf with:

sudo apt-get install dconf-tools

You don't need dconf to use gsettings.


Why is the automatic login disabled for users with encrypted home?

The problem is that your password is required to unwrap the mount passphrase used to decrypt the eCryptfs home directory. Without that, it's not possible; the system doesn't have the encryption key yet.

These login styles are mutually exclusive; you can either automatically log in (thereby letting anyone with physical access to your computer be able to access your data), or you can encrypt your home directory (keeping things encrypted and safe from access without a passphrase), but not both.


Why doesn't using two cd commands in bash script execute the second command?

The culprits are your exec bash statements in some of your functions.
The exec statement is a bit weird and not easily understood in the first place.
It means: execute the following command instead of the currently running
command/shell/script from here on. That is: it replaces the current shell
script (in your case) with an instance of bash and it never returns.

You can try this out with a shell and issue

exec sleep 5

This will replace your current shell (the bash) with the command sleep 5
and when that command returns (after 5 seconds) your window will close because
the shell has been replaced with sleep 5.

Same with your script: If you put exec something into your script, the script
gets replaced with something and when that something stops execution, the
whole script stops.

Simply dropping the exec bash statements should do.