Postgresql - configuring as Upstart job problem

I had the same desire to configure pg this way. For me, I wanted multiple clusters, each with their own independent scheduler (pgagent). When I shut down an individual cluster pgagent will stop automatically, but when I start a cluster I want pgagent to start automatically for that cluster also. If I forget to start the scheduler when I start a cluster, I'm in trouble.

I had Googled around, but never found a good solution to running PostgreSQL under Upstart. Most of the solutions explicitly started the postmaster instead of using the pg_wrapper commands. With the way Upstart works, this seems dangerous and could result in data loss in rare situations.

Thus, I forged ahead and tried to create my own Upstart scripts that would do the job. I found that it was very difficult to capture the correct PID of both the cluster and its pgagent instance. Eventually however, I realized that with PostgreSQL, you don't actually care about PIDs. You care about versions and clusters. Once I realized that, it all came together, and I created the following three scripts:

The first I call pg_versions.conf.

description "PostgreSQL Version Controller"
author "Brian Myers"

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

env DEFAULT_VERSIONS="9.3"

pre-start script
  if [ -z $VERSIONS ]; then
    VERSIONS=$DEFAULT_VERSIONS
  fi
  for version in $VERSIONS
  do
    for cluster in $(pg_lsclusters -h | grep $version | cut -d" " -f 2)
    do
      if [ `tail -1 /etc/postgresql/$version/$cluster/start.conf` = "auto" ]; then
        start pg_cluster version=$version cluster=$cluster
      fi
    done
  done
end script

post-stop script
  if [ -z $VERSIONS ]; then
    VERSIONS=$DEFAULT_VERSIONS
  fi
  for version in $VERSIONS
  do
    for cluster in $(pg_lsclusters -h | grep $version | cut -d" " -f 2)
    do
      stop pg_cluster version=$version cluster=$cluster
    done
  done
end script

Next is pg_cluster.conf.

description "PostgreSQL Cluster Controller"
author "Brian Myers"

instance $version-$cluster

pre-start script
  if [ `pg_lsclusters -h | grep $version | grep $cluster | cut -d" " -f 4` = "down" ]; then
    pg_ctlcluster $version $cluster start || :
    start pg_agent version=$version cluster=$cluster || :
  fi
end script

post-stop script
  if [ -e "/var/run/postgresql/pgagent-$version-$cluster.pid" ]; then
    stop pg_agent version=$version cluster=$cluster
  fi
  if [ `pg_lsclusters -h | grep $version | grep $cluster | cut -d" " -f 4` = "online" ]; then
    pg_ctlcluster $version $cluster stop
  fi
end script

And finally pg_agent.conf.

description "PgAgent Controller"
author "Brian Myers"

instance ${version}-${cluster}

setuid postgres

pre-start script
  PORT=`pg_lsclusters -h | grep $version | grep $cluster | cut -d" " -f 3`
  if [ -z `psql -c "select schema_name FROM information_schema.schemata WHERE schema_name = 'pgagent';" -d postgres -p $PORT | grep pgagent` ]; then
    stop ; exit 0
  fi
  PGAGENTDIR=`which pgagent`
  PGAGENTOPTIONS="host=/var/run/postgresql dbname=postgres user=postgres port=$PORT"
  start-stop-daemon --start --oknodo --name "pga$version$cluster" --exec $PGAGENTDIR -- $PGAGENTOPTIONS
  pgrep -f "$PGAGENTDIR.+$PORT" > /var/run/postgresql/pgagent-$version-$cluster.pid
end script

post-stop script
  start-stop-daemon --stop --oknodo --pidfile /var/run/postgresql/pgagent-$version-$cluster.pid
  if [ -w /var/run/postgresql/pgagent-$version-$cluster.pid ]; then
    rm -f /var/run/postgresql/pgagent-$version-$cluster.pid
  fi
end script

If you want more than just the 9.3 version, just add the versions to the env DEFAULT_VERSIONS="9.3" line separated by spaces.

With these, I can:

Start all clusters not already running:
sudo initctl start pg_versions

Start all clusters for a particular version not already running:
sudo initctl start pg_versions version=9.3

Start a particular cluster, auto-starting pgagent for that cluster, but only if the cluster is pgagent enabled:
sudo initctl start pg_cluster version=9.3 cluster=main

Start a cluster's pgagent if the cluster is pgagent enabled:
sudo initctl start pg_agent version=9.3 cluster=main

Change start to stop to get the inverse behavior. Of course everything starts up on boot and shuts down on stop via pg_ctlcluster, so no data loss. I did have to disable the init.d scripts via bum.

I'm sure these could be cleaned up or done in even better ways. The pg_agent script for example -- I could never figure out why using script or exec couldn't capture the correct PID. Eventually I gave up and managed the pid file myself, but it's still a mystery. It was probably my very soft shell scripting skills.

Note also that if you shut down clusters manually with pg_ctlcluster these Upstart jobs will still show as running even though the associated versions/clusters are not. Not a big deal because you can just restart them with either pg_ctlcluster or initctl, but for that reason I suggest using initctl to control your clusters if you deploy these jobs.

In any case, these work quite well for me.


Super confused between upstart and systemd

It is likely a permissions issue. Both .conf files need to be executable.

Do:

chmod a+x ~/.config/upstart/shutdown.conf


Python script as a service on Ubuntu 11.10

webserver.py is exiting with a non-zero value. By default Upstart considers this an error and so is attempting to restart the service.

As to why webserver.py is exiting - my guess would be that it is assuming a particular environment. When Upstart spawns a process, it clears the environment, just like cron and at, and then sets a very small number of variables, namely:

TERM
PATH
and a few Upstart-specific ones (see http://upstart.ubuntu.com/cookbook/#standard-environment-variables)

To see the entire job environment, add a call to set as shown here:

http://upstart.ubuntu.com/cookbook/#see-the-environment-a-job-runs-in

If your python service needs other variables, you can set them using "env" (the Upstart stanza, not the shell command). See:

http://upstart.ubuntu.com/cookbook/#env
http://upstart.ubuntu.com/cookbook/#export


Problem with MAC address getting changed to the original one upon connection

make this new script, this will make settings permanent !

sudo gedit /etc/network/if-up.d/changemac

paste this code, replace mac address you want

#!/bin/sh
if [ "$IFACE" = eth0 ]; then
ip link set dev "$IFACE" address 00:00:00:00:00:01
fi

sudo chmod 755 /etc/network/if-up.d/changemac

now disconnect the ethernet and connect again and check the mac by running ifconfig

(I know this may not be the proper solution, but as temporary measure)
you could try fedora. in fedora you change easily change mac address from GUI and it stays persistent.

Or wait for more responses


How to continuosly update an ENV variable (eg PS1) inside a script that runs in the background?

That doesn't work at all: A script that you started from the current shell can only modify its own environment, not that of its parent shell.


How do I make "add icons to the desktop" work in 10.04?

Did you disable showing the desktop? As your regular user that is missing the shortcuts, run gconf-editor. Then navigate to Apps -> nautilus -> preferences and toggle the show_desktop option.

Also, make sure your regular user owns his desktop folder. i.e.

sudo chown -R regularuser:regularuser /home/regularuser/Desktop


It depends: if you have console access (that is: can you access the BIOS and boot the server remotely from different partitions) then yes, you can use CloneZilla by installing it on a small FAT partition of your disk and booting it from there once the install is finished.

If you only have access to Ubuntu itself after it was booted, then no, CloneZilla is not the tool for you.

If you would like a software recommendation on which tool to use, go to Software Recommendations Stack Exchange, a sister site to Ask Ubuntu.


What is the difference between  and -security repositories in apt?

This is addressed in the Security Team FAQ:

How are components and pockets used in the builds, and how do they affect security updates?
[...]
Ubuntu also has several pockets that further divide the archive:
release, security, updates, proposed and backports. [...]
The release pocket is simply the name of the release, and the other
pockets are denoted by <release name>-<pocket>. For example, the
release pocket for Ubuntu 16.04 LTS, the Xenial Xerus, is simply
xenial, while the security pocket for Ubuntu
16.04 LTS is xenial-security. Packages in release, security and updates are supported by the Ubuntu Security team, while packages in
backports are supported by the community and packages in proposed
are the responsibility of the uploader. When packages are built, only
certain pockets are available during the build:

release: during the development cycle, this is the only pocket
that is used. Once the development version is released, the release
pocket is frozen and does not change.

security: built with release and security.
UpdateProcedures
gives the process
used for creating security updates.

proposed: built with release, security, updates and proposed

updates: as a matter of Ubuntu policy, packages in updates are not directly built, but rather copied from proposed after they
have been tested. See
StableReleaseUpdates
for details. If a special circumstance warrants building a package in
updates without going through proposed first, it would be built
with release, security and updates (also, the default
configuration for unofficial PPAs is to build with this
configuration).

backports: built with release, security, updates and backports. See
UbuntuBackports for
details.

What repositories and pockets should I use to make sure my systems are up to date?

By default, Ubuntu systems have both the security and updates pockets enabled. Systems configured to use only the security pocket
are also supported.

While packages are copied from security to updates frequently, it is recommended that systems always have the security pocket
enabled, and use security.ubuntu.com for this pocket. For all other
pockets feel free to use archive.ubuntu.com or an archive
mirror{.https}. This
combination will ensure you are able to download important updates
immediately while taking advantage of the mirror network or
archive.ubuntu.com for all other downloads. Ubuntu systems are
configured in this manner by default.

So:

Is focal only what came packaged with the distro release?

Yes.

Does it not get security updates?

No.

Also, what's it called?

The "release" pocket.

What would happen, for example, if I had only focal enabled, or only focal-security enabled?

With only focal enabled, you'd be effectively limited to being able to install packages included in initial 20.04 release. With only focal-security enabled, you'd have a broken system, since you would quickly run into dependency problems (since not all dependencies would have had security updates, so some would still be only in focal).


Ubuntu 14.04 w/ Unity - java application gui does not show

Maybe this has been solved for you already, but I just ran into the same problem (Ubuntu 14.04, yEd & Unity). I have no idea what causes the problem, but the following workaround worked for me:

Select the running yEd using the icon in Unity's sidebar.
Hit Alt+Space. This should show the window menu, but for me it came up empty.
Hit the up or down arrow key. This should show the menu items.
Select Maximize.

This way I was able to bring up the yEd window, after that it worked for me.


Where's the default video monitor config file?

By default you don't need xorg.conf any more.
To create a new Xorg.conf make sure you are not running X, then run:

sudo Xorg -configure

This should generate in your current path a new xorg.conf file which you can then move to /etc/X11.


Shift + key not typing smaller case when caps lock is on

EDIT: If I change it to English (UK) it works fine... How can I make
it work with English (India, with rupee)?

If using an English (UK) selected keyboard in Settings → Language and Region then the rupee symbol can be achieved by using the following key combination ctrlshiftu then type 20b9 as a constant string without releasing the keys which produces the Unicode character ₹ for the Indian rupee.
There may also be an opportunity to use a keyboard shortcut for this if required (if used frequently) with US keyboard layout selected in Settings using AltGr4 which on the Eglish(UK) will produce the Euro symbol €.
Equally, this resource provides a simple way to copy/paste the rupee symbol.


Try the following commands based on How can I create a Windows bootable USB stick using Ubuntu?

Since you are running the Ubuntu 14.10 (Utopic) You need to replace trusty with utopic in the commands listed. The commands should look like this.

sudo add-apt-repository ppa:colingille/freshlight
sudo sh -c "sed -i 's/utopic/saucy/g' /etc/apt/sources.list.d/colingille-freshlight-utopic.list"
sudo apt-get update
sudo apt-get install winusb

You can start with the second line as you have already added the repository.  The PPA is not updated beyond Saucy. Without the second line sudo apt-get update fails as there is no version specific to Trusty or Utopic. This code tells update to use the Saucy version of winusb from the PPA in the Ubuntu 14.10 (also known as Utopic) .

Hope this helps


Somewhat convoluted ssh issue. Can ping, but not ssh, but only from on-site

Based on our lengthy conversation it seems quite likely that this is not a Ubuntu problem.  And, in fact, the problem you describe seems to be on the server side and not anything to do with your laptop.  Therefore, my "solution" would be to ping various IPs in your subnet until you find one that does not respond.  Then, change your laptop to use that IP as a static IP.  Test to see if you can now connect to the server via ssh.  I'll bet a diet coke this will work.  Then, go back to your old IP settings and present your findings to your uncooperative IT guys, who should thank you for doing their job for them.


Software Center Messing Around (Ubuntu 21.04)

"the original one" (which is a fork of gnome-software) is delivered as snap package, so to install it again you'd have to sudo snap install snap-store.
To remove gnome-software you'd have to: sudo apt remove gnome-software. If you'd also want to uninstall no longer needed dependencies (e.g. those that got pulled in while installing gnome-software) run: sudo apt autoremove.


Does the Ubuntu image I just downloaded already have all the latest patches and bug fixes included?

Once a new version of Ubuntu is released, all of the patches which have been released since the disk images were made will not be incorporated into them the next time you download them. The disk images made available for download at ubuntu.com are pretty much final. Instead, the patches are meant to be applied after installation by running updates, much like what ImaginaryRobots said in their answer. So long as Ubuntu is kept updated, you can be sure that the latest patches for your package versions are already applied.

A semi-exception to the rule is LTS releases, which include several point releases (i.e. 12.04.1, 12.04.2, etc.) after the initial release for the LTS is made, and a new image is built for each point release containing all of the updates released up to when it was built. This is due to the longer support period for LTS releases so you have fewer updates to install after download.

Daily images for the current development version of Ubuntu include all the latest patches and revisions for the newest packages as of the day you downloaded them - but these are made only for unstable versions of Ubuntu which haven't been released yet, and you are likely to run into lots of bugs if you try using them. Similar to official stable releases, these daily images can then also be kept up to date just by running updates.

The only reason why you might want to reinstall Ubuntu, typically, is to "fix" a broken system, or start over with a fresh install. If you plan on using the same version though, you likely won't need to download a new image - just run updates after everything's back in place.


System Network Certificate window Frozen

I have had this problem and it was really bugging me until I finally found a workaround for it.

You must simply try to connect to the network using another protocol without a certificate (LEAP). After trying to connect with LEAP, go back into your network settings and hit the arrow on the right of the network you are trying to join. This will open a new window with a settings option.

Click 'Settings...' then go to the 'WI-FI Security' tab and here change it to the protocol that uses a certificate and enter all the details.

The warning will still come up but should not freeze now when you make your changes. Tell me if this works for you or if you don't understand :). Also, I'm not completely sure but you may have to restart your computer after the changes are made.


Check the permissions where your /dev/sdb1 is mounted.

to check where the /dev/sdb1 is mounted.
~lsblk

modify permissions

~chmod 711 /mount point

maybe even change ownership of the directory you're sharing

~chown user:user /mount point


HP 2000-2d04TU Notebook (Ubuntu 12.04) wireless internet disabled

Run the below command to check if your wifi is hardblocked or softblocked,

sudo rfkill list

If your wifi is softblocked then try to unblock it by running the below command,

sudo rfkill unblock wlan

If it is hardblocked,then try to find the hardware switch to enable wifi.


I realized that it was easier to use MySQL Connector/J for the connection as @Oli described.


Is there a player that merge the end of a music with the beginning of the next?

The feature is called crossfading.

Rhythmbox

To enable it in Rhythmbox:

Click edit in the menu.
Click settings.
Select the tab Playback.
Check Use crossfading backend
Select the desired amount of crossfading.
Restart Rhythmbox.

Banshee

It seems that Banshee does not support crossfading. If you wish it you can select that it affects you at https://bugs.launchpad.net/banshee/+bug/135926 and you can also vote for it at http://brainstorm.ubuntu.com/idea/21564/.


I tried to install Skype on 12.04 LTS 64-bit and ended up with a 32 bit kernel. Help?

The best way to do this would be to reinstall Ubuntu.
Sorry.

If you are REALLY brave, you can reinstall all your packages with the x64 version, but that would just take way too long and there's no guarantee that it would work.

Similar thread:
How can I switch a 32-bit installation to a 64-bit one?


Can't play .mp4 files embedded in html5 player in Firefox

To "fix" this, all you need is install the "gstreamer0.10-ffmpeg" package and its dependencies. If you've upgraded from an older Ubuntu version, this package might already be installed but if this is a fresh install, you can get the package from a PPA. Add the PPA and install it using the following commands:

sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg

http://www.webupd8.org/2014/04/10-things-to-do-after-installing-ubuntu.html


MttJocy is partially correct, but there's a twist: The computer clearly uses the GUID Partition Table (GPT), which in turn means that Windows was almost certainly installed to boot in Extensible Firmware Interface (EFI) mode. On an EFI computer, GRUB doesn't install to the MBR; it installs to the EFI System Partition (ESP), which is a FAT partition that holds boot loaders. The ESP is usually the first partition on the disk. Furthermore, on an EFI computer, boot loaders normally register themselves with the firmware via an NVRAM entry. The firmware launches boot loaders based on the order in which they appear in the NVRAM. In your case, GRUB is still present in the ESP, and its NVRAM entry is still present, but GRUB's configuration files resided on a Linux-only partition and so are now inaccessible, rendering GRUB essentially useless. (IMHO, this is a bug in Ubuntu's configuration; it should put the GRUB configuration files on the ESP, not in Linux's /boot partition, to avoid precisely this problem.)

In any event, there are at least two solutions to this problem:

You can delete GRUB from the ESP. To do this, you'll need to boot an emergency system, access the ESP, and delete the EFI/ubuntu directory on that partition. With GRUB gone, your firmware will move on to the next item in its NVRAM boot list, which will probably be Windows.
You can adjust your NVRAM entries using a tool such as Linux's efibootmgr. To do this, you'll need to boot with an EFI-mode Linux emergency disc (the Ubuntu installer in "try before installing" mode should work, but you'll need to do a sudo apt-get install efibootmgr to install the tool). You can then do an efibootmgr -v to see the NVRAM entries and then use the -o option to set the Windows boot loader first in the list, as in efibootmgr -o 0001 if the Windows boot loader is Boot0001.

These methods both assume that the Windows boot loader is still intact and that its entry still exists in NVRAM. If not, you'll have to use Windows-specific tools to re-install the Windows boot loader or to restore its NVRAM entry. The Windows installation disc should be able to do the job, but I'm not very familiar with details of its operation.


I got the answer myself! If anyone is facing the same problem then :-

Use Page UP / Page Down to select any option.
In my case it went to the last option in the list ( - Memory check)
I opted for Memory Check and used 'Esc' to return to the GRUB menu
Now the Up/Down arror key started working.
PROBLEM SOLVED

My actual problem was ATI graphics card driver so I followed the amazing instruction in askubuntu post


No USB + low-graphics mode with kernel 4.8.0-36, OK on 4.4.0-62

The following link had the answer.

For whatever reason the USB and graphics drivers were contained in the linux-image-extras package, once installed everything worked fine.


Have encrypted my disk and need swap space

You can create a swap file instead of a swap partition if you like.  To create the swap file in /home, you would run the following commands (this creates an 8GB swap file):

sudo dd if=/dev/zero of=/home/.swap bs=1M count=8K
sudo mkswap /home/.swap

Then, you would want to add the following line to your /etc/fstab file:

/home/.swap  none   swap   sw   0   0

Finally, run sudo swapon -a to activate your swap.  You can change the commands and the fstab entry above to change where the swap file is being created.

Your swap will be encrypted automatically if the file is created within an encrypted partition, but it will not be accessible until after the encrypted partition is unlocked, which may cause problems with it not being automatically activated at boot.


Maybe there was some more commands that deleted the group... I installed qemu-kvm and virt-manager on 18.04.3. I deleted from group and gshadow. Then did a reinstall of libvirt-daemon-system based on @ChristianEhrhardt comment. After reinstall the group is added back and user that did the install is added to the group. Helps?

user$ grep libvirt /etc/group
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:130:
user$ sudo grep libvirt /etc/gshadow
libvirt-qemu:!::libvirt-qemu
libvirt-dnsmasq:!::

user$ sudo apt-get install --reinstall libvirt-daemon-system

user$ grep libvirt /etc/group
libvirt-qemu:x:64055:libvirt-qemu
libvirt-dnsmasq:x:130:
libvirt:x:129:user
user$ sudo grep libvirt /etc/gshadow
libvirt-qemu:!::libvirt-qemu
libvirt-dnsmasq:!::
libvirt:!::user


Start Glances server automatically upon boot

Ok so I found the answer based on several other answers. The user used here has an empty password and limited abilities but I will not cover that part. For the rest here is what you need to do:

Make folder to override default login prompt for tty1:

#mkdir -p /etc/systemd/system/getty@tty1.service.d

Copy the original tty configuration to edit it

#cp /usr/lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service.d/override.conf

Edit what will happen when boot process ends

#nano /etc/systemd/system/getty@tty1.service.d/override.conf

Now replace the line starting with "ExecStart=" by these (replace userX with yours):

ExecStart=
ExecStart=-/sbin/agetty -a userX --noclear %I $TERM

Now add the software to launch after login

#nano /home/userX/.profile

Add this at the end:

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
   exec glances
fi

DONE ! Upon boot, user is logged and glances is launched on the screen ! Hooray


This seems to be because the upgraded version of MySQL is incompatible with older versions of the java connector library.  I managed to fix the problem by upgrading the Java depencency:

     <dependency>
       <groupId>mysql</groupId>
       <artifactId>mysql-connector-java</artifactId>
-      <version>5.1.30</version>
+      <version>5.1.48</version>
     </dependency>


Just tested the same PPA on a clean Ubuntu 11.10. I suggest you update your Ubuntu with any updates shown in Update Manager. The only changes I did were to add all the official repositories (multiver, universe...) and all 4 of the Update tab option (backport, restricted...)
A cause might be that the version of Python you are using is different from the one the system needs. I was going to upload an image but somehow imgur and askubuntu have a problem.
UPDATE - I FINALLY!!!! uploaded the image to imgur.

As you can see from this incredible and very patiently uploaded image, the PPA actually works. So like i suggested, first see if you have another PPA or have change the Python that comes by default with Ubuntu 11.10.


Gdebi worked for me

all you need to do is install it and open your .deb files through it

sudo apt-get install gdebi


Fixing Two key events on single key press by xmodmap

Go to your home directory.

cd ~

Create/Open the file .Xmodmap.

vim .Xmodmap

Add the following lines.

keycode 65 = space
keycode 116 = Down

Log out and log back in.
The auto-repeat might be missing. To fix it, run:

xset r 66

To run it every time you log in, add it to the bottom of the file: /etc/X11/Xsession.d/50x11-common_determine-startup.

Note: I've assumed that space has the keycode 65 and Down key has 116.


It's not clear if this is a fresh install with a new profile. But it can happen that any browser's performance can degrade over time for various reasons: for example, conflicting extensions or some file being corrupted in one's profile.

First you could try creating a new "profile": with Chrome not running, simply rename the folder that has your details: home/yourname/.config/google-chrome/Default to something else. When you restart Chrome, it will create a new Default. Mostly, this solves most problems. For more details, consult the Linux section in Create a new browser user profile.

(If you have valuable bookmarks, you could export them as html before creating the new profile and import them later via Chrome's Bookmark Manager.)

If the browser performs well with the new profile, it could point to an issue with extensions you had installed. Some ad block extensions are known to affect performance, at least on some pages. If it's a problem with a single extension, all can be disabled and enabled one by one to see when performance degrades. You can get at your extensions by clicking on Customize and Control Google Chrome, Tools, Extensions or by entering chrome://extensions in the address bar and hitting enter.

You can also clear cache, cookies, and browsing history by pressing Ctrl + Shift + Delete together and making appropriate choices.

If you provide more details, someone may have specific guidance.


How do I know whether my graphic drivers are installed or not

Try running fgl_glxgears. If the driver is correctly installed, you should see an animation of a cube looking like this:

If you get an error, that means the driver is either incorrectly installed, or not installed at all. In order to install it, follow these instructions.


New software can't be installed, because there is a problem with the software currently installed. Do you want to repair this problem now?

Have you tried reinstalling deconf:

 sudo apt-get install --reinstall deconf

and then reinstall this:

 sudo apt-get install --reinstall debconf

and then this:

 sudo dkms--reconfigure debconf

and it might work fine this way.


How do I install this to get the printer working?

I would be wary of the site you give; I would suggest keeping clear;

if you look at this post Samsung ML2545 printer on Ubuntu 18.04 - a brick?

I have given advice on how to install the official ULD that Samsung provide; yes, commands are needed but if you copy them; paste into the terminal is right-click at the text prompt in the terminal; look for PASTE in the menu that appears ........ keep us in touch how it goes


WiFi-driver not Found in Mini PC (Ubuntu 18.04)

Try in a terminal:

  sudo cp /lib/firmware/brcm/brcmfmac43430-sdio.AP6212.txt /lib/firmware/brcm/brcmfmac43430a0-sdio.txt

Then reboot.

If the wifi specs for this pc are listed correctly in the link you provided, ubuntu is looking for the brcmfmac43430a0-sdio.txt, but for what ever reason it is in the firmware folder as brcmfmac43430-sidio.AP6212.txt. This command will simply make a renamed copy of that file.

It's hard to say if this will work without the output of:

  dmesg | grep brcm

(maybe add it to the question)

Also you may want to check linuxium's isorespin.sh. It can be used to create .iso's of ubuntu and many other distributions specifically for these atom single board computers, including wifi and audio.

Edit
brcmfmac43430-sidio.AP6212.txt is installed by isorespin and does not come preinstalled on ubuntu. It could probably be downloaded from somewhere, however isorespin adds a lot of other functionality like audio and some specific kernel parameters. A prespun version of ubuntu is available here. However I would recommend creating a lubuntu or xfce version for your mini pc because it has very limited memory.


My computer boots directly to windows 8.1 after installing Ubuntu14.02

You can install "boot repair" to fix the problem and try to install "grub 2.0", if the problem persist try to disable fast boot and enable UEFI MODE


How to install the latest version of poppler?

To be able to open password-protected pdfs with Evince on my own system I found (after much testing) that I had to compile the latest release of Poppler from source and also compile the latest release of Evince, building it against the newer Poppler.
How to upgrade Poppler & Evince to fix problems opening password-protected PDF files
First install all these prerequisites for compiling:
sudo apt install g++ autoconf libfontconfig1-dev pkg-config libjpeg-dev libopenjpeg-dev gnome-common libglib2.0-dev gtk-doc-tools libyelp-dev yelp-tools gobject-introspection libsecret-1-dev libnautilus-extension-dev

(more dependencies may be found on other systems but I'm working from a 2-week old installation, so hopefully this will be enough for most)
Poppler
Open a terminal so you are in your home directory. If you are really keen on tidiness, you can make a new directory for the two source directories you are going to end up with, for example mkdir poppler and enter it: cd poppler.
First download the encoding files (no need to compile these) to the current working directory
wget https://poppler.freedesktop.org/poppler-data-0.4.7.tar.gz

Extract (it does untar cleanly):
tar -xf poppler-data-0.4.7.tar.gz

Enter the directory
cd poppler-data-0.4.7

And magically send the files to the right locations in /usr/share with:
sudo make install

Now go back up one level
cd ..

Download & extract the main package:
wget https://poppler.freedesktop.org/poppler-0.44.0.tar.xz
tar -xf poppler-0.44.0.tar.xz
cd poppler-0.44.0

Now run the configure file like this:
./configure --enable-poppler-glib

Here you will get errors if I missed anything from my list of dependencies above. The errors might be illuminating eg 'thing-you-need not found' in which case you can try sudo apt install thing-you-need and try again. If that doesn't work, try searching online for the error message.
If it exits without errors you can run:
make

Which will take a while. When it's done, you can use sudo make install but even better, you can use checkinstall to make this installation known to dpkg (yay!) so:
sudo apt install checkinstall
sudo checkinstall

If you ever want to uninstall this, you can conveniently do so with sudo dpkg -r poppler as checkinstall will politely inform you. If you use sudo make install you can still uninstall at any time by entering the source directory (so keep it!) and typing sudo make uninstall
Evince
We've already got the dependencies for Evince, so assuming you are still in the poppler directory go back up to home with cd or to wherever you want to download Evince.
wget http://ftp.gnome.org/pub/GNOME/sources/evince/3.20/evince-3.20.0.tar.xz
tar -xf evince-3.20.0.tar.xz
cd evince-3.20.0
./configure
make
sudo checkinstall


Why do you need grub4dos to boot your machine?

I would use Super Grub2 Disk that can do the same thing much easier.


How can one remove all packages installed after a certain date/time?

Specific date %yyyy-%mm-%dd replace on here,
grep "2015-12-19.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1

You get a list of packages,
libck-connector0
libgssrpc4
libkadm5clnt-mit9
libkdb5-7
libkadm5srv-mit9
libgnutlsxx27
....
....

Append them to the list of Apt command arguments with xargs:
grep "2015-12-19.*.install " /var/log/dpkg.log | awk '{ print $4 }' | cut -d: -f1 | xargs sudo apt-get --yes purge


It technically is not combining the two hard drives but you could mount the two drives at various points in your directory tree, giving you easy access to the space on the two drives.

You can learn a bit about the general philosophy of the hierarchal file system used in all Unix and Linux systems, including Ubuntu here.

Without knowing more about your current setup and usage pattern, it is hard to give very specific advise. A common usage is to have a separate drive for your home directory (make sure you copy your current home directory contents to the new location before finalizing the result.

By editing the /etc/fstab file you can make the new setup mount automatically on startup.


Problem with installing Ubuntu alongside Windows 7

From what I see on your report it looks like you used WUBI to install your version of Ubuntu, but from the USB. There is a MBR Bootloader error on Sda7. This is where Ubuntu resides and Wubi is present. Because of this error your unable to boot into Windows.

WUBI stands for Windows Based Ubuntu Installer which is used to install Ubuntu literally within the Windows NTFS file system. In fact there is no partitioning involved as the Ubuntu OS resides within the Windows NTFS directory as a folder.

Somewhere along the lines WUBI didn't finish completing the Grub entry or something

You'll need to repair Windows first by popping in your Windows CD...then going to the Repair Windows selection. Then afterwards perform a chkdsk. This should correct the issue.


Can I get a virus by using "sudo apt-get install"?

apt on a default Ubuntu system will be very unlikely to get viruses. However, it doesn't mean it isn't possible:

Malicious PPA
One of the features of APT is the ability for admins to add Personal Package Archives (PPAs) or other software sources to the APT cache. These third-party APT sources are not necessarily trusted, and may carry viruses. However, it would take an intentional action of the machine's admin to add one of these infected sources, making it rather hard for one to add itself.
Hacked Repository
In theory, a software repository may be hacked by a malicious party, causing downloaded .deb files to potentially carry malicious payloads. However, official software repositories are very carefully watched and security for these repositories is pretty tight. A hacker would be hard-pressed to take down one of the official Ubuntu software sources, but third-party software sources (see above) may be compromised a lot easier.
Active MITM/Network Attacks
If a network is compromised higher up (by, say, your ISP), it is possible to get a virus from official software sources. However, an attack of this caliber would require an extreme amount of effort and the ability to Man-In-The-Middle many sites, including GPG key distribution servers and the official repos.
Poorly Written/Malicious Code
Vulnerabilities do exist in open source, peer-reviewed, and maintained code. While these things aren't technically considered "viruses" by definition, certain exploits hidden or never revealed in the code could allow a malicious attacker to place a virus on or pwn your system. One example of this type of issue would be Heartbleed from OpenSSL, or the much-more-recent Dirty CoW. Note that programs from the universe or multiverse repos are potential threats of this caliber, as explained here.

apt (due to its importance on Linux systems) is pretty heavily guarded against almost all of these types of attacks on both the client and server side. While they are possible, an admin who knows what they're doing and knows how to read error logs will be able to prevent any of these attacks from taking place.

Additionally, apt also enforces signature verification to ensure that the files downloaded are legitimate (and are downloaded correctly), making it even harder to sneak malware through apt, as these digital signatures cannot be faked.

As for responding to a malware infection incident, the absolute easiest path is to burn the system to the ground and start again from a recent (and known-clean) backup. Due to the nature of Linux, it can be very easy for malware to manifest itself so deep in the system that it can never be found or extracted. However, packages like clamav and rkhunter can be used to scan a system for infections.


How to bring back missing options on System Settings

Run the following command in the terminal:

sudo apt-get install ubuntu-desktop

This will bring the missing options back on System Settings.


How can I access a folder that starts with a dot with apache?

You probably have an Apache directive for files matching ..* which is preventing access via the web (files like .htaccess or folders like .svn or .git). You need to edit your virtualhost configuration to allow access to the folder .well_known for the host you're validating.

<Directory "/var/www/your_domain/.well_known">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

If you're using letsencrypt you can let certbot handle everything or use a dns plugin with certbot to add and remove a TXT record.


broadcom will not connect to wireless, ubuntu 12.04 on dell studio 1749

Try this:

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source
sudo apt-get update
sudo apt-get install b43-fwcutter firmware-b43-installer


Billing and music store delivery problems in Ubuntu One

Our server that handles these downloads crashed over the holidays, so it's currently working through the backlog of files to be downloaded. You should see the music show up in your account soon. I'm very sorry for the trouble.

Thanks,

Chase Livingston


This is completely fine.

home is the home directory for all users.

Home is a simpler way to see your own directory, and is only used in the File Browser

In the screenshot, I've changed to the Tree View (View Menu -> Sidebar -> Tree), and the Home at the top is just a quick link to my home directory (which is infact /home/nemo).

Similarly user temp has his home directory at /home/temp. If I were to login as temp, Home would take me to /home/temp, but show Home at the address bar.

In an analogy to Windows 7, the /home directory equates to C:\Users, where different User folders are present.


lsyncd enabled service is not autostarting on PC restart - Active: inactive (dead)

Systemd can be confusing with before's and after's but I would change:

After=network.target remote-fs.target media-blueray-Data.mount media-blueray-WDRed.mount

To:

After=network.target remote-fs.target media-blueray-Data.mount media-blueray-WDRed.mount network.target multi-user.target

based upon this answer.


How to delete a user & its home folder safely?

to list all users :

cut -d: -f1 /etc/passwd

To remove user :

sudo userdel username

To remove home directory :

sudo rm -r /home/username

To add a home directory to an existing user :

create a home directory

chown this directory for the user

sudo usermod -d /home/directory user


FPS drops when using compton as non-root user

I've just found the solution to my problem.

A compton.conf file was present under the normal user account .config folder. This file was containing extra parameters which was causing the issue.
Because the root account has not that file compton was not using it.

backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
glx-no-rebind-pixmap = true; <= removing this line solved my problem
vsync = "opengl-swc";


How well does Ubuntu run on the ASUS Eee tablet?

Ubuntu can be installed on the Transformer Prime. However, this is not a native installation as it runs on top of Android via VNC. Due to the limitations in VNC (and ultimately the hardware of the TFP), the graphics are pretty choppy. It is more of a proof of concept than it is a usable system.

Due to everything mentioned above, I ended up not buying a Transformer Prime. I had the same intentions as you and everything that I could find wasn't quite up to par. However, perhaps there are better/faster options than the VNC app.


How to make xrdp display preexisting open programs

I had a similar issue..
to get it working for me I edited my xrdp.ini
by runing

sudo gedit /etc/xrdp/xrdp.ini

then added the below to the list for my set up:

[xrdp8]
name=Reconnect
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=5910

I assume yours would be the same but with port=5900

I first log in to my machine usung the default sesman-Xvnc connection option in the 'Login to xrdp' 'Module' drop-down list..

This creates the original session that i can then log back into later by selecting the Reconnect option i have created which should now show in the 'Login to xrdp' 'Module' drop-down.

All my open programs, windows and files are just as i left them in the first session when i log back in using this..

I can access this same session again from any of my other Windows PC's Remote Desktop Connection clients by again selecting Reconnect in the Xrdp login 'Module' drop-down.


In general, your system meets minimum requirements. Although its never going to fly, it should be able to run Ubuntu. But it seems that 3D accelaration is not supported for the Atom N26000. Because Ubuntu's Unity desktop needs 3d, that could well be your problem.

If you dont really mind which desktop environment you use, why not give the LXDE desktop a try. Either by going into the Ubuntu software center and just install it, or uninstall Ubuntu and install Lubuntu. It will certainly boost your systems performance.

Good luck!


I have a W520. It is not the same setup as the T420 - the VGA output is wired to the nvidia card, so the "this" link from Samsagax will not work. I've prepared a blog post here outlining the options you have. I was unable to get either external monitor to work with Bumblebee, and I do not believe it is possible with the W520. However, you can use an extenal monitor in optimus mode, but you either have to use xinerama or open a separate X screen on the extenal monitor.


How to concatenate foreach loop with **switch-case**

You splits string value, but in first attempt you not use it.
Just change '1)' to '"1")'

for element in "${answers[@]}";
do

case $element in
   "1")
    echo "install app 1";;
   "2")
    echo "install app 2";;
   "3")
    echo "install app 3 ";;
esac


Why is the tooltip hiding Dash Search on 12.04?

I tried using the Live USB , your mentioned problem persists in Default Ubuntu 12.04 Unity  (5.10.0-0ubuntu6) release, well you need to do a System update where  currently Unity is updated to unity (5.12-0ubuntu1.1).

You can refer the Change Log, which states

Dash - Make statefulness of Dash Home and Dash Lenses consistent (LP: #914759))

Dash - Remove Dash Home shortcut icons (LP: #885738)

Dash text input does not get focus (LP: #774447)

Note:
According to confirmed bug report here

This bug was fixed in the package unity - 5.12-0ubuntu1.1 unity (12-0ubuntu1.1) precise-proposed; urgency=low

Cherry pick upstream fixes.

Fix UnityViewWindow background when blur is disabled (LP: #989291)
App icon on the Unity Launcher lost track of running
instance (LP: #772063)
No launcher icon or Alt+Tab entry for Gimp windows (LP: #995916)
Locked smuxi launcher icon does not indicate smuxi running
status (LP: #999820)
Fix dash search field hidden by tooltips (LP: #978030)
Launcher is silent to screen reader users (LP: #949448)
Fix 3D apps running much slower under Unity (LP: #987304)
Reduced number of calls to ResultViewGrid::QueueDraw
Reduced number of calls to BGHash::RefreshColor
-- Alan Pope  Wed, 23 May 2012 18:10:49 +0100

I guess for it to work , you will have to Enable the Precise-proposed repository option from Software Source in Update column.


I can't find gnome-system-tools in gconf-editor

Before answering the question, I want to comment on the answer of gokulvarma and the conversation between gokulvarma and daniel:

Having no sudo permission is not the reason of daniel's failure to add System Tools to Applications menu. He couldn't add it because he tried to add an empty category. System Tools is a category or a sub-menu, if we add an application which will fall under any category, that category is automatically created. On the other hand, if there's nothing under it, we can't create the category; when we try, the tick disappears in some seconds. If we clear all elements under a category, category is cleared automaticaly.

daniel tried to add that category by selecting Applications from the left pane and ticking the System Tools from the right pane. Like this:

Instead, he should select System Tools from the left pane -which is already visible there- and he should tick Configuration Editor from the right pane. Like this:

When he is done, in his Applications menu, System Tools category/sub-menu should appear with Configuration Editor in it. Like this:

There's no need to be a sudoer to do this because the tool we are adding can be used by any user to arrange his/her own preferences.

But will this tool, Configuration Editor, help daniel to solve his problem? In my opinion, it won't, because this is the same of what he calls gconf-editor. Either via Alt+F2 or via Terminal, gconf-editor command will open that application and it sounds that daniel already can reach that application but he can't find gnome-system-tools in it. He wants to find the gnome-system-tools there in order to reach users section of it.

In my Configuration Editor, which can be accessed by comand line as well, I can't see something as gnome-system-tools, too. neither can I find users section. Maybe its somewhere there hidden under some category or it isn't there anymore. (GNOME setting managers have evolved a lot, recently; the sites daniel told about might be a old) lets refer to GNOME System Tools' official documentation: What are the GNOME System Tools? There, among others, we see a screenshot of the tool to manage users and groups:

And this is the tool that we know as Users and Groups.(Yes interface is slightly changed, but this is it.) It can be reached via System->Administration. So, there's no need to struggle to reach it from inside other tools. Its there. But as Bobby who commented on the question, I couldn't get well what "fix show all users" means.


Usinstalling BricsCAD V15 on Ubuntu 14.04 is not possible?

First, you'll have to find the CORRECT version of the Bricscad package, which may vary depending on your version.

dpkg-query -l b*

should find any package starting with b including bricscad.  You may have to search on B* as well to find it.

In my system it was then

 sudo dpkg -r bricscadv16

to remove the package.  This did not remove teh /Bricsys folder which you might have to do manually, but not before removing the package this may have consequences I can't predict.


GNOME shell extension working with Firefox but not Chrome

I had the same problem with Chromium (but not with Chrome or Firefox) after installing 18.04.1. Today I realized that it is the snap version of Chromium rather than the universe version 18.04 comes with. So I removed the snap version and installed the universe version of Chromium and the problem was solved.


In the address line, type : about:config

Type  browser.showQuitWarning In the filter field

Double click on the option to switch from false to true , you will find the Quit & Save option again.


What is the command to retrieve the pass phrase of an encrypted home directory?

ecryptfs-unwrap-passphrase

from the man page.


Devanagari consonant cluster wrong display

For 16.04 LTS and above:

Go to System Settings...> Language Support > Install Languages and install Hindi.

This was not needed before. It was sufficient to just enable the keyboard layout to use Hindi fonts.

Hope this helps


how to get back on ubuntu to free space?

Try to run this command:

sudo apt-get clean

It will delete all cached files by the apt application.

Hope this helps.

Regards.


Repeated long command in gnome-terminal do not show up in full

Make sure that your TERM variable is set correctly, i.e. reflecting the type of terminal you are on. Typically, you would export the TERM variable in your ~/.bashrc file, as outlined by Justin Andrusk's answer:

export TERM=xterm

In the case of the question, I had played with a complex command to extract search terms from a file, and I used a variable named TERM for the search terms, without realizing the  significance of that variable name.


Got it all fixed now! for those of you that are interested this is what I did to fix it! first off I reinstalled apache

sudo add-apt-repository -y ppa:ondrej/apache2

Then I added python software properties

sudo apt-get install python-software-properties

Next i re-installed apache

sudo apt-get --only-upgrade install apache2 -y

and finally I Enabled the http2 module sudo a2enmod http2

And all is now well!


Not able to send/receive emails outside my Domain from recently configured email-server

What you want to do is not possible. You need an open port 25.

Port 587 is the "submission" port, it is used only by end-users wishing to send e-mail through an external SMTP server.

After that, when two servers are communicating with each other to transmit a message to its destination, only port 25 is used.


GIMP has a Batch Mode which can probably do exactly what you need. Here is an example:

gimp -i -b '(batch-unsharp-mask "*.png" 5.0 0.5 0)' -b '(gimp-quit 0)'

The above command performs an unsharp effect on all of the images ending with ".png".

Now we only need to find the batch command for your cubism effect.


How do I make Crashplan start automatically?

Crashplan is a backup service.  If installed correctly, it will start automatically when the computer is rebooted.  You can check this status by running;

$ sudo systemctl status crashplan
● crashplan.service - LSB: CrashPlan Engine
   Loaded: loaded (/etc/init.d/crashplan; bad; vendor preset: enabled)
   Active: active (running) since Tue 2016-10-11 16:41:14 EDT; 8min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1776 ExecStart=/etc/init.d/crashplan start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/crashplan.service
           └─1995 /usr/local/crashplan/jre/bin/java -Dfile.encoding=UTF-8 -Dapp=CrashPlanService -DappBaseName=CrashPlan -Xms20m -Xmx1024m -Dsun.net.inetaddr

Oct 11 16:41:10 ubunzeus systemd[1]: Starting LSB: CrashPlan Engine...
Oct 11 16:41:14 ubunzeus crashplan[1776]: Starting CrashPlan Engine ... Using standard startup
Oct 11 16:41:14 ubunzeus crashplan[1776]: OK
Oct 11 16:41:14 ubunzeus systemd[1]: Started LSB: CrashPlan Engine.

A service can be started or stopped using these commands.  The first one will start the service.  The second one will stop it.  The third will show a status of the service.

$ sudo systemctl start crashplan
$ sudo systemctl stop crashplan
$ sudo systemctl status crashplan

The GUI you bring up from the Ubuntu Dash is an interface to configure the service.  The service will be running whether you visit the interface or not.

If it didn't have include a service startup, you could write a script to start the service with these steps:

Put that process into a script and add it to a /etc/rc.local file.  This is a file that is run at bootup.

Edit your /etc/rc.local and add your startup script (example):

/etc/local/rc.local:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/local/bin/crashplanstartupscript.sh

exit 0

Please the steps that you perform manually into /usr/local/bin/crashplanstartupscript.sh.  Crashplan will automatically start every time the computer is booted without you logging in.

The text comments in the /etc/rc.local file explains how it works.


How can I associate a custom file type with a custom executable?

So, I found a way to add my custom program to the list of  All applications in the part Open with other application.  I added a file myapp.desktop in folder ~/.local/share/applications
with content :

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=path_to_my_icon
Name[en_US]=myapp
Exec=path_to_my_executable %F
Hidden=false

And then it is easy.
I wonder if there is a simpler method to get the same result.


"System problem detected" after every login but no reports in /var/crash

The best advice would be find the problem and fix it,
Without determining the problem, you should be able to disable the popup, (but you would be better off finding th source of the "problem")
vim /etc/default/apport

# set this to 0 to disable apport, or to 1 to enable it
# you can temporarily override this with
# sudo service apport start force_start=1

enabled=1 # <-- Set this to 0

Or sudo systemctl stop apport.service to stop it (also could disable).
If you do want to try and find out what is causing the issue, you can insepect the logs, what I find useful and has helped me track down most errors:
Look for any service files that aren't starting correclty
systemctl --failed

Look through the journal of the current boot for any error messages
journalctl -p 3 -b


Try brighten up the display with Fn+F5. It seems that the backlight is set to 0 during boot.


I had the same issue where I was not able to resize or move my chrome window to the 2nd screen.

What I did is this :
Left click and hold an open tab in google chrome window (Not the blue area, click in the white area inside one of the tabs) and drag down or just drag and drop into the 2nd screen if you have a dual monitor. Done, your resize button will start working again!


How to print an octal value's corresponding UTF-8 character in bash?

Presumably you want %b. From help printf:

In addition to the standard format specifications described in printf(1),
printf interprets:

  %b    expand backslash escape sequences in the corresponding argument

And:

$ printf "%b\n" '\101'
A

I don't know if it works for Unicode characters in general.


cronjob output will not show in terminal

Have the commands output to a file from crontab and then tail -f the file to monitor the output.


Dependency error after attempting to install realtech audio drivers

This solved my issue:
Trying to overwrite ... which is different from other instances of package
Thank you https://askubuntu.com/users/94914/karel


That was a bug in shutter but it was fix in the daily builds try this:

sudo add-apt-repository ppa:shutter-testing-team/dailybuilds
sudo apt-get update && sudo apt-get install shutter


What is the meaning of "@INSTALLED_AT@" in a bash file

This is probably a stub file. The syntax @INSTALLED_AT@ means nothing to bash; it's just a string as another one.

In the package/source/Makefile there is probably another script (maybe a simple sed) which will edit this stub and substitute the @INSTALLED_AT@ with the actual installation path, which can be different or user-selectable.

See:

(0)asus-romano:~% var="@INSTALLED_AT@/bin"
(0)asus-romano:~% echo $var
@INSTALLED_AT@/bin
(0)asus-romano:~% echo $var | sed s+@INSTALLED_AT@+/usr/local+g
/usr/local/bin


.nfs0000... files keep showing up and disappearing when using Mercurial

.nfs* files are related to NFS. They appear on an NFS server when a file is deleted, but is still open by a client. The server must not delete the file because it still needs to provide the data to the clients that have it open. On the other hand, the server must delete the file because the process that deleted it expects it to no longer exist. So the NFS server renames the file to a name that hopefully nobody cares about.

It's no use to try deleting them: you'd be deleting a file that's still open by an NFS client, so the server would only create a new .nfs* file to keep the data.

Eventually the client will close the files and the .nfs* droppings will vanish.

You can instruct Mercurial to ignore those files. In the [ui] section of your ~/.hgrc, add the line ignore = ~/.hgignore.global, and create the file ~/.hgignore.global containing the line .nfs*.


Downloading Ubuntu 20.04 on my Win 7 laptop

Sounds like a very slow internet connection.  You might try using a bit torrent software, such as "Transmission" and/or connecting to a coffeeshop wifi which should be better than what it sounds like you have.


Xenial Xerus 'origami animal' instructions?

It gives me enormous pleasure to solve this question of the origami instructions for Xenial Xerus! The instructions have now been posted on the Canonical design site...

No to just get those folds just right, there are 77 steps on 4 pages and my hands are designed for a computer keyboard not folding intricate patterns into paper :)

References:

Wallpaper design for Xenial Xerus 16.04


Reverting to nouveau in ubuntu 18.04 doesn't work as expected

You should uninstall completely the nvidia driver.

sudo apt autoremove *nvidia-*

  Be careful what dependencies are removed before validating the uninstall !!


Personal background

I spend a lot of time in GVim which I’ve configured to use the Solarized colour and I love it; I really like being able to switch back and forth between the light and dark versions (depending on the ambient light conditions).

Once I tried it configuring my terminal emulator and it worked fine on my local computer because I had other software set up to make use of the solarized colour scheme, e.g., the LS_COLORS environment variable.

However, I log on to a few other servers using SSH and I never got around to configuring all the different remote environments so I reverted to a plain old black background for my terminal emulator.

Configuring Gnome Terminal

You don’t say which terminal emulator you’re using but since you’re running Ubuntu, Gnome Terminal is available to you and you can get the Solarized colour scheme by following the instructions from Solarized Colorscheme for Gnome Terminal.

If you’re not familiar with using Git, you can download the files from the zip file.

When you have that working, be sure to install and configure Solarized Color Theme for GNU ls (as setup by GNU dircolors).  This sets the LS_COLORS environment variable so that ls --color displays colours that work with a terminal which has a light or dark Solarized background instead of a black or white background. Note: the documentation can be daunting as it goes into a lot of detail about terminals.

The following links should also be useful:

Color schemes, Gnome Terminal documentation
Solarized colors on Gnome Terminal
Solarized: A Must Have Color Scheme For Gnome Terminal, Vim, Gedit And Lots More

Edit: Beginning with Ubuntu 15.04 (Vivid Vervet), gnome-terminal includes Solarized as one of its preset colour schemes.


When using the same Firefox profile in Ubuntu and Windows, how can I keep settings consistent?

The latest version of Firefox allow syncing across devices with a Firefox Sync account. Simply create an account on one computer where you have the settings the way you like them, and then log in on your other devices to sync them.

How do I set up Firefox Sync?

I am using this with an Android tablet, an Android phone, an Arch Linux desktop, and a MacBook Pro. I have another Firefox Sync account that connects two Ubuntu desktops. So far, I love it!


Why I cannot mount ISO file from this .desktop file by `fuseiso`?

A very easy fix is the following:

Make a custom script of yours and inside the desktop file make it be:

/home/kevin/Documents/Scripts/orWherever/myCustomScript.sh %U (or whatever the path to your custom script is; don't forget to make it executable)

and inside the custom script of yours call

#!/bin/bash
fuseiso -p $1 "/media/$(basename $1)"

Edit:

Explanation of why it doesn't work the way you tried:

The $(command here) in order to take the output of the basename command, is a bash thing and it doesn't work by default everywhere. The Exec field expects an executable file and (optionally) can pass parameters to it. In fact, %U isn't the only thing that is supported. That's why something that would work in a bash script doesn't always work in such a case.


Resolve that problem by hitting F6 and typing in b43.blacklist=yes before selecting to install.


Since you have a fresh install there are repositories that needs to be updated.  Run these commands:

$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
$ sudo apt install vlc


How to restrict one CPU core per one BPF code

For all my affinity needs I use "schedtool"
IE:

schedtool -R -p 90 -a 0xf $$

starts prompt to run the next command at "round robin" "90/100 priority" on 1,2,3,4

but you have to re-execute whatever within that.


Repairing Network Manager Packages From Live USB?

I don't think you can do from live USB but you can try wired connection to install network drivers.

In Linux, most drivers (the ones that are open source) come with the kernel; so the packages that contains the driver are

  linux-image-generic

and (possibly)

  linux-firmware

(1).

You can check if it is up-to-date with

  apt-cache policy linux-image-generic

  apt-cache policy linux-firmware

and updates should be automatic --- if not, the classical old sudo apt-get update; sudo apt-get dist-upgrade should work.

Notice that sometime there is a problem in upgrades that makes that the old kernel is retained; in that case use

  apt-get install linux-generic

to update the kernel/firmware to the last available for your distribution.

If the device has a not open-source or a driver which is not in the official kernel, things are different, and are very device-dependent.

Footnotes:

(1) normal kernels. change

  -generic

with

  -rt

or

  -lowlatency

if you have some fancy (audio workstation, real time) configuration.

Source : How to I update Ralink 5390 adapter driver via terminal?


Nautilus crash error after login. (18.10, 64 bit)

There are some issues with the Nautilus package in the gnome-staging PPA at the moment. A hint is that it's looking for things in /usr/share/tracker, installing the Gnome filesystem index tracker (https://wiki.gnome.org/Projects/Tracker/) from the PPA will fix this:

apt install tracker

See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=909375 for some details and discussion.


Update mousepad using sudo apt-get install mousepad, if there is no updates try to reinstall it again using sudo apt-get remove mousepad and then sudo apt-get install mousepad


Can't install Ubuntu 14.04 on Thinkpad W510 - freezes at black screen

It failed to mount the root filesystem from the USB stick. Things to try:

Check the md5sum on your downloaded image is correct
Try your USB stick on a different PC
Try a different USB stick
Install from a CD


sed command replace text with ' character

I thought of a more general solution than as your question asks for.

Let's imagine you need to find a string based on your regular expression search criteria. You'd like to replace only a part of it, and leave the other matching parts unchanged.

To demonstrate with an example:

echo "'some-name'@'some-host'" | sed -r "s/(')([^']+)('@'[^']*')/\1user2\3/g"

will display:

'user2'@'some-host'

The sed command performs the replacement by using the s/search-regexp/replacement/g syntax. In our case:

(') matches the first single quote. This is trivial, but could be more complex. It represents the part of the string before the replacement. sed assigns the value of this sub-expression to the special variable \1.
([^']+) matches the user name. Basically any character starting from the previous position that is not a quote. sed assigns the value of this sub-expression to the special variable \2.
('@'[^']*') matches the '@'host-name' part. Similarly to the previous sub-expression, a quote, a @, a quote again and any character that is not a quote and then a quote at the end. sed assigns the value of this sub-expression to the special variable \3.

The replacement part will replace anything that matched the search-regexp. By using the variables shown above, we can replace the user name and leave the other regions intact. \1 + your new user name + \3 will produce the desired result. Thus:

\1user2\3

Results in:

Whatever contents the first sub-expression has, (it is a single quote)
followed by the string "user2", (note \2 is intentionally not used, because we replace the user name)
and finally the contents of the 3rd sub-expression (which is a '@ and the host name in quotes).

If you cat your script file and pipe it to the sed command, you should get the desired result.


Where can I get "libavformat-ffmpeg56" from?

When the OS is later than Ubuntu 16.04, please add (temporarily) some "xenial" lines to /etc/apt/sources.list :

sudo gedit /etc/apt/sources.list

Lines added, my example :

deb http://dk.archive.ubuntu.com/ubuntu/ xenial main
deb http://dk.archive.ubuntu.com/ubuntu/ xenial universe
deb http://dk.archive.ubuntu.com/ubuntu/ xenial-updates universe

Next : sudo apt update

... And you can then install the package: sudo apt install libavformat-ffmpeg56

The install test was done OK with Ubuntu 18.04 - amd64.


How to boot from my Windows installation disk?

You will need to change your boot order.  When you first turn on your computer your first screen will show a brand name (usually the brand name of the motherboard in your computer).

From that screen you should see a list of options at the bottom in one of those options should lead you to change the boot order of your computer. You will want your "CD/DVD" option to be the first option.


My system takes too long to boot is there a fix?

Googling around, various reports mention that it may be due to a USB issue with your BIOS.

Suggestions range from

Remove all USB devices to see if its resolved
Disabling USB legacy in the BIOS
Upgrade the BIOS to the latest firmware

However, I note the next item in your trace log is AGP - so possibly an issue with the video card?  Are there any options in your BIOS which you can play with that relate to AGP/video card?

Suggest have a go with the above and report back.


Make a DVD or USB yourself in Windows

If you're using Windows,You can follow these steps.

 Download Ubuntu Desktop.
How to burn a DVD on Windows
How to create a bootable USB stick on Windows

A dual core computer isn't really "old", possibly a little slow for Unity, but definitely not too old for a DE like XFCE, LXDE (Lubuntu or Ubuntu help on Lubuntu), etc... just get the 32-bit version (if your CPU really can't run 64-bit, but the 32-bit is usually lighter on ram anyway).

Try running the live versions of a few distros (could browse http://www.distrowatch.com for "old computer" or "beginner" ones) and pick one you like. But don't get fooled by the slow DVD or  USB read times.


Grub menu not showing at boot after upgrading to Windows 10 in dual boot

First boot to Windows 10 and disable Fast Startup. Here is a tutorial to do this

Now you need to have live boot Ubuntu (like the way you did when you first installed Ubuntu). You need to have a working internet connection for this.

After you boot to Ubuntu you need to type these commands in terminal line by line:

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

After Boot Repair software is installed it will launch automatically. Then click on Recommended repair. Now reboot, if everything goes fine you will get option to select OS of your choose when you start your computer


g.726 ADPCM codec stopped working in VLC

Exact same thing happened to me after an update/upgrade: Avplay worked fine but vlc was jerky and distorted.

Not sure if it is relevant but my Ubuntu is 12.04 EXTIX x64 is running in a VirtualBox guest.

I found a workaround within, VLC by changing Tools -> Preferences -> Video -> output from "Default" to "X11 Video Output(XCB)". This corrected the problem for me.

Hope this helps.

Good Journeys, Brad


Shape down only a specific part of a bash ouput command

Using ping exit code to determine whether host is alive:

#!/bin/bash
for ip in {1..254}; do
  ping -q -c 1 $1.$ip >2 2>&- && printf %s.%s\\n $1 $ip
done


12.04 Upgrade to Original Wubi 11.10 Dual Boot With Win7 Now Incomunicato

I don't think the online upgrade is guaranteed to work in a Wubi install.  I seem to recall that it does not get thoroughly tested during beta testing.  A failure in the on-line upgrade can result in the data on the Wubi install being inaccessible.

You could boot off the LiveDVD of 12.04 (or other) and mount the wubi virtual drive to get your data off it.  You should then remove the wubi install from Windows and re-install 12.04, then put your data back on /home.

You could also consider a dual boot installation of Ubuntu.  Before setting up a dual boot system I recommend that you defrag and check your Windows file system as it can speed up the install (re-partitioning) immensely and greatly reduce the chance of problems.  You really should back up all your data before you do any of this.  If you want to backup the wubi virtual disk before proceeding, you will find it at

d:\ubuntu\disks\root.disk

Chris


Where apt and dpkg store temporary files (except the well-known /var/cache/apt/archives) during update?

I believe the heart of your question is why do updates require additional space and where is that space used.

The answer to this question is that while the debs themselves take some amount of space to store, you can think of them like a compressed archive of files. Inside the deb there are instructions as to the contents of the deb as well as a location on disk for each file to be placed. As a package is updated by the author new libraries may be required or new functionality added. The additional space doesn't come from the debs themselves but from the uncompressed files of all the cumulative updates that you have for your system. This means that if there were substantial updates to some packages, more space is required than original

i.e. if Plex originally took 300M of space uncompressed with an original deb of 60M, a new deb of 70M in size might require an additional 100M of space on disk due to new features being rolled out


How can I downgrade mysql 5.7 to 5.6 on Ubuntu 16.04?

First make a mysqldump of all your databases (including information_schema). Then "stop" mysql" and this will remove anything related to mysql:

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7

# Backup 5.6 config and data without deleting
sudo mv /etc/mysql /etc/mysql-5.6-backup
sudo mv /var/lib/mysql /var/lib/mysql-5.6-backup
sudo apt-get autoremove
sudo apt-get autoclean

and then

sudo apt-get install mysql-client-5.6
sudo apt-get update

Warnings:

Ubuntu switched to systemd with 16.04. You may need to start 16.04 with upstart too when using mysql 5.6.


Php.ini file change not reflecting in phpinfo()

Some time it happens that in php.ini, there is some syntax error on some line number for example

error_reporting = E_ALL && ~E_DEPRECATED && ~E_STRICT

In this case the apache does not load configuration after that line number. So this is bit complex to figure out syntax error in php.ini therefore you should try other ways to fix and you should try this solution at the end.


Lubuntu 18.10 File Manager: How to view directory tree structure?

Another Qt based (like Lubuntu 18.10 is) alternative is dolphin from KDE

By default it didn't show as you wanted, but select

  Control -> Panels -> Folders

to have folders show in a tree like fashion on the left panel.

The following picture was from my 19.04 box, but it responded identically on the 18.10 QA-test box (x86/i686) besides me I just tested it on.

there may be other alternatives, and which is best for you is your choice. Sorry I couldn't get it to view on my play with pcmanfm-qt

Install with sudo apt install dolphin


Can't use apt install at all after installing a deb package "intellij-idea-ultimate needs to be reinstalled, but I can't find an archive for it"

Apparently, apt is trying to reinstall or update the intellij-idea-ultimate but the system does not find the corresponding .deb file.

As I know, IntelliJ Idea does not have an official repository you can use with apt or apt-get to install and update their dependencies. You usually use the official .tar.gz file or an unofficial repository to install IntelliJ.

If you are using the unofficial repository, you may...

Try aptitude to solve any inconsistency.
Download the .deb files from the unofficial ppa repository.

If you want to enable that PPA and install from it, you can run these commands:

sudo add-apt-repository ppa:ubuntuhandbook1/apps
sudo apt-get update
sudo apt-get install intellij-idea-community


CDemu
We sucessfully mounted CD or DVD images for application installation in Wine or for running an application which needs access to its CD using CDemu. Amongst ISO a wide variety of other formats are supported. Therefore the image does not need to be in ISO format.
The application can be installed by adding the following ppa to our sources:

ppa:cdemu/ppa

We can then install the CDemu client and the CDemu daemon with
sudo apt-get update && sudo apt-get install cdemu-daemon cdemu-client

After logging out and back in, or a reboot, the daemon will be started. To mount an ISO file as CD we can then issue:
cdemu load <number> <path_to_iso>

The <number> corresponds to the internal number of drives loaded by CDemu (per default 2 drives, change this in /etc/default/cdemu-daemon to a higher number if needed.
The following is an example command to load a drive 0 from an image.iso:
cdemu load 0 /home/nur/images/image.iso

This will unload an image:
cdemu unload <number>

Related questions:

How do I use cdemu with Unity?
Apps capable of mounting/unmounting CD/DVD Images with multi-sector or protected format
How can I graphically mount ISOs?


How to get the long 'less' prompt with sudo?

You should keep this environmental variable when running sudo. Edit the file /etc/sudoers and add

Defaults        env_keep += "LESS"


Ubuntu 12.10 will not shutdown/reboot. How could I solve this?

you can force a reboot by entering the following

echo 1 > /proc/sys/kernel/sysrq

echo b > /proc/sysrq-trigger

have you tried physically restarting the computer?
if you don't have physical access be warned that if you force a reboot the computer might not come back online. force reboots are normally only needed if hardware has failed


Problem with free space at home directory

You should probably perform a real install. Wubi is no longer recommended and was primarily intended as a way to try Ubuntu more throughly than a live-cd could.

However, if you do want to keep your Wubi install and just resize, you can find the instructions and software here: https://help.ubuntu.com/community/ResizeandDuplicateWubiDisk


This post looks helpful for doing the upgrade, but I agree with bodhi.zazen about starting fresh: Ubuntu GNOME 17.04 -> Ubuntu 17.10 upgrade?

Quick overview:

sudo apt-get update && sudo apt-get dist-upgrade
-- REBOOT --
sudo do-release-upgrade -d


How to install Pipelight on ubuntu 16.10

I have succeeded on xenial using this guide: http://www.webupd8.org/2013/08/pipelight-use-silverlight-in-your-linux.html

The release is there, pipelight-multi is probably aliased pipelight.

If silverlight 5.1 doesn't work, try 5.0. That one worked for me.

Don't forget to close firefox prior to starting.

After you're done with the guide run:

sudo pipelight-plugin --create-mozilla-plugins

Run firefox from terminal so you can see what went wrong in case your installation failed.


Why "Unlock keyring" appears after installing Ubuntu One?

Keyring is made to store your passwords (ex Ubuntu One passwd) so you just have to unlock keyring and you dont have enter password stored in keyring.


You can add it to /etc/modules

Just put the name eg b43 not sudo modprobe b43


GoFlex Home drive visible but won't mount

On my 11.10 install, the nautilus file browser is able to find it automatically, and calls it an "AFP volume".  See  Fstab for GoFlex Home 2tb NAS

I think it is possible to add AFP functionality to Ubuntu since 9.04, according to  http://missingreadme.wordpress.com/2010/05/08/how-to-set-up-afp-filesharing-on-ubuntu/  ... Hope that helps

PS   I should add:  you can access the GoFlex configuration page using a web browser, by typing in the ip address for the drive as your web location.  This information might be under "attached devices" in your router page, which often times is a very similar process.  For example:  If you see 192.168.0.4 as your Ubuntu machine's IP address (type 'ifconfig' in the terminal), then your router is probably 192.168.0.1, and your GoFlex is probably 192.168.0.5 or something.


Ubuntu 13.10 VirtualBox Error Kernel driver not installed (rc=-1908)

I had same problem running on Ubuntu 12.04 - it happened after last kernel update

I solved by re-installing virtual box

sudo dpkg -i virtualbox-4.3_4.3.6-91406 .. .deb


F2A85V-PRO motherboard with AMD A10-5800K processor issue with linux systems

This looks like a memory problem to me. I had the same problem on 2 computers.
In my case, there was a range in the memory that was faulty. I guess in your case, this is after 4GiB, so 32 Bit does not access it.

I would recommend to run memtest, which is available within the boot menu of the ubuntu installer disc.


Ubuntu Wily probably doesn't need that fix, so remove it.  If you haven't deleted the file, double click on it and choose remove to uninstall the dkms file in Ubuntu Software Center.
Or sudo dpkg -r ath10k-dkms in terminal

Then in terminal
sudo apt-get install git
git clone https://github.com/kvalo/ath10k-firmware.git
cd ath10k-firmware
sudo cp -r ath10k /lib/firmware/

Reboot


Open setupact.log and search for this string:

Callback_BootEnvironmentDetect: Detected boot environment:

It should tell us the boot environment: BIOS or UEFI:

Code:Callback_BootEnvironmentDetect: Detected boot environment: BIOS
Code:Callback_BootEnvironmentDetect: Detected boot environment: UEFI


What are the "standard Gtk+ toolkit command line options"?

From another GTK+ application (gnome-terminal) which supports --help-gtk at the command line:

GTK+ Options
  --class=CLASS            Program class as used by the window manager
  --name=NAME              Program name as used by the window manager
  --display=DISPLAY        X display to use
  --gtk-module=MODULES     Load additional GTK+ modules
  --g-fatal-warnings       Make all warnings fatal

Edit: "chromium-browser -h " gives these this link and this link from library.gnome.org with a useful syopsis (especially the first link).


When and how is it safe to perform a system update?

Updating is Highly advised , since newer version Fixes bugs, brings New Features , provides Stability. Upgrading Kernel provides better support for your hardware and performance too.

And Security updates are important to keep your Ubuntu secure.

One way : Use Update Manager to update your system .It will classify list updates under categories as Important Security Updates , Recommended Updates and Other Updates ( eg. PPA's)

Second way : through terminal

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

This would be the best way to update your Ubuntu

Also if you want to upgrade your kernel , do it after the above process through

sudo apt-get dist-upgrade

Or combining all above ,as All-in-one command.

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

You can see the Ubuntu security notices here listing fixed vulnerabilities through updates , resolved mostly through security and other updates.

example : Fixing bugs through updates.


Can I start a program from the terminal and make it launch visually in the background?

To do this, you will need xdotool. To install it, run the following command in terminal:

sudo apt-get install xdotool

Now, I will explain how you can do it for Firefox using a script:

In a terminal run:

mkdir -p bin

This command will make a bin directory in your home folder if you don't already have it.
After run:

gedit ~/bin/firefox.sh

This will create the new file change_sources.sh in gedit.
Copy and paste the following script in the new created file:

#!/bin/bash

delay=2
windowId=$(xdotool getwindowfocus)

firefox &
sleep $delay

xdotool windowactivate $windowId

Save the file and close it.
Go back into terminal and run:

chmod +x ~/bin/firefox.sh

to grant execute access for the script.
Run the script with:

firefox.sh

In the same manner you can open any other application from terminal in the background.


Reason for giving me more than 2 letters after sorting in regex

There are a couple of things going on here.

First, by default, grep will output whole lines that contain a match anywhere (you can change this using the -o or --only-matching flag).

Second, the quantifier {,2} matches from zero to two times - so every line of any file will match (even non-numeric lines). For example

$ echo a | egrep "[12-4]{,2}"
a

If you try this yourself with grep colors enabled, you will notice that the a is not colored: it's not a that is matching, it's zero occurrences of [12-4].

If you want to output only lines consisting of up to two digits in the set [12-4] exactly1 then you can either use line anchors, or add -x or --line-regexp whole-line flags:

$ cat main.txt
1246
12
43
1

$ egrep '^[12-4]{,2}$' main.txt
12
43
1

$ egrep -x '[12-4]{,2}' main.txt
12
43
1

Note that both of these will match empty lines as well (since an empty line consists of exactly zero digits).

1 note that [12-4] is equivalent to [1234] and could be written more succinctly as [1-4]


Installing tomcat 7 on Ubuntu Server 12.04

This is because the package tomcat6-common is still residing in the system.

do this

sudo apt-get remove tomcat6-common

This will remove the conflicting package. Installing Tomcat7 Should work fine now


Cannot access a website from Ubuntu desktop,while the website is live

It looks like this machine is using another name server than other machines, and this name server doesn't list the correct (new) IP address for your domain. If you change a DNS record, it at first is only changed in the name server you changed it at. So if a machine uses another name server, it still gets told that your site is at the old IP. But name servers "talk to each other" on a regular basis and update their records accordingly. This of course takes some time. As a rule of thumb, after 24 hours most name servers should "know" about a change. Sometimes it goes faster, sometimes it takes more time.

If after about 24 hours your browser still gets directed to the wrong (old) IP, you'd want to take a closer look at your network settings and/or talk to your internet provider.


How to give boot priority to grub2 on HP Envy 15 notebooks?

Finally I got it!! I succeeded in installing Xubuntu on an usb drive and booting it though an EFI partition on my usb drive.

Boot the Live Xubuntu Installer as UEFI
With GParted create a FAT32 partition (size 250M flag boot)
Create an EXT4 partition to be used as Root
Installed Xubuntu normally setting the path for the bootloader on the Pendrive
Reboot manually (F9 in preboot) and select "ubuntu"
Mount the EFI partition on my USB and the EFI partition on my HDD
Created this directory tree on my USB EFI partition:/EFI/BOOT
Copied the content of {HDD UEFI Partition}/EFI/ubuntu inside {USB UEFI Partition}/EFI/BOOT
Renamed grubx64.efi (or shimx64.efi for secure boot) to BOOTx64.efi
Deleted ubuntu folder on HDD UEFI Partition
Finally changed GUID of my HDD UEFI partition to my USB UEFI partition on /etc/fstab after rebooting to the installed system


Monitor color after installation under windows

This seems more like to be an hardware issue than a software one.

If you have tried with 2 different systems and the same effect is present I would say there is something wrong with your hardware configuration or a defect graphics card.

You should take it to a computer shop for a repair if you are not confident or don't have the correct tools to further investigate the problem.


Setup Error: end kernel panic - not syncing: vfs: unable to mount root fs on unknown block(2,0)

I solved this problem by changing the ubuntu setup containing usb's format from NTFS to FAT32

On Windows, go to My Computer, right click on the USB disk on which you want to add the Ubuntu set-up, then select format and a new window will open. Change file type from NTFS to FAT32 and click start.

After this process, you can continue your  Ubuntu Installation with USB


How do I place shortcuts from bookmarks onto desktop

You can open the "Show all Bookmarks" option in Firefox and drag and drop the bookmark from the dialog to the Desktop


I am not an expert but I have done something similar to what you are doing. I gave up trying to setup fstab entry. At best for me it did nothing and at worst stopped the os from booting. Instead I created a file named rc.local in /etc/ with #!/bin/bash -e at the begining and used mount command and its worked ever since.

Also make sure /media has +x permitions so that shareuser can access files/directorys in it and force user = root is probably a security issue


Difference between pip3 install and sudo apt install

The apt install downloads and installs applications for the operating system.

pip3 on the other hand installs a module for python, and not the operating system


Visual Studio Code will show up in Ubuntu Software application if you search for "vscode" or it can be installed from the terminal by running the command sudo snap install code --classic A snap in classic confinement behaves as a traditionally packaged application with full access to the system, and Visual Studio Code extensions are installed into the user's home directory.
Visual Studio Code is not an full featured IDE. For this reason it is not possible to create a project in Visual Studio Code, like it is in Visual Studio. On the other hand it is possible to run Python, C, C++, JavaScript, PHP, Java, R and some other programming language code blocks directly in Visual Studio Code using the Code Runner extension. It is also possible to run HTML code in an external web browser using the open in browser extension. Visual Studio Code is a lot smaller than Microsoft Visual Studio, however many Visual Studio extensions can also be installed in Visual Studio Code by selecting View -> Extensions and then search for the extension that you want to install.

The wonderful C# is open source and cross platform now that Microsoft has released a version of .NET Core, and it's blazingly fast. To install .NET Core in Ubuntu open the terminal and type:
sudo snap install dotnet-sdk


navigate through the graphical interface to the HD, in the search bar type anki.

Open the folder /anki

*run "sudo make unistall anki"

will have an output written on the terminal equal to this*

root@debian-jean:/home/jean/anki-2.1.26-linux-amd64# sudo make uninstall anki

xdg-mime uninstall /usr/local/share/anki/anki.xml rm -rf

/usr/local/share/anki rm -rf /usr/local/bin/anki rm -rf

/usr/local/share/pixmaps/anki.xpm rm -rf

/usr/local/share/pixmaps/anki.png rm -rf

/usr/local/share/applications/anki.desktop rm -rf

/usr/local/share/man/man1/anki.1

Uninstall complete.

make: *** No rule to make target 'anki'.  Pare.


Linux installed on USB disk, can data be lost during shutdown?

Data can be lost during unexpected shutdowns or system crashes - when the operating system cannot actually flush the data from memory to disk.  During normal shutdown or restart the operating system is still in control, so it will write data to disk.

In other words, normal shutdowns/reboots are OK.  There is also something know as halt state - where machine is still running, but OS has  went through shutdown process and relinquished control of the hardware. In such case, powering off the machine is also OK. What's not OK is abnormal power offs and shutdowns.


Disconnet internet at specific time in ubuntu 12.04

You could use cron to schechule a command.

To edit root's crontab:

sudo crontab -e

To shutdown your network interface (ie "eth0") every day at 5:55am. add this line:

55 05 * * * ifdown eth0

There is more information about it: cron howto

There is a graphical user interface (I haven't tried myself): gnome-schedule


How to get the bcm4312 wireless chip working?

Please get a temporary wired ethernet connection. Open a terminal and do:

sudo apt-get remove --purge bcmwl-kernel-source
sudo apt-get install firmware-b43-lpphy-installer
sudo modprobe -r wl   <--if it isn't loaded, that's OK, just proceed.
sudo modprobe b43

Detach the ethernet. Your wireless should now be working.

If there are problems, look for and post any clues here:

dmesg | grep -e b43 -e wlan -e 8021


Elasticsearch remote access between two separate ubuntu servers

We found the solution.
In elasticsearch.yml we did the following:

network.host: internal ip address of ES server (Server B)
http.port: 9200
transport.host: internal ip address of ES server (Server B)
transport.tcp.port: 9300

We gave the internal IP address of the server which houses Elasticsearch (Server B). And then in the firewall we gave access permission for the internal IP of the application server (Server A). (These two servers are in the same network in the data center).

By that we are able to curl from Server A using the internal IP of Server B to get results from Elasticsearch.

Now we are getting the following result from Php.

array(2) { ["result"]=> bool(true) ["data"]=> array(3) { ["acknowledged"]=> bool(true) ["shards_acknowledged"]=> bool(true) ["index"]=> string(23) "project_name" } }

For anyone interested in some more details I'll be glad to help.


You can never go wrong with sticking with the default.  4kb is the default block size used by most filesystems.  You can shave a bit of overhead if you mostly store larger files by using a larger block size, but generally you should stick with the default/4k.  Worst case there is that you waste a relatively small amount of disk space.


You can first view your current default audio device by typing:

pactl stat

And with

pactl list

you can view all your devices.

And with this command

echo "set-default-sink alsa_output.Headset" | pacmd

you can set the default device.


How to list all the files in a tree (a directory and its subdirs)?

tree will be very convenient for you.

sudo apt-get install tree

using tree filepathto list the files.


Is it safe to run apps that need no installation?

The file is a binary executable. It has already been compiled from its source code into a form your CPU can execute and you only have to ask for it to be executed for it to run.

The software you download when you run a package manager such as APT in general also includes pre-compiled binaries, so there's nothing peculiar about this type of file. The packaging of the files does helpful things like telling the package manager where in the filesystem the binaries need to be copied to, and provides scripts that make sure the program can find any shared libraries and other programs it depends on and the environment it requires is set up if needed.

The reason you might consider this program unsafe is that it comes from an unknown source, whereas packages from Ubuntu repositories are from a known source and protected by a signature verification process that ensures they haven't been tampered with on their way to your system.

Basically, downloading and running executables from unknown sources is insecure, unless you trust the provider and you can verify that the download reached you intact. To the latter end, distributors may provide some kind of checksum you can use to check that the file they uploaded has the same content as the one you downloaded.

One encouraging thing about Telegram in particular is that it is open source:

  This software is available under GPL v3 license.
  Source code is available on GitHub.

This means anyone can read the program's source code to make sure it won't do anything undesirable to your system. In practice, reading the source code to make sure the program is safe isn't something most end users want to spend time doing or learning how to do. Still, I have some faith in the involved community to find security vulnerabilities and bugs in open source software.

As for why Ubuntu doesn't complain that the program is unsafe, well, badgering the user about their questionable decisions isn't the Linux tradition. A Linux system is typically designed to do what you ask it to, and nothing else. The user is considered responsible for having awareness of security issues and other potential pitfalls and will rarely be warned that they are about to compromise or damage their system.

I use a PPA for Telegram see this answer for all the ways to install Telegram. PPAs use APT's signature verification mechanism, but they still have some risks because you are putting your trust in the maintainer. PPAs do provide some convenience, updating when you run updates (if the maintainer updates the PPA), making the package manager aware that you have the software and so on.


solved sound issue on my ASUS G51VX. i finally figured it out. i'm not sure if this is true for all ASUS G51VXseries but mine the sound card would not work while running the 32 bit version of UBUNTU which is "recomended" when you are at the download screen. Any way, i tried installing the 64 bit version just to see what would happen. Than using the command "sudo nano /etc/modprobe.d/alsa-base.conf" in the terminal box to access the manual parameters for the alsa drivers. At the bottom of the page i added "options snd-hda-intel model=asus-mode3" (i tried all other options and this one seems to work the best). and than rebooted the computer and sound was back on both the outside speakers and the headphones.

To recap:

-the 32 bit version of ubuntu did NOT work with the soundcard in my ASUS G51VX,  ALC663.

-installed the 64 bit version of UBUNTU

-in the terminal box insert.
" sudo nano /etc/modprobe.d/alsa-base.conf "

-enter password

-scroll down to the bottom of the page and insert the following command after the last command already there.
" options snd-hda-intel model=asus-mode3 "

-this one worked for me but you could try one of the other models ("asus-mode1" through "asus-mode8", or either "base" or "auto")

-exit saving your changes by holding down the "Ctrl" and "Shift" keys and pressing the " ^ " key (6) and than the "x" key.

-it'll ask you if you want to save your changes press "y" and than "Enter" to save the changes to the document.

-you'll find your self back in the terminal box. Now reboot your computer.

I really enjoy using UBUNTU so hopefully this little bit of info helps and if it doesn't don't get discouraged, the night is darkest just before the dawn.
  Best of luck to everyone.


Full Disk Encryption + Home folder encryption needed? Wouldn't Full Disk Encryption get the Home folder anyway?

"It depends".
Whole disk encryption will use LUKS and everything but /boot will be encrypted, including your data in /home.
This prevents unauthorized access to the system from a cold boot. Once the system is fully booted, however, everything, including /home, is decrypted.
Encrypting /home uses ecryptfs and your home directory will be encrypted when you are not logged in. This prevents root or other uses from accessing your data in /home. Your data, however, is decrypted as long as you are logged in.


Press "CTRL+T" on your keyboard to open up the terminal.

Then type in ifconfig, press enter and your ip address will be shown as

inet addr xxx.xxx.xxx.xxx.


Is TOR breaking TLS for e-mail transport encryption to collect user credentials (security hole)?

Tor itself will block SMTP, what you are getting is a fake SMTP server (notice the csds.local instead of your actual hostname/FQDN) that is probably ran by the exit node to block mail.


Why isn't `auto-remove' removing all unnecessary dependencies?

Specific answer:
This is not normal behavior:

izx@preciseunity:~$ sudo apt-get remove --auto-remove --purge dansguardian
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  clamav* clamav-base* clamav-freshclam* dansguardian* libclamav6*
  libtommath0* python-gpgme*
0 upgraded, 0 newly installed, 7 to remove and 91 not upgraded.
After this operation, 14.7 MB disk space will be freed.
Do you want to continue [Y/n]?

See general answer no. 1 below for the most probable reason why.

General answer:
This can happen for multiple reasons. The most common ones are:

Those dependencies are now also required/recommended by some other package(s) which are still installed on your system.
The original package was a meta-package, i.e. a shortcut to install multiple packages in one swift stroke. Removing a metapackage only removes the shortcut itself, not all the packages it installed. Common examples are the various umbrella desktop packages, eg ubuntu-desktop.

To remove, use apt-cache depends package-name to get its dependencies, and feed those to apt-get remove. Double check the list shown to make sure you don't lose anything important!
You can do this in one step with the following command (again, don't press Y unless you've read the list!):

sudo apt-get remove `apt-cache depends dansguardian | grep Dep | cut -d: -f2 | tr '\n' ' '`