How can I test if there are entries in the terminal command history in bash?

if [ "$(history | wc -l)" -gt 0 ] ..., see man bash under CONDITIONAL EXPRESSIONS, [ is the same as test so man test will tell more about that.

NOT CHECKED FACT: (from memory!)
Now, please note that launching a bash script does its magic by starting a new "bash" (the executable); this leads to the fact that the history in that bash session (while the script is running) will be something else than what you have in the session where you launched the script.

To be able to check the history in the CURRENT session, you will have to do it differently:
One way is to make your "script" be a bash function, e.g. in $HOME/.bashrc and then use the function.
Alternatively, place the function in a separate file and source scriptfile.sh to make it appear and run in the current bash session.

MORE:
The fact that you start the script will be recorded in history. I'm not sure you will ever have less than one line in history, when the script is running.


You have to specify the resolution first. use the following command on terminal.
to declare the needed resolution use..(copy and paste and enter it on terminal):

xrandr --addmode S-video 1024x600

Then to use the resolution copy, paste and enter the following command:

xrandr --output S-video --mode 1024x600


Log in as other user having GUI capability

You can use a local network login (ssh) instead of su. The option -X will enable forwarding of the X connection:

ssh -X username@localhost

For this to work, you must have a secure shell server (sshd) running on the host (apt install openssh-server). It will prompt you for a password and drop you in a shell, just like su - username, but with forwarding of the X Window connection. It works for remote hosts, but also locally.


USB Ethernet interface in virtual Ubuntu 18.04 disabled after every reboot

According to the bug report, the solution is to add the missing configuration file(/etc/NetworkManager/conf.d/10-globally-managed-devices.conf) to NetworkManager, then to reboot.

sudo touch /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
sudo reboot


exit a bash command in a script without exiting the script

If one really really really needs to have custom cp with custom message, then recompiling the program from source is the way to go, but a bit more sensible approach would be to write out your own message via printf preferably, instead of trying to intercept cp's output, and handle user choices via select dialog.   Additionally, if you're going to output error messages, they should go to stderr stream. Finally, *.* is unnecessary and you can just use * glob instead.

Below is the script with a couple edits. Note that you need to uncomment #cp "$item" "$HOMEWORKDIRECTORY" line  for the actual copying to occur. For testing purposes replace cp with echo first.

#!/bin/bash

USAGE="Usage: ./script2.sh [hw-name]"
EINVALID="Invalid homework: $1"
SOURCEDIRECTORY="$PUBLIC/homework/$1"
HOMEWORKDIRECTORY="$HOME/homework/$1"
#COPY="$SOURCEDIRECTORY/*.*"

if [ -z "$1" ]; then
    echo "$USAGE" > /dev/stderr
    exit 1
fi

if [ ! -d "$SOURCEDIRECTORY" ]; then
    echo "$EINVALID" > /dev/stderr
    exit 2
fi

if [ ! -d "$HOMEWORKDIRECTORY" ]; then
    echo "making homework1"
    mkdir -p $HOMEWORKDIRECTORY

for item in "$SOURCEDIRECTORY"/*; do
    skip=true
    if [ -f "$HOMEWORKDIRECTORY"/"${item##*/}" ]; then
        printf "%s already exists in %s.\n" "$item" "$HOMEWORKDIRECTORY"

        select choice in  "overwrite" "skip"; do
            case "$choice" in
                "overwrite")  echo "Overwriting."
                              break;;
                "skip") skip=true; break;;
            esac
        done
    fi

    if [ "$skip" = "true" ]; then
        continue
    fi
    echo cp "$item" "$HOMEWORKDIRECTORY"

done


Difference between programs in Software Centre and Launchpad PPA

I believe you are missing some information about PPA's.

After you install a PPA this PPA -is- included into Ubuntu Software Center. You can see all the available packages for that PPA.  They are included in software sources as shown here:

but there is also a list of PPA's inside USC (I believe it is under installed).

Besides that: PPA are generally software that are not supported by Ubuntu itself. If someone that created software wants this to be included into USC as a part of Ubuntu they should and can apply for it to be included. Though most do not care for it since this method seems to work best for everyone.

For more information see: What are PPAs and how do I use them?


How to get Ubuntu Touch on Samsung Galaxy S3?

Galaxy S3 is not officially supported by Ubuntu touch but, there is a ROM available you can flash via clockworkmod.

i9300 Ubuntu wiki

i9300 Ubuntu XDA

Rom download link

However, this ROM is discontinued since 2013, and according to the XDA page: "No GSM/Phone calls". So, try at your own risk.


Cannot install Ubuntu 18.04 Desktop on VirtualBox 6 on Windows 10 Pro

You need to turn off Hyper-V, which is enabled by default on Windows 10 Pro installations. Looking at the documentation, it seems that in theory Virtual Box 6 now works with Hyper-V, but in practice it doesn't seem to, at least for some Ubuntu installations. In order to disable Hyper-V, first go to Turn Windows features on or off:

Then uncheck Hyper-V in the window that appears:

You will be prompted to restart your computer. Once you have done so, start the Ubuntu installation process again and it should proceed without issue.

Please note that this will mean you're unable to use Hyper-V virtualization software, and also other programs that rely on it, notably the Docker containerization application and related ecosystems.


cabal installs to ~/.cabal, with the binaries going in ~/.cabal/bin. You have to add this path to your PATH:

export PATH="$HOME/.cabal/bin:$PATH"

The Haskell website says cabal can add symlinks to ~/bin (which gets automatically added to PATH):

  If you decided not to put this directory on your $PATH then you can
  get cabal to symlink binaries into another directory, eg ~/bin. To
  use this feature edit ~/.cabal/config and see the symlink-bindir
  field. Note that the ~/.cabal/config file is not created until you
  run a cabal command for the first time, eg cabal update.


How to add Tor Browser to my menu/launcher for regular use?

In the latest version, I managed to do this by

./start-tor-browser.desktop --register-app

from shell within the directory and it created the entry in my applications-menu just fine.


Failed to mount Windows share: Invalid argument

I resolved this by using the IP address instead of the server name.


How to recover lost Thumbnail and preview options?

Finally sorted it! I tried the suggestions you offered but to no avail so just moved on and put up with it, but have just now realised that it is OPERA that is causing all the problems. It recently stopped recognising my gmail accounts and I switched back to firefox....  photo uploads are just fine now with visible thumbnails!

Many thanks to you both for your suggestions.

Geoff


There is nothing wrong with your system: sudo apt-get update will only update the package list.
To really update packages, you have to type: sudo apt-get upgrade afterwards as well!

edit:

let me add to this that sudo apt-get upgrade will finish with Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded if you already have installed all latest updates. When you already have installed all updates for your system, sudo apt-get upgrade will not reinstall stuff. If you get a message along the lines of x packages have been kept back, you should run sudo apt-get dist-upgrade.


How to delete blank columns in one go in LibreOffice Calc

@Mahipal Gunawat wrote:

  I'm myself giving the answer.

  Select first row or any other row (whether the column will be considered blank or not will be based on the cells of the row you select.)
  Open the find and replace window. (ctrl+H)
  Write something in Replace text box then Find All will become clickable. Click this button.
  Search results windows will pop up. Close this window.
  Close Find & Replace window. Be cautious; don't click anywhere else in spreadsheet.
  Click on cell of any blank column that has been already selected in step 3.
  Do right click. A pop up window will appear. Select Delete...; another pop up window will appear. Select radio button for Delete Entire Column(s) and click.


Why does opening Ubuntu's default wallpaper (warty-final-ubuntu.png) in Image Viewer always fail?

You're right that this is a bug. Rinzwind's answer explains what is going wrong--eog assumes the file is a PNG because its suffix is .png. That behavior is itself a bug, since sometimes images have the wrong suffix. Most other image viewers will look inside a file to determine its file type (at least if the initial attempt to open it based on its file extension fails).

I've verified this behavior and marked your Launchpad bug a duplicate of bug 172416, which is the bug for eog's failure to autodetect image type.

If you need to open an image that has the wrong suffix in eog, you can rename it or, if it's needed with its current name, you can make a symbolic link to it (as Rinzwind explains already exists for the background wallpaper you're trying to open).

To see how to make a symbolic link, see man ln. Use the -s flag to make symbolic (instead of hard) links.

For example, if you have a Pictures folder inside your home folder, and it contains a file called foo.png which is actually a JPEG, you can make a symbolic link to it named like a JPEG with:

cd ~/Pictures
ln -s foo.png foo.jpg

One key thing to remember when making symbolic links from the command line is that you specify the target first, and the source second. (That is, the link you are making is not the first argument.)


How do I remove the Nvidia logo on boot without using a xorg.conf?

Should work if you run

sudo nvidia-xconfig --no-logo

That will write a minimal xorg.conf file, which should be fine.

I am not sure there is a way to do this outside of xorg.conf


You may not have removed it entirely. Muzaffar has the right idea.

ps -ax | grep desktopnova - this will tell you if any running process contains 'desktopnova' and the number (known as the pid) of the process

sudo kill -9 ##### - instead of the # marks, put the pid of the process here. this will kill the process (without exception, hence -9).

sudo apt-get purge desktopnova desktopnova-module-gnome - this should remove any leftover remnants.

You may need to reinstall and remove the package entirely using this method if it has not entirely uninstalled.

If you run into any problems, don't forget you can access other TTYs with CTRL-ALT-F6 and restart gdm.


How to save the command line output to a file IN REALTIME

With the available information this is a bit of a shot in the dark, but... if the script is the one that issues the command to go back to sleep (which one?) the problem may be stdio buffering. So I will

prepare a script that does the backup but will not go to sleep, call it bck_script.
prepare another script that sends the PC to sleep, call it sleep_script

Schedule a third script with

bck_script | tee $LOGFILE
sync
sleep 30
sleep_script

... where the sleep is probably overdoing it but well --- I really do not trust a lot sync over network or with "intelligent" (read strangely buffered) SSDs.


Validity VFS491 Fingerprint Scanner issue on ProBook 4540s running Ubuntu 18.04

Make sure that you have installed the driver from HP website

Simply just search the Serial number of the product you can get that with:

dmidecode -s system-serial-number

if the driver is installed try installing libfprint


How can I get mysqldump to use the credentials from mysql_config_editor in a crontab-executed script?

I had the same problem with mysqldump 5.7.13 in a script launched by crontab. You can set the .mylogin.cnf file location using the MYSQL_TEST_LOGIN_FILE environment variable before calling the mysqldump command :

export MYSQL_TEST_LOGIN_FILE=/root/.mylogin.cnf
mysqldump --login-path=mysqldump [...]


Mouse arrow flash and ghost in Ubuntu 13.10

Turm off the secound screen is System settings > Displays ; it is marked with pink rentagle; Click on it and bottom is enable/disable botton


How I can use Xorg with Intel video drivers?

Lucky you to have i855.

After selecting your username click the box in the bottom right that says GNOME and switch it to Xterm,then enter the following commands-

1)sudo add-apt-repository ppa:glasen/intel-driver

2)sudo apt-get update && sudo apt-get upgrade

3)sudo add-apt-repository ppa:glasen/855gm-fix

4)sudo apt-get update && sudo apt-get install dkms 855gm-fix-dkms


At last, I found a solution. More precisely a workaround.

It seems PDFTK does not handle UTF-8 characters the right way with embed Identity-H fonts applied to form fields. In order to render the PDF file the right way, instead of replacing a field with a content, simply set this content as the default value of this field. This will make Acrobat handle the rendering process of the form field instead of delegating it to PDFTK.

To do so, simply add need_appearances to the PDFTK command line.

NOTE - The form field remains in the PDF created by PDFTK, meaning its content can then be modified by the user in Adobe Reader.


Why Evolution syncs the default Google Calendar's calendar only?

You need to add each calendar individually.

Go to Calendar
New - Calendar
Choose google calendar
After putting in your username, click the calendar option (the option "Default user calendar" should be selected
The list of all the calendars you have on google should appear. Choose one
Repeat 2-5 for each calendar you want to add

This way you can manage the calendars individually (e.g. enable/disable them, add an event to a specific calendar).

Check https://help.ubuntu.com/community/GoogleCalendarWithEvolution for more information.


How do i logout from yahoo chat in ubuntu?

Step 1. Choose Edit --> Account or Press F4.

Step 2. To erase user and pass uncheck Remember password and click on clean button.


Ubuntu 14.04LTS How to generate an a Windows Azure Compatible .cer key

Just generate a crt with pem encoding and rename it to cer.  (short question = short answer) If you give some more info, I can too.


I haven't used it myself but perhaps EasyStroke might be able to recognize that gesture. To install Easystroke on Ubuntu 11.04, open the Terminal and issue these commands:

sudo add-apt-repository ppa:easystroke/ppa
sudo apt-get update
sudo apt-get install easystroke

To add mouse gestures, run this command from the Terminal:

easystroke -g


How do I open a specific port (30033) for Teamspeak?

Usually opening a port refers to unblocking the port in the firewall. Ubuntu blocks nothing by default.

Applications (like Teamspeak) bind to ports that they use. Some mistake that activity for the application opening the port.

If you have not changed your firewall, and and if no application is already using port 30033, then your mission is already accomplished.


How do I get rid of errors and warnings in /etc/mail.log pertaining to a defunct mailman installation?

I found this out by searching for the filname in and below /etc.

It looks like the reason Postfix tries to access the files /var/lib/mailman/data/aliases and  /var/lib/mailman/data/aliases.db stems from this line in /etc/postfix/main.cf (the Postfix main configuration file):

alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases

Changed it to:

alias_maps = hash:/etc/aliases

… and restarted Postfix.

As far as I able to tell, this fixes it. (I used to get these log entries every five minutes. It is now thirty minutes since I restarted Postfix and there is no new log entries about "mailman".)


In Windows:

Control Panel -> Administrative Tools -> Computer Management -> Disk Management

Delete all the partitions on your flashdrive one-by-one by right-clicking on each partition and selecting Delete Volume. Then create a single partition on the free space and format it as NTFS or FAT32.


Why is my terminal invisible after minimizing it and how can I find it?

Use the Super+W keyboard shortcut to show a graphical overview of all windows, including the terminal(s); just click on the one you want to bring it up.
(Super key = Win key)
Example:

Keyboard-only option - Alt+Tab
You can also use the Alt+Tab keyboard shortcut to cycle through all running applications, including minimized ones:

Hold Alt and keep pressing Tab to cycle.
Release both keys when your chosen terminal is highlighted.


Linux Ubuntu grub installation error, embedding area

I was installing from an external hard drive as I didn't have a pen drive. The bootloader settings at the bottom of the install dialog when setting up the partitioning were set to be installed to the external hard drive. I changed this to the internal drive (where Ubuntu was being installed) and it worked.


Can't change / configure system settings

I don't know if you eventually solved your problem, but I had the same problem after 'upgrading' to 13.04, and then downgrading back to 12.04.
What worked for me, was to go into my home directory and remove all of my dot file and dot directories. I didn't test carefully for which one made it work, but do

cd
ls -a

.this
.that
.somethin
.somethinelse
etc.
One of those is some how corrupted or unwriteable or something, and can't persist your changes. Depending on your knowledge and confidence, delete all the ones you don't care about, or delete them one-by-one until you find what works, or google each one before deleting it.

rm -rf .this
rm -rf .that

etc.


Do I need to install ubuntu on my hard drive?

The installer .iso is read-only. When you create a LiveUSB, the "Try Ubuntu" environment exists only in RAM - the USB portion you need at rebooting is read-only. So all your changes are lost at reboot.

The purpose of the "Try Ubuntu" environment is to test Ubuntu's compatibility with your hardware and to see if you like the Desktop Environment before committing to an install.

You can re-make your LiveUSB with persistence. Then a limited number of changes will be kept. Many folks find this a convenient option.

Alternately, you can do a full install of Ubuntu to a USB stick. A USB 3.0 stick and 3.0 USB ports are recommended - USB 1.1 and 2.0 hardware is slower and may cause annoying lag.


Switch from linux-virtual to linux-azure for Accelerated Networking support

The following worked to switch from the linux-virtual package to the linux-azure package:

sudo apt install linux-azure
sudo apt purge linux-virtual
sudo apt autoremove
sudo reboot

After a reboot we now see the updated kernel and stats for the Mellanox VF device:

uname -a
Linux MyVM 4.13.0-1005-azure #7-Ubuntu SMP Mon Jan 8 21:37:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

ethtool -S eth0 | grep vf_
     vf_rx_packets: 510
     vf_rx_bytes: 721043
     vf_tx_packets: 892
     vf_tx_bytes: 200765
     vf_tx_dropped: 0


Wifi light turns red but wireless still works when I close bluetooth on an HP DV6

I upgraded new kernel with fresh install and update . problem solved


X Windows on Ubuntu 16.04 command-line resize infinite loops sometimes?

The problem is with some windows and the "Window Geometry Hints".  Particularly with terminator (gnome version), there's a known issue where the Window Geometry Hints can/might/do hint that the window should be slightly smaller or larger, changing it's mind every time X resizes the window to the hinted size.

The solution at least for terminator (gnome version), is to disable the Window Geometry Hints in the configuration.  Each program having a problem may or may not have a solution individually.


mumble-server i386 depends on libqt4-core and libssl0.9.8

Try these commands on terminal,

sudo apt-get purge mumble-server:i386
sudo apt-get install mumble


Stopping a running script though another script file

A few ways:

Kill any instance of the script:

pkill -f start.sh

This will kill any process with start.sh in its command line, using pkill.

Kill a specific instance of the script:

Modify the script to save its PID somewhere:

#! /bin/bash
echo $$ >> /tmp/start_sh.pid
end=...

And tell stop.sh to kill the process with the PID there:

#! /bin/bash
kill $(cat /tmp/start_sh.pid) || echo "Process is not running."

This will kill all script.sh processes.

Communicate with start.sh

Tell start.sh to read from some file telling to quit:

#! /bin/bash
...
while [ $SECONDS -lt $end ]
do
    [[ $(cat ~/kill_start.txt) == "KILL" ]] && exit 1
    ...

And tell stop.sh to write "KILL" to that file:

#! /bin/bash
echo "KILL" > ~/kill_start.sh

This will kill all instances of start.sh, when the next iteration of each script runs.

(Despite the name kill_start.sh is not a script.)

Use named pipes to communicate

Alternatively, you can run a background job in the script to watch for changes to ~/kill_start.sh:

#! /bin/bash
...
[[ -p ~/kill_script.sh ]] && mkfifo ~/kill_script.sh
(read -N 0 < ~/kill_script && [[ $REPLY == "KILL" ]] && kill 0) &

while [ $SECONDS -lt $end ]
do
    ...

In stop.sh, echo anything to ~/kill_script:

#! /bin/bash
echo anything at all

This will use mkfifo to make a named pipe. Then read will attempt to read from that pipe, and will wait until it gets any input at all, then proceed to exit. This should take effect almost immediately.

Use screen

With screen, you can start a shell via SSH, close your connection, and then resume it later. So you can start a screen session for the script, close your connection, go on holiday, come back, recall your screen connection and kill the script using CtrlC.


StackApplet crashes when loading stats. What do I do?

This seems to occur because of a difference in the configuration files between StackApplet in 11.04 and 11.10. To fix it, remove ~/.stackapplet and log out, then log back in. StackApplet should load as usual, and you just need to add your sites again.


how to unite all files from several subfolders into one big folder?

If you're not wanting to keep the directory structure and just want to move all the files into one folder, you can do something like this.

find /src/folder/1 /src/folder/2 -type f -exec cp {} /path/to/destination/ \;

This will find every file -type f from the given source folders, then execute the -exec command on them.  In this case, you want to copy cp them into the destination folder.

Keep in mind, this will fully traverse the source folders recursively.  If you want to only go deep a certain level into the source directories, use the -maxdepth options on the find command.

find /src/folder/1 /src/folder/2 -type f -maxdepth 2 -exec cp {} /path/to/destination/ \;


Black Screen on Boot HP Pavilion 20 Desktop

This answer from Coldfish fixed the problem.

You should add this option to /etc/default/grub, firstly:

sudo nano /etc/default/grub

and then add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

And then save by hitting Ctrl+O, then exit nano with Ctrl+X, then simply run:

sudo update-grub


x-systemd-ut should be x-systemd-timeout.

https://manpages.ubuntu.com/manpages/xenial/man5/systemd.mount.5.html

This was either a typo or paste error from the original source. I don't understand why it didn't throw an error.


Unusually slow and stuttery NTFS hard drive

Does this happen with other hard drives and flash drives, or just the one? For me, all external media (hard drives, flash drives) caused slowdown on Ubuntu 18.04 but worked fine on Windows 10. This persisted on two machines, across three filesystems (UDF, NTFS, and exFat).

I found two pages that were instrumental in fixing this:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1208993
https://lonesysadmin.net/2013/12/22/better-linux-disk-caching-performance-vm-dirty_ratio/

The solution:

I added these two lines to /etc/sysctl.conf:

vm.dirty_background_ratio = 10
vm.dirty_ratio = 20

and ran sudo sysctl -p. This solution is proposed here as well. It seems to be an issue impacting 64-bit Linux machines with a lot of RAM. If you try this, please let me know if this does (or does not) work for you, in case this is a new issue!


Install Ubuntu desktop no cddrive no internet

The command you entered removed the package containing part of the XML processor for the entire operating system.  To do so, it must have also removed many, many other packages that depend on libxml2 -- which apparently includes some critical component of your operating system.  The large number of "unneeded" packages are other depends for those extra packages that were removed -- depends that are no longer needed by anything still installed.

Merely reinstalling libxml2 won't fix the problem; you'd still need to reinstall all the other packages that were removed, a task that's most likely impractical (if you don't have a complete list, even if you have unlimited time, you won't get there -- and your internet might not work without libxml2 anyway).  Most likely the only solution is going to be to use a Live media (CD, USB drive, etc.) to make a backup of your data files, followed by a reinstall of the entire operating system.


Installer of 14.04.1 LTS doesn't recognize Windows 7

Alright, now that I understand your situation a little better...

Your Windows is booting in Legacy/BIOS mode.
Since the Ubuntu installer is booting in EFI mode (due to UEFI having higher priority than BIOS in the EFI setup), it does not see Windows due to the incompatibilities between the two modes. This actually has to do with differences in disk partitioning between the two modes -- MBR vs GPT partitioning. Ubuntu is booted in EFI mode and so it looks for a GPT table and GPT partitions which don't exist due to Windows using the MBR partitioning scheme.
To be able to see Windows, change the boot priority to Legacy/BIOS first, then UEFI to get Ubuntu to boot in BIOS (purple screen) mode.
Or, use the kernel option 'noefi' when booting the installer (note: I haven't actually tested this)


Answer copied from comments:

If bash works OK from another user account, and your login shell is set to bash, then isn't it more likely that there is some configuration setting that's at fault? Perhaps try restoring a 'clean' .bashrc and .profile to your account from the /etc/skel/ directory!


How to install bind9 with DLZ Ubuntu server 14.04

It's very sad that Ubuntu decided to drop the DLZ support out of their bind9 package since Ubuntu 12.04.

So I had to do my own build (using Ubuntus source package and build options). It isn't too complicated. The following works on Ubuntu 12.04 and 14.04 (tested only with the LDAP-module, but Mysql should work too):

Please remove first an installation of bind if you already have it:

sudo apt-get remove bind9

Then get the compile environment:

sudo apt-get install dpkg-dev

Get the sources:

mkdir ~/bind9
cd ~/bind9
apt-get source bind9
cd bind9-9.8.1.dfsg.P1  # may be different for a newer version

You have to add the DLZ-support:

vi debian/rules
8<--- snip --->8
...
configure-stamp:
        dh_testdir
        ./configure --prefix=/usr \
                --mandir=\$${prefix}/share/man \
                ...
                **–with-dlz-ldap=yes** \
                $(EXTRA_FEATURES)
...
8<--- snap --->8

You have to add a --with-dlz-...=yes for each needed DLZ module. This may be:

ldap
filesystem
postgres
mysql
bdb

Now start the build process:

dpkg-buildpackage

The build aborts if some dependencies are missing, add it, e. g.:

sudo apt-get install debhelper libtool bison hardening-wrapper
sudo apt-get install libkrb5-dev libdb-dev libssl-dev libldap2-dev libxml2-dev libcap2-dev libgeoip-dev

Retry dpkg-buildpackage.

If the build was successful, you can install the package:

cd ..
dpkg -i ./bind9_9.8.1.dfsg.P1-4ubuntu0.3_i386.deb # may be different for a newer version

It is adviced to avoid automatically update of bind:

apt-mark hold bind9


How do I install MySQL without a password prompt?

The following commands set the MySQL root password to strangehat when you install the mysql-server package.

echo "mysql-server mysql-server/root_password password strangehat" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password strangehat" | sudo debconf-set-selections

Note that this creates a cleartext copy of your password in /var/cache/debconf/passwords.dat (which is normally only readable by root and the password will be deleted by the package management system after the successfull installation of the mysql-server package).

Make sure to use quotes if using it in Dockerfile.

Now you can install mysql-server and the password prompt doesn't appear:

sudo apt-get install mysql-server


My GreenTel dongle is not detected in Ubuntu 12.04 LST

If it is a usb error, it may show up in dmesg. So do the following:

Unplug the device
Type sudo dmesg -c - A lot of stuff will come up, but we are basically clearing the logs.
Plug in the device
Type dmesg
Look at the logs for any errors that may help you. They are usually self explanatory. If not, edit your post to include them.

Edit based on user comment

Given that you commented that no errors occurred, I will assume you mean no output after clearing the logs. In that case, I would speculate that you have a hardware issue with the dongle. Try it on another computer and verify that it works correctly. If the dongle works on another computer, check the USB ports with some other usb device to make sure they work correctly.


Ubuntu 14.04 not loading SSD with Windows 8 on it

The unclean file system message has a very simple explanation - your Windows is not shut down but hibernated. You should start Windows, disable hibernation (run "powercfg -h off" command in an elevated command prompt), shutdown Windows, start Linux and I'm 99.99% confident you'll not get the unclean file system message anymore.

It's not clear from your post what you mean by "I want to boot windows" part - are you trying to boot Windows and fail? Just remove the Linux HDD and let only the Windows HDD in the system and try like this. Anyway, if you moved the Windows HDD from another system it might fail booting (and even if it will boot it will most probably miss drivers and/or ask to re-activate due to the hardware changes).

You should boot the Windows HDD on the system where Windows was installed. After you disable hibernation as instructed above and shut down than you could move the HDD to the Linux system in order to access files from it (but not booting Windows from it) from Linux.


How do I install HD3000 drivers on ubuntu 12.04?

This system has nvidia optimus techonology enabled. Nvidia driver doesn't support optimus in linux. So in linux both graphics card are on which lead to high battery consumption and overheat.

In optimus tech, the intel graphics is always on. When you use Nvidia 540m, images generated by GT540m actully transported through  intel grphics card.

options available

Turn off nvidia 540m and use intel only. Use Nvidia card with special command only when required. Also never install nvidia-drivers alone.

Instruction for installing Bumblebee to turn off  discrete  GPU and enable only when required

Type the following in terminal,

sudo add-apt-repository ppa:bumblebee/stable

then

sudo apt-get update
To install Bumblebee using the proprietary nvidia driver:

sudo apt-get install bumblebee bumblebee-nvidia
Run following

sudo usermod -a -G bumblebee $USER
Reboot.

If you just want to disable nvidia card, no need to learn followings

Usage Instruction :

To run a program with nvidia card, use optirun command prefixed in terminal.
Like to run glxspheres with nvidia card type

optirun glxspheres

To run firefox type : optirun firefox &

Note: If you intend to run 32-bit programs like Wine and using Ubuntu 11.10 Oneiric or later, install 32-bit libraries with:

sudo apt-get install virtualgl-libs:i386 libgl1-mesa-glx:i386 libc6:i386

Linked Questions:

How well will Nvidia Optimus cards be supported in 12.04?

Is a NVIDIA GeForce with Optimus Technology supported by Ubuntu?

Can't use nvidia card/driver on optimus notebook


Ownership was the issue. No web directory should be owned by root! should have seen that myself (duh)

I did chown -R webadmin:psacln crm and the rest worked like clockwork.


No Partitions Recognized by Ubuntu in Trial Mode

As per you screen shot, your drive is set as dynamic (see below disk0 in image).

Unfortunately this dynamic disk and partition are only recognizable in windows OS.

Not only ubuntu, no other OS will recognize the partition. Linux boot loaders can not be installed in dynamic disks.

The only way is to convert it basic driver. But for that you need to delete your existing partition. Thus deleting your data which may not be recoverable.

Alternate solution is use ubuntu in virtual environment (using virtualbox, vmware)

A ref link : How to convert dynamic disk to basic


If you select the Unknown Album of the Unknown Artist, Banshee will display the corresponding track-list (which should contain all the unidentified tracks you imported).

Select all the unknown tracks which you believe belong to a same album (using shift+left-click or ctrl+left-click), then right-click to get the context-menu. In this menu you will choose Edit Track Information:

You will then see an Edit Track Information dialogue, where you will be able to edit your metadata manually:

There are also plug-ins to fix metadata.


That's a non-breaking space, see octals-302-240-together-seem-to-correspond-to-non-breaking-space  It's the result of using a word processor instead of a text editor.
You might be able to select what type of output your editor produces, or fix the output after the fact (like the sed edit pass in the link), or select another editor that outputs just what you type.


Will libdrm-nouveau2 library conflict with proprietary nvidia-346 driver?

You very probably also have an Intel card on-board and these are Intel upgrades (which xorg-edgers provides too)

I've applied them as I'm running Hybrid Intel-NVidia and had no ill effects, but as you're running on nVidia drivers only, these drivers are only being installed because they're there already!

That being said: take a system backup first (you've just been promoted to user type 4) and afterwards apply these upgrades.  If anything goes wrong, just restore the system backup and hold those packages at their current level.  (thought that's highly unlikely as you're running pure nVidia)


This should do it.

find . -type d -path '*/build/debug'

Test harness:

$ mkdir -p tester/{1..3}/build/debug
$ find tester -type d -path '*/build/debug'
tester/1/build/debug
tester/2/build/debug
tester/3/build/debug


How do I share NFS mounts over zeroconf?

My answer to question 18933 actually included an answer for NFS shares (although the question did not explicitly mention NFS):
Create a service description file (e.g. nfs.service) in /etc/avahi/services with the following content:

<service-group>
  <name replace-wildcards="yes">NFS share on %h</name>
  <service>
    <type>_nfs._tcp</type>
    <port>2049</port>
    <txt-record>path=/path/to/someshare</txt-record>
  </service>
</service-group>

The port 2049 requires you to use the insecure option in the /etc/exports file, though.

Then it should be possible to use your file manager, navigate to "Networks" and access your share. Unfortunately, The GNOME file manager does not provide support for NFS at the moment (Launchpad Bug #29263, thanks to João Pinto for pointing this out) and the NFS support in the KDE file manager is broken (KDE bug #184997 Now fixed) as well…


Knowing the Linux will use memory to cache data was not the problem. I have finally found out the problem for the slow running computer. It was caused by the plex media server.

rick@rick-M52BC-M32BC:~$ service plexmediaserver stop

rick@rick-M52BC-M32BC:~$ service plexmediaserver start

dropped the memory usage down from 87% to 29% usage immediately.


The Intel HD 4400 is supported by the i915 driver that is part of the official Ubuntu kernel. You don't need anything special.


Installation interrupted during upgrade from Ubuntu 14.10 to 15.04

If you have a recent system backup this not a big problem, just restore it and start over again.

When not, I recommend to completely reinstall Ubuntu - just install it the way you did before.

I also recommend to format the partition before by using GParted from Ubuntu install media.

Even if Ubuntu system is working somehow in the moment, serious problems may occur later.


sudo apt-get trying to connect through old proxy

Just found it.

Deleting the lines containing the proxy in:

/etc/apt/apt.conf

sorted it.


What are all possible ways to login into an Ubuntu system?

You seem to be concerned about attackers who are going to bypass your operating system completely and access the files on your hard driver directly (by booting a different operating system such as a rescue image or live CD, or anything, really).

Clearly the only thing that's going to help you there is to encrypt all your filesystems and your swap. You will have to enter a passphrase on the console at boot time. Without the passphrase, the filesystem can be destroyed, but not accessed.

Still, you should be aware that if the attacker has physical access, there are still some things that they could do (or might have already done!) such as installing a keylogger.


We can download make 3.81 (or 3.82, or any other) and install it.

Download a make version in the GNU FTP repository.
Extract the files from inside the tar archive to a folder.
Go to this folder and install like this (see also detailed how to install a .tar.gz file):

./configure
make
sudo make install


Have you tried the latest version of Pandoc, which currently is v2.5?
Have you tried to play with '--epub-chapter-level=...' numbers?
Have you tried to play with '--top-level-division=section' (or ...=part or ...=chapter) for the output?
Have you tried with the LuaLaTeX engine`?

pandoc      \
  -f epub   \
  -t latex  \
  -o my.pdf \
  --epub-chapter-level=1 \
  --pdf-engine=lualatex  \
   test.epub

Have you tried a non-Pandoc tool like Calibre?


There's a setting called "Disable Screensaver". Do you ave this option checked?
You can find it in Tools>Preferences>Video (Select "All" under Show Settings instead of "Simple") and click on "Video" in the left column. About the middle of the box you should see "Disable Screensaver".


An Atom processor?  Running Ubuntu???  :O

I'd start looking at Lubuntu and install that!

Probably your system was just barely fitting until 14.04.4 when it started swapping like mad and that just looks like it's freezing: it's actually still working, but 1000 times slower then before...

Sorry to be the harbinger of bad news...

Alternatively, just get rid of that thing and buy a new computer instead of using Lubuntu (which I've ran on Atom processors a long time ago, though not recently)


I have seen this before. Windows does not always write data in sequential order on a drive partition. When you resize the partition or create a new partition outside of Windows it is possible to delete part of the MBR or OS as it is not stored in the earlier sections of the partition. What this means is if Windows has written data to a sector is on the partition that you've shrink you will have no noot or corrupt OS. This is also part of the reason why users have trouble cloning a larger hard drive to a smaller SSD and this explains why you are not able to boot into windows anymore. The best solution is to reinstall windows and create your correct partition size then install Ubuntu in its own partition.


Partition is invisible in Windows after formatting during Ubuntu installation

You can reformat the disk in Windows to make it reappear as a drive in Windows Explorer. This is done with the Disk Management tool.

Press Win+R and type diskmgmt.msc to launch the Disk Management tool. Select the disk containing the old F:\ partition and then right-click the partition. Click "Format..." and complete the formatting process:


How do I disable compression in Filezilla?

well there are many compression formats for Ubuntu in FTP by depending upon the filetype.

We have a lot of details thats why I am placing few of them along with their links so you can choose what ever you want.

From EDIT-SETTINGS you can do this
Here is the link:roadmap96


I have made it work, however I'm not sure if this is secure option to do.

In /etc/apache2/apache2.conf file, I have changed the "Require all denied" to "Require all granted" here:

<Directory />
        Options FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

I'm not sure why it was set to all denied, since I did not change it.
However, the server is now working, and no longer throwing error 403.


Well, after running the following command:

sudo -u postgres psql -d postgres -c "alter user melon with password 'melon'"

And changing the following lines on my pg_hba.conf file from

# "local" is for Unix domain socket connections only
local   all             all                                     md5

to

# "local" is for Unix domain socket connections only
local   all             all                                     password

the script now runs correctly.

If I am to be completely honest I cannot explain why, but this did fix my problem.


Is there a way to restore a Linux system to a previous state Using BTRFS? as in Windows restore points

Yes, there is a very good way to make restore points using btrfs in Ubuntu.

Standard Ubuntu installation with btrfs uses subvolumes @ for / and @home for /home.

If you have installed Ubuntu in the default way with these subvolumes, then you can easily make restore points for / and /home separately.

You can check if you have these subvolumes by running

sudo btrfs list /

Let's assume that the partition with Ubuntu is /dev/sda1.

Make a snapshot of your / by running.

sudo mount /dev/sda1 /mnt
sudo btrfs sub snap /mnt/@ /mnt/@_backup
sudo umount /mnt

Now you can safely amend your data on / (not including /home). You can install or delete any packages, or do whatever you want.

To restore to the previous state you will need to boot from a LiveUSB and rename subvolumes.

sudo mount /dev/sda1 /mnt
sudo mv /mnt/@ /mnt/@_broken
sudo mv /mnt/@_backup /mnt/@
sudo umount /mnt

Now you can boot into the original system state.

If you are sure that you do not need the "broken" subvolume any more, you can delete it this way:

sudo mount /dev/sda1 /mnt
sudo btrfs sub del /mnt/@_broken
sudo umount /mnt

The same way you can make restore points for /home.

You can have some other subvolumes if you installed not a default way. But you can always make snapshots of any subvolumes the same way.

A useful example:

Before you upgrade Ubuntu to a newer release, make snapshots of / and probably /home. The latter is not very important in most cases.

If something goes wrong during or after the upgrade you can always return to the old release.

You can keep old snapshots for any time if you have enough disk space.

I upgraded this way some computers from 14.04 to 16.04 and keep the 14.04 snapshots in case there are some problems with 16.04. It takes a minute to boot into 14.04 this way.

You can  also setup grub a way that you can boot into one or another snapshot using grub menu. But it is probably a topic for another question.


As you found out, you need a specially prepared MBR as input for xorriso.
It has the unusual job to find and start program "isolinux.bin" inside the ISO.

The SYSLINUX project offers a suitable MBR under the name "isohdpfx.bin".
Debian binary package "isolinux" has it as /usr/lib/ISOLINUX/isohdpfx.bin .

Although there is few development in SYSLINUX, one should take care to
combine isohdpfx.bin and isolinux.bin only from compatible versions. So when
modifying an ISO and keeping its file isolinux.bin it is wise to extract
the first 432 bytes from that ISO and use them as MBR input. (It is not
harmful to copy all 512 bytes of the first block. xorriso will overwrite
the surplus bytes with appropriate values.)


Please run this terminal command:

sudo lshw -C network

Find your internal (Atheros??) device and find its driver. It may be ath9k or ath5k or similar. Now blacklist it:

sudo -i
echo "blacklist ath9k" >> /etc/modprobe.d/blacklist.conf
modprobe -r ath9k
exit

Of course, substitute the driver you found, if not ath9k. If in doubt, stop and ask here.


Can I use ubuntu to recover files from an old system

The short answer is "yes."

But if I left it at that, I think I'd be a jerk. You're probably wondering "how." Well, I'm glad you asked. My suggestion would be to boot from the Live CD and then have a USB drive (or external Hard Drive) handy to recover your files on to.

Download and burn a Ubuntu Live CD (c/f http://www.ubuntu.com/download/help/try-ubuntu-before-you-install and https://help.ubuntu.com/community/BootFromCD).

Basic instructions are:
Boot your computer from the CD, mount the USB drive and your old hard disk, and just copy the files!

Check out this post on this message board for how to mount your Hard Disk from the Live CD.


It's not likely a permission issue but instead a file recursion issue.

This happens sometimes when you have a recursive dependency in your package.json that asks the system to install a copy of itself.  For instance if you might have a dependency in the file that says

"iconic": "file:node_modules/iconic"

(or similar) that could cause the kind of symbolic file loop that would generate that kind of error.

You might be able to fix by removing that line in package.json and then retrying your install. You might find you don't need to use sudo. Here is a help reference for someone else who had a similar issue error and solution.


12.10 Quantal display issues using nvidiaXineramaInfoOverride

In recent versions of NVIDIA Linux graphics driver - including the version of nvidia-current in quantal 12.10, 304.51 - the support for RandR 1.2+ has been introduced, improving the integration between the graphics card and the window manager (GNOME, KDE, etc.) with the handling of display resolution, rotation, etc. from window manager tools in addition to nvidia-settings. However it seems that TwinViewXineramaInfoOverride xorg.conf config option (which now has been renamed to nvidiaXineramaInfoOverride) is not working properly.

To follow NVIDIA progress on this subject see:

http://www.nvnews.net/vbulletin/showthread.php?p=2578805
http://www.nvnews.net/vbulletin/showthread.php?t=184814

A possible solution is to use Fake Xinerama http://home.kde.org/~seli/fakexinerama/ that has been proven to work also with Xorg 7.7 (the version of Xorg on quantal 12.10). To follow the procedure described in the linked document you need:

Before the procedure, sudo apt-get install libxinerama-dev
After the procedure, reboot the system

You can use the following content for ~/.fakexinerama:

2
0 0 1920 1080
1920 0 1920 1080

To enable fakexinerama only when the Matrox DualHead2Go is present, you can also add this code to /etc/init/lightdm.conf, before exec lightdm:

if lsusb | grep -q 18ea:0003; then
        echo "Matrox DualHead2Go Detected"
        cp /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0-fake /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
else
        echo "Matrox DualHead2Go NOT Detected"
        cp /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0-orig /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
fi

Use the following rules to make this code working:

In any case, use /usr/lib/i386-linux-gnu instead of /usr/lib/x86_64-linux-gnu if not on 64 bits
Make a backup copy of the original /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0 to /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0-orig
Copy the modified version, resulting from fakexinerama build to /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0-fake
Replace 18ea:0003 with your device product id, if different (use lsusb to find the right value).

Reboot the system each time you need to switch from Matrox DualHead2Go mode to original mode.

NOTE: once working you should be able to maximize windows to each single screen, but any action that use the RandR information instead of Xinerama won't take care of the fake Xinerama information (e.g. wallpaper, Adobe Flash full screen - including YouTube, etc.).


AMDGPU-Pro cause flickering with MSI R9 390

Have you tried changing the driver settings? If you open "System Settings" and go to "Additional Drivers" tab, there is a list of all AVALIBLE drivers for your system. The driver your using is probably unsupported.


how on ubuntu 12.04 writeon cd and read from cd

You can get the perfect solution in the link below

http://www.ubuntu.com/download/desktop/burn-a-dvd-on-ubuntu


I think you should use Wine.

sudo apt-get install wine
wine dir/WAV2RAW.exe

Or Mono if you know that exe is .NET application:

sudo apt install mono-runtime
mono dir/WAV2RAW.exe


Why does Startup Disk Creator say Ubuntu 14.04.3 is a beta version?

14.04.03 was released August 6, 2015. Your iso has the date August 5, so you downloaded it while it was still a beta.

But it doesn't matter. You can use it and it will update to the release version. Or you can re-download it if you feel better about it. But there's no need to use 14.04.02, since .03 is the current release.

That said, there may be a minor bug with the 14.04.3 iso. I also just downloaded the ubuntu-14.04.3-desktop-amd64.iso file and in the README.diskdefines it says:

#define DISKNAME  Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64

And the /.disk/info includes the date info that you are seeing:

Ubuntu 14.04.3 LTS "Trusty Tahr" - Beta amd64 (20150805)

So Startup Disk Creator says the version is a beta because the iso file says it is a beta.

I haven't been able to find any documentation to say whether this is a bug or is by design. But using dd to burn the disk creates a usb with the label:

Ubuntu 14.04.3 LTS amd64

Note the absence of 'beta' and the date. If it were truly a beta or development branch this would show up in the name.

So Startup Disk Creator is just displaying the info that it sees. Whether the bug is with the iso (and the creators neglected to remove 'beta' from those to spots) or the bug is with how SDC pulls the info to display, I can't say.

You are better off just using sudo dd if=/path/to/iso of=/dev/usually-sdb, although you need to be very careful that you have the output file (device) named correctly before pressing Enter.

In the end, the iso is fine to use and I seriously doubt there is any reason to think you would have ever noticed any issue at all if you had originally used dd to create the installation media.


As Richard indicates in his comment.

1) Find what kind of video card you have:

Open a terminal with CtrlAltT and issue the command sudo lshw -class video

2) Find what driver is required for it.

There are a number of ways to do this.

a) You can run Additional Drivers and see if one comes up as Recommended and choose that.

b) You can search Google for "Ubuntu" and/or "Linux" and the  that shows up on the vendor line of your lshw output and/or the  that shows up on the product line of your lshw output.

c) You can visit the card manufacturers site as found on the aforementioned vendor line and locate Linux drivers there.

3) install it.

This process may vary.

a) If you found it in Additional Drivers, the Additional Drivers app will allow you to "Apply Changes" after driver selection.

b) If you found it via Google, you may find installation instructions there.

c) If you found it on the manufacturers site, installation instructions are normally included, either on the page where you found the driver or in a README in the driver package.

If you still have difficulty at this point you will be armed with the information you obtained going through this process which will be helpful in searching the site for an answer specific to your hardware. This information will also be useful if you don't find an answer searching and need to ask a new question. You should be asked for the output of the aforementioned command if you don't include it (including is recommended).


phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection XAMPP

I have wasted now 2 days on this. Finaly I got the solution,
remove xampp and install mysql, phpmyadmin, php5, apache2 manually.

sudo apt-get install apache2 mysql-server mysql-client php5 libapache2-mod-php5
apt-cache search php5

Then pick the ones you need and install them like this:

apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo apt-get install phpmyadmin
sudo service apache2 restart

Now you can open http://127.0.0.1/phpmyadmin/

These upper commands will make your xampp server. It will resolve your problem quickly and worked very smoothly.

Thanks to related articles:
1. Ubuntu 14.10 LAMP server tutorial with Apache 2, PHP 5 and MySQL (MariaDB)
2. How do I change the root directory of an apache server?


Try sudo apt-get install libcgal*. Here is the package description.

If you really need to compile it from source I can only say that I managed to do it on Windows 7 and on Ubuntu 10.04 (havent tried on later). However it is a bit frustrating. But when it writes: fatal error: iostream.h: No such file or directory compilation terminated it simply cannot find the usual files provided with compiler so it might suggest that there's something wrong with your paths. And still CGAL is a C++ library, and iostream.h is a C file.

Try writing and running a simple C program using iostream.h file and let us know if it works.

Also be sure that you have installed all required 3rd party libs (Qt, MUMPS, LAPACk etc).

EDIT: If you need compiled version anyway, than install the packaged version for development and in the free time try to make it compile at last. After you succeed it will be enough to switch include and lib directories in your project.

EDIT2:

Install prerequisities:

sudo apt-get install cmake cmake-gui libgmp* libboost-all-dev zlib
Download CGAL
Open terminal and cd to main CGAL folder (CGAL-4.2)
run cmake: sudo cmake-gui
check Advanced checkbox if unchecked
find options that start with WITH word and uncheck all except: WITH_CGAL_Core and WITH_GMP
Press Configure. Try to remove unmed dependencies or options - like OpenGL Dir not found etc. by setting proper paths and press Configure again
After no errors are reported press Generate and close cmake
in terminal in main CGAL folder write: make and that should give you some libs (f.ex. libCGAL_Core.so and libCGAL.so in CGAL-4.2/lib folder
If that worked yoy can try to add other options and functionality. Install Qt3 and Qt4, Blas, Lapack and all the stuff required, and after each change try to build it.


How to copy all folders that contain a specific file

An option is to use rsync, which copies only flac files and preserves directory structure:

rsync -avzm --include=*/ --include=*.flac --exclude=* albums/ backup/

a archive
v verbose
z compress during transfer (may not be useful copying on the same computer)
m prune empty dirs
first include includes all directories
second include includes flac files
the last exclude excludes all other files


I believe you are looking for something like this:

ls -d /home/$USER/Documents/*/

it will list all dirs in Documents. The last "/" makes it "directories" only.


Why do I have two PostgreSQL versions in my Ubuntu 18.04?

The short answer: It's happening because you didn't uninstall version 10 (Ubuntu 18.04) before installing version 11 from some other non-Ubuntu source.

Take a look at version 10 and 11 availability in the Ubuntu repositories:

$ rmadison postgresql-10
 postgresql-10 | 10.3-1                | bionic
 postgresql-10 | 10.5-1                | cosmic
 postgresql-10 | 10.9-0ubuntu0.18.04.1 | bionic-security
 postgresql-10 | 10.9-0ubuntu0.18.04.1 | bionic-updates
 postgresql-10 | 10.9-0ubuntu0.18.10.1 | cosmic-security
 postgresql-10 | 10.9-0ubuntu0.18.10.1 | cosmic-updates

$ rmadison postgresql-11
 postgresql-11 | 11.2-1                | disco
 postgresql-11 | 11.4-0ubuntu0.19.04.1 | disco-security
 postgresql-11 | 11.4-0ubuntu0.19.04.1 | disco-updates
 postgresql-11 | 11.4-1.1~build1       | eoan

$ snap search postgresql
Name                                 Version   Publisher      Notes    Summary
postgresql95                         9.5.13    cmd✓           -        PostgreSQL is a powerful, open source object-relational database system.
postgresql96                         9.6.9     cmd✓           -        PostgreSQL is a powerful, open source object-relational database system.
postgresql10                         10.4      cmd✓           -        PostgreSQL is a powerful, open source object-relational database system.
postgresql93                         9.3.23    cmd✓           -        PostgreSQL is a powerful, open source object-relational database system.
postgresql94                         9.4.18    cmd✓           -        PostgreSQL is a powerful, open source object-relational database system.

From this, we learn two things:

1) Version 10 and 11 have different package names. This means you can install multple versions side-by-side. This seems to be what you did. You can simply remove most your your postgresql-10 or postgresql-10-* packages. (Warning - misusing wildcards can damage your system; always run a --simulate first and read your output carefully to ensure it's removing only what you want)

2) Version 11 is not available for 18.04 from any official Ubuntu source. That means you added some non-Ubuntu source. So be doubly careful when removing version 10: We don't know what you added, from where, or what other non-Ubuntu dependencies it dragged in.


Does Steam Controller work on Ubuntu 19.04?

Yes. I run it with the 3rd party software SC-Controller, which is an alternative if one wants no steam software on their system.


Why can't I get Android Studio from umake anymore?

To install Android Studio in Ubuntu 16.04 ,You need the latest version of umake which is 16.05 .
Check your umake version using

umake --version

you need to not, install umake from the standard ubuntu repositories, instead add ubuntu-desktop repository to get latest umake version.
Add repository by

sudo add-apt-repository ppa:ubuntu-desktop/ubuntu-make

Update software Source

sudo apt-get update

Now install/upgrade umake

sudo apt-get install ubuntu-make

Now install Android Studio by

sudo umake android android-studio


Why can i not print to a network attached printer from Ubuntu?

The answer for me were to put the following in the smb.conf on the raspberry pi:

use client driver = yes


You should have this in the interface file

auto eth0
iface eth0 inet dhcp
        post-up iptables-restore < /etc/iptables.up.rules

Since right now you only have a loopback interface setup


By default, with the update to Mysql 8, binlogs were enabled and populated tens of GB within hours.
Myy solution was to delete the binlogs and deactivate a functionality that should never have been suddenly enable by default.
Thanks Rinzwind for pointing out to me that a bare ubuntu server install is about 10 GB.


How to run mysql_upgrade when using xampp?

You can do this if you follow this steps:

Go to the xampp directory: cd /opt/lampp/
Go to the bin directory: cd bin
Execute the script: ./mysql_upgrade


Desktop icons out of place when on multiple monitors?

This problem is still present in Ubuntu 14.04. After all this years nothing has been fixed, but at least I have an easier workaround for this problem.

I open a Files window (nautilus, nemo, etc.) and navigate to the Desktop folder. I select all my files and just drag and drop them anywhere I want in the visible (and accessible) desktop. No files get copied or cut since it's just a rearrange inside the same folder from two different interfaces. This way you don't have to be constantly changing the Monitor's configuration.

The problem still persist if you want to save or create new files on your desktop, because they all get created and/or saved in the inaccessible part of the desktop.


This is feasible if your disk filled for less than 45% of its space (assume it as /dev/sda).
To do so you need:

partitioning your second drive (/dev/sdb) to 2 partitons with equal size.
create second mirrored zfs pool from created partitions. E.g. zpool create tank /dev/sdb1 /dev/sdb2
create necessary datasets on new pool
copy your OS disk to new tank partition (using zfs send for instatnce)
reconfigure grub to boot from a new pool
reboot from new pool
now destroy your old pool
clear zfs data from sda disk using zpool labelclear ...
replace one of devices (/dev/sdb1 partition) in your new pool with /dev/sda, wait for resilvering completion
install grub to your sda device
reboot to ensure your server is bootable from /dev/sda
detach /dev/sdb2 partition from tank pool
clear /dev/sdb partition table
replace /dev/sdb2 partition in tank pool with /dev/sdb and wait for resilvering completion
install grub to your sdb device

I assume that you do not have the ability to temporary backup your system disk somewhere. So I recommend training on some local VM first. Good luck!


No sound after installing 13.04 Have tried everything

Did you install 'third part software' during the install?
Check if you have this packages installed:
   gstreamer0.10-fluendo-mp3
   flashplugin-nonfree

if not install them using apt-get


Why does Update Manager install the i386 version of Skype on an AMD64 system?

Skype for Linux is not available as a 64bit native binary package. Why? Ask Microsoft

So, to install Skype in 64bit Ubuntu you will need some packages from the 32bit architecture.

Microsoft now calls it (for 12.04+ Ubuntu versions) Skype(multiarch).


12.04 64 bit - Mouse is not working on startup - keyboard works fine

Just also had the mouse mostly stop working on 12.04 64-bit (could still click on app icons  to open them, but could not use mouse to drag them, resize, or do anything else with the mouse -- also could not click on "settings" icon -- BTW, not running Unity here -- sudo apt-get install gnome-panel instead).  Tried resetting the wireless mouse connection and tried new batteries. Didn't help. lsusb in terminal window showed "Bus 008 Device 002: ID 046d:c50e Logitech, Inc. Cordless Mouse Receiver" so looked ok.  What did fix the problem for me was unplugging the wireless mouse USB connector from the computer and plugging it in again.  Plugged it into a different USB port. Don't know if that mattered. Might give that a try.


Installing TinyOS on recent version of Ubuntu

From the TinyOS tutorial at your link:

  Supported distributions are (hardy, intrepid, jaunty, karmic)

All of these Ubuntu releases are end of life and are no longer supported by updates. You are using Ubuntu 14.04 which is not supported by the TinyOS package repository that is shown in the tutorial at your link.

Instead I followed the instructions from Automatic installation - TinyOS Wiki to install TinyOS in Ubuntu 14.04 (it also works in Ubuntu 16.04).

Install TinyOS in Ubuntu 14.04 and 16.04

Visit TinyOS (TinyProd) Debian Development Repository and follow these instructions:

Tell apt about the TinyProd Signing Key.

wget -O - http://tinyprod.net/repos/debian/tinyprod.key | sudo apt-key add -

Add the two new lines to /etc/apt/sources.list.d/tinyprod-debian.list:

sudo -s
cd /etc/apt/sources.list.d
echo "deb http://tinyprod.net/repos/debian wheezy main" >> tinyprod-debian.list
echo "deb http://tinyprod.net/repos/debian msp430-46 main" >> tinyprod-debian.list

Install the new packages:

sudo apt-get update
sudo apt-get install nesc tinyos-tools

I didn't install either msp430-46 or avr-tinyos at this step, in case you want to install them later after you have tested your TinyOS installation.

Get the code from the TinyOS release repository:

wget http://github.com/tinyos/tinyos-release/archive/tinyos-2_1_2.tar.gz
tar xf tinyos-2_1_2.tar.gz

This will extract the actual TinyOS code in a folder named tinyos-release-tinyos-2_1_2 inside the directory the command was issued. Feel free to rename this folder to tinyos-main.
You will need to add some environment variables to your shell. The following file includes the necessary ones. Substitute the placeholder  with the path where you chose to place the code in the previous section (full path recommended).

# Here we setup the environment
# variables needed by the tinyos
# make system

export TOSROOT="<local-tinyos-path>"
export TOSDIR="$TOSROOT/tos"
export CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
export MAKERULES="$TOSROOT/support/make/Makerules"
export PYTHONPATH=$PYTHONPATH:$TOSROOT/support/sdk/python

echo "setting up TinyOS on source path $TOSROOT"

Suppose you named this file tinyos.env. There are now at least two possibilities to have these variables accessible in your shell:

Place it as root user in /etc/profile.d/
Place it in <local-tinyos-path> and add the following line to your .bashrc

source <local-tinyos-path>/tinyos.env

After the TinyOS installation is finished, you can check if it is successful by executing some of these commands:

tos-bsl                 tos-ident-flags         tos-serial-debug
tos-build-deluge-image  tos-install-jni         tos-set-symbols
tos-channelgen          tos-locate-jre          tos-storage-at45db
tos-check-env           tos-mote-key            tos-storage-pxa27xp30
tos-decode-flid         tos-mviz                tos-storage-stm25p
tos-deluge              tos-ramsize             tos-write-buildinfo
tos-dump.py             tos-serial-configure    tos-write-image


After a long time I have the answer:

#!/bin/bash

# PURPOSE: Script to check temperature of CPU cores and report/shutdown if specified temperatures exceeded
#
# AUTHOR: feedback[AT]HaveTheKnowHow[DOT]com

# Expects two arguments:
# 1. Warning temperature
# 2. Critical shutdown temperature
# eg. using ./CPUTempShutdown.sh 30 40
# will warn when temperature of one or more cores hit 30degrees and shutdown when either hits 40degrees.

# NOTES:
# Change the strings ">>/home/xybrek" as required
# Substitute string "myemail@myaddress.com" with your own email address in the string which starts "/usr/sbin/ssmtp myemail@myaddress.com"

# Assumes output from sensors command is as follows:
#
# coretemp-isa-0000
# Adapter: ISA adapter
# Core 0: +35.0 C (high = +78.0 C, crit = +100.0 C)
#
# coretemp-isa-0001
# Adapter: ISA adapter
# Core 1: +35.0 C (high = +78.0 C, crit = +100.0 C)
#
# if not then modify the commands str=$(sensors | grep "Core $i:") & newstr=${str:14:2} below accordingly

echo "JOB RUN AT $(date)"
echo "======================================="

echo ''
echo 'CPU Warning Limit set to => '$1
echo 'CPU Shutdown Limit set to => '$2
echo ''
echo ''

sensors

echo ''
echo ''
stop=0
while true;
do
sleep 1.5
for i in 0 1
do
str=$(sensors | grep "Core $i:")
newstr=${str:17:2}

if [[ ${newstr} -ge $1 ]]
then
echo '============================' >>/home/xybrek/Desktop/CPUWarning.Log
echo $(date) >>/home/xybrek/Desktop/CPUWarning.Log
echo '' >>/home/xybrek/Desktop/CPUWarning.Log
echo ' WARNING: TEMPERATURE CORE' $i 'EXCEEDED' $1 '=>' $newstr >>/home/xybrek/Desktop/CPUWarning.Log
echo '' >>/home/xybrek/Desktop/CPUWarning.Log
echo '============================' >>/home/xybrek/Desktop/CPUWarning.Log
fi

if [[ ${newstr} -ge $2 ]]
then
echo '============================'
echo ''
echo 'CRITICAL: TEMPERATURE CORE' $i 'EXCEEDED' $2 '=>' $newstr
echo ''
echo '============================'
sudo pm-suspend
echo 'Sleeping....'
#exit
else
echo ' Temperature Core '$i' OK at =>' $newstr
echo ''
fi
done
done

echo 'Both CPU Cores are within limits'
echo ''


After a bit of trial-and-error, I ended up with this,

#!/bin/sh

case "${1}" in
  resume|thaw)
    nmcli r wifi off && nmcli r wifi on;
esac

Put this in /etc/pm/sleep.d/10_resume_wifi and the problem should be fixed immediately.

Copied my own answer from Wireless networking not working after resume in Ubuntu 14.04


In order to do this, you'll need to edit /etc/fstab.

Make a backup of the file with the following command:

sudo cp /etc/fstab /etc/fstab.old

Now open the file with gedit:

gksu gedit /etc/fstab

At the bottom, add the following:

/dev/sda1 /media/vista/ ntfs fmask=0022,dmask=0000,uid=1000,gid=1000 0 0

Restart and make sure that it is now mounted when you log in.


Downloading through Ubuntu Software Center gives an error

Use Synaptic Package Manager to search for broken packages. Then use it to fix/upgrade the packages. A

sudo apt-get install

should get it sorted out for you.


Ubuntu 14.04: Converting a `pdf` file to `ps` format

I would try GhostScript:
gs
-o repaired.pdf
-sDEVICE=pdfwrite
-dPDFSETTINGS=/screen
your_original.pdf
or "-dPDFSETTINGS=/prepress" according the quality you wants.


The shortcut for that is CtrlSuperRight/Left. As for  CtrlSuper it Up/Down minimizes/maximizes the windows, so cannot be used to create vertical splits.


you need to copy your public key to VM, it's not recognized your public key so add
it

$ scp ~/.ssh/id_rsa1.pub tc@54.80.22.15:.ssh/authorized_keys

or also try it

$ cat ~/.ssh/id_rsa1.pub | ssh tc@[your.ip.address.here] "cat >> ~/.ssh/authorized_keys"


Ubuntu 12.04 freeze after few seconds in hp touchsmart 520

Try reinstalling grub loader. My computer starts ubuntu 12.04 very slowly, taking more time to boot up than normal. I have to wait to approx. 5 minutes to get to the login. Your problem seems to have issue with either grub loader or maybe the GPU settings.


how can i install touch driver for chuwi hi8 air

While it's not plain from the linked instructions, since insmod makes system-level changes, you must run insmod as root:

sudo insmod ./gslx680_ts_acpi.ko


How to install windows 10 alongside ubuntu 16.04 when the hard disk is ex4 formatted?

First, if you have very important data, make sure that it's backed up.  Also test your backup to see that your important data can be retrieved.

Windows doesn't understand ext4, but Ubuntu understands NTFS fine.  Also Ubuntu can network with Windows computers, so it can do file sharing over a network.  However you do it, you need Windows (because you said so), and you probably need Ubuntu, because that's where your data is now.

I can see a few options:

Install Windows alongside Ubuntu, according to the directions in the link that @PatrickNegus provided.  This would be a real pain to do, and you'll probably need to pay for a new Windows license by buying a copy of Windows.  Lots of finagling may be required to get the computer to boot right.
Back up all your important data, install a copy of Windows and let it erase the hard drive, install Ubuntu alongside Windows in dual-boot mode, and then recover your data from the backup.  You can use Ubuntu to copy data to and from your NTFS partition, where Windows can see it.  If you haven't blown away your computer's recovery partition, you might be able to use your computer's recovery process to reinstall Windows like it was when you bought the computer; otherwise, you'll probably need to buy a new copy of Windows.  This is probably your simplest and most reliable option if you only have one computer, believe it or not.
Use an external computer for Windows, and share data over the network.
Install some virtualization software like VirtualBox, and install Windows into a virtual machine.  Again, you'll probably need to buy a Windows license.  Create a virtual host-only network so that the Windows instance in the virtual machine can communicate with the Ubuntu host.  Warning, virtualization is great, it solves all sorts of problems and is fun to play with, but there's a learning curve; you'll encounter a whole new class of problems.

Good luck.


Using 'if' inside two 'while' loops in bash -- 'if' completed skipped

I am not sure if the specific goal is to know the nested loop operator behavior, or to find the bootvolume, but in your shoes I've solved that problem in the past avoiding the nested while loops since I find them confusing to read and maintain:
#!/bin/bash

for disk in `find /dev/ -maxdepth 1 -name \*sd\*`; do
 if df $disk | grep '/boot'; then
        echo "$disk is bootvolume!"
 fi
done


I found the answer myself:

I found this link wherein the whole procedure is outlined. Providing a gist here:

Download, extract and install libusb 1.0.9 from here: libusb.org
Download, extract and install pyusb  1.0 from here : SF pyusb project. This link also contains a link to a tutorial for pyusb.


What is causing this Kernel panic (Unable to mount root fs)?

Unable to mount root fs on unknown-block(0,0) means that you did not tell the kernel what to mount as your root directory.  This is normal because instead of having the kernel do this directly, these days it is handed an initramfs that takes care of locating and mounting the root filesystem, but for some reason, your initramfs is missing.  Use the grub menu to choose an older kernel that may still have its initramfs so you can boot up, then run sudo update-initramfs -u to rebuild the initramfs.


For the sake of completeness. 14.04 works on Hyper-V generation 2. Among other things kernel version 3.13 is required for generation 2. I am using it myself and it works nicely.

You might want to set the screen resolution manually though, as mode setting in the usual way is not yet supported by the hyperv_fb kernel module.

This can be archived by opening the file /etc/default/grub with the editor of your choice as root. Then edit the line

GRUB_CMDLINE_LINUX=""

to read

GRUB_CMDLINE_LINUX="video=hyperv_fb:[width]x[height]"

replacing [width] and [height] with the desired values. For example for FullHD resolution I use

GRUB_CMDLINE_LINUX="video=hyperv_fb:1920x1080"

to apply the new settings run afterwards in a terminal window

sudo update-grub

and restart the the guest system. The next time your guest Linux should have the desired resolution.


Ok, so I successfully compiled Halide on Ubuntu 13.04 by installing llvm, clang, and build-essential. My only guess as to your issue is that the LLVM or clang from the PPA you installed might not have worked quite right. It seems it's actually possible to get LLVM 3.2 from Ubuntu for 12.04, via what is known as the "proposed" archive. You might try purging the LLVM you have and installing it from "proposed". I'll explain how to do that below. Since you mentioned you're new to Ubuntu (in the original question version), I'll first explain what each command you've already used does, as best I can.

So, sudo apt-get install llvm-3.2 attempts to install the package named llvm-3.2 from the current repositories enabled on your system. In your case, it couldn't be found, so the command failed. sudo apt-get install llvm installed the llvm package, which is probably a special package that just uses the most up-to-date LLVM available in your standard repositories. In your case, that was 2.9. Same idea applies to sudo apt-get install clang. sudo add-apt-repository ppa:kxstudio-team/builds
adds what's called a personal package archive or PPA to your system. This lets you get more software from another repository, or software source. See https://help.launchpad.net/Packaging/PPA for more info. Finally, sudo apt-get update tells Ubuntu to get information on what packages are available from the currently available repositories. You might take a look at http://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html for more info on package management in Debian (most of which should apply to Ubuntu as well, since Ubuntu is based on Debian).

So, the steps to remove the packages you've got and install the versions available from precise-proposed:

Use sudo apt-get purge llvm-3.2 clang-3.2 to completely remove LLVM and clang from your system.
(Optional) Use sudo add-apt-repository --remove ppa:kxstudio-team/builds to remove the PPA from your system.
Follow the instructions at https://wiki.ubuntu.com/Testing/EnableProposed to enable the Proposed archive (right at the top of the page), and also follow the instructions for "Selective upgrading from -proposed". The first part will enable the actual Ubuntu version of the llvm-3.2 package, and the second will keep the system from trying to upgrade everything to the Proposed versions.
Use sudo apt-get update to pull in the information on what packages and versions are now available.
Use sudo apt-get install llvm-3.2/precise-proposed to install LLVM 3.2, and use sudo apt-get install clang/precise-proposed to install Clang 3.0 (I think that's the version you should get).
NEW STEP: Do sudo ln -s /usr/bin/llvm-config-3.2 /usr/local/bin/llvm-config to make the system treat llvm-config-3.2 (which is the llvm-config that came with llvm-3.2) as llvm-config. More completely, this creates a symbolic link (or symlink) to llvm-config-3.2 in another place where Ubuntu will look for programs (more info: ln, FHS, PATH). Thus, when you run "llvm-config", Ubuntu will find the symlink and run the program it points to (llvm-config-3.2).
See if everything compiles correctly now.

Hopefully that works. I've not tested any of this, so use at your own risk, etc. I'm pretty sure, however, that it shouldn't do anything terrible.

EDIT: Note that llvm and llvm-3.2 are independent. llvm depends on llvm-2.9 (see here), while llvm-3.2 is separate (see dependencies here)

Also, I'm not sure if you know about tab completion; it can be helpful if you're looking for a command but don't quite know the name (for example, in this case, it would probably have shown that llvm-config was called llvm-config-3.2).


Good offline dictionaries for GoldenDict

Not sure how i found this page, but it has got plenty of popular dictionaries in .bgl format (that can be read by GoldenDict).

Google Drive
download.huzheng.orgdict.org/dict.org/ or just download.huzheng.org

from which you can download dictionaries in StarDict format.


menu bar not visible on gnome-calculator

If you wish to change anything for an application, you will need to hover over the top task bar while focusing on the application.

For example:

Open up gcalctool (via Unity or terminal)
Hover over the top task bar
Click on 'Mode'
Select 'Programming'

This style for the menus reminds me of a Mac which has the same mentality. Picture below to see what I am talking about with the steps above.

This works in these versions of Ubuntu (if you are using Unity):

11.04
11.10
12.04 LTS

Hope this helps.


Virtualbox with Ubuntu 14.04.3 desktop not working

This happened to me. Please make sure that you have enabled virtuallization in your Computer's BIOS. Please reboot your machine - when it is coming up press F2 or F9 or F10 or ESC key(please refer to your computer manual for BIOS) so that you can get into the BIOS setup. Then go thru the upper level tabs/menus and find out the virtuallization setting - make it enabled. Make sure that you save the changes before exiting. Hopefully this should be the only issue.


How do I get Ubuntu to connect to my Android tablet?

The solution turned out to be to upgrade to ICS. Now USB seems to work without any special drivers and as long as the Tablet USB connection settings are set to "Camera (PTP)" mode.


de-install ubuntu and install lubuntu with USB

If Ubuntu is the only OS that you have on the Laptop, just run the Lubuntu installation media, and when asked where to install Lubuntu, select "Use complete harddrive". Make sure to backup any data that you want to keep, as this will delete the whole drive. If Ubuntu is not the only operating system on the Laptop, choose the custom installation instead, delete the partition on which Ubuntu is currently installed (and possibly the swap partition) create (a) new partition(s) and install Lubuntu on them.


I'd install unity-tweak-tool and use the "Restore defaults" in the Fonts tab:

sudo apt-get install unity-tweak-tool


Terminal not working. Extra junk at end of file

Looks like you've created a bunch of extra files (with errors) in apt.conf.d. You should get rid of these files.
Enter Recovery Mode

Reboot your computer and quickly press and hold the Shift key to enter the Grub menu.

Select "(recovery mode)".

In the next menu, select "Drop to root shell prompt".

In the terminal, mount your file system as read/write:
 mount -o remount,rw /
 mount --all

Make a temporary directory:
mkdir /home/Temp

Move the erroneous files:
mv /etc/apt/apt.conf.d/99ignoreresave /home/Temp
mv /etc/apt/apt.conf.d/99mysettings /home/Temp

If there are other files you manually created, move them also.
Then, reboot.
(If you don't need your custom files, you can remove them all using sudo rm -rf /home/Temp, or you can move them somewhere else to review them).


Convert speech (mp3 audio files) to text

pocketsphinx will do speech to text from an existing audio file. Depending on the initial format of the mp3, you may need two separate commands.

First convert your existing audio file to the mandatory input format:

    ffmpeg -i file.mp3 -ar 16000 -ac 1 file.wav

The run pocketsphinx

    pocketsphinx_continuous -infile file.wav 2> pocketsphinx.log > myspeech.txt

the created file myspeech.txt will have what you're looking for.

In case you are new to ubuntu, you would need to install the above programs using this command:

    sudo apt install pocketsphinx pocketsphinx-en-us ffmpeg


Package: plasmate

Do you have the package plasmate installed ?

With the Kubuntu 13.04 / KDE 4.10.5:

:~$ apt-file search plasmawallpaperviewer
kde-l10n-id: /usr/share/locale/id/LC_MESSAGES/plasmawallpaperviewer.mo
plasmate: /usr/bin/plasmawallpaperviewer

:~$ apt-cache show plasmate
Package: plasmate
Priority: extra
Section: universe/kde
...
Description: IDE tailored for development of Plasma components
 A small IDE tailored for development of Plasma components,
 such as Widgets, Runners, Dataengines.
Homepage: http://projects.kde.org/plasmate

http://aseigo.blogspot.fi/2012/11/plasma-sdk-accreting.html

  plasma sdk accreting

  If you have used plasmoidviewer, plasamengineexplorer or
  plasmawallpaperviewer from past releases of KDE Workspaces while
  developing Plasma components, you may be surprised to find them gone
  in the upcoming 4.10 release.

  Well, they aren't actually gone: they have been moved to the
  plasmate...


Sound, login, desktop, etc are all broken. Should I reinstall Ubuntu?

Based upon what you've said, yes, do a re-install.

If you want to save your data, boot from a live CD and copy the contents of your /home folder to an external drive.

Then re-install, and once booted, you can copy your data back to the internal disk.


yes, you can just format the drive which u installed ubuntu and install it freshly.


Ubuntu Server installation freezes during installation

If you're installing, then yes there's a chance that it will corrupt the files... but to be fair, if you cut it off during the installation you're going to have to install again and, if you wanted to be safe, remake the partition tables so that's not really a concern (at least not to me.)

You said Windows XP stopped working... What went wrong? If it was hardware related the same problems could be affecting Ubuntu and causing it to lock up as well.

Since you're new here, you can comment on my post to reply to me. Also, if this is a helpful reply you can click the up arrow next to it.


Enable upgrade options when using installation from DVD?

Your best bet would be to upgrade from Ubuntu .. try typing in a terminal the following:

sudo do-release-upgrade -d

If that doesn't work run

update-manager

click on Settings

Look for "Notify me of a new Ubuntu version" and set it so it says "For any new versions"

Then use update-manager to check for updates install any if any new ones show up then check again and it  should come up with the upgrade


What happens if I manually change the USER environment variable

Nothing dangerous! It will only change the value for $USER variable until you close current shell session. But, until to close the current shell session, the new value will be used and because of this it is possible that some applications or scripts where this variable is used to not run as expected.


Updating firmware on a HP Color LaserJet CP2025dn

Sometimes a firmware upgrade can also be done from a virtual machine running Windows but I have no experience if this works in your case. If you do so, then there is a great risk for spoiling your hardware EPROM (e.g. if the virtual machine or the USB connection crashes at some point during the upgrade process).

I recommend the far easiest and safest way: plug in any PC/Laptop running Windows2000 or later, upgrade from there and be happy.


While not a direct answer to the problem, this might be worth considering.

If you have multiple people in a position where they can all edit the same files, it's only a matter of time before you clash and overwrite the wrong stuff, delete something somebody was working on.

I would strongly recommend moving the editing side of things to git. Everybody checks-out a copy of the data and commit back their changes. Merges detect conflicts and you can take sensible, conscious actions to remedy them. Then, on the server —if we assume this is something that is running, like a website—  checkout from the git repo under a single user.

You can work on scripting this with hooks and things like Fabric. Automating it opens the door to other nice things like testing and coverage testing; techniques and habits that help you avoid pushing bad code onto a server.


Linux newbie with Komodo edit installation issues

U can try install it from repositores open a terminal type command i write u below and read instaruction on the screen :)
alt+ctrl+t
type sudo add-apt-repository ppa:mystic-mirage/komodo-edit
then type

sudo apt-get update

after finish updating type sudo apt-get install komodo-edit

if instalation is done u can run it from menu or type in terminal komodo-edit


Short answer

To revoke the 'cached' authentication actions of users on reboot. It's not a daemon, just a script run at boot time.

Extensive answer

By inspecting the init file /etc/init.d/sudo that 'starts the service', you can easily see what it's doing:

case "$1" in
  start)
        # make sure privileges don't persist across reboots
        if [ -d /var/lib/sudo ]
        then
                find /var/lib/sudo -exec touch -t 198501010000 '{}' \;
        fi
        ;;
  stop|reload|restart|force-reload)
        ;;
  *)
        echo "Usage: $N {start|stop|restart|force-reload}" >&2
        exit 1
        ;;
esac

So, basically, it just touches some files in /var/lib/sudo on start of the system to have it a very old modification timestamp. As a result, the 'cached' granted authentication actions are revoked on the start of the service (which happens at boot).

Some more detail on the /var/lib/sudo directory and those time stamps, please? Well, from the mapage of sudo(8):

[...]
Once a user has been authenticated, a time stamp is updated and the
user may then use sudo without a password for a short period of time
(15 minutes unless overridden in sudoers).
[...]
Since time stamp files live in the file system, they can outlive a
user's login session.  As a result, a user may be able to login, run a
command with sudo after authenticating, logout, login again, and run
sudo without authenticating so long as the time stamp file's
modification time is within 15 minutes (or whatever the timeout is set
to in sudoers).
[...]
/var/lib/sudo           Directory containing time stamps


Empty lines on top of drop-down menus (Ubuntu 16.04)

unfortunatelly i can't help you with empty lines: UI set first/selected item to your current cursor position by default - it's fine for me, so i didn't seek the way to change it.

But i suffered from the same problem with the dark font color in drop-down list items, which makes item names hard to read. My environment also is Ubuntu 16.04 with "Ambiance" UI theme, so i probably can help to fix that:

First of all, as you probably know, all system themes located there: "/usr/share/themes/", and some "Tweak Tools" (such as: "Unity Tweak Tool" (preferable) or "GNOME Tweak Tool") helps to set different themes for user's environment.

In my case some omission of my "Ambiance" theme was found in "gtk-2.0" settings, saved in "/usr/share/themes/Ambiance/gtk-2.0/gtkrc":

# Workaround style for menus where the text color is used instead of the fg color.
style "menuitem_text_is_fg_color_workaround" {
    text[NORMAL]        = @fg_color
    text[PRELIGHT]      = @selected_fg_color
    text[SELECTED]      = @selected_fg_color
    text[ACTIVE]        = @fg_color
    text[INSENSITIVE]   = "#99958b"
}

more precisely:

text[NORMAL]        = @fg_color

which makes drop-down list items font color almost the same as the background color, so to fix that all you need is to change "@fg_color" in that line to something else, such as "@selected_fg_color" (it defined as white), or use static color, for example: "#9e9e9e" (light "Mouse Gray" color).

Looks simple, but there is one problem: "Ambiance" - is the system default UI theme, which saved in system default location ("/usr/share/themes/"). So, to change it, you need the root credentials, and you will change default system parameters, which, i believe, isn't the best way to act.

So i recommend to create your own theme, based on "Ambiance", simply by copying folder "/usr/share/themes/Ambiance" into folder ".themes" in your Home Directory ("/home/[MyUser]/.themes/"), then rename copied theme folder from "Ambiance", to something else (e.g. "MyAmbiance"), then change it (.../.themes/MyAmbiance/gtk-2.0/gtkrc) as described above (with your basic credentials, cause you changing your own theme, not a system one), and finaly set your new created theme as your default one, using some "Tweak Tool", e.g. "Unity Tweak Tool".


Certificates -> Gnome2 Key Storage folder: cannot unlock

So I'm not entirely sure this is exactly what you want to do but I'm having the same problem so I resorted to CLI:

certutil -d sql:$HOME/.pki/nssdb -A -t "C,," -n <certificate nickname> -i <certificate filename>

Make sure you have libnss3-tools installed

sudo apt-get install libnss3-tools

This worked like a charm for me. It doesn't solve the GUI issue but at least I don't have to verify each one of my company's internal CA-based sites.

For the record, I got the info from here.


How can I delete text that is NOT in quotes or parentheses?

Using python:

#!/usr/bin/env python2
import re, sys
with open(sys.argv[1]) as f:
    for line in f:
        parts = line.split()
        for i in parts:
            if re.search(r'^[("].*[)"]$', i):
                print i,
        print '\n'.lstrip()

Output:

"foo" (bar) (19)
"foo"

Every line is read and parts separated by spaces are saved into a list called parts
Then by using re module's search function we found the parts that begin with either " or ( and end with either " or ).

How to run:

Save the script as e.g. script.py. Now you can run it in two ways:

Make it executable by chmod u+x /path/to/script.py and run it as /path/to/script.py /path/to/file.txt i.e. input the file file.txt as the first argument. If both script and file are in the same directory, then from that directory ./script.py file.txt
You can run it without making it executable, run it as python2 script.py file.txt.

Answer to the edited question:

#!/usr/bin/env python2
import re, sys
with open(sys.argv[1]) as f:
    for line in f:
        print ''.join(re.findall(r'(?:(?<=\s)["(].*[")](?=\s|$)|(?<=^)["(].*[")](?=\s|$))', line))

Output:

"foo foo" (bar bar) (19)
"foo foo"


How to inspect outgoing HTTP requests of a single application?

Well, for all those tcpdump fans =)

RUN ALL THESE COMMANDS AS ROOT !!!

Obtain root in a terminal with

sudo -i

To capture the RAW packets ...

sudo tcpdump -i any -w /tmp/http.log &

This will capture all the raw packets, on all ports, on all interfaces and write them to a file, /tmp/http.log.

Run your application. It obviously helps if you do not run any other applications that use HTTP (web browsers).

Kill tcpdump

killall tcpdump

To read the log, use the -A flag and pipe the output toless:

tcpdump -A -r /tmp/http.log | less

The -A flag prints out the "payload" or ASCII text in the packets. This will send the output to less, you can page up and down. To exit less, type Q.

When I go to Google, I see (in the raw packets):

20:42:38.179759 IP ufbt.local.56852 > sea09s02-in-f3.1e100.net.www: Flags [P.], seq 1:587, ack 1, win 913, options [nop,nop,TS val 25523484 ecr 492333202], length 586
E..~.v@.@..q......!#...P.(.gS.c..............u..Xh.GET /generate_204 HTTP/1.1
Host: clients1.google.com
Connection: keep-alive
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.34 (KHTML, like Gecko) rekonq Safari/534.34
Referer: http://www.google.com/
Accept: */*
Accept-Encoding: gzip, deflate, x-gzip, x-deflate
Accept-Charset: utf-8,*;q=0.5
Accept-Language: en-US, en-US; q=0.8, en; q=0.6
Cookie: PREF=ID=dd958d4544461998:FF=0:TM=1323842648:LM=1360205486:S=Fg_QCDsLMr4ZepIo; NID=67=OQJWjIDHG-B8r4EuM19F3g-nkaMcbvYwoY_CsOjzvYTOAxwqAos5kfzsk6Q14E70gIfJjHat8d8PuQIloB12BE-JuSHgsKHR2QSpgN12qSWoxeqhdcSQgzw5CHKtbR_a

tcpdump has a long set of options to refine data collection from specifying network interfaces to ports to source and destination IP addresses. It can NOT decrypt (so it will not work with HTTPS).

Once you know what you are interested in, you can use a number of options with tcpdump to record only the data of interest. The general strategy is to first record all the packets, review the raw data, and then capture only the packets of interest.

Some helpful flags (options):

-i Specify an interface
-i eth0

tcp port xx
tcp port 80

dst 1.2.3.4
specify a destination ip address

There is a learning curve, both to using tcpdump and learning how to analyze the data you collect. For further reading, I highly suggest Daniel Miessler's tcpdump Primer with Examples.


New AVD not creating properly in android

Android SDK does have some requirements on the Ubuntu 64-bit base:

adb

sudo apt-get install libc6:i386 libstdc++6:i386

aapt

sudo apt-get install zlib1g:i386

https://stackoverflow.com/questions/3878445/ubuntu-error-failed-to-create-the-sd-card


You could use a Boot Repair live disc to fix your grub. It has always worked fine for me.


As the comment mentions that in 18.04 and 18.10 the hotkey SUPER_SPACE does not work.

This can be fixed by unsetting the system hotkey in

  System settings -> Devices -> Keyboard -> Switch to next input source


You can override force fully this package using below command.

sudo dpkg -i --force-overwrite /var/cache/apt/archives/libmysqlclient18_5.5.40-0ubuntu1_amd64.deb

and than try apt-get -f install


Set default screen resolution in Lubuntu

I would modify the resolution with

xrandr -s 1920x1080

There is a file (maybe empty) or you can create the file

~/.config/lxsession/Lubuntu/autostart

You can add the xrandr command line into that file,

for example with the editor nano (text mode) or leafpad (GUI).

and reboot.


Custom Regional formats - keyboard layouts

Yes. Ja. Oui. Jawohl.

Make English your language for menus and windows.

Make Nederlands(België), Français(Belgique)... your regional format for numbers, dates and currency amounts.

Choose English US (alternative international) for your keyboard

There's also an option to assign the currency symbol € to certain keys

How do you want to type characters like é, è, â, ç œ  ... ? You have to configure it.

Try it with a live distro, without installing.

But don't use 13.10. There are (at the moment) unsolved problems with Keyboard Layout Options.


New Application Switcher gone and is now ugly

It looks like if you are using Ubuntu 2D. When logging in, select "Ubuntu", instead of "Ubuntu 2D".


How to view network shares in a consitant way?

I think it depends on the App, maybe theres a reason for that, depends on which protocol are you sharing with (smb, ssh, etc), the latency that the app expect, maybe a lot of low level things that app dont support


How to set up `xdg-open` to use Nautilus for `gvfs` paths?

From man xdg-open

xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser.
...
xdg-open supports file, ftp, http and https URLs.

The man page states that as long as the target is a recognized URL it will always use a web browser.  This looks like what you want is not possible
(apart from registering nautilus as your favourite web browser whis is a bad idea™ )


Just run the command exit and you will exit from the recovery console.


Graphical components stuck on Kubuntu 16.04

Cause of the Problem
I experienced this same problem yesterday and discovered that, some packages was overriding QT style with gtk looks. The environment variables in question were QT_STYLE_OVERRIDE and QT_QPA_PLATFORMTHEME.
Solution
The solution is putting these lines in ~/.profile file to unset the environment variables.

## Fixing QT style override problem
if [ "x$XDG_SESSION_DESKTOP" == "xKDE" ] || [ "x$XDG_SESSION_DESKTOP" == "xplasma" ];
then
    unset QT_STYLE_OVERRIDE
    unset QT_QPA_PLATFORMTHEME
fi

Now, the style should be changeable and will persist.


Ubuntu 20 LTS proper way to permanently change tc qdisc for a network interface?

If you're using netplan for configuring the network then there is no way to set qdiscs directly, so you'll probably find it easier to install networkd-dispatcher and put your commands in routable.d/ or configured.d/.
The upstream site has more info on usage.


How do I access my remote Ubuntu server via X-windows from my Mac?

There are several methods to accomplished that, depending of what you really need to do.

In order to forward remote apps to local X environment, you need to install X11 on your Mac (you can find it at apple support site): http://support.apple.com/kb/DL1605?viewlocale=en_US&locale=en_US

From the X11 app, open the terminal, and then access the remote host with:

    ssh -XC user@host

Then, when logged, simply run the command for the desired app, ex: firefox, nautilus, thunderbird,  whatever...

You can even launch only the system (Ubuntu, Xubuntu, Mint, etc..) Main Menu, and interact with the remote system from there, without the need of a full graphical front-end. On a remote Linux Mint env, i simply run:

    mintmenu&

If you really need it, you can even start the remote graphical environment locally at your Mac's X11, simply running:

    ubuntu-session
    xubuntu-session
    etc... (depends of your remote environment)

Better than any VNC, even better than an X11VNC connection! Secured and compressed connection FTW.