How can I add packages, repositories, and users to all nodes?

There is no easy way to do this via MAAS.

MAAS's purpose is to prepare just a plain, freshly installed node for you to then customise further. It will place your SSH public key on the node so that you can access it... then it's yours to do with as you wish.

MAAS is intentionally fairly lean. It was created mainly as a machine provider for Juju, but its API can be used by any application. (Juju does not get special treatment from MAAS. It's the other way round: we enhanced Juju to understand MAAS.)


You probably need to define mime-type for flash

Somebody solved it => Solution


Ubuntu comes with Transmission, a fairly simple torrent client. But I prefer Deluge as it is more feature-rich.

You can install software from the Software Center app (by Ubuntu) or just Software (by Gnome). Just open one of these, search for the app and click install.


How do I get Adobe Reader to work in Ubuntu 14.04?

As of February 2015, the only solution that worked for me is the following:

sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install acroread

I found it here: http://ubuntuhandbook.org/index.php/2014/10/install-adobe-reader-ubuntu-14-10/

I tried all other solutions I had found by googling, and none of them worked for an updated install of Ubuntu 14.04.1.

To make it work well with Nautilus, run:

sudo -e /usr/share/applications/acroread.desktop

then fix the Exec line to Exec=acroread %u.
(If the editor is nano, type Ctrl+O, <enter> to save, then Ctrl+X to exit.
Finally, nautilus -q to restart.)

Important: Please test it with a fresh install of Ubuntu 14.04.1, from a newly-created user account, after installing all the updates.


version upgrade from 14.04 to 14.10 / Ubuntu tutorial for beginners

The commands you posted above are not enough to change to a newer release of the distro.
The recommended command to move to a new release is:

sudo do-release-upgrade

This should start the process of downloading and installing the new release version, however it will only move to a stable release. If the release you want to move to is still classed as in the development stage, you'll need to append the -d option.

If you want to check which version is currently installed on your system use:

lsb_release -a

This will produce a 5 line output, detailing which exact version of Ubuntu you're using, don't panic when the output starts with the line 'No LSB modules are available', that's perfectly normal.

So your best move is to use the lsb command first to check what version you're on, then if it still says 14.04, issue the do-release-upgrade command. Hope that helps!


Check you i3 config file:
# start dmenu (a program launcher)
bindsym Mod1+d exec dmenu_run
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# bindsym Mod1+d exec --no-startup-id i3-dmenu-desktop

By default it's using dmenu_run which will list only programs in user's $PATH. If you want it to display applications defined in .desktop files you need to use i3-dmenu-desktop.


Why is metacity still my display manager instead of awesome?

I found the answer. Turns out notify-osd has a bug as described here. It does not have a .desktop launcher. Removing notify-osd from my session caused awesome to load properly. I found these errors in ~/.xsession-errors.


All Wi Fi networks disappears once I manually disconnect a network

I have the same problem, I'm running 17.04 (4.10.0-33-generic #37) on a Dell XPS13:

3a:00.0 Network controller: Intel Corporation Wireless 8265 / 8275 (rev 78)

WiFi networks reappear after I restart the Network Manager

# service network-manager restart

Advice is welcome.


As one-liner

$ for file in * ; do echo  "$file" "$(basename $file | base64 )"."${file##*.}" ; done
file1.png ZmlsZTEucG5nCg==.png
file2.jpeg ZmlsZTIuanBlZwo=.jpeg
file3.txt ZmlsZTMudHh0Cg==.txt

Replace first echo  with mv to actually rename them


Central data storage for apps in Software Center

For licenses, you will want to use the license key mechanism built into Oneiric and the http://myapps.developer.ubuntu.com application submission portal.

I think you answered your own question as you want to store user space configuration settings to ~/.<somedir> or ~/.config/<somedir> - following the XDG standards would be suggested.


Samba - Network transfers from one share to another... local or LAN based?

am I inadvertently caching the files on my desktop before they're
  moving to the other directory?

Yes, you are.

  I suppose if I want to move files locally without any LAN-oriented
  transfer interaction with my desktop, I'd be better off SSH'ing in and
  simply mv'ing everything I want. Eh?

That is precisely how to move things like this.


Can only search social network messages in the Dash after 13.10 upgrade

Running the following command solved the problem for me:

sudo apt-get install unity-scope-home


netplan isnt being applied and i am not getting an error message when i try to apply it

Connect via Ethernet and install wpasupplicant and net-tools.
sudo apt update
sudo apt install wpasupplicant net-tools
Use this .yaml file... use the EXACT same spacing, indentation, and no tabs...
network:
  version: 2
  renderer: networkd
  ethernets:
    enp1s0:
      dhcp4: true
      optional: true
  wifis:
    wlo1:
      dhcp4: true
      access-points:
        "access point name here":
          password: "password here"

sudo netplan generate
sudo netplan apply
reboot


The MacBook 2,1 has a 2.1 audio speakers (Left & Right speakers, and a Base).
By default the speakers are not setup properly, so the audio unbalanced. This guide will help setup a new audio profile for the speakers so the audio will sound properly.

Edit ALSA cofig file and add the new profile

sudo gedit /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf

Find the following code in the config file

[Mapping analog-stereo]
device-strings = front:%f hw:%f
<omitted code>
priority = 10

Add the following section after the code above

[Mapping analog-surround-21]
device-strings = surround40:%f
channel-map = front-left,front-right,lfe,lfe
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker
priority = 7
direction = output

Restart the audio (the first part kills pulseaudio, the second reloads ALSA)

pulseaudio -k && sudo alsa force-reload

Next you need to switch to the 2.1 audio profile, you can do this by clicking on the audio indicator in the top right, then “Sound Settings...”. In the new window look for “Mode:” setting and click on the dropdown, then click on “Analog Surround 2.1 Output”.


Convert files between DOS and Linux formats

I would firstly ask your system what type of file it's recognized as, ie. file PROJECT.TXT to ensure it's recognized as TEXT or something else.

guiverc@d960-ubu2:~$   file lshw_dx6120.txt
lshw_dx6120.txt: ASCII text

Your result from that was it responded DATA.

That result would imply to me it's not text then, and you need to peruse the file and work out what type of data file it is

a variation of TXT used by some programs, eg. RTF
is format of file detectable? commonly

a header record
followed by numerous fixed fields?
OR variable length fields with markers?
with any indexes

Data files are not DOS or LINUX specific; but program specific.

I'd probably resort to writing a conversion routine in perl in your position, but detection of the format needs to be done first. I don't see it as a DOS file (DOS to me represents text with specific EOL markers; it's a specific but unspecified program data file).

If it was text, I'd use dos2unix just as in @waltinator's answer.

Looking I found a really old (if 1987 is old) DOS file

guiverc@d960-ubu2:~$   ls -lh /de2900/lan/ws2000/README.TXT
-rwxrwxrwx 1 guiverc 600 86K Nov 20  1987 /de2900/lan/ws2000/README.TXT
guiverc@d960-ubu2:~$   file /de2900/lan/ws2000/*.TXT
/de2900/lan/ws2000/README.TXT: data

Viewing the file (using view) it looks TEXT to me missing only EOL (end-of-line) characters using a ^M (CR) only. I'd use dos2unix on that file and expect good results, but what I would do would very much depend on what I saw in the file, and my interpretation of what format file I believe it is. (if it fails, I can always try again with something else; as I'd convert to a new file only!)

I copied the old README.TXT file to ~, then tried dos2unix and it reported errant ^B chars

guiverc@d960-ubu2:~$   dos2unix README.TXT
dos2unix: Binary symbol 0x02 found at line 2
dos2unix: Skipping binary file README.TXT

I forced it

guiverc@d960-ubu2:~$   dos2unix -f README.TXT
dos2unix: converting file README.TXT to Unix format...

On closer examination, the README.TXT file in my case is NOT text, but a wordstar 2000 file with text extension.   The file reported it being data, and it was correct.  The dos2unix only converted line-breaks which isn't the only issue.


after update updated to 16.04 Unable to open desktop

You've got a capitalisation error.  The command you're looking for is:

sudo apt install ubuntu-desktop


If you already downloaded the .deb package, just click it and the installation will start. Alternatively do in a terminal:

sudo dpkg -i opera-stable_47.0.2631.55_amd64.deb

They way you wanted to do it of course also works, but you forgot the first step. However, this is totally unnecessary if you install the .deb package directly, as it will add the repository automatically.

add the repository:

sudo add-apt-repository 'deb https://deb.opera.com/opera-stable/ stable non-free'

add the key:

wget -qO- https://deb.opera.com/archive.key | sudo apt-key add -

update your sources:

sudo apt update

install the package:

sudo apt install opera-stable


Are any Ubuntu (Linux) vulnerabilities in media applications?

Yes, this is entirely plausible. The simple way to prevent this is to adhere to the principle of least privilege and to only run programs with elevated permissions only when it's required. For example, you would need to do this for managing user and group accounts, but this should never be done for running media apps such as VLC.


Ubuntu CD Installation Stuck on Purple Loading Screen

the disk might not be invalid , but depending on the state of the disk and or the state of the drive , it might not load properly which is a real pain when it comes to live cds. Try booting from another medium it should atleast boot to a desktop


Output redirection to a file, used inside script, is not working when executed from crontab

logs/testpad1.log will behave differently depending on your current directory. It can also behave differently depending if cron is running as root or you are calling the script from your terminal.

The safe (and usually error correcting) thing to do is hard code the full path into the file name:

/home/me/scripts/logs/testpad1.log
/var/log/testpad1.log


Lubuntu: How to add Thunderbird as system startup application?

According to http://wiki.lxde.org/en/LXSession you can:

add @thunderbird in /etc/xdg/lxsession//autostart file

OR

do what you did and delete the "OnlyShowIn= line in the thunderbird.desktop file in your ~/.config/autostart (in my file it's the last line).
Cheers,


Setting the PATH so it applies to all users, including root/sudo

Update:

Setting global environment variables should still be performed in /etc/environment, but as you pointed out, using sudo -s has the effect of these variables are "vanished".

The reason for that is sudo has a policy of resetting the Environment and setting a secure path. It is enabled by default:

/etc/sudoers:

Defaults  env_reset
Defaults  secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

Thus whatever is set in the /etc/environment for the path is overridden by sudo.

The manual page for sudoers states:

   env_reset       If set, sudo will reset the environment to only contain
                   the LOGNAME, MAIL, SHELL, USER, USERNAME and the SUDO_*
                   variables.  Any variables in the caller's environment
                   that match the env_keep and env_check lists are then
                   added.  The default contents of the env_keep and
                   env_check lists are displayed when sudo is run by root
                   with the -V option.  If the secure_path option is set,
                   its value will be used for the PATH environment
                   variable.  This flag is on by default.

As a workaround, you can use sudo su that will provide a shell with root privileges but containing the right PATH.

Original Answer

You should set it in /etc/environment.

Try sudo YOUR_TEXT_EDITOR /etc/environment (make sure to create a backup first).

For more information: EnvironmentVariables

  System-wide environment variables

  Environment variable settings that affect the system as a whole
  (rather then just a particular user) should not be placed in any of
  the many system-level scripts that get executed when the system or the
  desktop session are loaded, but into

  /etc/environment - This file is specifically meant for system-wide environment variable settings. It is not a script file, but rather
  consists of assignment expressions, one per line. Specifically, this
  file stores the system-wide locale and path settings.

  Not recommended:

  /etc/profile - This file gets executed whenever a bash login shell is entered (e.g. when logging in from the console or over ssh), as
  well as by the DisplayManager when the desktop session loads. This is
  probably the file you will get referred to when asking veteran UNIX
  system administrators about environment variables. In Ubuntu, however,
  this file does little more then invoke the /etc/bash.bashrc file.

  /etc/bash.bashrc - This is the system-wide version of the ~/.bashrc file. Ubuntu is configured by default to execute this file
  whenever a user enters a shell or the desktop environment.


How to launch GNOME Shell Extension Preferences from the Main Menu?

You can use alacarte  to create a Main menu entry.

Just add gnome-shell-extension-prefs in the relevant command field and you should have it in the Main Menu.


Drivers to screen, audio, keyboard/mouse

You shouldn't need to install drivers for the hardware you have listed.  It is possible if you are using a wireless card that you would need to install drivers for it.  Your graphics card is supported by an open source driver that lacks 3D support.  To get 3D support, you will have to install the nvidia drivers.  The details can be found in the help pages:  https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia


I figured it out eventually. I got it to pop up in Rhythmbox by unmounting and remounting from the disk utility, but when I clicked on it Rhythmbox crashed. I tried to copy all the data from it before messing around any more, and found out that my album art files were damaged. I tried to delete them, but it was mounted read only. I installed hfsplus
sudo apt-get update && sudo apt-get install hfsplus which allowed me to modify the permissions so that I could delete the messed up artwork and other unneeded files, and now rhythmbox is re-initializing my ipod and it works.


localhost phpmyadmin displaying only codes

I had the same problem and I used the following command:
sudo apt-get install libapache2-mod-php

If it doesn't resolve your problem, uninstall php and everything associated with it as described in this answer, using the command:
sudo apt-get purge 'php*'

after that reinstall php with the command:
sudo apt-get install php


Ubuntu slows down even after cpu-intensive process is ended

Have a look at this page; since you are using VESA driver, I think this is your case. Check the output of glxinfo | grep render and if it says OpenGL renderer string: Software Rasterizer then this behaviour is normal until you use the appropriate video driver.


How to improve battery life of Dell Vostro 3558 running Ubuntu 16.10

There are chances that your CPU frequency is always at full speed, which of course, doesn't save energy.

From Terminal Try to :

sudo apt-get install cpufreqd cpufrequtils indicator-cpufreq

Then launch indicator-cpufreq with :

indicator-cpufreq &

Then choose Powersave policy from the applet on top which just appeared


gzip: stdin: not in gzip format when trying to extract kernel tarball

You are trying to decompress/'unzip' (the -z option) but the tar is not compressed/'zipped'

Do it without the -z and it will work fine:

tar -xf name-of-tar

(replace name-of-tar with the actual name) If you want more communication:

tar -xfvw name-of-tar

Type man tar for more info


How do locate and use programs that are available on the computer by default?

The Dash only searches for GUI programs.

To use a command line program like g++ open a Terminal, either using the Dash or pressing Ctrl+Alt+T, and call the program there.


How to make sure I'm not using any proprietary software after installation?

vrms (Virtual Richard M. Stallman) to the rescue:

sudo apt install vrms
vrms

and you'll get something like:

      Non-free packages installed on computer-name

app-shortname1                    Application long name 1
app-shortname2                    Application long name 2
app-shortname3                    Application long name 3

       Contrib packages installed on computer-name

app-contrib1                      Application Contrib Name 1

  3 non-free packages, 0.4% of 2381 installed packages.
  1 contrib packages, 0.1% of 2381 installed packages.

that will ensure you do / do not have any proprietary software installed.

Note: CPU firmware patches are non-free but absolutely needed  to protect you from some processor flaws and their ilks, so don't go overboard! ;-)


Is it possible to boot Ubuntu using the Windows bootloader?

Assuming that Windows is already installed, install Ubuntu on another partition.  Make sure that you install Grub2 on the Ubuntu partition - don't install it on the MBR since this will overwrite the Windows boot-loader.

Boot into Windows and install EasyBCD

Add Entry and choose Grub2 i.e.

Then write back the modified Windows Boot-loader i.e.

Reboot - you will now have two options:

Boot into Ubuntu and change the Grub Timeout value i.e.

gksudo gedit /etc/default/grub

change "GRUB_TIMEOUT=10" to "GRUB_TIMEOUT=0" and save.

Finally:

sudo update-grub

source


Frequent kernel panics always accompined by severe graphical glitching. Is my machine possessed or in need of a new motherboard?

What you are experiencing sounds more like a hardware issue instead of a software one.  I would verify that all heatsinks are properly attached to your machine first.

Then I would remove/swap/replace ram, until you are able to pass memtest.

Once you are able to pass memtest, then you can start worrying about Ubuntu.  Fyi, memtest is fully independent of Ubuntu.


Make all windows open in the center of the screen on Kubuntu

In Kubuntu you can choose the placement of opening windows under

System Settings>Workspaces>Window Mangement>Window Behavior>Advanced-tab> Placement


You can use setfacl

setfacl -d -m group:rwx /path/to/config


Step 10 of Canonical Distribution - Ubuntu OpenStack "Problem to install OpenStack Autopilot via Landscape"

I've resolved that added the second vnic on vnode where Landscape requests.

After to complete all its requests (green status) the installation of openstack-autopilot is going head without problem.

and Juju deployed all charms in right way.


How to refresh the terminal after yarn installation

Close the current Terminal by clicking on the little x in the corner, then in Activities type in Terminal clicking on the icon that appears to open new one.


Lost windows while dual boot with ubuntu

If you really deleted the Windows partition, Ubuntu is not going to get it back for you. Sorry.

Not knowing if this computer originally came with Windows 10, I will make the assumption it's fairly new and did. You could post more info per https://askubuntu.com/help/how-to-ask :>)

When you start there should be a recovery partition. Look for the option to choose a boot device, perhaps F12, hold that key down and see if a recovery partition is a choice for bootup. Some computers hide this info at the start, and it's manufacturer specific, so you should consult your computer manual, again we don't know what model you have.

If you really overwrote everything then your best best is likely to contact the manufacturer. I am not aware that you can download windows 10 cold from the Internet. If for example you bought it from Best Buy or another retailer perhaps they can help.

This is probably a question for a more Windows oriented StackExchange site like https://superuser.com/

The only option that's relevant to askubuntu is that you could open a terminal window and run the command fdisk -l and see if there's still a recovery partition. If you are not familiar with Linux be very careful running fdisk, you should not need to use sudo to get this listing.


you can use Grub Customizer

on the "List configuration" tab, move lubuntu to the top,

and on the "General setting" tab, insert 0 Second in "Boot default entry after" option


Install libclang on Ubuntu 12.04 LTS 32 bit machine

For 12.04, it is available from official repositories. Therefore, to install, type:

sudo apt-get install clang

As a reference, whenever I cannot find a package required (particularly libraries), I google <name> launchpad, which most of the time gets me to the package which builds the required libraries. Launchpad is THE source of information for packages, libraries, versions, ppas, etc. I hope this is of help.


dual screen setup in ubuntu with Intel HD graphics

Your answer is here.
At the time of this writing, this site is down, but fortunately, The Grand Way Back Machine still has it.

This works for me, but unfortunately GNOME 3 does not support multiple X screens.

To Summarize, the necessary steps to get two X screens on intel graphics are:

Two Device Sections with

Option         "ZaphodHeads" "yourdevice"

yourdevice as given by xrandr

Option         "AccelMethod" "sna"

Two Screen Sections referring to the Device Identifiers

This is my (almost-minimal) sample config

Section "ServerLayout"
    Identifier     "Layout0"
    Screen         "Screen0" 0 0
    Screen         "Screen1" RightOf "Screen0"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "intel"
    BusID          "0:2:0"
    Option         "ZaphodHeads" "eDP1"
    Option         "AccelMethod" "sna"
    Screen         0
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "intel"
    BusID          "0:2:0"
    Option         "ZaphodHeads" "DP1"
    Option         "AccelMethod" "sna"
    Screen         1
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
EndSection


cannot open output file test: Is a directory collect2: ld returned 1 exit status

There is a directory named "test" at the path you are trying to compile from, either rename the directory or change the output filename (-o somethingelse) . Optionally (and the best option) is to move test.c to it's own directory and compile from there.


How can you disable KDE notification sounds in Ubuntu 14.04?

I run Ubuntustudio 15.10, and have installed the KDE-app Kolourpaint.
Wonderful app, but the sounds ... terrible.

Open File Manager and enable "View Hidden Files"
Go to FileSystem/usr/share
Open a terminal there and type
sudo chmod -R 777 sounds
Open FileSystem/usr/share/sounds in the File Manager
Delete every KDE*.ogg file.

Now no more KDE system sounds will disturb you.


Can I install 64 bit Ubuntu on my Intel Core i7 64bit

See the links:

Hardware catalog

Dell certified laptops

Most likely it will work.


Can I set a price for my application submission?

The App Showdown rules page says:

  Submissions: the Participant can submit more than one app, up to a
  maximum of 2. Participants can charge for applications in the Software
  Centre, but the code must be released under an Open Source license to
  make its review possible. Canonical employees can participate in the
  contest as long as they are not paid to create the submission.

(Emphasis mine.)

Clearly, you can set a price for your application and sell it on software-center. The only condition is, it has to be open source.


Ubuntu 12.04.3 - Graphics Driver: Default vs Nvidia 319-recommended vs Nvidia 319-updated

Your problem might be solved with "restarting the Lightdm display manager".
So first of all try :

 restart lightdm

And if the problem is still present, you can try this:

 sudo apt-get purge nvidia

But, unrelated to your question, I suggest you try to update your driver to version 325 and then install Bumblebee on it (before deciding to downgrade to nvidia-current) :

sudo apt-get purge nvidia

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

Then adding Nvidia and Bumblebee PPAs:

sudo apt-add-repository ppa:bumblebee/stable
sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-325 nvidia-settings-325
sudo apt-add-repository -r ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia
sudo apt-get dist-upgrade

P.S : Bumblebee is a utility to manually switch between integrated VGA card (Intel) and High-End VGA card (Nvidia). see this for more information.


For some reason, there is no dependency put on ocrodjvu about tesseract-ocr. I reported it to upstream here. Do

sudo apt-get install tesseract-ocr

Possibly, you have install also a language.

Systems: Ubuntu 14.04 and 16.04


How to add chromedriver to Path in ubuntu?

After you downloaded und extracted ChromeDriver you have three options.

A) Save the file in a directory which is already in PATH
B) Save the file at a custom location and add it to PATH
C) Save the file at a custom location and create a symlink to the file in one of the directories that are already in PATH

For the following examples let's assume the extracted file is in ~/Downloads

Example to A)

// Move file to a directory that's already in PATH
sudo mv ~/Downloads/chromedriver /usr/local/bin

// Make file executable
sudo chmod +x /usr/local/bin/chromedriver

Example to B)

// Move file to a directory that's not in PATH
mv ~/Downloads/chromedriver ~/Documents/Python/ChromeDriver/

// Make file executable
chmod +x ~/Documents/Python/ChromeDriver/chromedriver

// Add directory to PATH
echo 'export PATH="$HOME/Documents/Python/ChromeDriver:$PATH"' >> ~/.profile
source ~/.profile

Example to C)

// Move file to a directory that's not in PATH
mv ~/Downloads/chromedriver ~/Documents/Python/ChromeDriver/

// Make file executable
chmod +x ~/Documents/Python/ChromeDriver/chromedriver

// Create a symlink to 'chromedriver' in one of the directories
// that are already in PATH (e.g. /usr/bin or /usr/local/bin)
sudo ln -s ~/Documents/Python/ChromeDriver/chromedriver /usr/bin/chromedriver

I hope i could make it clear.


How to take screenshots with a timestamp and date stamp (with scrot command)

Because scrot automatically names the files according to the date on my Lubuntu I think you are not looking for the filename to be the date but to put the date in the picture.

If you want the date to be shown on the panel in Lubuntu:

Right click on the clock in the panel and select "Digital Clock" Settings.
Edit Clock Format so it reads %x %R .
Close that window.

If you want some other date formatting just look up the available options in man strftime.

Or to append the date to a picture you can install imagemagick with sudo apt-get install imagemagick and then use scrot with the following command:

scrot -e 'convert $f label:"%x %X" -append $f'

This command will append the date below the picture. If you want it to be somewhere else in the picture, in other size, or overlapping the picture, etc. please lookup the documentation of imagemagick and modify the above command accordingly. To modify simply the date format refer again to man sfrtime and change "%x %X" accordingly.


I'd write a simple upstart script. Run sudoedit /etc/init/meteor.conf and copy in something like (see notes after) this:

description "Meteor"

start on filesystem and network-up
stop on runlevel [016]

respawn

setuid user
setgid user

chdir /home/user/meteor/writer10/
exec /path/to/meteor

That needs a couple of edits to fix the paths (that I don't know). Replace all instances of user with your username (run echo $USER if you're not sure) and the path to the meteor binary (run which meteor) needs fixing in.

If you don't want to reboot, you can run sudo start meteor to bring it up immediately but otherwise it should start it when the network comes up and keep running.


Cannot run .sh file in fstab Mounted vfat partition

After a little digging, I finally found the answer. Looks like the ordering of the options matter. I moved user before exec and I am now able to run scripts in the mounted partition.

This question is the one which helped.

Maybe this needs to be mentioned in the Ubuntu Community Fstab page??


Christopher Champion said :

Hey, I figured the issue out and I was wanting to let you know just for future reference just in case somebody else has the same issue.
It was something so simple that I don't know why I didn't do it to
start with but all I had to do was :

Delete the 40_custom file : sudo rm /etc/grub.d/40_custom
Update the grub configuration : sudo update-grub
Then make the 40_custom file again by typing : sudo gedit /etc/grub.d/40_custom and write the script again.
Make it executable : sudo chmod +x 40_custom
then run sudo update-grub again


18.04, grub takes about 6 minutes to boot, problem: `systemd-udevd 'SomeDevice' is taking a long time`

used a workaround to solve this problem:
https://unix.stackexchange.com/questions/559929/very-slow-boot-6m-how-to-force-change-systemd-udevd-timeout-to-5s/559979#comment1041816_559979

linux /vmlinuz-4.15.0-72-generic \
 udev.event-timeout=5 \
 root=/dev/mapper/MyLvmGroupName ro nosplash \
 $vt_handoff debug --verbose

As I didnt do a lot of tests to be 100% sure:
I think both debug and --verbose let me know what was happening.
I think udev.event-timeout=5 has to be before root= param.
I am sure rd.udev.event-timeout=5 was ignored.


What is the maximum length of command line arguments in gnome-terminal?

xargs knows. On my system,

$ xargs --show-limits
Your environment variables take up 2572 bytes
POSIX upper limit on argument length (this system): 2092532
POSIX smallest allowable upper limit on argument length (all systems): 4096
Maximum length of command we could actually use: 2089960
Size of command buffer we are actually using: 131072


script to show git branch in bash no longer works on ubuntu 18.04

Although you already solved the problem, I'd like to introduce the solution already shipped with git:

Together with git the file /usr/lib/git-core/git-sh-prompt gets installed. Years ago it was in the contrib directory but meanwhile it made it into the official paths. The file isn't meant to be executed (in fact, it doesn't have x flags) but rather to be sourced from the .bashrc. It defines some functions to handle a pretty prompt, the most prominent being __git_ps1.

You can add the following lines to your .bashrc:

source /usr/lib/git-core/git-sh-prompt
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\$(__git_ps1)\[\033[00m\] $ "

The top of the file /usr/lib/git-core/git-sh-prompt gives some description of what else can be done. My version says 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh). but this is not necessary (the instruction is obsolete).

You may also set some environment variables to alter the function's behaviour. I, for instance, use

export GIT_PS1_SHOWDIRTYSTATE=yes

The result then looks like:

# clean
pduck:~/oss/rsyslog (master) $

or

# dirty
pduck:~/oss/rsyslog (master *) $

or

# something added to index
pduck:~/oss/rsyslog (master +) $

or

# in a completely fresh repo
pduck:~/oss/xxx (master #) $

Btw: The "proper" way to get the current branch is not to parse git branch's output as that may change with new git versions.
git branch is a so-called porcelain command which means its output is nice and pretty but not guaranteed to stay the same with different versions. The git guys thus recommend plumbing tools for scripting. With plumbing the current branch can be determined with

if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
    current_branch=$(git symbolic-ref --quiet --short HEAD || git rev-parse --short HEAD)
else
    current_branch=""
fi

The first assignment works if HEAD is a symbolic reference (that is: a branch or tag is checked out). If you checked out something that has no label (e.g. git checkout HEAD^^), then it fails and we use git rev-parse --short HEAD instead to show the SHA1. The if checks whether we are in a git working directory at all (because else the commands don't make any sense).


Flash player won't start after Ubuntu update

These instructions assume the problem is not caused by a non-Adobe plugin for Flash, which in your case, given what you said, seems like a reasonable assumption.

First, completely remove the flash player by running this command in a Terminal window (Ctrl+Alt+T):

sudo apt-get purge adobe-flash\* flashplugin\*

Now, you should also remove all user-specific files created by Adobe Flash (and other Adobe software) before, which may be causing the problem:

mv ~/.adobe ~/.adobe.old
mv ~/.macromedia ~/.macromedia.old

Actually, those commands don't remove anything--they just rename the folders so Adobe Flash won't use them anymore. However, you can feel free to remove them afterwards.

Then install Adobe Flash. You can do it in the Software Center or with:

sudo apt-get update
sudo apt-get install flashplugin-installer

You have a 32-bit system so whether you install flashplugin-installer or adobe-flashplugin doesn't matter, but if you had a 64-bit system then it would be better for you to use the adobe-flashplugin package. The flashplugin-installer package only provides the 32-bit version of the plugin. (I'm providing command-line instructions for flashplugin-installer rather than adobe-flashplugin only because you might not have the software source for adobe-flashplugin--the partner repository--enabled.) By the way, some instructions say to install flashplugin-nonfree--that is equivalent to installing flashplugin-installer.

Since it doesn't work in either Firefox or Chrome, clearing user-specific browser files is probably unnecessary. However, if the above method does not work, you should see if the problem occurs in the guest account (or any other user account--you could even create a new account to test). If the problem did turn out to be user-account-specific, then you'd want to clear browser-specific files to see if that would solve the problem.


I can't find my Settings and I can't install ubuntu-desktop

Manually install the dependency. Run sudo apt install libsensors5, then repeat the initial command. If that doesn't work, install them both together with sudo apt install libsensors5 libsnmp30.


RTNETLINK answers: Operation not supported

Those NETFILTER_* configuration options control modules for iptables. To get more information about such an configuration option, you can look it up on a site like http://cateee.net/lkddb/web-lkddb/IP_ADVANCED_ROUTER.html. In this case, there is no loadable module, the only valid options are "Y" and "N".

For CONFIG_NETFILTER_NETLINK, the module name is nfnetlink:

The configuration item CONFIG_NETFILTER_NETLINK:

    prompt:
    type: tristate
    depends on: (none)
    defined in net/netfilter/Kconfig
    found in Linux kernels: 2.6.25–2.6.39, 3.0–3.2, 3.3-rc+HEAD
    modules built: nfnetlink


splitting user's input with read command

First, you should tell read to use an array. From help read:

-a array    assign the words read to sequential indices of the array
            variable ARRAY, starting at zero

So, do:

read -a day

Then, use just 1 and 2, without the ${...}. In this case, as the help text notes, start from 0:

first_column_of_day="${day[0]}"
second_column_of_day="${day[1]}"

${1} is the first argument to the script, which may or may not be 1.

Also note that bash's read can print a prompt:

-p prompt   output the string PROMPT without a trailing newline before
            attempting to read

So:

read -p "# WHICH DAYS? #" -a day


Make bootable Win8 USB on and for Ubuntu MacBook

Step 1: Download and install Microsoft’s Windows 7 USB/DVD Download Tool [Microsoft Store Link]

Step 2: Download Windows 8 Developer Preview from Windows Dev Center. If you don’t know if your processor is 32-bit or 64-bit ready, download the 32-bit .iso file.

Step 3: Insert a USB flash drive having 8GB or greater storage capacity in a USB port on your computer.

Step 4: Launch Windows 7 USB/DVD Download Tool you installed in Step 1.

Step 5: Choose the ISO file you downloaded in Step 2 by clicking on “Browse”.

Step 6: Click on “USB device” when prompted to choose media type. In the next step, choose your inserted USB flash drive.

Step 7: The tool will now create a bootable USB flash drive using the Windows 8 DP .iso. This will take some time, so be patient.

Step 8: Once the tool has done its thing, restart your PC with the USB plugged in. On start up, you will need to enter the BIOS utility of your computer and boot from the USB.

Step 9: Once booted from the USB drive; follow on-screen instructions to install Windows 8 DP.

Finally the grub recovery is covered here: How can I repair grub? (How to get Ubuntu back after installing Windows?) .

Reference: 1.


Intel Graphic 945 driver for ubuntu 12.04 lts

Drop into your terminal and issue the following commands;

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

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

Now you need to create a config file;

sudo gedit /etc/X11/xorg.conf

Then paste this into the file;

Section "Device"
Identifier "Card0"
Driver "intel"
Option "AccelMethod" "sna"
EndSection

Save the file and give your machine a reboot.  You should now have the correct driver installed.


Xubuntu does not recognize Epson WF-2540 All-In-One

Kubuntu, Ubuntu, Xubuntu, Lubuntu, etc are ALL the same Ubuntu-core. If it works on one, it should work on any of them.

Alternatively, you can download specific drivers for your 'all-in-one' from Epson webpage. Download the deb files for your platform (x86, x64, etc) and install by opening them with (Gnome) Software.


Use startup application to run project file of QT creator

The QtCreator should have made a directory like this :

build-your_project_name-[debug or release or profile]

in the parent directory of your project. Go there and there should be a binary with the name of your project(exact same name and without extensions) . Add the address of that binary to the startup applications and you're done.


No keyboard on Raspberry Pi 4 8Gb RAM Ubuntu 64bit

I have a similar problem with Ubuntu 21.04 64-bit on a Raspberry Pi 4 B with 4 GB memory, using a Logitech K780 Keyboard on USB, or Logitech K260.  Both keyboards were on a Logitech Unifying Device USB key.
I installed Ubuntu 64 by using rpi-imager in Raspberry Pi OS to write Ubuntu to a 16 GB SD card and then booted from the card.
It is not a keyboard problem because the keys work OK until after I log in,
After I log in, each application window comes up under a clear window that shows the entire application window but prevents any keystroke from falling through to the application window.  Both windows show the 'X" close button but only thee top button works, and it closes both windows.
If, before logging on, I click on he round icon in the lower right corner, and choose "Ubuntu on Xorg" from the resulting menu, I can log on and get a desktop that works normally with the keyboard.
My guess is that the icon in the lower right corner of the login screen selects between two sets of desktop options.  The default set fails and the other set works.


How to check if my graphic card is muxless?

Mux stands for Multiplex and I believe it wants to know if you have a hardware multiplexer (Not sure about this).

There is a lot of useful information in the archwiki which might be of help.


how to read all lines one by one from CSV and create multiple XML files accordingly(one file for one row) using shell scripts

I would do this:

# a printf format string
xml_template=$(cat <<'XML'
<?xml version="1.0" encoding="UTF-8"?>
<fi:Organisation>
        <fi:Company>
                <fi:DEPARTMENT>Account</fi:DEPARTMENT>
                <fi:department-key>%s%d</fi:department-key>
                <fi:department-id>%d</fi:department-id>
        </fi:Company>
        <fi:Employee>
                <fi:emp-gid>%s</fi:emp-gid>
                <fi:country>%s</fi:country>
        </fi:body>
</fi:organisation>
XML
)

dept_key_prefix=ABC
dept_key=100         # choose suitable initial values
dept_id=100

while IFS=, read -r emp_gid country; do
    printf "$xml_template" \
            $dept_key_prefix \
            $((dept_key++)) \
            $((dept_id++)) \
            "$emp_gid" \
            "$country" \
        > "$emp_gid.xml"
done < Employee.csv


Creating a Unity Lens: The name `Activation' does not exist in the context of `Unity'

The Unity.Activation interface was dropped as of Unity 4 (Ubuntu 11.10).  Instead you can hook into the activation callback using signals like this:

scope.activate_uri.connect(on_uri_activated);

If you are not overriding the activation handling, you probably only need remove Unity.Activation and recompile.

Full documentation for Unity 4 (Ubuntu 11.10) can be viewed here: http://developer.ubuntu.com/api/ubuntu-11.10/c/Unity-4.0.html


How to create a partition without unmounting?

In order to make a new partition you will have to shrink one and create space for the new one. You can't shrink a mounted partition or unmount a partition of a running system. That's where you need a live ubuntu, either on a CD or simply on a USB-stick.


You need a version of vim that has +clipboard in its version. Install the vim-gnome package and you should be fine. (And you don't have to use gvim to use the clipboard, it still works when running vim in a terminal.)

Note
In more recent versions, the actual package name seems to be vim-gtk and vim-gtk3 respectively (vim-gnome is a dummy package).


Unable to install Skype in Ubuntu 13.04 on HP Envy 17

check out the fifth item
The links below is to fix this issue with proprietary Nvidia drivers (and possibly AMD) and Skype:
webup8 link


i had a similar issue when i installed ubuntu as a virtual machine.
I was able to get the gui screen using Ctrl-F7.
Ctrl key was the right side ctrl key.
You can try this combination of Ctrl-Alt-F7.
something similar to this Switching Between GUI and Terminal


Nvidia X Server Settings does not allow me to apply changes

Solved the problem by installing the latest nvidia Unix driver following the instructions here

I downloaded the driver from nvidia.com here

The driver version I installed is 304.123 for Linux x86_64/AMD64/EM64T.

The driver now sitting in the repository, nvidia-current, is not the latest driver, and appears to be the cause of the problem.


Unable to control volume using keyboard button on Dell Inspiron N5010

You don't mention what version of Ubuntu you are running but if it is a version up to 10.10 go to System -> Preferences -> Sound and a dialog box like below should pop up.

If however it is a Natty beta version then select the applications tab in Unity and search for Sound.

Ensure you have the Internal Audio selected and try a test on your speakers.

You should also check your start up programs and ensure Pulse Audio is selected by going to System -> Preferences -> Start Up Applications - or the applications tab in Unity and search for start up applications and ensure Pulse Audio is selected as below;


Two gnome panels at the top of the screen

ALT+Window Keys pressed together and the drag it to the desired location.


"Something-Else" install 18.04 over 16.04

many things changed in 18.04 LTS and my modest recommendation after several upgrades from 16.04 to 18.04 is:
1.) Install Ubuntu 18.04.3 LTS (latest version !) over the existing 16.04, and
2.) Make tasks explained in https://itsfoss.com/things-to-do-after-installing-ubuntu-18-04/.
3.) In case you need still some additional other software,  download from Ubuntu Application Centre the programs which Ubuntu 18.04 supports. Keep in mind next Ubuntu LTS (version 20.04) will be launched next year spring.

(Before any installation remember to make safety copy of all your works somewhere.)

According to my experience tasks 1.) and 2.) will time your time about 1,5h.


How to get more people involved in improving X.org for Ubuntu?

The reason X doesn't get alot of work is that it requires an enormous amount of knowledge about how GPU's, memory etc.. work as well as familiarity with the X.org code base and to some extent kernel programming. It's not a trivial thing to get into and from a community perspective those who are interested in working on X or X drivers are probably already doing so. There is currently no motivation for a developer for developer to work on Xorg aside from personal interest.

The thing that the community has which X.org developers don't necessarily have, is access to a wide variety of hardware. Having people who are willing to spend the time to write 'good' bug reports and test drivers and parts of the Xorg stack before a release is probably going to help the engineers more than anything.

Currently there is an Xorg edgers repo which I use to test drivers on my stable system. It's pretty easy to roll back a single package after i'm done testing. However the only other way we can test is to either build X yourself or to install the edgers repository which builds from upstream. This does a wholesale X replacement as far as i can tell. This means it's an all or nothing approach to testing X.

Having a way to have 2 versions of X ( and fairly easily choose) which one you want to use would allow testers to not only test X , but subsequently get back to a working Xorg so they can submit the bug report.


You can do this manually via the time and date commands.

source and further details man time and man date


You need to disable the firewall with

  ufw disable

This command

  sudo systemctl stop ufw.service

Just disables de service and the rules maybe still working.


Clean-up duplications etc. in virtual memory(RAM)

RAM is not virtual. How many RAM do you have?

free

Updates don't occupy RAM, they occupy disk space. How big are your partitions?

df -h

/tmp-Files are cleaned on every reboot. Firefox (do you use it? If you are low on RAM, try opera) can produce big caches. You may reduce the size from the settings dialog therein.

You may have some cache from installs/updates.

sudo apt-cache clean

should erase it.

Of course, 2 or 3 videos may occupy more space than the whole rest of your OS.

Unused files is somehow hard to decide. You may look in the menu for applications which you don't need, and remove them with syanptics.

Where do you think duplicate files come from?

You don't talk about swap-space, when talking about Virtual RAM?

swapon -s

Swap is exclusively used for swapping. You can gain some diskspace by repartitioning, if you made it much too big. 2x your real memory is a reasonable size. You never do manipulate its content by hand.


How can I recover my Ubuntu OS after a failed upgrade?

If you boot off the bootable CD/USB & select the 'Try Ubuntu' option you will have a working system; plug the USB drive in, it should mount; you should also have an icon for your main (corrupted) drive, which you can double-click & it, too should mount. Assuming it does, you can navigate to your files & copy them safely to the USB drive.
If this goes OK, you'll almost certainly need to re-do the installation - I would unmount & disconnect the backup drive first. That's it..

If you get permission errors, or something won't mount, open a terminal:

sudo -i to get root permissions for all the next bit.

If drives mounted, skip over the following to Copying.

mkdir /media/ubuntu/drive1 /media/ubuntu/drive2 - we need to create mount points. Then, we need to identify your drives:

dmesg | tail will tell you where it put your USB drive - likely sdb or similar.

Your main drive should be /dev/sda_ ; _ may be 1 if there's no Windows etc around.
If you're not sure, run fdisk -l /dev/sda which should list the partitions for you. You can probably work out which is your home directory by sizes if it's not obvious - that's the one we want. fdisk -l with no drive will list all drives on your system.

Once you're confident you have the right drives, (I'll use sda1 for your old files, sdb1 for the new USB - you use whatever you found..) type:

mount /dev/sda1 /media/ubuntu/drive1
mount /dev/sdb1 /media/ubuntu/drive2

Copying:

shopt -s dotglob if you want to keep hidden files, eg .gnupg/, .mozilla/ - better to do it than not.

cp -R -preserve=all /media/ubuntu/whatever-it-called-your-old-drive/home/yourname/* /media/ubuntu/whatever-it-called-your-USB/   # This will take some time, but will copy all your files under your old userid, to your backup drive.

We now have the backup & can proceed to re-install to OS - unmount & disconnect the USB first.

Finally:

Once the re-installation is done, you have a system with an almost empty home directory. Just copy some or all of your files back off the USB. If you use the shopt -s dotglob command it will take all your emails & passwords etc back over too; but may overwrite some system files, so I always take a (renamed) copy of the new blank home as well, just in case!

If the new installation assigned you a new userid, you may find you can't log in due to not owning your own files.

cd /home/
shopt -s dotglob
sudo chown -R you:you you

should fix that.


monitor cannot be detected, missing a driver?

Check to see if your monitor is using a digital or analog single. Is there a menu option in your monitor settings that will change the input to digital of analog? Also, this can be due to a incorrect adapter depending if the video card outputs in digital or analog. Make sure you are using the correct connector (d-sub, dvi, or vga).


apt-get update not working (Not Found [IP: 91.189.92.201 80])

Natty no longer supported or gets updates.
You need to change from the archive.ubuntu.com to the old-releases.ubuntu.com server, which is the intention of the sed command you mentioned (I have not had chance to confirm if that works or not).
Open and replace all entries in the following file:

sudo gedit /etc/apt/sources.list

Then after run the update and upgrade commands as you would normally.


I like to able to keep stuff like this under version control, so I prefer text-based solutions (you mentioned gedit, for example).

I find plain-text to be too limiting, and not very friendly for non-technical people, so I tend to use restructured text (you could use markdown, or whatever form of light-weight markup you prefer) and pandoc (sudo apt-get install pandoc) - pandoc converts between various text formats, and can output HTML, PDF (via LaTeX) and various word-processor formats.

If you have a lot of documentation, you could consider using Sphinx  (python: pip install -U Sphinx) - it also uses restructured text - but Sphinx would probably be overkill if you're only concerned about a solutions log.


How can I upgrade from Gnome-Shell 3.4.2 to 3.8?

First try

sudo ppa-purge ppa:gnome3-team/gnome3

Then

sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt-get update

It will take some minutes, as it has to download... then check with

gnome-shell --version


Upgrade the distribution, or reinstall the system?

I'd go for the upgrade. You'll receive a pop-up in about two weeks with the very question and all you have to do is click OK and enter your password. Upgrading gives you an identical system as you get with a full install, but the advantage of upgrading is that you don't loose installed programs and your configuration files.
Only if you've been making a mess of your install and want to get rid of things that you broke experimenting, then a full install is advisable.

Forget what you read about Windows upgrades and a full install being better. Upgrading Linux works in a different way.

Although all your files should be fine during an upgrade, always make sure you have a backup of you personal files before upgrading/install on a different disk/dvd/usb stick/...


Replacing Hard Disk used for storage Ubuntu is on SSD

2 ways:

Create on the new drive the same partitions like your current layout. Then boot to live System and copie all from your old to your new, then I think you must reinstall grub and change the UUIDs in your fstab to the new UUIDs.

Boot live and clone with gparted the partitions to your new drive, maybe there you must reinstall grub too.


From man iptables-extensions, the DNAT target option is --to-destination (with two dashes) rather than -to-destination:
   DNAT
       This  target is only valid in the nat table, in the PREROUTING and OUT‐
       PUT chains, and user-defined chains which are only  called  from  those
       chains.  It specifies that the destination address of the packet should
       be modified (and all future packets in this  connection  will  also  be
       mangled),  and rules should cease being examined.  It takes the follow‐
       ing options:

       --to-destination [ipaddr[-ipaddr]][:port[-port]]

It's not obvious why the error message flags the ipaddr argument rather than the option itself.


Can't use HG through a mounted directory

Mercurial doesn't require any special form of access to the files, but (as you've found out), it will stat all the files when you run hg status. With a network filesystem this can take a long time.

Since Mercurial is a distributed version control system, the basic assumption is that you'll be operation on a local repository, not a repository residing on a network filesytem. So you should always try to make a local clone and work on that.


GParted does not show free space partitioned with Windows

Boot from Ubuntu install media.
Select Try Ubuntu without installing.
Open GParted (Partitioning tool).
Reduce the Windows partition.
Create a partition for Ubuntu (size that fits your needs).
Create a swap partition (size minimum matching RAM).
On the desktop click Install Ubuntu.
Choose Something else.
Select the partition you created for Ubuntu before.


So first save the following in a file named rsynccommands.sh

#! /bin/bash

echo "starting all"
rsync-command-1
echo "completed 1"
rsync-command-2
echo "completed 2, starting 3"
rsync-command-3
echo "completed 3, starting 4"
rsync-command-4
echo "completed 4, starting 5"
rsync-command-5
echo "completed 5, completed all."

That is a bash script.

Make the script executable:

chmod + x /hom/USER/path/to/rsynccommands.sh

Then run the command crontab -e and copy/paste the following:

30 13 * * * /home/USER/path/to/rsynccommands.sh >/dev/null 2>&1

That will run the script every day at 1:30pm, the 30 being 30 mins past and the 13 being 1pm. The stars mean every day, month and year.


How to speed up the Android Emulator in ubuntu 12.10

This is not Ubuntu specific. The Android SDK's speed is terrible.
That's not a flamebait or anything, it's sadly... a fact.

There is an alternative.
Genymotion - https://www.genymotion.com/

It provides a fast phone, phone/tablet, or tablet for all your needs, with a blazing fast speed. It's not native, runs on x86 Android. So while it won't replace "real testing", it is the best way to develop. It is only free for personal use though, keep that in mind.

The installation instructions change with time, so I did not copy those out.
Genymotion is not the only option of course, it's just the one I have always been using.
You could also simply install an x86 image of Android into Virtualbox.
But Genymotion has become pretty much the industry standard - as far as I know.

v2 - 2016.


Is it possible to use 'dch -r' but NOT end up in an interactive editor?

Aha!  Just specify an empty release string!

dch -r ""


How to install an earlier version of matplotlib?

Apart of the obvious solution of upgrading your code to work with the new versions of Matplotlib, you could perfectly install matplotlib in a virtual environment. For that you need to install the virtualenv package, then create your virutalenv (I will make it short and explain at the end):

mkdir matplotlib_1.1.1
cd matplotlib_1.1.1
virtualenv env
env/bin/pip install numpy
env/bin/pip install https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.1.1.tar.gz

If you used virtualenv/pip most of this isn't new. First we create and move to a new directory, then we create the virtual environment in the env directory. We proceed to install numpy which is one of the dependencies of matplotlib, and finally we manually select and install the sources of matplotlib with the version of our preference.

You can now use env/bin/python to open a interactive python shell, or run source env/bin/activate to change temporally the default python binaries.

Ah, btw, this doesn't require you to remove your already installed version of matplotlib, if you don't want to.

More reading about pip and virtualenv as well as some references http://www.dabapps.com/blog/introduction-to-pip-and-virtualenv-python/


Want to install Unity in Lubuntu 16.04. Guide me please

Just execute in the terminal

sudo apt install ubuntu-desktop

or just visit this address

Software Center - Ubuntu Desktop

If you get any error try this command

sudo apt update && sudo apt upgrade

and try again.


What is the best way to enable more than one network interface in a preseed (trusty)?

As long as i know, it is not possible to do this directly in the preseed file. The only way to activate an additional interface is by running a post-install script rewriting your /etc/network/interfaces file. The way to go is to use the 'd-i preseed/late_command' section in the preseed and there somehow download a script, make it runable and then run the script to set up your network.
I tried this for a couple of hours but did not succeed, it seems like even if your post install script modifies your /etc/network/interfaces, your modifications are somehow overwritten again, cf. http://ubuntuforums.org/showthread.php?t=2219851 . So i decided to just add machines modify then manually and the use them.


Read this post it worked for me...
Unable to get audio through HDMI connection to TV with Ubuntu 14.04

$ sudo adduser your_linux_user_name


To install the extension package, download it from the virtualbox.org website.

Open a terminal and go to an arbitrary directory, then enter

wget http://download.virtualbox.org/virtualbox/4.2.12/Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack

After the download finished, enter

sudo VirtualBox ./Oracle_VM_VirtualBox_Extension_Pack-4.2.12-84980.vbox-extpack

Virtualbox will start and ask you to accept the license. Scroll down and accept it.
The restart the application.


Ubuntu Server + Window Manager + Network Applet

You have a couple of options. The first is to use a different network manager altogether such as wicd.
The other option is to install network-manager but without installing its recommended packages as this will bring in less dependencies. You can do this with the command:

sudo apt-get install --no-install-recommends network-manager


They will both behave really well. Of course, you need to install the proprietary drivers for the AMD video card. The Intel one should get support out of the box. I would still invite you to try this questions which will help you even further along the road:

Which ATI/AMD, or Intel, or NVIDIA Graphics for Unity?
(Simple way of letting users know which one to get)

Bumblebee or Ironhide?
(In case you get a laptop with 2 video cards integrated)

How do I install the Nvidia drivers?
(Extensive answer which covers many aspects of video cards)

If you want to know which one gives less problems (Comparing Nvidia and AMD only) when installing, upgrading, changing options (Resolution, Refresh Rate, OpenGL features) and setting it up in  general, the I would first go with Nvidia, then Ati.

Even though Ati is more open to the Open Source environment, Nvidia with it's proprietary driver does a great job at lowering the amount of work a user needs to install one. For many users it can be as simple as installing the proprietary drivers that come in the Ubuntu repositories. For others is as easy as adding a PPA and installing the correct driver. Same applies for Ati but Nvidia (From my experience) has had and proven to offer a better way of handling installations, configurations and has even done a great job at Bug hunting.


Well, if you ARE sure that both, Windows and Ubuntu, are install under UEFI configuration, then you could try Grub customizer, it allows you to, along other stuff, change the displayed OS in Grub, it might help you, here is the link:
https://launchpad.net/grub-customizer

or i think you can find it in the software center, good luck!


I have the same situation as DualSportDad. Here is the output from dpkg as requested by Neni.

michel@hp:$ sudo dpkg -l | grep Brother

ii  brdcp7040lpr:i386         2.0.2-1    i386   Brother DCP-7040 LPR driver
ii  brother-udev-rule-type1   1.0.0-1    all    Brother udev rule type 1
ii  brscan-skey               0.2.4-1    amd64  Brother Linux scanner S-KEY tool
ii  brscan3                   0.2.13-1   amd64  Brother Scanner Driver
ii  cupswrapperdcp7040:i386   2.0.2-1    i386   Brother DCP7040 CUPS wrapper driver
ii  printer-driver-brlaser    3-3build1  amd64  printer driver for (some) Brother laser printers
ii  printer-driver-ptouch     1.4-1      amd64  printer driver Brother P-touch label printers

Ubuntu 16.04 was a clean install and I specified a USB connection when installing the drivers. The printer does not even have a ethernet connection.

I added the udev rule manually, when the changes along the lines of those mentionned by DualSportDad did not work although they did do the trick in 14.04.


sudo: unable to stat /etc/sudoers: No such file or directory, sudo: no valid sudoers sources found, quitting

In order to fix this, you can either reinstall sudo, or download a default /etc/sudoers and edit it. Both ways require these steps: First, restart your computer. When the Grub screen displays, instead of choosing Ubuntu xxx, choose Advanced options for Ubuntu xxx. Under Advanced Options, choose Recovery mode. The second step is to mount your partitions rw. To do this, choose Clean packages, Ok, and then when you see the recovery screen again, select Root shell. Enable the wifi from the root shell. Either reinstall sudo:

apt-get install --reinstall sudo

or insert this into /etc/sudoers:

# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Defaults    env_reset

# Uncomment to allow members of group sudo to not need a password
%sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL) ALL

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

(from Sudoers Ubuntu Wiki)

Before restarting, su back to your normal user, and try sudo apt-get upgrade or anything with sudo. If it works, then reboot. Otherwise, comment with the error message.


Thanks to stackoverflow, I found it! If the plotter is installed via the webinterface at localhost:631` it shows usb://Roland/GX-300?serial=0001. Under "make" it lists "Raw". Inkcut is great!


Ubuntu Server: Udev automount - can't unmount this USB drive. Any Idea?

You can try this: Append these rules into your .rules file, you've created:

 ACTION=="remove" KERNEL=="sd?1" RUN+="/bin/umount /dev/%k /mnt/usbdrive

 ACTION=="remove" KERNEL=="sd?1" RUN+="/bin/rmdir /mnt/usbdrive


How to make Unity top panel semi-transparent?

You could install CompizConfig Settings Manager (CCSM) to accomplish that.

Open a terminal by pressing Ctrl + Alt + T and type

sudo apt-get install compizconfig-settings-manager

After installation, open your dash and type ccsm.

Use the search filter to find the Ubuntu Unity Plugin. Under Experimental tab, go to Panel Opacity and reduce the value until transparency is to your liking.

That's it, you're done!


Xbmc won't install due to dependency issues on Lubuntu quantal

sudo apt-get install python-software-properties pkg-config
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-xbmc/ppa
sudo apt-get update
sudo apt-get install xbmc

http://wiki.xbmc.org/index.php?title=Installing_XBMC_for_Linux


Add second processor to Virtualbox virtualized 32bit Ubuntu

There is a section in Virtualbox documentation on CPU Hot-Plugging. That details the procedure of adding another CPU to Linux guests.

  With Linux guests, the following applies: To prevent ejection while
  the CPU is still used it has to be ejected from within the guest
  before. The Linux Guest Additions contain a service which receives
  hot-remove events and ejects the CPU. Also, after a CPU is added to
  the VM it is not automatically used by Linux. The Linux Guest
  Additions service will take care of that if installed. If not a CPU
  can be started with the following command:

echo 1 > /sys/devices/system/cpu/cpu<id>/online

On the Known Limitations page, some drawbacks of the SMP capabilities of 32bit guests are listed. Mostly performance issues:

  Poor performance with 32-bit guests on certain Intel CPU models that
  do not include virtual APIC hardware optimization support. This
  affects mainly Windows and Solaris guests, but possibly also some
  Linux kernel revisions. Partially solved in 3.0.12 for 32 bits Windows
  NT, 2000, XP and 2003 guests. Requires 3.0.12 or higher Guest
  Additions to be installed.

It does not say that multi processing is not possible.


Don't get fancy to start. Before fiddling around with setttings, changing the port, I'd make sure it works as intended. If you can, put everything back the way it was and see if it works. I don't think any user configuration is necessary to get the basic thing working.  You don't need to enable ssh for particular users.  Just do the basics, then add modifications later. Maybe you could remove the package (and settings) and reinstall.

After that:

Is the sshd server process running.

On Ubuntu systems, installing the package typically starts the ssh process that answers requests from other systems.

Check if sshd is running. In shell, run

ps aux | grep ssh

I see this, which means it is running:

root   1144  0.0  0.0  67824  5448 ? Ss   Dec06   0:00 /usr/sbin/sshd -D

If it is not running, again, I'm surprised because the packaging scripts will usually turn that on in Ubuntu.  You can turn it on.  The steps are written out on the basic page. https://help.ubuntu.com/community/SSH/OpenSSH/Configuring

Check if you can log in FROM THE SAME system

Open a terminal, and try to ssh into your own account. Try

ssh localhost

You can also try "ssh yourname@your.ip.number" as well. If you can't do it from your own system, then you know the ssh service is not turned on or configured correctly.

Bring your laptop and sit next to the trouble server system.  If ssh works on same system, but not from other systems, then you have a different problem to find.  If you have been fiddling with firewalls and such, then you've probably outsmarted yourself. I sometimes have settings in /etc/hosts.deny and /etc/hosts.allow that are contradictory.

You can monitor your system logs on the server while you try to log in from your laptop.  Sometimes you can see the trouble. I think the right file to watch is /var/log/auth.log. That may give you some hints.

You don't mention what firewall settings you might have, but I would turn off the firewall entirely for a few minutes to test out the ssh server. Of course, you turn that back on.

In my experience, this is one way in which running Ubunutu is a little bit more frustrating than other linuxes, so be patient.

After all that, then go someplace else to try. If there is  trouble

It may be that the network administrators in your system are blocking access. Administrators at my place have become very strict and now filter all incoming ssh requests, NO MATTER WHAT PORT!  If you are in that unhappy situation, you will need to get the administrators to set up a VPN for you.

Or it may be your own configuration has blocked your access. Sometimes you can see that while tracking auth.log or "dmesg" output more generally. If you get to that stage, you should write back. Somebody here who is better at iptables will help you, I expect.

In summary, don't start changing settings until you know what works out of the box.  Later on, after it works, fiddle with settings. Change one thing at a time.  I always turn on X11 forwarding. You were wise to change the root password setting in /etc/sshd_config. Changing the port seems, well, not highly beneficial.


Totem: Use --no-existing-session as default

Copy the global totem.desktop file to your local applications folder:

cp /usr/share/applications/totem.desktop ~/.local/share/applications

Change the line Exec=totem %U to Exec=totem --no-existing-session %U

gedit ~/.local/share/applications/totem.desktop

Save the file and close it. The change should take effect immediately.


Modify the SSH welcome message to include system IP address

The message you refer to is the "motd", or "Message of the Day". It's contained in /etc/motd.

This is generated by update-motd, documentation for which is here: https://wiki.ubuntu.com/UpdateMotd#Design

See this related question: How do I edit the ssh motd?

To directly answer your question, you could add a file called /etc/update-motd.d/50-ip-address with this content:

#!/bin/bash
ifconfig |grep "inet addr"

This will very simplistically add all the configured internet addresses on your system to the motd file.

The motd is updated "at each login" (as per man update-motd). You can play with the number as the first part of the script's name to decide the order in which the IP address will appear.

As the files in /etc/update-motd.d are simply shell scripts, you can write something as simple or as complicated as you want.


In theory unlimited. The hardware is your limit.
Samba supports a [homes] setting. See chapter 9 in the manual.

[homes]
    browsable = no
    writable = yes

  The [homes] share is a special section of the Samba configuration file. If a user attempts to connect to an ordinary share
  that doesn't appear in the smb.conf file (such as specifying it with a
  UNC in Windows Explorer), Samba will search for a [homes] share. If
  one exists, the incoming share name is assumed to be a username and is
  queried as such in the password database ( /etc/passwd or equivalent)
  file of the Samba server. If it appears, Samba assumes the client is a
  Unix user trying to connect to his home directory.

That is likely to be the easiest to manage method for lots of users.

We have a users group (GID 100) you can use to group those users and apply settings to that group.

But the more obvious way would be to use active directory if you have that. Setup almost totally on the Windows side and not on the server.

Mind the part in bold.


Welcome to AskUbuntu!

I've had this problem before, it seems to be actually a known issue with web-based UI elements:
https://appdb.winehq.org/objectManager.php?sClass=version&iId=19444

You can try starting steam with -no-cef-sandbox argument. (Although it may be a security risk. I would use it as a temporary solution).


How to increase volume beyond 100% on Xubuntu from command?

Use pactl to change "set-sink-volume":

pactl set-sink-volume 0 120%

you can do it relatively too:

pactl set-sink-volume 0 +10%


How can I configure a service to run at startup

sudo update-rc.d minidlna defaults

This should add the service to the automatic startup system. But if you get:

System start/stop links for /etc/init.d/minidlna already exist.

Do the command

sudo update-rc.d minidlna enable

P.S.: For further detail look at the man page for update-rc.d by typing the command man update-rc.d


Reading logs after I've had to hard reboot

Logfiles are located in /var/log.

Log files related to suspend:

/var/log/pm-suspend.log

Older entries (# is a number):

/var/log/pm-suspend.log.#
/var/log/pm-suspend.log.#.gz

The latter one with the .gz prefix is a compressed file and must be uncompressed before reading.

Related to the X server (0 is the display number, it's usually 0 unless you switch users):

/var/log/Xorg.0.log
/var/log/Xorg.failsafe.log

Older entries:

/var/log/Xorg.0.log.old
/var/log/Xorg.failsafe.log.old

Useful commands for the terminal:

Reads the log file and present it in a pager. You can use arrow keys, Page up/Down and Home/End to navigate. Compressed files are recognized too, there is no need to uncompress them before use:

less /var/log/pm-suspend.log

Uncompressed a file and saves it to file. The latter program (gunzip) removes the original file.gz file

zcat file.gz > file
gunzip file.gz

Monitor logs (add new lines as they are added):

tail -f /var/log/kern.log

List log files, sorted by last modification date:

ls -lAtr /var/log


I don't want Ubuntu to treat HDD as a removable storage

You can permanently mount the partition on your HDD by putting it in fstab.

You will need a bit of information to do that.  After mounting your HDD as removable storage, find the partition's UUID by opening a terminal and typing sudo blkid (enter your password when asked).  This will return lines like this:

/dev/sda6: LABEL="A Label" UUID="1e257c3b-a275-4b87-b6dc-bbfb945b8e5c" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="55d4f90c-6da8-4650-aa37-744c0a338f2d

Find the partition for your HDD and make a careful note of its UUID.

If your partition's type is not ext4, stop here and leave me a comment!

In the same terminal window, type

sudo cp /etc/fstab /etc/fstab-backup

This backs up the critical file you are about to update!  Then type sudo mkdir /media/myHDD (change the directory name if you like)

Then, using the text editor of your choice, edit /etc/fstab (root privilege required).  Insert a line like this:

UUID=[that thing you made a careful note of] /media/myHDD ext4 defaults 0 2

Save your work and exit the editor. Then open a terminal and type sudo mount -a.  If all went well, the HDD will be mounted through fstab.  If you get error messages, don't reboot your PC until you have 1) restored the fstab backup or 2) figured them out.


metrics.sh must be executable from a CLI as a first step in troubleshooting your issue.  Common failure causes is the script not being executable or a coding mistake in the script.

ls -l metrics.sh

Should have the x flag set for the correct owner, group or world.

./metrics.sh

Should run error free or will provide error messages that indicate coding or privilege problems.

Cron jobs run more reliably when using fully qualified directives and not assuming that all variables will be passed to cron.  ex:

* * * * * $HOME/metrics.sh

or

* * * * * /home/user/scripts/metrics.sh

Your script is elegant and I see no obvious programming errors.  However, note that bash scripts should have the following first line:

#!/bin/bash


Is there any way to disable "Automatically connect to this network when available" permanently by default?

NetworkManager only connects to a network of you have a profile for it. And NetworkManager does not create profiles, also because it wouldn't know which settings to you. So this security concern seems unwarranted. Yes, if you click in nm-applet, gnome-shell or plasma-nm on a Wi-Fi for which no profile exists, one will be created. But don't click, if you don't want that. And if you accidentally clicked, remove the profile again, that doesn't seem too hurtful.
There is an exception for "NetworkManager does not create profiles". If you didn't configure no-auto-default in NetworkManager.conf, and if you have an Ethernet device without a suitable profile, then NetworkManager will create a profile named 'Wired connection 1'. But if you have a profile, that won't happen. Also, if you delete or modify the generated profile, NM remembers that in /var/lib/NetworkManager/no-auto-default.state file.
Except the no-auto-default case (that you already diabled), NetworkManager does not generate profiles. Connection profiles are in their entirety created by the user (or by some NetworkManager client tool, presumably on behalf of the user). I think the noution that NetworkManager has defaults for properties of a connection profile is not right, and you cannot thus configure a default.
Note there is an exception to this: certain properties allow to be explicitly set to a value that indicates a default, and you can overwrite that default values in NetworkManager.conf. In this case the property of the profile explicitly says to use a default. But that is only implement for certain properties, and would hardly make sense for autoconnect, because those kind of defaults depend on the device (and autoconnect property is independent of a device). See man NetworkManager.conf for these kinds of connection defaults).
Of course, when you use a certain tool to create a profile, that tool may have a default.
For example, if you drop a file to /etc/Networkmanager/system-connections and omit the autoconnect setting, it defaults to true. Solution: when you drop the file, create it with the autoconnect setting unset.
Or for example, if you use nmcli connection add to create a profile, the new profile will be create (by default) with autoconnect enabled. Solution: pass autoconnect no on the command line, or use a shell script that helps you, or use an entirely different tool.
Or for example, if you create the profile via nmcli device connect (which creates a profile if none exists) it will be be created with autoconnect enabled. Solution: don't use this way to create the profile or adjust the profile afterward with nmcli connection modify.
Or for example, if you create the profile with nm-connection-editor, the GUI is preinitialize to autoconnect automatically. Solution: untick the option before clicking "Save".
Of course, usually you create the profile once with the settings you want, and afterwards just use it. So, have the step of profile creation followed by something like nmcli connection modify "$PROFILE" autoconnect no.
Or even  for U in $(nmcli -g UUID connection) ; do nmcli connection modify uuid $U autoconnect no; done.
No, most tools (nmcli, nm-connection-editor) don't allow you to define a default values for settings when creating . Instead, they usually allow you to specify the settings while creating the settings. Or create your own tool. NetworkManager's primary goal is to provide an API for network configuration. Use that API and create the profile as you prefer.
As to why most tools have a certain default and not the other, the answer is that this is usually deemed more useful, what most users would want. It's clear that the default value is nor right for everybody, otherwise the option wouldn't be configurable to begin with. The reasons for tying a profile to a certain interface name (or MAC address) are not very strong, but it's because (unless you set connection.multi-connect) a profile can only activate once at a time. It seems preferable in that case to tie the profile to on device.


Will my Ubuntu One data be removed completely with the impending shutdown?

Quote from their website:

  You have until 31 July 2014 to collect all of your content. After that
  date, all remaining content will be deleted.

So your data will be deleted.


Problem installing .deb in Software Install Ubuntu 20.04

If you are using firefox, and opted to download and open the file with Software Install, what has likely occurred is the file has been downloaded into the /tmp/mozilla_userX directory, from which the Ubuntu Software Installer is not able to install anything.
Opting to save the file first before opening with Software Install should solve this issue.
For files that have already been downloaded, moving the file out of the /tmp/mozilla_userX directory into a sub-directory of /home/user/, e.g. Downloads, should solve the problem.


What exactly is meant by a "niced" and an "un-niced" user process?

Those terms simply refer to whether a process's default nice value has been changed. A "niced" process is one that has been run with the nice command (or whose niceness has been changed by renice) and an "un-niced" process is one that hasn't been run with nice. The default nice values for regular processes (those which haven't been run with nice command or whose niceness hasn't subsequently been changed by renice PID) is 0. So, "un-niced" processes are those with a nice value of 0 and "niced" processes are those with a nice value != 0.

A nice value does not indicate the priority of the process, it indicates the niceness of the process. You can see both values in the output of top:

$ top -b -n1 | head
top - 15:23:10 up 20:59,  1 user,  load average: 1.41, 1.75, 1.88
Tasks: 222 total,   1 running, 221 sleeping,   0 stopped,   0 zombie
%Cpu(s): 14.2 us,  7.9 sy,  0.0 ni, 76.6 id,  0.6 wa,  0.0 hi,  0.6 si,  0.0 st
GiB Mem :    7.791 total,    3.082 free,    3.862 used,    0.846 buff/cache
GiB Swap:   16.000 total,   15.793 free,    0.207 used.    3.485 avail Mem

  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
 1591 terdon    20   0 1605.1m 362.3m  18.8  4.5 285:46.34 S chromium
 1754 terdon    20   0  790.8m 184.5m  18.8  2.3 405:54.21 S chromium
 1186 terdon    20   0 1992.8m 459.6m  12.5  5.8 119:31.59 S cinnamon
                ^^  ^^
                 |   |---------> niceness
                 |-------------> priority

If I now set a nice value for one of those chromium processes, you'll see the difference:

$ renice 10 1591
1591 (process ID) old priority 0, new priority 10

$ top -b -n1 | head
top - 15:24:56 up 21:01,  1 user,  load average: 0.89, 1.48, 1.77
Tasks: 225 total,   1 running, 224 sleeping,   0 stopped,   0 zombie
%Cpu(s): 14.2 us,  7.9 sy,  0.0 ni, 76.6 id,  0.6 wa,  0.0 hi,  0.6 si,  0.0 st
GiB Mem :    7.791 total,    3.033 free,    3.908 used,    0.849 buff/cache
GiB Swap:   16.000 total,   15.793 free,    0.207 used.    3.439 avail Mem

  PID USER      PR  NI    VIRT    RES  %CPU %MEM     TIME+ S COMMAND
 1591 terdon    30  10 1605.1m 362.6m  23.5  4.5 286:10.40 S chromium
 1754 terdon    20   0  790.8m 184.5m  18.8  2.3 405:54.21 S chromium
 1186 terdon    20   0 1992.8m 459.6m  12.5  5.8 119:31.59 S cinnamon

The nice value of a process is used to determine its priority, but the actual priority of a process (the PR column) is not the same as its niceness. Put simply, niceness values determine how "nice" a process is to the other processes of your system. If it is very nice (high nice values), it will be "polite" and allow other processes to take precedence and use more CPU time (in other words, it will have a low priority). If it is not nice, it will try to get as much CPU time as possible for itself (so it will have a high priority).

To make things even weirder, priority values range from -20 (the highest) to +20 (the lowest) and niceness values range from 19 (the highest niceness, so the lowest priority) to -20 (the lowest niceness, so the highest priority).

I don't know the exact mechanism by which a niceness value is converted into a priority. The details seem to depend on the kernel version and specific implementation (see the "Notes" section here). However, as a crude approximation, you can think of it as:

Priority = DefaultPriority + Niceness

To illustrate, I'll launch 3 instances of a script called foo.sh (which just runs a sleep command) with different niceness values:

foo.sh &                # default
nice -n 10 foo.sh
nice -n 15 foo.sh
sudo nice -n -10 foo.sh

The last one uses sudo because only root can start processes with negative (high) priority. Now, let's see what their priorities are:

$ top -b -n1 | grep foo.sh
21958 terdon    20   0   13.3m   2.7m   0.0  0.0   0:00.00 S foo.sh
22148 terdon    30  10   13.3m   2.7m   0.0  0.0   0:00.00 S foo.sh
22181 terdon    35  15   13.3m   2.7m   0.0  0.0   0:00.00 S foo.sh
23480 root      10 -10   13.3m   2.6m   0.0  0.0   0:00.00 S foo.sh

As you can see above, the priority is equal to the sum of the niceness value and 20, the default priority.


Can Firefox open (embedded) PDF's without starting Okular?

You can try installing PDF viewer addon in firefox
Here is the link:
https://addons.mozilla.org/en-US/firefox/addon/pdfjs


Adding negation to the time match of iptables. What does it mean?

Your negation rule would probably work, but you might want to instead consider doing this as two rules separately rather than using a single negation rule (because sometimes they have problems or can be confusing when debugging your rulesets).

You may want to consider splitting this into two rules instead of using one negation rule:

iptables -A MYCHAIN -m time --timestart 00:00 --timestop 07:00 --days Mon,Tue,Wed,Thu,Fri,Sat,Sun -j DROP
iptables -A MYCHAIN -m time --timestart 15:00 --timestop 23:59 --days Mon,Tue,Wed,Thu,Fri,Sat,Sun -j DROP

That said, we can reduce the complexity of the rules greatly as well.  The defaults for days is "Every Day" so you don't have to define it, timestart defaults to 00:00, and timestop defaults to 23:59, so these two rules can be rewritten and simplified to:

iptables -A MYCHAIN -m time --timestop 07:00 -j DROP
iptables -A MYCHAIN -m time --timestart 15:00 -j DROP

Alternatively, we can do the inverse and do this instead:

iptables -A MYCHAIN -m time --timestart 07:00 --timestop 15:00 -j ACCEPT
iptables -A MYCHAIN -j DROP

... and then any time outside this hits the DROP rule.  The only reason this might not be desirable is if you have other access control rules in place that also need adhered to, in which case use the previous suggestion I made.


Ubuntu and apt in general have a very cool feature called "Dependency Resolution."

Meaning, it will automatically install all required dependencies for you at the time of install. If it cannot, it will usually complain and the program will not work.

In your case, it sounds like everything installed and dependency resolution did its job right.

FFR, apt will always let you know if something is wrong. If it doesn't say something is wrong, it worked.


How do I read CPU temperatures on a Phenom II processor?

Have you tried "acpi -t"? It shows a bunch of other temperature sensors in additional to each core.


The Widget Layer plugin provides functionality to show and hide your widgets at will. You can define what windows are widgets and press a key / mouse button or screen edge to show them.

Source and more about: http://wiki.compiz.org/Plugins/Widget

I didn't understand well what exactly does this plugin until I wasn't in Behaviour tab to add a new widget window. I grabbed, for example, my gnome-terminal window and then I was played with F9 key to see what is happening.


How do I download from my ubuntu-one account now?

Just login via the web interface at http://one.ubuntu.com/ and download your files to your computer. After that you can sync them to another cloud.


"Install Ubuntu alongside Windows boot manager" not showing when Installing in Legacy Mode

I don't know much about Windows dynamic partitions except that I should avoid them for linux.

The drive space where you want to install Ubuntu can be treated this way

Boot into Windows

Remove the partition and leave the drive space as unallocated. From your question I guess this is it:

Ubuntu (F:), Dynamic, Simple, NTFS, 123.96GB

Boot into the Ubuntu boot drive (USB or DVD)

Alternative 1:

Start gparted and create partitions for Ubuntu: One big partition for the root file system and one small partition for swap. You can let the installer create the file system alias 'format the partition'. If you want to create it manually, I suggest ext4 for the root partition.
Start the installer and at the partitioning window select Something else and select the partitions you created with gparted.

Alternative 2:

Start the installer and let it find the unallocated drive space. You must check very carefully, that it really finds and selects this space, because it might not see Windows and suggest to overwrite it. So this alternative is more risky. (Here you might or might not see 'Install alongside').


Downgraded from Windows 8, and can't get ubuntu installed

install win 7 first. create separate partion for ubuntu from windows. and install ubuntu in the new partition.
http://lifehacker.com/5403100/dual+boot-windows-7-and-ubuntu-in-perfect-harmony


Repair boot after update from 13.10 to 14.04 LTS

You probably have it solved after more than a month... The following worked for me:

Try to turn-off EFI (secure) boot in BIOS and try it again.
Then use a recovery DVD (or a GParted CD, for example).
Mount the partition containing /boot directory (e.g. /dev/sda2).
Use "grub-install" and install it onto a MBR of your HDD - you will have to tell it where the /boot is. I also had to use the -force option.

After that the 14.04 booted up normally.


I found out how to do it :) Simply go into Network Manager > Edit Connections. Select your connection, click Edit and check Available to all users.

You may also need to add a line for each interface that you want to automatically come up at boot time in /etc/network/interfaces:

auto eth0
auto wifi0


PHP Fatal error: sodium_init() in Unknown on line 0

sudo apt remove php-libsodium

The modern Sodium cryptography library has now become a core extension in PHP.
http://php.net/manual/en/migration72.new-features.php


Extensions

According to Vendor Specific Database Extensions page on the PHP site, there are two SQLite extensions:

SQLite
SQLite3

SQLite3 extension is a newer replacement of SQLite, which soon will become obsolete:

  The SQLite extension is enabled by default as of PHP 5.0.
  Beginning with PHP 5.4, the SQLite extension is available only via PECL.

Ubuntu 10.04 vs 12.04

Now, some practicalities. Let's have a look at default web server configuration that was installed using:

sudo apt-get install apache2 php5 php5-sqlite

Ubuntu 10.04:

# php --ri sqlite

SQLite

SQLite support => enabled
PECL Module version => 2.0-dev
SQLite Library => 2.8.17
SQLite Encoding => UTF-8

# php --ri sqlite3

sqlite3

SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.6.22

Ubuntu 12.04:

# php --ri sqlite

Extension 'sqlite' not present.

# php --ri sqlite3

sqlite3

SQLite3 support => enabled
SQLite3 module version => 0.7-dev
SQLite Library => 3.7.9

So, Ubuntu 12.04 default PHP installation (as of writing this - version 5.3.10) already does not have sqlite extension as built in. The output above states that only sqlite3 extension is present, which came from php5-sqlite package.

Solution

Pick your evil:

Right approach in long term would be to adapt the code to get it working under SQLite3. The changes would be minor, but this might involve some unwanted copy-paste-style work on a big amount of files. If this is the case, and right is not a right word here, solution 2 is for you.
Install obsolete extension from PECL.


Ubuntu 16.04 kworker using high CPU constantly

Same problem here on a Dell XPS laptop and kernel 4.4.0-130

I fixed it by disabling dynamic USB power management in kernel

I added usbcore.autosuspend=-1 to my kernel's boot command line:

GRUB_CMDLINE_LINUX_DEFAULT="<existing stuff> usbcore.autosuspend=-1"

To do that permanently, open the grub configuration file

sudo nano /etc/default/grub

and add the flag described above.

Next you have to update your grub via

sudo update-grub

After reboot, everything should be fine, the busy CPU is now free for doing something useful :)

Disabling dynamic PM might impact battery life when you have USB devices connected, but few USB devices are able to handle this mode....


Weird swap situation on Ubuntu 18.04.3 Desktop clean install

GParted doesn't handle LVM (Logical Volume Management) volumes. You need to install an LVM manager for that, such as kvpm. Shown below is a screenshot of kvpm from my system where you can see the swap volume within the nvme0n1p3 partition.

After deleting the swap volume, kvpm crashed, but then I was able to resize the root volume to include the extra ~1GB that the swap volume had occupied (right click, Extend logical volume):

I still don't know what the ext4 partition from my question (nvme0n1p2) is used for.

Also, once I deleted the swap volume, I was unable to create another one due to lack of space. The option to Reduce the size of the root volume was grayed out.

I confess I don't fully understand LVM and kvpm, so I'd stick with a swapfile, which is clear and simple to manage (delete and recreate with different size).


How to change tab in Google Chrome with the keyboard, in Ubuntu

Most shortcuts in other systems also apply:

Ctrl + TAB = next tab

Ctrl + Shift + TAB = previous tab

Ctrl + T = new tab

Ctrl + W = close tab

Ctrl + Shift + T = reopen last closed tab


While I'm sure there are more elegant and official methods, I have found a workaround to get the icon.

You can locate the icons associated with the applications by searching the desktop launcher and viewing the icon= entry.

In the `` example in the question, you would search the name after the the "." dot, which is Google-chrome.

This commandline will provide the Desktop Launcher:

$ egrep -ir "\b$Google-chrome\b" /usr/share/applications/*.desktop ${HOME}/.local/share/applications/*.desktop | head -1

This will give the Chrome desktop launcher:

/usr/share/applications/google-chrome.desktop

Now search for the icon entry:

$ egrep -i "icon=" /usr/share/applications/google-chrome.desktop
Icon=google-chrome

In this case, the launcher not having a full path, you can find it's the icon of the current theme, which can be found with a python script provided by Stefano Palazzo.


I think you would like to be using the latest features in Ubuntu and start playing with it and your not worried about 5 year extended support because you will be upgrading to Ubuntu 14.04 if you start using it soon so my recommendation is to install the latest stable Ubuntu version:

http://www.ubuntu.com/download/desktop/thank-you?release=latest&bits=64&distro=desktop&status=zeroc

If you like a nice interface and very simple to use:

https://wiki.ubuntu.com/UbuntuGNOME/GetUbuntuGNOME

There are more if you wish to look arround but my favourite is Gnome Ubuntu.

PS: Remember to use the 64 bit version of Ubuntu to use all your RAM and get the best performance.
I think Gnome Ubuntu is much better for touch screens :)


You can use the date command to set the time:

sudo date -s "2014-07-04 10:53:59"

For more info, you can look at the manual page by running:

man date

If you want to ntp and network time, you may just need to set the server as described here.


tar -xzf [filename]

will extract. To see the contents before extractring try tar -tvzf [filename]


Well I have figured it out. The theme of my problems are almost always configs so i tried removing them that fixed the issue by creating a new config file.


Live USB boot from the Ubuntu 16.04 iso freezes and fails to operate

Downloaded software can be corrupted in transit, so there's a way to check and make sure what you downloaded is correct.

After you have downloaded http://releases.ubuntu.com/16.04.4/ubuntu-16.04.4-desktop-i386.iso, you can verify the integrity of the download from within Windows before you put it on your USB flash memory drive. Download both the SHA256SUMS file and the SHA256SUMS.GPG file which match that download, and then make sure the ISO arrived intact by downloading GP4WIN and using it to make sure everything's OK before you make the LiveUSB to boot Linux with, with the steps shown at https://www.howtogeek.com/246332/how-to-verify-a-downloaded-linux-iso-file-wasnt-tampered-with/.

However, the Ubuntu package is a little hefty for a machine with only 1.1GB of RAM, and if that should fail, I would try Xubuntu instead, which needs less memory to run.


In order to edit system files, you have to open them with admin privileges, for example:

gksudo gedit /etc/samba/smb.conf

For more info, check out the RootSudo wiki